www.gusucode.com > 数码摄影器材公司网站源码程序 > 数码摄影器材公司网站源码程序/advs/module/AdvsLb2.php

    <?php

/*
	[插件名称] 轮播广告
	[适用范围] 全站
*/

function AdvsLb2 () { 

	global $msql,$SiteUrl;

	$coltitle=$GLOBALS["PLUSVARS"]["coltitle"];
	$shownums=$GLOBALS["PLUSVARS"]["shownums"];
	$tempname=$GLOBALS["PLUSVARS"]["tempname"];
	$groupid=$GLOBALS["PLUSVARS"]["groupid"];

	//模版解释
	$Temp=LoadTemp($tempname);
	$TempArr=SplitTblTemp($Temp);

	$var=array(
		'coltitle' => $coltitle
	);

	$str=ShowTplTemp($TempArr["start"],$var);

	$msql->query("select * from {P}_advs_lb  where groupid='$groupid' order by xuhao limit 0,$shownums");
	while($msql->next_record()){
		$id=$msql->f('id');
		$src[]=$msql->f('src');
		$url[]=$msql->f('url');
		$title=$msql->f('title');
		$text=$msql->f('text');
		
	}
	
	$var=array (
		'SiteUrl' => $SiteUrl,
		'src1' => ROOTPATH.$src[0],
		'src2' => ROOTPATH.$src[1],
		'src3' => ROOTPATH.$src[2],
		'src4' => ROOTPATH.$src[3],
		'src5' => ROOTPATH.$src[4],
		'src6' => ROOTPATH.$src[5],
		'url1' => $url[0],
		'url2' => $url[1],
		'url3' => $url[2],
		'url4' => $url[3],
		'url5' => $url[4],
		'url6' => $url[5]
	);
	
	$str.=ShowTplTemp($TempArr["list"],$var);
	$str.=$TempArr["end"];

	return $str;

	
}



?>