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


PHP seo::set方法代码示例

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


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

示例1: array

    ?>
">登录</a><a class="reg" href="<?php 
    echo IUrl::creatUrl("/simple/reg?callback=" . $callback . "");
    ?>
">免费注册</a>]
			<?php 
}
?>
			</p>
		</div>
	    <?php 
$seo_data = array();
$site_config = new Config('site_config');
$site_config = $site_config->getInfo();
$seo_data['title'] = "用户登录_" . $site_config['name'];
seo::set($seo_data);
?>
<div class="wrapper clearfix">
	<div class="wrap_box">
		<h3 class="notice">已注册用户,请登录</h3>
		<p class="tips">欢迎来到我们的网站,如果您已是本站会员请登录</p>
		<div class="box login_box clearfix">
			<form action='<?php 
echo IUrl::creatUrl("/simple/login_act");
?>
' method='post'>
				<input type="hidden" name='callback' />
				<table width="515" class="form_table f_l">
					<col width="120px" />
					<col />
开发者ID:yongge666,项目名称:sunupedu,代码行数:30,代码来源:login.php

示例2: index

 public function index()
 {
     $itemId = intval(input::get('item_id'));
     if (empty($itemId)) {
         return redirect::action('topc_ctl_default@index');
     }
     if (userAuth::check()) {
         $pagedata['nologin'] = 1;
     }
     $pagedata['user_id'] = userAuth::id();
     $pagedata['image_default_id'] = $this->__setting();
     $params['item_id'] = $itemId;
     $params['fields'] = "*,item_desc.pc_desc,item_count,item_store,item_status,sku,item_nature,spec_index";
     $detailData = app::get('topc')->rpcCall('item.get', $params);
     if (!$detailData) {
         $pagedata['error'] = "很抱歉,您查看的宝贝不存在,可能已下架或者被转移";
         return $this->page('topc/items/error.html', $pagedata);
     }
     if (count($detailData['sku']) == 1) {
         $detailData['default_sku_id'] = array_keys($detailData['sku'])[0];
     }
     $detailData['valid'] = $this->__checkItemValid($detailData);
     //判断此商品发布的平台,如果是wap端,跳转至wap链接
     if ($detailData['use_platform'] == 2) {
         redirect::action('topm_ctl_item@index', array('item_id' => $itemId))->send();
         exit;
     }
     //相册图片
     if ($detailData['list_image']) {
         $detailData['list_image'] = explode(',', $detailData['list_image']);
     }
     //获取商品的促销信息
     $promotionDetail = app::get('topc')->rpcCall('item.promotiontag.get', array('item_id' => $itemId));
     if ($promotionDetail) {
         $promotionIds = explode(',', $promotionDetail['promotion_ids']);
         foreach ($promotionIds as $promotionId) {
             $basicPromotionInfo = app::get('topc')->rpcCall('promotion.promotion.get', array('promotion_id' => $promotionId, 'platform' => 'pc'));
             if ($basicPromotionInfo['valid'] === true) {
                 $pagedata['promotionDetail'][$promotionId] = $basicPromotionInfo;
             }
         }
     }
     $pagedata['promotion_count'] = count($pagedata['promotionDetail']);
     // 活动促销(如名字叫团购)
     $activityDetail = app::get('topc')->rpcCall('promotion.activity.item.info', array('item_id' => $itemId, 'valid' => 1), 'buyer`');
     if ($activityDetail) {
         $pagedata['activityDetail'] = $activityDetail;
     }
     $detailData['spec'] = $this->__getSpec($detailData['spec_desc'], $detailData['sku']);
     $detailData['qrCodeData'] = $this->__qrCode($itemId);
     $pagedata['item'] = $detailData;
     //获取商品详情页左侧店铺分类信息
     $pagedata['shopCat'] = app::get('topc')->rpcCall('shop.cat.get', array('shop_id' => $pagedata['item']['shop_id']));
     //获取该商品的店铺信息
     $pagedata['shop'] = app::get('topc')->rpcCall('shop.get', array('shop_id' => $pagedata['item']['shop_id']));
     //获取该商品店铺的DSR信息
     $pagedata['shopDsrData'] = $this->__getShopDsr($pagedata['item']['shop_id']);
     $pagedata['next_page'] = url::action("topc_ctl_item@index", array('item_id' => $itemId));
     if ($pagedata['user_id']) {
         //获取该用户的最近购买记录
         $pagedata['buyerList'] = app::get('topc')->rpcCall('trade.user.buyerList', array('user_id' => $pagedata['user_id']));
     }
     //设置此页面的seo
     $brand = app::get('topc')->rpcCall('category.brand.get.info', array('brand_id' => $detailData['brand_id']));
     $cat = app::get('topc')->rpcCall('category.cat.get.info', array('cat_id' => $detailData['cat_id']));
     $seoData = array('item_title' => $detailData['title'], 'shop_name' => $pagedata['shop']['shop_name'], 'item_brand' => $brand['brand_name'], 'item_bn' => $detailData['bn'], 'item_cat' => $cat[$detailData['cat_id']]['cat_name'], 'sub_title' => $detailData['sub_title']);
     seo::set('topc.item.detail', $seoData);
     //echo '<pre>';print_r($pagedata);exit();
     return $this->page('topc/items/index.html', $pagedata);
 }
开发者ID:453111208,项目名称:bbc,代码行数:70,代码来源:item.php


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