當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MooMessage函數代碼示例

本文整理匯總了PHP中MooMessage函數的典型用法代碼示例。如果您正苦於以下問題:PHP MooMessage函數的具體用法?PHP MooMessage怎麽用?PHP MooMessage使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了MooMessage函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: sendto_m

function sendto_m()
{
    global $_MooClass, $dbTablePre, $uid, $user_arr;
    if (isset($_POST['actio']) && $_POST['actio'] == '1') {
        $mailadd = safeFilter(MooGetGPC('mailadd', 'string', 'P'));
        $content = safeFilter(MooGetGPC('content', 'string', 'P'));
        $title = safeFilter(MooGetGPC('title', 'string', 'P'));
        $sendid = MooGetGPC('sendid', 'string', 'P');
        if ($mailadd && $content && $title) {
            $mailarr = explode(',', $mailadd);
            $date = '';
            if (!$sendid) {
                $date = date('YmdHis') . rand(1111, 9999);
                $reg = "/^([a-z0-9\\+_\\-\\.]+)*@([a-z0-9\\-]+\\.)+[a-z]{2,6}\$/";
                $vals = array();
                foreach ($mailarr as $val) {
                    $val = trim($val);
                    if (preg_match($reg, $val)) {
                        $vals[] = " ('','" . $val . "','" . $date . "')";
                    }
                }
                $vals = join(',', $vals);
                if (!empty($vals)) {
                    $sql = "insert into {$dbTablePre}email values";
                    $sql .= $vals;
                    $_MooClass['MooMySQL']->query($sql);
                }
            }
            $content .= "您找到心中的TA了嗎?如果沒有,常來真愛一生網看看(http://www.zhenaiyisheng.cc/index.php?puid={$user_arr['uid']}),付出您的真心與真情,真愛一生必定為您牽線連理,讓您輕鬆、快捷地找到知己好友 ,祝願天下有情人終成眷屬!\n\t您戀愛了嗎?您結婚了嗎?如果沒有,就來真愛一生網看看( http://www.zhenaiyisheng.cc/index.php?puid={$user_arr['uid']})吧!";
            MooSendMail($mailadd, $title, $content, $is_template = true, $sendid);
            MooMessage("感謝您對真愛一生網的支持", 'index.php?n=invite&h=mail&sendid=' . $date);
        } else {
            MooMessage("信息不完整!", 'index.php?n=invite&h=mail');
        }
    } else {
        $sendid = trim(MooGetGPC('sendid', 'string', 'G'));
        $t = $mail_str = '';
        if (preg_match("/\\d{18}/", $sendid)) {
            $sql = "select `email` from {$dbTablePre}email where sendid='{$sendid}' limit 10";
            $st = $_MooClass['MooMySQL']->getAll($sql);
            if ($st) {
                foreach ($st as $val) {
                    $mail_str .= $t . $val['email'];
                    $t = ',';
                }
            }
        }
        require MooTemplate('public/invite_mail', 'module');
    }
}
開發者ID:noikiy,項目名稱:zays,代碼行數:50,代碼來源:index.php

示例2: whoaddme

function whoaddme()
{
    global $_MooClass, $dbTablePre, $userid, $pagesize, $user_arr;
    //note 獲取刪除提交的變量
    $delfriend = MooGetGPC('delfriend', 'string', 'P');
    $delfriendid = MooGetGPC('delfriendid', 'array', 'P');
    //note 刪除提交的數據
    if ($delfriend) {
        $ids = implode(',', $delfriendid);
        //foreach($delfriendid as $v) {
        $_MooClass['MooMySQL']->query("DELETE FROM {$dbTablePre}service_friend WHERE fid  in  ({$ids})");
        //}
        MooMessage("刪除意中人成功", 'index.php?n=service&h=liker', '05');
    }
    $pagesize = 4;
    //note 獲得當前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    //note 獲得第幾頁
    $page = empty($_GET['page']) ? 1 : $_GET['page'];
    //note limit查詢開始位置
    $start = ($page - 1) * $pagesize;
    //note 查出誰加我為意中人的總數
    $ret_count = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}service_friend WHERE friendid = '{$userid}'");
    $total = $ret_count['c'];
    $total2Arr = $_MooClass['MooMySQL']->getOne("SELECT count(*) FROM {$dbTablePre}service_friend WHERE uid = '{$userid}'");
    $total2 = $total2Arr['count(*)'];
    //note
    if ($total) {
        $results = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_friend WHERE friendid = '{$userid}' order by sendtime desc LIMIT {$start},{$pagesize}");
        $friends = array();
        foreach ($results as $k => $v) {
            $send_user1 = array();
            $send_user2 = array();
            $friend = array();
            $send_user1 = leer_send_user1($v['uid']);
            $send_user2 = leer_send_user2($v['uid']);
            $friend['l'] = $v;
            $friend['s'] = $send_user1;
            $friend['t'] = $send_user2;
            $friends[$k] = $friend;
        }
    }
    require MooTemplate('public/service_friend_whoaddmylist', 'module');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:45,代碼來源:liker.php

