/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2013 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Name: Affiliates & Friends
| Version: 1.00
| Author: PHPFusion Mods UK
| Developer: Craig
| Site: http://www.phpfusionmods.co.uk
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
include LOCALE.LOCALESET."weblinks.php";
//Category ID to show latest weblinks from
$cat_id ="4";
openside("Affiliates & Friends");
$result = dbquery("SELECT * FROM ".DB_WEBLINKS." tl
LEFT JOIN ".DB_WEBLINK_CATS." tc
ON tl.weblink_cat=tc.weblink_cat_id
WHERE ".groupaccess('tc.weblink_cat_access')." AND tc.weblink_cat_id=".$cat_id."
ORDER BY weblink_datestamp ASC LIMIT 0,20");
if (dbrows($result)) {
while($data = dbarray($result)) {
$weblink_name = trimlink($data['weblink_name'], 23);
echo "<div class=''>".THEME_BULLET." <a href='".$data['weblink_url']."' title='".$data['weblink_name']."' class='side' target='_blank'>".$weblink_name."</a>";
if ($data['weblink_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " [<span class='small' style='color: #ff0000;'>NEW</span>]";
echo"<div style='float: right; padding-right:5px;' class='small'>".$new."</div>\n";
} else {
$new = "";
}
echo"</div>";
}
} else {
echo "<div style='text-align:center'>".$locale['431']."</div>\n";
}
closeside();
//Category ID to show latest weblinks from
$cat_id ="4";
Category Forum
Code Snippet and functions - 8Labels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions