<?php

/*
	[插件名称] 轮播广告 - 替换模版标签{#modAdvsLb2#}
	[适用范围] 全站
	[文 件 名] AdvsLb2.php
	[更新时间] 2006/10/6
*/

function AdvsLb2 () { 

	global $msql,$tbl_advs_lb;


	$PSET=PlusSet("modAdvsLb2");

	$shownums=PlusDef($PSET["shownums"],"5");
	$smallw=PlusDef($PSET["smallw"],"296");
	$smallh=PlusDef($PSET["smallh"],"237");
	$smallh1=$smallh+25;
	$smw=$smallw+2;
	$smh=$smallh+2;
	$p=1;
	$msql->query("select * from $tbl_advs_lb  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');

	$src=ROOTPATH.$src;

	if($p==1){
		$pic=$src;
		$purl=$url;
		$ptitle=$title;
	}else{
		$pic.="|".$src;
		$purl.="|".$url;
		$ptitle.="|".$title;
	}


	$p++;
	}

	
	
	


	$advstr="<EMBED id=focus1 name=focus1 src='".ROOTPATH."images/lb.swf' width=".$smallw." height=".$smallh." type=application/x-shockwave-flash 
flashvars='picStr=".$pic."&linkStr=".$purl."' wmode='opaque' menu='flase' allowscriptaccess='always' quality='high' 
swliveconnect='true'></EMBED>";
	
	return $advstr;
	
}



?>