示例3: getData

 function getData($param)
 {
     include_once 'module/myaccount/config.php';
     // $wsdlURL = "http://gboss.id5.cn/services/QueryValidatorServices?wsdl";
     /*$partner = "hongzhiniang123";
     		$partnerPW = "hongzhiniang123_4*ds6UOF";
     
     		$Key = "12345678";
     		$iv = "12345678";*/
     $DES = new DES($Key, $iv);
     //$wsdlURL = "http://gboss.id5.cn/services/QueryValidatorServices?wsdl";
     // echo $wsdlURL.'and'.$partner.'and'.$partnerPW;exit;
     try {
         //var_dump(file_get_contents($wsdlURL));exit;
         if (!@file_get_contents($wsdlURL)) {
             throw new SoapFault('Server', 'No WSDL found at ' . $wsdlURL);
         }
         $soap = new SoapClient($wsdlURL);
         //$soap->xml_encoding = 'UTF-8';
         //$client = new SoapClient($ws, array('proxy_host'     => "113.140.8.202",
         //'proxy_port'     => 9682));
         /*} catch ( Exception $e ) {
         		return "Linkerror";*/
     } catch (SoapFault $fault) {
         //return "Fault! code:".",".$fault->faultcode.", string: ".",".$fault->faultstring;exit;
         MooMessage("驗證失敗,請您重新驗證@!", "index.php?n=myaccount&h=smsindex", '01');
     }
     //var_dump ( $soap->__getTypes () );
     //todo 加密數據
     $partner = $DES->encrypt($partner);
     $partnerPW = $DES->encrypt($partnerPW);
     $type = $DES->encrypt($this->type);
     //先將中文轉碼
     $param = mb_convert_encoding($param, "GBK", "UTF-8");
     $param = $DES->encrypt($param);
     $params = array("userName_" => $partner, "password_" => $partnerPW, "type_" => $type, "param_" => $param);
     //請求查詢
     $data = $soap->querySingle($params);
     // todo 解密數據
     $resultXML = $DES->decrypt($data->querySingleReturn);
     $resultXML = mb_convert_encoding($resultXML, "UTF-8", "GBK");
     return $resultXML;
 }
開發者ID:noikiy,項目名稱:zays,代碼行數:43,代碼來源:SynPlatAPI.php

示例4: index_index

function index_index()
{
    global $_MooClass, $dbTablePre, $userid, $memcached;
    $uid = MooGetGPC('uid', 'integer');
    $puid = MooGetGPC('puid', 'integer');
    if (!$uid) {
        if (!$userid) {
            MooMessage('沒有找到此會員', 'register.html');
        } else {
            MooMessage('沒有找到此會員', 'index.php?n=search');
        }
    }
    if (MOOPHP_ALLOW_FASTDB) {
        $user = MooFastdbGet('members', 'uid', $uid);
        $user = array_merge($user, MooFastdbGet('memberfield', 'uid', $uid));
        $c = MooFastdbGet('choice', 'uid', $uid);
    } else {
        $user = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}members where uid='{$uid}'");
        $user2 = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}memberfield where uid='{$uid}'");
        $user = array_merge($user, $user2);
        unset($user2);
        $c = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}choice as mf WHERE uid='{$uid}'");
    }
    //$tuijian=$_MooClass['MooMySQL']->getAll("select * from {$dbTablePre}members where gender='$user[gender]' and is_vote='1' order by uid limit 7");
    $en_year = $user['birthyear'];
    $st_year = $en_year - 2;
    $en_year += 2;
    $sql_new = "SELECT uid,nickname,gender,birthyear,mainimg,images_ischeck FROM {$dbTablePre}members where birthyear between {$st_year} and {$en_year} and gender='{$user['gender']}' and images_ischeck=1 and is_lock=1 order by regdate desc limit 6";
    $tuijian = $_MooClass['MooMySQL']->getAll($sql_new);
    if (!$user) {
        if (!$userid) {
            MooMessage('沒有您查看的會員', 'register.html');
        } else {
            MooMessage('沒有您查看的會員', 'index.php?n=search');
        }
    } else {
        MooSetCookie('puid', $puid, time() + 3600, '');
        include MooTemplate('public/recommend_index', 'module');
    }
}
開發者ID:noikiy,項目名稱:zays,代碼行數:40,代碼來源:index.php

示例5: findPwd

