rulesfilter.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. if (! defined("CONFIG")) die("Not defined");
  3. //rule type
  4. if (isset($_GET['rule_type'])) { $rule_type = $_GET["rule_type"] * 1; }
  5. if (isset($_POST['rule_type'])) { $rule_type = $_POST["rule_type"] * 1; }
  6. if (!isset($rule_type)) {
  7. if (isset($_SESSION[$page_url]['rule_type'])) { $rule_type = $_SESSION[$page_url]['rule_type']*1; }
  8. }
  9. if (!isset($rule_type)) { $rule_type = 0; }
  10. $_SESSION[$page_url]['rule_type']=$rule_type;
  11. //rule target
  12. if (isset($_GET['rule_target'])) { $rule_target = $_GET["rule_target"] * 1; }
  13. if (isset($_POST['rule_target'])) { $rule_target = $_POST["rule_target"] * 1; }
  14. if (!isset($rule_target)) {
  15. if (isset($_SESSION[$page_url]['rule_target'])) { $rule_target = $_SESSION[$page_url]['rule_target']*1; }
  16. }
  17. if (!isset($rule_target)) { $rule_target = 0; }
  18. $_SESSION[$page_url]['rule_target']=$rule_target;
  19. //search string
  20. if (isset($_GET['f_rule'])) { $f_rule = htmlspecialchars(trim($_GET["f_rule"]), ENT_QUOTES, 'UTF-8'); }
  21. if (isset($_POST['f_rule'])) { $f_rule = htmlspecialchars(trim($_POST["f_rule"]), ENT_QUOTES, 'UTF-8'); }
  22. if (!isset($f_rule)) {
  23. if (isset($_SESSION[$page_url]['f_rule'])) { $f_rule = $_SESSION[$page_url]['f_rule']; }
  24. }
  25. if (!isset($f_rule)) { $f_rule = ''; }
  26. $f_rule = str_replace('%', '', $f_rule);
  27. $_SESSION[$page_url]['f_rule']=$f_rule;
  28. ?>