예제 #1
0
 /**
  * U币日志列表
  */
 public function points_logOp()
 {
     $condition_arr = array();
     $condition_arr['pl_memberid'] = $_SESSION['member_id'];
     if ($_GET['stage']) {
         $condition_arr['pl_stage'] = $_GET['stage'];
     }
     $condition_arr['saddtime'] = strtotime($_GET['stime']);
     $condition_arr['eaddtime'] = strtotime($_GET['etime']);
     if ($condition_arr['eaddtime'] > 0) {
         $condition_arr['eaddtime'] += 86400;
     }
     $condition_arr['pl_desc_like'] = $_GET['description'];
     //分页
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     //查询U币日志列表
     $points_model = Model('points');
     $list_log = $points_model->getPointsLogList($condition_arr, $page, '*', '');
     //信息输出
     self::profile_menu('points');
     Tpl::output('show_page', $page->uk86_show());
     Tpl::output('list_log', $list_log);
     Tpl::showpage('member_points');
 }
예제 #2
0
 /**
  * 闲置图片列表,发布闲置调用
  */
 public function pic_listOp()
 {
     /**
      * 分页类
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(12);
     $page->uk86_setStyle('admin');
     /**
      * 实例化相册类
      */
     $model_upload = Model('flea_upload');
     /**
      * 图片列表
      */
     $param = array();
     $param['store_id'] = $_SESSION['member_id'];
     $param['item_id'] = $_GET['goods_id'] ? $_GET['goods_id'] : '0';
     $pic_list = $model_upload->getUploadList($param, $page);
     Tpl::output('pic_list', $pic_list);
     Tpl::output('show_page', $page->uk86_show());
     if ($_GET['item'] == 'goods') {
         Tpl::showpage('store_flea_sample', 'null_layout');
     } elseif ($_GET['item'] == 'des') {
         Tpl::showpage('store_flea_sample_des', 'null_layout');
     }
 }
예제 #3
0
 public function indexOp()
 {
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     /*
      * 得到当前用户的投诉列表
      */
     $model_complain = Model('complain');
     $condition = array();
     $condition['order'] = 'complain_state asc,complain_id desc';
     $condition['accuser_id'] = $_SESSION['member_id'];
     switch (intval($_GET['select_complain_state'])) {
         case 1:
             $condition['progressing'] = 'true';
             break;
         case 2:
             $condition['finish'] = 'true';
             break;
         default:
             $condition['state'] = '';
     }
     $list = $model_complain->getComplain($condition, $page);
     $this->profile_menu('complain_accuser_list');
     Tpl::output('list', $list);
     Tpl::output('show_page', $page->uk86_show());
     $goods_list = $model_complain->getComplainGoodsList($list);
     Tpl::output('goods_list', $goods_list);
     Tpl::showpage('complain.list');
 }
예제 #4
0
 /**
  * 合作伙伴
  */
 public function linkOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model_link = Model('link');
     /**
      * 删除
      */
     if ($_POST['form_submit'] == 'ok') {
         if (is_array($_POST['del_id']) && !empty($_POST['del_id'])) {
             foreach ($_POST['del_id'] as $k => $v) {
                 /**
                  * 删除图片
                  */
                 $v = intval($v);
                 $tmp = $model_link->getOneLink($v);
                 if (!empty($tmp['link_pic'])) {
                     @unlink(BasePath . DS . ATTACH_LINK . DS . $tmp['link_pic']);
                 }
                 unset($tmp);
                 $model_link->del($v);
             }
             //H('link',null);;
             uk86_showMessage($lang['link_index_del_succ']);
         } else {
             uk86_showMessage($lang['link_index_choose_del']);
         }
     }
     /**
      * 检索条件
      */
     $condition['like_link_title'] = $_GET['search_link_title'];
     $condition['order'] = 'link_sort asc';
     Tpl::output('search_link_title', $_GET['search_link_title']);
     /**
      * 分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     if ($_GET['type'] == '0') {
         $condition['link_pic'] = 'yes';
     }
     if ($_GET['type'] == '1') {
         $condition['link_pic'] = 'no';
     }
     $link_list = $model_link->getLinkList($condition, $page);
     /**
      * 整理图片链接
      */
     if (is_array($link_list)) {
         foreach ($link_list as $k => $v) {
             if (!empty($v['link_pic'])) {
                 $link_list[$k]['link_pic'] = UPLOAD_SITE_URL . '/' . ATTACH_PATH . '/common/' . DS . $v['link_pic'];
             }
         }
     }
     Tpl::output('link_list', $link_list);
     Tpl::output('page', $page->uk86_show());
     Tpl::showpage('link.index');
 }
예제 #5
0
 /**
  * 查询买家商品咨询
  */
 public function my_consultOp()
 {
     //实例化商品咨询模型
     $consult = Model('consult');
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $list_consult = array();
     $search_array = array();
     if ($_GET['type'] != '') {
         if ($_GET['type'] == 'to_reply') {
             $search_array['consult_reply'] = '';
         }
         if ($_GET['type'] == 'replied') {
             $search_array['consult_reply'] = array('neq', '');
         }
     }
     $search_array['member_id'] = "{$_SESSION['member_id']}";
     $list_consult = $consult->getConsultList($search_array, $page);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::output('list_consult', $list_consult);
     $_GET['type'] = empty($_GET['type']) ? 'consult_list' : $_GET['type'];
     self::profile_menu('my_consult', $_GET['type']);
     Tpl::showpage('member_my_consult');
 }
예제 #6
0
 public function indexOp()
 {
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $model_complain = Model('complain');
     $condition = array();
     $condition['order'] = 'complain_state asc,complain_id desc';
     $condition['accused_id'] = $_SESSION['store_id'];
     if (trim($_GET['add_time_from']) != '') {
         $add_time_from = strtotime(trim($_GET['add_time_from']));
         if ($add_time_from !== false) {
             $condition['complain_datetime_start'] = $add_time_from;
         }
     }
     if (trim($_GET['add_time_to']) != '') {
         $add_time_to = strtotime(trim($_GET['add_time_to']));
         if ($add_time_to !== false) {
             $condition['complain_datetime_end'] = $add_time_to;
         }
     }
     switch (intval($_GET['state'])) {
         case 1:
             $condition['accused_progressing'] = 'true';
             break;
         case 2:
             $condition['accused_finish'] = 'true';
             break;
         default:
             $condition['accused_all'] = 'true';
     }
     $type = $_GET['type'];
     $key = trim($_GET['key']);
     switch ($type) {
         case 'accuser_name':
             $condition['complain_accuser'] = $key;
             break;
         case 'complain_subject':
             $condition['complain_subject_content'] = $key;
             break;
         default:
             $key = intval($key);
             $condition['complain_id'] = $key;
     }
     $list = $model_complain->getComplain($condition, $page);
     $this->profile_menu('complain_accused_list');
     Tpl::output('list', $list);
     Tpl::output('show_page', $page->uk86_show());
     $goods_list = $model_complain->getComplainGoodsList($list);
     Tpl::output('goods_list', $goods_list);
     Tpl::showpage('complain.list');
 }
