コード例 #1
0
ファイル: mb_special.php プロジェクト: wangjiang988/ukshop
 /**
  * 页面内导航菜单
  * @param string 	$menu_key	当前导航的menu_key
  * @param array 	$array		附加菜单
  * @return
  */
 private function show_menu($menu_key = '')
 {
     $menu_array = array();
     if ($menu_key == 'index_edit') {
         $menu_array[] = array('menu_key' => 'index_edit', 'menu_name' => '编辑', 'menu_url' => 'javascript:;');
     } else {
         $menu_array[] = array('menu_key' => 'special_list', 'menu_name' => '列表', 'menu_url' => uk86_urlAdmin('mb_special', 'special_list'));
     }
     if ($menu_key == 'special_item_list') {
         $menu_array[] = array('menu_key' => 'special_item_list', 'menu_name' => '编辑专题', 'menu_url' => 'javascript:;');
     }
     if ($menu_key == 'index_edit') {
         tpl::output('item_title', '首页编辑');
     } else {
         tpl::output('item_title', '专题设置');
     }
     Tpl::output('menu', $menu_array);
     Tpl::output('menu_key', $menu_key);
 }
コード例 #2
0
 /**
  * 选择活动商品
  **/
 public function choose_goodsOp()
 {
     $xianshi_id = intval($_GET['xianshi_id']);
     $xianshi_info = $this->get_xianshi_info($xianshi_id);
     //如果已经发布不能再选择商品
     if (intval($xianshi_info['state']) !== self::XIANSHI_STATE_UNPUBLISHED) {
         showMessage(Language::get('param_error'), '', '', 'error');
     }
     Tpl::output('xianshi_info', $xianshi_info);
     $this->output_xianshi_state_list();
     $model_xianshi_goods = Model('p_xianshi_goods');
     $xianshi_goods_count = $model_xianshi_goods->getCount(array('xianshi_id' => $xianshi_id));
     Tpl::output('xianshi_goods_count', $xianshi_goods_count);
     //已经添加的商品列表
     $xianshi_goods_list = $model_xianshi_goods->getList(array('quota_id' => $xianshi_info['quota_id'], 'state' => self::XIANSHI_GOODS_STATE_NORMAL));
     $xianshi_goods_id_list = array();
     if (!empty($xianshi_goods_list)) {
         foreach ($xianshi_goods_list as $xianshi_goods) {
             $xianshi_goods_id_list[] = $xianshi_goods['goods_id'];
         }
     }
     tpl::output('xianshi_goods_id_list', $xianshi_goods_id_list);
     $model_goods = Model('goods');
     $page = new Page();
     $page->setEachNum(10);
     $page->setStyle('admin');
     $param = array();
     $param['store_id'] = $_SESSION['store_id'];
     $param['goods_name'] = trim($_GET['goods_name']);
     $param['order'] = 'goods_id desc';
     $goods_list = $model_goods->getGoods($param, $page, '*', 'goods');
     Tpl::output('list', $goods_list);
     //输出分页
     Tpl::output('show_page', $page->show());
     //输出导航
     self::profile_menu('choose_goods');
     Tpl::showpage('store_promotion_xianshi.goods');
 }