 <?php  
    //首页滚动相册
    $sql="SELECT articleid,top,pic,spic,title,content,gro,cid FROM article WHERE top='top'";
	$result=mysql_query($sql);
	if($result && mysql_num_rows($result)>0){
	echo '<div class="wb">
	       <ul id="slider" class="slider">';
	while(list($garticleid,$gtop,$gpic,$gspic,$gtitle,$gcontent,$ggro,$gclassid)=mysql_fetch_row($result)){
    if($gpic==NULL){
    $listpic='<img src="image/no.png" style="width:100px;height:100px"/>';
    }else{
    $listpic='<img src="article/uploads/simage/s'.$gpic.'" style="width:100px;height:100px"/>';
	};
    $textitle=mb_substr($gtitle,0,25,"UTF-8");
	$text=mb_substr($gcontent,0,100,"UTF-8"); 
	
				echo'	<li>
						<a class="fl">'.$listpic.'</a>
						<p class="tit">'.$textitle.'</p>
						<p>'.$text.'</p>
					</li>';
					}
				}else{
				echo '哎呦，肿么出错了！赶快联系站长吧！';
			 }
		echo '		</ul>
		</div>';
		?>
		