예제 #7
0
 /**
  * 活动管理
  */
 public function store_activityOp()
 {
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $activity = Model('activity');
     //活动为商品活动,并且为开启状态
     $list = $activity->getList(array('activity_type' => '1', 'opening' => true, 'order' => 'activity.activity_sort asc'), $page);
     /**
      * 页面输出
      */
     Tpl::output('list', $list);
     Tpl::output('show_page', $page->uk86_show());
     self::profile_menu('store_activity');
     Tpl::showpage('store_activity.list');
 }
예제 #8
0
 /**
  * 商品管理
  */
 public function fleaOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model_goods = Model('flea');
     /**
      * 推荐,编辑,删除
      */
     if ($_POST['form_submit'] == 'ok') {
         if (!empty($_POST['del_id'])) {
             $model_goods->dropGoods(implode(',', $_POST['del_id']));
             uk86_showMessage($lang['goods_index_del_succ']);
         } else {
             uk86_showMessage($lang['goods_index_choose_del']);
         }
         uk86_showMessage($lang['goods_index_argument_invalid']);
     }
     /**
      * 排序
      */
     $condition['keyword'] = trim($_GET['search_goods_name']);
     $condition['like_member_name'] = trim($_GET['search_store_name']);
     //店铺名称
     $condition['brand_id'] = intval($_GET['search_brand_id']);
     $condition['gc_id'] = intval($_GET['cate_id']);
     /**
      * 分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $goods_list = $model_goods->listGoods($condition, $page);
     /**
      * 商品类别
      */
     /**
      * 商品分类
      */
     $model_class = Model('flea_class');
     $goods_class = $model_class->getTreeClassList(1);
     Tpl::output('search', $_GET);
     Tpl::output('goods_class', $goods_class);
     Tpl::output('goods_list', $goods_list);
     Tpl::output('page', $page->uk86_show());
     Tpl::showpage('flea.index');
 }
예제 #9
0
 /**
  * 所有全景制作列表
  *
  */
 public function viewlistOp()
 {
     $model_view = Model('view');
     if (uk86_chksubmit()) {
         if (is_array($_POST['del_id']) && !empty($_POST['del_id'])) {
             $model_upload = Model('upload');
             foreach ($_POST['del_id'] as $k => $v) {
                 $model_view->del($v);
             }
             $this->log(L('article_index_del_succ') . '[ID:' . implode(',', $_POST['del_id']) . ']', null);
             uk86_showMessage($lang['article_index_del_succ']);
         } else {
             uk86_showMessage($lang['article_index_choose']);
         }
     }
     /**
      * 检索条件
      */
     $condition['ac_id'] = intval($_GET['search_ac_id']);
     $condition['like_title'] = trim($_GET['search_title']);
     /**
      * 分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     /**
      * 列表
      */
     $view_list = $model_view->getViewList($condition, $page);
     /**
      * 整理列表内容
      */
     if (!empty($view_list)) {
         foreach ($view_list as $k => $v) {
             /**
              * 发布时间
              */
             $view_list[$k]['view_time'] = date('Y-m-d H:i:s', $v['article_time']);
         }
     }
     Tpl::output('view_list', $view_list);
     Tpl::output('search_ac_id', intval($_GET['search_ac_id']));
     Tpl::showpage('viewlist');
 }
예제 #10
0
 public function inform_listOp()
 {
     /*
      * 生成分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     /*
      * 得到当前用户的举报列表
      */
     $model_inform = Model('inform');
     $condition = array();
     $condition['inform_state'] = intval($_GET['select_inform_state']);
     $condition['inform_member_id'] = $_SESSION['member_id'];
     $condition['order'] = 'inform_id desc';
     $list = $model_inform->getInform($condition, $page);
     $this->profile_menu('inform_list');
     Tpl::output('list', $list);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::showpage('member_inform.list');
 }
예제 #11
0
 /**
  * 买家中心店铺动态
  */
 public function stracelistOp()
 {
     //查询收藏的店铺
     $model_favorites = Model('favorites');
     //条件
     $where = array('member_id' => $_SESSION['member_id']);
     $fav_store_id = $model_favorites->getStoreFavoritesList($where, 'fav_id');
     // 整理
     if (!empty($fav_store_id) && is_array($fav_store_id)) {
         $storeid_array = '';
         foreach ($fav_store_id as $val) {
             $storeid_array[] = $val['fav_id'];
         }
         $where = array('strace_storeid' => array('in', $storeid_array), 'strace_state' => 1);
         $model_stracelog = Model('store_sns_tracelog');
         $count = $model_stracelog->getStoreSnsTracelogCount($where);
         //分页
         $page = new Uk86Page();
         $page->uk86_setEachNum(30);
         $page->uk86_setStyle('admin');
         $page->uk86_setTotalNum($count);
         $delaypage = intval($_GET['delaypage']) > 0 ? intval($_GET['delaypage']) : 1;
         //本页延时加载的当前页数
         $lazy_arr = uk86_lazypage(10, $delaypage, $count, true, $page->uk86_getNowPage(), $page->uk86_getEachNum(), $page->uk86_getLimitStart());
         //动态列表
         $limit = $lazy_arr['limitstart'] . "," . $lazy_arr['delay_eachnum'];
         $strace_array = $count = $model_stracelog->getStoreSnsTracelogList($where, '*', 'strace_id desc', $limit);
         if (!empty($strace_array)) {
             foreach ($strace_array as $key => $val) {
                 if ($val['strace_content'] == '') {
                     $val['strace_goodsdata'] = json_decode($val['strace_goodsdata'], true);
                     if (CHARSET == 'GBK') {
                         foreach ((array) $val['strace_goodsdata'] as $k => $v) {
                             $val['strace_goodsdata'][$k] = Uk86Language::uk86_getGBK($v);
                         }
                     }
                     $content = $model_stracelog->spellingStyle($val['strace_type'], $val['strace_goodsdata']);
                     $strace_array[$key]['strace_content'] = str_replace("%siteurl%", SHOP_SITE_URL . DS, $content);
                 }
             }
         }
         Tpl::output('show_page', $page->uk86_show());
     }
     Tpl::output('hasmore', $lazy_arr['hasmore']);
     Tpl::output('strace_array', $strace_array);
     Tpl::output('type', 'index');
     Tpl::showpage('member_storesns.tracelist', 'null_layout');
 }
