本文整理汇总了PHP中connector::start_pagetemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP connector::start_pagetemplate方法的具体用法?PHP connector::start_pagetemplate怎么用?PHP connector::start_pagetemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类connector
的用法示例。
在下文中一共展示了connector::start_pagetemplate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
function in_list()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$fgid = intval($this->fun->accept('fgid', 'G'));
if (empty($fgid)) {
$this->callmessage($this->lng['db_err'], $_SERVER['HTTP_REFERER'], $this->lng['gobackurlbotton']);
}
$form = $this->get_form_purview($fgid);
$form['action'] = $this->get_link('acform', $form, admin_LNG);
$attrread = $this->get_formatt($fgid);
if ($form['titlestyle']) {
$titlestyleArray = array('{typename}' => $form['formgroupname'], '{sitename}' => $this->lng['sitename']);
$this->lng['sitename'] = $this->fun->formatstring($form['titlestyle'], $titlestyleArray);
} else {
$this->lng['sitename'] = $form['formgroupname'] . '-' . $this->lng['sitename'];
}
$this->pagetemplate->assign('lngpack', $this->lng);
$this->pagetemplate->assign('form', $form);
$this->pagetemplate->assign('array', $attrread);
$template = $form['template'] ? $form['template'] : 'form';
$this->pagetemplate->assign('path', 'form');
$this->pagetemplate->assign('current', $fgid);
$this->pagetemplate->assign('tokenkey', $this->fun->token());
$this->pagetemplate->assign('seccodelink', $this->get_link('seccode'));
$templatesDIR = $this->get_templatesdir('form');
$templatefilename = $lng . '/' . $templatesDIR . '/' . $template;
$this->pagetemplate->display($templatefilename, $form['formcode'] . '_list', false, $filename, admin_LNG);
}
示例2: header
function in_index()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
if ($this->CON['is_html']) {
$lng_dir = $this->get_lng_dirpack(admin_LNG);
if ($this->CON['is_alonelng']) {
$index_file = admin_ROOT . $this->CON['file_htmldir'] . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
$urlfile = admin_URL . $this->CON['file_htmldir'];
$strfile = $this->CON['file_htmldir'] . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
} else {
$index_file = admin_ROOT . $this->CON['file_htmldir'] . $lng_dir . '/' . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
$urlfile = admin_URL . $this->CON['file_htmldir'] . $lng_dir . '/';
$strfile = $this->CON['file_htmldir'] . $lng_dir . '/' . $this->CON['entrance_file'] . '.' . $this->CON['file_fileex'];
}
if (is_file($index_file)) {
header("HTTP/1.1 301 Moved Permanently");
header('location: ' . $urlfile);
exit;
} else {
header('Content-type: text/html; charset=utf-8');
exit('错误:HTML静态网页不存在,请登陆后台进行静态页面生成!<br>Filename : ' . $strfile . '<br><a href="' . admin_URL . adminfile . '">点陆登陆管理平台!</a>');
}
}
$this->pagetemplate->assign('id', 5);
$this->pagetemplate->assign('mlink', $this->mlink);
$this->pagetemplate->assign('path', 'index');
$this->pagetemplate->display(admin_LNGDIR . 'index', 'index', false, null, admin_LNG);
}
示例3:
function in_index()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$this->pagetemplate->assign('mlink', $this->mlink);
$this->pagetemplate->assign('path', 'index');
$this->pagetemplate->display(admin_LNGDIR . 'index', 'index', false, null, admin_LNG);
}
示例4: intval
function in_bbs()
{
parent::start_pagetemplate();
$this->pagetemplate->libfile = true;
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
include admin_ROOT . 'datacache/' . $lng . '_pack.php';
$this->pagetemplate->assign('lngpack', $LANPACK);
$btid = intval($this->fun->accept('btid', 'G'));
$limit = intval($this->fun->accept('limit', 'G'));
$limit = empty($limit) ? 10 : $limit;
$filename = $this->fun->accept('filename', 'G');
if (!empty($filename)) {
if (!preg_match("/^[\\w-]+\$/i", $filename)) {
exit;
}
} else {
$filename = 'bbslist';
}
$db_table = db_prefix . 'bbs';
$db_where = " WHERE upbid=0 AND isclass=1 AND lng='{$lng}'";
if (!empty($btid)) {
$db_where .= " AND btid={$btid}";
}
$sql = "SELECT * FROM {$db_table} {$db_where} ORDER BY bid DESC LIMIT 0,{$limit}";
$rs = $this->db->query($sql);
while ($rsList = $this->db->fetch_assoc($rs)) {
$rsList['link'] = $this->get_link('forumread', $rsList, admin_LNG);
$array[] = $rsList;
}
$this->pagetemplate->assign('array', $array);
$this->pagetemplate->assign('pathurl', admin_URL);
$this->pagetemplate->assign('lngpack', $LANPACK);
$output = $this->pagetemplate->fetch($lng . '/lib/' . $filename);
$outHTML = addslashes($output);
$textArray = preg_split('/[\\r\\n]/i', $outHTML);
if (is_array($textArray)) {
$outHTML = null;
foreach ($textArray as $key => $value) {
$outHTML .= 'document.write("' . $value . '");';
}
exit($outHTML);
} else {
exit('document.writeln("' . $outHTML . '")');
}
}
示例5: onclearcache
function onclearcache()
{
parent::start_template();
$execute = $this->fun->accept('execute', 'P');
$cleartype = $this->fun->accept('cleartype', 'P');
if (!empty($execute)) {
if ($cleartype == 1) {
$retrun = $this->dbcache->clearcache();
if ($retrun) {
exit('true');
} else {
$falseerr = $this->dbcache->cachefile . $this->lng['mangerlist_filecheck_js_filedirno'];
exit($falseerr);
}
} elseif ($cleartype == 2) {
parent::start_pagetemplate();
$retrun = $this->pagetemplate->clearcache(null, null, true);
if ($retrun) {
exit('true');
} else {
$falseerr = $this->pagetemplate->cache_dir . $this->lng['mangerlist_filecheck_js_filedirno'];
exit($falseerr);
}
} elseif ($cleartype == 3) {
parent::start_pagetemplate();
$retrun = $this->pagetemplate->clearpic(true);
if ($retrun) {
exit('true');
} else {
$falseerr = $this->pagetemplate->cache_pic . $this->lng['mangerlist_filecheck_js_filedirno'];
exit($falseerr);
}
} elseif ($cleartype == 4) {
parent::start_pagetemplate();
$retrun = $this->pagetemplate->cleartemplates(true);
if ($retrun) {
exit('true');
} else {
$falseerr = $this->pagetemplate->tpl_c_dir . $this->lng['mangerlist_filecheck_js_filedirno'];
exit($falseerr);
}
}
}
$digheight = $this->fun->accept('digheight', 'R');
$this->ectemplates->assign('digheight', $digheight);
$this->ectemplates->display('admin/admin_manager_clearcache');
}
示例6: unset
function in_order()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$this->lng['sitename'] = '充值中心' . '-' . $this->lng['sitename'];
$this->pagetemplate->assign('moneys', $this->CON['moneys']);
$this->pagetemplate->assign('lngpack', $this->lng);
$this->pagetemplate->assign('mlink', $this->mlink);
$this->pagetemplate->assign('member', $rsMember);
$this->pagetemplate->assign('path', 'order');
$this->pagetemplate->assign('tokenkey', $this->fun->token());
$this->pagetemplate->assign('mem_isaddress', $this->CON['mem_isaddress']);
// 支付模版
$opid = 2;
// 宝付支付
$payread = !empty($opid) ? $this->get_payplug_view($opid) : 0;
$plugcode = $payread['paycode'];
if (!empty($plugcode)) {
include_once admin_ROOT . 'public/plug/payment/' . $plugcode . '.php';
$payobj = new $plugcode();
$this->pagetemplate->assign('display_code', $payobj->get_display_code());
}
$templatesDIR = $this->get_templatesdir('order');
$templatefilename = $lng . '/' . $templatesDIR . '/order_buy_center';
$this->pagetemplate->assign('out', 'buyedit');
unset($array, $this->mlink, $LANPACK, $this->lng);
$this->pagetemplate->display($templatefilename, 'order_list', false, '', admin_LNG);
}
示例7:
function lib_order()
{
$this->softbase();
parent::start_pagetemplate();
$this->pagetemplate->libfile = true;
}
示例8: isset
function in_ajaxlist()
{
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$page = $this->fun->accept('page', 'G');
$page = isset($page) ? intval($page) : 1;
$limitstard = $this->fun->accept('limitstard', 'R');
$limitstard = isset($limitstard) ? intval($limitstard) : 0;
$tid = intval($this->fun->accept('tid', 'G'));
if (empty($tid)) {
exit('false');
}
$typeread = $this->get_type($tid);
if (!$typeread['isclass']) {
exit("Information parameter error!");
} elseif ($typeread['purview'] > 0) {
parent::member_purview($typeread['purview'], null, true);
}
$mid = $typeread['mid'];
$modelview = $this->get_modelview($mid);
$modelname = $modelview['modelname'];
$pagemax = $modelview['pagemax'];
$pagemax = empty($typeread['pagemax']) ? empty($pagemax) ? 20 : $pagemax : $typeread['pagemax'];
$template_list = admin_WAP ? $typeread['waptempalte'] : $typeread['template'];
$template_index = $typeread['indextemplates'];
$readtemplate = admin_WAP ? $typeread['wapreadtemplate'] : $typeread['readtemplate'];
$styleid = $typeread['styleid'] == 1 && admin_WAP ? 2 : $typeread['styleid'];
$typeread['rsslink'] = $this->get_link('typerss', $typeread, admin_LNG);
$typeread['typelink'] = $this->get_link('type', $typeread, admin_LNG);
$this->pagetemplate->assign('type', $typeread);
$templatesDIR = $this->get_templatesdir('ajax_list');
$listtemplatefilename = $lng . '/' . $templatesDIR . '/' . $template_list;
if ($styleid != 2) {
exit;
} else {
if ($typeread['gotoid'] > 0) {
$tid = $typeread['gotoid'];
}
$db_table = db_prefix . 'document';
if ($typeread['ispart']) {
$db_where = ' WHERE isclass=1 AND mid=' . $mid . ' AND ' . $this->get_typeid($tid, 'tid', 0, $mid, 0, $lng) . " OR FIND_IN_SET('{$tid}',extid)";
} else {
$db_where = ' WHERE isclass=1 AND mid=' . $mid . ' AND tid=' . $tid . " OR FIND_IN_SET('{$tid}',extid)";
}
$countnum = $this->db_numrows($db_table, $db_where);
if ($countnum > 0) {
$numpage = ceil($countnum / $pagemax);
} else {
$numpage = 1;
}
$db_table = db_prefix . 'document';
$ordertype = $typeread['ordertype'] == 1 ? 'ORDER BY pid,did' : 'order by pid,addtime';
if ($typeread['isorderby']) {
$ordertype = $ordertype . ' DESC';
} else {
$ordertype = $ordertype . ' ASC';
}
$sql = "SELECT * FROM {$db_table} {$db_where} {$ordertype} LIMIT {$limitstard},{$pagemax}";
$rs = $this->db->query($sql);
while ($rsList = $this->db->fetch_assoc($rs)) {
$attarray = array();
$attarray = $this->get_document_attr($rsList['did']);
$typeread_last = $this->get_type($rsList['tid']);
$rsList['typename'] = $typeread_last['typename'];
$rsList['typelink'] = $this->get_link('type', $typeread_last, admin_LNG);
$rsList['pageclass'] = $typeread_last['pageclass'];
$rsList['link'] = $this->get_link('doc', $rsList, admin_LNG);
$rsList['buylink'] = $this->get_link('buylink', $rsList, admin_LNG);
$rsList['enqlink'] = $this->get_link('enqlink', $rsList, admin_LNG);
$rsList['ctitle'] = empty($rsList['color']) ? $rsList['title'] : "<font color='" . $rsList['color'] . "'>" . $rsList['title'] . "</font>";
$array[] = is_array($attarray) ? array_merge($attarray, $rsList) : $rsList;
}
$this->pagetemplate->assign('array', $array);
unset($array, $typeread, $modelview, $LANPACK, $this->lng);
$this->pagetemplate->display($listtemplatefilename, $dirname . '_list_ajax', false, $filename, admin_LNG);
}
}
示例9: isset
function in_taglist()
{
parent::start_pagetemplate();
include_once admin_ROOT . 'public/class_pagebotton.php';
$page = $this->fun->accept('page', 'G');
$page = isset($page) ? intval($page) : 1;
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$tagkey = urldecode($this->fun->accept('tagkey', 'R'));
$tagkey = $this->fun->inputcodetrim($tagkey);
$db_where = ' WHERE lng=\'' . $lng . '\' AND isclass=1';
if (empty($tagkey)) {
$linkURL = $_SERVER['HTTP_REFERER'];
$this->callmessage($this->lng['search_err'], $linkURL, $this->lng['gobackbotton']);
}
if (!empty($tagkey)) {
$db_where .= " AND FIND_IN_SET('{$tagkey}',tags)";
}
$pagemax = 20;
$pagesylte = 1;
$templatesDIR = $this->get_templatesdir('article');
$templatefilename = $lng . '/' . $templatesDIR . '/search';
$db_table = db_prefix . 'document';
$countnum = $this->db_numrows($db_table, $db_where);
if ($countnum > 0) {
$numpage = ceil($countnum / $pagemax);
} else {
$numpage = 1;
}
$sql = "SELECT did,lng,pid,mid,aid,tid,sid,fgid,linkdid,isclass,islink,ishtml,ismess,isorder,purview,recommend,tsn,title,longtitle,\n\t\t\tcolor,author,source,pic,link,oprice,bprice,click,description,keywords,addtime,template,filename,filepath FROM {$db_table} {$db_where} LIMIT 0,{$pagemax}";
$this->htmlpage = new PageBotton($sql, $pagemax, $page, $countnum, $numpage, $pagesylte, $this->CON['file_fileex'], 5, $this->lng['pagebotton'], $this->lng['gopageurl'], $this->CON['is_rewrite']);
$sql = $this->htmlpage->PageSQL('pid,did', 'down');
$rs = $this->db->query($sql);
while ($rsList = $this->db->fetch_assoc($rs)) {
$rsList['typename'] = $this->get_type($rsList['tid'], 'typename');
$rsList['link'] = $this->get_link('doc', $rsList, admin_LNG);
$rsList['buylink'] = $this->get_link('buylink', $rsList, admin_LNG);
$rsList['enqlink'] = $this->get_link('enqlink', $rsList, admin_LNG);
$rsList['ctitle'] = empty($rsList['color']) ? $rsList['title'] : "<font color='" . $rsList['color'] . "'>" . $rsList['title'] . "</font>";
$rsList[$keyname] = str_ireplace($keyword, '<font color="#F00000"><u>' . $keyword . '</u></font>', $rsList[$keyname]);
$array[] = $rsList;
}
$this->pagetemplate->assign('pagetext', $this->htmlpage->PageStat($this->lng['pagetext']));
$this->pagetemplate->assign('pagebotton', $this->htmlpage->PageList());
$this->pagetemplate->assign('pagenu', $this->htmlpage->Bottonstyle(false));
$this->pagetemplate->assign('pagese', $this->htmlpage->pageSelect());
$this->pagetemplate->assign('pagevt', $this->htmlpage->Prevbotton());
$this->pagetemplate->assign('keyword', $tagkey);
$this->pagetemplate->assign('array', $array);
$this->pagetemplate->assign('path', 'search');
unset($array, $typeread, $modelview, $LANPACK, $this->lng);
$this->pagetemplate->display($templatefilename, 'search', false, $filename, admin_LNG);
}
示例10: intval
function in_ordereditsave()
{
parent::start_pagetemplate();
parent::member_purview(0, $this->mlink['orderlist']);
$linkURL = $_SERVER['HTTP_REFERER'];
if (!$this->fun->is_token()) {
$this->callmessage($this->lng['repeatinput'], $linkURL, $this->lng['gobackbotton']);
}
$userid = $this->ec_member_username_id;
if (empty($userid)) {
$this->callmessage($this->lng['db_err'], $_SERVER['HTTP_REFERER'], $this->lng['gobackurlbotton']);
}
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$oid = intval($this->fun->accept('oid', 'P'));
if (empty($oid)) {
$this->callmessage($this->lng['db_err'], $_SERVER['HTTP_REFERER'], $this->lng['gobackurlbotton']);
}
$consignee = trim($this->fun->accept('alias', 'P', true, true));
$consignee = $this->fun->substr($consignee, 12);
$country = intval($this->fun->accept('cityone', 'P'));
$country = empty($country) ? 0 : $country;
$province = intval($this->fun->accept('citytwo', 'P'));
$province = empty($province) ? 0 : $province;
$city = intval($this->fun->accept('citythree', 'P'));
$city = empty($city) ? 0 : $city;
$district = intval($this->fun->accept('district', 'P'));
$district = empty($district) ? 0 : $district;
$address = trim($this->fun->accept('address', 'P', true, true));
$address = $this->fun->substr($address, 120);
$zipcode = trim($this->fun->accept('zipcode', 'P', true, true));
$zipcode = $this->fun->substr($zipcode, 10);
$tel = trim($this->fun->accept('tel', 'P', true, true));
$tel = $this->fun->substr($tel, 20);
$mobile = trim($this->fun->accept('mobile', 'P', true, true));
$mobile = $this->fun->substr($mobile, 15);
$sendtime = intval($this->fun->accept('sendtime', 'R'));
$content = trim($this->fun->accept('content', 'P', true, true));
$content = $this->fun->substr($content, 500);
$db_where = 'oid=' . $oid . ' AND userid=' . $userid;
$db_table = db_prefix . 'order';
$db_set = "consignee='{$consignee}',country={$country},province={$province},city={$city},district={$district},address='{$address}',zipcode='{$zipcode}',tel='{$tel}',mobile='{$mobile}',sendtime='{$sendtime}',content='{$content}'";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . ' WHERE ' . $db_where);
$this->callmessage($this->lng['order_memberinfoedit_ok'], $_SERVER['HTTP_REFERER'], $this->lng['gobackurlbotton']);
}
示例11: list
function in_save()
{
$linkURL = $_SERVER['HTTP_REFERER'];
if (!$this->fun->is_token() && !$this->CON['is_html']) {
$this->callmessage($this->lng['repeatinput'], $linkURL, $this->lng['gobackbotton']);
}
parent::start_pagetemplate();
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
if ($this->CON['bbs_isseccode'] && !admin_WAP) {
$seccode = $this->fun->accept('seccode', 'P');
include_once admin_ROOT . 'public/class_seccode.php';
list($new_seccode, $expiration) = explode("\t", $this->fun->eccode($_COOKIE['ecisp_home_seccode'], 'DECODE'));
$code = new seccode();
$code->seccodeconvert($new_seccode);
if ($new_seccode != strtoupper($seccode)) {
$this->callmessage($this->lng['seescodeerr'], $linkURL, $this->lng['gobackbotton']);
}
}
$did = intval($this->fun->accept('did', 'P'));
$did = empty($did) ? 0 : $did;
if (empty($did)) {
$this->callmessage($this->lng['db_err'], $linkURL, $this->lng['gobackbotton']);
}
$readinfo = $this->get_documentview($did);
if (!$readinfo) {
$this->callmessage($this->lng['db_err'], $_SERVER['HTTP_REFERER'], $this->lng['gobackurlbotton']);
}
if (!$readinfo['isclass'] || !$readinfo['ismess']) {
$this->callmessage($this->lng['db_err'], $_SERVER['HTTP_REFERER'], $this->lng['gobackurlbotton']);
} elseif ($readinfo['purview'] > 0) {
parent::member_purview($readinfo['purview'], null, true);
}
$db_table = db_prefix . "document_message";
$userid = intval($this->fun->accept('userid', 'P'));
$userid = empty($userid) ? 0 : $userid;
$name = $this->fun->accept('name', 'P', true, true);
$name = $this->fun->substr($name, 20);
$content = $this->fun->accept('content', 'P');
$content = empty($content) ? '' : $this->fun->Text2Html($content, false);
if (empty($name) || empty($content)) {
$this->callmessage($this->lng['forum_input_err'], $linkURL, $this->lng['gobackbotton']);
}
$email = $this->fun->accept('email', 'P');
if (!preg_match("/^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+\$/i", $email)) {
$this->callmessage($this->lng['email_err'], $linkURL, $this->lng['gobackbotton']);
}
$isclass = $this->CON['bbs_isclass'] ? 0 : 1;
if (!$this->CON['is_anonymous']) {
parent::member_purview(1);
}
$ipadd = $this->fun->ip($_SERVER['REMOTE_ADDR']);
$addtime = time();
if (!empty($this->ec_member_username_id)) {
$rsMember = $this->get_member(null, $this->ec_member_username_id);
$lockusername = explode(',', $this->CON['bbs_username']);
if (in_array($this->ec_member_username, $lockusername)) {
$this->callmessage($this->lng['forum_mem_username'], $_SERVER['HTTP_REFERER'], $this->lng['gobackbotton']);
}
}
if (!empty($this->CON['bbs_filter'])) {
if ($this->fun->screening_key($content, $this->CON['bbs_filter'])) {
$this->callmessage($this->lng['forum_input_filter'], $linkURL, $this->lng['gobackbotton']);
}
}
$usersessionid = md5($ipadd + $did . 'input');
$inputseesion = $this->fun->accept($usersessionid, 'C');
if (empty($inputseesion) && $this->CON['bbs_inputtime']) {
$this->fun->setcookie($usersessionid, $addtime, $this->CON['bbs_inputtime']);
} elseif ($this->CON['bbs_inputtime']) {
$this->callmessage($this->lng['repeatinput'], $linkURL, $this->lng['gobackurlbotton']);
}
$db_field = 'did,userid,adminid,ipadd,lng,name,email,content,recontent,isreply,isclass,addtime,retime,support,oppose';
$db_values = "{$did},{$userid},0,'{$ipadd}','{$lng}','{$name}','{$email}','{$content}','',0,{$isclass},{$addtime},0,0,0";
$this->db->query('INSERT INTO ' . $db_table . ' (' . $db_field . ') VALUES (' . $db_values . ')');
$insert_id = $this->db->insert_id();
$this->fun->setcookie('ecisp_home_seccode', null);
if ($this->CON['bbs_ismail']) {
$this->bbsmailsend('bbsrequest', $insert_id);
}
$this->callmessage($this->lng['forum_input_ok'], $linkURL, $this->lng['gobackurlbotton']);
}
示例12: unset
function in_lostpasswd()
{
parent::start_pagetemplate();
if (!$this->CON['mem_isclose']) {
$linkURL = $_SERVER['HTTP_REFERER'];
$this->callmessage($this->lng['mem_close'], $linkURL, $this->lng['gobackbotton']);
}
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$templatesDIR = $this->get_templatesdir('member');
$templatefilename = $lng . '/' . $templatesDIR . '/member_lostpasswd';
$this->pagetemplate->assign('seccodelink', $this->get_link('seccode'));
$this->pagetemplate->assign('mlink', $this->mlink);
$this->pagetemplate->assign('path', 'member');
$this->pagetemplate->assign('mem_isseccode', $this->CON['mem_isseccode']);
unset($this->mlink, $LANPACK, $this->lng);
$this->pagetemplate->display($templatefilename, 'index', false, null, admin_LNG);
}
示例13: isset
function in_list()
{
parent::start_pagetemplate();
include_once admin_ROOT . 'public/class_pagebotton.php';
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$page = $this->fun->accept('page', 'G');
$page = isset($page) ? intval($page) : 1;
$tid = intval($this->fun->accept('tid', 'G'));
if (empty($tid)) {
exit('false');
}
$typeread = $this->get_type($tid);
if (!$typeread['isclass']) {
exit("Information parameter error!");
} elseif ($typeread['purview'] > 0) {
parent::member_purview($typeread['purview'], null, true);
}
$current = !$typeread['upid'] ? $typeread['tid'] : $typeread['topid'];
$this->pagetemplate->assign('path', 'article');
$this->pagetemplate->assign('current', $current);
$mid = $typeread['mid'];
$modelview = $this->get_modelview($mid);
$modelname = $modelview['modelname'];
$pagemax = $modelview['pagemax'];
$pagemax = empty($typeread['pagemax']) ? empty($pagemax) ? 20 : $pagemax : $typeread['pagemax'];
$pagesylte = $modelview['pagesylte'];
$template_list = $typeread['template'];
$template_index = $typeread['indextemplates'];
$readtemplate = $typeread['readtemplate'];
$styleid = $typeread['styleid'];
$typeread['rsslink'] = $this->get_link('typerss', $typeread, admin_LNG);
$typeread['typelink'] = $this->get_link('type', $typeread, admin_LNG);
$this->pagetemplate->assign('type', $typeread);
if ($styleid != 4) {
if (!empty($typeread['keywords'])) {
$this->lng['keyword'] = $typeread['keywords'];
}
if (!empty($typeread['description'])) {
$this->lng['description'] = $typeread['description'];
}
$this->pagetemplate->assign('lngpack', $this->lng);
}
$templatesDIR = $this->get_templatesdir('article');
$indextemplatefilename = $lng . '/' . $templatesDIR . '/' . $template_index;
$listtemplatefilename = $lng . '/' . $templatesDIR . '/' . $template_list;
$readtemplatefilename = $lng . '/' . $templatesDIR . '/' . $readtemplate;
if ($styleid == 1) {
unset($typeread, $modelview, $LANPACK, $this->lng);
$this->pagetemplate->display($indextemplatefilename, $dirname . '_index', false, $filename, admin_LNG);
} elseif ($styleid == 2) {
if ($typeread['gotoid'] > 0) {
$tid = $typeread['gotoid'];
}
$db_table = db_prefix . 'document';
if ($typeread['ispart']) {
$db_where = ' WHERE isclass=1 AND mid=' . $mid . ' AND ' . $this->get_typeid($tid, 'tid', 0, $mid, 0, $lng) . " OR FIND_IN_SET('{$tid}',extid)";
} else {
$db_where = ' WHERE isclass=1 AND mid=' . $mid . ' AND tid=' . $tid . " OR FIND_IN_SET('{$tid}',extid)";
}
$countnum = $this->db_numrows($db_table, $db_where);
if ($countnum > 0) {
$numpage = ceil($countnum / $pagemax);
} else {
$numpage = 1;
}
$db_table = db_prefix . 'document';
$sql = "SELECT * FROM {$db_table} {$db_where} LIMIT 0,{$pagemax}";
$this->htmlpage = new PageBotton($sql, $pagemax, $page, $countnum, $numpage, $pagesylte, $this->CON['file_fileex'], 5, $this->lng['pagebotton'], $this->lng['gopageurl'], $this->CON['is_rewrite']);
$ordertype = $typeread['ordertype'] == 1 ? 'pid,did' : 'pid,addtime';
if ($typeread['isorderby']) {
$sql = $this->htmlpage->PageSQL($ordertype, 'down');
} else {
$sql = $this->htmlpage->PageSQL($ordertype, 'ASC');
}
$rs = $this->db->query($sql);
while ($rsList = $this->db->fetch_assoc($rs)) {
$attarray = array();
$attarray = $this->get_document_attr($rsList['did']);
$typeread = $this->get_type($rsList['tid']);
$rsList['typename'] = $typeread['typename'];
$rsList['typelink'] = $this->get_link('type', $typeread, admin_LNG);
$rsList['link'] = $this->get_link('doc', $rsList, admin_LNG);
$rsList['buylink'] = $this->get_link('buylink', $rsList, admin_LNG);
$rsList['enqlink'] = $this->get_link('enqlink', $rsList, admin_LNG);
$rsList['ctitle'] = empty($rsList['color']) ? $rsList['title'] : "<font color='" . $rsList['color'] . "'>" . $rsList['title'] . "</font>";
$array[] = is_array($attarray) ? array_merge($attarray, $rsList) : $rsList;
}
$this->pagetemplate->assign('pagetext', $this->htmlpage->PageStat($this->lng['pagetext']));
$this->pagetemplate->assign('pagebotton', $this->htmlpage->PageList());
$this->pagetemplate->assign('pagenu', $this->htmlpage->Bottonstyle(false));
$this->pagetemplate->assign('pagese', $this->htmlpage->pageSelect());
$this->pagetemplate->assign('pagevt', $this->htmlpage->Prevbotton());
$this->pagetemplate->assign('array', $array);
unset($array, $typeread, $modelview, $LANPACK, $this->lng);
$this->pagetemplate->display($listtemplatefilename, $dirname . '_list', false, $filename, admin_LNG);
} elseif ($styleid == 3) {
$typeurl = $typeread['typeurl'];
header("location:{$typeurl}");
exit;
} elseif ($styleid == 4) {
//.........这里部分代码省略.........
示例14: stripslashes
function in_ordersave()
{
parent::start_pagetemplate();
$linkURL = $_SERVER['HTTP_REFERER'];
if (!$this->fun->is_token()) {
$this->callmessage($this->lng['repeatinput'], $linkURL, $this->lng['gobackbotton']);
}
if ($this->CON['order_ismember']) {
parent::member_purview(0, $this->mlink['orderpay']);
}
$lng = admin_LNG == 'big5' ? $this->CON['is_lancode'] : admin_LNG;
$cartid = $this->fun->eccode($this->fun->accept('ecisp_order_list', 'C'), 'DECODE', db_pscode);
$cartid = stripslashes(htmlspecialchars_decode($cartid));
$uncartid = !empty($cartid) ? unserialize($cartid) : 0;
$ordersncode = $this->fun->accept('ecisp_order_sncode', 'C');
$userid = intval($this->fun->accept('userid', 'P'));
$userid = empty($userid) ? 0 : $userid;
$consignee = trim($this->fun->accept('alias', 'P', true, true));
$consignee = $this->fun->substr($consignee, 12);
$email = $this->fun->accept('email', 'P', true, true);
$country = intval($this->fun->accept('cityone', 'P'));
$country = empty($country) ? 0 : $country;
$province = intval($this->fun->accept('citytwo', 'P'));
$province = empty($province) ? 0 : $province;
$city = intval($this->fun->accept('citythree', 'P'));
$city = empty($city) ? 0 : $city;
$district = intval($this->fun->accept('district', 'P'));
$district = empty($district) ? 0 : $district;
$address = trim($this->fun->accept('address', 'P', true, true));
$address = $this->fun->substr($address, 120);
$zipcode = trim($this->fun->accept('zipcode', 'P', true, true));
$zipcode = $this->fun->substr($zipcode, 10);
$tel = trim($this->fun->accept('tel', 'P', true, true));
$tel = $this->fun->substr($tel, 20);
$mobile = trim($this->fun->accept('mobile', 'P', true, true));
$mobile = $this->fun->substr($mobile, 15);
$sendtime = intval($this->fun->accept('sendtime', 'R'));
$content = trim($this->fun->accept('content', 'P', true, true));
$content = $this->fun->substr($content, 500);
$invpayee = trim($this->fun->accept('invpayee', 'P', true, true));
$invpayee = $this->fun->substr($invpayee, 60);
$invcontent = trim($this->fun->accept('invcontent', 'P', true, true));
$invcontent = $this->fun->substr($invcontent, 60);
$opid = intval($this->fun->accept('opid', 'P'));
$opid = empty($opid) ? 0 : $opid;
$osid = intval($this->fun->accept('osid', 'P'));
$osid = empty($osid) ? 0 : $osid;
$productmoney = floatval($this->fun->accept('productmoney', 'P'));
$discount_productmoney = floatval($this->fun->accept('discount_productmoney', 'P'));
$discountmoney = floatval($this->fun->accept('discountmoney', 'P'));
$cookiceprice = $this->fun->eccode(md5("{$productmoney}|{$discount_productmoney}"), 'ENCODE', db_pscode);
if ($uncartid && is_array($uncartid) && !empty($ordersncode) && $cookiceprice == $ordersncode) {
$ptitle = $this->fun->accept('ptitle', 'P');
$tsn = $this->fun->accept('tsn', 'P');
$bprice = $this->fun->accept('bprice', 'P');
$oprice = $this->fun->accept('oprice', 'P');
$did = $this->fun->accept('did', 'P');
$amount = $this->fun->accept('amount', 'P');
$countprice = $this->fun->accept('countprice', 'P');
if (empty($did) || empty($bprice) || empty($amount) || empty($countprice) || empty($opid) || empty($osid)) {
$buylink = $this->get_link('order', array(), admin_LNG);
$this->callmessage($this->lng['order_input_err'], $buylink, $this->lng['oder_buy_goback']);
}
if (!preg_match("/^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+\$/i", $email)) {
$this->callmessage($this->lng['email_err'], $_SERVER['HTTP_REFERER'], $this->lng['gobackbotton']);
}
$payprice = 0;
$shipprice = 0;
$payread = !empty($opid) ? $this->get_payplug_view($opid) : 0;
$shipprice = !empty($osid) ? $this->get_shipplug_view($osid, 'price') : 0;
$shipprice = floatval($shipprice);
if ($payread['payis'] > 0) {
$payread['payis'] = floatval($payread['payis']);
$payprice = $payread['payis'] / 100 * $discount_productmoney;
}
$orderamount = $discount_productmoney + $payprice + $shipprice;
$order_snfont = $this->CON['order_snfont'];
$ordersn = $order_snfont . date('YmdHis') . rand(100, 9999);
$db_table = db_prefix . 'order';
$db_table2 = db_prefix . 'order_info';
$addtime = time();
$db_field = 'ordersn,userid,ordertype,osid,opid,shippingsn,paysn,consignee,country,province,city,district,address,
zipcode,tel,mobile,email,sendtime,invpayee,invcontent,content,treatnote,paytime,shippingtime,productmoney,shippingmoney,
paymoney,orderamount,discount,integral,addtime';
$db_values = "'{$ordersn}',{$userid},1,{$osid},{$opid},'','','{$consignee}',{$country},{$province},{$city},{$district},'{$address}',\n\t\t\t\t'{$zipcode}','{$tel}','{$mobile}','{$email}','{$sendtime}','{$invpayee}','{$invcontent}','{$content}','',0,0,{$productmoney},{$shipprice},\n\t\t\t\t{$payprice},{$orderamount},{$discountmoney},0,{$addtime}";
$this->db->query('INSERT INTO ' . $db_table . ' (' . $db_field . ') VALUES (' . $db_values . ')');
$insert_id = $this->db->insert_id();
$db_values = '';
$arraycount = count($did) - 1;
foreach ($did as $key => $value) {
$value = intval($value);
$oprice[$key] = floatval($oprice[$key]);
$bprice[$key] = floatval($bprice[$key]);
$countprice[$key] = floatval($countprice[$key]);
$amount[$key] = intval($amount[$key]);
if ($key == $arraycount) {
$db_values .= "({$insert_id},{$value},'{$tsn[$key]}','{$ptitle[$key]}',{$oprice[$key]},{$bprice[$key]},{$countprice[$key]},{$amount[$key]},1)";
} else {
$db_values .= "({$insert_id},{$value},'{$tsn[$key]}','{$ptitle[$key]}',{$oprice[$key]},{$bprice[$key]},{$countprice[$key]},{$amount[$key]},1),";
}
//.........这里部分代码省略.........
示例15: intval
function in_getvalidatecode()
{
parent::start_pagetemplate();
parent::member_purview();
$userid = intval($this->ec_member_username_id);
$username = $this->fun->accept('username', 'P');
$mobile = trim($this->fun->accept('mobile', 'P', true, true));
if (empty($userid) || empty($username) || empty($mobile)) {
exit('false');
}
if (!preg_match("/^[^!@~`\\'\"#\$\\%\\^&\\*\\(\\)\\+\\-\\{\\}\\[\\]\\|\\/\\?\\<\\>\\,\\.\\:\\;]{2,16}\$/i", $username)) {
exit('false');
}
if (!preg_match("/^1[0-9]{10}\$/i", $mobile)) {
exit('false');
}
$mobliesn = $this->fun->random(8, 1);
$date = time();
$db_table = db_prefix . 'member';
$db_where = "userid={$this->ec_member_username_id} AND username='{$this->ec_member_username}'";
$db_set = "mobliesn='{$mobliesn}',mobliesntime={$date}";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . ' WHERE ' . $db_where);
if ($this->CON['is_moblie']) {
$rsMember = $this->get_member('', $this->ec_member_username_id);
$rsMember['idcode'] = $mobliesn;
$this->membersmssend($rsMember, $mobile, 'mobliecode');
}
}