<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>所有友链-<?php echo $cfg_webname;?></title>
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/font/css/font-awesome.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/style.css">
		<script src="<?php echo $cfg_cmsurl;?>/static/web/js/jquery.min.js"></script>
	</head>
	<body>
		<?php pasterTempletDiy('top.htm');?>
		<main class="container py-3">
			<div class="row">
				<div class="col-md-12">
					<nav class="navbar navbar-expand-lg mb-3">
						<ul class="navbar-nav mr-auto">
							<li class="nav-item">
								<h3>友情链接</h3>
							</li>
						</ul>
						<span class="navbar-text">
							<a href="flink.php?dopost=add" class="btn btn-success">申请链接</a>
						</span>
					</nav>
					<ul class="list-group list-group-horizontal">
					<?php
					$row = 180;
					$titlelen = 50;
					$dsql->SetQuery("SELECT * FROM `#@__flink` WHERE ischeck>0 ORDER BY sortrank ASC");
					$dsql->Execute();
					$revalue = "";
					for ($i=1;$i<=$row;$i++)
					{
						if ($dbrow=$dsql->GetObject())
						{
							$wtitle = cn_substr($dbrow->webname,$titlelen);
							if ($dbrow->logo=="")
							$revalue.= "<li class='list-group-item'><a href='".$dbrow->url."' target='_blank'>$wtitle</a></li>";
						else
							$revalue.= "<li class='list-group-item'><a href='".$dbrow->url."' target='_blank'><img src='".$dbrow->logo."' alt='$wtitle' class='thumbnail-sm'></a></li>";
						}
						if (!$dbrow) break;
					}
					echo  $revalue;
					?>
					</ul>
				</div>
			</div>
		</main>
		<?php pasterTempletDiy('foot.htm');?>
	</body>
</html>