예제 #12
0
 /**
  * 评论列表
  */
 public function commentlistOp()
 {
     $comment_model = Model('sns_comment');
     //查询评论总数
     $condition = array();
     //会员名
     if ($_GET['search_uname'] != '') {
         $condition['comment_membername_like'] = trim($_GET['search_uname']);
     }
     //内容
     if ($_GET['search_content'] != '') {
         $condition['comment_content_like'] = trim($_GET['search_content']);
     }
     //状态
     if ($_GET['search_state'] != '') {
         $condition['comment_state'] = "{$_GET['search_state']}";
     }
     //发表时间
     if ($_GET['search_stime'] != '') {
         $condition['stime'] = strtotime($_GET['search_stime']);
     }
     if ($_GET['search_etime'] != '') {
         $condition['etime'] = strtotime($_GET['search_etime']);
     }
     if ($_GET['tid'] != '') {
         $condition['comment_originalid'] = "{$_GET['tid']}";
         $condition['comment_originaltype'] = "0";
         //原帖类型 0表示动态信息 1表示分享商品
     }
     //评价列表
     $page = new Uk86Page();
     $page->uk86_setEachNum(20);
     $page->uk86_setStyle('admin');
     $commentlist = $comment_model->getCommentList($condition, $page);
     Tpl::output('commentlist', $commentlist);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::showpage('snscomment.index');
 }
예제 #13
0
 /**
  * 类型导出
  */
 public function export_step1Op()
 {
     $model_type = Model('type');
     $page = new Uk86Page();
     $page->uk86_setEachNum(self::EXPORT_SIZE);
     $type_list = $model_type->typeList(array('order' => 'type_sort asc'), $page);
     if (!is_numeric($_GET['curpage'])) {
         $count = $page->uk86_getTotalNum();
         $array = array();
         if ($count > self::EXPORT_SIZE) {
             //显示下载链接
             $page = ceil($count / self::EXPORT_SIZE);
             for ($i = 1; $i <= $page; $i++) {
                 $limit1 = ($i - 1) * self::EXPORT_SIZE + 1;
                 $limit2 = $i * self::EXPORT_SIZE > $count ? $count : $i * self::EXPORT_SIZE;
                 $array[$i] = $limit1 . ' ~ ' . $limit2;
             }
             Tpl::output('list', $array);
             Tpl::output('murl', 'index.php?act=type&op=type');
             Tpl::showpage('export.excel');
         } else {
             //如果数量小,直接下载
             $this->createExcel($type_list);
         }
     } else {
         //下载
         $this->createExcel($type_list);
     }
 }
예제 #14
0
 public function inform_subject_listOp()
 {
     //实例化分页
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     //获得举报主题列表
     $model_inform_subject = Model('inform_subject');
     //搜索条件
     $condition = array();
     $condition['order'] = 'inform_subject_id asc';
     $condition['inform_subject_type_id'] = trim($_GET['inform_subject_type_id']);
     $condition['inform_subject_state'] = 1;
     $inform_subject_list = $model_inform_subject->getInformSubject($condition, $page);
     //获取有效举报类型
     $model_inform_subject_type = Model('inform_subject_type');
     $type_list = $model_inform_subject_type->getActiveInformSubjectType();
     $this->show_menu('inform_subject_list');
     Tpl::output('list', $inform_subject_list);
     Tpl::output('type_list', $type_list);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::showpage('inform_subject.list');
 }
예제 #15
0
 /**
  * 某会员的SNS动态列表
  */
 public function tracelistOp()
 {
     $tracelog_model = Model('sns_tracelog');
     $condition = array();
     $condition['trace_memberid'] = $this->master_id;
     switch ($this->relation) {
         case 3:
             $condition['trace_privacyin'] = "";
             break;
         case 2:
             $condition['trace_privacyin'] = "0','1";
             break;
         case 1:
             $condition['trace_privacyin'] = "0";
             break;
         default:
             $condition['trace_privacyin'] = "0";
             break;
     }
     $condition['trace_state'] = "0";
     $count = $tracelog_model->countTrace($condition);
     //分页
     $page = new Uk86Page();
     $page->uk86_setEachNum(30);
     $page->uk86_setStyle('admin');
     $page->uk86_setTotalNum($count);
     $delaypage = intval($_GET['delaypage']) > 0 ? intval($_GET['delaypage']) : 1;
     //本页延时加载的当前页数
     $lazy_arr = uk86_lazypage(10, $delaypage, $count, true, $page->uk86_getNowPage(), $page->uk86_getEachNum(), $page->uk86_getLimitStart());
     //动态列表
     $condition['limit'] = $lazy_arr['limitstart'] . "," . $lazy_arr['delay_eachnum'];
     $tracelist = $tracelog_model->getTracelogList($condition);
     if (!empty($tracelist)) {
         foreach ($tracelist as $k => $v) {
             if ($v['trace_title']) {
                 $v['trace_title'] = str_replace("%siteurl%", SHOP_SITE_URL . DS, $v['trace_title']);
                 $v['trace_title_forward'] = '|| @' . $v['trace_membername'] . Uk86Language::uk86_get('nc_colon') . preg_replace("/<a(.*?)href=\"(.*?)\"(.*?)>@(.*?)<\\/a>([\\s|:|:]|\$)/is", '@${4}${5}', $v['trace_title']);
             }
             if (!empty($v['trace_content'])) {
                 //替换内容中的siteurl
                 $v['trace_content'] = str_replace("%siteurl%", SHOP_SITE_URL . DS, $v['trace_content']);
             }
             $tracelist[$k] = $v;
         }
     }
     Tpl::output('hasmore', $lazy_arr['hasmore']);
     Tpl::output('tracelist', $tracelist);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::output('type', 'home');
     //验证码
     Tpl::output('nchash', substr(md5(SHOP_SITE_URL . $_GET['act'] . $_GET['op']), 0, 8));
     Tpl::output('menu_sign', 'snstrace');
     Tpl::showpage('sns_tracelist', 'null_layout');
 }
