/**
 * Generate Form Token
 *
 * @access	public
 * @return	string	unique form token
 *
 */
function conversion($postvar, $className)
{
    $object = new $className();
    $rc = new ReflectionClass($className);
    if (!array_key_exists('id', $postvar) || empty($postvar['id'])) {
        $postvar['date_added'] = gmdate("Y-m-d H:i:s", time());
    }
    $postvar['last_modified'] = gmdate("Y-m-d H:i:s", time());
    //if(!array_key_exists('ipaddress',$objReturn))
    $postvar['ip_address'] = ipaddress();
    //if(!array_key_exists('last_modified_by',$objReturn))
    //{
    $CI =& get_instance();
    $session = $CI->db_session->userdata('userObj');
    if ($session) {
        $postvar['last_modified_by'] = $session->id;
    } else {
        $postvar['last_modified_by'] = 0;
    }
    $postVarKeys = array_keys($postvar);
    //$reflect = new ReflectionObject($object);
    foreach ($rc->getProperties(ReflectionProperty::IS_PRIVATE) as $prop) {
        if (in_array($prop->getName(), $postVarKeys) && $rc->hasMethod("set" . ucfirst($prop->getName()))) {
            $refMethod = new ReflectionMethod($className, "set" . ucfirst($prop->getName()));
            //echo $postvar[$prop->getName()];
            $refMethod->invokeArgs($object, array(filterString($postvar[$prop->getName()])));
        }
    }
    //return $object;
    return conversion2($postvar, $object, $check = 1);
}
 function save_attachment($new_file_names, $orig_file_names, $global_id)
 {
     $qry = "INSERT INTO attachments (db_file_name,original_file_name,url, global_id, date_added, last_modified, ip_address) values";
     if (is_array($new_file_names) && is_array($orig_file_names)) {
         foreach ($new_file_names as $k => $v) {
             $url = 'uploads/' . $new_file_names[$k];
             $qry .= " ('" . $new_file_names[$k] . "','" . $orig_file_names[$k] . "','" . $url . "','" . $global_id . "','" . date("Y-m-d H:i:s") . "','" . date("Y-m-d H:i:s") . "','" . ipaddress() . "'),";
         }
     } else {
         $url = 'uploads/' . $new_file_names;
         $qry .= " ('" . $new_file_names . "','" . $orig_file_names . "','" . $url . "','" . $global_id . "','" . date("Y-m-d H:i:s") . "','" . date("Y-m-d H:i:s") . "','" . ipaddress() . "')";
     }
     $qry = trim($qry, ",");
     $this->db->query($qry);
 }
Example #3
0
 public function updatecheckout()
 {
     $booked_status = $this->booking_model->getBookingStatus($_POST['booking_det_id']);
     //echo '<pre>'; print_r($booked_status); die;
     if ($booked_status[0]->booked_status == '1') {
         $booking_details['id'] = $_POST['booking_det_id'];
         $booking_details['to_date'] = date("Y-m-d H:i:s");
         $booking_details['booked_status'] = '0';
         $booking_details['modified_by'] = $this->user_details->id;
         $booking_details['modified_date'] = date("Y-m-d H:i:s");
         $receipt_details['receipt_id'] = $_POST['rcpt_id'];
         $receipt_details['deposit_refund_amount'] = $_POST['deposite_amount'];
         $receipt_details['damage_amount'] = $_POST['damage_amount'];
         $receipt_details['deposit_refund_by'] = $this->user_details->id;
         $receipt_details['deposit_refund_date'] = date("Y-m-d H:i:s");
         $receipt_details['modified_by'] = $this->user_details->id;
         $receipt_details['modified_date'] = date("Y-m-d H:i:s");
         $receipt_details['ipaddress'] = ipaddress();
         $ip_array = array('booking_details' => $booking_details, 'payments' => $receipt_details);
         //echo '<pre>'; print_r($ip_array); die;
         $update_booked_status = $this->booking_model->updateBookingDetails($ip_array);
         echo $update_booked_status;
     } else {
         //$response_array = array('response'=>'error','message'=>'This Booking checkout already done');
         //echo json_encode($response_array);
         echo 'error';
     }
 }
