public function index()
 {
     //进入后就调用acctoken方法 确保 acctoken够新  --相当于人员进入登录的时候都会对accesstoken刷新一次
     // 如果缓存有accesstoken  则取缓存
     $acctokenModel = M("accesstoken");
     $acctokenModel->getaccesstoken();
     //优先判断进入方式  是否为auth2.0进入网页
     if (isset($_GET["code"])) {
         //表示为auth2.0进入  通过code获得userid
         $backArr = WEIXINURL::getuseridbycode($_GET["code"]);
         if (isset($backArr['userid'])) {
             //				成功取得useid
             $userid = $backArr['userid'];
         } else {
             //				失败再次刷新地址
             jumpurl($this->authurl);
         }
         //将userid存入cookie
         setcookie("klbweixinuserid", $userid, time() + 3600 * 24 * 7);
     }
     if (!isset($userid)) {
         //判断是否存在cookie
         if (isset($_COOKIE["klbweixinuserid"])) {
             $userid = $_COOKIE['klbweixinuserid'];
         } else {
             jumpurl($this->authurl);
             exit;
         }
     }
     //通过userid去user的信息
     $backArr = WEIXINURL::getuserinfobyuserid($userid);
     if ($backArr["errcode"] == "0" && $backArr["errmsg"] == "ok") {
         $usercode = $backArr["extattr"]["attrs"][0]["value"] != "" ? $backArr["extattr"]["attrs"][0]["value"] : "为空";
         VIEW::assign(array('username' => $backArr["name"], 'usercode' => $usercode, 'avatarimg' => $backArr["avatar"]));
         setcookie("klbweixinusername", $backArr["name"], time() + 3600 * 24 * 7);
         setcookie("klbweixinusercode", $usercode, time() + 3600 * 24 * 7);
     } else {
         echo "获取人员信息失败" . $backArr["errcode"] . $backArr["errmsg"];
         exit;
     }
     //到此步已经确定具备userid
     //第一步是判断用户是否已经设置了密码
     $authobj = M('auth');
     if ($authobj->checkauth($userid, '') == "") {
         //空密码
         //注册变量填充模版
         VIEW::assign(array('visable' => ''));
         VIEW::assign(array('title' => '确认'));
     } else {
         //非空密码
         VIEW::assign(array('visable' => ' uk-hidden '));
         VIEW::assign(array('title' => '登录'));
     }
     setcookie("klbweixinusersessionid", session_id(), time() + 3600 * 24);
     VIEW::display('index.html');
 }