예제 #16
0
 /**
  * 图片 ajax
  */
 public function album_ad_ajaxOp()
 {
     if (empty($_GET['class_id']) && empty($_GET['id'])) {
         exit;
     }
     $model_album = Model('album');
     $return = $model_album->checkAlbum(array('album_pic.store_id' => $_SESSION['store_id'], 'album_pic.apic_id' => intval($_GET['id'])));
     if (!$return) {
         exit;
     }
     /**
      * 图片列表
      */
     $param = array();
     $param['aclass_id'] = intval($_GET['class_id']);
     $param['store_id'] = $_SESSION['store_id'];
     $page = new Uk86Page();
     $each_num = 9;
     $page->uk86_setEachNum($each_num);
     $pic_list = $model_album->getPicList($param, $page);
     Tpl::output('pic_list', $pic_list);
     Tpl::showpage('store_album.pic_scroll_ajax', 'null_layout');
 }
예제 #17
0
 /**
  * tag列表
  */
 public function tagOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     /**
      * 处理商品分类
      */
     $choose_gcid = ($t = intval($_REQUEST['choose_gcid'])) > 0 ? $t : 0;
     $gccache_arr = Model('goods_class')->getGoodsclassCache($choose_gcid, 3);
     Tpl::output('gc_json', json_encode($gccache_arr['showclass']));
     Tpl::output('gc_choose_json', json_encode($gccache_arr['choose_gcid']));
     $model_class_tag = Model('goods_class_tag');
     if (uk86_chksubmit()) {
         //删除
         if ($_POST['submit_type'] == 'del') {
             if (is_array($_POST['tag_id']) && !empty($_POST['tag_id'])) {
                 //删除TAG
                 $model_class_tag->delTagByIds(implode(',', $_POST['tag_id']));
                 $this->log(L('nc_delete') . 'tag[ID:' . implode(',', $_POST['tag_id']) . ']', 1);
                 uk86_showMessage($lang['nc_common_del_succ']);
             } else {
                 $this->log(L('nc_delete') . 'tag', 0);
                 uk86_showMessage($lang['nc_common_del_fail']);
             }
         }
     }
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $where = array();
     if ($choose_gcid > 0) {
         $where['gc_id_' . $gccache_arr['showclass'][$choose_gcid]['depth']] = $choose_gcid;
     }
     $tag_list = $model_class_tag->getTagList($where, $page);
     Tpl::output('tag_list', $tag_list);
     Tpl::output('page', $page->uk86_show());
     Tpl::output('top_link', $this->sublink($this->links, 'tag'));
     Tpl::showpage('goods_class_tag.index');
 }
