<?php
include 'comm/conn.php'; 
include 'fckeditor/fckeditor.php';
include 'comm/config.php';
include 'comm/checkpostandget1.php';
$goid=$_GET['id'];
$spme=$_GET['spme'];
$spgoname=$spme;

$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_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 $spgoname;?>-<?php echo $webtitle ?></title>
<meta name="keywords" content="<?php echo $spgoname;?>,<?php echo $sitekey ?>" />
<meta name="description" content="<?php echo $spgoname;?>。<?php echo $sitedesc ?>" />
<SCRIPT type=text/javascript>
<!--
var ie5 = (document.all && document.getElementsByTagName);
var step = 0;
function setSB(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
filterEl = el.children[0];
valueEl = el.children[1];

if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = ""; 
filterEl.style.filter = filterBackup;
}

filterEl.style.width = v + "%";
valueEl.innerText = v + "%";
inforEl.innerText = message;
}
}
function setSBByStep(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
step = step + v;
filterEl = el.children[0];
valueEl = el.children[1];

if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = "";
filterEl.style.filter = filterBackup;
}

filterEl.style.width = step + "%";
valueEl.innerText = step + "%"
inforEl.innerText = message;
}
}

function fakeProgress(v, el) {
if (v >= 101)
location.href="<?php echo $goid;?>";
else {
setSB(v, el, infor, "欢迎您来到<?php echo $webtitle ?>,正在帮您转入淘宝网！");
window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 10);
}
}

//-->
</SCRIPT>

<SCRIPT language=javaScript>

</SCRIPT>

<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY bgColor=#f9f9f9 topMargin=100 onload=fakeProgress(0,sb)>
<P>　</P>
<P>　</P>
<P>　</P><!-- Status Bar Starts -->
<DIV align=center>
<DIV id=sb 
style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BACKGROUND: #99ccff; BORDER-LEFT: medium none; WIDTH: 400px; BORDER-BOTTOM: #cccccc 1px solid; HEIGHT: 14px; TEXT-ALIGN: left">
<DIV id=sbChild1 
style="FILTER: Alpha(Opacity=0, FinishOpacity=80, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0); OVERFLOW: hidden; WIDTH: 100%; POSITION: absolute; HEIGHT: 12px">
<DIV style="BACKGROUND: #000000; WIDTH: 100%" ;height:12px; overflow: 
hidden></DIV></DIV>
<DIV 
style="FONT-SIZE: 10px; WIDTH: 400px; COLOR: white; FONT-FAMILY: arial; POSITION: absolute; HEIGHT: 14px; TEXT-ALIGN: center"></DIV></DIV><!-- Status Bar Ends -->
<P></P>
<DIV id=infor 
style="FONT-SIZE: 11px; WIDTH: 100%; COLOR: #999999; FONT-FAMILY: arial; POSITION: relative; HEIGHT: 14px; TEXT-ALIGN: center"></DIV></DIV></BODY></HTML>