function findPwd($method)
{
    global $_MooClass, $dbTablePre, $_MooCookie, $userid;
    //note 隻給用戶3次機會
    if ($method) {
        $_MooCookie['backpwdnum'] = $_MooCookie['backpwdnum'] ? $_MooCookie['backpwdnum'] : '';
        MooSetCookie('backpwdnum', $_MooCookie['backpwdnum'] + 1, 85400);
        if ($_MooCookie['backpwdnum'] >= 3) {
            MooMessage('您今天操作次數過多,請明天再試', 'index.php', '02');
        }
    }
    switch ($method) {
        case 1:
            $ToAddress = trim(MooGetGPC('email', 'string', 'P'));
            //查找用戶表,enky修改表名
            $userMsg = $_MooClass['MooMySQL']->getOne("select uid,username,password from {$dbTablePre}members_search where username='{$ToAddress}'", true);
            if ($userMsg) {
                //有此用戶
                //是否郵箱認證
                //$ifmail = $_MooClass['MooMySQL']->$_MooClass['MooMySQL']->getOne("select telphone from {$dbTablePre}certification where uid='{$userMsg['uid']}'");
                //沒認證
                //if(!$ifmail['telphone']){
                $email = $userMsg['username'];
                $password = $userMsg['password'];
                $ToAddressMd5 = md5($ToAddress . '+' . $password);
                //email和密碼的md5
                $QueryString = base64_encode($ToAddress . '|' . $ToAddressMd5 . '|' . time());
                //url後的查詢字符串
                //$sql = "insert into ". $dbTablePre ."reset_password set username = '". $ToAddress ."'";
                $sql = "insert into " . $dbTablePre . "reset_password set username = '" . $QueryString . "'";
                $_MooClass['MooMySQL']->query($sql);
                //記錄數據庫
                $ToSubject = '真愛一生網提示:修改您的密碼';
                //note 發送郵件
                if ($userMsg['nickname']) {
                    $ToBody = $userMsg['nickname'] . ':您好!<br>';
                } else {
                    $ToBody = 'ID為' . $userMsg['uid'] . '會員:您好!<br>';
                }
                $ToBody .= "&nbsp;&nbsp;&nbsp;&nbsp;因您在真愛一生網使用了找回密碼功能,如果您忘記密碼,請點擊以下鏈接到真愛一生網,修改您的密碼。";
                $ToBody .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;提示:請在24小時內登陸真愛一生網,並在登陸後將密碼修改為您容易記住的密碼,如果您沒有操作,無需理會此郵件。';
                $ToBody .= "點擊此鏈接修改密碼:<a href='http://" . MOOPHP_HOST . "/index.php?n=myaccount&h=resetpwd&p=" . $QueryString . "'>http://" . MOOPHP_HOST . "/index.php?n=myaccount&h=resetpwd&p=" . $QueryString . "</a>";
                if (sendMailByNow($ToAddress, $ToSubject, $ToBody)) {
                    MooMessage('修改密碼地址已發送至郵箱,請盡快登錄郵箱操作。', 'index.php');
                } else {
                    MooMessage('數據操作失敗,請重新找回密碼', 'index.php?n=login&h=backpassword', '01');
                }
                //}
            } else {
                MooMessage('無此郵箱的會員', 'index.php?n=login&h=backpassword', '01');
            }
            break;
        case 2:
            //$umail = MooGetGPC('umail','string','P');
            $phone = MooGetGPC('phone', 'string', 'P');
            //判斷手機號碼是否符合規範
            if (!preg_match('/^((1[35][\\d]{9})|(18[4689][\\d]{8}))$/', $phone)) {
                MooMessage('您的手機號碼不正確', 'index.php?n=login&h=backpassword', '01');
            } else {
                //查找用戶表
                $userMsg = $_MooClass['MooMySQL']->getOne("select m.telphone,m.uid,m.nickname from {$dbTablePre}members_search as m left join {$dbTablePre}certification as c on m.uid=c.uid where m.telphone='{$phone}' and m.is_lock = 1 limit 1", true);
                if (!$userMsg) {
                    MooMessage('無使用此手機號碼或綁定不正確', 'index.php?n=login&h=backpassword', '01');
                } elseif ($userMsg['telphone'] == $phone) {
                    //改為新密碼
                    $newpwd = changePWD($userMsg['uid']);
                    //發手機消息
                    if ($newpwd) {
                        $content = "您的新密碼是:" . $newpwd . ",請妥善保管好您的帳號和密碼!";
                        //$re = siooSendMsg($phone,$content);//希希奧信息發送手機短信接口
                        if (SendMsg($phone, $content, 1)) {
                            $time = time();
                            $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}smslog_sys (id,sid,uid,content,sendtime,type) values('','','{$userid}','重置密碼','{$time}','重置密碼')");
                        }
                        MooMessage('您好!新密碼已發送至您的手機,轉到登陸頁麵', 'index.php?n=login');
                    } else {
                        MooMessage('找回密碼失敗', 'index.php?n=login&h=backpassword', '01');
                    }
                } else {
                    MooMessage('您的手機號碼未通過驗證,請用郵件方式取回密碼', 'index.php?n=login&h=backpassword', '01');
                }
            }
            break;
    }
}
開發者ID:noikiy,項目名稱:zays,代碼行數:85,代碼來源:index.php

示例6: service_register