Example #2
0
            $catid = array_pop($tcatidarr);
            $jump = 'no';
            if (!empty($tcatidarr)) {
                //保存到临时文件下,用于跳转
                $jump = 'yes';
                $cachefile = S_ROOT . './data/temp/catid.cache.php';
                $text = '$tcatidarr = ' . arrayeval($tcatidarr) . ';';
                writefile($cachefile, $text, 'php');
            }
            updatehtmlpathcache();
            $_SGLOBAL['db']->query("DELETE FROM " . tname('spacepages') . " WHERE catid='{$catid}'");
            $query = $_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('spaceitems') . " WHERE catid='{$catid}'");
            $countnum = $_SGLOBAL['db']->result($query, 0);
            $nexturl = CPURL . '?action=makehtml&op=makecathtml&perlisthtml=' . $perlisthtml . '&catid=' . $catid . '&total=' . $countnum . '&jump=' . $jump;
            echo '<table style="width:98%;padding:0.2em;border: 1px solid #698CC3;font-size:14px;font-weight:bold;font-family: Trebuchet MS, Lucida Console, Lucida Sans, sans-serif;" align="center"><tr><td><a href=' . $nexturl . '>' . $alang['making_page_info_0'] . $batch_makehtml_count . $alang['making_page_info_1'] . '0 / ' . $perlisthtml . $alang['making_page_info_2'] . '</a></td><td width="35%"><a href="' . $theurl . '&op=make">' . $alang['making_page_info_3'] . '</a></td></tr></table>';
            jumpurl($nexturl, 1);
            exit;
        }
        showmessage('make_html_success', $theurl);
    }
} elseif ($op == 'updatehtml') {
    include_once S_ROOT . '/data/temp/catidarr.cache.php';
    //处理对应的分类block内容
    //静态变量, 在跳转中减少查询
    static $cnewnews, $chotnews, $chotnews2, $cnewcomments, $cpicnews, $csubarr;
    $newidarr = array();
    $itemidstr = '';
    if (!empty($catidarr) && is_array($catidarr)) {
        foreach ($catidarr as $catid => $itemidarr) {
            $query = $_SGLOBAL['db']->query('SELECT f.*, ff.name AS upname FROM ' . tname('categories') . ' f LEFT JOIN ' . tname('categories') . ' ff ON ff.catid=f.upid WHERE f.catid=\'' . $catid . '\'');
            $thecat = $_SGLOBAL['db']->fetch_array($query);
Example #3
0
                    //PER NUM
                    showprogress($alang['robot_robot_next_message'] . ' (' . $thevalue['pernum'] . ')', 1);
                    showprogress('<a href="' . $theurl . '&op=robot&robotid=' . $_GET['robotid'] . '&lpage=' . $lpage . '&mpage=' . $mpage . '&mnum=' . $mnum . '&status=' . $status . '"><b>' . $alang['robot_progress_next_list'] . "</b></a>", 1);
                    include_once template('admin/tpl/footer.htm', 1);
                    jumpurl($theurl . '&op=robot&robotid=' . $_GET['robotid'] . '&lpage=' . $lpage . '&mpage=' . $mpage . '&mnum=' . $mnum . '&status=' . $status, 1);
                }
            }
        } else {
            $lpage++;
            if ($lpage < count($listurlarr)) {
                $mpage = 0;
                //LIST NUM
                showprogress($alang['robot_robot_next_list']);
                showprogress('<a href="' . $theurl . '&op=robot&robotid=' . $_GET['robotid'] . '&lpage=' . $lpage . '&mpage=' . $mpage . '&mnum=' . $mnum . '&status=' . $status . '"><b>' . $alang['robot_progress_next_list'] . "</b></a>", 1);
                include_once template('admin/tpl/footer.htm', 1);
                jumpurl($theurl . '&op=robot&robotid=' . $_GET['robotid'] . '&lpage=' . $lpage . '&mpage=' . $mpage . '&mnum=' . $mnum . '&status=' . $status, 1);
            }
        }
    } else {
        showprogress($alang['robot_robot_url_error'], 1);
    }
    showprogress('<a href="' . CPURL . '?action=robotmessages&robotid=' . $_GET['robotid'] . '">' . $alang['robot_robot_result'] . '</a>', 1);
    $listarr = array();
    $thevalue = array();
    $importvalue = array();
} elseif ($_GET['op'] == 'clear') {
    delrobotmsg($_GET['robotid']);
    showmessage('robot_clear_success', $theurl);
} elseif ($_GET['op'] == 'export') {
    //ONE VIEW FOR UPDATE
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('robots') . ' WHERE robotid=\'' . $_GET['robotid'] . '\'');
Example #4
0
                $s[$val['goodsseller']] = $val['sendprice'];
            }
        } else {
            $s[$val['goodsseller']] = $val['sendprice'];
        }
    }
    $countdata = $Cart->countmoney($dataarray);
    //生成校验数据
    $ids = getdotstring($gids, 'int');
    $auth = $ids . "\t" . $countdata['totalmoney'];
    $paydata = cookie_authcode($auth, 'ENCODE');
    include template('payconfirm');
    //包含输出指定模板
} else {
    //处理提交信息
    @(list($ids, $totalmoney) = explode("\t", cookie_authcode($__PAYDATA, 'DECODE')));
    if ($ids == getdotstring($gids, 'int') and !empty($ids)) {
        $tempids = $ids;
    } else {
        exit(lang('Data_exception'));
    }
    //处理扣费和订单转移并且记录日志操作
    $info = $Cart->carttoorder($tempids);
    if ($info == 'OK') {
        print "<script language='javascript'>alert(" . lang('Submitted_successfully') . ");</script>";
        jumpurl(url("m.php"));
    } else {
        print "<script language='javascript'>alert('" . $info . "');</script>";
        jumpurl(url("m.php"));
    }
}
Example #5
0
        if (!empty($wherestr)) {
            $wheresql = implode(' AND ', $wherestr);
        }
        //条件汇总
        //获取当前页码
        $dataarray = $r->getdata("", $wheresql);
        //获取团购数据
    }
} elseif ($action == 'refund' && !empty($rid)) {
    $rid = GetNum($rid);
    if ($rid) {
        $recharge = new TableClass("rechargerecord", "rid");
        $row = $recharge->getone($rid);
        if (!empty($_POST)) {
            InitGP(array('money', 'remark'));
            //初始化变量全局返回
            $addarray = array('rechargeid' => $rid, 'uid' => $_USERS['uid'], 'uname' => $_USERS['uname'], 'money' => GetNum($money), 'remark' => Char_cv($remark), 'rechargetime' => $row['successtime'], 'rechargemoney' => $row['money'], 'rechargesn' => $row['sn'], 'addtime' => time());
            $info = $r->add($addarray);
            if (GetNum($info)) {
                print "<script language='javascript'>alert(" . lang('apply_success') . ");</script>";
                jumpurl(url('m.php?name=refundrecord'));
            } else {
                print "<script language='javascript'>alert(" . lang('apply_error') . ");</script>";
                jumpurl(url('m.php?name=refundrecord&action=refund&' . $rid));
            }
        }
    }
}
//print_r($dataarray);
include template('member_refundrecord');
//包含输出指定模板
Example #6
0
        $rightatypearray = $atypearray;
        $rightarticlearray = $articlearray;
    }
    include template('help');
    //包含输出指定模板
} elseif ($action == 'view') {
    $aid = GetNum($id);
    if (!empty($aid)) {
        $value = $articleobj->getone($aid);
        $i = 0;
        foreach ($articlearray as $r) {
            if ($r['typeid'] == $value['typeid']) {
                $articlelist[] = $r;
                if ($r['aid'] > $aid and $i == 0) {
                    $nextvalue = $r;
                    $i++;
                }
            }
        }
        foreach ($atypearray as $r) {
            if ($value['typeid'] == $r['typeid']) {
                $position = $r;
            }
        }
        include template('help_view');
        //包含输出指定模板
    } else {
        print "<script language='javascript'>alert(" . lang('Missing_parameter') . ");</script>";
        jumpurl(url('help.php'));
    }
}
Example #7
0
InitGP(array("action", "mid", "subject", "message", "page"));
//初始化变量全局返回
include_once INC_PATH . "/pm.class.php";
$pm = PmClass::init();
AjaxHead();
//禁止页面缓存
header("Content-type: text/html; charset=" . CHARSET);
if (empty($action)) {
    $dataarray = $pm->getall();
    //输出模板
    include template('member_pm');
    //包含输出指定模板
} elseif ($action == "view" and !empty($mid)) {
    $value = $pm->view($mid);
    //输出模板
    include template('member_pmview');
    //包含输出指定模板
} elseif ($action == "reply" and !empty($mid) and !empty($subject) and !empty($message)) {
    //回复短信给管理员
    $info = $pm->reply($mid, $subject, $message);
    if (GetNum($info)) {
        exit("<script language='javascript'>alert(" . lang('reply_success') . ");parent.art.dialog({id:'msgIframe'}).close();</script>");
    } else {
        exit("<script language='javascript'>alert(" . lang('Release_failed') . ");history.go(-1);</script>");
    }
} elseif ($action == "del" and !empty($mid)) {
    $pm->del($mid);
    print "<script language='javascript'>alert(" . lang('delete_success') . ");</script>";
    jumpurl(url('m.php?name=pm'));
}
//print_r($dataarray);
Example #8
0
            $info = $m->edit($uname, "", "", $password);
            if ($info == "OK") {
                include template('resetp_ok');
                //包含输出修改密码成功
                exit;
            } else {
                print "<script language='javascript'>alert('修改密码失败!请重试');history.go(-1);</script>";
                exit;
            }
        }
        if (empty($uname) || empty($activekey) || empty($email)) {
            print "<script language='javascript'>alert('链接已过期!');</script>";
            jumpurl(url("index.php"));
        } else {
            include template('resetp_newpass');
            //包含输出指定模板
        }
    } else {
        print "<script language='javascript'>alert('链接缺少参数!');</script>";
        jumpurl(url("index.php"));
    }
} elseif ($action == 'quit') {
    //退出登录
    //处理登录操作
    include INC_PATH . "/member.class.php";
    $m = new memberclass();
    $msg = $m->quit();
    print "<script language='javascript'>alert('退出成功!');</script>" . $m->ucsynlogin;
    jumpurl(url("index.php"));
    //showmessage("退出成功!".$m->ucsynlogin,"index.php",1);
}
Example #9
0
    InitGP(array("tname", "sex", "tel", "zip", "address", "qq", "msn", "country", "city", "oldface", "commit"));
    //初始化变量全局返回
    if (!empty($commit)) {
        //上传图片处理
        require_once INC_PATH . '/upload.class.php';
        $f = new Upload('attachment/avatar', array('gif', 'jpg', 'jpge', 'png'), 50000);
        //路径 允许扩展名 文件尺寸
        $f->setThumb(0);
        //设置不生成缩微图
        $f->run('faceimg', 1);
        $info = $f->getInfo();
        $imgdata = $info[0]['fullsavename'];
        //获取第一个上传图片反馈
        if (isset($info[0]['error'])) {
            $imgdata = $oldface;
        }
        $editarray = array("tname" => Char_cv($tname), "sex" => GetNum($sex), "tel" => GetNum($tel), "zip" => Char_cv($zip), "address" => Char_cv($address), "qq" => GetNum($qq), "msn" => Char_cv($msn), "country" => Char_cv($country), "face" => $imgdata, "city" => Char_cv($city));
        $msg = $m->edit($_USERS['uname'], '', $_USERS['password'], '', $editarray);
        if ($msg == "OK") {
            print "<script language='javascript'>alert(" . lang('update_success') . ");</script>";
            jumpurl(url('m.php?name=edituserinfo'));
        } else {
            print "<script language='javascript'>alert(" . lang('update_lose') . ");</script>";
            jumpurl(url('m.php?name=edituserinfo'));
        }
    } else {
        $value = $m->getone($_USERS['uname']);
    }
}
include template('member_edituserinfo');
//包含输出指定模板
    $freight = sprintf("%01.2f", $freight);
    $serverfee = sprintf("%01.2f", $serverfee);
    $deliveryrow['customs_fee'] = sprintf("%01.2f", $deliveryrow['customs_fee']);
    $addarray = array('uid' => $_USERS['uid'], 'uname' => $_USERS['uname'], 'email' => $_USERS['email'], 'oids' => $oids, 'couponid' => GetNum($couponid), 'freight' => GetNum($freight), 'serverfee' => $serverfee, 'customsfee' => $deliveryrow['customs_fee'], 'totalfee' => $totalfee, 'countmoney' => $countmoney, 'countweight' => $countweight, 'consignee' => $consignee, 'country' => $country, 'city' => $city, 'zip' => $zip, 'tel' => $tel, 'address' => $address, 'remark' => $remark, 'did' => $did, 'deliveryname' => $deliveryrow['deliveryname'], 'areaname' => $deliveryrow['areaname'], 'addtime' => time(), 'uptime' => time(), 'state' => 1);
    include_once INC_PATH . "/sendorder.class.php";
    $sendorderobj = SendOrderClass::init();
    $sid = $sendorderobj->add($addarray);
    if (GetNum($sid)) {
        //提交成功,处理扣费和修改订单状态
        include_once INC_PATH . "/member.class.php";
        $m = new memberclass();
        $note = "提交运单,运单ID:" . $sid;
        $m->moneyedit($_USERS['uname'], -$totalfee, 3, $note);
        //扣费操作
        editstate($tablepre . "order", "state", $wheresqlo, 5);
        //更改订单状态操作
        editstate($tablepre . "order", "sid", $wheresqlo, $sid);
        //更改订单对应运单ID操作
        if (GetNum($couponid)) {
            editstate($tablepre . "coupon", "state", "cid = " . GetNum($couponid), 3);
            //更改优惠卷状态操作
        }
        //显示成功页面
        include template('member_tosendorderok');
        //包含输出指定模板
    } else {
        print "<script language='javascript'>alert('生成送货单出错!');</script>";
        jumpurl(url('m.php?name=orderlist'));
    }
    //	print_r($addarray);
}
Example #11
0
    $active[2] = ' class="active"';
}
//清空垃圾箱信息
if (is_array($dellistarr) && !empty($dellistarr)) {
    $itemidstr = simplode($dellistarr);
    deleteitems('itemid', $itemidstr);
    $residual = $all - $delnum;
    echo label(array('type' => 'table-start', 'class' => 'listtable'));
    echo '<tr>';
    echo '<th>' . $alang['delete_all_message_0'] . $all . $alang['delete_all_message_1'] . $residual . $alang['delete_all_message_3'] . '</th>';
    echo '</tr>';
    echo label(array('type' => 'table-end'));
    if ($residual) {
        jumpurl($newurl . '&op=deleteallwaste&all=' . $all . '&delnum=' . $delnum, 1000, 'meta');
    } else {
        jumpurl($newurl, 1000, 'meta');
    }
}
//THE VALUE SHOW
if ($thevalue) {
    //缩略图
    //CUSTOM FIELD
    if ($page == 1) {
        $cfhtmlselect = array('0' => $alang['space_customfield_none']);
        $wheresqlarr = array();
        $wheresqlarr['type'] = $type;
        $plussql = 'ORDER BY displayorder';
        $allcfarr = selecttable('customfields', array(), $wheresqlarr, $plussql);
        $cfhtml = '';
        $tbodynum = 0;
        foreach ($allcfarr as $cfkey => $cfvalue) {
Example #12
0
function jumpmessage($url, $message, $time = 1)
{
    global $acid, $alang, $menus;
    obclean();
    include template('admin/tpl/header.htm', 1);
    echo '<table style="width:98%;padding:0.2em;border: 1px solid #698CC3;font-size:14px;font-weight:bold;font-family: Trebuchet MS, Lucida Console, Lucida Sans, sans-serif;" align="center"><tr><td><a href=' . $url . '>' . $message . '</a></td><td width="35%"><a href="' . CPURL . '?action=freshhtml&op=channel">' . $alang['making_page_info_3'] . '</a></td></tr></table>';
    include template('admin/tpl/footer.htm', 1);
    jumpurl($url . '&' . random(10, 1), $time);
}
 public function index()
 {
     //初始化数据   获取userid usercode   二次改造出一个人员信息类
     //进入后就调用acctoken方法 确保 acctoken够新  --相当于人员进入登录的时候都会对accesstoken刷新一次
     // 如果缓存有accesstoken  则取缓存
     $acctokenModel = M("accesstoken");
     $acctokenModel->getaccesstoken();
     //优先判断进入方式  是否为auth2.0进入网页
     if (isset($_GET["code"])) {
         //表示为auth2.0进入  通过code获得userid
         $backArr = WEIXINURL::getuseridbycode($_GET["code"]);
         if (isset($backArr['userid'])) {
             //				成功取得useid
             $userid = $backArr['userid'];
         } else {
             //				失败再次刷新地址
             jumpurl($this->authurl);
         }
         //将userid存入cookie
         setcookie("klbweixinuserid", $userid, time() + 3600 * 24 * 7);
     }
     if (!isset($userid)) {
         //判断是否存在cookie
         if (isset($_COOKIE["klbweixinuserid"])) {
             $userid = $_COOKIE['klbweixinuserid'];
         } else {
             jumpurl($this->authurl);
             exit;
         }
     }
     //通过userid去user的信息
     $backArr = WEIXINURL::getuserinfobyuserid($userid);
     if ($backArr["errcode"] == "0" && $backArr["errmsg"] == "ok") {
         $usercode = $backArr["extattr"]["attrs"][0]["value"] != "" ? $backArr["extattr"]["attrs"][0]["value"] : "为空";
         VIEW::assign(array('username' => $backArr["name"], 'usercode' => $usercode, 'avatarimg' => $backArr["avatar"]));
         setcookie("klbweixinusername", $backArr["name"], time() + 3600 * 24 * 7);
         setcookie("klbweixinusercode", $usercode, time() + 3600 * 24 * 7);
     } else {
         echo "获取人员信息失败" . $backArr["errcode"] . $backArr["errmsg"];
         exit;
     }
     if (isset($_GET["from"])) {
         VIEW::assign(array("modal" => "show"));
     } else {
         VIEW::assign(array("modal" => ""));
     }
     $inquirylistM = M('inquirylist');
     $mydata = $inquirylistM->index($userid);
     //返回的data分成 全部问卷  以及 以及作答了的问卷的id  将数据分成两部分
     //将选项作为数组直接插入到问题后
     for ($j = 0; $j < count($mydata["inquire"]); $j++) {
         $isin = false;
         for ($i = 0; $i < count($mydata["answer"]); $i++) {
             if ($mydata["inquire"][$j]["inquireid"] == $mydata["answer"][$i]["inquireid"]) {
                 $isin = true;
                 break;
             }
         }
         if ($isin) {
             $inquirelist[] = $mydata["inquire"][$j];
         } else {
             $inquirehistorylist[] = $mydata["inquire"][$j];
         }
     }
     VIEW::assign(array('inquiry' => $inquirelist, 'inquiryhistory' => $inquirehistorylist));
     VIEW::display('inquirelist.html');
 }
Example #14
0
        if (empty($webname)) {
            exit("<script language='javascript'>alert(" . lang('website_noempty') . ");history.go(-1);</script>");
        }
        //处理插入数据库操作
        $addarray = array('uid' => $_USERS['uid'], 'uname' => $_USERS['uname'], 'name' => lang('website') . '[<a href=\\"' . $weburl . '\\" target=\\"_blank\\">' . $webname . '</a>]' . lang('Recharge'), 'account' => $account, 'amount' => $money, 'price' => $money, 'num' => 1, 'money' => $money, 'remark' => Char_cv($remark), 'type' => 4, 'addtime' => time(), 'state' => 0);
    } elseif ($type == 'card') {
        InitGP(array("bankname", "account", 'amount', 'money'));
        //初始化变量全局返回
        $money = GetNum($money);
        if (empty($account) || empty($money) || $money < 0) {
            exit("<script language='javascript'>alert(" . lang('Credit_card_noempty') . ");history.go(-1);</script>");
        }
        if (empty($bankname)) {
            exit("<script language='javascript'>alert(" . lang('Bankname_noempty') . ");history.go(-1);</script>");
        }
        //处理插入数据库操作
        $addarray = array('uid' => $_USERS['uid'], 'uname' => $_USERS['uname'], 'name' => $bankname, 'account' => $account, 'amount' => $money, 'price' => $money, 'num' => 1, 'money' => $money, 'remark' => '', 'type' => 5, 'addtime' => time(), 'state' => 0);
    } else {
        exit(lang('Parameter_error'));
    }
    $info = $serviceobj->add($addarray);
    if (GetNum($info)) {
        print "<script language='javascript'>alert(" . lang('submit_success') . ");</script>";
        //include_once(INC_PATH."/sendqq.func.php");
        //$msg="有新的充值信息!请尽快处理!充值订单ID:".$info;
        //send_qq_msg('527774557',$msg);
        jumpurl(url("service.php"));
    }
} else {
    exit(lang('Missing_parameter'));
}
Example #15
0
            editstate('users', "utype", "uname='" . $_USERS['uname'] . "'", 2);
            //更改会员等级操作
            editstate('users', "validity", "uname='" . $_USERS['uname'] . "'", time() + 3600 * 24 * $cfg_vip_validity);
            //更改会员有效期操作
            print "<script language='javascript'>alert('升级白金卡会员成功!');</script>";
            jumpurl(url('m.php'));
        } else {
            print "<script language='javascript'>alert('积分不足!升级白金卡会员需要积分{$cfg_vip_score2}');history.go(-1);</script>";
            exit;
        }
    } elseif ($_USERS['utype'] == 2) {
        if ($_USERS['scores'] >= $cfg_vip_score3) {
            $note = "钻石卡会员升级";
            $m->scoreedit($_USERS['uname'], -$cfg_vip_score3, $note);
            editstate('users', "utype", "uname='" . $_USERS['uname'] . "'", 3);
            //更改会员等级操作
            editstate('users', "validity", "uname='" . $_USERS['uname'] . "'", time() + 3600 * 24 * $cfg_vip_validity);
            //更改会员有效期操作
            print "<script language='javascript'>alert('升级钻石卡会员成功!');</script>";
            jumpurl(url('m.php'));
        } else {
            print "<script language='javascript'>alert('积分不足!升级钻石卡会员需要积分{$cfg_vip_score3}');history.go(-1);</script>";
            exit;
        }
    } elseif ($_USERS['utype'] == 3) {
        print "<script language='javascript'>alert('您已经是最高级会员,无需升级!');history.go(-1);</script>";
        exit;
    }
}
include template('member_index');
//包含输出指定模板