<!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" xml:lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>所有链接</title>
<link href="../templets/style/dede.css" rel="stylesheet" type="text/css" />
<link href="../templets/style/spage.css" rel="stylesheet" type="text/css" />
</head>
</head>
<body>

<div class="stop">
	<span class="toptitle">友情链接</span>
	<span class="toplink"><a href="/">返回主页</a> <a href="flink.php">所有链接</a></span></div>

<div class="smain">
	<div class="mtitle">
		<div class="mtname"><strong>友情链接</strong></div>
		</div>
	<div class="mbox">
		<div class="flbox">
			<ul>
            		  <?php 
		  $row = 180;
		  $col = 6;
		  $titlelen = 50;
		  $tdwidth = (100/6)."%";
		  $dsql->SetQuery("Select * from #@__flink where ischeck>0 order by sortrank asc");
		  $dsql->Execute();
		$revalue = "<table width='100%' border='0' cellspacing='0' cellpadding='0'>\r\n";
		for($i=1;$i<=$row;$i++)
		{
			$revalue.="<tr bgcolor='#FFFFFF' height='20'>\r\n";
			for($j=1;$j<=$col;$j++)
			{
				if($dbrow=$dsql->GetObject())
				{
					$wtitle = cn_substr($dbrow->webname,$titlelen);
					if($dbrow->logo=="")
						$link = " <a href='".$dbrow->url."' target='_blank'>$wtitle</a>";
					else
						$link = " <a href='".$dbrow->url."' target='_blank'><img src='".$dbrow->logo."' width='88' height='31' border='0' alt='$wtitle'></a>";
					$revalue.="<td width='$tdwidth'>$link</td>\r\n";
				}
				else
				{
					$revalue.="<td></td>\r\n";
				}
			}
			$revalue.="</tr>\r\n";
			if(!$dbrow) break;
		}
		$revalue .= "</table>";
		echo  $revalue;
		$dsql->Close();
		  ?>
			</ul>
		</div>		
	</div>
</div>


</body>
</html>
