Guest User

Untitled

a guest
May 4th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Loader)
  6. *
  7. * @ Version : 2.0.0.4
  8. * @ Author : DeZender
  9. * @ Release on : 21.10.2015
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. $PREFS = new Preferences();
  15. $PREFS->conf = $conf;
  16. $PREFS->compile("system");
  17. if ((((defined("VIR_PATH") == false) || defined("VIR_CP_PATH") == false) || defined("SYS_PATH") == false) || defined("SYS_LICENSE") == false)
  18. {
  19. exit("The system does not appear to be properly installed (1).");
  20. }
  21. if (((isset($DB) == false) || isset($CACHE) == false) || isset($PREFS) == false)
  22. {
  23. exit("The system does not appear to be installed properly (2).");
  24. }
  25.  
  26.  
  27. class Preferences {
  28.  
  29.  
  30. public $conf = array();
  31. public function init($key = "", $slash = false) {
  32.  
  33. if ($key == "")
  34. {
  35. return false;
  36. }
  37. $pref = !isset($this->conf[$key]) ? false : ($this->conf[$key]);
  38. return $pref;
  39. }
  40.  
  41. public function get_prefs($var) {
  42.  
  43. global $DB;
  44. if (is_string($var) && !empty($var))
  45. {
  46. $result = $DB->query("SELECT val FROM " . DB_PREFIX . ("settings WHERE label='" . $var . "'"));
  47. if ($DB->num_rows($result))
  48. {
  49. $obj = $DB->fetch_object($result);
  50. $this->conf[$var] = $obj->val;
  51. unset($obj);
  52. }
  53. else
  54. {
  55. exit("Unable to fetch application settings.");
  56. }
  57. unset($result);
  58. ..........................................................................
  59. ................................
  60. .............
Advertisement
Add Comment
Please, Sign In to add comment