Example #1
0
 public function sendback()
 {
     $postdata = input::get();
     $postdata['user_id'] = userAuth::id();
     if ($postdata['corp_code'] == "other" && !$postdata['logi_name']) {
         return $this->splash('error', "", "其他物流公司不能为空", true);
     }
     if (!$postdata['logi_no']) {
         return $this->splash('error', "", "运单号不可为空", true);
     }
     if (!$postdata['mobile']) {
         return $this->splash('error', "", "收货人手机不可为空", true);
     }
     if (!$postdata['receiver_address']) {
         return $this->splash('error', "", "收货地址不可为空", true);
     }
     try {
         $result = app::get('topc')->rpcCall('aftersales.send.back', $postdata, 'buyer');
     } catch (\LogicException $e) {
         $msg = $e->getMessage();
         return $this->splash('error', $url, $msg, true);
     }
     $url = url::action('topc_ctl_member_aftersales@aftersalesList');
     $msg = '回寄物流信息提交成功';
     return $this->splash('success', $url, $msg, true);
 }
Example #2
0
 public function contentList()
 {
     $filter = input::get();
     $pageSize = 20;
     if (!$filter['pages']) {
         $filter['pages'] = 1;
     }
     $params = array('node_id' => $filter['node_id'], 'page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'article_id,title,node_id,modified', 'platform' => 'wap');
     $contentData = app::get('topm')->rpcCall('syscontent.content.get.list', $params);
     $count = $contentData['articlecount'];
     $contentList = $contentData['articleList'];
     $nodeInfo = $contentData['nodeInfo'];
     //处理翻页数据
     $current = $filter['pages'] ? $filter['pages'] : 1;
     $filter['pages'] = time();
     if ($count > 0) {
         $total = ceil($count / $pageSize);
     }
     $pagedata['pagers'] = array('link' => url::action('topm_ctl_content@contentList', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
     $pagedata['contentList'] = $contentList;
     $pagedata['count'] = $count;
     $pagedata['nodeInfo'] = $nodeInfo;
     $pagedata['title'] = "文章列表";
     return $this->page('topm/content/contentlist.html', $pagedata);
 }
Example #3
0
 public function __commonData($filter)
 {
     //$filter = input::get();
     $promotionInfo = app::get('topm')->rpcCall('promotion.promotion.get', array('promotion_id' => $filter['promotion_id']));
     if ($promotionInfo['valid']) {
         if (!$filter['pages']) {
             $filter['pages'] = 1;
         }
         $pageSize = 20;
         $params = array('page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'item_id,shop_id,title,image_default_id,price');
         //获取促销商品列表
         $promotionItem = $this->__promotionItemList($promotionInfo, $params);
         $count = $promotionItem['total_found'];
         $promotionItemList = $promotionItem['list'];
         if (userAuth::check()) {
             $pagedata['nologin'] = 1;
         }
         //处理翻页数据
         $current = $filter['pages'] ? $filter['pages'] : 1;
         $filter['pages'] = time();
         if ($count > 0) {
             $total = ceil($count / $pageSize);
         }
         $pagedata['pagers'] = array('link' => url::action('topm_ctl_promotion@getPromotionItem', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
         $pagedata['promotionInfo'] = $promotionItem['promotionInfo'];
         $pagedata['promotionItemList'] = $promotionItemList;
         $pagedata['count'] = $count;
         $pagedata['title'] = $promotionItem['promotionInfo']['promotion_tag'];
         $pagedata['promotiontype'] = $promotionInfo['promotion_type'];
     } else {
         return abort(404);
     }
     return $pagedata;
 }
Example #4
0
 /**
  * 结算明细
  * @return
  */
 public function detail()
 {
     $this->contentHeaderTitle = app::get('topshop')->_('企业结算明细');
     $filter['shop_id'] = $this->shopId;
     $postSend = input::get();
     if ($postSend['timearea']) {
         $pagedata['timearea'] = $postSend['timearea'];
         $timeArray = explode('-', $postSend['timearea']);
         $filter['settlement_time|than'] = strtotime($timeArray[0]);
         $filter['settlement_time|lthan'] = strtotime($timeArray[1]);
     } else {
         $filter['settlement_time|than'] = time() - 3600 * 24 * 7;
         $filter['settlement_time|lthan'] = time();
         $pagedata['timearea'] = date('Y/m/d', time() - 3600 * 24 * 7) . '-' . date('Y/m/d', time());
     }
     if ($postSend['settlement_type']) {
         $filter['settlement_type'] = $postSend['settlement_type'];
         $pagedata['settlement_type'] = $postSend['settlement_type'];
     }
     //处理翻页数据
     $pagedata['page'] = $page = $postSend['page'] ? $postSend['page'] : 1;
     $pagedata['limits'] = $pageLimit = 10;
     $objMdlSettleDetail = app::get('sysclearing')->model('settlement_detail');
     $pagedata['settlement_detail_list'] = $objMdlSettleDetail->getList('*', $filter, ($page - 1) * $pageLimit, $pageLimit, 'settlement_time desc');
     $count = $objMdlSettleDetail->count($filter);
     $postSend['token'] = time();
     if ($count > 0) {
         $total = ceil($count / $pageLimit);
     }
     $pagedata['pagers'] = array('link' => url::action('topshop_ctl_clearing_settlement@detail', $postSend), 'current' => $page, 'total' => $total, 'token' => $postSend['token']);
     return $this->page('topshop/clearing/settlement_detail.html', $pagedata);
 }
Example #5
0
 public function column_edit(&$colList, $list)
 {
     foreach ($list as $k => $row) {
         $url = url::action('topc_ctl_item@index', array('item_id' => $row['item_id']));
         $colList[$k] = "<a href='" . $url . "' target='_blank' >" . $row['title'] . "</a>";
     }
 }
Example #6
0
 /**
  * 资讯保存
  **/
 public function saveInfo()
 {
     $userId = userAuth::id();
     //$postData =utils::_filter_input(input::get());
     $postData = input::get();
     $postData['user_id'] = $userId;
     $postData['modified'] = time();
     $postData['pubtime'] = time();
     $postData['ifpub'] = 0;
     $postData["platform"] = 'pc';
     $userName = app::get('sysuser')->model('account');
     $infoName = $userName->getList(login_account, array('user_id' => $userId));
     $postData['source'] = $infoName[0]['login_account'];
     $postData["article_logo"] = $postData["article_logo"][0];
     try {
         $userMdlAddr = app::get('sysinfo')->model('article');
         $userMdlAddr->save($postData);
     } catch (Exception $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     } catch (\LogicException $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     }
     $url = url::action('topc_ctl_member_info@publishInfo');
     $msg = app::get('topc')->_('添加成功');
     return $this->splash('success', $url, $msg);
 }
Example #7
0
 public function ajaxCouponData()
 {
     $filter = input::get();
     if (!$filter['pages']) {
         $filter['pages'] = 1;
     }
     $pageSize = 10;
     $params = array('page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => '*', 'user_id' => userAuth::id());
     $couponListData = app::get('topm')->rpcCall('user.coupon.list', $params, 'buyer');
     $count = $couponListData['count'];
     $couponList = $couponListData['coupons'];
     //处理翻页数据
     $current = $filter['pages'] ? $filter['pages'] : 1;
     $filter['pages'] = time();
     if ($count > 0) {
         $total = ceil($count / $pageSize);
     }
     $pagedata['pagers'] = array('link' => url::action('topm_ctl_member_coupon@couponList', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
     $pagedata['couponList'] = $couponList;
     $pagedata['count'] = $count;
     $pagedata['action'] = 'topm_ctl_member_coupon@couponList';
     if (input::get('json')) {
         $data['html'] = view::make('topm/member/coupon/list.html', $pagedata)->render();
         $data['pagers'] = $pagedata['pagers'];
         $data['success'] = true;
         return response::json($data);
         exit;
     }
     return view::make('topm/member/coupon/list.html', $pagedata);
 }
Example #8
0
 public function getPromotionItem()
 {
     $filter = input::get();
     $promotionInfo = app::get('topc')->rpcCall('promotion.promotion.get', array('promotion_id' => $filter['promotion_id']));
     if ($promotionInfo['valid']) {
         if (!$filter['pages']) {
             $filter['pages'] = 1;
         }
         $pageSize = 20;
         $params = array('page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'item_id,shop_id,title,image_default_id,price');
         //获取促销商品列表
         $promotionItem = $this->__promotionItemList($promotionInfo, $params);
         //echo '<pre>';print_r($promotionItem);exit();
         $count = $promotionItem['total_found'];
         $promotionItemList = $promotionItem['list'];
         //处理翻页数据
         $current = $filter['pages'] ? $filter['pages'] : 1;
         $filter['pages'] = time();
         if ($count > 0) {
             $total = ceil($count / $pageSize);
         }
         $pagedata['pagers'] = array('link' => url::action('topc_ctl_promotion@getPromotionItem', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
         $pagedata['promotionItemList'] = $promotionItemList;
         $pagedata['count'] = $count;
         $pagedata['promotionInfo'] = $promotionItem['promotionInfo'];
         $pagedata['promotiontype'] = $promotionInfo['promotion_type'];
     } else {
         return abort(404);
     }
     return $this->page("topc/promotion/promotion.html", $pagedata);
 }
Example #9
0
 public function doCreateRate()
 {
     $params['tid'] = input::get('tid');
     $params['tally_score'] = input::get('tally_score');
     $params['attitude_score'] = input::get('attitude_score');
     $params['delivery_speed_score'] = input::get('delivery_speed_score');
     $params['logistics_service_score'] = input::get('logistics_service_score');
     $anony = input::get('anony');
     foreach (input::get('rate_data') as $key => $row) {
         $rateData[$key] = $row;
         if ($row['rate_pic']) {
             $rateData[$key]['rate_pic'] = implode(',', $row['rate_pic']);
         }
         $rateData[$key]['anony'] = $anony == 'true' ? 1 : 0;
     }
     $params['rate_data'] = json_encode($rateData);
     try {
         $result = app::get('topm')->rpcCall('rate.add', $params, 'buyer');
     } catch (\LogicException $e) {
         $result = false;
         $msg = $e->getMessage();
     }
     if (!$result) {
         return $this->splash('error', $url, $msg, true);
     }
     $url = url::action('topm_ctl_member_trade@index');
     $msg = '评价提交成功';
     return $this->splash('success', $url, $msg, true);
 }
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 */
function theme_widget_floor_index(&$setting)
{
    if (!$setting['slider_type']) {
        if ($setting['brand']) {
            $data = app::get('desktop')->rpcCall('category.brand.get.list', ['brand_id' => implode(',', $setting['brand']), ['fields' => 'brand_id,brand_logo']]);
            $i = 0;
            $k = 1;
            foreach ($data as $n => $row) {
                $picData[$k][$n]['link'] = $row['brand_logo'];
                //图片地址
                $picData[$k][$n]['linkinfo'] = $row['brand_name'];
                //图片描述
                $picData[$k][$n]['linktarget'] = url::action('topc_ctl_list@index', ['search_keywords' => $row['brand_name']]);
                //链接地址
                $i++;
                if ($i % 3 === 0) {
                    $k++;
                }
            }
            $setting['picData'] = $picData;
        }
    } else {
        foreach ((array) $setting['pic'] as $n => $row) {
            $picData[][$n] = $row;
        }
        $setting['picData'] = $picData;
    }
    return $setting;
}
Example #11
0
 public function index()
 {
     //$shop_base = app::get('site')->router()->gen_url(array('app'=>'site', 'ctl'=>'sitemaps', 'act'=>'catalog', 'full'=>1));
     $shop_base = url::action('site_ctl_sitemaps@catalog');
     $pagedata['url'] = $shop_base;
     return $this->page('site/admin/sitemaps/index.html', $pagedata);
 }
Example #12
0
 public function index()
 {
     $pageSize = 20;
     $filter = input::get();
     $notice = app::get('sysshop')->getConf('shopnoticetype');
     //echo '<pre>';print_r($notice);exit();
     $pagedata['notice'] = $notice;
     $pagedata['notice_type'] = $filter['notice_type'];
     if (!$filter['pages']) {
         $filter['pages'] = 1;
     }
     $params = array('shop_id' => $this->shopId, 'page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'notice_title,notice_type,createtime,notice_id,shop_id', 'notice_type' => $filter['notice_type']);
     $noticeData = app::get('topshop')->rpcCall('shop.get.shopnoticelist', $params);
     $count = $noticeData['noticecount'];
     $noticeList = $noticeData['noticeList'];
     //处理翻页数据
     $current = $filter['pages'] ? $filter['pages'] : 1;
     $filter['pages'] = time();
     if ($count > 0) {
         $total = ceil($count / $pageSize);
     }
     $pagedata['pagers'] = array('link' => url::action('topshop_ctl_shop_notice@index', $filter), 'current' => $current, 'use_app' => 'topshop', 'total' => $total, 'token' => $filter['pages']);
     $pagedata['noticeList'] = $noticeList;
     $pagedata['total'] = $count;
     $this->contentHeaderTitle = app::get('topshop')->_('企业通知');
     return $this->page('topshop/shop/notice.html', $pagedata);
 }
Example #13
0
 public function index()
 {
     $filter = input::get();
     $pageSize = 20;
     if (!$filter['pages']) {
         $filter['pages'] = 1;
     }
     $params = array('node_id' => $filter['node_id'], 'page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'article_id,title,node_id,modified', 'platform' => 'pc');
     $contentData = app::get('topc')->rpcCall('syscontent.content.get.list', $params);
     $count = $contentData['articlecount'];
     $contentList = $contentData['articleList'];
     $nodeInfo = $contentData['nodeInfo'];
     //处理翻页数据
     $current = $filter['pages'] ? $filter['pages'] : 1;
     $filter['pages'] = time();
     if ($count > 0) {
         $total = ceil($count / $pageSize);
     }
     $pagedata['pagers'] = array('link' => url::action('topc_ctl_content@index', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
     $pagedata['contentList'] = $contentList;
     $pagedata['count'] = $count;
     $pagedata['nodeInfo'] = $nodeInfo;
     //获取文章节点树
     $nodeList = $this->__getCommonInfo();
     $pagedata['nodeList'] = $nodeList;
     //echo '<pre>';print_r($pagedata);exit();
     return $this->page('topc/content/content.html', $pagedata);
 }
Example #14
0
 public function savetmpl()
 {
     $params = input::get();
     $params['shop_id'] = $this->shopId;
     $isExists = $this->isExists();
     if ($isExists) {
         $msg = "此模板名称已存在,请换一个重试";
         return $this->splash("error", "", $msg, true);
     }
     if ($params['template_id']) {
         try {
             if ($params['fee_conf']) {
                 $params['fee_conf'] = json_encode($params['fee_conf']);
             }
             app::get('topshop')->rpcCall('logistics.dlytmpl.update', $params, 'seller');
         } catch (Exception $e) {
             $msg = $e->getMessage();
             return $this->splash('error', '', $msg, true);
         }
     } else {
         try {
             if ($params['fee_conf']) {
                 $params['fee_conf'] = json_encode($params['fee_conf']);
             }
             app::get('topshop')->rpcCall('logistics.dlytmpl.add', $params, 'seller');
         } catch (Exception $e) {
             $msg = $e->getMessage();
             return $this->splash('error', '', $msg, true);
         }
     }
     $msg = app::get('topshop')->_('保存成功');
     $url = url::action('topshop_ctl_shop_dlytmpl@index');
     return $this->splash('success', $url, $msg, true);
 }
Example #15
0
 /**
  * ShopEx licence
  *
  * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
  * @license  http://ecos.shopex.cn/ ShopEx License
  */
 function function_menu()
 {
     $html = array();
     $shopUrl = url::action('topc_ctl_default@index');
     $shopWapUrl = url::action('topm_ctl_default@index');
     $html[] = "<a href='{$shopUrl}' target='_blank'>浏览商城</a>";
     $html[] = "<a href='{$shopWapUrl}' target='_blank'>手机商城</a>";
     return $html;
 }
Example #16
0
 public function column_href(&$colList, $list)
 {
     foreach ($list as $k => $row) {
         $url = url::action('topc_ctl_activity@index', ['id' => $row['activity_id']]);
         $target = '_blank';
         $title = '预览';
         $colList[$k] = '<a href="' . $url . '" target="' . $target . '">' . $title . '</a>';
     }
 }
Example #17
0
 public function column_look(&$colList, $list)
 {
     foreach ($list as $k => $row) {
         $url = url::action('topc_ctl_info@getInfo', array('article_id' => $row['article_id']));
         $target = '_blank';
         $title = app::get('sysinfo')->_('预览');
         $button = '<a href="' . $url . '" target="' . $target . '">' . $title . '</a>';
         $colList[$k] = $button;
     }
 }
Example #18
0
 /**
  * 分页处理
  * @param int $current 当前页
  * @return int $total  总页数
  * @return array $filter 查询条件
  *
  * @return $pagers
  */
 private function __pages($current, $totalItem, $filter)
 {
     //处理翻页数据
     $current = $current && $current <= 100 ? $current : 1;
     if ($totalItem > 0) {
         $totalPage = ceil($totalItem / $this->limit);
     }
     $pagers = array('link' => url::action('topm_ctl_list@ajaxItemShow', $filter), 'current' => $current, 'total' => $totalPage <= $this->maxPages ? $totalPage : $this->maxPages);
     return $pagers;
 }
Example #19
0
 public function saveqiugou()
 {
     $postdata = $_POST["qiugou"];
     try {
         $postdata["create_time"] = time();
         app::get("sysgongqiu")->model("qiugou")->save($postdata);
         $url = url::action('topshop_ctl_gongqiu@qiugouList');
         return $this->splash('success', $url, "添加成功", true);
     } catch (Exception $e) {
         return $this->splash('error', '', $e->getMessage(), true);
     }
 }
Example #20
0
 function admin_analytics(&$data)
 {
     global $manager, $tree, $user, $lang, $config;
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $config->set('analyticsId', $_POST['analyticsId']);
         header("Location: " . url::action('settings') . "/analytics");
         exit;
     }
     $tpl = new Template($this->getTemplate('settings.template'));
     $tpl->set("url", url::action('settings') . '/analytics');
     $data['template']->set('content', $tpl->fetch());
 }
Example #21
0
 public function saveS()
 {
     $postData = input::get();
     $user_id = userAuth::id();
     $arr['uniqid'] = $postData['uniqid'];
     $arr['trading_title'] = $postData['trading_title'];
     $arr['start_time'] = strtotime($postData['start_time']);
     $arr['stop_time'] = strtotime($postData['stop_time']);
     $arr['price_type'] = $postData['price_type'];
     $arr['advice'] = $postData['advice'];
     $arr['trade_type'] = $postData['trade_type'];
     $arr['add_price'] = $postData['add_price'];
     $arr['ensurence'] = $postData['ensurence'];
     $arr['fund_trend'] = $postData['fund_trend'];
     $arr['public_item'] = $postData['public_item'];
     $arr['limitation'] = $postData['limitation'];
     $arr['create_time'] = time();
     $arr['desc'] = $postData['desc'];
     $params["user_id"] = $user_id;
     $shopInfo = app::get('topc')->rpcCall('shop.get.shopInfo', $params, 'buyer');
     $arr['shop_id'] = $shopInfo['shop_id'];
     $arr['shop_name'] = $shopInfo["shop_name"];
     $arr["fixed_price"] = $postData["fixed_price"] ? $postData["fixed_price"] : 0;
     try {
         $saveItem = app::get('sysshoppubt')->model('biddings');
         $saveItem->save($arr);
         $item_ids = $postData['item_id'];
         $units = $postData['unit'];
         $num = $postData["num"];
         $standardg_item_ids = $postData['standardg_item_id'];
         $net_prices = $postData['net_price'];
         $fixed_prices = $postData['fixed_price'];
         $i = 0;
         $itemmodel = app::get('sysshoppubt')->model('standard_item');
         $db = app::get('sysshoppubt')->database();
         foreach ($item_ids as $key => $item_id) {
             $item = array();
             $sql = "update sysshoppubt_standard_item set unit = '" . $units[$i] . "' , net_price =" . $net_prices[$i] . " ,  fixed_price =" . $fixed_prices[$i] . ",num=  " . $num[$i] . " where standardg_item_id = " . $standardg_item_ids[$i];
             $db->exec($sql);
             $i++;
         }
     } catch (Exception $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     } catch (\LogicException $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     }
     $url = url::action('topc_ctl_member_biddings@biddingList');
     $msg = app::get('topc')->_('添加成功');
     return $this->splash('success', $url, $msg);
 }
Example #22
0
File: qq.php Project: 453111208/bbc
 public function __construct()
 {
     kernel::single('base_session')->start();
     $this->my_url = url::action("topm_ctl_trustlogin@callBack", array('actionType' => 'sysuser_pluginwap_qq'));
     if (preg_match("/^(http):\\/\\/?([^\\/]+)/i", $this->my_url, $matches)) {
         $this->my_url = str_replace('http://', '', $this->my_url);
         $this->my_url = preg_replace("|/+|", "/", $this->my_url);
         $this->my_url = "http://" . $this->my_url;
     } else {
         $this->my_url = str_replace('https://', '', $this->my_url);
         $this->my_url = preg_replace("|/+|", "/", $this->my_url);
         $this->my_url = "https://" . $this->my_url;
     }
 }
Example #23
0
 public function column_look(&$colList, $list)
 {
     foreach ($list as $k => $row) {
         if ($row['platform'] == 'pc') {
             $url = url::action('topc_ctl_content@getContentInfo', array('article_id' => $row['article_id']));
         } else {
             $url = url::action('topm_ctl_content@getContentInfo', array('article_id' => $row['article_id']));
         }
         $target = '_blank';
         $title = app::get('syscontent')->_('预览');
         $button = '<a href="' . $url . '" target="' . $target . '">' . $title . '</a>';
         $colList[$k] = $button;
     }
 }
Example #24
0
 private function __pager($filter, $count, $isImageModal)
 {
     $params['img_type'] = $filter['img_type'];
     $params['orderBy'] = $filter['orderBy'];
     if ($filter['image_name']) {
         $params['image_name'] = $filter['image_name'];
     }
     if ($isImageModal) {
         $params['imageModal'] = true;
     }
     $params['pages'] = time();
     $total = ceil($count / $this->limit);
     $pagers = array('link' => url::action('topshop_ctl_shop_image@search', $params), 'current' => $filter['page_no'], 'use_app' => 'topshop', 'total' => $total, 'token' => time());
     return $pagers;
 }
Example #25
0
 public function setTradeMemo()
 {
     $params['tid'] = input::get('tid');
     $params['shop_id'] = $this->shopId;
     try {
         $params['shop_memo'] = input::get('shop_memo');
         $result = app::get('topshop')->rpcCall('trade.add.memo', $params);
     } catch (Exception $e) {
         $msg = $e->getMessage();
         return $this->splash('error', '', $msg, true);
     }
     $msg = app::get('topshop')->_('备注添加成功');
     $url = url::action('topshop_ctl_trade_detail@index', array('tid' => $params['tid']));
     return $this->splash('success', $url, $msg, true);
 }
Example #26
0
 public function closeComplaints()
 {
     $data['complaints_id'] = input::get('complaints_id');
     $data['buyer_close_reasons'] = input::get('buyer_close_reasons');
     $oid = input::get('oid');
     try {
         $pagedata = app::get('topc')->rpcCall('trade.order.complaints.buyer.close', $data, 'buyer');
     } catch (LogicException $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg, true);
     }
     $url = url::action('topc_ctl_member_complaints@detail', ['oid' => $oid]);
     $msg = '订单投诉撤销成功';
     return $this->splash('success', $url, $msg, true);
 }
Example #27
0
 public function save_sample()
 {
     $userId = userAuth::id();
     $params["user_id"] = $userId;
     $shopInfoGet = app::get('topc')->rpcCall('shop.get.shopInfo', $params, 'buyer');
     if (!$userId) {
         $url = url::action('topc_ctl_passport@signin');
         return $this->splash('error', $url);
     }
     $data = $_POST;
     /*if(strtotime($data['ceshi'])<strtotime($data['about_time'])){
       return $this->splash('error',null, app::get('topc')->_('看样时间不可以大于截止时间'));
       }*/
     $sysshoppubt_sample_model = app::get('sysshoppubt')->model('sample');
     $stan = $sysshoppubt_sample_model->getList('seegoods_id', array('shop_id' => $data['shop_id'], 'user_id' => $shopInfoGet['shop_id'], 'standard_id' => $data['standard_id']));
     $bid = $sysshoppubt_sample_model->getList('seegoods_id', array('shop_id' => $data['shop_id'], 'user_id' => $shopInfoGet['shop_id'], 'bidding_id' => $data['bidding_id']));
     $tend = $sysshoppubt_sample_model->getList('seegoods_id', array('shop_id' => $data['shop_id'], 'user_id' => $shopInfoGet['shop_id'], 'tender_id' => $data['tender_id']));
     if (!$stan && !$bid && !$tend) {
         /*$user = app::get('sysuser')->model('user');
           $username = $user->getRow('user_name',array('user_id'=>$userId));*/
         $data['user_name'] = $shopInfoGet['shop_name'];
         $data['user_id'] = $shopInfoGet['shop_id'];
         $data['create_time'] = time();
         $data['about_time'] = strtotime($data['about_time']);
         $sysshoppubt_sample_model->save($data);
         if ($data['type'] == 0) {
             $total = $sysshoppubt_sample_model->count(array('standard_id' => $data['standard_id']));
             $sql = "update sysshoppubt_sprodrelease set attendcount='" . $total . "' where standard_id=" . $data['standard_id'];
             $db = app::get('sysshoppubt')->database();
             $db->exec($sql);
             return $this->splash('success', null, app::get('topc')->_('参加成功'));
         } elseif ($data['type'] == 2) {
             $total = $sysshoppubt_sample_model->count(array('tender_id' => $data['tender_id']));
             $sql = "update sysshoppubt_tender set attendcount='" . $total . "' where tender_id=" . $data['tender_id'];
             $db = app::get('sysshoppubt')->database();
             $db->exec($sql);
             return $this->splash('success', null, app::get('topc')->_('参加成功'));
         } elseif ($data['type'] == 1) {
             $total = $sysshoppubt_sample_model->count(array('bidding_id' => $data['bidding_id']));
             $sql = "update sysshoppubt_biddings set attendcount='" . $total . "' where bidding_id=" . $data['bidding_id'];
             $db = app::get('sysshoppubt')->database();
             $db->exec($sql);
             return $this->splash('success', null, app::get('topc')->_('参加成功'));
         }
     } else {
         return $this->splash('error', null, app::get('topc')->_('您已提交申请,请等待!'));
     }
 }
Example #28
0
 function admin_config(&$data)
 {
     global $manager, $tree, $user, $lang, $config;
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $config->set('siteTitle', $_POST['name']);
         $config->set('showLastModified', $_POST['showlastmodified'] == 'yes');
         $config->set('inlineLogin', $_POST['inlinelogin'] == 'yes');
         $config->set('inlineLogout', $_POST['inlinelogout'] == 'yes');
         $config->set('redirectToLogin', $_POST['redirecttologin'] == 'yes');
         header("Location: " . url::action('settings') . "/config");
         exit;
     }
     $tpl = new Template($this->getTemplate('settings.template'));
     $tpl->set("url", url::action('settings') . '/config');
     $data['template']->set('content', $tpl->fetch());
 }
Example #29
0
 public function getUserNotifyItemList($params)
 {
     $objMdlUserItem = app::get('sysuser')->model('user_item_notify');
     if (!$params['fields']) {
         $params['fields'] = '*';
     }
     $filter = array('item_id' => $params['item_id'], 'shop_id' => $params['shop_id'], 'sendstatus' => $params['sendstatus']);
     $pageSize = $params['page_size'] ? $params['page_size'] : 100;
     $pageNo = $params['page_no'] ? $params['page_no'] : 1;
     $limit = $pageSize;
     $page = ($pageNo - 1) * $limit;
     $aData = $objMdlUserItem->getList($params['fields'], $filter, $page, $limit, $orderBy);
     foreach ($aData as $key => $value) {
         $aData[$key]['vcode'] = url::action('topc_ctl_item@index', array('item_id' => $value['item_id']));
     }
     return $aData;
 }
Example #30
0
 public function __construct($app)
 {
     $this->my_url = url::action("topm_ctl_trustlogin@callBack", array('actionType' => 'sysuser_pluginwap_renren'));
     if (preg_match("/^(http):\\/\\/?([^\\/]+)/i", $this->my_url, $matches)) {
         $this->my_url = str_replace('http://', '', $this->my_url);
         $this->my_url = preg_replace("|/+|", "/", $this->my_url);
         $this->my_url = "http://" . $this->my_url;
     } else {
         $this->my_url = str_replace('https://', '', $this->my_url);
         $this->my_url = preg_replace("|/+|", "/", $this->my_url);
         $this->my_url = "https://" . $this->my_url;
     }
     $this->app = $app;
     $this->obj_session = kernel::single('base_session');
     $this->obj_session->start();
     $this->back_url = url::action('topm_ctl_passport@signin');
 }