예제 #18
0
 /**
  * 闲置物品搜索列表
  */
 public function indexOp()
 {
     //加载模型
     $flea_model = Model('flea');
     $member_model = Model('member');
     $class_model = Model('flea_class');
     $area_model = Model('flea_area');
     /**
      * 热门搜索
      */
     // 转码  防止GBK下用中文逗号截取不正确
     $comma = ',';
     if (strtoupper(CHARSET) == 'GBK') {
         $comma = Uk86Language::uk86_getGBK($comma);
     }
     $flea_hot_search = explode(',', str_replace($comma, ',', $GLOBALS['setting_config']['flea_hot_search']));
     Tpl::output('flea_hot_search', $flea_hot_search);
     /**
      * 地区切换
      */
     $area_array = $area_model->area_show();
     Tpl::output('area_one_level', $area_array['area_one_level']);
     Tpl::output('area_two_level', $area_array['area_two_level']);
     /**
      * 查询模块
      */
     $condition = array();
     $condition_out = array();
     $area_id = intval($_GET['area_input']);
     /*	如果有地区id传入	*/
     if ($area_id > 0) {
         /* 	查询父级id为传入id的所有结果	*/
         $area_result = $area_model->getListArea(array('flea_area_parent_id' => $area_id));
         /*	增加当前选择地区的检索热度	*/
         $param['flea_area_hot']['value'] = 1;
         $param['flea_area_hot']['sign'] = 'increase';
         $param['flea_area_id'] = $area_id;
         $area_model->update($param);
         /*	组合查询地区id	*/
         $condition['areaid'] = "'" . $area_id . "'";
         /*	页面输出可选择地区列表	*/
         /* 传入的地区 */
         $area_current = $area_model->getOneArea($area_id);
         if ($area_result) {
             /*	不是最后一级地区	*/
             foreach ($area_result as $val) {
                 $condition['areaid'] .= ',\'' . $val['flea_area_id'] . '\'';
             }
             Tpl::output('out_area', $area_result);
             Tpl::output('area_main', $area_current);
         } else {
             $out_area = $area_model->getListArea(array('flea_area_parent_id' => $area_current['flea_area_parent_id']));
             $area_main = $area_model->getOneArea($area_current['flea_area_parent_id']);
             Tpl::output('out_area', $out_area);
             Tpl::output('area_main', $area_main);
         }
         $condition_out['area_input'] = $area_id;
     } else {
         $list_area = array();
         $list_area['flea_area_deep'] = 2;
         $list_area['area_hot'] = '1';
         $list_area['order'] = 'flea_area_hot desc';
         $list_area['limit'] = '0,8';
         $list_area['field'] = 'flea_area_name,flea_area_id';
         $result = $area_model->getListArea($list_area);
         Tpl::output('out_area', $result);
     }
     $cate_input = intval($_GET['cate_input']);
     if ($cate_input > 0) {
         $fc_result = $class_model->getNextLevelGoodsClassById($cate_input);
         Tpl::output('out_class', $fc_result);
         /*	组合查询分类id	*/
         $condition_out['cate_input'] = $cate_input;
         /*	组合查询分类id	*/
         $gc_result = $class_model->getChildClass($cate_input);
         $part = '';
         foreach ($gc_result as $v) {
             $part .= '\'' . $v['gc_id'] . '\',';
         }
         $condition['gc_id_in'] = rtrim($part, ',');
     } else {
         $class_list = array();
         $class_list['gc_parent_id'] = '0';
         $class_list['field'] = 'gc_name,gc_id';
         $fc_result = $class_model->getClassList($class_list);
         Tpl::output('out_class', $fc_result);
     }
     $condition_out['start_input'] = $condition['start_input'] = intval($_GET['start_input']);
     $condition_out['end_input'] = $condition['end_input'] = intval($_GET['end_input']);
     $condition_out['price_input'] = $condition['price_input'] = intval($_GET['price_input']);
     if ($condition_out['price_input'] > 0) {
         switch ($condition_out['price_input']) {
             case "35":
                 $condition['start_input'] = '20';
                 $condition['end_input'] = '50';
                 break;
             case "75":
                 $condition['start_input'] = '50';
                 $condition['end_input'] = '100';
                 break;
             case "150":
                 $condition['start_input'] = '100';
                 $condition['end_input'] = '200';
                 break;
             case "350":
                 $condition['start_input'] = '200';
                 $condition['end_input'] = '500';
                 break;
             case "750":
                 $condition['start_input'] = '500';
                 $condition['end_input'] = '1000';
                 break;
             case "1000":
                 $condition['start_input'] = '1000';
                 $condition['end_input'] = '';
                 break;
         }
     }
     $condition_out['quality_input'] = $condition['quality_input'] = intval($_GET['quality_input']);
     $condition_out['key_input'] = $condition['key_input'] = $_GET['key_input'];
     $condition_out['seller_input'] = $condition['seller_input'] = intval($_GET['seller_input']);
     $condition_out['rank_input'] = $condition['rank_input'] = intval($_GET['rank_input']);
     if ($condition['rank_input'] == 1) {
         $condition['order'] = 'goods_store_price desc';
     }
     if ($condition['rank_input'] == 2) {
         $condition['order'] = 'goods_store_price asc';
     }
     $condition_out['pic_input'] = $condition['pic_input'] = $_GET['pic_input'];
     if (!$condition['pic_input']) {
         $condition['pic_input'] = 2;
     }
     /*	输出保留的前台查询条件	*/
     Tpl::output('condition_out', $condition_out);
     /**
      * 闲置物品显示模块
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $listgoods = $flea_model->listGoods($condition, $page);
     if ($listgoods) {
         foreach ($listgoods as $replace_key => $replace_val) {
             $listgoods[$replace_key]['member_info'] = $flea_model->statistic($replace_val['member_id']);
             if ($listgoods[$replace_key]['member_info']['member_avatar']) {
                 $listgoods[$replace_key]['member_info']['avatar'] = ATTACH_AVATAR . '/' . $listgoods[$replace_key]['member_info']['member_avatar'];
             } else {
                 $listgoods[$replace_key]['member_info']['avatar'] = TEMPLATES_PATH . '/images/default_user_portrait.gif';
             }
             if ($replace_val['goods_image']) {
                 $listgoods[$replace_key]['image_url'] = UPLOAD_SITE_URL . DS . ATTACH_MALBUM . '/' . $_SESSION['member_id'] . '/' . $replace_val['goods_image'];
             } else {
                 $listgoods[$replace_key]['image_url'] = SHOP_TEMPLATES_URL . '/images/member/default_image.png';
             }
             $exge = '/<[^>]*>|\\s+/';
             $listgoods[$replace_key]['explain'] = preg_replace($exge, '', $replace_val['goods_body']);
             $listgoods[$replace_key]['time'] = $this->time_comb(intval($replace_val['goods_add_time']));
             switch ($replace_val['flea_quality']) {
                 case 10:
                     $quality = Uk86Language::uk86_get('flea_index_new');
                     break;
                 case 9:
                     $quality = Uk86Language::uk86_get('flea_index_almost_new');
                     break;
                 case 8:
                     $quality = Uk86Language::uk86_get('flea_index_gently_used');
                     break;
                 default:
                     $quality = Uk86Language::uk86_get('flea_index_old');
                     break;
             }
             $listgoods[$replace_key]['quality'] = $quality;
         }
     }
     Tpl::output('listgoods', $listgoods);
     Tpl::output('show_page', $page->uk86_show());
     /**
      * 刚刚发布模块
      */
     $pre_sale = $flea_model->saleGoods(array('limit' => '0,4'));
     Tpl::output('pre_sale', $pre_sale);
     /**
      * 关注模块
      */
     $attention = $flea_model->listGoods(array('limit' => '0,8', 'order' => 'flea_collect_num desc'));
     Tpl::output('attention', $attention);
     /**
      * 导航模块
      */
     $navigation = array('index.php?act=flea_class' => Uk86Language::uk86_get('flea_index_all'));
     /*	卖家优先 */
     if ($condition['seller_input']) {
         $seller_info = $member_model->infoMember(array('member_id' => $condition['seller_input']));
         $key = 'index.php?act=flea_class&seller_input=' . $condition['seller_input'];
         $navigation[$key] = $seller_info['member_name'];
     } elseif ($cate_input) {
         $class_info = $class_model->getGoodsClassNow($cate_input);
         foreach ($class_info as $val) {
             $key = 'index.php?act=flea_class&cate_input=' . $val['gc_id'];
             $navigation[$key] = $val['name'];
         }
     }
     /*	分类次之 */
     Tpl::output('navigation', $navigation);
     /*	页面显示所有商品总数	*/
     $all_num = $flea_model->listGoods($condition);
     Tpl::output('all_num', $all_num);
     /**
      * 页面输出
      */
     Tpl::showpage('flea_class', 'flea_layout');
 }