Example #4
0
 public function addoperator()
 {
     if ($_POST['id'] == 0) {
         $_POST['created_by'] = $this->user_details->id;
         $_POST['created_date'] = date("Y-m-d H:i:s");
         $_POST['emp_role'] = 4;
     }
     $_POST['modified_by'] = $this->user_details->id;
     $_POST['modified_date'] = date("Y-m-d H:i:s");
     $_POST['ipaddress'] = ipaddress();
     $result = $this->admin_model->addoperator($_POST);
     echo $result;
 }
Example #5
0
 function deleteRecord($table, $where_cond)
 {
     $users_id = 1;
     $data = $this->getDBResult('select * from ' . $table . ' where id=' . $where_cond['id'], 'object');
     $dbdata = $data[0];
     $exec_qry = false;
     $sql = 'INSERT INTO update_history_details_php(update_history_main_php_id, field_name, old_value,new_value) VALUES ';
     $exclude_array = array();
     $temp_var = 1;
     foreach ($dbdata as $key => $val) {
         if ($temp_var == 1) {
             $temp_var = 2;
             $main_tbl_sql = ' INSERT INTO update_history_main_php(modify_date, table_involved, action, users_id, ip_address) VALUES(NOW(),"' . $table . '","delete",' . $users_id . ',"' . ipaddress() . '");';
             $this->db->query($main_tbl_sql);
             $main_id = $this->db->insert_id();
         }
         $exec_qry = true;
         $sql .= '(' . $main_id . ', "' . $key . '","' . $dbdata->{$key} . '",""),';
     }
     if ($exec_qry) {
         $this->db->query(rtrim($sql, ','));
     }
     $this->db->delete($table, $where_cond);
 }
