本文整理汇总了PHP中F::baseUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP F::baseUrl方法的具体用法?PHP F::baseUrl怎么用?PHP F::baseUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类F
的用法示例。
在下文中一共展示了F::baseUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getGoodsData
public static function getGoodsData($params)
{
$sql = self::getGoodsSql($params);
if ($params['SellerID'] && $params['IsSale'] == 0) {
$sql["countSql"] = str_replace('dg.IsSale=1', 'dg.IsSale=0', $sql["countSql"]);
$sql["sql"] = str_replace('dg.IsSale=1', 'dg.IsSale=0', $sql["sql"]);
}
$res = Yii::app()->papdb->createCommand($sql["countSql"])->queryAll();
$count = $res[0]['count'];
$dataProvider = new CSqlDataProvider($sql["sql"], array('db' => Yii::app()->papdb, 'totalItemCount' => $count, 'pagination' => array('pageSize' => $params['rows'] ? $params['rows'] : 10)));
$goods = $dataProvider->getData();
foreach ($goods as $k => $v) {
$image = self::getOneGoodsImage($v['ID']);
if (!$image) {
$goods[$k]['image'] = F::baseUrl() . '/upload/' . 'dealer/default-goods.png';
} else {
$goods[$k]['image'] = F::baseUrl() . '/upload/' . $image;
}
//获取标准名称
if ($v['StandCode']) {
$goods[$k]['cpname'] = Gcategory::model()->find(array('select' => 'Name', 'condition' => "Code = '{$v['StandCode']}'"))->attributes['Name'];
}
//卖家信息
$goods[$k]['dealername'] = Organ::model()->findByPk($v['OrganID'], array('select' => 'OrganName'))->attributes['OrganName'];
if (!$params["resource"] || $params["resource"] != "mall") {
//OE号
$goods[$k]['OENOS'] = self::getOENOSByGoodsID($v['ID']);
// 车型车系
//$carmodel = explode('、', self::getVehicleByGoodsID($v['ID']));
//$goods[$k]['vehicle'] = $carmodel[0];
//$goods[$k]['vehicle'] = self::getOneVehicleByGoodsID($v['ID']);
}
}
$dataProvider->setData($goods);
return array('dataProvider' => $dataProvider, 'count' => $count);
}
示例2: foreach
</a> > <?php
echo $r['Name'];
?>
</span>
</p>
<div class="content1">
<div class="content1a float_l">
<!--图片切换-->
<div id=preview>
<div class=jqzoom id=spec-n1 >
<IMG height=350 src="<?php
echo F::baseUrl() . '/upload/' . $r['Images'][0];
?>
" jqimg="<?php
echo F::baseUrl() . '/upload/' . $r['Images'][0];
?>
" width=350>
</div>
<div id=spec-n5>
<div class=control id=spec-left>
<img src="<?php
echo Yii::app()->theme->baseUrl;
?>
/images/papmall/left.gif" />
</div>
<div id=spec-list>
<ul class=list-h>
<?php
if ($r['Images']) {
foreach ($r['Images'] as $v) {
示例3:
<?php
Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/fancybox/jquery.mousewheel-3.0.4.pack.js');
//Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/fancybox/jquery.fancybox-1.3.4.pack.js');
Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/js/fancybox/jquery.fancybox-1.3.4.css');
Yii::app()->clientScript->registerScriptFile(F::baseUrl() . '/js/magnifier.js');
//Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl.'/themes/default/css/review.css');
//Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/themes/default/js/review.js');
Yii::app()->clientScript->registerCoreScript('jquery');
?>
<script type="text/javascript">
$(document).ready(function() {
/* This is basic - uses default settings */
$("a#single_image").fancybox();
/* Using custom settings */
$("a#inline").fancybox({
'hideOnContentClick': true
});
/* Apply fancybox to multiple items */
$("a.group").fancybox({
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'speedIn': 600,
'speedOut': 200,
'overlayShow': false
});
$("#LinkOrder").click(function(event) {
$('#orderForm').submit();
});
/*
* 暴力清除商品浏览历史记录!
示例4: getFileUrl
/**
* 得到文件URL
* @return type
*/
public function getFileUrl()
{
return F::baseUrl() . $this->getFilePath();
}
示例5: getImage
public function getImage()
{
$img_url = 'http://' . F::sg('site', 'imageDomain') . '/core/ad/' . $this->pic;
return CHtml::image(F::baseUrl() . $img_url, $this->title, array('style' => 'width:600px;height:300px'));
}
示例6: setSelectVechile
" name="jpmall_series" id="jpmall_series"/>
<input type="hidden" value="<?php
echo $jpmall_year;
?>
" name="jpmall_year" id="jpmall_year"/>
<input type="hidden" value="<?php
echo $jpmall_model;
?>
" name="jpmall_model" id="jpmall_model"/>
</div>
</div>
<script>
var Yii_chenhgUrl = "<?php
echo F::baseUrl();
?>
";
//判断是否为默认点击厂家
var maketarget_m = true;
//判断是否为默认点击车系
var sericesarget_m = true;
//判断是否为默认点击年款
var yeartarget_m = true;
//判断弹窗是否显示
var isshow_m = false;
var checkcode=0; //是否需要输入验证码,0不需要1需要
function setSelectVechile() {
}
示例7:
$this->workPage = false;
?>
<!--客户信息-->
<div class="kh_info">
<span class="x1">我的待办事项:</span>
<a href="<?php
echo F::baseUrl() . '/pap/inquirylist/index/sta/0';
?>
"><span class="spanli" style="color:#fff;">待报价的询价单<span class="fontcolor" style="color:#fff;"><b>(<label class="Dwaitquotation" id="Dwaitquotations" style="color:#fff;"><?php
echo $dquotions ? $dquotions : 0;
?>
</label>)</b></span></span></a>
<a href="<?php
echo F::baseUrl() . '/pap/sellerorder/index/Status/2/type/2';
?>
"><span class="spanli" style="color:#fff;">待发货的订单<span class="fontcolor" style="color:#fff;"><b>(<label class="Dwaitshipping" id="Dwaitshippings" style="color:#fff;"><?php
echo $dShipping ? $dShipping : 0;
?>
</label>)</b></span></span></a>
<a href="<?php
echo F::baseUrl() . '/pap/dealerreturn/index/Status/1';
?>
"><span class="spanli" style="color:#fff;">待审核的退货单<span class="fontcolor" style="color:#fff;"><b>(<label class="Returnaudit" id="Returnaudits" style="color:#fff;"><?php
echo $returnaudit ? $returnaudit : 0;
?>
</label>)</b></span></span></a>
</div>
<?php
$this->widget('widgets.default.WStage');
$this->pageTitle = Yii::app()->name . ' - 经销商首页';
示例8: ucfirst
<div class="page-title category-title">
<h1><?php
echo ucfirst($key);
?>
</h1>
</div>
<div class="horizontal-section">
<a href="http://ultimo.infortis-themes.com/demo/default/women.html#">
<!--<img src="<?php
echo F::themeUrl();
?>
/media/category01.jpg" title="You can edit this block or replace it with custom content" alt="Sample banner">-->
<?php
echo CHtml::image(F::baseUrl() . '/../../upload/category/' . $model->pic, $key, array('title' => $key));
?>
<div class="caption light3 full-width">
<h2 class="heading permanent">Category Banner</h2>
<p>Upload image and description for every category in the store</p>
<p>Create landing pages for categories</p>
</div>
</a>
</div>
<div class="category-products">
<div class="toolbar">
示例9: array
<?php
Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/login_nav.js');
?>
<div class="col-lg-6">
<?php
echo CHtml::link('收藏网站', F::baseUrl(), array(rel => "sidebar", 'onclick' => "addFavorite();"));
echo ' ' . CHtml::link('官网', Yii::app()->getBaseUrl(true));
?>
<span class="cor_red bold font14">Tel: 13967414054</span>
<?php
echo CHtml::link('在线客服', array('page/contact', 'key' => 'help'));
?>
</div>
<div class="col-lg-6">
<ul class="top_right_nav">
<?php
if (Yii::app()->user->isGuest) {
?>
<li><?php
echo CHtml::link('登录', array('/user/login'));
?>
</li>
<li><?php
echo CHtml::link('注册', array('/user/registration'));
?>
</li>
<?php
} else {
?>
示例10: getGoods
//.........这里部分代码省略.........
// $goodsName = trim($params['goodsName']); // 商品名称
// $pinyin = $params['pinyin']; // 商品名称
// $brand = $params['BrandName']; // 商品品牌名
// $OENO = $params['OENO']; // 商品OE号
// $IsSale = $params['IsSale']; // 是否上架
// $IsPro = $params['IsPro']; // 是否促销
// $gbigparts = $params['gbigparts']; // 大类
// $gsubparts = $params['gsubparts']; // 子类
// $gmake = $params['gmake']; // 厂家
// $gcar = $params['gcar']; // 车系
// $gyear = $params['gyear']; // 年款
// $gmodel = $params['gmodel']; // 车型
$sql = "SELECT dg.*,if(dg.ProPrice and dg.IsPro=1,dg.ProPrice,if(discount.PriceRatio,discount.PriceRatio*dg.Price,dg.Price)) as ppp FROM `pap_goods` dg left join(\n SELECT p.OrganID as OrganID, left(p.PriceRatio,char_length(p.PriceRatio)-1)/100 as PriceRatio from `pap_goods_price_manage` AS p ,`pap_client_type` as ct WHERE \n p.CooperationType = ct.Cooperationtype \n AND ct.ServiceID = {$organ_ID} and ct.DealerID=p.OrganID \n AND (!ISNULL(p.PriceRatio) AND p.PriceRatio !='')) as discount \n on dg.OrganID = discount.OrganID where dg.ISdelete=1 and dg.IsSale=1";
//子类和标准名称查询
if ($code) {
$sql .= " and dg.StandCode='{$code}'";
} else {
$id = self::getGoodsIDBySub($sub);
$sql .= " and dg.ID in({$id})";
}
//商品品牌筛选
if ($brand) {
$sql .= " and dg.BrandID = '{$brand}'";
}
//商品价格筛选
if ($price) {
$sql .= " and if(dg.ProPrice and dg.IsPro=1,dg.ProPrice,if(discount.PriceRatio,discount.PriceRatio*dg.Price,dg.Price)) {$price}";
}
//商品编号、oe号
// if ($goodsName) {
// $sql.=" and (dg.Title like '%$goodsName%') ";
// }
// 机构名称
// if (!empty($organID)) {
// $sql.=" and dg.OrganID = $organID";
// }
// 是否促销
// if (empty($IsPro) || $IsPro == 'all') {
// $sql.=" and dg.IsPro between 0 and 1";
// } else {
// if ($IsPro == 2) { // 不是促销的
// $sql.=" and dg.IsPro = 0";
// } else { // 是促销的
// $sql.=" and dg.IsPro = 1 and !ISNULL(dg.ProPrice)";
// }
// }
// 车型车系
// if (!empty($gmake)) {
// $arr = array();
// $arr['gmake'] = $gmake ? $gmake : 0;
// $arr['gcar'] = $gcar ? $gcar : 0;
// $arr['gyear'] = $gyear ? $gyear : 0;
// $arr['gmodel'] = $gmodel ? $gmodel : 0;
// $goodsIDS = self::getVehcondition($arr);
// if ($goodsIDS) {
// $goodsStr = implode(',', $goodsIDS);
// $sql.=" and dg.ID in ($goodsStr)";
// } else {
// $sql.=" and dg.ID in (0)";
// }
// }
//
//
//查询商品个数
$countSql = str_replace('dg.*', 'count(*)', $sql);
// return $countSql;exit;
//商品排序
if ($orderby) {
if ($orderby == 'sales_l') {
// 按销量从多到少
$sql .= " order by dg.Sales DESC";
} elseif ($orderby == 'sales_h') {
// 按销量从少到多
$sql .= " order by dg.Sales ASC";
} elseif ($orderby == 'price_l') {
//总价从高到低
$sql .= " order by ppp DESC";
} elseif ($orderby == 'price_h') {
// 总价从低到高
$sql .= " order by ppp ASC";
}
}
$res = Yii::app()->papdb->createCommand($countSql)->queryAll();
$count = $res[0]['count(*)'];
$pages = new CPagination($count);
$pages->pageSize = $rows;
$offset = ($curpage - 1) * $pages->pageSize;
$goods = Yii::app()->papdb->createCommand($sql . " LIMIT {$offset},{$pages->pageSize}")->queryAll();
foreach ($goods as $k => $v) {
$image = self::getOneGoodsImage($v['ID']);
if (!$image) {
$goods[$k]['image'] = F::baseUrl() . '/upload/' . 'dealer/goods-img-big.jpg';
// } else if (!file_exists(F::baseUrl() . '/upload/' . $image)) {
// $goods[$k]['image'] = F::baseUrl() . '/upload/' . 'dealer/default-goods2.png';
} else {
$goods[$k]['image'] = F::baseUrl() . '/upload/' . $image;
}
}
return array('data' => $goods, 'count' => $count);
}
示例11: array
?>
);"> </span>Chinese</a></li>
<li><a href="<?php
echo Yii::app()->createUrl('/translate/translate/set', array('lang' => 'en_us'));
?>
">
<span class="label dropdown-icon" style="background-image:url(<?php
echo F::baseUrl() . '/images/flag_en_us.png';
?>
);"> </span>America</a></li>
<li><a href="<?php
echo Yii::app()->createUrl('/translate/translate/set', array('lang' => 'ru'));
?>
">
<span class="label dropdown-icon" style="background-image:url(<?php
echo F::baseUrl() . '/images/flag_ru.png';
?>
);"> </span>Russian</a></li>
</ul>
</div>
</div>
<!-- end: header-top %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<div class="header-main v-grid-container">
<div class="logo-wrapper grid12-4 v-grid">
<h1 class="logo"><strong>Responsive Magento Theme</strong><a href="<?php
echo F::themeUrl();
?>
/media/index.html" title="Responsive Magento Theme"><img src="<?php
echo F::themeUrl();
示例12: foreach
</div>
<div id=spec-n5>
<div class=control id=spec-left>
<img src="<?php
echo Yii::app()->theme->baseUrl;
?>
/images/papmall/left.gif" />
</div>
<div id=spec-list>
<ul class=list-h>
<?php
if ($r['Images']) {
foreach ($r['Images'] as $v) {
?>
<li><img src="<?php
echo F::baseUrl() . '/upload/' . $v['ImageUrl'];
?>
"> </li>
<?php
}
}
?>
</ul>
</div>
<div class=control id=spec-right>
<img src="<?php
echo Yii::app()->theme->baseUrl;
?>
/images/papmall/right.gif" />
</div>
</div>
示例13: array
语言:
<?php
echo CHtml::link(CHtml::image(F::baseUrl() . '/images/flag_zh_cn.png'), array('/translate/translate/set', 'lang' => 'zh_cn'));
?>
<?php
echo CHtml::link(CHtml::image(F::baseUrl() . '/images/flag_en.png'), array('/translate/translate/set', 'lang' => 'en'));
?>
<?php
echo CHtml::link(CHtml::image(F::baseUrl() . '/images/flag_de.png'), array('/translate/translate/set', 'lang' => 'de'));
?>
<?php
echo CHtml::link(CHtml::image(F::baseUrl() . '/images/flag_ru.png'), array('/translate/translate/set', 'lang' => 'ru'));
?>
<?php
echo CHtml::link(CHtml::image(F::baseUrl() . '/images/flag_en_us.png'), array('/translate/translate/set', 'lang' => 'en'));
?>
示例14: getRecentThumb
/**
* 得到最近商品缩略图
* @return type
*/
public function getRecentThumb()
{
$img = $this->getMainPicPath();
if (file_exists(dirname(F::basePath()) . $img)) {
$img_thumb = F::baseUrl() . ImageHelper::thumb(210, 210, $img, array('method' => 'resize'));
$img_thumb_now = CHtml::image($img_thumb, $this->title);
return CHtml::link($img_thumb_now, array('/item/view', 'id' => $this->item_id), array('title' => $this->title));
} else {
return CHtml::link(CHtml::image($this->getHolderJs('210', '210')), $this->getUrl(), array('title' => $this->title));
}
}
示例15: getMainPicUrl
/**
* get main picture url
* @return string
* @author milkyway(yhxxlm@gmail.com)
*/
public function getMainPicUrl()
{
return F::baseUrl() . $this->getMainPicPath();
}