예제 #19
0
 /**
  * 文章管理
  */
 public function articleOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model_article = Model('article');
     /**
      * 删除
      */
     if (uk86_chksubmit()) {
         if (is_array($_POST['del_id']) && !empty($_POST['del_id'])) {
             $model_upload = Model('upload');
             foreach ($_POST['del_id'] as $k => $v) {
                 $v = intval($v);
                 /**
                  * 删除图片
                  */
                 $condition['upload_type'] = '1';
                 $condition['item_id'] = $v;
                 $upload_list = $model_upload->getUploadList($condition);
                 if (is_array($upload_list)) {
                     foreach ($upload_list as $k_upload => $v_upload) {
                         $model_upload->del($v_upload['upload_id']);
                         @unlink(BASE_UPLOAD_PATH . DS . ATTACH_ARTICLE . DS . $v_upload['file_name']);
                     }
                 }
                 $model_article->del($v);
             }
             $this->log(L('article_index_del_succ') . '[ID:' . implode(',', $_POST['del_id']) . ']', null);
             uk86_showMessage($lang['article_index_del_succ']);
         } else {
             uk86_showMessage($lang['article_index_choose']);
         }
     }
     /**
      * 检索条件
      */
     $condition['ac_id'] = intval($_GET['search_ac_id']);
     $condition['like_title'] = trim($_GET['search_title']);
     /**
      * 分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     /**
      * 列表
      */
     $article_list = $model_article->getArticleList($condition, $page);
     /**
      * 整理列表内容
      */
     if (is_array($article_list)) {
         /**
          * 取文章分类
          */
         $model_class = Model('article_class');
         $class_list = $model_class->getClassList($condition);
         $tmp_class_name = array();
         if (is_array($class_list)) {
             foreach ($class_list as $k => $v) {
                 $tmp_class_name[$v['ac_id']] = $v['ac_name'];
             }
         }
         foreach ($article_list as $k => $v) {
             /**
              * 发布时间
              */
             $article_list[$k]['article_time'] = date('Y-m-d H:i:s', $v['article_time']);
             /**
              * 所属分类
              */
             if (@array_key_exists($v['ac_id'], $tmp_class_name)) {
                 $article_list[$k]['ac_name'] = $tmp_class_name[$v['ac_id']];
             }
         }
     }
     /**
      * 分类列表
      */
     $model_class = Model('article_class');
     $parent_list = $model_class->getTreeClassList(2);
     if (is_array($parent_list)) {
         $unset_sign = false;
         foreach ($parent_list as $k => $v) {
             $parent_list[$k]['ac_name'] = str_repeat("&nbsp;", $v['deep'] * 2) . $v['ac_name'];
         }
     }
     Tpl::output('article_list', $article_list);
     Tpl::output('page', $page->uk86_show());
     Tpl::output('search_title', trim($_GET['search_title']));
     Tpl::output('search_ac_id', intval($_GET['search_ac_id']));
     Tpl::output('parent_list', $parent_list);
     Tpl::showpage('article.index');
 }
예제 #20
0
 /**
  * 系统站内信列表
  *
  * @param
  * @return
  */
 public function systemmsgOp()
 {
     $model_message = Model('message');
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $message_array = $model_message->listMessage(array('from_member_id' => '0', 'message_type' => '1', 'to_member_id' => $_SESSION['member_id'], 'no_del_member_id' => $_SESSION['member_id']), $page);
     if (!empty($message_array) && is_array($message_array)) {
         foreach ($message_array as $k => $v) {
             $v['message_open'] = '0';
             if (!empty($v['read_member_id'])) {
                 $tmp_readid_arr = explode(',', $v['read_member_id']);
                 if (in_array($_SESSION['member_id'], $tmp_readid_arr)) {
                     $v['message_open'] = '1';
                 }
             }
             $v['from_member_name'] = Uk86Language::uk86_get('home_message_system_message');
             $message_array[$k] = $v;
         }
     }
     Tpl::output('show_page', $page->uk86_show());
     Tpl::output('message_array', $message_array);
     // 新消息数量
     $this->showReceivedNewNum();
     Tpl::output('drop_type', 'msg_system');
     $this->profile_menu('system');
     Tpl::showpage('member_message.box');
 }
예제 #21
0
 /**
  * SNS动态列表
  */
 public function tracelistOp()
 {
     //查询关注以及好友列表
     $friend_model = Model('sns_friend');
     $friend_list = $friend_model->listFriend(array('friend_frommid' => "{$_SESSION['member_id']}"), '*', '', 'simple');
     $mutualfollowid_arr = array();
     $followid_arr = array();
     if (!empty($friend_list)) {
         foreach ($friend_list as $k => $v) {
             $followid_arr[] = $v['friend_tomid'];
             if ($v['friend_followstate'] == 2) {
                 $mutualfollowid_arr[] = $v['friend_tomid'];
             }
         }
     }
     $tracelog_model = Model('sns_tracelog');
     //条件
     $condition = array();
     $condition['allowshow'] = '1';
     $condition['allowshow_memberid'] = "{$_SESSION['member_id']}";
     $condition['allowshow_followerin'] = "";
     if (!empty($followid_arr)) {
         $condition['allowshow_followerin'] = implode("','", $followid_arr);
     }
     $condition['allowshow_friendin'] = "";
     if (!empty($mutualfollowid_arr)) {
         $condition['allowshow_friendin'] = implode("','", $mutualfollowid_arr);
     }
     $condition['trace_state'] = "0";
     $count = $tracelog_model->countTrace($condition);
     //分页
     $page = new Uk86Page();
     $page->uk86_setEachNum(30);
     $page->uk86_setStyle('admin');
     $page->uk86_setTotalNum($count);
     $delaypage = intval($_GET['delaypage']) > 0 ? intval($_GET['delaypage']) : 1;
     //本页延时加载的当前页数
     $lazy_arr = uk86_lazypage(10, $delaypage, $count, true, $page->uk86_getNowPage(), $page->uk86_getEachNum(), $page->uk86_getLimitStart());
     //动态列表
     $condition['limit'] = $lazy_arr['limitstart'] . "," . $lazy_arr['delay_eachnum'];
     $tracelist = $tracelog_model->getTracelogList($condition);
     if (!empty($tracelist)) {
         foreach ($tracelist as $k => $v) {
             if ($v['trace_title']) {
                 $v['trace_title'] = str_replace("%siteurl%", SHOP_SITE_URL . DS, $v['trace_title']);
                 $v['trace_title_forward'] = '|| @' . $v['trace_membername'] . Uk86Language::uk86_get('nc_colon') . preg_replace("/<a(.*?)href=\"(.*?)\"(.*?)>@(.*?)<\\/a>([\\s|:|:]|\$)/is", '@${4}${5}', $v['trace_title']);
             }
             if (!empty($v['trace_content'])) {
                 //替换内容中的siteurl
                 $v['trace_content'] = str_replace("%siteurl%", SHOP_SITE_URL . DS, $v['trace_content']);
             }
             $tracelist[$k] = $v;
         }
     }
     Tpl::output('hasmore', $lazy_arr['hasmore']);
     Tpl::output('tracelist', $tracelist);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::output('type', 'index');
     Tpl::showpage('member_snstracelist', 'null_layout');
 }