Example #6
0
 $kdihczreh = "pass_encrypted";
 ${${"GLOBALS"}["nkkbfkifbdfw"]} = mysqli_real_escape_string(${${"GLOBALS"}["rargmfqugv"]}, $_POST["company"]);
 ${$xxvynocjhdx} = mysqli_real_escape_string(${${"GLOBALS"}["kevjcboi"]}, $_POST["personal_name"]);
 ${"GLOBALS"}["dqvitvhil"] = "email";
 ${${"GLOBALS"}["bwdouduzxri"]} = mysqli_real_escape_string(${$gpynggyubxd}, $_POST["email"]);
 ${${"GLOBALS"}["pqfwgbcoutp"]} = mysqli_real_escape_string(${${"GLOBALS"}["kevjcboi"]}, $_POST["password"]);
 ${${"GLOBALS"}["beekirug"]} = mysqli_real_escape_string(${${"GLOBALS"}["fgdmsmckhbw"]}, $_POST["timezone"]);
 ${"GLOBALS"}["kttyltmpjz"] = "license";
 ${$kdihczreh} = hash("sha512", ${${"GLOBALS"}["uulfyed"]} . "PectGtma");
 ${${"GLOBALS"}["xpzugplud"]} = mysqli_real_escape_string(${$rssrqp}, $_POST["aws_key"]);
 ${${"GLOBALS"}["ylugmfriyro"]} = mysqli_real_escape_string(${${"GLOBALS"}["lvdjwvivfv"]}, $_POST["aws_secret"]);
 ${${"GLOBALS"}["pfcxldcxxvb"]} = str_makerand(20, 20, true, false, true);
 ${${"GLOBALS"}["nbonireuchk"]} = $_SERVER["HTTP_HOST"];
 if (${${"GLOBALS"}["nkkbfkifbdfw"]} != "" && ${${"GLOBALS"}["khfewtp"]} != "" && ${${"GLOBALS"}["dqvitvhil"]} != "" && ${${"GLOBALS"}["zdhnmcrett"]} != "" && ${${"GLOBALS"}["kttyltmpjz"]} != "") {
     ${"GLOBALS"}["lwobjkbbylwt"] = "license";
     ${${"GLOBALS"}["glpewakk"]} = file_get_contents_curl("http://gateway.sendy.co/gateway/" . ${${"GLOBALS"}["nbonireuchk"]} . "/" . ${${"GLOBALS"}["lwobjkbbylwt"]} . "/" . ipaddress());
     if (${${"GLOBALS"}["glpewakk"]}) {
         $xzlpncxlh = "mysqli";
         $leqgmcsb = "r3";
         ${"GLOBALS"}["tvsexisgp"] = "q2";
         $qquvbdaufpjj = "r4";
         $gfgzfbnmax = "mysqli";
         ${"GLOBALS"}["dpfbfknnc"] = "mysqli";
         $afzfuovfc = "r1";
         ${$afzfuovfc} = mysqli_query(${${"GLOBALS"}["dpfbfknnc"]}, ${${"GLOBALS"}["kvnfbbifoz"]});
         ${"GLOBALS"}["bpbmrbtqt"] = "r3";
         ${${"GLOBALS"}["ffhrwxm"]} = mysqli_query(${$xzlpncxlh}, ${${"GLOBALS"}["tvsexisgp"]});
         ${"GLOBALS"}["jfeigrpfmqq"] = "q5";
         ${$leqgmcsb} = mysqli_query(${${"GLOBALS"}["kevjcboi"]}, ${${"GLOBALS"}["umwlmuwset"]});
         ${"GLOBALS"}["cbwkwmmwk"] = "q6";
         ${$qquvbdaufpjj} = mysqli_query(${$gfgzfbnmax}, ${${"GLOBALS"}["rqlmwmrjjdu"]});
Example #7
0
function start_app()
{
    ${"GLOBALS"}["jpbtsovxvpc"] = "q";
    ${"GLOBALS"}["dvhmjr"] = "r";
    global $mysqli;
    ${${"GLOBALS"}["jpbtsovxvpc"]} = "SELECT * FROM login WHERE id = " . $_SESSION["userID"];
    ${"GLOBALS"}["unxwytcgxeb"] = "r";
    ${"GLOBALS"}["cikbqrwj"] = "q";
    ${"GLOBALS"}["jbvavtd"] = "r";
    $vxyxdcqyi = "q2";
    ${${"GLOBALS"}["dvhmjr"]} = mysqli_query(${${"GLOBALS"}["mikmhj"]}, ${${"GLOBALS"}["cikbqrwj"]});
    if (${${"GLOBALS"}["unxwytcgxeb"]} && mysqli_num_rows(${${"GLOBALS"}["jbvavtd"]}) > 0) {
        ${"GLOBALS"}["wsltvbfk"] = "row";
        ${"GLOBALS"}["fmxhsmo"] = "r";
        while (${${"GLOBALS"}["wsltvbfk"]} = mysqli_fetch_array(${${"GLOBALS"}["fmxhsmo"]})) {
            ${"GLOBALS"}["yhozwenc"] = "row";
            ${"GLOBALS"}["rbkckwdexp"] = "row";
            ${"GLOBALS"}["zbetsnb"] = "row";
            $itrjspjvr = "row";
            $_SESSION["name"] = stripslashes(${$itrjspjvr}["name"]);
            $_SESSION["company"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["company"]);
            $_SESSION["email"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["username"]);
            ${"GLOBALS"}["pfgusliwy"] = "row";
            $_SESSION["password"] = stripslashes(${${"GLOBALS"}["zbetsnb"]}["password"]);
            ${"GLOBALS"}["pblnhv"] = "row";
            $_SESSION["s3_key"] = stripslashes(${${"GLOBALS"}["pfgusliwy"]}["s3_key"]);
            $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["s3_secret"]);
            $_SESSION["license"] = stripslashes(trim(${${"GLOBALS"}["xmhovsplmpbk"]}["license"]));
            $_SESSION["tied_to"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["tied_to"]);
            $_SESSION["restricted_to_app"] = stripslashes(${${"GLOBALS"}["yhozwenc"]}["app"]);
            $_SESSION["timezone"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["timezone"]);
            $_SESSION["language"] = stripslashes(${${"GLOBALS"}["pblnhv"]}["language"]);
            $_SESSION["cron"] = stripslashes(${${"GLOBALS"}["rbkckwdexp"]}["cron"]);
            $_SESSION["send_rate"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["send_rate"]);
            ${"GLOBALS"}["bsttynvop"] = "row";
            $_SESSION["ses_endpoint"] = stripslashes(${${"GLOBALS"}["bsttynvop"]}["ses_endpoint"]);
            if ($_SESSION["timezone"] == "") {
                $_SESSION["timezone"] = date_default_timezone_get();
            }
            date_default_timezone_set($_SESSION["timezone"]);
            if ($_SESSION["language"] != "en_US") {
                set_locale($_SESSION["language"]);
            }
            if ($_SESSION["tied_to"] != "") {
                ${${"GLOBALS"}["fsywgryp"]} = "SELECT s3_key, s3_secret, license, ses_endpoint FROM login WHERE id = " . $_SESSION["tied_to"];
                ${${"GLOBALS"}["sfdgfhfkq"]} = mysqli_query(${${"GLOBALS"}["mikmhj"]}, ${${"GLOBALS"}["fsywgryp"]});
                if (${${"GLOBALS"}["sfdgfhfkq"]} && mysqli_num_rows(${${"GLOBALS"}["sfdgfhfkq"]}) > 0) {
                    while (${${"GLOBALS"}["xmhovsplmpbk"]} = mysqli_fetch_array(${${"GLOBALS"}["sfdgfhfkq"]})) {
                        $hkgkiow = "row";
                        $mmwuddtsm = "row";
                        $_SESSION["s3_key"] = stripslashes(${$mmwuddtsm}["s3_key"]);
                        ${"GLOBALS"}["mgkewgwspdm"] = "row";
                        $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["s3_secret"]);
                        $_SESSION["license"] = stripslashes(${$hkgkiow}["license"]);
                        $_SESSION["ses_endpoint"] = stripslashes(${${"GLOBALS"}["mgkewgwspdm"]}["ses_endpoint"]);
                    }
                }
                $_SESSION["is_sub_user"] = true;
            } else {
                $_SESSION["is_sub_user"] = false;
                $_SESSION["tied_to"] = $_SESSION["userID"];
            }
        }
    }
    $suahtbied = "q2";
    $rgynyxehkg = "r2";
    ${$vxyxdcqyi} = "SELECT api_key FROM login ORDER BY id ASC LIMIT 1";
    ${${"GLOBALS"}["qssdejigbr"]} = mysqli_query(${${"GLOBALS"}["mikmhj"]}, ${$suahtbied});
    if (${${"GLOBALS"}["qssdejigbr"]} && mysqli_num_rows(${$rgynyxehkg}) > 0) {
        $fphyvbzxlh = "row";
        $dljrqmmo = "row";
        while (${$fphyvbzxlh} = mysqli_fetch_array(${${"GLOBALS"}["qssdejigbr"]})) {
            $_SESSION["api_key"] = ${$dljrqmmo}["api_key"];
        }
    }
    if (!isset($_COOKIE["version"])) {
        $fjkodjnd = "version_latest";
        ${$fjkodjnd} = file_get_contents_curl("http://gateway.sendy.co/version-checker");
        if (setcookie("version", ${${"GLOBALS"}["gitgoead"]}, time() + 86400, "/", COOKIE_DOMAIN)) {
            ${"GLOBALS"}["pbepczt"] = "version_latest";
            $_SESSION["version_latest"] = ${${"GLOBALS"}["pbepczt"]};
        }
    } else {
        $_SESSION["version_latest"] = $_COOKIE["version"];
    }
    if (!defined("CURRENT_VERSION")) {
        define("CURRENT_VERSION", "2.0.7");
    }
    if (isset($_SESSION[$_SESSION["license"]])) {
        if ($_SESSION[$_SESSION["license"]] != hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy")) {
            echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"img/favicon.png\"><title>Invalid license or domain</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 300px;height: 110px;margin: -140px 0 0 -150px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #000;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Invalid license or domain</h2></p><p>Are you running Sendy on the domain you purchased it for?</p></div></body></html>";
            unlog_session();
            exit;
        }
    } else {
        ${"GLOBALS"}["fohejunds"] = "license";
        ${"GLOBALS"}["ldkfhdzyqh"] = "license";
        ${${"GLOBALS"}["fohejunds"]} = file_get_contents_curl("http://gateway.sendy.co/gateway/" . $_SERVER["HTTP_HOST"] . "/" . $_SESSION["license"] . "/" . ipaddress() . "/" . str_replace("/", "|s|", APP_PATH) . "/" . CURRENT_VERSION . "/" . time() . "/");
        $bdxxpntfdjf = "license";
        if (${${"GLOBALS"}["ldkfhdzyqh"]} == "blocked") {
            echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"/img/favicon.png\"><title>Outgoing connections is blocked</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 330px;height: 130px;margin: -140px 0 0 -165px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #000;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Outgoing connections blocked</h2></p><p>Your server has a firewall blocking outgoing connections. Please contact your host to whitelist 'sendy.co' & 'amazonaws.com'.</p></div></body></html>";
            exit;
        } else {
            if (${${"GLOBALS"}["kmedcvmgnt"]} == "version error") {
                echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"/img/favicon.png\"><title>Upgrade your license to 2.0</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 330px;height: 130px;margin: -140px 0 0 -165px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #4572A6;text-decoration: underline;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Upgrade your license to 2.x</h2></p><p>Your Sendy license requires an upgrade to version 2.x. Please visit <a href=\"https://sendy.co/get-updated\" target=\"_blank\">https://sendy.co/get-updated</a> to purchase an upgrade in order to proceed.</p></div></body></html>";
                exit;
            } else {
                if (${$bdxxpntfdjf}) {
                    $_SESSION[$_SESSION["license"]] = hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy");
                } else {
                    $_SESSION[$_SESSION["license"]] = "";
                }
            }
        }
    }
    session_write_close();
}
Example #8
0
 ${$elqetero} = mysqli_real_escape_string(${${"GLOBALS"}["llygzlrzfie"]}, $_POST["email"]);
 ${${"GLOBALS"}["bjmagdxql"]} = mysqli_real_escape_string(${${"GLOBALS"}["lrjytevz"]}, $_POST["password"]);
 ${${"GLOBALS"}["cedvpulsll"]} = mysqli_real_escape_string(${${"GLOBALS"}["llygzlrzfie"]}, $_POST["timezone"]);
 $pdqifqxym = "name";
 ${"GLOBALS"}["bccxvjlj"] = "mysqli";
 ${${"GLOBALS"}["azgoregsx"]} = hash("sha512", ${${"GLOBALS"}["lgqebz"]} . "PectGtma");
 ${${"GLOBALS"}["vfcjmoeyw"]} = mysqli_real_escape_string(${${"GLOBALS"}["bccxvjlj"]}, $_POST["aws_key"]);
 ${${"GLOBALS"}["rdtmeaii"]} = mysqli_real_escape_string(${${"GLOBALS"}["llygzlrzfie"]}, $_POST["aws_secret"]);
 ${${"GLOBALS"}["oxwidexe"]} = substr(hash("sha512", time() . ${$xksljvovx} . ${${"GLOBALS"}["ypktxz"]} . "PectGtma"), 0, 20);
 ${${"GLOBALS"}["djiraqg"]} = $_SERVER["HTTP_HOST"];
 if (${${"GLOBALS"}["grnsnbuio"]} != "" && ${$pdqifqxym} != "" && ${$gpemxhjgco} != "" && ${${"GLOBALS"}["bjmagdxql"]} != "" && ${${"GLOBALS"}["lpbeuh"]} != "") {
     $isoqnysnc = "license";
     ${"GLOBALS"}["oplqlcao"] = "licensed";
     ${"GLOBALS"}["ptpasz"] = "licensed";
     ${"GLOBALS"}["sypglw"] = "current_domain";
     ${${"GLOBALS"}["oplqlcao"]} = file_get_contents_curl("http://sendy.co/gateway/" . ${${"GLOBALS"}["sypglw"]} . "/" . ${$isoqnysnc} . "/" . ipaddress());
     if (${${"GLOBALS"}["ptpasz"]}) {
         ${"GLOBALS"}["anhrqf"] = "r4";
         $nqiueel = "q3";
         $yectqsbhswq = "mysqli";
         ${${"GLOBALS"}["icojyruon"]} = mysqli_query(${${"GLOBALS"}["llygzlrzfie"]}, ${${"GLOBALS"}["ocsubdvbg"]});
         ${"GLOBALS"}["lzpmkdsshl"] = "q2";
         ${"GLOBALS"}["brgeqh"] = "mysqli";
         $zrcdgf = "r3";
         $dfytssal = "r4";
         $jcurhjntm = "mysqli";
         ${${"GLOBALS"}["izhxemxjwh"]} = mysqli_query(${${"GLOBALS"}["brgeqh"]}, ${${"GLOBALS"}["lzpmkdsshl"]});
         ${$zrcdgf} = mysqli_query(${$yectqsbhswq}, ${$nqiueel});
         ${$dfytssal} = mysqli_query(${${"GLOBALS"}["llygzlrzfie"]}, ${${"GLOBALS"}["hekmfgbpy"]});
         $yuwxvnnbkl = "r5";
         ${$yuwxvnnbkl} = mysqli_query(${$jcurhjntm}, ${${"GLOBALS"}["yoadkhoddc"]});
Example #9
0
function start_app()
{
    global $mysqli;
    $wxqywuso = "r";
    $iddclumdtx = "q";
    ${${"GLOBALS"}["kypbtpqaite"]} = "SELECT * FROM login WHERE id = " . $_SESSION["userID"];
    ${$wxqywuso} = mysqli_query(${${"GLOBALS"}["zymgfktjwdk"]}, ${$iddclumdtx});
    if (${${"GLOBALS"}["lmhdiylgjh"]} && mysqli_num_rows(${${"GLOBALS"}["lmhdiylgjh"]}) > 0) {
        ${"GLOBALS"}["rwrgerkngpw"] = "r";
        ${"GLOBALS"}["loukcmxe"] = "row";
        while (${${"GLOBALS"}["loukcmxe"]} = mysqli_fetch_array(${${"GLOBALS"}["rwrgerkngpw"]})) {
            ${"GLOBALS"}["ovrlts"] = "row";
            $nkxcmgzbh = "row";
            $_SESSION["name"] = stripslashes(${${"GLOBALS"}["ovrlts"]}["name"]);
            $_SESSION["company"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["company"]);
            $_SESSION["email"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["username"]);
            $_SESSION["password"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["password"]);
            $_SESSION["s3_key"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["s3_key"]);
            $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["s3_secret"]);
            $_SESSION["api_key"] = stripslashes(${$nkxcmgzbh}["api_key"]);
            $_SESSION["license"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["license"]);
            $_SESSION["tied_to"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["tied_to"]);
            $_SESSION["restricted_to_app"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["app"]);
            ${"GLOBALS"}["mnciebhmo"] = "row";
            $_SESSION["timezone"] = stripslashes(${${"GLOBALS"}["mnciebhmo"]}["timezone"]);
            $_SESSION["language"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["language"]);
            $_SESSION["cron"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["cron"]);
            date_default_timezone_set($_SESSION["timezone"]);
            if ($_SESSION["language"] != "en_US") {
                set_locale($_SESSION["language"]);
            }
            if ($_SESSION["tied_to"] != "") {
                $gjnvssmsr = "q";
                ${"GLOBALS"}["zgihjqjiqcu"] = "mysqli";
                ${${"GLOBALS"}["kypbtpqaite"]} = "SELECT s3_key, s3_secret, license FROM login WHERE id = " . $_SESSION["tied_to"];
                ${"GLOBALS"}["zgcrosuud"] = "r";
                ${"GLOBALS"}["pkwapxhu"] = "r";
                ${${"GLOBALS"}["lmhdiylgjh"]} = mysqli_query(${${"GLOBALS"}["zgihjqjiqcu"]}, ${$gjnvssmsr});
                if (${${"GLOBALS"}["zgcrosuud"]} && mysqli_num_rows(${${"GLOBALS"}["pkwapxhu"]}) > 0) {
                    while (${${"GLOBALS"}["tkigemshnse"]} = mysqli_fetch_array(${${"GLOBALS"}["lmhdiylgjh"]})) {
                        $xdedkslgffqz = "row";
                        ${"GLOBALS"}["ekvrklvhgq"] = "row";
                        $_SESSION["s3_key"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["s3_key"]);
                        $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["ekvrklvhgq"]}["s3_secret"]);
                        $_SESSION["license"] = stripslashes(${$xdedkslgffqz}["license"]);
                    }
                }
                $_SESSION["is_sub_user"] = true;
            } else {
                $_SESSION["is_sub_user"] = false;
                $_SESSION["tied_to"] = $_SESSION["userID"];
            }
        }
    }
    if (!isset($_COOKIE["version"])) {
        ${"GLOBALS"}["iepwdwkbk"] = "version_latest";
        ${${"GLOBALS"}["sdlczcc"]} = file_get_contents_curl("http://sendy.co/version-checker");
        if (setcookie("version", ${${"GLOBALS"}["iepwdwkbk"]}, time() + 86400, "/", COOKIE_DOMAIN)) {
            $_SESSION["version_latest"] = ${${"GLOBALS"}["sdlczcc"]};
        }
    } else {
        $_SESSION["version_latest"] = $_COOKIE["version"];
    }
    if (!defined("CURRENT_VERSION")) {
        define("CURRENT_VERSION", "1.1.6.3");
    }
    if (isset($_SESSION[$_SESSION["license"]])) {
        if ($_SESSION[$_SESSION["license"]] != hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy")) {
            echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"img/favicon.png\"><title>Invalid license or domain</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 300px;height: 110px;margin: -140px 0 0 -150px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #000;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Invalid license or domain</h2></p><p>Are you running Sendy on the domain you purchased it for?</p></div></body></html>";
            unlog_session();
            exit;
        }
    } else {
        ${${"GLOBALS"}["pvlwcqd"]} = file_get_contents_curl("http://sendy.co/gateway/" . $_SERVER["HTTP_HOST"] . "/" . $_SESSION["license"] . "/" . ipaddress() . "/" . str_replace("/", "|s|", APP_PATH) . "/" . CURRENT_VERSION . "/" . time() . "/");
        $luwydjpttli = "license";
        if (${$luwydjpttli}) {
            $_SESSION[$_SESSION["license"]] = hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy");
        } else {
            $_SESSION[$_SESSION["license"]] = "";
        }
    }
    session_write_close();
}