當前位置: 首頁>>代碼示例>>PHP>>正文


PHP url::action方法代碼示例

本文整理匯總了PHP中url::action方法的典型用法代碼示例。如果您正苦於以下問題:PHP url::action方法的具體用法?PHP url::action怎麽用?PHP url::action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在url的用法示例。


在下文中一共展示了url::action方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: sendback

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:26,代碼來源:aftersales.php

示例2: contentList

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:25,代碼來源:content.php

示例3: __commonData

 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;
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:34,代碼來源:promotion.php

示例4: detail

 /**
  * 結算明細
  * @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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:36,代碼來源:settlement.php

示例5: column_edit

 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>";
     }
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:7,代碼來源:item.php

示例6: saveInfo

 /**
  * 資訊保存
  **/
 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:31,代碼來源:info.php

示例7: ajaxCouponData

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:30,代碼來源:coupon.php

示例8: getPromotionItem

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:31,代碼來源:promotion.php

示例9: doCreateRate

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:29,代碼來源:rate.php

示例10: theme_widget_floor_index

/**
 * 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;
}
開發者ID:453111208,項目名稱:bbc,代碼行數:35,代碼來源:theme_widget_floor_index.php

示例11: index

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:7,代碼來源:sitemaps.php

示例12: index

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:27,代碼來源:notice.php

示例13: index

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:28,代碼來源:content.php

示例14: savetmpl

 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);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:34,代碼來源:dlytmpl.php

示例15: function_menu

 /**
  * 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;
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:15,代碼來源:menu.php


注:本文中的url::action方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。