예제 #22
0
 /**
  * 页面导航
  */
 public function navigationOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model_navigation = Model('navigation');
     /**
      * 删除
      */
     if (uk86_chksubmit()) {
         if (is_array($_POST['del_id']) && !empty($_POST['del_id'])) {
             $del_str = implode(',', $_POST['del_id']);
             $where = "where nav_id in (" . $del_str . ")";
             Db::delete("navigation", $where);
             uk86_dkcache('nav');
             $this->log(L('navigation_index_del_succ') . '[ID:' . $del_str . ']', null);
             uk86_showMessage($lang['navigation_index_del_succ']);
         } else {
             uk86_showMessage($lang['navigation_index_choose_del']);
         }
     }
     /**
      * 检索条件
      */
     $condition['like_nav_title'] = trim($_GET['search_nav_title']);
     $condition['nav_location'] = trim($_GET['search_nav_location']);
     $condition['order'] = 'nav_sort asc';
     /**
      * 分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $navigation_list = $model_navigation->getNavigationList($condition, $page);
     /**
      * 整理内容
      */
     if (is_array($navigation_list)) {
         foreach ($navigation_list as $k => $v) {
             switch ($v['nav_location']) {
                 case '0':
                     $navigation_list[$k]['nav_location'] = $lang['navigation_index_top'];
                     break;
                 case '1':
                     $navigation_list[$k]['nav_location'] = $lang['navigation_index_center'];
                     break;
                 case '2':
                     $navigation_list[$k]['nav_location'] = $lang['navigation_index_bottom'];
                     break;
             }
             switch ($v['nav_new_open']) {
                 case '0':
                     $navigation_list[$k]['nav_new_open'] = $lang['nc_no'];
                     break;
                 case '1':
                     $navigation_list[$k]['nav_new_open'] = $lang['nc_yes'];
                     break;
             }
         }
     }
     Tpl::output('navigation_list', $navigation_list);
     Tpl::output('page', $page->uk86_show());
     Tpl::output('search_nav_title', trim($_GET['search_nav_title']));
     Tpl::output('search_nav_location', trim($_GET['search_nav_location']));
     Tpl::showpage('navigation.index');
 }
예제 #23
0
파일: adv.php 프로젝트: wangjiang988/ukshop
 /**
  *
  * 广告管理
  */
 public function advOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $adv = Model('adv');
     if (uk86_chksubmit()) {
         if (is_array($_POST['del_id']) && !empty($_POST['del_id'])) {
             // 删除缓存
             Model('adv')->dropApCacheByAdvIds($_POST['del_id']);
             $in_array_id = "'" . implode("','", $_POST['del_id']) . "'";
             $where = "where adv_id in (" . $in_array_id . ")";
             Db::delete("adv", $where);
         }
         $url = array(array('url' => uk86_getReferer(), 'msg' => $lang['goback_adv_manage']));
         $this->log(L('adv_del_succ') . '[ID:' . $in_array_id . ']', null);
         uk86_showMessage($lang['adv_del_succ'], $url);
     }
     /**
      * 分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(20);
     $page->uk86_setStyle('admin');
     $condition = array();
     $condition['is_allow'] = '1';
     $limit = '';
     $orderby = '';
     if ($_GET['ap_id'] != '') {
         $condition['ap_id'] = intval($_GET['ap_id']);
     }
     $adv_info = $adv->getList($condition, $page, $limit, $orderby);
     $ap_info = $adv->getApList();
     Tpl::output('adv_info', $adv_info);
     Tpl::output('ap_info', $ap_info);
     Tpl::output('ap_name', Model()->table('adv_position')->getfby_ap_id(intval($_GET['ap_id']), 'ap_name'));
     Tpl::output('page', $page->uk86_show());
     Tpl::showpage('adv.index');
 }
예제 #24
0
 /**
  * 店铺街添加列表
  */
 public function store_addOp()
 {
     $model_store = Model('store');
     $model_microshop_store = Model('micro_store');
     $microshop_store_list = $model_microshop_store->getList(TRUE);
     $microshop_store_array = array();
     if (!empty($microshop_store_list)) {
         foreach ($microshop_store_list as $value) {
             $microshop_store_array[] = $value['shop_store_id'];
         }
     }
     Tpl::output('microshop_store_array', $microshop_store_array);
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $condition = array();
     $condition['member_name'] = array('like', '%' . $_GET['owner_and_name'] . '%');
     $condition['store_name'] = array('like', '%' . $_GET['store_name'] . '%');
     $store_list = $model_store->getStoreOnlineList($condition, $page);
     Tpl::output('store_list', $store_list);
     Tpl::output('page', $page->uk86_show());
     $this->show_menu_store('store_add');
     Tpl::showpage('microshop_store.add');
 }
예제 #25
0
 /**
  * 活动细节列表
  */
 public function detailOp()
 {
     $activity_id = intval($_GET['id']);
     if ($activity_id <= 0) {
         uk86_showMessage(Uk86Language::uk86_get('miss_argument'));
     }
     //条件
     $condition_arr = array();
     $condition_arr['activity_id'] = $activity_id;
     //审核状态
     if (!empty($_GET['searchstate'])) {
         $state = intval($_GET['searchstate']) - 1;
         $condition_arr['activity_detail_state'] = "{$state}";
     }
     //店铺名称
     if (!empty($_GET['searchstore'])) {
         $condition_arr['store_name'] = $_GET['searchstore'];
     }
     //商品名称
     if (!empty($_GET['searchgoods'])) {
         $condition_arr['item_name'] = $_GET['searchgoods'];
     }
     $condition_arr['order'] = 'activity_detail.activity_detail_state asc,activity_detail.activity_detail_sort asc';
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     $activitydetail_model = Model('activity_detail');
     $list = $activitydetail_model->getList($condition_arr, $page);
     //输出到模板
     Tpl::output('show_page', $page->uk86_show());
     Tpl::output('list', $list);
     Tpl::showpage('activity_detail.index');
 }
예제 #26
0
 /**
  * 积分日志列表导出
  */
 public function export_step1Op()
 {
     $condition_arr = array();
     $condition_arr['pl_membername_like'] = trim($_GET['mname']);
     $condition_arr['pl_adminname_like'] = trim($_GET['aname']);
     if ($_GET['stage']) {
         $condition_arr['pl_stage'] = trim($_GET['stage']);
     }
     $condition_arr['saddtime'] = strtotime($_GET['stime']);
     $condition_arr['eaddtime'] = strtotime($_GET['etime']);
     if ($condition_arr['eaddtime'] > 0) {
         $condition_arr['eaddtime'] += 86400;
     }
     $condition_arr['pl_desc_like'] = trim($_GET['description']);
     $page = new Uk86Page();
     $page->uk86_setEachNum(self::EXPORT_SIZE);
     $points_model = Model('points');
     $list_log = $points_model->getPointsLogList($condition_arr, $page, '*', '');
     if (!is_numeric($_GET['curpage'])) {
         $count = $page->uk86_getTotalNum();
         $array = array();
         if ($count > self::EXPORT_SIZE) {
             //显示下载链接
             $page = ceil($count / self::EXPORT_SIZE);
             for ($i = 1; $i <= $page; $i++) {
                 $limit1 = ($i - 1) * self::EXPORT_SIZE + 1;
                 $limit2 = $i * self::EXPORT_SIZE > $count ? $count : $i * self::EXPORT_SIZE;
                 $array[$i] = $limit1 . ' ~ ' . $limit2;
             }
             Tpl::output('list', $array);
             Tpl::output('murl', 'index.php?act=pointslog&op=pointslog');
             Tpl::showpage('export.excel');
         } else {
             //如果数量小,直接下载
             $this->createExcel($list_log);
         }
     } else {
         //下载
         $this->createExcel($list_log);
     }
 }
