function setsmtp() { $smtp = new TableClass("smtpaccount", 'eid'); //设置总数和数组 $this->smtpcount = $smtp->getcount("state=1"); $this->smtparray = $smtp->getdata("", "state=1"); //查询获取数据 unset($smtp); }
if (empty($action)) { InitGP(array("type", "raction", "orderby", "orderway", "keywords")); //初始化变量全局返回 if (!empty($type)) { $wherestr[] = "type='{$type}'"; } if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 $orderway = $orderway == "desc" ? "desc" : "asc"; if (!empty($orderby)) { $orderstr = "{$orderby} {$orderway}"; } //获取当前页码 $total = $Table->getcount($wheresql); //总信息数 $pagesize = 20; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $Table->getdata("{$offset},{$pagesize}", $wheresql, $orderstr); //获取团购数据 //print_r($dataarray); //包含后台模板文件 include "tpl/admin_list.htm"; } elseif ($action == "updatestate" && !empty($ids)) { //更改状态 $state = GetNum($state);
<?php include "common.inc.php"; InitGP(array("action", "sid", 'page')); //初始化变量全局返回 $specialobj = new TableClass('special', 'sid'); if (empty($action)) { $wherestr[] = "flag='hd'"; if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 //获取当前页码 $total = $specialobj->getcount($wheresql); //总信息数 if ($total > 1000) { $total = 1000; } //显示最大一千条 $pagesize = 6; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $specialobj->getdata("{$offset},{$pagesize}", $wheresql, "", 'sid,title,flag,about,pic,listorder,addtime'); //获取数据 //获取头条和推荐 $topharray = $specialobj->getdata(1, "flag='hd'", 'listorder asc,sid desc', 'sid,title,flag,about,pic,listorder,addtime'); $topcarray = $specialobj->getdata(3, "flag='hd'", 'listorder asc,sid desc', 'sid,title,flag,about,pic,listorder,addtime'); include template('special');
$typename = $gtype['typename']; } else { $cgtype = $typeobj->getone($gtype['node']); $typename = $cgtype['typename']; $position = "<span>></span><a href='recommend.php?action=list&tid=" . $cgtype['typeid'] . "'>" . $cgtype['typename'] . "</a>"; $position .= "<span>></span><a href='recommend.php?action=list&tid=" . $gtype['typeid'] . "'>" . $gtype['typename'] . "</a>"; } $tids[] = $tid; $wherestr[] = "gtypeid in(" . getdotstring($tids, 'int') . ")"; $wherestr[] = "Audit=1"; if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 //获取当前页码 $total = $goodsobj->getcount($wheresql); //总信息数 $pagesize = 12; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $goodsobj->getdata("{$offset},{$pagesize}", $wheresql, 'listorder asc,gid desc', 'gid,gtypeid,goodsurl,goodsname,goodsprice,goodsseller,goodsimg,sellerurl,shopname,rindex,views,buynum,listorder,flag,addtime'); //获取数据 //print_r($dataarray); include template('recommend_list'); //包含输出指定模板 } elseif ($action == 'view') { $gid = GetNum($gid); $value = $goodsobj->getone($gid);
include "common.inc.php"; InitGP(array("action", "page")); //初始化变量全局返回 //include_once(INC_PATH."/guestbook.class.php"); //$Table=new GuestBookClass(); $Table = new TableClass('sendorder', 'sid'); $wherestr[] = "showcomment = 1"; $wherestr[] = "state=3"; $wherestr[] = "commenttime <> ''"; $wherestr[] = "reply <> ''"; if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 //获取当前页码 $total = $Table->getcount($wheresql . " and state=3 and commenttime <> ''"); //总信息数 $pagesize = 10; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $Table->getdata("{$offset},{$pagesize}", $wheresql, "sid desc"); //获取团购数据 foreach ($dataarray as &$val) { $face = DB::result_first("select face from dg_users where uname='" . $val['uname'] . "'"); $val['face'] = $face; } //读取编辑推荐 $goodsobj = new TableClass('goods', 'gid');
if (!empty($s)) { $s = strtotime($s); $wherestr[] = "addtime > '{$s}'"; } if (!empty($e)) { $e = strtotime($e); $wherestr[] = "addtime < '{$e}'"; } $r = new TableClass("scorerecord", "sid"); if (!empty($_USERS['uname'])) { $uname = $_USERS['uname']; $wherestr[] = "uname='{$uname}'"; if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 //获取当前页码 $total = $r->getcount($wheresql); //总信息数 $pagesize = 10; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $r->getdata("{$offset},{$pagesize}", $wheresql); //获取团购数据 } //print_r($dataarray); include template('member_scorerecords'); //包含输出指定模板
<?php //帮助中心 include "common.inc.php"; InitGP(array("action", "nid", 'page')); //初始化变量全局返回 $newsobj = new TableClass('news', 'nid'); if (empty($action)) { //$wherestr[]="flag<>'c'"; if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 //获取当前页码 $total = $newsobj->getcount($wheresql); //总信息数 if ($total > 1000) { $total = 1000; } //显示最大一千条 $pagesize = 15; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $newsobj->getdata("{$offset},{$pagesize}", $wheresql); //获取数据 //获取头条和推荐 include template('news'); //包含输出指定模板
$smtp = new TableClass("smtpaccount", "eid"); if (empty($action)) { InitGP(array("email", "eid")); //初始化变量全局返回 if (!empty($uname)) { $wherestr[] = "email like '%{$email}%'"; } if (!empty($tid)) { $wherestr[] = "state in({$tid})"; } if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 //获取当前页码 $total = $smtp->getcount($wheresql); //总信息数 $pagesize = 15; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $smtp->getdata("{$offset},{$pagesize}", $wheresql); //获取团购数据 //包含后台模板文件 include "tpl/smtp_list.htm"; } elseif ($action == "edit") { InitGP(array("eid", "smtp_server", "smtp_port", "smtp_email", "smtp_account", "smtp_password", "reply_address", "smtp_auth", "smtp_ssl", "state", "Submit")); //初始化变量全局返回 if (!empty($Submit)) {
<?php include "common.inc.php"; InitGP(array("action", "did", 'page')); //初始化变量全局返回 $discountobj = new TableClass('discount', 'did'); if (empty($action)) { //$wherestr[]="flag<>'c'"; if (!empty($wherestr)) { $wheresql = implode(' AND ', $wherestr); } //条件汇总 //获取当前页码 $total = $discountobj->getcount($wheresql); //总信息数 if ($total > 1000) { $total = 1000; } //显示最大一千条 $pagesize = 12; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $discountobj->getdata("{$offset},{$pagesize}", $wheresql, "", 'did,title,flag,about,pic,discounttime,discounturl,listorder,addtime'); //获取数据 //获取头条和推荐 $topharray = $discountobj->getdata(1, "flag='h'", 'listorder asc,did desc', 'did,title,flag,about,pic,listorder,addtime'); $topcarray = $discountobj->getdata(6, "flag='c'", 'listorder asc,did desc', 'did,title,flag,about,pic,discounttime,listorder,addtime'); include template('discount');