<?php
/**
* FILE_NAME : friendlink.php
*
* @copyright Copyright (c) www.shuangyulin.com
* @author 双鱼林设计
* @package 友情链接显示
* @subpackage
* @version QQ:287307421或254540457
*/

require_once './include/common.inc.php';

/*--  对一些系统变量赋值  --*/
$template->assign("css_root",$css_root);
$template->assign("web_url",$web_url);
$template->assign("sitename",$_CFG['sitename']);

/*--  查询友情链接  --*/
$sql = "SELECT * FROM {$dbprefix}friendlinks ORDER BY displayorder";
$query = $DB->query($sql);
while ($row = $DB->fetch_array($query)) {
	$row['logo'] = $web_url.substr($row['filepath'],3).$row['logo'];
	$flink[] = $row;
}

/*--  对友情链接进行赋值  --*/
$template->assign("flink",$flink);

require_once 'header.php';

$template->display("friendlink.html");

require_once 'footer.php';
?>