Есть панель последних файлов от плагина pro_download_panel, можно ли выделить поступившие за последние сутки файлы красным цветом? а спустя сутки после поступления они опять становятся черным цветом?
<!--quoteo--><div class='quotetop'>Цитата</div><div class='quotemain'><!--quotec--><?php
if(!defined("IN_FUSION")) {
header("Location:../../index.php");
exit;
}
$pdp_in_panel = true;
require_once(INFUSIONS."pro_download_panel/include/common.php");
if(!pdp_check_access($pdp_settings['downbereich'])) {
return; // FIXME
}
if(iPDP_ADMIN) {
$where = "";
} elseif(iMEMBER) {
$where = " AND (dl_status!='".PDP_PRO_OFF."'"
." OR user_id='".$userdata['user_id']."')";
} else {
$where = " AND dl_status!='".PDP_PRO_OFF."'";
}
if(!iPDP_ADMIN) {
$where .= "AND ".groupaccess("c.cat_access");
}
function pdp_cats($cat) {
$cats_id ='';
$query_id = dbquery("SELECT cat_id FROM ".DB_PREFIX."pdp_cats WHERE top_cat='$cat'");
while($data = dbarray($query_id)) {
$cats_id.=', '.$data['cat_id'];
$cats_id.= pdp_cats($data['cat_id']);
}
return $cats_id;
}
/*
* GUI
*/
$id_cats[6] = '35'.pdp_cats(35);
$id_cats[2] = '4'.pdp_cats(4);
$id_cats[3] = '60'.pdp_cats(60);
$id_cats[4] = '32'.pdp_cats(32);
$id_cats[5] = '57'.pdp_cats(57);
$id_cats[1] = '1'.pdp_cats(1);
$id_cats[1] .= ', 12'.pdp_cats(12);
$title = array('', 'Программы', 'Игры', 'Литература', 'Медиа', 'Темы', 'Видео');
openside("Новые файлы");
echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>\n<tr>";
for ($i=1; $i<=6; $i++){
$where1='';
echo "<td style='padding-left: 10px; padding-bottom: 10px'><b>".$title[$i]."</b><br>";
$where1 ="WHERE dl.cat_id in (".$id_cats[$i].")".$where;
$query_id = dbquery("SELECT dl_id, dl_name, dl.cat_id FROM ".DB_PREFIX."pdp_downloads AS dl LEFT JOIN ".DB_PREFIX."pdp_cats AS c USING(cat_id) $where1 ORDER BY dl_mtime DESC LIMIT 10");
while($data = dbarray($query_id)) {
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".INFUSIONS
."pro_download_panel/download.php?did=".$data['dl_id']."'"
." title='".$data['dl_name']."' class='side'>"
.trimlink($data['dl_name'], 25)."</a><br>";
}
echo "</td>";
if ($i==3) echo "</tr>\n<tr>";
}
echo "</tr>\n</table>";
closeside();
openside("Лучшие");
echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>\n<tr>";
for ($i=1; $i<=6; $i++){
$where1='';
echo "<td style='padding-left: 10px; padding-bottom: 10px'><b>".$title[$i]."</b><br>";
$where1 ="WHERE dl.cat_id in (".$id_cats[$i].")".$where;
$query_id = dbquery("SELECT dl_id, dl_name, dl.cat_id, dl.dl_count FROM ".DB_PREFIX."pdp_downloads AS dl LEFT JOIN ".DB_PREFIX."pdp_cats AS c USING(cat_id) $where1 ORDER BY dl_count DESC LIMIT 10");
while($data = dbarray($query_id)) {
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".INFUSIONS
."pro_download_panel/download.php?did=".$data['dl_id']."'"
." title='".$data['dl_name']."' class='side'>"
.trimlink($data['dl_name'], 25)."</a><br>";
}
echo "</td>";
if ($i==3) echo "</tr>\n<tr>";
}
echo "</tr>\n</table>";
closeside();
?><!--QuoteEnd--></div><!--QuoteEEnd-->
<!--quoteo--><div class='quotetop'>Цитата</div><div class='quotemain'><!--quotec--><?php
if(!defined("IN_FUSION")) {
header("Location:../../index.php");
exit;
}
$pdp_in_panel = true;
require_once(INFUSIONS."pro_download_panel/include/common.php");
if(!pdp_check_access($pdp_settings['downbereich'])) {
return; // FIXME
}
if(iPDP_ADMIN) {
$where = "";
} elseif(iMEMBER) {
$where = " AND (dl_status!='".PDP_PRO_OFF."'"
." OR user_id='".$userdata['user_id']."')";
} else {
$where = " AND dl_status!='".PDP_PRO_OFF."'";
}
if(!iPDP_ADMIN) {
$where .= "AND ".groupaccess("c.cat_access");
}
function pdp_cats($cat) {
$cats_id ='';
$query_id = dbquery("SELECT cat_id FROM ".DB_PREFIX."pdp_cats WHERE top_cat='$cat'");
while($data = dbarray($query_id)) {
$cats_id.=', '.$data['cat_id'];
$cats_id.= pdp_cats($data['cat_id']);
}
return $cats_id;
}
/*
* GUI
*/
$id_cats[6] = '35'.pdp_cats(35);
$id_cats[2] = '4'.pdp_cats(4);
$id_cats[3] = '60'.pdp_cats(60);
$id_cats[4] = '32'.pdp_cats(32);
$id_cats[5] = '57'.pdp_cats(57);
$id_cats[1] = '1'.pdp_cats(1);
$id_cats[1] .= ', 12'.pdp_cats(12);
$title = array('', 'Программы', 'Игры', 'Литература', 'Медиа', 'Темы', 'Видео');
openside("Новые файлы");
echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>\n<tr>";
for ($i=1; $i<=6; $i++){
$where1='';
echo "<td style='padding-left: 10px; padding-bottom: 10px'><b>".$title[$i]."</b><br>";
$where1 ="WHERE dl.cat_id in (".$id_cats[$i].")".$where;
$query_id = dbquery("SELECT dl_id, dl_name, dl.cat_id FROM ".DB_PREFIX."pdp_downloads AS dl LEFT JOIN ".DB_PREFIX."pdp_cats AS c USING(cat_id) $where1 ORDER BY dl_mtime DESC LIMIT 10");
while($data = dbarray($query_id)) {
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".INFUSIONS
."pro_download_panel/download.php?did=".$data['dl_id']."'"
." title='".$data['dl_name']."' class='side'>"
.trimlink($data['dl_name'], 25)."</a><br>";
}
echo "</td>";
if ($i==3) echo "</tr>\n<tr>";
}
echo "</tr>\n</table>";
closeside();
openside("Лучшие");
echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>\n<tr>";
for ($i=1; $i<=6; $i++){
$where1='';
echo "<td style='padding-left: 10px; padding-bottom: 10px'><b>".$title[$i]."</b><br>";
$where1 ="WHERE dl.cat_id in (".$id_cats[$i].")".$where;
$query_id = dbquery("SELECT dl_id, dl_name, dl.cat_id, dl.dl_count FROM ".DB_PREFIX."pdp_downloads AS dl LEFT JOIN ".DB_PREFIX."pdp_cats AS c USING(cat_id) $where1 ORDER BY dl_count DESC LIMIT 10");
while($data = dbarray($query_id)) {
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".INFUSIONS
."pro_download_panel/download.php?did=".$data['dl_id']."'"
." title='".$data['dl_name']."' class='side'>"
.trimlink($data['dl_name'], 25)."</a><br>";
}
echo "</td>";
if ($i==3) echo "</tr>\n<tr>";
}
echo "</tr>\n</table>";
closeside();
?><!--QuoteEnd--></div><!--QuoteEEnd-->