Advertisement
johnburn

Decoded for: [email protected]

Sep 19th, 2011
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 21.26 KB | None | 0 0
  1. <?php
  2. $root = $_ENV['DOCUMENT_ROOT'] . '/';
  3. define('ROOT', $root);
  4. $sk = new skclass();
  5. $tpl = new template();
  6. $skinscript = $_ENV["SCRIPT_NAME"];
  7. $datecheck = 'MS_89475' . date('n') . '8973434254080808880077700134' . date('y') . '300344' . date('m') . '3204983240000234';
  8. $datecheckMes = 'MS_4566' . date('W') . '456077700768880077700134' . date('y') . '300344' . date('nm') . '328808820082978434';
  9. if ($configPath = $sk->getconfigpath()) {
  10.     if ($checkkey = $sk->openfile($configPath . "lichash")) {
  11.         list($lastcheck, $lastfail) = explode('__', $checkkey);
  12.         if ($lastcheck != $datecheck) {
  13.             $mustcheck = true;
  14.         }
  15.     } else {
  16.         $mustcheck = true;
  17.     }
  18. } else {
  19.     $mustcheck = true;
  20. }
  21. $configPath = $sk->getconfigpath();
  22. $key_path = $configPath . "key.php";
  23. if (strstr($skinscript, "CMD_PLUGIN") || ($skinscript == "/CMD_SKINS") || ($skinscript == "/HTM_MSDEBUG") || strstr($skinscript, "HTM_INVALID_LICENCE") || ($_ENV["USER"] == "admin" && $skinscript == "/")) {
  24.     $dontcheck = 1;
  25. } else {
  26.     if ($mustcheck == true) {
  27.         $key = $sk->openfile($configPath . "license");
  28.         $lic_status = checkLicence($key);
  29.         if ($lic_status['status'] != "active") {
  30.             $urlStatus = $lic_status['status'] . "|||" . $lic_status['message'] . "|||" . $lic_status['adminmsg'];
  31.             $urlStatus = urlencode(base64_encode($urlStatus));
  32.             echo '<script language="JavaScript" type="text/javascript">window.location=\'/HTM_INVALID_LICENCE?status=' . $urlStatus . '\';</script>';
  33.             echo '<META HTTP-EQUIV="refresh" CONTENT="0; url=/HTM_INVALID_LICENCE?status=' . $urlStatus . '">';
  34.         } else {
  35.             $sk->whitefile($datecheck, $configPath . "lichash");
  36.             @chmod($path . "lichash", 0777);
  37.             $checklocalkey = $sk->openfile($configPath . "lklichash");
  38.             if ($checklocalkey != $datecheckMes) {
  39.                 if ($keyphp = getLocalKey($key)) {
  40.                     $sk->whitefile($datecheckMes, $configPath . "lklichash");
  41.                     @chmod($path . "lklichash", 0777);
  42.                     $sk->whitefile($keyphp, $configPath . "key.php");
  43.                     @chmod($path . "key.php", 0777);
  44.                 }
  45.             }
  46.         }
  47.     }
  48. }
  49. function checkLicence($license) {
  50.     $servers = array();
  51.     $servers[] = 'http://licencias.outservicesa.net/license_server';
  52.     $servers[] = 'http://us.licencias.outservices.net/license_server';
  53.     $installed_directory = "/license_server";
  54.     $installed_host = "http://licencias.outservices.net";
  55.     list($license_type, $xx) = explode('_', $license);
  56.     $product_id = 9999;
  57.     if ($license_type == "MSA") $product_id = 15;
  58.     if ($license_type == "MSF") $product_id = 16;
  59.     if ($license_type == "MS2A") $product_id = 17;
  60.     if ($license_type == "MSLT") $product_id = 27;
  61.     $enable_dns_spoof = 'yes';
  62.     $query_string = "license=" . $license . "&product_id=" . $product_id . "&access_ip=" . server_addr() . "&access_host=" . $_SERVER['HTTP_HOST'] . '&access_token=' . $token = make_token();
  63.     foreach($servers as $server) {
  64.         $sinfo = @parse_url($server);
  65.         $data = phpaudit_exec_socket($sinfo['host'], $sinfo['path'], '/validate_internal.php', $query_string);
  66.         if (!$data) $data = @file_get_contents($installed_host . $installed_directory . "/validate_internal.php?" . $query_string);
  67.         if ($data) {
  68.             $parser = xml_parser_create('');
  69.             xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
  70.             xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
  71.             xml_parse_into_struct($parser, $data, $values, $tags);
  72.             xml_parser_free($parser);
  73.             $returned = $values[0]['attributes'];
  74.             if ($returned['status']) {
  75.                 break;
  76.             }
  77.         }
  78.     }
  79.     $skip_dns_spoof = false;
  80.     if (!$data) {
  81.         $array['per_server'] = $per_server;
  82.         $array['per_install'] = $per_install;
  83.         $array['per_site'] = $per_site;
  84.         $data = validate_local_key($array);
  85.         $skip_dns_spoof = true;
  86.     }
  87.     $parser = @xml_parser_create('');
  88.     @xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
  89.     @xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
  90.     @xml_parse_into_struct($parser, $data, $values, $tags);
  91.     @xml_parser_free($parser);
  92.     $returned = $values[0]['attributes'];
  93.     if (empty($returned)) {
  94.         $returned['status'] = "invalid";
  95.     }
  96.     if ($returned['status'] != "active") {
  97.         $sinfo = @parse_url($servers[0]);
  98.     }
  99.     unset($query_string);
  100.     unset($per_server);
  101.     unset($per_install);
  102.     unset($per_site);
  103.     unset($server);
  104.     unset($data);
  105.     unset($parser);
  106.     unset($values);
  107.     unset($tags);
  108.     unset($sinfo);
  109.     unset($token);
  110.     return $returned;
  111. }
  112. function make_token() {
  113.     return md5('fde6c53b6ffd106d7aba038a349b5575' . time());
  114. }
  115. function get_key() {
  116.     global $localKeyPath;
  117.     $data = @file($localKeyPath);
  118.     if (!$data) {
  119.         return false;
  120.     }
  121.     $buffer = false;
  122.     foreach($data as $line) {
  123.         $buffer.= $line;
  124.     }
  125.     if (!$buffer) {
  126.         return false;
  127.     }
  128.     $buffer = @str_replace("<?PHP", "", $buffer);
  129.     $buffer = @str_replace("?>", "", $buffer);
  130.     $buffer = @str_replace("/*--", "", $buffer);
  131.     $buffer = @str_replace("--*/", "", $buffer);
  132.     return @str_replace("\n", "", $buffer);
  133. }
  134. function parse_local_key() {
  135.     global $localKeyPath;
  136.     if (!@file_exists($localKeyPath)) {
  137.         return false;
  138.     }
  139.     $raw_data = @base64_decode(get_key());
  140.     $raw_array = @explode("|", $raw_data);
  141.     if (@is_array($raw_array) && @count($raw_array) < 8) {
  142.         return false;
  143.     }
  144.     return $raw_array;
  145. }
  146. function validate_local_key($array) {
  147.     $raw_array = parse_local_key();
  148.     if (!@is_array($raw_array) || $raw_array === false) return "<verify status='invalid_key' message='Please contact support for a new license key.' />";
  149.     if ($raw_array[9] && @strcmp(@md5("fde6c53b6ffd106d7aba038a349b5575" . $raw_array[9]), $raw_array[10]) != 0) return "<verify status='invalid_key' message='Please contact support for a new license key.' />";
  150.     if (@strcmp(@md5("fde6c53b6ffd106d7aba038a349b5575" . $raw_array[1]), $raw_array[2]) != 0) return "<verify status='invalid_key' message='Please contact support for a new license key.' " . $raw_array[9] . " />";
  151.     if ($raw_array[1] < time() && $raw_array[1] != "never") return "<verify status='invalid_key' message='Please contact support for a new license key.' " . $raw_array[9] . " />";
  152.     return "<verify status='active' message='The license key is valid.' " . $raw_array[9] . " />";
  153. }
  154. function phpaudit_exec_socket($http_host, $http_dir, $http_file, $querystring) {
  155.     $fp = @fsockopen($http_host, 80, $errno, $errstr, 10);
  156.     if (!$fp) {
  157.         return false;
  158.     } else {
  159.         $header = "POST " . ($http_dir . $http_file) . " HTTP/1.0\r\n";
  160.         $header.= "Host: " . $http_host . "\r\n";
  161.         $header.= "Content-type: application/x-www-form-urlencoded\r\n";
  162.         $header.= "User-Agent: PHPAudit v2 (http://www.phpaudit.com)\r\n";
  163.         $header.= "Content-length: " . @strlen($querystring) . "\r\n";
  164.         $header.= "Connection: close\r\n\r\n";
  165.         $header.= $querystring;
  166.         $data = false;
  167.         if (@function_exists('stream_set_timeout')) {
  168.             stream_set_timeout($fp, 20);
  169.         }
  170.         @fputs($fp, $header);
  171.         if (@function_exists('socket_get_status')) {
  172.             $status = @socket_get_status($fp);
  173.         } else {
  174.             $status = true;
  175.         }
  176.         while (!@feof($fp) && $status) {
  177.             $data.= @fgets($fp, 1024);
  178.             if (@function_exists('socket_get_status')) {
  179.                 $status = @socket_get_status($fp);
  180.             } else {
  181.                 if (@feof($fp) == true) {
  182.                     $status = false;
  183.                 } else {
  184.                     $status = true;
  185.                 }
  186.             }
  187.         }
  188.         @fclose($fp);
  189.         if (!strpos($data, '200')) {
  190.             return false;
  191.         }
  192.         if (!$data) {
  193.             return false;
  194.         }
  195.         $data = @explode("\r\n\r\n", $data, 2);
  196.         if (!$data[1]) {
  197.             return false;
  198.         }
  199.         if (@strpos($data[1], "verify") === false) {
  200.             return false;
  201.         }
  202.         return $data[1];
  203.     }
  204. }
  205. function server_addr() {
  206.     return ($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
  207. }
  208. function getLocalKey($license) {
  209.     global $licapi;
  210.     include realpath(dirname(__FILE__)) . "/license.php";
  211.     $licapi = new IXR_Client('http://licencias.outservices.net/admin/rpc.php');
  212.     $data = array();
  213.     $data['api_key'] = '2425f27c6bf1f8821c3283e3b3037085';
  214.     $data['license_key'] = $license;
  215.     $licapi->query('license.get_local_key', $data);
  216.     $returned = $licapi->getResponse();
  217.     if ($returned != '' && $returned['faultCode'] != - 1 && $returned['faultCode'] != - 2 && $returned['faultCode'] != - 3) {
  218.         return $returned;
  219.     } else {
  220.         return false;
  221.     }
  222. }
  223. function getLCs() {
  224.     return 'MS_89475' . date('n') . '8973434254080808880077700134' . date('y') . '300344' . date('m') . '3204983240000234';
  225. }
  226. function getLCm() {
  227.     return 'MS_4566' . date('W') . '456077700768880077700134' . date('y') . '300344' . date('nm') . '328808820082978434';
  228. }
  229. class template {
  230.     function footer($cp, $dav) {
  231.         echo '</td></tr><tr>';
  232.         echo '<td height="30" class="td_footer" id="footer" colspan="2">DirectAdmin ' . $cp . ' v' . $dva . ' © 2006 JBMC Software</td>';
  233.         echo '</tr></table></body></html>';
  234.     }
  235.     function start_table($width = '100%', $cellspacing = '0', $cellpadding = '0') {
  236.         echo '<table width="' . $width . '" border="0" cellspacing="' . $cellspacing . '" cellpadding="' . $cellpadding . '"><tr><td>';
  237.     }
  238.     function split_table() {
  239.         echo '</td></tr><tr><td>';
  240.     }
  241.     function end_table() {
  242.         echo '</td></tr></table>';
  243.     }
  244. }
  245. class skclass {
  246.     function make_html($html, $search = '', $replace = '') {
  247.         if ($search == '' || $replace == '') {
  248.             $search = array('class=inputclass ', ' type=submit', ' type=\'submit\'', '<input type=button', '<input type=reset', '<input type=text', '<input type=password', '<input type=file', '<table class=list  cellpadding=3 cellspacing=1>', '<table class=list cellpadding=3 cellspacing=1>', '<table style="width: 75%" class=list  cellpadding=3 cellspacing=1>', '<br>');
  249.             $replace = array('', ' type=submit class=boton', ' type=submit class=boton', '<input type=button class=boton', '<input type=reset class=boton', '<input type=text class=combo', '<input type=password class=combo', '<input type=file class=archivo', '<table class=list cellpadding=3 cellspacing=0>', '<table class=list cellpadding=3 cellspacing=0>', '<table style="width: 75%" class=list  cellpadding=3 cellspacing=0>', '<br />');
  250.         }
  251.         $newhtml = str_replace($search, $replace, $html);
  252.         return $newhtml;
  253.     }
  254.     function api_get($cmd, $post = false) {
  255.         if (is_array($post)) {
  256.             $is_post = true;
  257.             $str = '';
  258.             foreach($post as $var => $value) {
  259.                 if (strlen($str) > 0) $str.= '&';
  260.                 $str.= $var . '=' . urlencode($value);
  261.             }
  262.             $post = $str;
  263.         } else {
  264.             $is_post = false;
  265.         }
  266.         $headers = array();
  267.         $headers['Host'] = '127.0.0.1:' . $_ENV['SERVER_PORT'];
  268.         $headers['Cookie'] = 'session=' . $_ENV['SESSION_ID'] . '; key=' . $_ENV['SESSION_KEY'];
  269.         if ($is_post) {
  270.             $headers['Content-type'] = 'application/x-www-form-urlencoded';
  271.             $headers['Content-length'] = strlen($post);
  272.         }
  273.         $send = ($is_post ? 'POST ' : 'GET ') . $cmd . " HTTP/1.1\r\n";
  274.         foreach($headers as $var => $value) $send.= $var . ': ' . $value . "\r\n";
  275.         $send.= "\r\n";
  276.         if ($is_post && strlen($post) > 0) $send.= $post . "\r\n\r\n";
  277.         if ($_ENV["SSL"] == 1) {
  278.             $sIP = 'ssl://127.0.0.1';
  279.         } else {
  280.             $sIP = '127.0.0.1';
  281.         }
  282.         $res = @fsockopen($sIP, $_SERVER['SERVER_PORT'], &$sock_errno, &$sock_errstr, 2);
  283.         if ($sock_errno || $sock_errstr) return false;
  284.         fputs($res, $send, strlen($send));
  285.         $result = '';
  286.         while (!feof($res)) $result.= fgets($res, 32768);
  287.         @fclose($res);
  288.         $data = explode("\r\n\r\n", $result, 2);
  289.         return $data[1];
  290.     }
  291.     function user_mainmenu($title, $items, $type = "item") {
  292.         $output = '';
  293.         for ($i = 0;$i < count($items);$i++) {
  294.             if ($items[$i]['plugin']) {
  295.                 $itemimg = "/IMG_IC_PLUGIN";
  296.                 $plugintxt = $items[$i]['plugin'];
  297.                 if (strstr($plugintxt, "stat")) $itemimg = "/IMG_IC_STATS";
  298.                 if (strstr($plugintxt, "Stat")) $itemimg = "/IMG_IC_STATS";
  299.                 if (strstr($plugintxt, "awstats")) $itemimg = "/IMG_IC_AWSTATS";
  300.                 if (strstr($plugintxt, "Awstats")) $itemimg = "/IMG_IC_AWSTATS";
  301.                 if (strstr($plugintxt, "AwStats")) $itemimg = "/IMG_IC_AWSTATS";
  302.                 if (strstr($plugintxt, "smtp")) $itemimg = "/IMG_IC_STATS";
  303.                 if (strstr($plugintxt, "Ruby")) $itemimg = "/IMG_IC_RUBY";
  304.                 if (strstr($plugintxt, "ruby")) $itemimg = "/IMG_IC_RUBY";
  305.                 if (strstr($plugintxt, "rails")) $itemimg = "/IMG_IC_RUBY";
  306.                 if (strstr($plugintxt, "Rails")) $itemimg = "/IMG_IC_RUBY";
  307.                 if (strstr($plugintxt, "SMTP")) $itemimg = "/IMG_IC_SMTP_CONTROL";
  308.                 if (strstr($plugintxt, "smtp")) $itemimg = "/IMG_IC_SMTP_CONTROL";
  309.                 if (strstr($plugintxt, "Billing")) $itemimg = "/IMG_IC_BILLING";
  310.                 if (strstr($plugintxt, "billing")) $itemimg = "/IMG_IC_BILLING";
  311.                 if (strstr($plugintxt, "bill")) $itemimg = "/IMG_IC_BILLING";
  312.                 if (strstr($plugintxt, "payment")) $itemimg = "/IMG_IC_BILLING";
  313.                 if (strstr($plugintxt, "hotlink")) $itemimg = "/IMG_IC_HOTLINK";
  314.                 if (strstr($plugintxt, "iTron")) $itemimg = "/IMG_IC_ITRON";
  315.                 if (strstr($plugintxt, "installatron")) $itemimg = "/IMG_IC_ITRON";
  316.                 if (strstr($plugintxt, "tomcat")) $itemimg = "/IMG_IC_TOMCAT";
  317.                 if (strstr($plugintxt, "Tomcat")) $itemimg = "/IMG_IC_TOMCAT";
  318.                 if (strstr($plugintxt, "marina")) $itemimg = "/IMG_IC_LICENSE";
  319.                 if (strstr(strtolower($plugintxt), "pear")) $itemimg = "/IMG_IC_PEAR";
  320.                 if (strstr(strtolower($plugintxt), "pgsql")) $itemimg = "/IMG_IC_PGSQL";
  321.                 if (strstr($plugintxt, "PostgreSQL")) $itemimg = "/IMG_IC_PGSQL";
  322.                 if (strstr($plugintxt, "Postgre")) $itemimg = "/IMG_IC_PGSQL";
  323.                 if (strstr(strtolower($plugintxt), "postgre")) $itemimg = "/IMG_IC_PGSQL";
  324.                 if (strstr(strtolower($plugintxt), "softaculous")) $itemimg = "/IMG_IC_SOFTAC";
  325.                 if (strstr(strtolower($plugintxt), "phpvs")) $itemimg = "/IMG_IC_PHPVS";
  326.                 if (strstr(strtolower($plugintxt), "php version selector")) $itemimg = "/IMG_IC_PHPVS";
  327.                 $pluglink = preg_replace("/<a(.*?)href=\"(.*?)\"(.*?)>(.*?)<\/a>/", "<a href=\"\\2\"><img src=\"$itemimg\"><br>\\4</a>", $items[$i]['plugin']);
  328.                 $output.= $pluglink;
  329.             } else {
  330.                 $output.= '<a href="' . $items[$i]['link'] . '"><img src="' . $items[$i]['img'] . '"><br>' . $items[$i]['txt'] . '</a>';
  331.             }
  332.         }
  333.         $start_menu = '<fieldset class="buttons-box"><legend>' . $title . '</legend>';
  334.         $end_menu = '</fieldset><br><br>';
  335.         echo $start_menu . $output . $end_menu;
  336.     }
  337.     function submenu($title, $items, $footer = false) {
  338.         $output = '<table border="0" cellspacing="0" cellpadding="0" align="center"><tr>';
  339.         $div = 1;
  340.         for ($i = 0;$i < count($items);$i++) {
  341.             $output.= '<td width="20%" align="center"><a href="' . $items[$i]['link'] . '" class="subitem" ' . $items[$i]['js'] . '><img src="' . $items[$i]['img'] . '" width="32" height="32" border="0"><br>' . $items[$i]['txt'] . '</a></td>';
  342.             if ($div == 5) {
  343.                 $output.= '</tr><tr>';
  344.                 $div = 0;
  345.             }
  346.             $div++;
  347.         }
  348.         $output.= '</tr></table>';
  349.         $start_menu = '<table width="100%" border="0" cellspacing="0" cellpadding="0" class=list><tr><td class=listtitle height="22" style="padding-left:3px;"><b>' . $title . '</b></td></tr><tr><td class=list>';
  350.         $end_menu = '</td></tr>';
  351.         if ($footer) $end_menu.= '<tr><td class="listend">' . $footer . '</td></tr>';
  352.         $end_menu.= '</table>';
  353.         echo $start_menu . $output . $end_menu;
  354.     }
  355.     function box_tit($tit) {
  356.         $output = '<div><table width="100%" border="0" cellspacing="0" cellpadding="0">';
  357.         $output.= '<tr><td background="/IMG_BOX_L"><img src="/IMG_SPACER" width="3" height="22"></td>';
  358.         $output.= '<td width="100%" class="box_tit"  background="/IMG_BG_BOX_TIT">' . $tit . '</td>';
  359.         $output.= '<td background="/IMG_BOX_R"><img src="/IMG_SPACER" width="3" height="22"></td></tr>';
  360.         $output.= '</table></div>';
  361.         return $output;
  362.     }
  363.     function uptime($color = false) {
  364.         if ($uptime = @exec("uptime")) {
  365.             list($uptime, $load) = explode('load', $uptime);
  366.             list($a, $load) = explode(':', $load);
  367.             $load = trim($load);
  368.             list($load1, $load5, $load15) = explode(',', $load);
  369.             $load1 = trim($load1) * 1;
  370.             $load5 = trim($load5) * 1;
  371.             $load15 = trim($load15) * 1;
  372.             list($a, $uptime) = explode('up', $uptime);
  373.             list($up1, $up2, $a) = explode(',', $uptime);
  374.             $up1 = trim($up1);
  375.             $up2 = trim($up2);
  376.             $uptime = $up1 . ", " . $up2;
  377.             $ret['uptime'] = $uptime;
  378.         } else {
  379.             $loads = urldecode($this->api_get("/CMD_API_LOAD_AVERAGE"));
  380.             parse_str($loads);
  381.             $load1 = $one;
  382.             $load5 = $five;
  383.             $load15 = $fifteen;
  384.         }
  385.         if ($color) {
  386.             if ($load1 >= 5) $load1 = "<span style='color:red;'><b>$load1</b></span>";
  387.             if ($load5 >= 5) $load5 = "<span style='color:red;'><b>$load5</b></span>";
  388.             if ($load15 >= 5) $load15 = "<span style='color:red;'><b>$load15</b></span>";
  389.         }
  390.         $load = $load1 . ", " . $load5 . ", " . $load15;
  391.         $ret['load'] = $load;
  392.         return $ret;
  393.     }
  394.     function openfile($file) {
  395.         if (file_exists($file)) {
  396.             if ($data = @file_get_contents($file)) {
  397.                 return $data;
  398.             } else {
  399.                 return false;
  400.             }
  401.         } else {
  402.             return false;
  403.         }
  404.     }
  405.     function whitefile($str, $file) {
  406.         if ($al = @fopen($file, "w")) {
  407.             if (is_writable($file)) {
  408.                 @fwrite($al, $str);
  409.                 return true;
  410.             } else {
  411.                 return false;
  412.             }
  413.             @fclose($al);
  414.         } else {
  415.             return false;
  416.         }
  417.     }
  418.     function getpath() {
  419.         $skinpath = $_ENV["DOCUMENT_ROOT"];
  420.         if (preg_match("/\/home\/(.+)\/skins\/(.+)/", $skinpath)) {
  421.             $return['skinlocate'] = "reseller";
  422.             $return['path'] = $skinpath . "/inc/";
  423.         } elseif (preg_match("/\/usr\/local\/directadmin\/data\/skins\/(.+)/", $skinpath)) {
  424.             $return['skinlocate'] = "admin";
  425.             $return['path'] = $skinpath . "/inc/";
  426.         } else {
  427.             if (file_exists("/usr/local/directadmin/data/skin_data/marina")) {
  428.                 $return['skinlocate'] = "admin";
  429.                 $return['path'] = "/usr/local/directadmin/data/skin_data/marina/";
  430.                 return $return;
  431.             } else {
  432.                 return false;
  433.             }
  434.         }
  435.         return $return;
  436.     }
  437.     function getconfigpath() {
  438.         $arrPath = $this->getpath();
  439.         if ($arrPath['skinlocate'] == "reseller") {
  440.             return $arrPath['path'];
  441.         } else {
  442.             if (file_exists("/usr/local/directadmin/data/skin_data/marina")) {
  443.                 return "/usr/local/directadmin/data/skin_data/marina/";
  444.             } else {
  445.                 return $arrPath['path'];
  446.             }
  447.         }
  448.     }
  449.     function getUserConf() {
  450.         $file = $this->getconfigpath() . "userconf";
  451.         if (!file_exists($file)) {
  452.             $this->whitefile(serialize(array("x" => "x")), $file);
  453.             @chmod($file, 0777);
  454.         }
  455.         $cont = $this->openfile($file);
  456.         if ($cont) {
  457.             $_Config = unserialize($cont);
  458.             return $_Config;
  459.         } else {
  460.             return false;
  461.         }
  462.     }
  463.     function saveConfig($_Config) {
  464.         $file = $this->getconfigpath() . "userconf";
  465.         $cont = serialize($_Config);
  466.         if ($this->whitefile($cont, $file)) return true;
  467.         else return false;
  468.     }
  469. }
  470. function _d6($_s) {
  471.     return base64_decode(str_replace('_', '=', $_s));
  472. }
  473. function _d2_ev($_s) {
  474.     return eval(base64_decode(str_replace('_', '=', $_s)));
  475. }
  476. function _dl3($_l1) {
  477.     return checkLicence($_l1);
  478. }
  479. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement