summaryrefslogtreecommitdiffstats
path: root/application/controllers/FilterController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/FilterController.php')
-rw-r--r--application/controllers/FilterController.php23
1 files changed, 20 insertions, 3 deletions
diff --git a/application/controllers/FilterController.php b/application/controllers/FilterController.php
index 73b087c..df8db07 100644
--- a/application/controllers/FilterController.php
+++ b/application/controllers/FilterController.php
@@ -265,6 +265,7 @@ class FilterController extends Zend_Controller_Action
#########################################################
// IP Adress
$filtertypID = 1;
+ // get it from session_table with session_id from the session
$ipAdress = "111.10.10.10";
$ipAdress = str_replace(".","",$this->fillIP($ipAdress));
$select = $db->select()
@@ -285,6 +286,7 @@ class FilterController extends Zend_Controller_Action
#########################################################
// Mac range
$filtertypID = 2;
+ // get it from session_table with session_id from the session
$macAdress = "00:1e:0b:27:f4:99";
$macAdress = str_replace(":","",$this->fillMac($ipAdress));
$stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
@@ -300,30 +302,45 @@ class FilterController extends Zend_Controller_Action
#########################################################
// PoolID
$filtertypID = 3;
+ // get PoolID from client_ID from session_id from the session
+ $poolid = 1;
+ $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
+ filtertypeID = ".$filtertypID." AND
+ filtervalue = '.$poolid.' ");
+ $result = $stmt->fetchAll();
+ foreach($result as $r){
+ $set[$filtertypID][] = $r['filterID'];
+ }
+ if($showPartResults)
+ print_a('poolID',$result,$set[$filtertypID]);
/*
If client comes from a specific pool
*/
#########################################################
// ClientID
$filtertypID = 8;
+ // get client_ID from session_id from the session
/*
If client is a specific client
*/
#########################################################
- // BootIso
+ // BootIsoID
$filtertypID = 4;
+ // get BootIsoID from client_ID from session_id from the session
/*
WHERE bootiso = bootiso
*/
#########################################################
- // Membership
+ // MembershipID
$filtertypID = 5;
+ // get membership from the session
/*
user is in a defined membership
*/
#########################################################
- // Group
+ // GroupID
$filtertypID = 6;
+ // get membership from the session
/*
user is in a defined groupID
*/