예제 #27
0
 /**
  * 买家闲置收藏
  *
  * @param
  * @return
  */
 public function favoritesOp()
 {
     /**
      * 读取语言包
      */
     $lang = Uk86Language::uk86_getLangContent();
     /**
      * 实例化模型
      */
     $favorites_class = Model('flea_favorites');
     /**
      * 类型
      */
     /**
      * 删除操作
      */
     if (!empty($_GET['drop']) && $_GET['drop'] == ok && !empty($_GET['fav_id'])) {
         $fav_arr = explode(',', $_GET['fav_id']);
         if (!empty($fav_arr) && is_array($fav_arr)) {
             /**
              * 批量删除
              */
             foreach ($fav_arr as $fav_id) {
                 if (intval($fav_id) > 0) {
                     if (!$favorites_class->delFavorites(intval($fav_id), 'flea')) {
                         showDialog($lang['flea_favorite_del_fail'], '', 'error');
                     }
                 }
             }
         } else {
             if (intval($_GET['fav_id']) > 0) {
                 if (!$favorites_class->delFavorites(intval($_GET['fav_id']), 'flea')) {
                     showDialog($lang['flea_favorite_del_fail'], '', 'error');
                 }
             }
         }
         //uk86_showMessage($lang['flea_favorite_del_success']);
         showDialog($lang['flea_favorite_del_success'], 'index.php?act=member_flea&op=favorites', 'succ');
     }
     /**
      * 分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     /**
      * 得到收藏列表
      */
     $favorites_list = $favorites_class->getFavoritesList(array('member_id' => $_SESSION['member_id'], 'fav_type' => 'flea'), $page);
     if (!empty($favorites_list) && is_array($favorites_list)) {
         $favorites_id = array();
         //收藏的商品(店铺)编号
         $favorites_key = array();
         //商品(店铺)编号与键值的对应数组,方便下一步组合显示
         foreach ($favorites_list as $key => $favorites) {
             $fav_id = $favorites['fav_id'];
             $favorites_id[] = $fav_id;
             $favorites_key[$fav_id] = $key;
         }
         $type_class = Model('flea');
         $type_list = $type_class->listGoods(array('goods_id_in' => "'" . implode("','", $favorites_id) . "'"), '', 'goods_id,goods_name,goods_image,goods_store_price,member_name,member_id');
         if (!empty($type_list) && is_array($type_list)) {
             foreach ($type_list as $key => $fav) {
                 $fav_id = $fav['goods_id'];
                 $key = $favorites_key[$fav_id];
                 $favorites_list[$key]['flea'] = $fav;
             }
         }
     }
     //查询会员信息
     $this->member_info = $this->getMemberAndGradeInfo(true);
     /**
      * 页面输出
      */
     self::profile_menu('favorites', 'favorites');
     Tpl::output('menu_sign', 'flea_favorites');
     Tpl::output('favorites_list', $favorites_list);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::output('menu_sign_url', 'index.php?act=member_flea&op=favorites');
     Tpl::output('menu_sign1', 'flea_favorites_list');
     Tpl::showpage("favorites_flea_index");
 }
예제 #28
0
/**
 * 封装分页操作到函数,方便调用
 *
 * @param string $cmd 命令类型
 * @param mixed $arg 参数
 * @return mixed
 */
function uk86_pagecmd($cmd = '', $arg = '')
{
    if (!class_exists('uk86page')) {
        uk86_import('uk86page');
    }
    static $page;
    if ($page == null) {
        $page = new Uk86Page();
    }
    switch (strtolower($cmd)) {
        case 'seteachnum':
            $page->uk86_setEachNum($arg);
            break;
        case 'settotalnum':
            $page->uk86_setTotalNum($arg);
            break;
        case 'setstyle':
            $page->uk86_setStyle($arg);
            break;
        case 'show':
            return $page->uk86_show($arg);
            break;
        case 'obj':
            return $page;
            break;
        case 'gettotalnum':
            return $page->uk86_getTotalNum();
            break;
        case 'gettotalpage':
            return $page->uk86_getTotalPage();
            break;
        default:
            break;
    }
}
예제 #29
0
 public function complain_subject_listOp()
 {
     /*
      * 实例化分页
      */
     $page = new Uk86Page();
     $page->uk86_setEachNum(10);
     $page->uk86_setStyle('admin');
     /*
      * 获得举报主题列表
      */
     $model_complain_subject = Model('complain_subject');
     //搜索条件
     $condition = array();
     $condition['order'] = 'complain_subject_id asc';
     $condition['complain_subject_state'] = 1;
     $complain_subject_list = $model_complain_subject->getComplainSubject($condition, $page);
     $this->show_menu('complain_subject_list');
     Tpl::output('list', $complain_subject_list);
     Tpl::output('show_page', $page->uk86_show());
     Tpl::showpage('complain_subject.list');
 }
예제 #30
0
 /**
  * 粉丝列表
  */
 public function fanOp()
 {
     $friend_model = Model('sns_friend');
     //关注列表
     $page = new Uk86Page();
     $page->uk86_setEachNum(15);
     $page->uk86_setStyle('admin');
     $fan_list = $friend_model->listFriend(array('friend_tomid' => "{$_SESSION['member_id']}"), '*', $page, 'fromdetail');
     if (!empty($fan_list)) {
         foreach ($fan_list as $k => $v) {
             $v['sex_class'] = $this->m_sex($v['member_sex']);
             $fan_list[$k] = $v;
         }
     }
     Tpl::output('fan_list', $fan_list);
     Tpl::output('show_page', $page->uk86_show());
     self::profile_menu('fan');
     Tpl::showpage('member_snsfriend_fan');
 }