📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
belediyescripti.demodesign.com.tr
📝
Modules.php
← Geri Dön
<?php class Modules { public static $lang = NULL; private static $temp_include = []; public static $modules = ["Addons" => [], "Currency" => [], "Mail" => [], "Payment" => [], "Registrars" => [], "Servers" => [], "SMS" => [], "Widgets" => []]; // @ioncube.dynamickey encoding key: apfzzavlhgi() // Encryption type: 2 public static function Lang($type, $module, $lang = "") { if ($lang && $lang != self::$lang) { self::$lang = $lang; $fpath = MODULE_DIR . $type . DS . $module . DS; $dlfile = $fpath . "lang" . DS . "en.php"; $lfile = $fpath . "lang" . DS . $lang . ".php"; if (file_exists($lfile)) { self::$modules[$type][$module]["lang"] = (include $lfile); } else { if (file_exists($dlfile)) { self::$modules[$type][$module]["lang"] = (include $dlfile); } } } if (isset(self::$modules[$type][$module]["lang"])) { return self::$modules[$type][$module]["lang"]; } } // @ioncube.dynamickey encoding key: apdqxplrcws() // Encryption type: 2 public static function Config($type, $module) { if (isset(self::$modules[$type][$module]["config"])) { return self::$modules[$type][$module]["config"]; } } // @ioncube.dynamickey encoding key: ajrdmcn2acs() // Encryption type: 5 public static function add($file, $type, $nominc = false, $status = "") { $fpath = MODULE_DIR . $type . DS . $file . DS; $clang = self::$lang ? self::$lang : (self::$lang ? self::$lang->clang : "en"); $mfile = $fpath . $file . ".php"; $cfile = $fpath . "config.php"; $dlfile = $fpath . "lang" . DS . "en.php"; $lfile = $fpath . "lang" . DS . $clang . ".php"; $reload = !isset(self::$modules[$type][$file]); if (!$reload && !$nominc && !in_array($mfile, self::$temp_include)) { $reload = true; } if ($reload) { $conf = []; if (file_exists($cfile)) { $conf = (include $cfile); } if (!(gettype($status) == "string" && $status == "" || isset($conf["status"]) && $conf["status"] == $status)) { return false; } self::$modules[$type][$file] = []; if (file_exists($lfile)) { self::$modules[$type][$file]["lang"] = (include $lfile); } else { if (file_exists($dlfile)) { self::$modules[$type][$file]["lang"] = (include $dlfile); } } if ($conf) { self::$modules[$type][$file]["config"] = $conf; } if (!in_array($mfile, self::$temp_include) && !$nominc && file_exists($mfile)) { include $mfile; self::$temp_include[] = $mfile; } } } // @ioncube.dynamickey encoding key: a6sdnaiskzj() // Encryption type: 6 public static function Load($type = "", $name = "", $nominc = false, $status = "") { if ($type != "") { if ($name != "All" && $name == "" && ($type == "Mail" || $type == "SMS")) { if ($type == "Mail") { $module = Config::get("modules/mail"); } else { if ($type == "SMS") { $module = Config::get("modules/sms"); } } self::add($module, $type, $nominc, $status); } else { if ($name == "All") { $name = NULL; } if ($name == "") { $path = MODULE_DIR . $type . DS; if (is_dir($path) && ($dh = opendir($path))) { while (($file = readdir($dh)) !== false) { $pf = $path . $file; if ($file != "." && $file != ".." && filetype($pf) == "dir") { self::add($file, $type, $nominc, $status); } } closedir($dh); } } else { $path = MODULE_DIR . $type . DS . $name; if (is_dir($path)) { self::add($name, $type, $nominc, $status); } else { return false; } } } return self::getModules($type, $name); } } // @ioncube.dynamickey encoding key: aw8unzaqg7c() // Encryption type: 3 public static function getModules($type = "", $name = "") { $local_cc = Config::get("general/country"); if (isset(self::$modules[$type])) { arsort(self::$modules[$type]); if ($name) { return isset(self::$modules[$type][$name]) ? self::$modules[$type][$name] : false; } $rank = []; $data = self::$modules[$type]; if ($type == "Payment") { $rank[] = "BankTransfer"; $rank[] = "Balance"; $rank[] = "PayPal"; $rank[] = "CoinPayments"; $rank[] = "TCO"; $rank[] = "Stripe"; $rank[] = "Skrill"; $rank[] = "PerfectMoney"; } else { if ($type == "Registrars") { $rank[] = "NameSilo"; $rank[] = "ResellerClub"; $rank[] = "DomainNameAPI"; $rank[] = "OnlineNIC"; } else { if ($type == "SMS") { $rank[] = "Netgsm"; $rank[] = "MutluCell"; $rank[] = "IletiMerkezi"; $rank[] = "Interaktif"; $rank[] = "OztekSMS"; $rank[] = "SitemioSMS"; $rank[] = "Clickatell"; $rank[] = "SmsApi"; $rank[] = "BulkSMS"; $rank[] = "SitemioTurkey"; } else { if ($type == "Servers") { $rank[] = "cPanel"; $rank[] = "Plesk"; $rank[] = "DirectAdmin"; $rank[] = "CentOSWebPanel"; $rank[] = "CyberPanel"; $rank[] = "VestaCP"; $rank[] = "MaestroPanel"; $rank[] = "SolusVM"; $rank[] = "Virtualizor"; $rank[] = "AutoVM"; $rank[] = "Proxmox"; } else { if ($type == "Product") { $rank[] = "WISECPReseller"; } } } } } if ($rank) { $new_data = []; if ($rank) { foreach ($rank as $item) { if (isset($data[$item])) { $module = $data[$item]; if ($type == "SMS" && $local_cc !== "tr" && !$module["config"]["meta"]["international"]) { if (isset($data[$item])) { unset($data[$item]); } } else { $new_data[$item] = $data[$item]; unset($data[$item]); } } } } if ($data) { foreach ($data as $module_key => $module) { if ($type == "SMS" && $local_cc !== "tr" && (!isset($module["config"]["meta"]["international"]) || !$module["config"]["meta"]["international"])) { if (isset($new_data[$module_key])) { unset($new_data[$module_key]); } } else { $new_data[$module_key] = $module; } } } if ($type == "SMS" && $local_cc == "tr" && isset($new_data["SitemioTurkey"]) && Config::get("modules/sms") != "SitemioTurkey") { unset($new_data["SitemioTurkey"]); } $data = $new_data; } return $data; } } // @ioncube.dynamickey encoding key: a73bnwxovrs() // Encryption type: 2 public static function getPage($type = "", $name = "", $page = "", $data = []) { if (!isset($data["module"])) { $data["module"] = class_exists($name) ? new $name() : false; } $path = CORE_FOLDER . DS . MODULES_FOLDER . DS . $type . DS . $name; return self::$init->view->chose($path . DS . "pages", true)->render($page, $data, true); } // @ioncube.dynamickey encoding key: amcm7iwtfne() // Encryption type: 1 public static function getController($type = "", $name = "", $cname = "") { $module = class_exists($name) ? new $name() : false; $path = CORE_FOLDER . DS . MODULES_FOLDER . DS . $type . DS . $name . DS . "controllers" . DS; $file = $path . $cname . ".php"; if (file_exists($file)) { include $file; } } // @ioncube.dynamickey encoding key: ay5wxow7rfc() // Encryption type: 5 public static function save_log($type = "", $module = "", $action = "", $request = "", $response = "", $processed = "") { if (!Config::get("options/save-module-log")) { return false; } $data = []; Helper::Load("User"); $data["type"] = $type; $data["module"] = $module; $data["action"] = $action; $data["request"] = is_array($request) ? Utility::jencode($request) : $request; $data["response"] = is_array($response) ? Utility::jencode($response) : $response; $data["processed"] = is_array($processed) ? Utility::jencode($processed) : $processed; $data["REQUEST_URI"] = Utility::RequestURI(); $data["_GET"] = Filter::GET() ? Utility::jencode(Filter::GET()) : ""; $data["_POST"] = Filter::POST() ? Utility::jencode(Filter::POST()) : ""; return User::addAction(0, "module-log", $module, $data); } } class ServerModule { protected $server = NULL; public $force_setup = true; public $entity_id_name = "vm_id"; public $area_link = NULL; public $page = false; public $_name = NULL; public $order = []; public $product = []; public $user = []; public $admin = []; public $config = []; public $options = []; public $val_of_conf_opt = NULL; public $val_of_requirements = NULL; public $requirements = NULL; public $addons = NULL; public $id_of_conf_opt = []; public $lang = NULL; public $error = NULL; public $dir = NULL; public $url = NULL; // @ioncube.dynamickey encoding key: ak3kv8dddxm() // Encryption type: 1 public function __construct($server, $options = []) { $n_s = explode("_Module", $this->_name); $this->_name = $n_s[0]; $this->dir = MODULE_DIR . "Servers" . DS . $this->_name . DS; $this->url .= CORE_FOLDER . DS . MODULES_FOLDER . DS . "Servers" . DS . $this->_name . DS; $this->url = Utility::link_determiner($this->url, false, false); $this->server = $server; $config = Modules::Config("Servers", $this->_name); if (isset($options["config"])) { $this->options = $options; $external_config = $options["config"]; } else { $this->options = $options; $external_config = $options; } $this->config = array_merge($config, $external_config); $this->lang = Modules::Lang("Servers", $this->_name); Helper::Load(["User"]); $a_data = UserManager::LoginData("admin"); if ($a_data) { $this->admin = User::getData($a_data["id"], ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->admin = array_merge($this->admin, User::getInfo($this->admin["id"], ["gsm_cc", "gsm_number"])); } if ($server) { $this->define_server_info($server); } } // @ioncube.dynamickey encoding key: abuep3lldkq() // Encryption type: 4 public static function save_log($type = "", $module = "", $action = "", $request = "", $response = "", $processed = "") { return Modules::save_log($type, $module, $action, $request, $response, $processed); } // @ioncube.dynamickey encoding key: atvx3b5kq3v() // Encryption type: 3 public static function sync_terms($ip = "", $hostname = "") { return [["column" => "options", "mark" => "LIKE", "value" => "%\"ip\":\"" . $ip . "\"%", "logical" => "&&"], ["column" => "options", "mark" => "LIKE", "value" => "%\"hostname\":\"" . $hostname . "\"%", "logical" => ""]]; } // @ioncube.dynamickey encoding key: aea93bo1lqn() // Encryption type: 2 public function set_order($order = []) { $this->order = $order; Helper::Load(["Products", "User", "Orders"]); $this->product = Products::get($order["type"], $order["product_id"]); $this->user = User::getData($order["owner_id"], "id,name,surname,company_name,full_name,email,phone,lang,country", "array"); $this->user = array_merge($this->user, User::getInfo($order["owner_id"], ["gsm_cc", "gsm_number"])); $this->user["address"] = AddressManager::getAddress(false, $order["owner_id"]); $configurable_options = []; if ($addons = Orders::addons($this->order["id"])) { $lang = $this->user["lang"]; foreach ($addons as $addon) { if ($gAddon = Products::addon($addon["addon_id"], $lang)) { $addon["attributes"] = $gAddon; $this->addons[$addon["id"]] = $addon; if ($gAddon["options"]) { if ($gAddon["type"] == "quantity" || 0 < $addon["option_quantity"]) { if (0 < $addon["option_quantity"]) { $addon_v = (int) $addon["option_quantity"]; } else { $addon_v = $addon["option_name"]; $addon_v = explode("x", $addon_v); $addon_v = (int) trim($addon_v[0]); } } else { $addon_v = ""; } foreach ($gAddon["options"] as $option) { if ($option["id"] == $addon["option_id"] && isset($option["module"]) && $option["module"] && isset($option["module"][$this->_name])) { $c_options = $option["module"][$this->_name]["configurable"]; foreach ($c_options as $k => $v) { $d_v = $v; if (0 < strlen($addon_v)) { $d_v = $addon_v; } if (!in_array($addon["status"], ["cancelled", "waiting"])) { if (isset($configurable_options[$k]) && 0 < strlen($addon_v)) { $configurable_options[$k] += $d_v; } else { $configurable_options[$k] = $d_v; } } $this->id_of_conf_opt[$addon["id"]][$k] = $d_v; } } } } } } } $this->val_of_conf_opt = $configurable_options; $values_of_requirements = []; if ($requirements = Orders::requirements($this->order["id"])) { $this->requirements = $requirements; foreach ($requirements as $req) { if ($req["module_co_names"]) { $req["module_co_names"] = Utility::jdecode($req["module_co_names"], true); if (isset($req["module_co_names"][$this->_name])) { $c_o_name = $req["module_co_names"][$this->_name]; if (in_array($req["response_type"], ["input", "textarea", "file"])) { $response = $req["response"]; } else { $mkey = $req["response_mkey"]; if ($dc = Utility::jdecode($mkey, true)) { $mkey = $dc; } $response = is_array($mkey) && sizeof($mkey) < 2 ? current($mkey) : $mkey; } $values_of_requirements[$c_o_name] = $response; } } } } $this->val_of_requirements = $values_of_requirements; if (!$this->options) { $this->options = $this->order["options"]; } $this->config = array_merge($this->config, isset($this->options["config"]) ? $this->options["config"] : []); } // @ioncube.dynamickey encoding key: ah70q7atogg() // Encryption type: 6 public function activation_infos($type = "html", $order = [], $lang = "") { $this->lang = Modules::Lang("Servers", $this->_name, $lang); $options = $order["options"]; if (isset($options["login"]["password"])) { $password = $options["login"]["password"]; $password_d = $this->decode_str($password); if ($password_d) { $options["login"]["password"] = $password_d; } } if (isset($options["config"]["password"]) && $options["config"]["password"]) { $options["config"]["password"] = $this->decode_str($options["config"]["password"]); } if (isset($options["ftp_info"]["password"]) && $options["ftp_info"]["password"]) { $options["ftp_info"]["password"] = $this->decode_str($options["ftp_info"]["password"]); } $order["options"] = $options; $data = ["order" => $order, "module" => $this, "options" => $options, "server" => $this->server]; return Modules::getPage("Servers", $this->_name, "activation-" . $type, $data); } // @ioncube.dynamickey encoding key: av93vh8mlyn() // Encryption type: 5 public function edit_order_params() { $options = $this->options; if (!isset($options["creation_info"])) { $options["creation_info"] = []; } if (!isset($options["config"])) { $options["config"] = []; } $creation_info = (int) Filter::POST("creation_info"); $config = (int) Filter::POST("config"); $login = isset($options["login"]) ? $options["login"] : []; if (method_exists($this, "save_adminArea_service_fields")) { $moduleCall = $this->save_adminArea_service_fields(["creation_info" => $creation_info, "config" => $config]); if (!$moduleCall && $this->error) { return false; } if (is_array($moduleCall) && isset($moduleCall["creation_info"])) { $creation_info = $moduleCall["creation_info"]; } if (is_array($moduleCall) && isset($moduleCall["config"])) { $config = $moduleCall["config"]; } if (is_array($moduleCall) && isset($moduleCall["login"])) { $login = $moduleCall["login"]; } if (is_array($moduleCall) && isset($moduleCall["combine_options"])) { $options = array_replace_recursive($options, $moduleCall["combine_options"]); } } $options["config"] = $config; $options["creation_info"] = $creation_info; if ($login) { $options["login"] = $login; } if (!isset($options["config"][$this->entity_id_name]) || !$options["config"][$this->entity_id_name]) { unset($options["config"]); unset($options["established"]); } else { if (!isset($options["established"])) { $options["established"] = true; } } return $options; } // @ioncube.dynamickey encoding key: arfyetqg170() // Encryption type: 3 public function apply_options($old_options, $new_options = []) { $o_creation_info = isset($old_options["creation_info"]) ? $old_options["creation_info"] : []; $o_config = isset($old_options["config"]) ? $old_options["config"] : []; $o_ftp_info = isset($old_options["ftp_info"]) ? $old_options["ftp_info"] : []; $o_options = $old_options; $n_options = $new_options; if (isset($o_options["creation_info"])) { unset($o_options["creation_info"]); } if (isset($o_options["config"])) { unset($o_options["config"]); } if (isset($o_options["ftp_info"])) { unset($o_options["ftp_info"]); } if (isset($n_options["creation_info"])) { unset($n_options["creation_info"]); } if (isset($n_options["config"])) { unset($n_options["config"]); } if (isset($n_options["ftp_info"])) { unset($n_options["ftp_info"]); } $n_creation_info = isset($new_options["creation_info"]) ? $new_options["creation_info"] : []; $n_config = isset($new_options["config"]) ? $new_options["config"] : []; $o_password = isset($o_config["password"]) ? $this->decode_str($o_config["password"]) : ""; $n_password = Filter::password($n_config["password"]); $n_ftp_info = []; if ($o_password) { $o_config["password"] = $o_password; } if (isset($o_ftp_info["password"]) && $o_ftp_info["password"]) { $o_ftp_info["password"] = $this->decode_str($o_ftp_info["password"]); } if ($n_password && $n_password != $o_password && method_exists($this, "change_password")) { if (Utility::strlen($n_password) < 5) { $this->error = __("admin/orders/error8"); return false; } $changed = $this->change_password($n_password); if (!$changed) { return false; } } if (!$n_ftp_info && isset($n_config["user"]) && $n_config["user"]) { $host = $this->server["ip"]; if (Validation::NSCheck($this->server["name"])) { $host = $this->server["name"]; } $n_ftp_info["ip"] = $this->server["ip"]; $n_ftp_info["host"] = $host; $n_ftp_info["port"] = 21; $n_ftp_info["username"] = $n_config["user"]; $n_ftp_info["password"] = $n_config["password"]; } if (method_exists($this, "save_adminArea_service_fields")) { $moduleCall = $this->save_adminArea_service_fields(["old" => ["creation_info" => $o_creation_info, "config" => $o_config, "ftp_info" => $o_ftp_info, "options" => $o_options], "new" => ["creation_info" => $n_creation_info, "config" => $n_config, "ftp_info" => $n_ftp_info, "options" => $n_options]]); if (!$moduleCall && $this->error) { return false; } if (is_array($moduleCall) && isset($moduleCall["creation_info"])) { $n_creation_info = $moduleCall["creation_info"]; } if (is_array($moduleCall) && isset($moduleCall["config"])) { $n_config = $moduleCall["config"]; } if (is_array($moduleCall) && isset($moduleCall["ftp_info"])) { $n_ftp_info = $moduleCall["ftp_info"]; } if (is_array($moduleCall) && isset($moduleCall["options"])) { $n_options = $moduleCall["options"]; } } if (isset($n_config["password"]) && $n_config["password"]) { $n_config["password"] = $this->encode_str($n_config["password"]); } if (isset($n_ftp_info["password"]) && $n_ftp_info["password"]) { $n_ftp_info["password"] = $this->encode_str($n_ftp_info["password"]); } $new_options["config"] = $n_config; $new_options["creation_info"] = $n_creation_info; $new_options["ftp_info"] = $n_ftp_info; $new_options = array_merge($new_options, $n_options); return $new_options; } // @ioncube.dynamickey encoding key: aklbyrv8eho() // Encryption type: 3 public function config_options_output($data = [], $_type = "") { foreach ($data as $f_k => $f_v) { $wrap_width = isset($f_v["wrap_width"]) ? Filter::numbers($f_v["wrap_width"]) : 50; $wrap_class = "yuzde" . $wrap_width; $name = $f_v["name"]; $is_tooltip = isset($f_v["is_tooltip"]) && $f_v["is_tooltip"] ? true : false; $dec_pos = isset($f_v["description_pos"]) ? $f_v["description_pos"] : "R"; $description = isset($f_v["description"]) ? $f_v["description"] : NULL; $type = isset($f_v["type"]) ? $f_v["type"] : "text"; $value = isset($f_v["value"]) ? $f_v["value"] : NULL; $placeholder = isset($f_v["placeholder"]) ? $f_v["placeholder"] : NULL; $width = isset($f_v["width"]) ? $f_v["width"] : NULL; $checked = isset($f_v["checked"]) ? $f_v["checked"] : false; $options = isset($f_v["options"]) ? $f_v["options"] : []; $class = $width ? "yuzde" . $width : ""; if ($options && !is_array($options)) { $n_options = []; foreach (explode(",", $options) as $opt) { $n_options[$opt] = $opt; } $options = $n_options; } if (!in_array($type, ["text", "password", "approval", "radio", "dropdown", "textarea", "output"])) { $type = "text"; } echo " <div class=\""; echo $wrap_class; echo "\" id=\"wrap-el-"; echo $f_k; echo "\">\r\n <div class=\"formcon\">\r\n <div class=\"yuzde30\">\r\n "; echo $name; echo " "; if ($description && $dec_pos == "L" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($description && $dec_pos == "L") { echo " <div class=\"clear\"></div>\r\n <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } } echo " </div>\r\n <div class=\"yuzde70\">\r\n\r\n "; if ($type == "text") { echo " <input\r\n type=\"text\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "password") { echo " <input\r\n type=\"password\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "approval") { echo " <input\r\n "; echo $checked ? "checked" : ""; echo " type=\"checkbox\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\"checkbox-custom\"\r\n value=\""; echo $value ? htmlentities($value) : 1; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n <label class=\"checkbox-custom-label\" for=\"el-item-"; echo $f_k; echo "\"><span class=\"kinfo\">"; echo $dec_pos == "R" && !$is_tooltip ? $description : ""; echo "</span></label>\r\n "; } else { if ($type == "textarea") { echo " <textarea\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n >"; echo $value; echo "</textarea>\r\n "; } else { if ($type == "dropdown") { echo " <script type=\"text/javascript\">\r\n \$(document).ready(function(){\r\n \$(\"#el-item-"; echo $f_k; echo "\").select2({\r\n width:'"; echo $width ? $width : "100"; echo "%',\r\n placeholder:\""; echo ___("needs/select-your"); echo "\",\r\n });\r\n });\r\n </script>\r\n <select\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n class=\"select2"; echo $class ? " " . $class : ""; echo "\"\r\n >\r\n "; if ($options) { foreach ($options as $k => $v) { echo " <option"; echo $value == $k ? " selected" : ""; echo " value=\""; echo $k; echo "\">"; echo $v; echo "</option>\r\n "; } } echo " </select>\r\n "; } else { if ($type == "radio") { if ($options) { if (!$class) { $class = "yuzde30"; } $i = 0; foreach ($options as $k => $v) { $i++; echo " <div style=\"display: inline-block; \" class=\""; echo $class; echo "\">\r\n <input"; echo $value == $k ? " checked" : ""; echo " type=\"radio\" value=\""; echo $k; echo "\" id=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\" class=\"radio-custom\" name=\""; echo $_type; echo "["; echo $f_k; echo "]\" />\r\n <label class=\"radio-custom-label\" for=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\">"; echo $v; echo "</label>\r\n </div>\r\n "; } } } else { echo $value; } } } } } } echo " "; if ($description && $dec_pos == "R" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($type != "approval") { echo "<div class=\"clear\"></div>"; } } echo " "; if ($description && $dec_pos == "R" && $type != "textarea" && $type != "approval") { echo " <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } echo " </div>\r\n </div>\r\n </div>\r\n "; } } // @ioncube.dynamickey encoding key: ambzqrlkj1l() // Encryption type: 2 public function use_method($param = "") { $method_name = ""; $method_prefix_c = "use_clientArea_"; $method_prefix_a = "use_adminArea_"; $param = str_replace("-", "_", $param); if (defined("ADMINISTRATOR") && $param) { $method_name = method_exists($this, $method_prefix_a . $param) ? $method_prefix_a . $param : ""; } else { if ($param) { $method_name = method_exists($this, $method_prefix_c . $param) ? $method_prefix_c . $param : ""; } } if ($method_name) { return $this->{$method_name}(); } } // @ioncube.dynamickey encoding key: arum4roe3q0() // Encryption type: 3 public function UsernameGenerator($domain = "", $half_mixed = false) { $exp = explode(".", $domain); $domain = Filter::transliterate($exp[0]); $username = $domain; $fchar = substr($username, 0, 1); $size = strlen($username); if ($fchar == "0" || (int) $fchar) { $username = Utility::generate_hash(1, false, "l") . substr($username, 1, $size - 1); } if (8 <= $size) { $username = substr($username, 0, 5); $username .= Utility::generate_hash(3, false, "l"); } else { if (4 < $size && $size < 9) { $username = substr($username, 0, 5); $username .= Utility::generate_hash(3, false, "l"); } else { if (1 <= $size && $size < 5) { $how = 8 - $size; $username = substr($username, 0, $size); $username .= Utility::generate_hash($how, false, "l"); } } } return $username; } // @ioncube.dynamickey encoding key: apbhuspeqsv() // Encryption type: 4 protected function encode_str($str = "") { return Crypt::encode($str, Config::get("crypt/user")); } // @ioncube.dynamickey encoding key: a2nhaihkpkd() // Encryption type: 4 protected function decode_str($str = "") { return Crypt::decode($str, Config::get("crypt/user")); } // @ioncube.dynamickey encoding key: afrsdmaw3ok() // Encryption type: 5 public function get_page($page_file = "", $vars = []) { $vars["module"] = $this; return Modules::getPage("Servers", $this->_name, $page_file, $vars); } // @ioncube.dynamickey encoding key: aw0bhxnv5jw() // Encryption type: 5 public function clientArea_buttons_output($external_buttons = []) { $text = ""; $buttons = []; if (!$external_buttons) { if ($this->config["type"] != "hosting" && (!$this->page || $this->page == "home") && method_exists($this, "use_clientArea_SingleSignOn")) { $buttons["SingleSignOn"] = ["type" => "function", "text" => self::$lang->get_cm("website/account_products/login-panel"), "icon" => "fa fa-sign-in", "target_blank" => true, "attributes" => ["id" => "vpspanellogin"]]; } if ($this->config["type"] == "hosting" && (!$this->page || $this->page == "home") && method_exists($this, "use_clientArea_SingleSignOn2")) { $buttons["SingleSignOn2"] = ["type" => "function", "text" => self::$lang->get_cm("website/account_products/login-panel"), "icon" => "fa fa-sign-in", "target_blank" => true, "attributes" => ["id" => "vpsstart"]]; } if ($this->config["type"] == "hosting" && (!$this->page || $this->page == "home") && method_exists($this, "use_clientArea_webMail2")) { $buttons["webMail2"] = ["type" => "function", "text" => self::$lang->get_cm("website/account_products/login-webmail"), "icon" => "fa fa-envelope-o", "target_blank" => true, "attributes" => ["id" => "vpsgeneral"]]; } } if ($external_buttons) { $buttons = array_merge($buttons, $external_buttons); } else { if (method_exists($this, "clientArea_buttons")) { $buttons = array_merge($buttons, $this->clientArea_buttons()); } } if ($buttons) { foreach ($buttons as $b_k => $button) { $type = isset($button["type"]) ? $button["type"] : "transaction"; if (!is_array($button)) { $_text = $button; } else { $_text = isset($button["text"]) ? $button["text"] : "Button"; } $_blank = isset($button["target_blank"]) ? $button["target_blank"] : false; $icon = isset($button["icon"]) ? $button["icon"] : NULL; $link = NULL; $attributes = isset($button["attributes"]) ? $button["attributes"] : []; if ($type == "transaction") { $link = "javascript:void 0;"; } else { if ($type == "page-loader") { $link = "javascript:reload_module_content('" . $b_k . "'); void 0;"; } else { if ($type == "page") { $link = $this->area_link . "?m_page=" . $b_k; } else { if ($this->config["type"] == "hosting" && $type == "function") { $link = $this->area_link . "?inc=use_method&method=" . $b_k; } else { if ($type == "function") { $link = $this->area_link . "?inc=panel_operation_method&method=" . $b_k; } else { if ($type == "link") { $link = isset($button["url"]) ? $button["url"] : $this->area_link; } } } } } } $text .= "<a"; if (!isset($attributes["href"])) { $text .= " href=\"" . $link . "\""; } if (!isset($attributes["onclick"]) && $type == "transaction") { $text .= " onclick=\"run_transaction('" . $b_k . "',this);\""; } if ($_blank) { $text .= " target=\"_blank\""; } if (!isset($attributes["class"])) { $text .= " class=\"hostbtn\""; } if ($attributes) { foreach ($attributes as $k => $v) { $text .= " " . $k . "=\"" . $v . "\""; } } $text .= ">"; if ($icon) { $text .= "<i class=\"" . $icon . "\"></i>"; } $text .= $_text; $text .= ""; $text .= "</a> "; } } return $text; } // @ioncube.dynamickey encoding key: a2noyiacwpl() // Encryption type: 2 public function adminArea_buttons_output($external_buttons = []) { $text = ""; $buttons = []; if (!$external_buttons) { if ($this->config["type"] != "hosting" && method_exists($this, "use_adminArea_root_SingleSignOn")) { $buttons["root_SingleSignOn"] = ["type" => "function", "text" => self::$lang->get_cm("admin/products/login-root-panel"), "color" => "blue", "target_blank" => true]; } if ($this->config["type"] != "hosting" && method_exists($this, "use_adminArea_SingleSignOn")) { $buttons["SingleSignOn"] = ["type" => "function", "icon" => "fa fa-sign-in", "text" => self::$lang->get_cm("website/account_products/login-panel"), "attributes" => ["id" => "vpspanellogin"], "target_blank" => true]; } if ($this->config["type"] == "hosting" && method_exists($this, "use_adminArea_SingleSignOn2")) { $buttons["SingleSignOn2"] = ["type" => "function", "icon" => "fa fa-sign-in", "text" => self::$lang->get_cm("website/account_products/login-panel"), "attributes" => ["id" => "vpspanellogin"], "target_blank" => true]; } } if ($external_buttons) { $buttons = array_merge($buttons, $external_buttons); } else { if (method_exists($this, "adminArea_buttons")) { $buttons = array_merge($buttons, $this->adminArea_buttons()); } } if ($buttons) { foreach ($buttons as $b_k => $button) { $type = isset($button["type"]) ? $button["type"] : "transaction"; if (!is_array($button)) { $_text = $button; } else { $_text = isset($button["text"]) ? $button["text"] : "Button"; } $_blank = isset($button["target_blank"]) ? $button["target_blank"] : false; $icon = isset($button["icon"]) ? $button["icon"] : NULL; $link = NULL; $attributes = isset($button["attributes"]) ? $button["attributes"] : []; if ($type == "transaction") { $link = "javascript:void 0;"; } else { if ($type == "page-loader") { $link = "javascript:open_m_page('" . $b_k . "'); void 0;"; } else { if ($type == "page") { $link = $this->area_link . "?content=automation&m_page=" . $b_k; } else { if ($this->config["type"] == "hosting" && $type == "function") { $link = $this->area_link . "?operation=hosting_use_method&use_method=" . $b_k; } else { if ($type == "function") { $link = $this->area_link . "?operation=operation_server_automation&use_method=" . $b_k; } else { if ($type == "link") { $link = isset($button["url"]) ? $button["url"] : $this->area_link; } } } } } } $text .= "<a"; if (!isset($attributes["href"])) { $text .= " href=\"" . $link . "\""; } if (!isset($attributes["onclick"]) && $type == "transaction") { $text .= " onclick=\"run_transaction('" . $b_k . "',this);\""; } if ($_blank) { $text .= " target=\"_blank\""; } if (!isset($attributes["class"])) { $text .= " class=\"hostbtn\""; } if ($attributes) { foreach ($attributes as $k => $v) { $text .= " " . $k . "=\"" . $v . "\""; } } $text .= ">"; if ($icon) { $text .= "<i class=\"" . $icon . "\"></i> "; } $text .= $_text; $text .= ""; $text .= "</a> "; } } return $text; } // @ioncube.dynamickey encoding key: avrbn0vcqx7() // Encryption type: 4 public function panel_links_for_client() { $buttons = []; if (method_exists($this, "use_clientArea_SingleSignOn")) { $buttons["panel"] = ["url" => $this->area_link . "?inc=use_method&method=SingleSignOn", "color" => "blue", "icon" => "fa fa-sign-in", "name" => __("website/account_products/login-panel")]; } if (method_exists($this, "use_clientArea_webMail")) { $buttons["mail"] = ["url" => $this->area_link . "?inc=use_method&method=webMail", "name" => __("website/account_products/login-webmail")]; } return $buttons; } // @ioncube.dynamickey encoding key: a9clfumqrbl() // Encryption type: 6 public function panel_links_for_admin() { $buttons = []; if (method_exists($this, "use_adminArea_root_SingleSignOn")) { $buttons["root_panel"] = ["url" => $this->area_link . "?operation=hosting_use_method&use_method=root_SingleSignOn", "name" => __("admin/products/login-root-panel")]; } if (method_exists($this, "use_adminArea_SingleSignOn")) { $buttons["panel"] = ["url" => $this->area_link . "?operation=hosting_use_method&use_method=SingleSignOn", "name" => __("website/account_products/login-panel")]; } if (method_exists($this, "use_adminArea_webMail")) { $buttons["mail"] = ["url" => $this->area_link . "?operation=hosting_use_method&use_method=webMail", "name" => __("website/account_products/login-webmail")]; } return $buttons; } // @ioncube.dynamickey encoding key: azpphtucmkx() // Encryption type: 2 protected function udgrade($params = []) { Helper::Load("Events"); $this->config = isset($params["config"]) ? $params["config"] : []; $this->options = $params; $updowngrade_remove = $this->server["updowngrade_remove_server"]; if ($updowngrade_remove == "now") { if ($this->terminate()) { return $this->create($params); } return false; } if (substr($updowngrade_remove, 0, 4) == "then") { Events::add_scheduled_operation(["owner" => "order", "owner_id" => $this->order["id"], "name" => "remove-server-for-updowngrade", "period" => "day", "time" => substr($updowngrade_remove, 5, 4), "module" => "CyberVM", "command" => "terminate", "needs" => ["options" => $this->options]]); } return $this->create($params); } // @ioncube.dynamickey encoding key: aircp13mz7k() // Encryption type: 1 public function save_config($data = []) { return FileManager::file_write($this->dir . "config.php", Utility::array_export($data, ["pwith" => true])); } } class AddonModule { public $error = NULL; public $config = NULL; public $lang = NULL; public $area_link = NULL; public $_name = NULL; public $user = NULL; public $admin = NULL; public $url = NULL; protected $dir = NULL; // @ioncube.dynamickey encoding key: a1zmoqxywvt() // Encryption type: 5 public function __construct() { $this->dir = MODULE_DIR . "Addons" . DS . $this->_name . DS; $this->url .= $this->_name . DS; $this->url = Utility::link_determiner($this->url, false, false); $this->config = Modules::Config("Addons", $this->_name); $this->lang = Modules::Lang("Addons", $this->_name); Helper::Load(["User"]); $a_data = UserManager::LoginData("admin"); $u_data = UserManager::LoginData("member"); $user_id = isset($u_data["id"]) ? $u_data["id"] : (isset($this->user["id"]) ? $this->user["id"] : 0); if ($a_data) { $this->admin = User::getData($a_data["id"], ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->admin = array_merge($this->admin, User::getInfo($this->admin["id"], ["gsm_cc", "gsm_number"])); } if ($user_id) { $this->user = User::getData($user_id, ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->user = array_merge($this->user, User::getInfo($user_id, ["gsm_cc", "gsm_number"])); $this->user["address"] = AddressManager::getAddress(false, $user_id); } } // @ioncube.dynamickey encoding key: a9pu8q0stgo() // Encryption type: 3 protected function view($file = "", $variables = []) { ob_start(); if ($variables) { extract($variables); } if (file_exists($this->dir . "views" . DS . $file)) { include $this->dir . "views" . DS . $file; } return ob_get_clean(); } // @ioncube.dynamickey encoding key: algirdjxshy() // Encryption type: 1 protected function privileges() { return self::$init->db->select()->from("privileges")->order_by("id ASC")->build() ? self::$init->db->fetch_assoc() : []; } // @ioncube.dynamickey encoding key: a6cfgtj21ib() // Encryption type: 6 public function settings() { if ($this->version != $this->config["meta"]["version"] && method_exists($this, "upgrade")) { if ($this->upgrade()) { $set_config = $this->config; $set_config["meta"]["version"] = $this->version; FileManager::file_write($this->dir . "config.php", Utility::array_export($set_config, ["pwith" => true])); } else { echo "<div class=\"red-info\"><div class=\"padding10\">" . self::$lang->get_cm("admin/tools/error17") . ($this->error ? ": " : "") . $this->error . "</div></div>"; return false; } } $view = self::$init->chose("admin")->render("default-addon-settings", ["lang" => $this->lang, "config" => $this->config, "request_uri" => $this->area_link, "fields" => $this->fields(), "privileges" => $this->privileges(), "access_ps" => isset($this->config["access_ps"]) ? $this->config["access_ps"] : [], "module" => $this], true); if ($view) { echo $view; } else { echo "Not found file settings.php"; } } // @ioncube.dynamickey encoding key: avjd7muwrat() // Encryption type: 6 public function save_settings() { $fields = $this->fields(); $set_config = $this->config; $p_fields = Filter::isPOST() ? Filter::POST("fields") : []; $access_ps = Filter::init("POST/access_ps"); if (!is_array($access_ps)) { $access_ps = []; } if (method_exists($this, "save_fields")) { $p_fields = $this->save_fields($p_fields); if (!is_array($p_fields) && $this->error) { echo Utility::jencode(["status" => "error", "message" => $this->error]); return false; } } if ($fields) { foreach ($fields as $f_k => $field) { if (isset($p_fields[$f_k])) { $set_config["settings"][$f_k] = $p_fields[$f_k]; } } } $set_config["access_ps"] = $access_ps; $this->save_config($set_config); echo Utility::jencode(["status" => "successful", "message" => self::$lang->get_cm("admin/tools/success12")]); return true; } // @ioncube.dynamickey encoding key: avuckhpbjfk() // Encryption type: 2 public function fields_output($data = [], $_type = "") { if (!$_type) { $_type = "fields"; } foreach ($data as $f_k => $f_v) { $wrap_width = isset($f_v["wrap_width"]) ? Filter::numbers($f_v["wrap_width"]) : 50; $wrap_class = "yuzde" . $wrap_width; $name = $f_v["name"]; $is_tooltip = isset($f_v["is_tooltip"]) && $f_v["is_tooltip"] ? true : false; $dec_pos = isset($f_v["description_pos"]) ? $f_v["description_pos"] : "R"; $description = isset($f_v["description"]) ? $f_v["description"] : NULL; $type = isset($f_v["type"]) ? $f_v["type"] : "text"; $value = isset($f_v["value"]) ? $f_v["value"] : NULL; $placeholder = isset($f_v["placeholder"]) ? $f_v["placeholder"] : NULL; $width = isset($f_v["width"]) ? $f_v["width"] : NULL; $checked = isset($f_v["checked"]) ? $f_v["checked"] : false; $options = isset($f_v["options"]) ? $f_v["options"] : []; $class = $width ? "yuzde" . $width : ""; if ($options && !is_array($options)) { $n_options = []; foreach (explode(",", $options) as $opt) { $n_options[$opt] = $opt; } $options = $n_options; } if (!in_array($type, ["text", "password", "approval", "radio", "dropdown", "textarea", "output"])) { $type = "text"; } echo " <div class=\""; echo $wrap_class; echo "\" id=\"wrap-el-"; echo $f_k; echo "\">\r\n <div class=\"formcon\">\r\n <div class=\"yuzde30\">\r\n "; echo $name; echo " "; if ($description && $dec_pos == "L" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($description && $dec_pos == "L") { echo " <div class=\"clear\"></div>\r\n <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } } echo " </div>\r\n <div class=\"yuzde70\">\r\n\r\n "; if ($type == "text") { echo " <input\r\n type=\"text\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "password") { echo " <input\r\n type=\"password\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "file") { echo " <input\r\n type=\"file\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "approval") { echo " <input\r\n "; echo $checked ? "checked" : ""; echo " type=\"checkbox\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\"checkbox-custom\"\r\n value=\""; echo $value ? htmlentities($value) : 1; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n <label class=\"checkbox-custom-label\" for=\"el-item-"; echo $f_k; echo "\"><span class=\"kinfo\">"; echo $dec_pos == "R" && !$is_tooltip ? $description : ""; echo "</span></label>\r\n "; } else { if ($type == "textarea") { echo " <textarea\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n >"; echo $value; echo "</textarea>\r\n "; } else { if ($type == "dropdown") { echo " <script type=\"text/javascript\">\r\n \$(document).ready(function(){\r\n \$(\"#el-item-"; echo $f_k; echo "\").select2({\r\n width:'"; echo $width ? $width : "100"; echo "%',\r\n placeholder:\""; echo ___("needs/select-your"); echo "\",\r\n });\r\n });\r\n </script>\r\n <select\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n class=\"select2"; echo $class ? " " . $class : ""; echo "\"\r\n >\r\n "; if ($options) { foreach ($options as $k => $v) { echo " <option"; echo $value == $k ? " selected" : ""; echo " value=\""; echo $k; echo "\">"; echo $v; echo "</option>\r\n "; } } echo " </select>\r\n "; } else { if ($type == "radio") { if ($options) { if (!$class) { $class = "yuzde30"; } $i = 0; foreach ($options as $k => $v) { $i++; echo " <div style=\"display: inline-block; \" class=\""; echo $class; echo "\">\r\n <input"; echo $value == $k ? " checked" : ""; echo " type=\"radio\" value=\""; echo $k; echo "\" id=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\" class=\"radio-custom\" name=\""; echo $_type; echo "["; echo $f_k; echo "]\" />\r\n <label class=\"radio-custom-label\" for=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\">"; echo $v; echo "</label>\r\n </div>\r\n "; } } } else { echo $value; } } } } } } } echo " "; if ($description && $dec_pos == "R" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($type != "approval") { echo "<div class=\"clear\"></div>"; } } echo " "; if ($description && $dec_pos == "R" && $type != "textarea" && $type != "approval") { echo " <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } echo " </div>\r\n </div>\r\n </div>\r\n "; } } // @ioncube.dynamickey encoding key: argm1adhy53() // Encryption type: 6 public function change_addon_status($arg = "") { $status = $arg == "enable"; $apply = true; if ($status && method_exists($this, "activate")) { $apply = $this->activate(); } if (!$status && method_exists($this, "deactivate")) { $apply = $this->deactivate(); } if ($apply) { $config = $this->config; $config["status"] = $status; $this->save_config($config); } return $apply; } // @ioncube.dynamickey encoding key: adkh42ml5iu() // Encryption type: 5 public function save_config($data = []) { return FileManager::file_write($this->dir . "config.php", Utility::array_export($data, ["pwith" => true])); } } class ProductModule { public $_name = NULL; public $page = NULL; public $area_link = false; public $config = []; public $lang = []; public $error = NULL; public $url = NULL; public $dir = NULL; public $order = []; public $options = []; public $user = []; public $admin = []; public $id_of_conf_opt = []; public $val_of_conf_opt = []; public $val_of_requirements = []; public $requirements = []; public $addons = []; public $product = []; // @ioncube.dynamickey encoding key: agsxerbeuiu() // Encryption type: 5 public function __construct() { $this->dir = MODULE_DIR . "Product" . DS . $this->_name . DS; $this->url .= CORE_FOLDER . DS . MODULES_FOLDER . DS . "Product" . DS . $this->_name . DS; $this->url = Utility::link_determiner($this->url, false, false); $this->config = Modules::Config("Product", $this->_name); $this->lang = Modules::Lang("Product", $this->_name); Helper::Load(["User"]); $a_data = UserManager::LoginData("admin"); if ($a_data) { $this->admin = User::getData($a_data["id"], ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->admin = array_merge($this->admin, User::getInfo($this->admin["id"], ["gsm_cc", "gsm_number"])); } } // @ioncube.dynamickey encoding key: asnzg37z5rc() // Encryption type: 6 public static function save_log($type = "", $module = "", $action = "", $request = "", $response = "", $processed = "") { return Modules::save_log($type, $module, $action, $request, $response, $processed); } // @ioncube.dynamickey encoding key: avp5wdp2gow() // Encryption type: 4 public function set_order($order = []) { $this->order = $order; Helper::Load(["Products", "User", "Orders"]); $this->options = $order["options"]; $this->product = Products::get($order["type"], $order["product_id"]); $this->user = User::getData($order["owner_id"], "id,name,surname,full_name,email,phone,lang,country", "array"); $this->user = array_merge($this->user, User::getInfo($order["owner_id"], ["gsm_cc", "gsm_number"])); $this->user["address"] = AddressManager::getAddress(false, $order["owner_id"]); $configurable_options = []; if ($addons = Orders::addons($this->order["id"])) { $lang = $this->user["lang"]; foreach ($addons as $addon) { if ($gAddon = Products::addon($addon["addon_id"], $lang)) { $addon["attributes"] = $gAddon; $this->addons[$addon["id"]] = $addon; if ($gAddon["options"]) { if ($gAddon["type"] == "quantity" || 0 < $addon["option_quantity"]) { if (0 < $addon["option_quantity"]) { $addon_v = (int) $addon["option_quantity"]; } else { $addon_v = $addon["option_name"]; $addon_v = explode("x", $addon_v); $addon_v = (int) trim($addon_v[0]); } } else { $addon_v = ""; } foreach ($gAddon["options"] as $option) { if ($option["id"] == $addon["option_id"] && isset($option["module"]) && $option["module"] && isset($option["module"][$this->_name]) && !in_array($addon["status"], ["cancelled", "waiting"])) { $c_options = $option["module"][$this->_name]["configurable"]; foreach ($c_options as $k => $v) { $d_v = $v; if (0 < strlen($addon_v)) { $d_v = $addon_v; } if (isset($configurable_options[$k]) && 0 < strlen($addon_v)) { $configurable_options[$k] += $d_v; } else { $configurable_options[$k] = $d_v; } $this->id_of_conf_opt[$addon["id"]][$k] = $d_v; } } } } } } } $this->val_of_conf_opt = $configurable_options; $values_of_requirements = []; if ($requirements = Orders::requirements($this->order["id"])) { $this->requirements = $requirements; foreach ($requirements as $req) { if ($req["module_co_names"]) { $req["module_co_names"] = Utility::jdecode($req["module_co_names"], true); if (isset($req["module_co_names"][$this->_name])) { $c_o_name = $req["module_co_names"][$this->_name]; if (in_array($req["response_type"], ["input", "textarea", "file"])) { $response = $req["response"]; } else { $mkey = $req["response_mkey"]; if ($dc = Utility::jdecode($mkey, true)) { $mkey = $dc; } $response = is_array($mkey) && sizeof($mkey) < 2 ? current($mkey) : $mkey; } $values_of_requirements[$c_o_name] = $response; } } } } $this->val_of_requirements = $values_of_requirements; if (!$this->options) { $this->options = $this->order["options"]; } } // @ioncube.dynamickey encoding key: aff488a8bhy() // Encryption type: 2 public function extend($data = []) { return method_exists($this, "renewal") ? $this->renewal($data) : false; } // @ioncube.dynamickey encoding key: anignq0ltez() // Encryption type: 6 public function edit_order_params() { $options = $this->options; if (!isset($options["creation_info"])) { $options["creation_info"] = []; } if (!isset($options["config"])) { $options["config"] = []; } $n_creation_info = (int) Filter::POST("creation_info"); $n_config = (int) Filter::POST("config"); $o_options = $options; if (isset($o_options["config"])) { unset($o_options["config"]); } if (isset($o_options["creation_info"])) { unset($o_options["creation_info"]); } $n_options = $o_options; if (method_exists($this, "save_adminArea_service_fields")) { $moduleCall = $this->save_adminArea_service_fields(["old" => ["creation_info" => $options["creation_info"], "config" => $options["config"], "options" => $o_options], "new" => ["creation_info" => $n_creation_info, "config" => $n_config, "options" => $n_options]]); if (!$moduleCall && $this->error) { return false; } if (is_array($moduleCall) && isset($moduleCall["creation_info"])) { $n_creation_info = $moduleCall["creation_info"]; } if (is_array($moduleCall) && isset($moduleCall["config"])) { $n_config = $moduleCall["config"]; } if (is_array($moduleCall) && isset($moduleCall["options"])) { $n_options = $moduleCall["options"]; } } $options["config"] = $n_config; $options["creation_info"] = $n_creation_info; $options = array_merge($options, $n_options); return $options; } // @ioncube.dynamickey encoding key: acbn78jdzv9() // Encryption type: 2 protected function encode_str($str = "") { return Crypt::encode($str, Config::get("crypt/user")); } // @ioncube.dynamickey encoding key: ae3r6qid5eh() // Encryption type: 3 protected function decode_str($str = "") { return Crypt::decode($str, Config::get("crypt/user")); } // @ioncube.dynamickey encoding key: aga2wwvrwpz() // Encryption type: 2 public function get_page($page_file = "", $vars = []) { $vars["module"] = $this; return Modules::getPage("Product", $this->_name, $page_file, $vars); } // @ioncube.dynamickey encoding key: aufw3ry30yb() // Encryption type: 1 public function use_controller($param = "") { $method_name = ""; $method_prefix_a = "controller_"; $param = str_replace("-", "_", $param); $method_name = method_exists($this, $method_prefix_a . $param) ? $method_prefix_a . $param : ""; if ($method_name) { return $this->{$method_name}(); } } // @ioncube.dynamickey encoding key: aprf05yptu4() // Encryption type: 1 public function use_method($param = "") { $method_name = ""; $method_prefix_c = "use_clientArea_"; $method_prefix_a = "use_adminArea_"; $param = str_replace("-", "_", $param); if (defined("ADMINISTRATOR") && $param) { $method_name = method_exists($this, $method_prefix_a . $param) ? $method_prefix_a . $param : ""; } else { if ($param) { $method_name = method_exists($this, $method_prefix_c . $param) ? $method_prefix_c . $param : ""; } } if ($method_name) { return $this->{$method_name}(); } } // @ioncube.dynamickey encoding key: anxhsbrzwli() // Encryption type: 5 public function save_config($data = [], $auto_status = true) { if ($auto_status && isset($data["settings"]) && $data["settings"]) { $data["status"] = true; } return FileManager::file_write($this->dir . "config.php", Utility::array_export($data, ["pwith" => true])); } // @ioncube.dynamickey encoding key: aspfgwytgoj() // Encryption type: 4 public function config_options_output($data = [], $_type = "") { foreach ($data as $f_k => $f_v) { $wrap_width = isset($f_v["wrap_width"]) ? Filter::numbers($f_v["wrap_width"]) : 50; $wrap_class = "yuzde" . $wrap_width; $name = $f_v["name"]; $is_tooltip = isset($f_v["is_tooltip"]) && $f_v["is_tooltip"] ? true : false; $dec_pos = isset($f_v["description_pos"]) ? $f_v["description_pos"] : "R"; $description = isset($f_v["description"]) ? $f_v["description"] : NULL; $type = isset($f_v["type"]) ? $f_v["type"] : "text"; $value = isset($f_v["value"]) ? $f_v["value"] : NULL; $placeholder = isset($f_v["placeholder"]) ? $f_v["placeholder"] : NULL; $width = isset($f_v["width"]) ? $f_v["width"] : NULL; $checked = isset($f_v["checked"]) ? $f_v["checked"] : false; $options = isset($f_v["options"]) ? $f_v["options"] : []; $class = $width ? "yuzde" . $width : ""; if ($options && !is_array($options)) { $n_options = []; foreach (explode(",", $options) as $opt) { $n_options[$opt] = $opt; } $options = $n_options; } if (!in_array($type, ["text", "password", "approval", "radio", "dropdown", "textarea", "output"])) { $type = "text"; } echo " <div class=\""; echo $wrap_class; echo "\" id=\"wrap-el-"; echo $f_k; echo "\">\r\n <div class=\"formcon\">\r\n <div class=\"yuzde30\">\r\n "; echo $name; echo " "; if ($description && $dec_pos == "L" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($description && $dec_pos == "L") { echo " <div class=\"clear\"></div>\r\n <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } } echo " </div>\r\n <div class=\"yuzde70\">\r\n\r\n "; if ($type == "text") { echo " <input\r\n type=\"text\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "password") { echo " <input\r\n type=\"password\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "approval") { echo " <input\r\n "; echo $checked ? "checked" : ""; echo " type=\"checkbox\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\"checkbox-custom\"\r\n value=\""; echo $value ? htmlentities($value) : 1; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n <label class=\"checkbox-custom-label\" for=\"el-item-"; echo $f_k; echo "\"><span class=\"kinfo\">"; echo $dec_pos == "R" && !$is_tooltip ? $description : ""; echo "</span></label>\r\n "; } else { if ($type == "textarea") { echo " <textarea\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n >"; echo $value; echo "</textarea>\r\n "; } else { if ($type == "dropdown") { echo " <script type=\"text/javascript\">\r\n \$(document).ready(function(){\r\n \$(\"#el-item-"; echo $f_k; echo "\").select2({\r\n width:'"; echo $width ? $width : "100"; echo "%',\r\n placeholder:\""; echo ___("needs/select-your"); echo "\",\r\n });\r\n });\r\n </script>\r\n <select\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n class=\"select2"; echo $class ? " " . $class : ""; echo "\"\r\n >\r\n "; if ($options) { foreach ($options as $k => $v) { echo " <option"; echo $value == $k ? " selected" : ""; echo " value=\""; echo $k; echo "\">"; echo $v; echo "</option>\r\n "; } } echo " </select>\r\n "; } else { if ($type == "radio") { if ($options) { if (!$class) { $class = "yuzde30"; } $i = 0; foreach ($options as $k => $v) { $i++; echo " <div style=\"display: inline-block; \" class=\""; echo $class; echo "\">\r\n <input"; echo $value == $k ? " checked" : ""; echo " type=\"radio\" value=\""; echo $k; echo "\" id=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\" class=\"radio-custom\" name=\""; echo $_type; echo "["; echo $f_k; echo "]\" />\r\n <label class=\"radio-custom-label\" for=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\">"; echo $v; echo "</label>\r\n </div>\r\n "; } } } else { echo $value; } } } } } } echo " "; if ($description && $dec_pos == "R" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($type != "approval") { echo "<div class=\"clear\"></div>"; } } echo " "; if ($description && $dec_pos == "R" && $type != "textarea" && $type != "approval") { echo " <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } echo " </div>\r\n </div>\r\n </div>\r\n "; } } // @ioncube.dynamickey encoding key: a7zeymypbs9() // Encryption type: 3 public function configuration() { return "<div class=\"red-info\"><div class=\"padding10\">" . __("admin/modules/settings-page-not-found") . "</div></div>"; } // @ioncube.dynamickey encoding key: aqrfpwj9jkp() // Encryption type: 5 public function clientArea_buttons_output($external_buttons = []) { $text = ""; $buttons = []; if ($external_buttons) { $buttons = array_merge($buttons, $external_buttons); } else { if (method_exists($this, "clientArea_buttons")) { $buttons = array_merge($buttons, $this->clientArea_buttons()); } } if ($buttons) { foreach ($buttons as $b_k => $button) { $type = isset($button["type"]) ? $button["type"] : "transaction"; if (!is_array($button)) { $_text = $button; } else { $_text = isset($button["text"]) ? $button["text"] : "Button"; } $_blank = isset($button["target_blank"]) ? $button["target_blank"] : false; $icon = isset($button["icon"]) ? $button["icon"] : NULL; $link = NULL; $attributes = isset($button["attributes"]) ? $button["attributes"] : []; if ($type == "transaction") { $link = "javascript:void 0;"; } else { if ($type == "page-loader") { $link = "javascript:reload_module_content('" . $b_k . "'); void 0;"; } else { if ($type == "page") { $link = $this->area_link . "?m_page=" . $b_k; } else { if ($type == "function") { $link = $this->area_link . "?action=use_method&method=" . $b_k; } else { if ($type == "link") { $link = isset($button["url"]) ? $button["url"] : $this->area_link; } } } } } $text .= "<a"; if (!isset($attributes["href"])) { $text .= " href=\"" . $link . "\""; } if (!isset($attributes["onclick"]) && $type == "transaction") { $text .= " onclick=\"run_transaction('" . $b_k . "',this);\""; } if ($_blank) { $text .= " target=\"_blank\""; } if (!isset($attributes["class"])) { $text .= " class=\"hostbtn\""; } if ($attributes) { foreach ($attributes as $k => $v) { $text .= " " . $k . "=\"" . $v . "\""; } } $text .= ">"; if ($icon) { $text .= "<i class=\"" . $icon . "\"></i> "; } $text .= $_text; $text .= ""; $text .= "</a> "; } } return $text; } // @ioncube.dynamickey encoding key: a9gdurdqmd0() // Encryption type: 6 public function adminArea_buttons_output($external_buttons = []) { $text = ""; $buttons = []; if ($external_buttons) { $buttons = array_merge($buttons, $external_buttons); } else { if (method_exists($this, "adminArea_buttons")) { $buttons = array_merge($buttons, $this->adminArea_buttons()); } } if ($buttons) { foreach ($buttons as $b_k => $button) { $type = isset($button["type"]) ? $button["type"] : "transaction"; if (!is_array($button)) { $_text = $button; } else { $_text = isset($button["text"]) ? $button["text"] : "Button"; } $_blank = isset($button["target_blank"]) ? $button["target_blank"] : false; $icon = isset($button["icon"]) ? $button["icon"] : NULL; $link = NULL; $attributes = isset($button["attributes"]) ? $button["attributes"] : []; if ($type == "transaction") { $link = "javascript:void 0;"; } else { if ($type == "function") { $link = $this->area_link . "?operation=operation_special_automation&use_method=" . $b_k; } else { if ($type == "link") { $link = isset($button["url"]) ? $button["url"] : $this->area_link; } } } $text .= "<a"; if (!isset($attributes["href"])) { $text .= " href=\"" . $link . "\""; } if (!isset($attributes["onclick"]) && $type == "transaction") { $text .= " onclick=\"run_transaction('" . $b_k . "',this);\""; } if ($_blank) { $text .= " target=\"_blank\""; } if (!isset($attributes["class"])) { $text .= " class=\"hostbtn\""; } if ($attributes) { foreach ($attributes as $k => $v) { $text .= " " . $k . "=\"" . $v . "\""; } } $text .= ">"; if ($icon) { $text .= "<i class=\"" . $icon . "\"></i> "; } $text .= $_text; $text .= ""; $text .= "</a> "; } } return $text; } } class FraudModule { public $error = NULL; public $config = NULL; public $lang = NULL; public $_name = NULL; public $user = NULL; public $admin = NULL; public $url = NULL; protected $dir = NULL; // @ioncube.dynamickey encoding key: aebuzwlnare() // Encryption type: 4 public function __construct() { $this->_name = substr($this->_name, 6); $this->dir = MODULE_DIR . "Fraud" . DS . $this->_name . DS; $this->url .= $this->_name . DS; $this->url = Utility::link_determiner($this->url, false, false); $this->config = Modules::Config("Fraud", $this->_name); $this->lang = Modules::Lang("Fraud", $this->_name); Helper::Load(["User"]); $a_data = UserManager::LoginData("admin"); $u_data = UserManager::LoginData("member"); $user_id = isset($u_data["id"]) ? $u_data["id"] : (isset($this->user["id"]) ? $this->user["id"] : 0); if ($a_data) { $this->admin = User::getData($a_data["id"], ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->admin = array_merge($this->admin, User::getInfo($this->admin["id"], ["gsm_cc", "gsm_number"])); } if ($user_id) { $this->user = User::getData($user_id, ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->user = array_merge($this->user, User::getInfo($user_id, ["gsm_cc", "gsm_number"])); $this->user["address"] = AddressManager::getAddress(false, $user_id); } } // @ioncube.dynamickey encoding key: ap28ek2thbf() // Encryption type: 6 public function fields_output($data = [], $_type = "") { if (!$_type) { $_type = "fields"; } foreach ($data as $f_k => $f_v) { $wrap_width = isset($f_v["wrap_width"]) ? Filter::numbers($f_v["wrap_width"]) : 50; $wrap_class = "yuzde" . $wrap_width; $name = isset($f_v["name"]) ? $f_v["name"] : ""; $is_tooltip = isset($f_v["is_tooltip"]) && $f_v["is_tooltip"] ? true : false; $dec_pos = isset($f_v["description_pos"]) ? $f_v["description_pos"] : "R"; $description = isset($f_v["description"]) ? $f_v["description"] : NULL; $type = isset($f_v["type"]) ? $f_v["type"] : "text"; $value = isset($f_v["value"]) ? $f_v["value"] : NULL; $placeholder = isset($f_v["placeholder"]) ? $f_v["placeholder"] : NULL; $width = isset($f_v["width"]) ? $f_v["width"] : NULL; $checked = isset($f_v["checked"]) ? $f_v["checked"] : false; $options = isset($f_v["options"]) ? $f_v["options"] : []; $class = $width ? "yuzde" . $width : ""; if ($options && !is_array($options)) { $n_options = []; foreach (explode(",", $options) as $opt) { $n_options[$opt] = $opt; } $options = $n_options; } if (!in_array($type, ["text", "password", "approval", "radio", "dropdown", "textarea", "output", "html"])) { $type = "text"; } if ($type == "html") { echo $value; } else { echo " <div class=\""; echo $wrap_class; echo "\" id=\"wrap-el-"; echo $f_k; echo "\">\r\n <div class=\"formcon\">\r\n <div class=\"yuzde30\">\r\n "; echo $name; echo " "; if ($description && $dec_pos == "L" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($description && $dec_pos == "L") { echo " <div class=\"clear\"></div>\r\n <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } } echo " </div>\r\n <div class=\"yuzde70\">\r\n "; if ($type == "text") { echo " <input\r\n type=\"text\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n style=\"vertical-align: middle;\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "password") { echo " <input\r\n type=\"password\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n style=\"vertical-align: middle;\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n value=\""; echo htmlentities($value); echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "file") { echo " <input\r\n type=\"file\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n style=\"vertical-align: middle;\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n "; } else { if ($type == "approval") { echo " <input\r\n "; echo $checked ? "checked" : ""; echo " type=\"checkbox\"\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\"checkbox-custom\"\r\n value=\""; echo $value ? htmlentities($value) : 1; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n />\r\n <label class=\"checkbox-custom-label\" for=\"el-item-"; echo $f_k; echo "\"><span class=\"kinfo\">"; echo $dec_pos == "R" && !$is_tooltip ? $description : ""; echo "</span></label>\r\n "; } else { if ($type == "textarea") { echo " <textarea\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n class=\""; echo $class; echo "\"\r\n style=\"vertical-align: middle;\"\r\n placeholder=\""; echo $placeholder; echo "\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n >"; echo $value; echo "</textarea>\r\n "; } else { if ($type == "dropdown") { echo " <script type=\"text/javascript\">\r\n \$(document).ready(function(){\r\n \$(\"#el-item-"; echo $f_k; echo "\").select2({\r\n width:'"; echo $width ? $width : "100"; echo "%',\r\n placeholder:\""; echo ___("needs/select-your"); echo "\",\r\n });\r\n });\r\n </script>\r\n <select\r\n name=\""; echo $_type; echo "["; echo $f_k; echo "]\"\r\n id=\"el-item-"; echo $f_k; echo "\"\r\n class=\"select2"; echo $class ? " " . $class : ""; echo "\"\r\n style=\"vertical-align: middle;\"\r\n >\r\n "; if ($options) { foreach ($options as $k => $v) { echo " <option"; echo $value == $k ? " selected" : ""; echo " value=\""; echo $k; echo "\">"; echo $v; echo "</option>\r\n "; } } echo " </select>\r\n "; } else { if ($type == "radio") { if ($options) { if (!$class) { $class = "yuzde30"; } $i = 0; foreach ($options as $k => $v) { $i++; echo " <div style=\"display: inline-block; \" class=\""; echo $class; echo "\">\r\n <input"; echo $value == $k ? " checked" : ""; echo " type=\"radio\" value=\""; echo $k; echo "\" id=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\" class=\"radio-custom\" name=\""; echo $_type; echo "["; echo $f_k; echo "]\" />\r\n <label class=\"radio-custom-label\" for=\"el-item-"; echo $f_k; echo "-"; echo $i; echo "\">"; echo $v; echo "</label>\r\n </div>\r\n "; } } } else { echo $value; } } } } } } } echo " "; if ($description && $dec_pos == "R" && $is_tooltip) { echo " <span class=\"kinfo\" data-tooltip=\""; echo str_replace("\"", "\\\"", $description); echo "\"><i class=\"fa fa-question-circle-o\"></i></span>\r\n "; } else { if ($type != "approval" && !$width) { echo "<div class=\"clear\"></div>"; } } echo " "; if ($description && $dec_pos == "R" && $type != "textarea" && $type != "approval") { echo " <span class=\"kinfo\">"; echo $description; echo "</span>\r\n "; } echo " </div>\r\n </div>\r\n </div>\r\n "; } } } // @ioncube.dynamickey encoding key: aaxsb00leba() // Encryption type: 3 public function save_config($data = []) { return FileManager::file_write($this->dir . "config.php", Utility::array_export($data, ["pwith" => true])); } // @ioncube.dynamickey encoding key: a4yap1bj0sk() // Encryption type: 4 public function insert_record($user_id, $message = "") { return self::$init->db->insert("fraud_detected_records", ["module" => $this->_name, "user_id" => $user_id, "message" => $message, "created_at" => DateManager::Now()]); } // @ioncube.dynamickey encoding key: ajb4vmzxljs() // Encryption type: 5 public function records() { $select = ["*", "(SELECT full_name FROM " . self::$init->pfx . "users WHERE id=t1.user_id) AS user_full_name", "(SELECT company_name FROM " . self::$init->pfx . "users WHERE id=t1.user_id) AS user_company_name"]; $stmt = self::$init->db->select(implode(",", $select))->from("fraud_detected_records AS t1"); $stmt->where("module", "=", $this->_name); $stmt->order_by("created_at DESC"); $stmt->limit(500); return $stmt->build() ? $stmt->fetch_assoc() : []; } } class PaymentGatewayModule { public $name = NULL; public $error = NULL; public $config = NULL; public $lang = NULL; public $_name = NULL; public $user = NULL; public $admin = NULL; public $url = NULL; protected $dir = NULL; // @ioncube.dynamickey encoding key: ar0lctj3rhb() // Encryption type: 2 public function __construct() { $this->_name = $this->name; $this->dir = MODULE_DIR . "Payment" . DS . $this->_name . DS; $this->url .= $this->_name . DS; $this->url = Utility::link_determiner($this->url, false, false); $this->config = Modules::Config("Payment", $this->_name); $this->lang = Modules::Lang("Payment", $this->_name); Helper::Load(["User"]); $a_data = UserManager::LoginData("admin"); $u_data = UserManager::LoginData("member"); $user_id = isset($u_data["id"]) ? $u_data["id"] : (isset($this->user["id"]) ? $this->user["id"] : 0); if ($a_data) { $this->admin = User::getData($a_data["id"], ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->admin = array_merge($this->admin, User::getInfo($this->admin["id"], ["gsm_cc", "gsm_number"])); } if ($user_id) { $this->user = User::getData($user_id, ["id", "name", "surname", "full_name", "email", "phone", "lang", "country"], "array"); $this->user = array_merge($this->user, User::getInfo($user_id, ["gsm_cc", "gsm_number"])); $this->user["address"] = AddressManager::getAddress(false, $user_id); } } // @ioncube.dynamickey encoding key: awztia2zoqp() // Encryption type: 5 protected function get_stored_card($id = 0, $user_id = 0) { $g_stored = self::$init->db->select()->from("users_stored_cards"); if (0 < $user_id) { $g_stored->where("user_id", "=", $user_id, "&&"); } $g_stored->where("id", "=", $id); $g_stored = $g_stored->build() ? $g_stored->getAssoc() : []; if ($g_stored) { $token = $g_stored["token"]; $cvc = $g_stored["cvc"]; if ($token && ($dc = Crypt::decode($token, Config::get("crypt/user") . "**STORED_CARD**"))) { $token = $dc; } if ($cvc && ($dc = Crypt::decode($cvc, Config::get("crypt/user") . "**STORED_CARD**"))) { $cvc = $dc; } if ($is_arr = Utility::jdecode($token, true)) { $token = $is_arr; } $g_stored["token"] = $token; $g_stored["cvc"] = $cvc; } return $g_stored; } // @ioncube.dynamickey encoding key: aotmxorgymk() // Encryption type: 3 public static function find_bank_logo($bank_name = "", $card_brand = "", $card_type = "", $returnComparisons = false) { $comparisons = []; $bank_logo_i = APP_URI . "/resources/assets/images/creditcardlogos/"; if ($card_type == "debit") { $comparisons["kredi"] = $bank_logo_i . "yapikredi.png"; $comparisons["akbank"] = $bank_logo_i . "akbank.png"; $comparisons["İş Bank"] = $bank_logo_i . "isbankasi.png"; $comparisons["Finansbank"] = $bank_logo_i . "finansbank.png"; $comparisons["Halkbank"] = $bank_logo_i . "halkbank.png"; $comparisons["HSBC"] = $bank_logo_i . "HSBC.png"; $comparisons["Ziraat"] = $bank_logo_i . "ziraat-bankasi.png"; $comparisons["Garanti"] = $bank_logo_i . "garanti.png"; } else { $comparisons["kredi"] = $bank_logo_i . "world-yapikredi.png"; $comparisons["akbank"] = $bank_logo_i . "axess-akbank.png"; $comparisons["İş Bank"] = $bank_logo_i . "maximum-isbankasi.png"; $comparisons["Finansbank"] = $bank_logo_i . "cardfinans-finansbank.png"; $comparisons["Halkbank"] = $bank_logo_i . "paraf-halkbank.png"; $comparisons["HSBC"] = $bank_logo_i . "advantage-HSBC.png"; $comparisons["Ziraat"] = $bank_logo_i . "bankkart-ziraat.png"; $comparisons["Garanti"] = $bank_logo_i . "bonus-garanti.png"; } $hook_data = Hook::run("PaymentGatewayBankLogoAdd", $bank_name, $card_brand, $card_type); if ($hook_data && is_array($hook_data)) { foreach ($hook_data as $hook_datum) { if ($hook_datum && is_array($hook_datum)) { $comparisons = array_merge($comparisons, $hook_datum); } } } $result = false; if ($comparisons) { foreach ($comparisons as $k => $v) { if (!$result && stristr($bank_name, $k)) { $result = $v; } } } return $returnComparisons ? $comparisons : $result; } // @ioncube.dynamickey encoding key: ambhmqm9jzd() // Encryption type: 2 public function generate_card_identification_checkout($pmethod = "") { Helper::Load(["Invoices", "Basket"]); $udata = UserManager::LoginData(); if (!$udata) { return false; } $user_data = Invoices::generate_user_data($udata["id"]); if (!isset($user_data["address"])) { $this->error = "no-address"; return false; } $currency = $user_data["currency"]; $amount = 1; $local_c = Config::get("general/currency"); $address_c = isset($user_data["address"]["country_code"]) ? $user_data["address"]["country_code"] : ""; if ($currency != 147 && $address_c == "TR" && $local_c == 147) { $currency = 147; } $data = ["type" => "card-identification", "user_data" => $user_data, "user_id" => $udata["id"], "currency" => $currency, "subtotal" => $amount, "total" => $amount, "pmethod" => $pmethod, "pmethod_commission" => 0, "pmethod_commission_rate" => 0]; $items = [["options" => [], "name" => "CARD IDENTIFICATION", "quantity" => 1, "amount" => 1, "total_amount" => 1]]; $checkout_id = Basket::add_checkout(["user_id" => $udata["id"], "type" => "card-identification", "items" => Utility::jencode($items), "data" => Utility::jencode($data), "cdate" => DateManager::Now(), "mdfdate" => DateManager::Now()]); return $checkout_id; } } ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula