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


PHP index_get_new_articles函数代码示例

本文整理汇总了PHP中index_get_new_articles函数的典型用法代码示例。如果您正苦于以下问题:PHP index_get_new_articles函数的具体用法?PHP index_get_new_articles怎么用?PHP index_get_new_articles使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: index

 public function index()
 {
     /*$ZhixiaCityTwoList=M('common_district')->where(array('level'=>2,'upid in (1,2,9,22)'))->select();
       foreach($ZhixiaCityTwoList as $k=>$v){
           $CIDList[]=$v['id'];
       }
       $CityThreeList=M('common_district')->where(array('level'=>3,'upid not in ('.implode(',',$CIDList).')'))->select();
       set_time_limit(0);
       foreach($CityThreeList as $k=>$v){
           //$name=str_replace(array('区','县'),'',$v['name']);
           $name=$v['name'];
           $KeyInfo=M('common_district')->where(array('`id` = '.$v['upid'].''))->find();
           $keyname=str_replace(array('区','县','省','市'),'',$KeyInfo['name']);
           $Url='http://localhost/'.U('Mongo/Index/Index').'&name='.urlencode($name).'&keyname='.urlencode($keyname);
           //echo file_get_contents($Url,);die;
           //header('Location:'.$Url);die;
           if(function_exists('file_get_contents')){
               $content=file_get_contents($Url);
           }else if(function_exists('curl_init')){
               $ch = curl_init();
               $timeout = 5;
               curl_setopt($ch, CURLOPT_URL, $Url);
               curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
               curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
               $content=curl_exec($ch);
               curl_close($ch);
           }else{
               $this->get_admin_msg($_SERVER['HTTP_REFERER'],"请开启CURL模块或者file_get_contents函数");
           }
           //echo $content;die;
       }die;*/
     $categories_tree = $this->get_categories_tree();
     $this->assign('categories', $categories_tree);
     // 分类树
     $navigator_list = $this->get_navigator($ctype, $catlist);
     $this->assign('navigator_list', $navigator_list);
     $category_list = $this->cat_list(0, 0, true, 2, false);
     $this->assign('category_list', $category_list);
     $promotion_info = get_promotion_info();
     $this->assign('promotion_info', $promotion_info);
     $this->assign('shop_notice', C('shop_notice'));
     $new_articles = index_get_new_articles();
     $this->assign('new_articles', $new_articles);
     // 最新文章
     $brand_list = get_brands();
     $this->assign('brand_list', $brand_list);
     $this->display();
 }
开发者ID:highestgoodlikewater,项目名称:ecshoptk,代码行数:48,代码来源:IndexController.class.php

示例2: get_top10

 $smarty->assign('top_goods', get_top10());
 // 销售排行
 $smarty->assign('best_goods', get_recommend_goods('best'));
 // 推荐商品
 $smarty->assign('new_goods', get_recommend_goods('new'));
 // 最新商品
 $smarty->assign('hot_goods', get_recommend_goods('hot'));
 // 热点文章
 $smarty->assign('promotion_goods', get_promote_goods());
 // 特价商品
 $smarty->assign('brand_list', get_brands());
 $smarty->assign('promotion_info', get_promotion_info());
 // 增加一个动态显示所有促销信息的标签栏
 $smarty->assign('invoice_list', index_get_invoice_query());
 // 发货查询
 $smarty->assign('new_articles', index_get_new_articles());
 // 最新文章
 $smarty->assign('group_buy_goods', index_get_group_buy());
 // 团购商品
 $smarty->assign('auction_list', index_get_auction());
 // 拍卖活动
 $smarty->assign('shop_notice', $_CFG['shop_notice']);
 // 商店公告
 /* 首页主广告设置 */
 $smarty->assign('index_ad', $_CFG['index_ad']);
 if ($_CFG['index_ad'] == 'cus') {
     $sql = 'SELECT ad_type, content, url FROM ' . $ecs->table("ad_custom") . ' WHERE ad_status = 1';
     $ad = $db->getRow($sql, true);
     $smarty->assign('ad', $ad);
 }
 /* links */
开发者ID:seanguo166,项目名称:microdistribution,代码行数:31,代码来源:index.php

示例3: if

	jsonExit($article_list);

}else if($act == 'info')//文章信息
{
	$article_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
	$article = array();
	if($article_id > 0)
	{
		$article = get_article_info($article_id);
	}
	jsonExit($article);
}
else if ($act == 'ShopAnnouncement')//只查询cat_id=13(店铺公告)作为精品推荐
{
	$cat_id = 13;
	$related_articles = index_get_new_articles($cat_id);
	//var_dump($related_articles);exit;
	jsonExit($related_articles);
}
//精品推荐
else if ($act = 'recommendGoods') {
	$article_id = isset($_GET['id']) ? intval($_GET['id']) : 14;
	$article = array();
	if($article_id > 0)
	{
		//文章详细信息
		$article = get_article_info($article_id);
		//文章关联产品
		$article_related_goods = article_related_goods($article_id);		
		$articleArr = array('article'=>$article,'article_related_goods'=>$article_related_goods);
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:article.php

示例4: ShopAnnouncement

	public function ShopAnnouncement () {
		$cat_id = 13;
		$related_articles = index_get_new_articles($cat_id);
		//var_dump($related_articles);exit;
		jsonExit($related_articles);
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:6,代码来源:article.action.php


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