//.........這裏部分代碼省略.........
                                                                        } else {
                                                                            if ($channel == 31) {
                                                                                // 免費
                                                                                $url = 'index.php?n=payment&h=channel_dusk';
                                                                            } else {
                                                                                if ($channel == 32) {
                                                                                    //
                                                                                    if ($user_arr['gender'] == 1) {
                                                                                        $url = 'index.php?n=activity&h=rlsl';
                                                                                    } else {
                                                                                        $url = 'index.php?n=payment&h=channel_rlsl';
                                                                                    }
                                                                                } else {
                                                                                    $url = 'index.php?n=payment&h=diamond';
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        MooMessage("您已成功報名參加活動!", $url, '03');
    } elseif ($user_arr['s_cid'] == '30' || $user_arr['s_cid'] == '20' || $user_arr['s_cid'] == '10') {
        //鑽石高級會員轉向 聯係真愛一生 提示
        $username = $user_arr['username'];
        $gender = $user_arr['gender'];
        $barr = explode('-', $user_arr['birth']);
        //birth modify
        $birthmonth = $barr[1];
        $birthmonth = empty($birthmonth) ? '' : $birthmonth;
        $birthday = $user_arr['birthyear'] . '-' . $birthmonth;
        $workprovince = $user_arr['province'];
        $workcity = $user_arr['city'];
        $mobile = $user_arr['telphone'];
        if ($channel == '2') {
            $_MooClass['MooMySQL']->query("insert into web_ahtv(ip,uid,regnum,action,operationtime,channel) values('{$ip}','{$userid}',1,2,'{$date}','2')");
            $user = $_MooClass['MooMySQL']->getOne("select id from web_ahtv_reguser where uid={$userid} and channel='2'", true);
            if (empty($user['id'])) {
                $_MooClass['MooMySQL']->query("insert into web_ahtv_reguser(uid,username,gender,birthday,province,city,mobile,regtime,channel) values('{$userid}','{$username}','{$gender}','{$birthday}','{$workprovince}','{$workcity}','{$mobile}','{$date}','2')");
            }
        } elseif ($channel == '3') {
            $_MooClass['MooMySQL']->query("insert into web_ahtv(ip,uid,regnum,action,operationtime,channel) values('{$ip}','{$userid}',1,2,'{$date}','3')");
            $user = $_MooClass['MooMySQL']->getOne("select id from web_ahtv_reguser where uid={$userid} and channel='3'", true);
            if (empty($user['id'])) {
                $_MooClass['MooMySQL']->query("insert into web_ahtv_reguser(uid,username,gender,birthday,province,city,mobile,regtime,channel) values('{$userid}','{$username}','{$gender}','{$birthday}','{$workprovince}','{$workcity}','{$mobile}','{$date}','3')");
            }
        } elseif ($channel == '4') {
            $_MooClass['MooMySQL']->query("insert into web_ahtv(ip,uid,regnum,action,operationtime,channel) values('{$ip}','{$userid}',1,2,'{$date}','4')");
            $user = $_MooClass['MooMySQL']->getOne("select id from web_ahtv_reguser where uid={$userid} and channel='4'", true);
            if (empty($user['id'])) {
                $_MooClass['MooMySQL']->query("insert into web_ahtv_reguser(uid,username,gender,birthday,province,city,mobile,regtime,channel) values('{$userid}','{$username}','{$gender}','{$birthday}','{$workprovince}','{$workcity}','{$mobile}','{$date}','4')");
            }
        } elseif ($channel == '5') {
            $_MooClass['MooMySQL']->query("insert into web_ahtv(ip,uid,regnum,action,operationtime,channel) values('{$ip}','{$userid}',1,2,'{$date}','5')");
開發者ID:noikiy,項目名稱:zays,代碼行數:67,代碼來源:index.php

示例7: black_member

function black_member()
{
    global $_MooClass, $dbTablePre, $timestamp, $user_arr;
    $is_action = MooGetGPC("is_post", "string", 'G');
    if ($is_action == "add") {
        $black_uid = MooGetGPC("black_uid", 'integer', 'P');
        $uid = 0;
        if ($user_arr['uid'] != $black_uid) {
            if ($black_uid) {
                $uid = $_MooClass['MooMySQL']->getOne("SELECT uid FROM {$dbTablePre}members_search WHERE uid='{$black_uid}' LIMIT 1 ", true);
                $uid = $uid['uid'];
                if (empty($uid)) {
                    $msg = '沒有此會員,請確保您輸入的會員ID存在。';
                }
            } else {
                $msg = '請輸入您要加入黑名單的會員ID';
            }
            if ($uid) {
                $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}screen set uid='{$user_arr['uid']}',mid='{$black_uid}'");
                $msg = '成功將會員(ID:' . $uid . ')加入黑名單。';
            }
        } else {
            $msg = '您不能將自己加到黑名單!';
        }
        MooMessage($msg, 'index.php?n=service&h=black');
    }
    if ($is_action == "delblack") {
        $del_id_arr = MooGetGPC('id', 'string', 'P');
        if (empty($del_id_arr)) {
            MooMessage('請選擇要刪除的內容', 'javascript:history.go(-1);');
        }
        if (!empty($del_id_arr)) {
            $del_id_list = implode(',', $del_id_arr);
            $sql = "DELETE FROM {$dbTablePre}screen WHERE mid IN({$del_id_list})";
            $_MooClass['MooMySQL']->query($sql);
        }
        MooMessage("刪除成功", 'index.php?n=service&h=black', '05');
    }
    $pagesize = 4;
    //note 獲得當前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    //note 獲得第幾頁
    $page = empty($_GET['page']) ? 1 : $_GET['page'];
    //note limit查詢開始位置
    $start = ($page - 1) * $pagesize;
    $query = $_MooClass['MooMySQL']->getOne("SELECT count(1) as c FROM {$dbTablePre}screen where uid='{$user_arr['uid']}'");
    $total = $query['c'];
    $sql = "SELECT * FROM {$dbTablePre}screen where uid='{$user_arr['uid']}' LIMIT {$start},{$pagesize}";
    $black_uid = $_MooClass['MooMySQL']->getAll($sql);
    $page_list = multimail($total, $pagesize, $page, $currenturl2);
    require MooTemplate('public/service_black_list', 'module');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:53,代碼來源:index.php

示例8: material_imgedit

function material_imgedit()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr;
    $cache_file = './data/cache/cache_imgedit.php';
    $path = './data/iparts/vs/';
    $cache_iparts = get_imgedit_cache($cache_file, $path);
    $imageName = trim($_GET['imageName']);
    if (MOOPHP_ALLOW_FASTDB) {
        $usercer = MooFastdbGet('certification', 'uid', $userid);
    } else {
        $usercer = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}certification WHERE uid='{$userid}' LIMIT 1 ", true);
    }
    $sql = "select `imgurl`,`pic_date`,`pic_name` from `{$dbTablePre}pic` where `uid` = '{$userid}' AND `isimage` = '0' order by imgid desc";
    $image_list = $_MooClass['MooMySQL']->getAll($sql, 0, 0, 0, true);
    if (!file_exists(base64_decode($imageName))) {
        $temp_k = rand(0, sizeof($image_list) - 1);
        $imageName = base64_encode($image_list[$temp_k]['imgurl']);
    }
    if (empty($imageName)) {
        MooMessage("您的相冊裏還沒有上傳照片,趕快去上傳自己的圖片吧。", 'index.php?n=material&h=show');
    }
    $imageName .= '&rand=' . rand(111111, 999999);
    //echo 'index.php?n=material&h=getimg&imageName='.$imageName;exit;
    include MooTemplate('public/material_imgedit', 'module');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:25,代碼來源:index.php

示例9: lovestyle_result

function lovestyle_result()
{
    global $userid, $tc_id_arr;
    //preg_match("/&h=(.*)/i",$_SERVER['HTTP_REFERER'],$harr);
    $tcid = MooGetGPC('tcid', 'integer', 'G');
    $tcid--;
    if ($tcid < 0) {
        $tcid = 0;
    }
    if ($tcid >= sizeof($tc_id_arr)) {
        $tcid = sizeof($tc_id_arr) - 1;
    }
    $tc_id = $tc_id_arr[$tcid];
    $test_info = $result_id = array();
    $table = $GLOBALS['dbTablePre'] . 'test_member';
    $test_sql = "SELECT `scores_count`,`ctype`,`result_id` FROM {$GLOBALS['dbTablePre']}test_member \n\t\tWHERE `uid`='{$userid}' AND `tc_id`='{$tc_id}' ";
    $test_info = $GLOBALS['_MooClass']['MooMySQL']->getAll($test_sql);
    if (empty($test_info)) {
        set_info_vote($tc_id);
        $test_info = $GLOBALS['_MooClass']['MooMySQL']->getAll($test_sql);
    }
    if (empty($test_info)) {
        MooMessage("請完成測試再來查看結果。", 'index.php?n=lovestyle');
    }
    //print_r($test_info);
    //note 綜合評測結果 tc_id === ctype 雖然我不知道有什麽好處,但是也沒有壞處 ps:dsk
    foreach ($test_info as $ti) {
        $result_id[] = $ti['result_id'];
        if ($tc_id == $ti['ctype']) {
            $scores_count = $ti['scores_count'];
        }
        //測試總分
    }
    $result_id = implode(',', $result_id);
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}test_result WHERE `id` IN ({$result_id})";
    $my_result = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    $results = array();
    foreach ($my_result as $k => $v) {
        //結果如果需要段落顯示可以按照 '<br />'拆分 參考後台添加測試結果
        $results[$v['rtype']] = array('ctypename' => $v['ctypename'], 'result' => $v['result']);
    }
    //print_r($results);
    include MooTemplate('public/lovestyle_result_' . ++$tcid, 'module');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:44,代碼來源:index.php

示例10: register_stepfive

function register_stepfive()
{
    global $_MooClass, $dbTablePre, $uid, $user_arr;
    $userinfo = MooMembersData($uid);
    if (MooSubmit('register_submitfive')) {
        $search_base5 = getMemberfield();
        $members_search5 = isset($search_base5["search"]) ? $search_base5["search"] : array();
        $members_base5 = isset($search_base5["base"]) ? $search_base5["base"] : array();
        $where_arr = array('uid' => $uid);
        if (!empty($members_search5)) {
            updatetable('members_search', $members_search5, $where_arr);
            if (MOOPHP_ALLOW_FASTDB) {
                MooFastdbUpdate('members_search', 'uid', $uid, $members_search5);
            }
        }
        if (!empty($members_base5)) {
            updatetable('members_base', $members_base5, $where_arr);
            if (MOOPHP_ALLOW_FASTDB) {
                MooFastdbUpdate('members_base', 'uid', $uid, $members_base5);
            }
        }
        MooMessage("您已經完成了您的資料填寫,請盡快進入我的帳戶完成您的認證!", "index.php?n=service");
    }
    include MooTemplate('public/register_stepfive', 'module');
}
開發者ID:noikiy,項目名稱:zays,代碼行數:25,代碼來源:index.php

示例11: register_shutdown_function

//note 加載框架
require 'framwork/MooPHP.php';
//如果腳本中斷,關閉數據庫連接
register_shutdown_function(array($_MooClass['MooMySQL'], 'close'));
//允許的方法
$names = array('login', 'index', 'register', 'lostpasswd', 'inputpwd', 'myaccount', 'viewspace', 'relatekw', 'ajax', 'seccode', 'sendmail', 'material', 'search', 'service', 'payment', 'safetyguide', 'lovestyle', 'loveing', 'story', 'about', 'return', 'invite', 'vote', 'profile', 'recommend', 'crontab', 'pop', 'clinic', 'space', 'hnintro', 'cooperation', 'video', 'events', 'chat', 'andriod', 'lovestation');
//獲取推廣參數
// MooGetFromwhere();
$MooUid = 0;
//用戶信息
MooUserInfo();
$user_arr = $user = UserInfo();
$uid = $userid = $MooUid;
//模塊判斷
if (!in_array($name, $names)) {
    MooMessage('沒有這個頁麵', 'index.php', '01');
}
//偽造遊客用戶數據
if (empty($user_arr)) {
    $user_arr['uid'] = 0;
    $user_arr['gender'] = 0;
    $user_arr['birthyear'] = date("Y") - 26;
    //默認26歲
    $user_arr['province'] = 0;
    $user_arr['city'] = 0;
}
//時間相關
if ($uid) {
    //更新COOKIE 成活時間
    MooUpateCookie($uid);
    $new_email_num = header_show_total($uid);
開發者ID:noikiy,項目名稱:zays,代碼行數:31,代碼來源:index.php

示例12: MooTemplate

/**
* 加載模板
* @param string $path - 模板文件路徑 (包含皮膚目錄和文件名) 如: default/na 
* @param string $type - 模板類型 {module:module裏模塊模板;public:public下的公共模板;data:data下的用戶定製模板}
* @return string 返回編譯後模板的係統絕對路徑
*/
function MooTemplate($path, $type)
{
    switch ($type) {
        case 'module':
            $tpl_path = MOOPHP_TEMPLATE_DIR . '/' . $path . '.htm';
            //aaa.htm
            break;
        case 'public':
            $tpl_path = 'public/' . $path . '.htm';
            break;
        case 'data':
            $path = substr($GLOBALS['style_uid'], -1) . '/' . $GLOBALS['style_uid'] . '/' . $GLOBALS['style_uid'] . '_' . $path;
            $tpl_path = 'data/diamond/' . $path . '.htm';
            if (!file_exists($tpl_path)) {
                MooMessage('您訪問的頁麵不存在');
                exit;
            }
            break;
        default:
            exit('$type error');
    }
    $php_path = MOOPHP_DATA_DIR . '/templates/' . $type . '/' . $path . '.tpl.php';
    if (!file_exists($php_path) || filemtime($tpl_path) > filemtime($php_path)) {
        //note 加載模板類文件
        $T = MooAutoLoad('MooTemplate');
        $T->complie($tpl_path, $php_path);
    }
    return $php_path;
}
開發者ID:noikiy,項目名稱:zays,代碼行數:35,代碼來源:MooPHP.php

示例13: sendnewleer


//.........這裏部分代碼省略.........
            fulllog($user_arr['uid'], $serverid, $action, $res);
        }
        //頭像路徑
        $path = thumbImgPath(2, $send_user_info['pic_date'], $send_user_info['pic_name']);
        if (file_exists($path)) {
            $img_path = $path;
        } else {
            if ($send_user_info['gender'] == 1) {
                $img_path = "/public/images/service_nopic_woman.gif";
            } else {
                $img_path = "/public/images/service_nopic_man.gif";
            }
        }
        $send_username = $send_user_info['nickname'] ? $send_user_info['nickname'] : $send_user_info['uid'];
        //發送者用戶名
        $send_user_grade = $send_user_info['gender'] == 1 ? "女" : "男";
        //發送者性別
        $province = $send_user_info['province'] ? $provice_list[$send_user_info['province']] : '';
        //省
        $city = $send_user_info['city'] ? $city_list[$send_user_info['city']] : '';
        //市
        $height = $send_user_info['height'] ? $height_list[$send_user_info['height']] : "未知";
        //身高
        ob_start();
        $body = ob_get_clean();
        if ($res['usertype'] != 3) {
            MooSendMail($res['username'], "真愛一生網係統溫馨提示", $body, "", false, $sendtoid);
        }
        //每天向同一用戶發送多次,短信記錄數表隻記一次
        $send_leer_date = isset($leer['sendtime']) ? date("Y-m-d", $leer['sendtime']) : date("Y-m-d");
        //
        $today_leer_count = isset($leer['lid']) ? $leer['num'] + 1 : 1;
        if (date("Y-m-d") > $send_leer_date) {
            $today_leer_count = 1;
            $return = "您今天已向該會員發送一次秋波";
            echo return_data($return);
            exit;
        }
        $sendinfo = MooGetGPC('sendleerinfo', 'string', 'P');
        if (!empty($sendinfo)) {
            $sendinfo = "對您說:" . $sendinfo;
        }
        if ($res['usertype'] != 3) {
            //全權會員不發送短信和彩信
            if ($serverid) {
                //如果是客服模擬登錄
                $SMStype = MooGetGPC('selectSMSorCMS', 'string', 'P');
                if ($SMStype == 'SMS' && $res['is_phone']) {
                    // SendMsg($res['telphone'],"真愛一生網 用戶ID:".$userid.",".$send_user_grade.",已給您發送秋波,".$sendinfo."   請及時把握您的緣分!4006780405");
                    Push_message_intab($sendtoid, $res['telphone'], "秋波", "真愛一生網 用戶ID:" . $userid . "," . $send_user_grade . ",已給您發送秋波," . $sendinfo . "  請及時把握您的緣分!4006780405", $userid);
                } elseif ($SMStype == 'CMS' && $res['is_phone']) {
                    //====發送彩信   begin  ====
                    //發送人有照片
                    $sql = "SELECT uid,telphone FROM {$dbTablePre}members_search where uid='{$userid}' and images_ischeck=1 and pic_num>0";
                    $sendfrom_user_info = $_MooClass['MooMySQL']->getOne($sql, true);
                    if ($sendfrom_user_info['uid']) {
                        $sendedMMSCount = $memcached->get('hznsimulate' . $serverid);
                        if (empty($sendedMMSCount)) {
                            $sendedMMSCount = 0;
                        }
                        if ($sendedMMSCount > 10) {
                            MooMessage('您今天累計已經發過10條彩信', 'index.php?n=service');
                        }
                        send_mms_commission($res['telphone'], 'leer', $userid);
                        $memcached->set('hznsimulate' . $serverid, ++$sendedMMSCount, 0, 28800);
                    }
                    //====發送彩信 end =====
                }
            } else {
                //會員真實登錄
                if ($res['is_phone'] && $is_first_send && $res['s_cid'] != 40) {
                    //第一次發送秋波才發短信提示
                    Push_message_intab($sendtoid, $res['telphone'], "秋波", "真愛一生網 用戶ID:" . $userid . "," . $send_user_grade . ",已給您發送秋波," . $sendinfo . "  請及時把握您的緣分!4006780405", $userid);
                }
            }
        }
        //提醒所屬客服
        $sid = $user_arr['sid'];
        $title = '您的會員 ' . $user_arr['uid'] . ' 向 ' . $sendtoid . ' 發送了秋波';
        $awoketime = $timestamp + 3600;
        $sql_remark = "insert into {$dbTablePre}admin_remark set sid='{$sid}',title='{$title}',content='{$title}',awoketime='{$awoketime}',dateline='{$timestamp}'";
        $res = $_MooClass['MooMySQL']->query($sql_remark);
        $users =& $res;
        $return = "發送秋波成功";
        echo return_data($return);
        exit;
        MooMessage('發送秋波成功', "index.php?n=service&h=leer&t=sendnewleer&sendtoid={$sendtoid}");
    } else {
        if ($user_arr['gender'] == 0) {
            //boy
            $sql = "SELECT id,content  FROM {$dbTablePre}members_sendinfo where type=2 and isShow=1";
        } else {
            //girl
            $sql = "SELECT id,content  FROM {$dbTablePre}members_sendinfo where type=1 and isShow=1";
        }
        $sendinfo = $_MooClass['MooMySQL']->getAll($sql);
        echo return_data($sendinfo);
        exit;
    }
}
開發者ID:noikiy,項目名稱:zays,代碼行數:101,代碼來源:leer.php

示例14: login_submit

/**
 * 登錄表單處理
 * 描述:
 */
function login_submit()
{
    global $_MooClass, $dbTablePre, $_MooCookie;
    //noet 對提交的數據過濾
    if ($_POST) {
        $username = trim($_POST['username']);
        $md5_password = md5($_POST['password']);
        $cookietime = intval(isset($_POST['cookietime']) ? $_POST['cookietime'] : '');
        $remember_username = MooGetGPC('remember', 'integer', 'P');
    }
    /*****設置回轉的頁麵*****/
    $returnurl = MooGetGPC('returnurl', 'string', "P");
    //echo $returnurl;
    //exit;
    //note 要填寫用戶和密碼
    if (empty($_POST['username']) && empty($_POST['password'])) {
        //note 轉至郵箱驗證頁
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("請填寫用戶名和密碼", "{$returnurl}", '03');
        } else {
            MooMessage("請填寫用戶名和密碼", "index.php?n=login", '03');
        }
        exit;
    }
    //note 用戶名不能為空
    if (empty($_POST['username'])) {
        //note 轉至郵箱驗證頁
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("用戶名不能為空", "{$returnurl}", '03');
        } else {
            MooMessage("用戶名不能為空", "index.php?n=login", '03');
        }
        exit;
    }
    //note 密碼不能為空
    if (empty($_POST['password'])) {
        //note 轉至郵箱驗證頁
        if ($returnurl) {
            $returnurl = $returnurl;
            MooMessage("密碼不能為空", "{$returnurl}", '03');
        } else {
            MooMessage("密碼不能為空", "index.php?n=login", '03');
        }
        exit;
    }
    $userid = 0;
    $sp = searchApi('members_man members_women');
    $limit = array(0, 1);
    //note 驗證用戶名,密碼     enky
    if (is_numeric($username)) {
        if (strlen($username) == 11) {
            //判斷手機號是否存在
            $filter = array();
            $filter[] = array('telphone', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        if (!$userid) {
            //判斷uid是否存在
            $filter = array();
            $filter[] = array('@id', $username);
            if ($sp->getResultOfReset($filter, $limit)) {
                $ids = $sp->getIds();
                if (isset($ids[0])) {
                    $userid = $ids[0];
                }
            }
        }
        if (!$userid) {
            if ($user_one = $_MooClass['MooMySQL']->getOne("SELECT uid from `{$dbTablePre}members_base` where qq='{$username}'")) {
                $userid = $user_one['uid'];
            }
        }
        /*if(strlen($username)==11){
        		   $sql_where = " s.telphone='{$username}'";
                   $user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        		}else{
        			$sql_where = " s.uid = '{$username}'";
        			$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        			if(empty($user)){
        			   $sql_where = "b.qq='{$username}'";
        			   //$user = $_MooClass['MooMySQL']->getOne("SELECT a.uid,username,password,birthyear,gender,province,city,automatic,is_lock,is_awoke,sid,last_login_time,lastip FROM `{$dbTablePre}members` a ,`{$dbTablePre}memberfield` b WHERE a.uid=b.uid and $sql_where");
        				$user = $_MooClass['MooMySQL']->getOne("SELECT s.uid,s.username,s.password,s.birthyear,s.gender,s.province,s.city,b.automatic,s.is_lock,b.is_awoke,s.sid,l.last_login_time,l.lastip FROM `{$dbTablePre}members_search` as s left join `{$dbTablePre}members_base` as b on s.uid=b.uid left join `{$dbTablePre}members_login` as l on s.uid=l.uid   WHERE $sql_where");
        			}
        		}*/
    } else {
        $filter = array();
        $filter[] = array('username', $username);
        if ($sp->getResultOfReset($filter, $limit)) {
            $ids = $sp->getIds();
//.........這裏部分代碼省略.........
開發者ID:noikiy,項目名稱:zays,代碼行數:101,代碼來源:testindex.php

示例15: about_clinic_add

function about_clinic_add()
{
    global $timestamp, $user_arr, $arr_clinic_type;
    //print_r($user_arr);exit;
    if ($_POST) {
        $date = array();
        $date['type'] = MooGetGPC('clinictype', 'integer', 'P');
        $date['uid'] = $user_arr['uid'];
        $date['title'] = safeFilter(MooGetGPC('title', 'string', 'P'));
        $date['question'] = safeFilter(MooGetGPC('clinic', 'string', 'P'));
        $date['add_time'] = $timestamp;
        $sql = "SELECT sort FROM {$GLOBALS['dbTablePre']}love_clinic WHERE type = {$date['type']} ORDER BY sort DESC LIMIT 0,1";
        $ret = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
        $date['sort'] = ++$ret['sort'];
        inserttable('love_clinic', $date);
        MooMessage("您的情感問題已經提交成功,真愛一生情感專家會在24小時內解決您的問題。\n感謝您對真愛一生網的信任與支持。", "index.php?n=about&h=clinic", '03');
    }
}
開發者ID:noikiy,項目名稱:zays,代碼行數:18,代碼來源:index.php


注:本文中的MooMessage函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。