当前位置: 首页>>代码示例>>PHP>>正文


PHP IUrl::creaturl方法代码示例

本文整理汇总了PHP中IUrl::creaturl方法的典型用法代码示例。如果您正苦于以下问题:PHP IUrl::creaturl方法的具体用法?PHP IUrl::creaturl怎么用?PHP IUrl::creaturl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IUrl的用法示例。


在下文中一共展示了IUrl::creaturl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 public function show()
 {
     $shop = trim(IFilter::act(IReq::get("id")));
     $where = 0 < intval($shop) ? " where a.shopid = " . $shop : "where shortname='" . $shop . "'";
     $shopinfo = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "shopfast as a left join " . Mysite::$app->config['tablepre'] . "shop as b  on a.shopid = b.id " . $where . "   ");
     if (empty($shopinfo)) {
         $link = IUrl::creaturl("site/index");
         $this->message("获取店铺信息失败", $link);
     }
     if ($shopinfo['endtime'] < time()) {
         $link = IUrl::creaturl("site/index");
         $this->message("店铺已关门", $link);
     }
     $nowhour = date("H:i:s", time());
     $nowhour = strtotime($nowhour);
     $data['shopinfo'] = $shopinfo;
     $data['shopopeninfo'] = $this->shopIsopen($shopinfo['is_open'], $shopinfo['starttime'], $shopinfo['is_orderbefore'], $nowhour);
     $data['com_goods'] = $this->mysql->getarr("select *  from " . Mysite::$app->config['tablepre'] . "goods where shopid = " . $shopinfo['id'] . " and is_com = 1 and is_goshop=1 ");
     $goodstype = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "goodstype where shopid = " . $shopinfo['id'] . " and cattype = " . $shopinfo['shoptype'] . " and is_goshop=1 order by orderid asc");
     $data['goodstype'] = array();
     $tempids = array();
     foreach ($goodstype as $key => $value) {
         $value['det'] = $this->mysql->getarr("select *  from " . Mysite::$app->config['tablepre'] . "goods where typeid = " . $value['id'] . " and shopid=" . $shopinfo['id'] . " and  is_goshop=1");
         $tempids[] = $value['id'];
         $data['goodstype'][] = $value;
     }
     $data['mainattr'] = array();
     $templist = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "shoptype where  cattype = " . $shopinfo['shoptype'] . " and parent_id = 0 and is_main =1  order by orderid asc limit 0,1000");
     foreach ($templist as $key => $value) {
         $value['det'] = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "shoptype where parent_id = " . $value['id'] . " order by orderid asc  limit 0,20");
         $data['mainattr'][] = $value;
     }
     $data['shopattr'] = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "shopattr  where  cattype = " . $shopinfo['shoptype'] . " and shopid = '" . $shopinfo['id'] . "'  order by firstattr asc limit 0,1000");
     $data['goodsattr'] = array();
     $goodsattr = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "goodssign  where  type = 'goods'  order by id asc limit 0,1000");
     foreach ($goodsattr as $key => $value) {
         $data['goodsattr'][$value['id']] = $value['imgurl'];
     }
     $data['psinfo'] = $this->pscost($shopinfo, 1);
     $sellrule = new sellrule();
     $sellrule->setdata($shopinfo['shopid'], 1000, $shopinfo['shoptype']);
     $ruleinfo = $sellrule->getdata();
     $data['ruledata'] = array();
     if (isset($ruleinfo['cxids']) && $ruleinfo['cxids']) {
         $data['ruledata'] = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "rule  where  id in(" . $ruleinfo['cxids'] . ")  order by id asc limit 0,1000");
     }
     $cximglist = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "goodssign  where  type = 'cx'  order by id asc limit 0,1000");
     $data['ruleimg'] = array();
     foreach ($cximglist as $key => $value) {
         $data['ruleimg'][$value['id']] = $value['imgurl'];
     }
     $data['cxlist'] = $ruleinfo;
     $data['scoretocost'] = Mysite::$app->config['scoretocost'];
     $data['collect'] = array();
     if (!empty($this->memberinfo)) {
         $data['collect'] = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "collect where collectid=" . $shopinfo['id'] . " and collecttype = 0 and uid=" . $this->member['uid'] . " ");
     }
     $bzinfo = Mysite::$app->config['orderbz'];
     $data['bzlist'] = array();
     if (!empty($bzinfo)) {
         $data['bzlist'] = unserialize($bzinfo);
     }
     $addresslist = array();
     if (0 < $this->member['uid']) {
         $addresslist = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "address where userid=" . $this->member['uid'] . "  ");
     }
     $data['addresslist'] = $addresslist;
     $data['paylist'] = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "paylist   order by id desc  ");
     $data['juanlist'] = array();
     if (!empty($this->member['uid'])) {
         $data['juanlist'] = $this->mysql->getarr("select * from " . Mysite::$app->config['tablepre'] . "juan  where uid ='" . $this->member['uid'] . "'  and status = 1 and endtime > " . time() . "  order by id desc limit 0,20");
     }
     Mysite::$app->setdata($data);
 }
开发者ID:snamper,项目名称:xiaoshuhaochi,代码行数:74,代码来源:method.php


注:本文中的IUrl::creaturl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。