public function __construct() { session_start(); $this->index(); if (method_exists($this, "createFilter") && defined("SMS_FILTER_ON")) { $this->createFilter(); } $i05355412b857f5174e9a2f71b1e936a86ad60cd21238ed0a93a32faf9485892fe4a454435972b1cc = new UserProfile($this->getDb()); if (!($i05355412b857f5174e9a2f71b1e936a86ad60cd21238ed0a93a32faf9485892fe4a454435972b1cc->getUsername() && $i05355412b857f5174e9a2f71b1e936a86ad60cd21238ed0a93a32faf9485892fe4a454435972b1cc->getPassword()) && !strpos($_SERVER["REQUEST_URI"], 'admin.php?page=woosms_profile_page')) { $this->displayError(v_smshistory_usernotactive); header('Location: ' . "admin.php?page=woosms_profile_page"); } $this->startup(); }
protected function index() { $this->load->model('sms/main'); $this->load->model('sms/hooks'); require_once $this->model_sms_hooks->getLanguageDirectory(); if (method_exists($this, "createFilter") && defined("SMS_FILTER_ON")) { $this->createFilter(); } $i1238ed0a93a32faf9485892fe4a454435972b1cc = new UserProfile($this->getDb()); if (!($i1238ed0a93a32faf9485892fe4a454435972b1cc->getUsername() && $i1238ed0a93a32faf9485892fe4a454435972b1cc->getPassword()) && $_GET["route"] != "sms/profile") { $this->displayError(v_smshistory_usernotactive); $this->smsRedirect($this->getLink("sms/profile")); } $this->startup(); $i465a8b7201badbc968016c38c09450ea6ad0d1d5 = "sms/default.tpl"; $this->template = $i465a8b7201badbc968016c38c09450ea6ad0d1d5; $this->children = array('common/header', 'common/footer'); $this->data["html"] = $this->display(); $this->response->setOutput($this->render(TRUE)); }
public function __construct() { $i05355412b857f5174e9a2f71b1e936a86ad60cd2c6e936002fe51b97bc1b95f337c09606ceb011de = $this->Execute("SELECT * FROM " . DB_PREFIX . "shop_url LIMIT 1"); if ($i05355412b857f5174e9a2f71b1e936a86ad60cd2c6e936002fe51b97bc1b95f337c09606ceb011de->num_rows) { foreach ($i05355412b857f5174e9a2f71b1e936a86ad60cd2c6e936002fe51b97bc1b95f337c09606ceb011de->rows as $i05355412b857f5174e9a2f71b1e936a86ad60cd243ef5aef4168652439ef5de195405ced9f0f7952) { $i05355412b857f5174e9a2f71b1e936a86ad60cd25ca425460f7dbd64a82fa844eed01062be6a63d4 = $i05355412b857f5174e9a2f71b1e936a86ad60cd243ef5aef4168652439ef5de195405ced9f0f7952["domain"] . $i05355412b857f5174e9a2f71b1e936a86ad60cd243ef5aef4168652439ef5de195405ced9f0f7952["physical_uri"]; } } define("DELIVERY_URL", "http://" . $i05355412b857f5174e9a2f71b1e936a86ad60cd25ca425460f7dbd64a82fa844eed01062be6a63d4 . "modules/prestasms/delivery.php"); $this->index(); if (method_exists($this, "createFilter") && defined("SMS_FILTER_ON")) { $this->createFilter(); } $i05355412b857f5174e9a2f71b1e936a86ad60cd21238ed0a93a32faf9485892fe4a454435972b1cc = new UserProfile($this->getDb()); if (!($i05355412b857f5174e9a2f71b1e936a86ad60cd21238ed0a93a32faf9485892fe4a454435972b1cc->getUsername() && $i05355412b857f5174e9a2f71b1e936a86ad60cd21238ed0a93a32faf9485892fe4a454435972b1cc->getPassword()) && filter_input(INPUT_GET, "controller") != 'AdminSmsProfile') { $this->displayError(v_smshistory_usernotactive); header('Location: ' . "index.php?controller=AdminSmsProfile&token=" . $this->getAdminToken("AdminSmsProfile")); } $this->startup(); }
protected function index() { $this->load->model('sms/main'); $this->load->model('sms/hooks'); $this->getDefaultLanguageMutation(); require_once $this->model_sms_hooks->getLanguageDirectory(); if (method_exists($this, "createFilter") && defined("SMS_FILTER_ON")) { $this->createFilter(); } $i5071ce49aa74dec77b6a05acd8c726411c9543d8 = new UserProfile($this->getDb()); if (!($i5071ce49aa74dec77b6a05acd8c726411c9543d8->getUsername() && $i5071ce49aa74dec77b6a05acd8c726411c9543d8->getPassword()) && $_GET["route"] != "sms/profile") { $this->displayError(v_smshistory_usernotactive); $this->smsRedirect($this->getLink("sms/profile")); } $this->startup(); $ib1199182837e705aae8d93f525c88b1184f9395d['header'] = $this->load->controller('common/header'); $ib1199182837e705aae8d93f525c88b1184f9395d['column_left'] = $this->load->controller('common/column_left'); $ib1199182837e705aae8d93f525c88b1184f9395d['footer'] = $this->load->controller('common/footer'); $ib1199182837e705aae8d93f525c88b1184f9395d["html"] = $this->display(); $this->response->setOutput($this->load->view('sms/default.tpl', $ib1199182837e705aae8d93f525c88b1184f9395d)); }
public function postProcess($icddcd508600972f2dab78cd14f7612aa4dc19a18 = NULL, $i6b496fee24729ce6f7683ba88d5a87d6130049b5 = NULL, $ifab26c5df1e4ac29b64e0a4796b1f9165fe614a8 = NULL) { $demo = false; if (($demo || defined("SMS_DEMO")) && $icddcd508600972f2dab78cd14f7612aa4dc19a18 != NULL) { $this->_errors[] = "Disabled in demo."; return self::POST_OK; } if ($ifab26c5df1e4ac29b64e0a4796b1f9165fe614a8 == NULL) { return self::POST_ERROR; } if (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitAddAdmin"])) { $i6b378f203f89073d2d6f4239eef67bf1db322d03 = $this->escapePostVariables("adminnew"); $i43e73008096636491c57855e1543fbbc5d9c5013 = $this->escapePostVariables("numbernew"); if (!strlen($i6b378f203f89073d2d6f4239eef67bf1db322d03)) { $this->_errors[] = v_adminsmsprofile_invalidname; return self::POST_ERROR; } elseif (!PhoneNumber::isPhoneNumber($i43e73008096636491c57855e1543fbbc5d9c5013) || $i43e73008096636491c57855e1543fbbc5d9c5013 == null) { $this->_errors[] = v_adminsmsprofile_invalidnumber; return self::POST_ERROR; } else { $this->Execute("INSERT INTO " . DB_PREFIX . "sp_admins VALUES (null,'" . $this->escape($i6b378f203f89073d2d6f4239eef67bf1db322d03) . "','" . $this->escape($i43e73008096636491c57855e1543fbbc5d9c5013) . "')"); $this->displayConfirmation(v_adminsmsprofile_admincreated); return self::POST_OK; } } elseif (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitAddSmsAccount"])) { $ic9eb57c0cb4cf9ea36739fa49adc53923c76243d = $this->escapePostVariables("agree"); $i10c2cab33828d32845523672265b4101741e17a0 = $this->escapePostVariables("email"); $i340192567d0c13293e7b72e4d7926ab4475be729 = $this->escapePostVariables("companyname"); $i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac = $this->escapePostVariables("addressstreet"); $ia434af08201717f3f656c2e722fa792fe7e63b9f = $this->escapePostVariables("addresscity"); $i9b4a10858d8a76b1778120e31b66f6e699f65aea = $this->escapePostVariables("addresszip"); $iab6a314decb74f5c532ecb082cfeb1655b9e98bb = $this->escapePostVariables("country0"); $ia8ffb918a6696fe37f0bbabaf1e1a952607e959d = $this->escapePostVariables("companyid"); $i3b1c6281aaacad7a20754ff1ce66c0005b0140ca = $this->escapePostVariables("companyvat"); $i82e7a3b1bd589a54f63d67ca1a06a3d62552719f = $this->escapePostVariables("refererid"); $i141fd6cf8d25a2156fcef65b7d29affd9b26822b = $this->escapePostVariables("kosoba"); $i7e23db037952160bf723279bac0aa2285a3ceb6c = $this->escapePostVariables("kprijmeni"); $i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac = html_entity_decode($i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac, ENT_QUOTES, 'UTF-8'); $i340192567d0c13293e7b72e4d7926ab4475be729 = html_entity_decode($i340192567d0c13293e7b72e4d7926ab4475be729, ENT_QUOTES, 'UTF-8'); $ia434af08201717f3f656c2e722fa792fe7e63b9f = html_entity_decode($ia434af08201717f3f656c2e722fa792fe7e63b9f, ENT_QUOTES, 'UTF-8'); $i141fd6cf8d25a2156fcef65b7d29affd9b26822b = html_entity_decode($i141fd6cf8d25a2156fcef65b7d29affd9b26822b, ENT_QUOTES, 'UTF-8'); $i7e23db037952160bf723279bac0aa2285a3ceb6c = html_entity_decode($i7e23db037952160bf723279bac0aa2285a3ceb6c, ENT_QUOTES, 'UTF-8'); if (defined("v_refererID")) { $i82e7a3b1bd589a54f63d67ca1a06a3d62552719f = v_refererID; } if ($icddcd508600972f2dab78cd14f7612aa4dc19a18["type_acc"] == "Person") { $i340192567d0c13293e7b72e4d7926ab4475be729 = ""; $ia8ffb918a6696fe37f0bbabaf1e1a952607e959d = ""; $i3b1c6281aaacad7a20754ff1ce66c0005b0140ca = ""; } if ($icddcd508600972f2dab78cd14f7612aa4dc19a18["type_acc"] == "Bussiness" && strlen($i340192567d0c13293e7b72e4d7926ab4475be729) < 3) { $this->_errors[] = v_registration_company_name; return self::POST_ERROR; } if ($ic9eb57c0cb4cf9ea36739fa49adc53923c76243d != 1) { $this->_errors[] = v_adminsmsprofile_agreetext; return self::POST_ERROR; } if (!self::isEmail($i10c2cab33828d32845523672265b4101741e17a0) || !trim($i10c2cab33828d32845523672265b4101741e17a0)) { $this->_errors[] = v_adminsmsprofile_invalidemail2; return self::POST_ERROR; } else { $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a = new SmsModel($this->getDb()); $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->registerSmsAccount($i10c2cab33828d32845523672265b4101741e17a0, $i340192567d0c13293e7b72e4d7926ab4475be729, $i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac, $ia434af08201717f3f656c2e722fa792fe7e63b9f, $i9b4a10858d8a76b1778120e31b66f6e699f65aea, $iab6a314decb74f5c532ecb082cfeb1655b9e98bb, $ia8ffb918a6696fe37f0bbabaf1e1a952607e959d, $i3b1c6281aaacad7a20754ff1ce66c0005b0140ca, $i82e7a3b1bd589a54f63d67ca1a06a3d62552719f, $i141fd6cf8d25a2156fcef65b7d29affd9b26822b, $i7e23db037952160bf723279bac0aa2285a3ceb6c); $i15f0440429ef770fbaf8bd58ae6bab5bcc2e123c = new UserProfile($this->getDb()); $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->editOtherSettings(urlencode(DELIVERY_URL), 0, "", "1", 0, 0, 0, $i15f0440429ef770fbaf8bd58ae6bab5bcc2e123c->getUsername(), $i15f0440429ef770fbaf8bd58ae6bab5bcc2e123c->getPassword()); if ($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->isError()) { $this->_errors = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getConfirm()); return self::POST_OK; } } } elseif (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitLogin"])) { $i05cffcc28d5370a291200c83ba5e24a107e83193 = $this->escapePostVariables("username"); $ie949fe683eb9735ceada53820bfe2c9007ae8bd6 = $this->escapePostVariables("password"); if (!strlen($i05cffcc28d5370a291200c83ba5e24a107e83193) > 0 || !strlen($ie949fe683eb9735ceada53820bfe2c9007ae8bd6) > 0) { $this->_errors[] = v_adminsmsprofile_filluser; return self::POST_ERROR; } else { $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a = new SmsModel($this->getDb()); $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->loginAccount($i05cffcc28d5370a291200c83ba5e24a107e83193, $ie949fe683eb9735ceada53820bfe2c9007ae8bd6); $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->editOtherSettings(urlencode(DELIVERY_URL), 0, "", "1", 0, 0, 0, $i05cffcc28d5370a291200c83ba5e24a107e83193, $ie949fe683eb9735ceada53820bfe2c9007ae8bd6); if ($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->isError()) { $this->_errors = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getConfirm()); return self::POST_OK; } } } elseif (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitEditAdmin_x"]) || isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitEditAdmin"])) { $this->edit_id = $this->escapePostVariables("ID"); $this->edit_admins = true; } elseif (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitAdminSettings1"])) { $this->deleteDb = $this->escapePostVariables("deletedb"); $this->simulate = $this->escapePostVariables("simulate"); $this->deliveryemail = $this->escapePostVariables("deliveryemail"); $this->pocetkredit = $this->escapePostVariables("pocetkredit"); $this->URLreports = $this->escapePostVariables("URLreports"); $this->pref_billing = $this->escapePostVariables("pref_billing"); if (strlen($this->deliveryemail) > 0 && !self::isEmail($this->deliveryemail)) { $this->_errors[] = v_adminsmsprofile_invalidemail; return self::POST_ERROR; } $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a = new SmsModel($this->getDb()); if ($this->URLreports == 1) { $i5ca425460f7dbd64a82fa844eed01062be6a63d4 = urlencode(DELIVERY_URL); } else { $i5ca425460f7dbd64a82fa844eed01062be6a63d4 = ""; } $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->editOtherSettings($i5ca425460f7dbd64a82fa844eed01062be6a63d4, $this->pocetkredit, $this->deliveryemail, $this->URLreports, $this->deleteDb, $this->simulate, $this->pref_billing); if ($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->isError()) { $this->_errors = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getConfirm()); return self::POST_OK; } } elseif (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitEditAdmin2"])) { $i87395dcafb6eb7221410dbcd87e9e8ce0007214a = $this->escapePostVariables("edit"); $i6b378f203f89073d2d6f4239eef67bf1db322d03 = $this->escapePostVariables("adminnew"); $i6b378f203f89073d2d6f4239eef67bf1db322d03 = html_entity_decode($i6b378f203f89073d2d6f4239eef67bf1db322d03, ENT_QUOTES, 'UTF-8'); $i43e73008096636491c57855e1543fbbc5d9c5013 = $this->escapePostVariables("numbernew"); if (!$i6b378f203f89073d2d6f4239eef67bf1db322d03) { $this->_errors[] = v_adminsmsprofile_invalidname; $this->edit_admins = true; $this->edit_id = $i87395dcafb6eb7221410dbcd87e9e8ce0007214a; return self::POST_ERROR; } elseif (!PhoneNumber::isPhoneNumber($i43e73008096636491c57855e1543fbbc5d9c5013) || !$i43e73008096636491c57855e1543fbbc5d9c5013) { $this->_errors[] = v_adminsmsprofile_invalidnumber; $this->edit_admins = true; $this->edit_id = $i87395dcafb6eb7221410dbcd87e9e8ce0007214a; return self::POST_ERROR; } else { $this->Execute("UPDATE " . DB_PREFIX . "sp_admins SET name='" . $this->escape($i6b378f203f89073d2d6f4239eef67bf1db322d03) . "', number='" . $this->escape($i43e73008096636491c57855e1543fbbc5d9c5013) . "' WHERE ID=" . $this->escape($i87395dcafb6eb7221410dbcd87e9e8ce0007214a)); $this->displayConfirmation(v_adminsmsprofile_adminchanged); $this->edit_admins = false; $this->edit_id = 0; return self::POST_OK; } } elseif (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitDeleteAdmin_x"]) || isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["submitDeleteAdmin"])) { $i87395dcafb6eb7221410dbcd87e9e8ce0007214a = $this->escapePostVariables("ID"); $this->Execute("DELETE FROM " . DB_PREFIX . "sp_admins WHERE ID='" . $this->escape($i87395dcafb6eb7221410dbcd87e9e8ce0007214a) . "'"); $this->Execute("DELETE FROM " . DB_PREFIX . "sp_hooks_admins_multi WHERE adminIDs LIKE '" . $this->escape($i87395dcafb6eb7221410dbcd87e9e8ce0007214a) . "'"); $ic6e936002fe51b97bc1b95f337c09606ceb011de = $this->Execute("SELECT * FROM " . DB_PREFIX . "sp_hooks_admins_multi WHERE adminIDs like '" . $this->escape($i87395dcafb6eb7221410dbcd87e9e8ce0007214a) . ";%' OR adminIDs LIKE '%;" . $this->escape($i87395dcafb6eb7221410dbcd87e9e8ce0007214a) . ";%' OR adminIDs LIKE '%;" . $this->escape($i87395dcafb6eb7221410dbcd87e9e8ce0007214a) . "'"); if ($ic6e936002fe51b97bc1b95f337c09606ceb011de->num_rows) { foreach ($ic6e936002fe51b97bc1b95f337c09606ceb011de->rows as $i43ef5aef4168652439ef5de195405ced9f0f7952) { $ie7ba91fafe7c53be0878165bdb30c214e66b70bf = explode(";", $i43ef5aef4168652439ef5de195405ced9f0f7952['adminIDs']); array_splice($ie7ba91fafe7c53be0878165bdb30c214e66b70bf, array_search($i87395dcafb6eb7221410dbcd87e9e8ce0007214a, $ie7ba91fafe7c53be0878165bdb30c214e66b70bf), 1); $this->Execute("UPDATE " . DB_PREFIX . "sp_hooks_admins_multi SET adminIDs='" . implode(";", $ie7ba91fafe7c53be0878165bdb30c214e66b70bf) . "' WHERE name='" . $this->escape($i43ef5aef4168652439ef5de195405ced9f0f7952['name']) . "' AND status='" . $this->escape($i43ef5aef4168652439ef5de195405ced9f0f7952['status']) . "'"); } } $this->displayConfirmation(v_adminsmsprofile_admindeleted); return self::POST_OK; } elseif (isset($icddcd508600972f2dab78cd14f7612aa4dc19a18["EditSmsAccount"])) { $i10c2cab33828d32845523672265b4101741e17a0 = $this->escapePostVariables("email"); $i340192567d0c13293e7b72e4d7926ab4475be729 = $this->escapePostVariables("companyname"); $i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac = $this->escapePostVariables("addressstreet"); $ia434af08201717f3f656c2e722fa792fe7e63b9f = $this->escapePostVariables("addresscity"); $i9b4a10858d8a76b1778120e31b66f6e699f65aea = $this->escapePostVariables("addresszip"); $iab6a314decb74f5c532ecb082cfeb1655b9e98bb = $this->escapePostVariables("country0"); $ia8ffb918a6696fe37f0bbabaf1e1a952607e959d = $this->escapePostVariables("companyid"); $i3b1c6281aaacad7a20754ff1ce66c0005b0140ca = $this->escapePostVariables("companyvat"); $i141fd6cf8d25a2156fcef65b7d29affd9b26822b = $this->escapePostVariables("kosoba"); $i7e23db037952160bf723279bac0aa2285a3ceb6c = $this->escapePostVariables("kprijmeni"); $i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac = html_entity_decode($i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac, ENT_QUOTES, 'UTF-8'); $i340192567d0c13293e7b72e4d7926ab4475be729 = html_entity_decode($i340192567d0c13293e7b72e4d7926ab4475be729, ENT_QUOTES, 'UTF-8'); $ia434af08201717f3f656c2e722fa792fe7e63b9f = html_entity_decode($ia434af08201717f3f656c2e722fa792fe7e63b9f, ENT_QUOTES, 'UTF-8'); $i141fd6cf8d25a2156fcef65b7d29affd9b26822b = html_entity_decode($i141fd6cf8d25a2156fcef65b7d29affd9b26822b, ENT_QUOTES, 'UTF-8'); $i7e23db037952160bf723279bac0aa2285a3ceb6c = html_entity_decode($i7e23db037952160bf723279bac0aa2285a3ceb6c, ENT_QUOTES, 'UTF-8'); if ($icddcd508600972f2dab78cd14f7612aa4dc19a18["type_acc"] == "Person") { $i340192567d0c13293e7b72e4d7926ab4475be729 = ""; $ia8ffb918a6696fe37f0bbabaf1e1a952607e959d = ""; $i3b1c6281aaacad7a20754ff1ce66c0005b0140ca = ""; } if ($icddcd508600972f2dab78cd14f7612aa4dc19a18["type_acc"] == "Bussiness" && strlen($i340192567d0c13293e7b72e4d7926ab4475be729) < 3) { $this->_errors[] = v_registration_company_name; return self::POST_ERROR; } if (!self::isEmail($i10c2cab33828d32845523672265b4101741e17a0)) { $this->_errors[] = v_adminsmsprofile_invalidemail2; return self::POST_ERROR; } else { $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a = new SmsModel($this->getDb()); $i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->editAccount($i10c2cab33828d32845523672265b4101741e17a0, $i340192567d0c13293e7b72e4d7926ab4475be729, $i3ec11992ba35cc28370d20bb83e1e2b71f7a8dac, $ia434af08201717f3f656c2e722fa792fe7e63b9f, $i9b4a10858d8a76b1778120e31b66f6e699f65aea, $iab6a314decb74f5c532ecb082cfeb1655b9e98bb, $ia8ffb918a6696fe37f0bbabaf1e1a952607e959d, $i3b1c6281aaacad7a20754ff1ce66c0005b0140ca, $i141fd6cf8d25a2156fcef65b7d29affd9b26822b, $i7e23db037952160bf723279bac0aa2285a3ceb6c); if ($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->isError()) { $this->_errors = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i4367816f1ae76ddc44b3953c9ce6460e181a0a3a->getConfirm()); return self::POST_OK; } } } return self::POST_ERROR; }
public function postProcess($if7ac7ffb0e11bffa95681698138e923b4fd51990 = NULL, $i120dfeb2f4db76e8e52ed01ad8e678e2b9fa3bb9 = NULL, $i4df8c509b6936a0640c1594ca9b38a0a55a9562f = NULL) { $demo = false; if (($demo || defined("SMS_DEMO")) && $if7ac7ffb0e11bffa95681698138e923b4fd51990 != NULL) { $this->_errors[] = "Disabled in demo."; return self::POST_OK; } if ($i4df8c509b6936a0640c1594ca9b38a0a55a9562f == NULL) { return self::POST_ERROR; } if (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitAddAdmin"])) { $i32f990de0fa2e05c03d31bf5021f8ede63166d03 = $this->escapePostVariables("adminnew"); $i6de5513d7bf66573dedf3f2f853ce5457a8f957f = $this->escapePostVariables("numbernew"); if (!strlen($i32f990de0fa2e05c03d31bf5021f8ede63166d03)) { $this->_errors[] = v_adminsmsprofile_invalidname; return self::POST_ERROR; } elseif (!PhoneNumber::isPhoneNumber($i6de5513d7bf66573dedf3f2f853ce5457a8f957f) || $i6de5513d7bf66573dedf3f2f853ce5457a8f957f == null) { $this->_errors[] = v_adminsmsprofile_invalidnumber; return self::POST_ERROR; } else { $this->Execute("INSERT INTO " . DB_PREFIX . "sp_admins VALUES (null,'" . $this->escape($i32f990de0fa2e05c03d31bf5021f8ede63166d03) . "','" . $this->escape($i6de5513d7bf66573dedf3f2f853ce5457a8f957f) . "')"); $this->displayConfirmation(v_adminsmsprofile_admincreated); return self::POST_OK; } } elseif (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitAddSmsAccount"])) { $i48c34094f4edd0277b41e94dc4f0f33be5a00577 = $this->escapePostVariables("agree"); $i139fa9617e9d70e3d55f87d6ad4113c40da3102d = $this->escapePostVariables("email"); $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc = $this->escapePostVariables("companyname"); $i94a47481735fcb1d4d39399453984453fa0ec578 = $this->escapePostVariables("addressstreet"); $i2950dcb306aa6a84739ae117f72d37fbfc177af7 = $this->escapePostVariables("addresscity"); $if807cf403609c75a25d2c8b19d9a8e1b0f3146e4 = $this->escapePostVariables("addresszip"); $i5a4616ba4ac4a7f21e69ba2afe5e994ae9927078 = $this->escapePostVariables("country0"); $ibcec5f7d7295ee797901b9c5fe2758f8a074ba4b = $this->escapePostVariables("companyid"); $i067d9e62ac114d017597fbfc5a16bdfd07fb847b = $this->escapePostVariables("companyvat"); $i909875e864574ac324b2cc5a0493b8e53c5f2ed4 = $this->escapePostVariables("refererid"); $icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7 = $this->escapePostVariables("kosoba"); $i228783d167ecdf2325f0dabfe191e58f5099bde8 = $this->escapePostVariables("kprijmeni"); $i94a47481735fcb1d4d39399453984453fa0ec578 = html_entity_decode($i94a47481735fcb1d4d39399453984453fa0ec578, ENT_QUOTES, 'UTF-8'); $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc = html_entity_decode($ie9599f6e53cc27b46699f94805a73f5eccf9f0dc, ENT_QUOTES, 'UTF-8'); $i2950dcb306aa6a84739ae117f72d37fbfc177af7 = html_entity_decode($i2950dcb306aa6a84739ae117f72d37fbfc177af7, ENT_QUOTES, 'UTF-8'); $icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7 = html_entity_decode($icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7, ENT_QUOTES, 'UTF-8'); $i228783d167ecdf2325f0dabfe191e58f5099bde8 = html_entity_decode($i228783d167ecdf2325f0dabfe191e58f5099bde8, ENT_QUOTES, 'UTF-8'); if (defined("v_refererID")) { $i909875e864574ac324b2cc5a0493b8e53c5f2ed4 = v_refererID; } if ($if7ac7ffb0e11bffa95681698138e923b4fd51990["type_acc"] == "Person") { $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc = ""; $ibcec5f7d7295ee797901b9c5fe2758f8a074ba4b = ""; $i067d9e62ac114d017597fbfc5a16bdfd07fb847b = ""; } if ($if7ac7ffb0e11bffa95681698138e923b4fd51990["type_acc"] == "Bussiness" && strlen($ie9599f6e53cc27b46699f94805a73f5eccf9f0dc) < 3) { $this->_errors[] = v_registration_company_name; return self::POST_ERROR; } if ($i48c34094f4edd0277b41e94dc4f0f33be5a00577 != 1) { $this->_errors[] = v_adminsmsprofile_agreetext; return self::POST_ERROR; } if (!self::isEmail($i139fa9617e9d70e3d55f87d6ad4113c40da3102d) || !trim($i139fa9617e9d70e3d55f87d6ad4113c40da3102d)) { $this->_errors[] = v_adminsmsprofile_invalidemail2; return self::POST_ERROR; } else { $i9ec854a302fbdb72d043506b55d5bf395184517b = new SmsModel($this->getDb()); $i9ec854a302fbdb72d043506b55d5bf395184517b->registerSmsAccount($i139fa9617e9d70e3d55f87d6ad4113c40da3102d, $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc, $i94a47481735fcb1d4d39399453984453fa0ec578, $i2950dcb306aa6a84739ae117f72d37fbfc177af7, $if807cf403609c75a25d2c8b19d9a8e1b0f3146e4, $i5a4616ba4ac4a7f21e69ba2afe5e994ae9927078, $ibcec5f7d7295ee797901b9c5fe2758f8a074ba4b, $i067d9e62ac114d017597fbfc5a16bdfd07fb847b, $i909875e864574ac324b2cc5a0493b8e53c5f2ed4, $icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7, $i228783d167ecdf2325f0dabfe191e58f5099bde8); $i8095598e75aa0d17622b51f9b7beb10357fca949 = new UserProfile($this->getDb()); $i9ec854a302fbdb72d043506b55d5bf395184517b->editOtherSettings(urlencode(DELIVERY_URL), 0, "", "1", 0, 0, 0, $i8095598e75aa0d17622b51f9b7beb10357fca949->getUsername(), $i8095598e75aa0d17622b51f9b7beb10357fca949->getPassword()); if ($i9ec854a302fbdb72d043506b55d5bf395184517b->isError()) { $this->_errors = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getConfirm()); return self::POST_OK; } } } elseif (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitLogin"])) { $i98414cde3d36661d1db1db7d00d0775fb8bc70f4 = $this->escapePostVariables("username"); $i3ff2121cdd24d8a29bd493b1737bdc8f0536f2ee = $this->escapePostVariables("password"); if (!strlen($i98414cde3d36661d1db1db7d00d0775fb8bc70f4) > 0 || !strlen($i3ff2121cdd24d8a29bd493b1737bdc8f0536f2ee) > 0) { $this->_errors[] = v_adminsmsprofile_filluser; return self::POST_ERROR; } else { $i9ec854a302fbdb72d043506b55d5bf395184517b = new SmsModel($this->getDb()); $i9ec854a302fbdb72d043506b55d5bf395184517b->loginAccount($i98414cde3d36661d1db1db7d00d0775fb8bc70f4, $i3ff2121cdd24d8a29bd493b1737bdc8f0536f2ee); $i9ec854a302fbdb72d043506b55d5bf395184517b->editOtherSettings(urlencode(DELIVERY_URL), 0, "", "1", 0, 0, 0, $i98414cde3d36661d1db1db7d00d0775fb8bc70f4, $i3ff2121cdd24d8a29bd493b1737bdc8f0536f2ee); if ($i9ec854a302fbdb72d043506b55d5bf395184517b->isError()) { $this->_errors = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getConfirm()); return self::POST_OK; } } } elseif (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitEditAdmin_x"]) || isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitEditAdmin"])) { $this->edit_id = $this->escapePostVariables("ID"); $this->edit_admins = true; } elseif (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitAdminSettings1"])) { $this->deleteDb = $this->escapePostVariables("deletedb"); $this->simulate = $this->escapePostVariables("simulate"); $this->deliveryemail = $this->escapePostVariables("deliveryemail"); $this->pocetkredit = $this->escapePostVariables("pocetkredit"); $this->URLreports = $this->escapePostVariables("URLreports"); $this->pref_billing = $this->escapePostVariables("pref_billing"); if (strlen($this->deliveryemail) > 0 && !self::isEmail($this->deliveryemail)) { $this->_errors[] = v_adminsmsprofile_invalidemail; return self::POST_ERROR; } $i9ec854a302fbdb72d043506b55d5bf395184517b = new SmsModel($this->getDb()); if ($this->URLreports == 1) { $icae1003a7b78317ecd106d559490d2ed7842f01917d5d79435864186bbd31ed71a5dfa74d68c67d = urlencode(DELIVERY_URL); } else { $icae1003a7b78317ecd106d559490d2ed7842f01917d5d79435864186bbd31ed71a5dfa74d68c67d = ""; } $i9ec854a302fbdb72d043506b55d5bf395184517b->editOtherSettings($icae1003a7b78317ecd106d559490d2ed7842f01917d5d79435864186bbd31ed71a5dfa74d68c67d, $this->pocetkredit, $this->deliveryemail, $this->URLreports, $this->deleteDb, $this->simulate, $this->pref_billing); if ($i9ec854a302fbdb72d043506b55d5bf395184517b->isError()) { $this->_errors = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getConfirm()); return self::POST_OK; } } elseif (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitEditAdmin2"])) { $icae1003a7b78317ecd106d559490d2ed7842f019 = $this->escapePostVariables("edit"); $i32f990de0fa2e05c03d31bf5021f8ede63166d03 = $this->escapePostVariables("adminnew"); $i32f990de0fa2e05c03d31bf5021f8ede63166d03 = html_entity_decode($i32f990de0fa2e05c03d31bf5021f8ede63166d03, ENT_QUOTES, 'UTF-8'); $i6de5513d7bf66573dedf3f2f853ce5457a8f957f = $this->escapePostVariables("numbernew"); if (!$i32f990de0fa2e05c03d31bf5021f8ede63166d03) { $this->_errors[] = v_adminsmsprofile_invalidname; $this->edit_admins = true; $this->edit_id = $icae1003a7b78317ecd106d559490d2ed7842f019; return self::POST_ERROR; } elseif (!PhoneNumber::isPhoneNumber($i6de5513d7bf66573dedf3f2f853ce5457a8f957f) || !$i6de5513d7bf66573dedf3f2f853ce5457a8f957f) { $this->_errors[] = v_adminsmsprofile_invalidnumber; $this->edit_admins = true; $this->edit_id = $icae1003a7b78317ecd106d559490d2ed7842f019; return self::POST_ERROR; } else { $this->Execute("UPDATE " . DB_PREFIX . "sp_admins SET name='" . $this->escape($i32f990de0fa2e05c03d31bf5021f8ede63166d03) . "', number='" . $this->escape($i6de5513d7bf66573dedf3f2f853ce5457a8f957f) . "' WHERE ID=" . $this->escape($icae1003a7b78317ecd106d559490d2ed7842f019)); $this->displayConfirmation(v_adminsmsprofile_adminchanged); $this->edit_admins = false; $this->edit_id = 0; return self::POST_OK; } } elseif (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitDeleteAdmin_x"]) || isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["submitDeleteAdmin"])) { $icae1003a7b78317ecd106d559490d2ed7842f019 = $this->escapePostVariables("ID"); $this->Execute("DELETE FROM " . DB_PREFIX . "sp_admins WHERE ID='" . $this->escape($icae1003a7b78317ecd106d559490d2ed7842f019) . "'"); $this->Execute("DELETE FROM " . DB_PREFIX . "sp_hooks_admins_multi WHERE adminIDs LIKE '" . $this->escape($icae1003a7b78317ecd106d559490d2ed7842f019) . "'"); $i83d1339527a9dc91b02fa99420eb13b0cd47adfe = $this->Execute("SELECT * FROM " . DB_PREFIX . "sp_hooks_admins_multi WHERE adminIDs like '" . $this->escape($icae1003a7b78317ecd106d559490d2ed7842f019) . ";%' OR adminIDs LIKE '%;" . $this->escape($icae1003a7b78317ecd106d559490d2ed7842f019) . ";%' OR adminIDs LIKE '%;" . $this->escape($icae1003a7b78317ecd106d559490d2ed7842f019) . "'"); if ($i83d1339527a9dc91b02fa99420eb13b0cd47adfe->num_rows) { foreach ($i83d1339527a9dc91b02fa99420eb13b0cd47adfe->rows as $i2e93e61d67c274d891066238c74ba6322d527b6d) { $i18b46d03fcb664397e59c34a4cb7b424d837711f = explode(";", $i2e93e61d67c274d891066238c74ba6322d527b6d['adminIDs']); array_splice($i18b46d03fcb664397e59c34a4cb7b424d837711f, array_search($icae1003a7b78317ecd106d559490d2ed7842f019, $i18b46d03fcb664397e59c34a4cb7b424d837711f), 1); $this->Execute("UPDATE " . DB_PREFIX . "sp_hooks_admins_multi SET adminIDs='" . implode(";", $i18b46d03fcb664397e59c34a4cb7b424d837711f) . "' WHERE name='" . $this->escape($i2e93e61d67c274d891066238c74ba6322d527b6d['name']) . "' AND status='" . $this->escape($i2e93e61d67c274d891066238c74ba6322d527b6d['status']) . "'"); } } $this->displayConfirmation(v_adminsmsprofile_admindeleted); return self::POST_OK; } elseif (isset($if7ac7ffb0e11bffa95681698138e923b4fd51990["EditSmsAccount"])) { $i139fa9617e9d70e3d55f87d6ad4113c40da3102d = $this->escapePostVariables("email"); $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc = $this->escapePostVariables("companyname"); $i94a47481735fcb1d4d39399453984453fa0ec578 = $this->escapePostVariables("addressstreet"); $i2950dcb306aa6a84739ae117f72d37fbfc177af7 = $this->escapePostVariables("addresscity"); $if807cf403609c75a25d2c8b19d9a8e1b0f3146e4 = $this->escapePostVariables("addresszip"); $i5a4616ba4ac4a7f21e69ba2afe5e994ae9927078 = $this->escapePostVariables("country0"); $ibcec5f7d7295ee797901b9c5fe2758f8a074ba4b = $this->escapePostVariables("companyid"); $i067d9e62ac114d017597fbfc5a16bdfd07fb847b = $this->escapePostVariables("companyvat"); $icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7 = $this->escapePostVariables("kosoba"); $i228783d167ecdf2325f0dabfe191e58f5099bde8 = $this->escapePostVariables("kprijmeni"); $i94a47481735fcb1d4d39399453984453fa0ec578 = html_entity_decode($i94a47481735fcb1d4d39399453984453fa0ec578, ENT_QUOTES, 'UTF-8'); $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc = html_entity_decode($ie9599f6e53cc27b46699f94805a73f5eccf9f0dc, ENT_QUOTES, 'UTF-8'); $i2950dcb306aa6a84739ae117f72d37fbfc177af7 = html_entity_decode($i2950dcb306aa6a84739ae117f72d37fbfc177af7, ENT_QUOTES, 'UTF-8'); $icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7 = html_entity_decode($icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7, ENT_QUOTES, 'UTF-8'); $i228783d167ecdf2325f0dabfe191e58f5099bde8 = html_entity_decode($i228783d167ecdf2325f0dabfe191e58f5099bde8, ENT_QUOTES, 'UTF-8'); if ($if7ac7ffb0e11bffa95681698138e923b4fd51990["type_acc"] == "Person") { $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc = ""; $ibcec5f7d7295ee797901b9c5fe2758f8a074ba4b = ""; $i067d9e62ac114d017597fbfc5a16bdfd07fb847b = ""; } if ($if7ac7ffb0e11bffa95681698138e923b4fd51990["type_acc"] == "Bussiness" && strlen($ie9599f6e53cc27b46699f94805a73f5eccf9f0dc) < 3) { $this->_errors[] = v_registration_company_name; return self::POST_ERROR; } if (!self::isEmail($i139fa9617e9d70e3d55f87d6ad4113c40da3102d)) { $this->_errors[] = v_adminsmsprofile_invalidemail2; return self::POST_ERROR; } else { $i9ec854a302fbdb72d043506b55d5bf395184517b = new SmsModel($this->getDb()); $i9ec854a302fbdb72d043506b55d5bf395184517b->editAccount($i139fa9617e9d70e3d55f87d6ad4113c40da3102d, $ie9599f6e53cc27b46699f94805a73f5eccf9f0dc, $i94a47481735fcb1d4d39399453984453fa0ec578, $i2950dcb306aa6a84739ae117f72d37fbfc177af7, $if807cf403609c75a25d2c8b19d9a8e1b0f3146e4, $i5a4616ba4ac4a7f21e69ba2afe5e994ae9927078, $ibcec5f7d7295ee797901b9c5fe2758f8a074ba4b, $i067d9e62ac114d017597fbfc5a16bdfd07fb847b, $icae1003a7b78317ecd106d559490d2ed7842f019913b8360e9b2834ed2fc65e1fbcb2fdd72ce7e7, $i228783d167ecdf2325f0dabfe191e58f5099bde8); if ($i9ec854a302fbdb72d043506b55d5bf395184517b->isError()) { $this->_errors = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getErrors()); return self::POST_ERROR; } else { $this->_okMsg = array_unique($i9ec854a302fbdb72d043506b55d5bf395184517b->getConfirm()); return self::POST_OK; } } } return self::POST_ERROR; }