<?php
/*
'**************************************************************************************************
' 软件名称: YES风淘宝网赚系统 
' 版本编号: Version 7.1
' 官方网站: http://soft.yesfeng.com
' 官方演示：http://demo.yesfeng.com
' 服务中心：http://service.yesfeng.com
' 版权所有: YES风运营团队
' 法律顾问: 宁波市甬港律师事务所 
' 郑重声明:
'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    2、YES风网络事业部保留此软件的法律追究权利
'**************************************************************************************************
*/
include 'comm/conn.php'; 
include 'fckeditor/fckeditor.php';
include 'comm/config.php';
include 'comm/checkpostandget1.php';
$yf_ID=$_GET['id'];

$link = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$link) {
	die('数据库链接出错: ' . mysql_error());
}
else
{
	mysql_query("set names gbk");
	$sqll="select * from yf_article where yf_ID=".$yf_ID;
	mysql_select_db($dbname);
	$rs = mysql_query($sqll);
    while ($row = mysql_fetch_array($rs)){
	$yf_Name =$row[yf_Name];
	$yf_Name1 =$row[yf_Name];
	$yf_ID =$row[yf_ID];
	$yf_Keywords =$row[yf_Keywords];
	$yf_Author =$row[yf_Author];
	$yf_Source =$row[yf_Source];
	$yf_Remark =$row[yf_Remark];
	$yf_Content =$row[yf_Content];
	$yf_AddTime =$row[yf_AddTime];
	}
}	
?>
<?php
error_reporting(0);
require_once 'function.php';
$catid = !($_GET['catid'])?'0':intval($_GET['catid']);
$catid = getnochengrencid($catid);
$page = !($_GET['page'])?'0':intval($_GET['page']);
$sort = !($_GET['sort'])?'commissionNum_desc':$_GET['sort'];
$sp = !($_GET['sp']) ? '1' : $_GET['sp'];
$ep = !($_GET['ep']) ? '10000' : $_GET['ep'];

$cat_name = iconv("GBK","UTF-8","所有分类");
$is_parent = "false";
if($catid != 0)
{
	$Taoapi->method = 'taobao.itemcats.get';
	$Taoapi->fields = 'cid,name,parent_cid,is_parent';
	$Taoapi->cids = $catid;
	$TaoapiCat = $Taoapi->SendCheng('get','xml')->getArrayData();
	$result_cat = $TaoapiCat["item_cats"]["item_cat"];
	$cat_name = $result_cat["name"];
	$is_parent = $result_cat["is_parent"];
}

if($is_parent == "true")
{
	$Taoapi->method = 'taobao.itemcats.get';
	$Taoapi->fields = 'cid,name,parent_cid';
	$Taoapi->parent_cid = $catid;
	$TaoapiSubCats = $Taoapi->SendCheng('get','xml')->getArrayData();
	$result_subcats = $TaoapiSubCats["item_cats"]["item_cat"];
}

