Ejemplo n.º 1
0
}
if ($paget == 'page') {
    $page = array_do('stripslashes', query_first("SELECT * FROM `pages` WHERE title='" . $q[1] . "'"));
    $nodes = array_do('stripslashes', fetch_all_array(build_query('nodes,pcont,INNER,id,node', 'page=' . $page['id'])));
    if ($debug) {
        echo '<pre>';
        print_r($page);
        echo '</pre>';
        echo '<pre>';
        print_r($nodes);
        echo '</pre>';
    }
}
if ($paget == 'user') {
    if (isset($q[1])) {
        $user = array_do('stripslashes', query_first(build_query('users', 'url_name=' . $q[1])));
        $nodes = array_do('stripslashes', fetch_all_array(build_query('nodes', 'author=' . $q[1])));
        if ($debug) {
            $tmp_pass_f98w3n = $user['password'];
            $user['password'] = '******';
            echo '<br/><b>Over deze gebruiker / print_r($user):</b><pre>';
            print_r($user);
            echo '</pre>';
            echo '<b>Artikelen door deze gebruiker / print_r($nodes):</b><pre>';
            print_r($nodes);
            echo '</pre>';
            $user['password'] = $tmp_pass_f98w3n;
            $tmp_pass_f98w3n = '';
        }
    } else {
        header("Location: login");
Ejemplo n.º 2
0
function ReceiveMO($moid, $moseq, $src, $dest, $cmdcode, $msgbody, $opid, $username, $password)
{
    if ($username == 'igo' && $password == 'lightuponline') {
        //process content Received from VDC
        executeSelect("insert into receive(moid,phone,service_number,syntax,content,telco,time_receive) values ({$moid},'{$src}','{$dest}','{$cmdcode}','{$msgbody}','{$opid}'," . time() . ")");
        $mtseq = mysql_insert_id();
        $msgbody = "He thong 5giay hien tai khong dap ung duoc dich vu ban yeu cau";
        //Cắt chuỗi nội dung tin nhắn
        $tmp = explode(" ", killchar(trim($msgbody)));
        //Xử lý cú pháp 5KH--------------------------------------------------
        if (strtoupper($cmdcode) == "5KH") {
            //check service_number
            if ($dest == "8588" || $dest == "8088") {
                $strsql = "SELECT userid,username FROM user WHERE smskeyactive = '{$tmp['1']}'";
                $result = query_first('5giay', $strsql);
                if ($result['userid'] != NULL) {
                    execute5giay("UPDATE user SET usergroupid = 2, smskeyactive = 'Done' WHERE userid=" . $result['userid']);
                    $msgbody = "Tai khoan " . $result['username'] . " da duoc kich hoat, Cam on ban da dang ky lam thanh vien tai 5giay.vn";
                } else {
                    $msgbody = "Ma kich hoat khong ton tai. Ban vui long kiem tra lai ma kich hoat";
                }
            } else {
                $msgbody = "Ban da nhan tin sai cu phap. Vui long soan 5KH ACTIVECODE gui 8588";
            }
        }
        //Xử lý cú pháp 5KH--------------------------------------------------
        //Xử lý cú pháp 5GIAY--------------------------------------------------
        if (strtoupper($cmdcode) == "5GIAY") {
            //check service_number
            if ($dest == "8788") {
                $strsql = "SELECT userid,username FROM user WHERE userid =" . $tmp[1];
                $result = query_first('5giay', $strsql);
                if ($result['userid'] != NULL) {
                    execute5giay("update user set point5s =point5s+15 where userid=" . $result['userid']);
                    $msgbody = "Tai khoan " . $result['username'] . " da duoc cong 15K, Cam on ban da su dung dich vu tai 5giay.vn";
                } else {
                    $msgbody = "Ma thanh vien khong ton tai. Ban vui long kiem tra lai ma thanh vien";
                }
            } else {
                $msgbody = "Ban da nhan tin sai cu phap. Vui long soan 5GIAY USERID gui 8788";
            }
        }
        //Xử lý cú pháp 5GIAY--------------------------------------------------
        //Xử lý cú pháp 5UP--------------------------------------------------
        if (strtoupper($cmdcode) == "5UP") {
            $strsql = "SELECT threadid FROM thread WHERE threadid =" . $tmp[1];
            $result = query_first('5giay', $strsql);
            switch ($dest) {
                case "8100":
                    if ($result != NULL) {
                        $strsql = "update thread set lastpost=" . time() . ",count_sms =count_sms+1 where threadid =" . $tmp[1];
                        $msgbody = "Cam on ban da su dung dich vu cua 5giay.vn. Topic " . $tmp[1] . " cua ban duoc them 1 luot UP";
                    } else {
                        $msgbody = "Ban da nhan tin sai cu phap. Vui long Soan UP <ID topic> gui toi 8100 de su dung dich vu. Cam on ban";
                    }
                    break;
                case "8500":
                    if ($result != NULL) {
                        $strsql = "update thread set lastpost =" . time() . ",datehot=" . time() . ",status_sms = 3 where threadid =" . $tmp[1];
                        $msgbody = "Cam on ban da su dung dich vu cua 5giay.vn. Topic " . $tmp[1] . " cua ban thanh topic HOT trong 24 gio";
                    } else {
                        $msgbody = "Ban da nhan tin sai cu phap. Vui long Soan UP <ID topic> HOT gui toi 8500 de su dung dich vu. Cam on ban";
                    }
                    break;
                default:
                    $msgbody = "Ban da nhan tin sai cu phap. Vui long xem lai huong dan tai 5giay.vn";
                    break;
            }
            //end switch
        }
        //Xử lý cú pháp 5UP--------------------------------------------------
        $msgtype = "Text";
        $msgtitle = "";
        $mttotalseg = "1";
        $mtseqref = "1";
        $reqtime = date(YmdGis, time());
        $procresult = "1";
        //Begin call Function SendMT VDC
        $client = new nusoap_client('http://www.mymobile.com.vn/SMSAPIWS/SMSAgentWS.asmx?wsdl', 'wsdl', '', '', '', '');
        $param = array('mtseq' => $mtseq, 'moid' => $moid, 'moseq' => $moseq, 'src' => $dest, 'dest' => $src, 'cmdcode' => $cmdcode, 'msgbody' => $msgbody, 'msgtype' => $msgtype, 'msgtitle' => $msgtitle, 'mttotalseg' => $mttotalseg, 'mtseqref' => $mtseqref, 'cpid' => '191', 'reqtime' => $reqtime, 'procresult' => $procresult, 'opid' => $opid, 'username' => '5giay', 'password' => '7rnuixm8l3');
        $result = $client->call('SendMT', $param);
        //get return function SendMT
        if ($client->fault) {
            $returnend = $result;
        } else {
            // Check for errors
            $err = $client->getError();
            if ($err) {
                // Display the error
                $returnend = $err;
            } else {
                // Display the result
                if ($result['SendMTResult'] == 200) {
                    $returnvalue = 200;
                    $returnend = 200;
                } else {
                    $returnend = $result['SendMTResult'];
                    $returnvalue = 202;
                }
            }
        }
        //End call Function SendMT VDC
        //Insert into table reply
        executeSelect("insert into reply(mtseq,moid,phone,service_number,syntax,reply_content,telco,result,time_reply) values ('{$mtseq}','{$moid}','{$src}','{$dest}','{$cmdcode}','{$msgbody}','{$opid}','{$returnend}'," . time() . ")");
        return new soapval('return', 'xsd:int', $returnvalue);
        //return function ReceiveMO
    } else {
        return new soapval('return', 'xsd:int', 404);
    }
}
Ejemplo n.º 3
0
                $_GET['fullnews'] = $row[0];
            } else {
                // 404 not found
                $_GET['categoryID'] = -1;
            }
            break;
            // Pages
        // Pages
        case 'pages':
            $sql = '
                SELECT
                aux_page_ID
                FROM ' . AUX_PAGES_TABLE . '
                WHERE uri ="' . $uri . '"
                LIMIT 1';
            if ($row = query_first($sql)) {
                $_GET['show_aux_page'] = $row[0];
            } else {
                // 404 not found
                $_GET['categoryID'] = -1;
            }
            break;
    }
    //check_www_prefix();
    // Launch engine
} else {
    // No URI
    // Access by ID must be redirected to URI if present
    if ((isset($_GET['productID']) || isset($_GET['categoryID']) || isset($_GET['fullnews']) || isset($_GET['show_aux_page'])) && !isset($_GET['search']) && !isset($_GET['advanced_search_in_category']) && !isset($_GET['sort']) && $_SERVER['REQUEST_METHOD'] == 'GET') {
        if (isset($_GET['productID'])) {
            // product