public function collect() { parent::page(20, $this->_goods); $this->_tpl->assign('FrontTenNav', $this->_nav->findFrontTenNav()); $this->_tpl->assign('collectGoods', $this->_goods->collectGoods()); $this->_tpl->display(SMARTY_FRONT . 'public/member_collect.tpl'); }
private function show() { parent::page($this->_model->getPremissionTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '权限列表'); $this->_tpl->assign('AllPremission', $this->_model->getAllLimitPremission()); }
private function show() { parent::page($this->_model->getUserTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', 'Member List'); $_object = $this->_model->getAllUser(); foreach ($_object as $_value) { switch ($_value->state) { case 0: $_value->state = 'disabled member'; break; case 1: $_value->state = 'member to be approved'; break; case 2: $_value->state = 'junior member'; break; case 3: $_value->state = 'senior member'; break; case 4: $_value->state = 'vip member'; break; } } $this->_tpl->assign('AllUser', $_object); }
private function adminShow() { parent::page($this->model->getAdminAllCommentTotal(), 5); $article = new articleModel(); $user = new userModel(); //Tools::dump($this->model->getAdminAllComment()); $data = $this->model->getAdminAllComment(); foreach ($data as $value) { $article->id = $value->aid; $oneArticle = $article->getOneArticle(); //Tools::dump($oneArticle); $value->title = $oneArticle->title; switch ($value->state) { case 0: $value->state = "<span style='color:red;'>[否]</span>\r\n\t\t\t\t\t\t\t<a href='?a=comment&action=state&flag=show&id=" . $value->id . "'>通过</a>"; break; case 1: $value->state = "<span style='color:green;'>[是]</span>\r\n\t\t\t\t\t\t\t<a href='?a=comment&action=state&flag=hide&id=" . $value->id . "'>否决</a>\t"; } $user->id = $value->uid; $oneUser = $user->getOneUserByID(); $value->username = $oneUser->username; } $this->smarty->assign("data", $data); $this->smarty->assign("show", true); }
private function showComment() { if (isset($_GET['cid'])) { parent::__construct($this->_tpl, new CommentModel()); $this->_model->cid = $_GET['cid']; $_content = new ContentModel(); $_content->id = $_GET['cid']; if (!$_content->getOneContent()) { Tool::alertBack('comment not existing'); } parent::page($this->_model->getCommentTotal()); $_object = $this->_model->getAllComment(); $_object2 = $this->_model->getHotThreeComment(); $_object3 = $_content->getHotTwentyComment(); $this->setObject($_object); $this->setObject($_object2); $this->_tpl->assign('titlec', $_content->getOneContent()->title); $this->_tpl->assign('info', $_content->getOneContent()->info); $this->_tpl->assign('id', $_content->getOneContent()->id); $this->_tpl->assign('cid', $this->_model->cid); $this->_tpl->assign('AllComment', $_object); $this->_tpl->assign('HotThreeComment', $_object2); $this->_tpl->assign('HotTwentyComment', $_object3); } else { Tool::alertBack('illegal act'); } }
private function show() { parent::page($this->_model->getNavTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', 'Navigation List'); $this->_tpl->assign('AllNav', $this->_model->getAllNav()); }
private function show() { parent::page($this->_model->getUserTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '会员列表'); $_object = $this->_model->getAllUser(); foreach ($_object as $_value) { switch ($_value->state) { case 0: $_value->state = '被封杀的会员'; break; case 1: $_value->state = '待审核的会员'; break; case 2: $_value->state = '初级会员'; break; case 3: $_value->state = '中级会员'; break; case 4: $_value->state = '高级会员'; break; case 5: $_value->state = 'VIP会员'; break; } } $this->_tpl->assign('AllUser', $_object); }
private function show() { parent::page($this->_model->getLevelTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', 'Level List'); $this->_tpl->assign('AllLevel', $this->_model->getAllLimitLevel()); }
private function show() { parent::page($this->_model->getLinkTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '友情链接列表'); $_object = $this->_model->getAllLink(); Tool::subStr($_object, 'weburl', 20, 'utf-8'); Tool::subStr($_object, 'logourl', 20, 'utf-8'); if ($_object) { foreach ($_object as $_value) { switch ($_value->type) { case 1: $_value->type = '文字链接'; break; case 2: $_value->type = 'Logo链接'; break; } if (empty($_value->state)) { $_value->state = '<span class="red">[未审核]</span> | <a href="link.php?action=state&type=ok&id=' . $_value->id . '">通过</a>'; } else { $_value->state = '<span class="green">[已通过]</span> | <a href="link.php?action=state&type=cancel&id=' . $_value->id . '">取消</a>'; } } } $this->_tpl->assign('AllLink', $_object); }
private function show() { parent::page($this->model->getAllCategoryTotal()); $data = $this->model->getAllCategory(); $this->smarty->assign("data", $data); $this->smarty->assign("show", true); }
private function show() { parent::page($this->_model->getManageTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '管理员列表'); $this->_tpl->assign('AllManage', $this->_model->getAllManage()); }
public function index() { parent::page(); if (isset($_GET['sid'])) { $this->_tpl->assign('OneNav', $this->_model->findOne()); } $this->_tpl->assign('AllNav', $this->_model->findAll()); $this->_tpl->display(SMARTY_ADMIN . 'nav/show.tpl'); }
private function show() { //$_page = new Page($this->_model->getManageTotal(),PAGE_SIZE); //$this->_model->limit = $_page->limit; parent::page($this->_model->getManageTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '管理员列表'); $this->_tpl->assign('AllManage', $this->_model->getAllManage()); //$this->_tpl->assign('page',$_page->showpage()); }
private function show() { parent::page($this->_model->getContentTotal(), PAGE_SIZE); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '内容列表'); $_reg = ''; if (isset($_GET['p']) && is_numeric($_GET['p'])) { $_reg = 'AND r.pid=' . $_GET['p']; $this->_tpl->assign('pid', $_GET['p']); } $this->_model->reg = $_reg; $this->_tpl->assign('AllContent', $this->_model->getAllContent()); $this->getMenu(); }
public function index() { parent::page(15, $this->_goods); $this->_tpl->assign('ListGoods', $this->_goods->findListGoods()); $this->_tpl->assign('FrontNav', $this->_nav->findFrontNav()); $this->_tpl->assign('FrontTenNav', $this->_nav->findFrontTenNav()); $this->_tpl->assign('FrontPrice', $this->_nav->findFrontPrice()); $this->_tpl->assign('FrontBrand', $this->_nav->findFrontBrand()); $this->_tpl->assign('FrontAttr', $this->_nav->findFrontAttr()); $this->_tpl->assign('FrontRecord', $this->_goods->getRecord()); $this->_tpl->assign('NavSort', $this->_goods->navSort()); $this->_tpl->assign('url', Tool::getUrl()); $this->_tpl->display(SMARTY_FRONT . 'public/list.tpl'); }
public function index() { parent::page(20, $this->_commend); parent::page(20, $this->_record); $this->_tpl->assign('Commend', $this->_commend->findDetailsCommend()); $this->_tpl->assign('FrontNav', $this->_nav->findFrontNav()); $this->_tpl->assign('FrontTenNav', $this->_nav->findFrontTenNav()); $this->_tpl->assign('FrontGoods', $this->_goods->findDetailsGoods()); $this->_tpl->assign('attrType', $this->_attr->getAttrType()); $this->_tpl->assign('record', $this->_record->findDetailsRecord()); $this->_tpl->assign('FrontRecord', $this->_goods->getRecord()); $this->_tpl->assign('NavSort', $this->_goods->navSort()); $this->_tpl->assign('domain', Tool::getDomain()); $this->_tpl->display(SMARTY_FRONT . 'public/details.tpl'); }
public function index() { parent::page('20', $this->commend); parent::page('20', $this->record, 'recordPage'); $this->tpl->assign('oneGoods', $this->goods->getDetailsGoods()); $this->tpl->assign('oneFrontNav', $this->nav->getFrontNav()); $this->tpl->assign('attrType', $this->attr->getAttrType()); $this->tpl->assign('allRecord', $this->record->getDetailsRecord()); $this->tpl->assign('frontTenNav', $this->nav->getFrontTenNav()); $this->tpl->assign('domain', Tool::getDoMain()); $this->tpl->assign('hotSale', $this->goods->getHotSale()); $this->tpl->assign('history', $this->goods->getHistory()); $this->tpl->assign('allCommend', $this->commend->findAll()); $this->tpl->assign('cartGoodsCount', $this->cart->getCount()); $this->tpl->display(FRONT_STYLE . 'public/details.tpl'); }
private function admin() { parent::page($this->model->getAllFeedbackTotal(), 5); $AllFeedback = $this->model->getAllFeedback(); //Tools::dump($AllFeedback); foreach ($AllFeedback as $value) { switch ($value->state) { case 0: $value->state = "<span style='color:red;'>[未处理]</span>\n\t\t\t\t\t\t\t<a href='?a=feedback&action=state&flag=show&id=" . $value->id . "'>处理</a>"; break; case 1: $value->state = "<span style='color:green;'>[已处理]</span>\n\t\t\t\t\t\t\t<a href='?a=feedback&action=state&flag=hide&id=" . $value->id . "'>未处理</a>\t"; } } $this->smarty->assign("AllFeedback", $AllFeedback); $this->smarty->assign("admin", true); }
public function adminShow() { parent::page($this->model->getAllProductTotal(), 5); $allProducts = $this->model->getAllProducts(); $category = new categoryModel(); foreach ($allProducts as $key => $value) { $category->id = $value->cid; $oneCategory = $category->getOneCategory(); $value->cid = $oneCategory->name; $attrArr = explode(",", $value->attr); $attrStr = null; foreach ($attrArr as $v) { switch ($v) { case "headline": $attrStr .= "头条,"; break; case "recommend": $attrStr .= "推荐,"; break; case "focus": $attrStr .= "焦点,"; break; case "topic": $attrStr .= "专题"; break; case "pickup": $attrStr .= "精选"; break; } } switch ($value->state) { case 0: $value->state = "<span style='color:red;'>[否]</span>\r\n\t\t\t\t\t\t\t<a href='?a=product&action=state&type=item&flag=show&id=" . $value->id . "'>显示</a>"; break; case 1: $value->state = "<span style='color:green;'>[是]</span>\r\n\t\t\t\t\t\t\t<a href='?a=product&action=state&type=item&flag=hide&id=" . $value->id . "'>隐藏</a>\t"; break; } $attrStr = rtrim($attrStr, ","); $value->attr = $attrStr; } $this->smarty->assign("allProducts", $allProducts); $this->smarty->assign("show", true); $this->smarty->display("admin/product.html"); }
private function show() { parent::page($this->_model->getCommentListTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '评论列表'); $_object = $this->_model->getCommentList(); Tool::subStr($_object, 'content', 30, 'utf-8'); if ($_object) { foreach ($_object as $_value) { if (empty($_value->state)) { $_value->state = '<span class="red">[未审核]</span> | <a href="comment.php?action=state&type=ok&id=' . $_value->id . '">通过</a>'; } else { $_value->state = '<span class="green">[已审核]</span> | <a href="comment.php?action=state&type=cancel&id=' . $_value->id . '">取消</a>'; } } } $this->_tpl->assign('CommentList', $_object); }
private function show() { parent::page($this->_model->getRotatainTotal()); $this->_tpl->assign('show', true); $this->_tpl->assign('title', '轮播器列表'); $_object = $this->_model->getAllRotatain(); Tool::subStr($_object, 'title', 20, 'utf-8'); Tool::subStr($_object, 'link', 20, 'utf-8'); if ($_object) { foreach ($_object as $_value) { if (empty($_value->state)) { $_value->state = '<span class="red">[否]</span> | <a href="rotatain.php?action=state&type=ok&id=' . $_value->id . '">确定</a>'; } else { $_value->state = '<span class="green">[是]</span> | <a href="rotatain.php?action=state&type=cancel&id=' . $_value->id . '">取消</a>'; } } } $this->_tpl->assign('AllRotatain', $_object); }
private function searchKeyword() { if ($_GET['type'] == 2) { if (empty($_GET['inputkeyword'])) { Tool::alertBack('search keyword empty'); } $this->_model->inputkeyword = $_GET['inputkeyword']; parent::page($this->_model->searchKeywordContentTotal(), ARTICLE_SIZE); $_object = $this->_model->searchKeywordContent(); if ($_object) { foreach ($_object as $_value) { if (empty($_value->thumbnail)) { $_value->thumbnail = 'images/none.jpg'; } $_value->keyword = str_replace($this->_model->inputkeyword, '<span class="red">' . $this->_model->inputkeyword . '</span>', $_value->keyword); } } $this->_tpl->assign('SearchContent', $_object); } }
private function searchTag() { if ($_GET['type'] == 3) { $this->_model->inputkeyword = $_GET['inputkeyword']; parent::page($this->_model->searchTagContentTotal(), ARTICLE_SIZE); $_object = $this->_model->searchTagContent(); Tool::subStr($_object, 'info', 120, 'utf-8'); Tool::subStr($_object, 'title', 35, 'utf-8'); if ($_object) { foreach ($_object as $_value) { if (empty($_value->thumbnail)) { $_value->thumbnail = 'images/none.jpg'; } } } $_tag = new TagModel(); $_tag->tagname = $this->_model->inputkeyword; $_tag->getOneTag() ? $_tag->addTagCount() : $_tag->addTag(); $this->_tpl->assign('SearchContent', $_object); } }
private function show() { $this->_tpl->assign('show', true); $this->_tpl->assign('title', 'Article List'); $this->nav(); $_nav = new NavModel(); if (empty($_GET['nav'])) { $_id = $_nav->getAllNavChildId(); $this->_model->nav = Tool::objArrOfStr($_id, 'id'); } else { $_nav->id = $_GET['nav']; if (!$_nav->getOneNav()) { Tool::alertBack('nav not existing'); } $this->_model->nav = $_nav->id; } parent::page($this->_model->getListContentTotal()); $_object = $this->_model->getListContent(); Tool::subStr($_object, 'title', 20, null); $this->_tpl->assign('SearchContent', $_object); }
private function getListContent() { if (isset($_GET['id'])) { parent::__construct($this->_tpl, new ContentModel()); $_nav = new NavModel(); $_nav->id = $_GET['id']; $_navid = $_nav->getNavChildId(); if ($_navid) { $this->_model->nav = Tool::objArrOfStr($_navid, 'id'); } else { $this->_model->nav = $_nav->id; } parent::page($this->_model->getListContentTotal(), ARTICLE_SIZE); $_object = $this->_model->getListContent(); Tool::subStr($_object, 'info', 120, 'utf-8'); Tool::subStr($_object, 'title', 35, 'utf-8'); if ($_object) { foreach ($_object as $_value) { if (empty($_value->thumbnail)) { $_value->thumbnail = 'images/none.jpg'; } } } $this->_tpl->assign('AllListContent', $_object); $_object = $this->_model->getMonthNavRec(); $this->setObject($_object); $this->_tpl->assign('MonthNavRec', $_object); $_object = $this->_model->getMonthNavHot(); $this->setObject($_object); $this->_tpl->assign('MonthNavHot', $_object); $_object = $this->_model->getMonthNavPic(); $this->setObject($_object); $this->_tpl->assign('MonthNavPic', $_object); } else { Tool::alertBack('警告:非法操作!'); } }
private function showchild() { if (isset($_GET['id'])) { $this->_model->id = $_GET['id']; $_vote = $this->_model->getOneVote(); if (!$_vote) { Tool::alertBack('警告:不存在此主题!'); } parent::page($this->_model->getChildVoteTotal()); $this->_tpl->assign('id', $_vote->id); $this->_tpl->assign('titlec', $_vote->title); $this->_tpl->assign('showchild', true); $this->_tpl->assign('title', '投票项目列表'); $this->_tpl->assign('prev_url', PREV_URL); $this->_tpl->assign('AllChildVote', $this->_model->getAllChildVote()); } }
private function showSubject() { parent::page($this->model->getAllSubjectTotal()); //Tools::dump($this->model->getAllSubject()); $data = $this->model->getAllSubject(); foreach ($data as $value) { //echo $value->state="hello"; switch ($value->state) { case 0: $value->state = "<span style='color:red;'>[否]</span>\r\n\t\t\t\t\t\t\t<a href='?a=vote&action=state&flag=show&id=" . $value->id . "'>显示</a>"; break; case 1: $value->state = "<span style='color:green;'>[是]</span>\r\n\t\t\t\t\t\t\t<a href='?a=vote&action=state&flag=hide&id=" . $value->id . "'>隐藏</a>\t"; break; } } $this->smarty->assign("data", $data); $this->smarty->assign("showSubject", true); }
private function show() { //Tools::dump($_GET); //没有提交表单的话,kind的值是1234 $value = "selected='selected'"; if (empty($_GET['kind'])) { $this->model->kind = "1,2,3,4"; $this->smarty->assign("all", $value); } else { //提交哪个值,就显示哪个类型; $this->model->kind = $_GET['kind']; switch ($this->model->kind) { case 1: $this->smarty->assign("fullcolumn", $value); break; case 2: $this->smarty->assign("banner", $value); break; case 3: $this->smarty->assign("slider", $value); break; case 4: $this->smarty->assign("sidebar", $value); break; } } //exit(); //Tools::dump($this->model->getAllAd()); parent::page($this->model->getAllAdTotal(), 5); $AllAd = $this->model->getAllAd(); foreach ($AllAd as $value) { //把类型显示为汉字 switch ($value->type) { case "1": $value->type = "通栏广告"; break; case '2': $value->type = "Banner广告"; break; case "3": $value->type = "Slider广告"; break; case "4": $value->type = "侧栏广告"; break; } switch ($value->state) { case 0: $value->state = "<span style='color:red;'>[否]</span>\r\n\t\t\t\t\t\t\t<a href='?a=ad&action=state&flag=show&id=" . $value->id . "'>显示</a>"; break; case 1: $value->state = "<span style='color:green;'>[是]</span>\r\n\t\t\t\t\t\t\t<a href='?a=ad&action=state&flag=hide&id=" . $value->id . "'>隐藏</a>\t"; } } $this->smarty->assign("AllAd", $AllAd); $this->smarty->assign("show", true); }
private function show() { $permission = new permissionModel(); $data = $permission->getPID("管理员管理"); if (!strstr($_SESSION['oneAdmin']->permission, $data->id)) { exit("权限不够"); } $level = new levelModel(); $AllLevel = $level->getAllLevel(); $levelStr = null; foreach ($AllLevel as $value) { $levelStr .= $value->id . ","; } $levelStr = rtrim($levelStr, ","); //echo $levelStr; if (empty($_GET['level'])) { $this->model->level_id = $levelStr; } else { $this->model->level_id = $_GET['level']; } parent::page($this->model->getAllAdminTotal()); $data = $this->model->getAllAdmin(); //Tools::dump($data); $this->level($_GET['level']); $this->smarty->assign("data", $data); $this->smarty->assign("show", true); }
private function show() { $permission = new permissionModel(); $AllPermission = $permission->getAllPermission(); parent::page($this->model->getAllLevelTotal()); $data = $this->model->getAllLevel(); $this->smarty->assign("data", $data); $this->smarty->assign("show", true); }