$Taoapi->method = 'taobao.taobaoke.items.get';
$Taoapi->fields = 'iid,num_iid,title,nick,pic_url,price,click_url,commission,commission_rate,commission_num,commission_volume,seller_credit_score,shop_click_url';
$Taoapi->nick = $usernick;
$Taoapi->cid = $catid;
$Taoapi->page_no = $page;
$Taoapi->page_size = '20';
$Taoapi->sort = $sort;
$Taoapi->start_price = $sp;
$Taoapi->end_price = $ep;
$TaoapiItems = $Taoapi->SendCheng('get','xml')->getArrayData();
$taobaokeItem = $TaoapiItems["taobaoke_items"]["taobaoke_item"];
$totalResults = $TaoapiItems["total_results"];
?>
<?php 
include 'comm/conn.php';
include 'comm/config.php';
$id=$_GET['id'];
$link = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$link) {
	die('数据库链接出错: ' . mysql_error());
}
else
{
	mysql_query("set names gbk");
	$sql="select * from websetting where id=1";
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$appKey = $row[appKey];  
		$appSecret =$row[appSecret]; 
		$userpid = $row[userpid]; 
		$usernick = $row[usernick];
		$fxbl=$row[fxbl]; 
		$tgbl=$row[tgbl]; 
		
		$webtitle=$row[webtitle]; 
		$keyword=$row[keyword]; 
		$description=$row[description]; 
		$url=$row[url]; 
		$surl=$row[surl]; 
		$email=$row[email]; 
		$icp=$row[icp]; 
		$tongji=$row[tongji]; 
		$qq =$row[qq]; 
		$usercenter =$row[usercenter]; 
	}

}	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title><?php echo $yf_Name;?>-<?php echo $webtitle ?></title>
<meta name="keywords" content="<?php echo $yf_Keywords;?>,<?php echo $sitekey ?>" />
<meta name="description" content="<?php echo $yf_Remark;?>。<?php echo $sitedesc ?>" />
<link href="css/qqhk1.css" rel="stylesheet" type="text/css" />
<link href="images/default.css" rel="stylesheet" type="text/css" />
<LINK href="/templets/beauty/alfs.css" type=text/css rel=stylesheet>
<LINK href="/templets/beauty/index_article.css" type=text/css rel=stylesheet>
</head>
<body>
<div id="main">
<?php
include("header.php");
?>
	<div id="main">
	<div class="plan" align="left">
			当前位置：<a href="<?php echo $url ?>">[<?php echo $webtitle ?>]</a>-<a href="<?php echo $url ?>artlist.htm">[新闻中心]</a>-[<?php echo $yf_Name;?>]</div>
		<div class="box">
			<div id="left">
				<div class="diang border">
					<div class="title">
					<?php 
include 'comm/conn.php';
include 'comm/config.php';
include 'comm/checkpostandget.php';
$kword=$_GET['keyword'];
$page = !($_GET['page'])?'1':intval($_GET['page']);
$page2=($page-1)*5;
$num1=5;

$link = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$link) {
	die('数据库链接出错: ' . mysql_error());
}
else
{
	mysql_query("set names gbk");
	$sql="select * from yf_article where yf_Name like '%".$kword."%' ";
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	$num = mysql_num_rows($rs);	
	
	$sql="select * from yf_article where yf_Name like '%".$kword."%'  order by yf_ID desc limit $page2,$num1";
	//mysql_select_db($dbname);
	//echo $sql;
	$rs = mysql_query($sql);

}	
?>
						<h4>热点新闻排行</h4>
					</div>
					<ul class="text"> 
					<?php
					while ($row = mysql_fetch_array($rs))
					{
										  $yf_Name=$row['yf_Name'];
  $len=strlen($yf_Name);
  if($len>28){
   $val=substr($yf_Name,0,28)."...";
  }
  else{
   $val=$yf_Name;
  }
                      	echo "<li>&nbsp;<img src=img/new.gif></img><a href=yarticle-".$row[yf_ID].".htm target=_blank>".$val."</a><br></li>";
					}
					?>
						
					</ul>
				</div>
				<div class="diang border">
						<ul class="text"><?php echo $adshow16; ?>
					</ul>
				</div>
								<div class="diang border">
						<ul class="text"><?php echo $adshow17; ?>
</ul>
				</div>
												<div class="diang border">
						<ul class="text"><?php echo $adshow18; ?>
</ul>
				</div>
			</div>
			<div id="content" class="border"><div class="title" align="center">
                          <h4><?php echo $yf_Name1;?></h4>
                          </div>
					<div class="textnrr">
					  <table width="100%" border="0" cellspacing="5" cellpadding="0">
                          <tr>
                            <td height="50" align="center"><strong>作者:<?php echo $yf_Author;?>&nbsp;&nbsp;&nbsp;&nbsp;来源:<?php echo $yf_Source;?>&nbsp;&nbsp;&nbsp;&nbsp;增加时间:<?php echo $yf_AddTime;?></strong></td>
                          </tr>
                          <tr>
                            <td><span class="mt10"><?php echo $yf_Content;?></span></td>
                          </tr>
                          <tr>
                            <td height="50" align="center"><strong><?php echo $adshow19; ?></strong></td>
                          </tr>
                        </table>
					</div>
					
				</div>
						
			
				<div class="clear"></div>
		  </div>
			</div>

	</div>
<div align="center">
<?php
include("footer.php");
?>
</div>
</div>
</body>
</html>