mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 00:27:45 +02:00
* Tablerender title is now breadcrumb trail
* Added shortcodes for previously hard coded stuff and updated template * Converted shortcodes to shortcode class - real PHP, yay! * Removed 'renderplain' option - nothing else worked like this * admin: first cut of the new maintenance options * admin: started item filter form (unfinished by a long way) * admim: removed a lot of inline css classes/styles in preperation for the new admin way of doing things * Start of code tidy up, including creation of some handler classes * Fixed some bugs found along the way
This commit is contained in:
@@ -11,32 +11,26 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/download.php,v $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-01-14 22:53:38 $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2009-02-11 21:41:54 $
|
||||
| $Author: bugrain $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
require_once("../../class2.php");
|
||||
if (!plugInstalled('download')) { exit(); }
|
||||
include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/lan_download.php');
|
||||
require_once(e_PLUGIN.'download/handlers/download_class.php');
|
||||
require_once(e_PLUGIN.'download/handlers/category_class.php');
|
||||
require_once(e_PLUGIN.'download/download_shortcodes.php');
|
||||
require_once(e_HANDLER.'comment_class.php');
|
||||
|
||||
$cobj = new comment;
|
||||
global $tp;
|
||||
|
||||
$dl = new download();
|
||||
$cobj = new comment();
|
||||
$dl_text = ''; // Output variable
|
||||
|
||||
if(!defined("USER_WIDTH")) { define("USER_WIDTH","width:100%"); }
|
||||
|
||||
// Following two now set in prefs
|
||||
// To prevent display of sub-categories on the main display, change the value in the following line from '1' to '0'
|
||||
//$pref['download_subsub'] = '1';
|
||||
// To include file counts and sizes from subcategories and subsubcategories in superior categories, change the following to '1'
|
||||
//$pref['download_incinfo'] = '1';
|
||||
|
||||
/* define images */
|
||||
define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : e_IMAGE."generic/download.png"));
|
||||
define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : e_IMAGE."generic/new.png"));
|
||||
@@ -60,7 +54,6 @@ $template_load_core = '
|
||||
$order_options = array('download_id','download_datestamp','download_requested','download_name','download_author','download_requested');
|
||||
$sort_options = array('ASC', 'DESC');
|
||||
|
||||
|
||||
if (!e_QUERY || $_GET['elan'])
|
||||
{
|
||||
$action = 'maincats'; // List categories
|
||||
@@ -73,15 +66,15 @@ else
|
||||
if (is_numeric($tmp[0])) // $tmp[0] at least must be valid
|
||||
{
|
||||
$dl_from = intval($tmp[0]);
|
||||
$action = varset(preg_replace("#\W#", "", $tp -> toDB($tmp[1])),'list');
|
||||
$action = varset(preg_replace("#\W#", "", $tp->toDB($tmp[1])),'list');
|
||||
$id = intval($tmp[2]);
|
||||
$view = intval($tmp[3]);
|
||||
$order = preg_replace("#\W#", "", $tp -> toDB($tmp[4]));
|
||||
$sort = preg_replace("#\W#", "", $tp -> toDB($tmp[5]));
|
||||
$order = preg_replace("#\W#", "", $tp->toDB($tmp[4]));
|
||||
$sort = preg_replace("#\W#", "", $tp->toDB($tmp[5]));
|
||||
}
|
||||
else
|
||||
{
|
||||
$action = preg_replace("#\W#", "", $tp -> toDB($tmp[0]));
|
||||
$action = preg_replace("#\W#", "", $tp->toDB($tmp[0]));
|
||||
$id = intval($tmp[1]);
|
||||
$errnum = intval(varset($tmp[2],0));
|
||||
}
|
||||
@@ -99,10 +92,9 @@ else
|
||||
// Get category type, page title
|
||||
if ($sql->db_Select("download_category", "download_category_name,download_category_description,download_category_parent,download_category_class", "(download_category_id='{$id}') AND (download_category_class IN (".USERCLASS_LIST."))") )
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
extract($row);
|
||||
$type = "<span class='dnld_cname'>".$download_category_name."</span>";
|
||||
$type .= ($download_category_description) ? " <span class='dnld_cdesc'>[".$download_category_description."]</span>" : "";
|
||||
$dlrow = $sql->db_Fetch();
|
||||
extract($dlrow);
|
||||
$type = $download_category_name;
|
||||
define("e_PAGETITLE", PAGE_NAME." / ".$download_category_name);
|
||||
}
|
||||
else
|
||||
@@ -147,12 +139,10 @@ else
|
||||
|
||||
if (isset($order) && !in_array($order,$order_options)) unset($order);
|
||||
if (isset($sort) && !in_array($sort,$sort_options)) unset($sort);
|
||||
|
||||
if (!isset($order)) $order = varset($pref['download_order'],'download_datestamp');
|
||||
if (!isset($sort)) $sort = varset($pref['download_sort'], 'DESC');
|
||||
if (!isset($view)) $view = varset($pref['download_view'], '10');
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// GENERATE DISPLAY TEXT
|
||||
//--------------------------------------------------
|
||||
@@ -160,7 +150,7 @@ switch ($action)
|
||||
{ // Displaying main category or categories
|
||||
case 'maincats' :
|
||||
require_once(HEADERF);
|
||||
if ($cacheData = $e107cache->retrieve("download_cat".$maincatval,720)) // expires every 12 hours.
|
||||
if ($cacheData = $e107cache->retrieve("download_cat".$maincatval,720)) // expires every 12 hours. //TODO make this an option
|
||||
{
|
||||
echo $cacheData;
|
||||
require_once(FOOTERF);
|
||||
@@ -174,56 +164,38 @@ switch ($action)
|
||||
if(!defined("DL_IMAGESTYLE")){ define("DL_IMAGESTYLE","border:1px solid blue");}
|
||||
|
||||
// Read in tree of categories which this user is allowed to see
|
||||
$dl = new down_cat_handler(varset($pref['download_subsub'],1),USERCLASS_LIST,$maincatval,varset($pref['download_incinfo'],FALSE));
|
||||
$dlcat = new downloadCategory(varset($pref['download_subsub'],1),USERCLASS_LIST,$maincatval,varset($pref['download_incinfo'],FALSE));
|
||||
|
||||
if ($dl->down_count == 0)
|
||||
if ($dlcat->down_count == 0)
|
||||
{
|
||||
$ns->tablerender(LAN_dl_18, "<div style='text-align:center'>".LAN_dl_2."</div>");
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$download_cat_table_string = ""; // Notice removal
|
||||
foreach($dl->cat_tree as $row)
|
||||
|
||||
$download_cat_table_string = "";
|
||||
foreach($dlcat->cat_tree as $dlrow)
|
||||
{ // Display main category headings, then sub-categories, optionally with sub-sub categories expanded
|
||||
$download_cat_table_string .= parse_download_cat_parent_table($row);
|
||||
foreach($row['subcats'] as $crow)
|
||||
$download_cat_table_string .= $tp->parseTemplate($DOWNLOAD_CAT_PARENT_TABLE, TRUE, $download_shortcodes);
|
||||
foreach($dlrow['subcats'] as $dlsubrow)
|
||||
{
|
||||
$download_cat_table_string .= parse_download_cat_child_table($crow);
|
||||
$download_cat_table_string .= $tp->parseTemplate($DOWNLOAD_CAT_CHILD_TABLE, TRUE, $download_shortcodes);
|
||||
foreach($dlsubrow['subsubcats'] as $dlsubsubrow)
|
||||
{
|
||||
$download_cat_table_string .= $tp->parseTemplate($DOWNLOAD_CAT_SUBSUB_TABLE, TRUE, $download_shortcodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$download_cat_table_start = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_TABLE_START);
|
||||
|
||||
$DOWNLOAD_CAT_NEWDOWNLOAD_TEXT = "<img src='".IMAGE_NEW."' alt='' style='vertical-align:middle' /> ".LAN_dl_36;
|
||||
$DOWNLOAD_CAT_SEARCH = "
|
||||
<form method='get' action='".e_BASE."search.php'>
|
||||
<p>
|
||||
<input class='tbox' type='text' name='q' size='30' value='' maxlength='50' />
|
||||
<input class='button' type='submit' name='s' value='".LAN_dl_41."' />
|
||||
<input type='hidden' name='r' value='0' />
|
||||
</p>
|
||||
</form>";
|
||||
|
||||
$download_cat_table_end = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_TABLE_END);
|
||||
$dl_text = $download_cat_table_start.$download_cat_table_string.$download_cat_table_end;
|
||||
$dl_text = $tp->parseTemplate($DOWNLOAD_CAT_TABLE_START, TRUE, $download_shortcodes);
|
||||
$dl_text .= $download_cat_table_string;
|
||||
$dl_text .= $tp->parseTemplate($DOWNLOAD_CAT_TABLE_END, TRUE, $download_shortcodes);
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18));
|
||||
$dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes);
|
||||
|
||||
ob_start();
|
||||
|
||||
if(isset($DOWNLOAD_CAT_TABLE_RENDERPLAIN) && $DOWNLOAD_CAT_TABLE_RENDERPLAIN)
|
||||
{
|
||||
echo $dl_text;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender(LAN_dl_18, $dl_text);
|
||||
}
|
||||
|
||||
$ns->tablerender($dl_title, $dl_text);
|
||||
$cache_data = ob_get_flush();
|
||||
$e107cache->set("download_cat".$maincatval, $cache_data);
|
||||
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
// Add other 'cases' here
|
||||
@@ -239,8 +211,8 @@ if (isset($_POST['commentsubmit']))
|
||||
}
|
||||
else
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
if ($row['download_comment'] && (ANON === TRUE || USER === TRUE))
|
||||
$dlrow = $sql->db_Fetch();
|
||||
if ($dlrow['download_comment'] && (ANON === TRUE || USER === TRUE))
|
||||
{
|
||||
$clean_authorname = $_POST['author_name'];
|
||||
$clean_comment = $_POST['comment'];
|
||||
@@ -263,7 +235,7 @@ if ($action == "list")
|
||||
require_once(HEADERF);
|
||||
|
||||
/* SHOW SUBCATS ... */
|
||||
if($sql -> db_Select("download_category", "download_category_id", "download_category_parent='{$id}' "))
|
||||
if($sql->db_Select("download_category", "download_category_id", "download_category_parent='{$id}' "))
|
||||
{
|
||||
/* there are subcats - display them ... */
|
||||
$qry = "
|
||||
@@ -278,39 +250,27 @@ if ($action == "list")
|
||||
GROUP by dc.download_category_id ORDER by dc.download_category_order
|
||||
";
|
||||
$sql->db_Select_gen($qry);
|
||||
$scArray = $sql -> db_getList();
|
||||
$scArray = $sql->db_getList();
|
||||
$load_template = 'download_template';
|
||||
if (!isset($DOWNLOAD_CAT_PARENT_TABLE)) eval($template_load_core);
|
||||
if(!defined("DL_IMAGESTYLE")){ define("DL_IMAGESTYLE","border:1px solid blue");}
|
||||
|
||||
foreach($scArray as $row)
|
||||
$download_cat_table_string = "";
|
||||
$dl_text = $tp->parseTemplate($DOWNLOAD_CAT_TABLE_PRE, TRUE, $download_shortcodes);
|
||||
$dl_text .= $tp->parseTemplate($DOWNLOAD_CAT_TABLE_START, TRUE, $download_shortcodes);
|
||||
foreach($scArray as $dlsubsubrow)
|
||||
{
|
||||
$download_cat_table_string .= parse_download_cat_child_table($row, FALSE);
|
||||
}
|
||||
if(strstr($row['parent_icon'], chr(1))) {
|
||||
list($download_category_icon, $download_category_icon_empty) = explode(chr(1), $row['parent_icon']);
|
||||
}
|
||||
$DOWNLOAD_CAT_MAIN_ICON = ($download_category_icon ? "<img src='".e_IMAGE."icons/".$download_category_icon."' alt='' style='float: left' />" : " ");
|
||||
$DOWNLOAD_CAT_MAIN_NAME = $tp->toHTML($row['parent_name'], FALSE, 'USER_TITLE');
|
||||
$download_cat_table_start = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_TABLE_START);
|
||||
$DOWNLOAD_CAT_NEWDOWNLOAD_TEXT = "<img src='".IMAGE_NEW."' alt='' style='vertical-align:middle' /> ".LAN_dl_36;
|
||||
$download_cat_table_end = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_TABLE_END);
|
||||
$text = $download_cat_table_start.$download_cat_table_string.$download_cat_table_end;
|
||||
if($DOWNLOAD_CAT_TABLE_RENDERPLAIN)
|
||||
{
|
||||
echo $text;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender($type, $text);
|
||||
$dl_text .= $tp->parseTemplate($DOWNLOAD_CAT_SUBSUB_TABLE, TRUE, $download_shortcodes);
|
||||
}
|
||||
$dl_text .= $tp->parseTemplate($DOWNLOAD_CAT_TABLE_END, TRUE, $download_shortcodes);
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18=>e_SELF, $type));
|
||||
$dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes);
|
||||
$ns->tablerender($dl_title, $dl_text);
|
||||
$text = ""; // If other files, show in a separate block
|
||||
$type = ""; // Cancel title once displayed
|
||||
} // End of subcategory display
|
||||
|
||||
// Now display individual downloads
|
||||
// Next line looks unnecessary
|
||||
// $core_total = $sql->db_Count("download WHERE download_category='{$id}' AND download_active > 0 AND download_visible IN (".USERCLASS_LIST.")");
|
||||
// Now display individual downloads
|
||||
if (!check_class($download_category_class))
|
||||
{
|
||||
$ns->tablerender(LAN_dl_18, "<div style='text-align:center'>".LAN_dl_3."</div>");
|
||||
@@ -320,54 +280,34 @@ if ($action == "list")
|
||||
|
||||
if ($total_downloads < $view) { $dl_from = 0; }
|
||||
|
||||
if(strstr($download_category_icon, chr(1)))
|
||||
{
|
||||
list($download_category_icon, $download_category_icon_empty) = explode(chr(1), $download_category_icon);
|
||||
}
|
||||
$DOWNLOAD_CATEGORY_ICON = ($download_category_icon ? "<img src='".e_IMAGE."icons/".$download_category_icon."' alt='' style='float: left' />" : " ");
|
||||
|
||||
$DOWNLOAD_CATEGORY = $tp->toHTML($download_category_name,FALSE,'USER_TITLE');
|
||||
$DOWNLOAD_CATEGORY_DESCRIPTION = $tp -> toHTML($download_category_description, TRUE,'DESCRIPTION');
|
||||
|
||||
$load_template = 'download_template';
|
||||
if (!isset($DOWNLOAD_LIST_TABLE)) eval($template_load_core);
|
||||
if(!defined("DL_IMAGESTYLE")){ define("DL_IMAGESTYLE","border:1px solid blue");}
|
||||
if (!defined("DL_IMAGESTYLE")){ define("DL_IMAGESTYLE","border:1px solid blue");}
|
||||
|
||||
$gen = new convert;
|
||||
require_once(e_HANDLER."rate_class.php");
|
||||
$rater = new rater;
|
||||
$tdownloads = 0;
|
||||
$dltdownloads = 0;
|
||||
|
||||
// $dl_from - first entry to show (note - can get reset due to reuse of query, even if values overridden this time)
|
||||
// $view - number of entries per page
|
||||
// $total_downloads - total number of entries matching search criteria
|
||||
$filetotal = $sql->db_Select("download", "*", "download_category='{$id}' AND download_active > 0 AND download_visible IN (".USERCLASS_LIST.") ORDER BY {$order} {$sort} LIMIT {$dl_from}, {$view}");
|
||||
$ft = ($filetotal < $view ? $filetotal : $view);
|
||||
while ($row = $sql->db_Fetch())
|
||||
{
|
||||
extract($row);
|
||||
$download_list_table_string .= parse_download_list_table($row);
|
||||
$tdownloads += $download_requested;
|
||||
}
|
||||
|
||||
$DOWNLOAD_LIST_TOTAL_AMOUNT = $tdownloads." ".LAN_dl_16;
|
||||
$DOWNLOAD_LIST_TOTAL_FILES = $ft." ".LAN_dl_17;
|
||||
|
||||
$download_list_table_start = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_LIST_TABLE_START);
|
||||
$download_list_table_end = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_LIST_TABLE_END);
|
||||
$text .= $download_list_table_start.$download_list_table_string.$download_list_table_end;
|
||||
|
||||
|
||||
if ($filetotal)
|
||||
{ // Only show list if some files in it
|
||||
if($DOWNLOAD_LIST_TABLE_RENDERPLAIN)
|
||||
$dl_text = $tp->parseTemplate($DOWNLOAD_LIST_TABLE_START, TRUE, $download_shortcodes);
|
||||
$dlft = ($filetotal < $view ? $filetotal : $view);
|
||||
while ($dlrow = $sql->db_Fetch())
|
||||
{
|
||||
echo $text;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender($type, $text);
|
||||
$agreetext = $tp->toHTML($pref['agree_text'],TRUE,'DESCRIPTION');
|
||||
$current_row = ($current_row) ? 0 : 1; // Alternating CSS for each row.(backwards compatible)
|
||||
$template = ($current_row == 1) ? $DOWNLOAD_LIST_TABLE : str_replace("forumheader3","forumheader3 forumheader3_alt",$DOWNLOAD_LIST_TABLE);
|
||||
$dl_text .= $tp->parseTemplate($template,TRUE,$download_shortcodes);;
|
||||
$dltdownloads += $dlrow['download_requested'];
|
||||
}
|
||||
|
||||
$dl_text .= $tp->parseTemplate($DOWNLOAD_LIST_TABLE_END, TRUE, $download_shortcodes);
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18=>e_SELF, $type));
|
||||
$dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes);
|
||||
$ns->tablerender($dl_title, $dl_text);
|
||||
}
|
||||
|
||||
if(!isset($DOWNLOAD_LIST_NEXTPREV))
|
||||
@@ -388,7 +328,6 @@ if ($action == "list")
|
||||
exit;
|
||||
} // end of action=="list"
|
||||
|
||||
|
||||
//====================================================
|
||||
// VIEW
|
||||
//====================================================
|
||||
@@ -409,16 +348,16 @@ if ($action == "view")
|
||||
AND dc.download_category_class IN (".USERCLASS_LIST.")
|
||||
LIMIT 1";
|
||||
|
||||
if(!$sql -> db_Select_gen($query)){
|
||||
if(!$sql->db_Select_gen($query)){
|
||||
require_once(HEADERF);
|
||||
$ns->tablerender(LAN_dl_18, "<div style='text-align:center'>".LAN_dl_3."</div>");
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
||||
$dl = $sql -> db_Fetch();
|
||||
$dlrow = $sql->db_Fetch();
|
||||
|
||||
$comment_edit_query = 'comment.download.'.$id;
|
||||
$comment_edit_query = 'comment.download.'.$id;
|
||||
|
||||
$load_template = 'download_template';
|
||||
if (!isset($DOWNLOAD_VIEW_TABLE)) eval($template_load_core);
|
||||
@@ -436,11 +375,6 @@ $comment_edit_query = 'comment.download.'.$id;
|
||||
$DL_TEMPLATE = $DOWNLOAD_VIEW_TABLE_START.$DOWNLOAD_VIEW_TABLE.$DOWNLOAD_VIEW_TABLE_END;
|
||||
$text = $tp->parseTemplate($DL_TEMPLATE, TRUE, $download_shortcodes);
|
||||
|
||||
if(!isset($DL_VIEW_CAPTION))
|
||||
{
|
||||
$DL_VIEW_CAPTION = "{DOWNLOAD_VIEW_CAPTION}";
|
||||
}
|
||||
|
||||
if(!isset($DL_VIEW_NEXTPREV))
|
||||
{
|
||||
$DL_VIEW_NEXTPREV = "
|
||||
@@ -457,19 +391,15 @@ $comment_edit_query = 'comment.download.'.$id;
|
||||
}
|
||||
// ------- Next/Prev -----------
|
||||
$text .= $tp->parseTemplate($DL_VIEW_NEXTPREV,TRUE,$download_shortcodes);
|
||||
$caption = $tp->parseTemplate($DL_VIEW_CAPTION,TRUE,$download_shortcodes);
|
||||
|
||||
if($DOWNLOAD_VIEW_TABLE_RENDERPLAIN) {
|
||||
echo $text;
|
||||
} else {
|
||||
|
||||
$ns->tablerender($caption, $text);
|
||||
}
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18=>e_SELF, $dlrow['download_category_name']=>e_SELF."?list.".$dlrow['download_category_id'], $dlrow['download_name']));
|
||||
$dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes);
|
||||
$ns->tablerender($dl_title, $text);
|
||||
|
||||
unset($text);
|
||||
|
||||
if ($dl['download_comment']) {
|
||||
$cobj->compose_comment("download", "comment", $id, $width,$dl['download_name'], $showrate=FALSE);
|
||||
if ($dlrow['download_comment']) {
|
||||
$cobj->compose_comment("download", "comment", $id, $width,$dlrow['download_name'], $showrate=FALSE);
|
||||
}
|
||||
|
||||
require_once(FOOTERF);
|
||||
@@ -482,18 +412,27 @@ $comment_edit_query = 'comment.download.'.$id;
|
||||
//====================================================
|
||||
if ($action == "report" && check_class($pref['download_reportbroken']))
|
||||
{
|
||||
if (!$sql->db_Select("download", "*", "download_id = {$id} AND download_active > 0")) {
|
||||
$query = "
|
||||
SELECT d.*, dc.* FROM #download AS d
|
||||
LEFT JOIN #download_category AS dc ON d.download_category = dc.download_category_id
|
||||
WHERE d.download_id = {$id}
|
||||
AND download_active > 0
|
||||
LIMIT 1";
|
||||
|
||||
if(!$sql->db_Select_gen($query))
|
||||
{
|
||||
//if (!$sql->db_Select("download", "*", "download_id = {$id} AND download_active > 0")) {
|
||||
require_once(HEADERF);
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
||||
$row = $sql -> db_Fetch();
|
||||
extract($row);
|
||||
$dlrow = $sql->db_Fetch();
|
||||
extract($dlrow);
|
||||
|
||||
if (isset($_POST['report_download'])) {
|
||||
$report_add = $tp -> toDB($_POST['report_add']);
|
||||
$download_name = $tp -> toDB($download_name);
|
||||
$report_add = $tp->toDB($_POST['report_add']);
|
||||
$download_name = $tp->toDB($download_name);
|
||||
$user = USER ? USERNAME : LAN_dl_52;
|
||||
|
||||
if ($pref['download_email']) { // this needs to be moved into the NOTIFY, with an event.
|
||||
@@ -510,8 +449,9 @@ if ($action == "report" && check_class($pref['download_reportbroken']))
|
||||
require_once(HEADERF);
|
||||
|
||||
$text = LAN_dl_48."<br /><br /><a href='".e_PLUGIN."download/download.php?view.".$download_id."'>".LAN_dl_49."</a";
|
||||
$ns->tablerender(LAN_dl_50, $text);
|
||||
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18=>e_SELF, $dlrow['download_category_name']=>e_SELF."?list.".$dlrow['download_category_id'], $dlrow['download_name']=>e_SELF."?view.".$dlrow['download_id'], LAN_dl_50));
|
||||
$dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes);
|
||||
$ns->tablerender($dl_title, $text);
|
||||
} else {
|
||||
define("e_PAGETITLE", PAGE_NAME." / ".LAN_dl_51." ".$download_name);
|
||||
require_once(HEADERF);
|
||||
@@ -529,8 +469,7 @@ if ($action == "report" && check_class($pref['download_reportbroken']))
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_dl_54."<br />".LAN_dl_55."
|
||||
</td>
|
||||
<td>".LAN_dl_54."<br />".LAN_dl_55."</td>
|
||||
<td style='text-align:center;'>
|
||||
<textarea cols='40' rows='10' class='tbox' name='report_add'></textarea>
|
||||
</td>
|
||||
@@ -540,14 +479,16 @@ if ($action == "report" && check_class($pref['download_reportbroken']))
|
||||
<input class='button' type='submit' name='report_download' value=\"".LAN_dl_45."\" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>";
|
||||
$ns->tablerender(LAN_dl_50, $text);
|
||||
</table>
|
||||
</form>";
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18=>e_SELF, $dlrow['download_category_name']=>e_SELF."?list.".$dlrow['download_category_id'], $dlrow['download_name']=>e_SELF."?view.".$dlrow['download_id'], LAN_dl_50));
|
||||
$dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes);
|
||||
$ns->tablerender($dl_title, $text);
|
||||
}
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
//====================================================
|
||||
// MIRRORS
|
||||
//====================================================
|
||||
@@ -558,15 +499,19 @@ if($action == "mirror")
|
||||
$load_template = 'download_template';
|
||||
if (!isset($DOWNLOAD_MIRROR_START)) eval($template_load_core);
|
||||
|
||||
$sql -> db_Select("download_mirror");
|
||||
$mirrorList = $sql -> db_getList("ALL", 0, 200, "mirror_id");
|
||||
$sql->db_Select("download_mirror");
|
||||
$mirrorList = $sql->db_getList("ALL", 0, 200, "mirror_id");
|
||||
|
||||
if($sql -> db_Select("download", "*", "download_id = {$id}"))
|
||||
$query = "
|
||||
SELECT d.*, dc.* FROM #download AS d
|
||||
LEFT JOIN #download_category AS dc ON d.download_category = dc.download_category_id
|
||||
WHERE d.download_id = {$id}
|
||||
LIMIT 1";
|
||||
|
||||
if($sql->db_Select_gen($query))
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
|
||||
extract($row);
|
||||
$array = explode(chr(1), $download_mirror);
|
||||
$dlrow = $sql->db_Fetch();
|
||||
$array = explode(chr(1), $dlrow['download_mirror']);
|
||||
if (2 == varset($pref['mirror_order']))
|
||||
{
|
||||
// Order by name, sort array manually
|
||||
@@ -589,32 +534,21 @@ if($action == "mirror")
|
||||
}
|
||||
}
|
||||
|
||||
$download_mirror = "";
|
||||
$dl_text = $tp->parseTemplate($DOWNLOAD_MIRROR_START, TRUE, $download_shortcodes);
|
||||
$download_mirror = 1;
|
||||
foreach($array as $mirrorstring)
|
||||
{
|
||||
if($mirrorstring)
|
||||
{
|
||||
$download_mirror .= parse_download_mirror_table($row, $mirrorstring, $mirrorList);
|
||||
$dlmirrorfile = explode(",", $mirrorstring);
|
||||
$dlmirror = $mirrorList[$dlmirrorfile[0]];
|
||||
$dl_text .= $tp->parseTemplate($DOWNLOAD_MIRROR, TRUE, $download_shortcodes);
|
||||
}
|
||||
}
|
||||
|
||||
$DOWNLOAD_MIRROR_HOST_LAN = LAN_dl_68;
|
||||
$DOWNLOAD_MIRROR_GET_LAN = LAN_dl_32;
|
||||
$DOWNLOAD_MIRROR_LOCATION_LAN = LAN_dl_70;
|
||||
$DOWNLOAD_MIRROR_DESCRIPTION_LAN = LAN_dl_71;
|
||||
$DOWNLOAD_MIRROR_REQUEST = LAN_dl_72."'".$download_name."'";
|
||||
|
||||
$download_mirror_start = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_MIRROR_START);
|
||||
$download_mirror_end = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_MIRROR_END);
|
||||
|
||||
$text = $download_mirror_start.$download_mirror.$download_mirror_end;
|
||||
|
||||
if($DOWNLOAD_MIRROR_RENDERPLAIN) {
|
||||
echo $text;
|
||||
} else {
|
||||
$ns->tablerender(LAN_dl_67, $text);
|
||||
}
|
||||
|
||||
$dl_text .= $tp->parseTemplate($DOWNLOAD_MIRROR_END, TRUE, $download_shortcodes);
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18=>e_SELF, $dlrow['download_category_name']=>e_SELF."?list.".$dlrow['download_category_id'], $dlrow['download_name']=>e_SELF."?view.".$dlrow['download_id'], LAN_dl_67));
|
||||
$dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes);
|
||||
$ns->tablerender($dl_title, $dl_text);
|
||||
require_once(FOOTERF);
|
||||
}
|
||||
}
|
||||
@@ -628,276 +562,4 @@ function sort_download_mirror_order($a, $b)
|
||||
}
|
||||
return ($a[1] < $b[1]) ? -1 : 1;
|
||||
}
|
||||
|
||||
function parse_download_mirror_table($row, $mirrorstring, $mirrorList)
|
||||
{
|
||||
|
||||
global $DOWNLOAD_MIRROR, $e107;
|
||||
list($mirrorHost_id, $mirrorHost_url, $mirrorRequests, $mirrorFilesize) = explode(",", $mirrorstring);
|
||||
|
||||
extract($mirrorList[$mirrorHost_id]);
|
||||
|
||||
$DOWNLOAD_MIRROR_NAME = "<a href='{$mirror_url}' rel='external'>{$mirror_name}</a>";
|
||||
$DOWNLOAD_MIRROR_IMAGE = ($mirror_image ? "<a href='{$mirror_url}' rel='external'><img src='".e_FILE."downloadimages/".$mirror_image."' alt='' style='border:0' /></a>" : "");
|
||||
$DOWNLOAD_MIRROR_LOCATION = ($mirror_location ? $mirror_location : "");
|
||||
$DOWNLOAD_MIRROR_DESCRIPTION = ($mirror_description ? $mirror_description : "");
|
||||
|
||||
$DOWNLOAD_MIRROR_FILESIZE = $e107->parseMemorySize($mirrorFilesize);
|
||||
$DOWNLOAD_MIRROR_LINK = "<a href='".e_PLUGIN."download/download.php?mirror.{$row['download_id']}.{$mirrorHost_id}' title='".LAN_dl_32."'><img src='".IMAGE_DOWNLOAD."' alt='' style='border:0' /></a>";
|
||||
|
||||
$DOWNLOAD_MIRROR_REQUESTS = (ADMIN ? LAN_dl_73.$mirrorRequests : "");
|
||||
$DOWNLOAD_TOTAL_MIRROR_REQUESTS = (ADMIN ? LAN_dl_74.$mirror_count : "");
|
||||
|
||||
return(preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_MIRROR));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function parse_download_cat_parent_table($row)
|
||||
{
|
||||
global $tp,$e107,$current_row,$DOWNLOAD_CAT_PARENT_TABLE;
|
||||
extract($row);
|
||||
$current_row = ($current_row) ? 0 : 1; // Alternating CSS for each row.(backwards compatible)
|
||||
|
||||
$template = ($current_row == 1) ? $DOWNLOAD_CAT_PARENT_TABLE : str_replace("forumheader3","forumheader3 forumheader3_alt",$DOWNLOAD_CAT_PARENT_TABLE);
|
||||
|
||||
$DOWNLOAD_CAT_MAIN_ICON = '';
|
||||
$DOWNLOAD_CAT_MAIN_NAME = '';
|
||||
$DOWNLOAD_CAT_MAIN_DESCRIPTION = '';
|
||||
|
||||
if (check_class($download_category_class))
|
||||
{
|
||||
if(strstr($download_category_icon, chr(1)))
|
||||
{
|
||||
list($download_category_icon, $download_category_icon_empty) = explode(chr(1), $download_category_icon);
|
||||
}
|
||||
$DOWNLOAD_CAT_MAIN_ICON = ($download_category_icon ? "<img src='".e_IMAGE."icons/".$download_category_icon."' alt='' style='float: left' />" : " ");
|
||||
$DOWNLOAD_CAT_MAIN_NAME = $tp->toHTML($download_category_name,FALSE,'USER_TITLE');
|
||||
$DOWNLOAD_CAT_MAIN_DESCRIPTION = $tp->toHTML($row['download_category_description'],TRUE,'DESCRIPTION');
|
||||
}
|
||||
return(preg_replace("/\{(.*?)\}/e", '$\1', $template));
|
||||
}
|
||||
|
||||
|
||||
function get_cat_icons($source, $count)
|
||||
{
|
||||
if (!$source) return " ";
|
||||
list($ret[TRUE],$ret[FALSE]) = explode(chr(1), $source.chr(1));
|
||||
if (!$ret[FALSE]) $ret[FALSE] = $ret[TRUE];
|
||||
return "<img src='".e_IMAGE."icons/{$ret[($count!=0)]}' alt='' style='float: left' />";
|
||||
}
|
||||
|
||||
function check_new_download($last_val)
|
||||
{
|
||||
if(USER && ($last_val > USERLV))
|
||||
{
|
||||
return "<img src='".IMAGE_NEW."' alt='' style='vertical-align:middle' />";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function parse_download_cat_child_table($row)
|
||||
{
|
||||
global $tp,$e107,$current_row, $DOWNLOAD_CAT_CHILD_TABLE, $DOWNLOAD_CAT_SUBSUB_TABLE;
|
||||
|
||||
$current_row = ($current_row) ? 0 : 1; // Alternating CSS for each row.(backwards compatible)
|
||||
$template = ($current_row == 1) ? $DOWNLOAD_CAT_CHILD_TABLE : str_replace("forumheader3","forumheader3 forumheader3_alt",$DOWNLOAD_CAT_CHILD_TABLE);
|
||||
|
||||
$DOWNLOAD_CAT_SUB_ICON = get_cat_icons($row['download_category_icon'],$row['d_count']);
|
||||
$DOWNLOAD_CAT_SUB_NEW_ICON = check_new_download($row['d_last_subs']);
|
||||
$dcatname=$tp->toHTML($row['download_category_name'],FALSE,'USER_TITLE');
|
||||
$DOWNLOAD_CAT_SUB_NAME = ($row['d_count'] ? "<a href='".e_PLUGIN."download/download.php?list.".$row['download_category_id']."'>".$dcatname."</a>" : $dcatname);
|
||||
$DOWNLOAD_CAT_SUB_NAME_LINKED = "<a href='".e_PLUGIN."download/download.php?list.".$row['download_category_id']."'>".$dcatname."</a>";
|
||||
$DOWNLOAD_CAT_SUB_DESCRIPTION = $tp->toHTML($row['download_category_description'],TRUE,'DESCRIPTION');
|
||||
$DOWNLOAD_CAT_SUB_COUNT = $row['d_count'];
|
||||
$DOWNLOAD_CAT_SUB_SIZE = $e107->parseMemorySize($row['d_size']);
|
||||
$DOWNLOAD_CAT_SUB_DOWNLOADED = intval( $row['d_requests']);
|
||||
$DOWNLOAD_CAT_SUBSUB = "";
|
||||
// check for subsub cats ...
|
||||
foreach($row['subsubcats'] as $subrow)
|
||||
{
|
||||
$DOWNLOAD_CAT_SUBSUB_ICON = get_cat_icons($subrow['download_category_icon'],$subrow['d_count']);
|
||||
$DOWNLOAD_CAT_SUBSUB_DESCRIPTION = $tp->toHTML($subrow['download_category_description'],TRUE,'DESCRIPTION');
|
||||
$DOWNLOAD_CAT_SUBSUB_COUNT = intval($subrow['d_count']);
|
||||
$DOWNLOAD_CAT_SUBSUB_SIZE = $e107->parseMemorySize($subrow['d_size']);
|
||||
$DOWNLOAD_CAT_SUBSUB_DOWNLOADED = intval($subrow['d_requests']);
|
||||
|
||||
$DOWNLOAD_CAT_SUBSUB_NEW_ICON = check_new_download($subrow['d_last']);
|
||||
$DOWNLOAD_CAT_SUBSUB_NAME = ($subrow['d_count'] ? "<a href='".e_PLUGIN."download/download.php?list.".$subrow['download_category_id']."'>".$tp->toHTML($subrow['download_category_name'], FALSE, 'USER_TITLE')."</a>" : $tp->toHTML($subrow['download_category_name'],FALSE,'USER_TITLE'));
|
||||
$DOWNLOAD_CAT_SUBSUB .= preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_SUBSUB_TABLE);
|
||||
}
|
||||
|
||||
return(preg_replace("/\{(.*?)\}/e", '$\1', $template));
|
||||
}
|
||||
|
||||
|
||||
function parse_download_list_table($row)
|
||||
{
|
||||
// ***** $agreetext may not need to be global
|
||||
global $download_shortcodes,$tp,$current_row,$DOWNLOAD_LIST_TABLE, $rater, $pref, $gen, $agreetext;
|
||||
|
||||
$agreetext = $tp->toHTML($pref['agree_text'],TRUE,'DESCRIPTION');
|
||||
$current_row = ($current_row) ? 0 : 1; // Alternating CSS for each row.(backwards compatible)
|
||||
$template = ($current_row == 1) ? $DOWNLOAD_LIST_TABLE : str_replace("forumheader3","forumheader3 forumheader3_alt",$DOWNLOAD_LIST_TABLE);
|
||||
|
||||
return $tp->parseTemplate($template,TRUE,$download_shortcodes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//=============================================
|
||||
// DOWNLOAD CATEGORY CLASS
|
||||
//=============================================
|
||||
|
||||
class down_cat_handler
|
||||
{
|
||||
var $cat_tree; // Initialised with all categories in a tree structure
|
||||
var $cat_count; // Count visible subcats and subsubcats
|
||||
var $down_count; // Counts total downloads
|
||||
|
||||
function down_cat_handler($nest_level = 1, $load_class = USERCLASS_LIST, $main_cat_load = '', $accum = FALSE)
|
||||
{ // Constructor - make a copy of the tree for re-use
|
||||
// $nest_level = 0 merges subsubcats with subcats. >0 creates full tree.
|
||||
// If load-class non-null, assumed to be a 'class set' such as USERCLASS_LIST
|
||||
// If $accum is TRUE, include file counts and sizes in superior categories
|
||||
define("SUB_PREFIX","-->"); // Added in front of sub categories
|
||||
define("SUBSUB_PREFIX","---->"); // Added in front of sub-sub categories
|
||||
$this->cat_tree = $this->down_cat_tree($nest_level,$load_class, $main_cat_load, $accum);
|
||||
}
|
||||
|
||||
|
||||
// Function returns a 'tree' of download categories, subcategories, and sub-sub-categories.
|
||||
// Returns empty array if nothing defined
|
||||
// Within the 'main category' level of the nesting, array 'subcats' has the next level's info
|
||||
// Within the 'sub-category' level of the nesting, array 'subsubcats' has the next level's info
|
||||
// If $main_cat_load is numeric, and the value of a 'main' category, only that main category is displayed.
|
||||
// (Unpredictable if $main_cat_load is some other category)
|
||||
function down_cat_tree($nest_level = 1, $load_cat_class = USERCLASS_LIST, $main_cat_load = '', $accum = FALSE)
|
||||
{
|
||||
global $sql2;
|
||||
|
||||
$catlist = array();
|
||||
$this->cat_count = 0;
|
||||
$this->down_count = 0;
|
||||
$temp2 = "";
|
||||
$temp1 = "";
|
||||
if ($load_cat_class != "")
|
||||
{
|
||||
$temp1 = " WHERE dc.download_category_class IN ({$load_cat_class}) ";
|
||||
$temp2 = "AND d.download_visible IN ({$load_cat_class}) ";
|
||||
}
|
||||
|
||||
$qry = "
|
||||
SELECT dc.*,
|
||||
dc1.download_category_parent AS d_parent1, dc1.download_category_order,
|
||||
SUM(d.download_filesize) AS d_size,
|
||||
COUNT(d.download_id) AS d_count,
|
||||
MAX(d.download_datestamp) as d_last,
|
||||
SUM(d.download_requested) as d_requests
|
||||
FROM #download_category as dc
|
||||
LEFT JOIN #download_category as dc1 ON dc1.download_category_id=dc.download_category_parent
|
||||
LEFT JOIN #download_category as dc2 ON dc2.download_category_id=dc1.download_category_parent
|
||||
LEFT JOIN #download AS d on d.download_category = dc.download_category_id AND d.download_active > 0 {$temp2}
|
||||
{$temp1}
|
||||
GROUP by dc.download_category_id
|
||||
ORDER by dc2.download_category_order, dc1.download_category_order, dc.download_category_order"; // This puts main categories first, then sub-cats, then sub-sub cats
|
||||
|
||||
if (!$sql2->db_Select_gen($qry)) return $catlist;
|
||||
|
||||
while ($row = $sql2->db_Fetch())
|
||||
{
|
||||
$tmp = $row['download_category_parent'];
|
||||
if ($tmp == '0')
|
||||
{ // Its a main category
|
||||
if (!is_numeric($main_cat_load) || ($main_cat_load == $row['download_category_id']))
|
||||
{
|
||||
$row['subcats'] = array();
|
||||
$catlist[$row['download_category_id']] = $row;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($catlist[$tmp]))
|
||||
{ // Sub-Category
|
||||
$this->cat_count++;
|
||||
$this->down_count += $row['d_count'];
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']] = $row;
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']]['subsubcats'] = array();
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']]['d_last_subs'] =
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']]['d_last'];
|
||||
}
|
||||
else
|
||||
{ // Its a sub-sub category
|
||||
if (isset($catlist[$row['d_parent1']]['subcats'][$tmp]))
|
||||
{
|
||||
$this->cat_count++;
|
||||
$this->down_count += $row['d_count'];
|
||||
if ($accum || ($nest_level == 0))
|
||||
{ // Add the counts into the subcategory values
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_size'] += $row['d_size'];
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_count'] += $row['d_count'];
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_requests'] += $row['d_requests'];
|
||||
}
|
||||
if ($nest_level == 0)
|
||||
{ // Reflect subcat dates in category
|
||||
if ($catlist[$row['d_parent1']]['subcats'][$tmp]['d_last'] < $row['d_last'])
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_last'] = $row['d_last'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['subsubcats'][$row['download_category_id']] = $row;
|
||||
}
|
||||
// Separately accumulate 'last update' for subcat plus associated subsubcats
|
||||
if ($catlist[$row['d_parent1']]['subcats'][$tmp]['d_last_subs'] < $row['d_last'])
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_last_subs'] = $row['d_last'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $catlist;
|
||||
}
|
||||
|
||||
|
||||
// Rest of the class isn't actually used normally, but print_tree() might help with debug
|
||||
|
||||
function print_cat($cat, $prefix,$postfix)
|
||||
{
|
||||
$text = "<tr><td>".$cat['download_category_id']."</td><td>".$cat['download_category_parent']."</td><td>";
|
||||
$text .= $prefix.htmlspecialchars($cat['download_category_name']).$postfix."</td><td>".$cat['d_size']."</td>";
|
||||
$text .= "<td>".$cat['d_count']."</td><td>".$cat['d_requests']."</td><td>".strftime('%H:%M %d-%m-%Y',$cat['d_last'])."</td>";
|
||||
$text .= "</tr>";
|
||||
return $text;
|
||||
}
|
||||
|
||||
function print_tree()
|
||||
{
|
||||
echo "<table><tr><th>ID</th><th>Parent</th><th>Name</th><th>Bytes</th><th>Files</th><th>Requests</th><th>Last Download</th><tr>";
|
||||
foreach ($this->cat_tree as $thiscat)
|
||||
{ // Main categories
|
||||
$scprefix = SUB_PREFIX;
|
||||
echo $this->print_cat($thiscat,'<strong>','</strong>');
|
||||
foreach ($thiscat['subcats'] as $sc)
|
||||
{ // Sub-categories
|
||||
$sscprefix = SUBSUB_PREFIX;
|
||||
echo $this->print_cat($sc,$scprefix,'');
|
||||
foreach ($sc['subsubcats'] as $ssc)
|
||||
{ // Sub-sub categories
|
||||
echo $this->print_cat($ssc,$sscprefix,'');
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
165
e107_plugins/download/handlers/category_class.php
Normal file
165
e107_plugins/download/handlers/category_class.php
Normal file
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/category_class.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2009-02-11 21:41:54 $
|
||||
| $Author: bugrain $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
require_once("../../class2.php");
|
||||
if (!plugInstalled('download')) { exit(); }
|
||||
|
||||
class downloadCategory
|
||||
{
|
||||
var $cat_tree; // Initialised with all categories in a tree structure
|
||||
var $cat_count; // Count visible subcats and subsubcats
|
||||
var $down_count; // Counts total downloads
|
||||
|
||||
function downloadCategory($nest_level = 1, $load_class = USERCLASS_LIST, $main_cat_load = '', $accum = FALSE)
|
||||
{ // Constructor - make a copy of the tree for re-use
|
||||
// $nest_level = 0 merges subsubcats with subcats. >0 creates full tree.
|
||||
// If load-class non-null, assumed to be a 'class set' such as USERCLASS_LIST
|
||||
// If $accum is TRUE, include file counts and sizes in superior categories
|
||||
define("SUB_PREFIX","-->"); // Added in front of sub categories
|
||||
define("SUBSUB_PREFIX","---->"); // Added in front of sub-sub categories
|
||||
$this->cat_tree = $this->down_cat_tree($nest_level,$load_class, $main_cat_load, $accum);
|
||||
}
|
||||
|
||||
|
||||
// Function returns a 'tree' of download categories, subcategories, and sub-sub-categories.
|
||||
// Returns empty array if nothing defined
|
||||
// Within the 'main category' level of the nesting, array 'subcats' has the next level's info
|
||||
// Within the 'sub-category' level of the nesting, array 'subsubcats' has the next level's info
|
||||
// If $main_cat_load is numeric, and the value of a 'main' category, only that main category is displayed.
|
||||
// (Unpredictable if $main_cat_load is some other category)
|
||||
function down_cat_tree($nest_level = 1, $load_cat_class = USERCLASS_LIST, $main_cat_load = '', $accum = FALSE)
|
||||
{
|
||||
global $sql2;
|
||||
|
||||
$catlist = array();
|
||||
$this->cat_count = 0;
|
||||
$this->down_count = 0;
|
||||
$temp2 = "";
|
||||
$temp1 = "";
|
||||
if ($load_cat_class != "")
|
||||
{
|
||||
$temp1 = " WHERE dc.download_category_class IN ({$load_cat_class}) ";
|
||||
$temp2 = "AND d.download_visible IN ({$load_cat_class}) ";
|
||||
}
|
||||
|
||||
$qry = "
|
||||
SELECT dc.*,
|
||||
dc1.download_category_parent AS d_parent1, dc1.download_category_order,
|
||||
SUM(d.download_filesize) AS d_size,
|
||||
COUNT(d.download_id) AS d_count,
|
||||
MAX(d.download_datestamp) as d_last,
|
||||
SUM(d.download_requested) as d_requests
|
||||
FROM #download_category as dc
|
||||
LEFT JOIN #download_category as dc1 ON dc1.download_category_id=dc.download_category_parent
|
||||
LEFT JOIN #download_category as dc2 ON dc2.download_category_id=dc1.download_category_parent
|
||||
LEFT JOIN #download AS d on d.download_category = dc.download_category_id AND d.download_active > 0 {$temp2}
|
||||
{$temp1}
|
||||
GROUP by dc.download_category_id
|
||||
ORDER by dc2.download_category_order, dc1.download_category_order, dc.download_category_order"; // This puts main categories first, then sub-cats, then sub-sub cats
|
||||
|
||||
if (!$sql2->db_Select_gen($qry)) return $catlist;
|
||||
|
||||
while ($row = $sql2->db_Fetch())
|
||||
{
|
||||
$tmp = $row['download_category_parent'];
|
||||
if ($tmp == '0')
|
||||
{ // Its a main category
|
||||
if (!is_numeric($main_cat_load) || ($main_cat_load == $row['download_category_id']))
|
||||
{
|
||||
$row['subcats'] = array();
|
||||
$catlist[$row['download_category_id']] = $row;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($catlist[$tmp]))
|
||||
{ // Sub-Category
|
||||
$this->cat_count++;
|
||||
$this->down_count += $row['d_count'];
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']] = $row;
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']]['subsubcats'] = array();
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']]['d_last_subs'] =
|
||||
$catlist[$tmp]['subcats'][$row['download_category_id']]['d_last'];
|
||||
}
|
||||
else
|
||||
{ // Its a sub-sub category
|
||||
if (isset($catlist[$row['d_parent1']]['subcats'][$tmp]))
|
||||
{
|
||||
$this->cat_count++;
|
||||
$this->down_count += $row['d_count'];
|
||||
if ($accum || ($nest_level == 0))
|
||||
{ // Add the counts into the subcategory values
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_size'] += $row['d_size'];
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_count'] += $row['d_count'];
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_requests'] += $row['d_requests'];
|
||||
}
|
||||
if ($nest_level == 0)
|
||||
{ // Reflect subcat dates in category
|
||||
if ($catlist[$row['d_parent1']]['subcats'][$tmp]['d_last'] < $row['d_last'])
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_last'] = $row['d_last'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['subsubcats'][$row['download_category_id']] = $row;
|
||||
}
|
||||
// Separately accumulate 'last update' for subcat plus associated subsubcats
|
||||
if ($catlist[$row['d_parent1']]['subcats'][$tmp]['d_last_subs'] < $row['d_last'])
|
||||
$catlist[$row['d_parent1']]['subcats'][$tmp]['d_last_subs'] = $row['d_last'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $catlist;
|
||||
}
|
||||
|
||||
|
||||
// Rest of the class isn't actually used normally, but print_tree() might help with debug
|
||||
|
||||
function print_cat($cat, $prefix,$postfix)
|
||||
{
|
||||
$text = "<tr><td>".$cat['download_category_id']."</td><td>".$cat['download_category_parent']."</td><td>";
|
||||
$text .= $prefix.htmlspecialchars($cat['download_category_name']).$postfix."</td><td>".$cat['d_size']."</td>";
|
||||
$text .= "<td>".$cat['d_count']."</td><td>".$cat['d_requests']."</td><td>".strftime('%H:%M %d-%m-%Y',$cat['d_last'])."</td>";
|
||||
$text .= "</tr>";
|
||||
return $text;
|
||||
}
|
||||
|
||||
function print_tree()
|
||||
{
|
||||
echo "<table><tr><th>ID</th><th>Parent</th><th>Name</th><th>Bytes</th><th>Files</th><th>Requests</th><th>Last Download</th><tr>";
|
||||
foreach ($this->cat_tree as $thiscat)
|
||||
{ // Main categories
|
||||
$scprefix = SUB_PREFIX;
|
||||
echo $this->print_cat($thiscat,'<strong>','</strong>');
|
||||
foreach ($thiscat['subcats'] as $sc)
|
||||
{ // Sub-categories
|
||||
$sscprefix = SUBSUB_PREFIX;
|
||||
echo $this->print_cat($sc,$scprefix,'');
|
||||
foreach ($sc['subsubcats'] as $ssc)
|
||||
{ // Sub-sub categories
|
||||
echo $this->print_cat($ssc,$sscprefix,'');
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
146
e107_plugins/download/handlers/download_class.php
Normal file
146
e107_plugins/download/handlers/download_class.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/download_class.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2009-02-11 21:41:54 $
|
||||
| $Author: bugrain $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
require_once("../../class2.php");
|
||||
if (!plugInstalled('download')) { exit(); }
|
||||
|
||||
class download
|
||||
{
|
||||
function download()
|
||||
{
|
||||
}
|
||||
function displayCategoryList() {
|
||||
}
|
||||
function getBreadcrumb($arr)
|
||||
{
|
||||
$dlbreadcrumb = array();
|
||||
$ix = 0;
|
||||
foreach ($arr as $key=>$crumb) {
|
||||
$dlbreadcrumb[$ix]['sep'] = " :: ";
|
||||
$ix++;
|
||||
if (is_int($key))
|
||||
{
|
||||
$dlbreadcrumb[$ix]['value'] = $crumb;
|
||||
}
|
||||
else
|
||||
{
|
||||
$dlbreadcrumb[$ix]['value'] = "<a href='{$crumb}'>".$key."</a>";
|
||||
}
|
||||
}
|
||||
$dlbreadcrumb['fieldlist'] = implode(",", array_keys($dlbreadcrumb));
|
||||
return $dlbreadcrumb;
|
||||
}
|
||||
function getCategorySelectList($currentID=0, $blankText="", $incSubSub=true, $groupOnMain=true)
|
||||
{
|
||||
global $sql,$parm;
|
||||
$boxinfo = "\n";
|
||||
$qry = "
|
||||
SELECT dc.download_category_name, dc.download_category_order, dc.download_category_id, dc.download_category_parent,
|
||||
dc1.download_category_parent AS d_parent1
|
||||
FROM #download_category AS dc
|
||||
LEFT JOIN #download_category as dc1 ON dc1.download_category_id=dc.download_category_parent AND dc1.download_category_class IN (".USERCLASS_LIST.")
|
||||
LEFT JOIN #download_category as dc2 ON dc2.download_category_id=dc1.download_category_parent ";
|
||||
if (ADMIN === FALSE) $qry .= " WHERE dc.download_category_class IN (".USERCLASS_LIST.") ";
|
||||
$qry .= " ORDER by dc2.download_category_order, dc1.download_category_order, dc.download_category_order"; // This puts main categories first, then sub-cats, then sub-sub cats
|
||||
if (!$sql->db_Select_gen($qry))
|
||||
{
|
||||
return "Error reading categories<br />";
|
||||
exit;
|
||||
}
|
||||
$boxinfo .= "<select name='download_category' id='download_category' class='tbox'>
|
||||
<option value=''>{$blankText}</option>\n";
|
||||
// Its a structured display option - need a 2-step process to create a tree
|
||||
$catlist = array();
|
||||
while ($dlrow = $sql->db_Fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$tmp = $dlrow['download_category_parent'];
|
||||
if ($tmp == '0')
|
||||
{
|
||||
$dlrow['subcats'] = array();
|
||||
$catlist[$dlrow['download_category_id']] = $dlrow;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($catlist[$tmp]))
|
||||
{ // Sub-Category
|
||||
$catlist[$tmp]['subcats'][$dlrow['download_category_id']] = $dlrow;
|
||||
$catlist[$tmp]['subcats'][$dlrow['download_category_id']]['subsubcats'] = array();
|
||||
}
|
||||
else
|
||||
{ // Its a sub-sub category
|
||||
if (isset($catlist[$dlrow['d_parent1']]['subcats'][$tmp]))
|
||||
{
|
||||
$catlist[$dlrow['d_parent1']]['subcats'][$tmp]['subsubcats'][$dlrow['download_category_id']] = $dlrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Now generate the options
|
||||
foreach ($catlist as $thiscat)
|
||||
{ // Main categories
|
||||
if (count($thiscat['subcats']) > 0)
|
||||
{
|
||||
if ($groupOnMain)
|
||||
{
|
||||
$boxinfo .= "<optgroup label='".htmlspecialchars($thiscat['download_category_name'])."'>";
|
||||
$scprefix = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$boxinfo .= "<option value='".$thiscat['download_category_id']."'";
|
||||
if ($currentID == $thiscat['download_category_id']) {
|
||||
$boxinfo .= " selected='selected'";
|
||||
}
|
||||
$boxinfo .= ">".htmlspecialchars($thiscat['download_category_name'])."</option>\n";
|
||||
$scprefix = ' ';
|
||||
}
|
||||
foreach ($thiscat['subcats'] as $sc)
|
||||
{ // Sub-categories
|
||||
$sscprefix = '--> ';
|
||||
$boxinfo .= "<option value='".$sc['download_category_id']."'";
|
||||
if ($currentID == $sc['download_category_id']) {
|
||||
$boxinfo .= " selected='selected'";
|
||||
}
|
||||
$boxinfo .= ">".$scprefix.htmlspecialchars($sc['download_category_name'])."</option>\n";
|
||||
if ($incSubSub)
|
||||
{ // Sub-sub categories
|
||||
foreach ($sc['subsubcats'] as $ssc)
|
||||
{
|
||||
$boxinfo .= "<option value='".$ssc['download_category_id']."'";
|
||||
if ($currentID == $ssc['download_category_id']) { $boxinfo .= " selected='selected'"; }
|
||||
$boxinfo .= ">".htmlspecialchars($sscprefix.$ssc['download_category_name'])."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($groupOnMain)
|
||||
{
|
||||
$boxinfo .= "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sel = ($currentID == $thiscat['download_category_id']) ? " selected='selected'" : "";
|
||||
$boxinfo .= "<option value='".$thiscat['download_category_id']."' {$sel}>".htmlspecialchars($thiscat['download_category_name'])."</option>\n";
|
||||
}
|
||||
}
|
||||
$boxinfo .= "</select>\n";
|
||||
return $boxinfo;
|
||||
}
|
||||
}
|
||||
?>
|
@@ -11,16 +11,84 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/help.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2009-01-11 02:59:10 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2009-02-11 21:41:54 $
|
||||
| $Author: bugrain $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$text = "Please upload your files into the ".e_FILE."downloads folder, your images into the ".e_FILE."downloadimages folder and thumbnail images into the ".e_FILE."downloadthumbs folder.
|
||||
<br /><br />
|
||||
To submit a download, first create a parent, then create a category under that parent, you will then be able to make the download available.";
|
||||
$ns -> tablerender("Download Help", $text);
|
||||
if (e_QUERY)
|
||||
{
|
||||
$tmp = explode(".", e_QUERY);
|
||||
$action = $tmp[0];
|
||||
$subAction = $tmp[1];
|
||||
}
|
||||
|
||||
switch($action) {
|
||||
case 'create' :{
|
||||
$text = DOWLAN_HELP_2;
|
||||
break;
|
||||
}
|
||||
case 'cat' :{
|
||||
$text = DOWLAN_HELP_3;
|
||||
break;
|
||||
}
|
||||
case 'opt' :{
|
||||
$text = DOWLAN_HELP_4;
|
||||
break;
|
||||
}
|
||||
case 'maint' :{
|
||||
switch($subAction) {
|
||||
case 'duplicates': {
|
||||
$text = DOWLAN_HELP_5_1;
|
||||
break;
|
||||
}
|
||||
case 'orphans': {
|
||||
$text = DOWLAN_HELP_5_2;
|
||||
break;
|
||||
}
|
||||
case 'missing': {
|
||||
$text = DOWLAN_HELP_5_3;
|
||||
break;
|
||||
}
|
||||
case 'inactive': {
|
||||
$text = DOWLAN_HELP_5_4;
|
||||
break;
|
||||
}
|
||||
case 'nocategory': {
|
||||
$text = DOWLAN_HELP_5_5;
|
||||
break;
|
||||
}
|
||||
case 'filesize': {
|
||||
$text = DOWLAN_HELP_5_6;
|
||||
break;
|
||||
}
|
||||
case 'log': {
|
||||
$text = DOWLAN_HELP_5_7;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
$text = DOWLAN_HELP_5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'limits' :{
|
||||
$text = DOWLAN_HELP_6;
|
||||
break;
|
||||
}
|
||||
case 'mirror' :{
|
||||
$text = DOWLAN_HELP_7;
|
||||
break;
|
||||
}
|
||||
default : {
|
||||
$text = "Please upload your files into the ".e_DOWNLOAD." folder, your images into the ".e_FILE."downloadimages folder and thumbnail images into the ".e_FILE."downloadthumbs folder.
|
||||
<br /><br />
|
||||
To submit a download, first create a parent, then create a category under that parent, you will then be able to make the download available.";
|
||||
}
|
||||
}
|
||||
$ns -> tablerender(DOWLAN_HELP_1, $text);
|
||||
?>
|
@@ -4,8 +4,8 @@
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/languages/English/lan_download.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2009-01-11 02:59:10 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2009-02-11 21:41:54 $
|
||||
| $Author: bugrain $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ define("LAN_dl_46", "click here to download");
|
||||
define("LAN_dl_47", "Post has been reported");
|
||||
define("LAN_dl_48", "Download has been reported to administrator.<br />Thank you.");
|
||||
define("LAN_dl_49", "Click here to return to download");
|
||||
define("LAN_dl_50", "Report broken download to an administrator");
|
||||
define("LAN_dl_50", "Broken download reported");
|
||||
define("LAN_dl_51", "Reporting download: ");
|
||||
define("LAN_dl_52", "Guest");
|
||||
define("LAN_dl_53", "Click to view download");
|
||||
@@ -84,7 +84,7 @@ define("LAN_dl_65", "File Not Found");
|
||||
|
||||
define("LAN_dl_66", "Select download mirror");
|
||||
|
||||
define("LAN_dl_67", "Please select mirror to use ...");
|
||||
define("LAN_dl_67", "Select mirror ...");
|
||||
define("LAN_dl_68", "Mirror Host");
|
||||
// define("LAN_dl_69", "Download"); // duplicate
|
||||
define("LAN_dl_70", "Location");
|
||||
|
@@ -4,8 +4,8 @@
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/languages/English/lan_download_admin.php,v $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-01-14 23:45:33 $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2009-02-11 21:41:54 $
|
||||
| $Author: bugrain $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ define("DOWLAN_40", "None - main parent");
|
||||
define("DOWLAN_41", "Icon");
|
||||
define("DOWLAN_42", "View Images");
|
||||
define("DOWLAN_43", "Visible to");
|
||||
define("DOWLAN_44", "Ticking will make the category visible to only users in that class");
|
||||
define("DOWLAN_44", "Selection will make the category visible to only users in that class");
|
||||
define("DOWLAN_45", "Create Category");
|
||||
define("DOWLAN_46", "Update Category");
|
||||
define("DOWLAN_47", "Category created");
|
||||
@@ -72,7 +72,7 @@ define("DOWLAN_62", "Ascending");
|
||||
define("DOWLAN_63", "Descending");
|
||||
define("DOWLAN_64", "Update Options");
|
||||
define("DOWLAN_65", "Options Updated");
|
||||
define("DOWLAN_66", "Enter filesize");
|
||||
define("DOWLAN_66", "Filesize");
|
||||
define("DOWLAN_67", "ID");
|
||||
define("DOWLAN_68", "File Missing!");
|
||||
define("DOWLAN_69", "Downloads handled by PHP");
|
||||
@@ -104,7 +104,7 @@ define("DOWLAN_123", "Active - File is subject to download limits");
|
||||
define("DOWLAN_124", "Active - File is NOT subject to download limits");
|
||||
define("DOWLAN_125", "Download limits active");
|
||||
define("DOWLAN_126", "Activation status updated");
|
||||
define("DOWLAN_127", "Only enter filesize if the download is an external file");
|
||||
define("DOWLAN_127", "Only enter filesize if the download is an external file"); // TODO not used?
|
||||
define("DOWLAN_128", "Mirrors");
|
||||
define("DOWLAN_129", "leave blank if not using mirrors");
|
||||
define("DOWLAN_130", "Add another mirror");
|
||||
@@ -130,7 +130,7 @@ define("DOWLAN_146", "Custom Download-denial message or URL");
|
||||
|
||||
define("DOWLAN_147", "Icon for empty category");
|
||||
define("DOWLAN_148", "Check to update date stamp to current time");
|
||||
define("DOWLAN_149", "Or click here to use an external file");
|
||||
define("DOWLAN_149", "URL");
|
||||
|
||||
define("DOWLAN_150", "Email admin when broken download reported");
|
||||
define("DOWLAN_151", "Broken-download reporting available to");
|
||||
@@ -153,4 +153,38 @@ define("DOWLAN_163", "Name");
|
||||
|
||||
define("DOWLAN_164", "Recent downloads age (in days)");
|
||||
|
||||
define("DOWLAN_165", "Maintenance");
|
||||
define("DOWLAN_166", "Duplicates");
|
||||
define("DOWLAN_167", "Orphans");
|
||||
define("DOWLAN_168", "Missing");
|
||||
define("DOWLAN_169", "Inactive");
|
||||
define("DOWLAN_170", "File size");
|
||||
define("DOWLAN_171", "Log");
|
||||
define("DOWLAN_172", "No entries");
|
||||
define("DOWLAN_173", "Are you sure you want to delete this file?");
|
||||
define("DOWLAN_174", "No orphaned files found");
|
||||
define("DOWLAN_175", "Local");
|
||||
define("DOWLAN_176", "External");
|
||||
define("DOWLAN_177", "Maintenance options");
|
||||
define("DOWLAN_178", "No category");
|
||||
define("DOWLAN_179", "Select an option from the Maintenance Options menu");
|
||||
define("DOWLAN_180", "File size (database/disk)");
|
||||
|
||||
define("DOWLAN_HELP_1", "Download Help");
|
||||
define("DOWLAN_HELP_2", "<p>Create/edit a download.</p><p>Enter only one of: File, URL or Mirror.</p><p>Ensure you select a category, otherwise your download will not be visible on the downloads page.</p><p>");
|
||||
define("DOWLAN_HELP_3", "Help for cat");
|
||||
define("DOWLAN_HELP_4", "Help for opt");
|
||||
define("DOWLAN_HELP_5", "Use the maintenance pages to find duplicate downloads, find orphaned files, find missing (broken) entries, manage inactive downloads, refresh file sizes and view the downlaod log.");
|
||||
define("DOWLAN_HELP_5_1", "This page shows duplicate entries in the database - records where the same file is referenced more than once.");
|
||||
define("DOWLAN_HELP_5_2", "This page shows orphan files - files in the downloads directory that do not have a record in the database referenceing them.");
|
||||
define("DOWLAN_HELP_5_3", "This page shows missing entries in the database - records that reference a non-existing file.");
|
||||
define("DOWLAN_HELP_5_4", "This page shows all records that are marked as inactive.");
|
||||
define("DOWLAN_HELP_5_5", "This page shows records in the database that are not associated with a download category.");
|
||||
define("DOWLAN_HELP_5_6", "This page shows records in the database that have an incorrect file size when comapred to the file in the downloads folder.");
|
||||
define("DOWLAN_HELP_5_7", "This page shows the downloads log entries.");
|
||||
define("DOWLAN_HELP_6", "Help for limits");
|
||||
define("DOWLAN_HELP_7", "Help for mirror");
|
||||
define("DOWLAN_HELP_8", "Help for ");
|
||||
define("DOWLAN_HELP_9", "Help for ");
|
||||
|
||||
?>
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Id: plugin.xml,v 1.3 2009-01-14 22:53:38 bugrain Exp $ -->
|
||||
<!-- $Id: plugin.xml,v 1.4 2009-02-11 21:41:54 bugrain Exp $ -->
|
||||
<e107Plugin name="Download" version="1.0" compatibility="0.8" installRequired="true">
|
||||
<author name="e107dev" url="http://e107.org"/>
|
||||
<description>This plugin is a fully featured Download system</description>
|
||||
@@ -17,7 +17,7 @@
|
||||
<caption>Configure Download</caption>
|
||||
<installDone>Your download plugin is now installed</installDone>
|
||||
</administration>
|
||||
<menuLink name="Download" url="download/download.php" perm='everyone'/>
|
||||
<menuLink name="Download" url="download/download.php" perm="everyone"/>
|
||||
<mainPrefs>
|
||||
<pref name="download_php" value="" />
|
||||
<pref name="download_subsub" value="1" />
|
||||
|
@@ -11,38 +11,63 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/templates/download_template.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2009-01-14 23:43:36 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2009-02-11 21:41:54 $
|
||||
| $Author: bugrain $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
||||
|
||||
|
||||
/* set style of download image and thumbnail */
|
||||
define("DL_IMAGESTYLE","border:0px");
|
||||
|
||||
// ##### CAT TABLE --------------------------------------------------------------------------------
|
||||
if(!isset($DOWNLOAD_CAT_TABLE_PRE))
|
||||
{
|
||||
$DOWNLOAD_CAT_TABLE_PRE = "
|
||||
<div>{DOWNLOAD_CAT_MAIN_DESCRIPTION}</div>";
|
||||
}
|
||||
if(!isset($DOWNLOAD_CAT_TABLE_START))
|
||||
{
|
||||
$DOWNLOAD_CAT_TABLE_START = "
|
||||
<div style='text-align:center'>
|
||||
<table class='fborder' style='".USER_WIDTH."'>\n
|
||||
<colgroup>
|
||||
<col style='width:3%'/>
|
||||
<col style='width:60%'/>
|
||||
<col style='width:10%'/>
|
||||
<col style='width:17%'/>
|
||||
<col style='width:10%'/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td style='width:3%; text-align:center' class='fcaption'> </td>
|
||||
<td style='width:60%; text-align:center' class='fcaption'>".LAN_dl_19."</td>
|
||||
<td style='width:10%; text-align:center' class='fcaption'>".LAN_dl_20."</td>
|
||||
<td style='width:17%; text-align:center' class='fcaption'>".LAN_dl_21."</td>
|
||||
<td style='width:10%; text-align:center' class='fcaption'>".LAN_dl_77."</td>
|
||||
</tr>";
|
||||
<th class='fcaption' colspan='2'>".LAN_dl_19."</th>
|
||||
<th class='fcaption'>".LAN_dl_20."</th>
|
||||
<th class='fcaption'>".LAN_dl_21."</th>
|
||||
<th class='fcaption'>".LAN_dl_77."</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class='forumheader3' colspan='5'>{DOWNLOAD_CAT_NEWDOWNLOAD_TEXT}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='forumheader3' colspan='5'>{DOWNLOAD_CAT_SEARCH}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>";
|
||||
}
|
||||
if(!isset($DOWNLOAD_CAT_PARENT_TABLE))
|
||||
{
|
||||
$DOWNLOAD_CAT_PARENT_TABLE = "
|
||||
<tr>
|
||||
<td colspan='5' class='forumheader' style='text-align:left; font-weight:bold;'>
|
||||
{DOWNLOAD_CAT_MAIN_ICON} {DOWNLOAD_CAT_MAIN_NAME}
|
||||
<td class='forumheader'>
|
||||
{DOWNLOAD_CAT_MAIN_ICON}
|
||||
</td>
|
||||
<td colspan='4' class='forumheader'>
|
||||
{DOWNLOAD_CAT_MAIN_NAME}<br/>
|
||||
<span class='smalltext'>{DOWNLOAD_CAT_MAIN_DESCRIPTION}</span>
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
@@ -55,10 +80,8 @@ if(!isset($DOWNLOAD_CAT_CHILD_TABLE))
|
||||
{DOWNLOAD_CAT_SUB_ICON}
|
||||
</td>
|
||||
<td class='forumheader3'>
|
||||
{DOWNLOAD_CAT_SUB_NEW_ICON} {DOWNLOAD_CAT_SUB_NAME}<br />
|
||||
<span class='smalltext'>
|
||||
{DOWNLOAD_CAT_SUB_DESCRIPTION}
|
||||
</span>
|
||||
{DOWNLOAD_CAT_SUB_NEW_ICON} {DOWNLOAD_CAT_SUB_NAME}<br/>
|
||||
<span class='smalltext'>{DOWNLOAD_CAT_SUB_DESCRIPTION}</span>
|
||||
</td>
|
||||
<td class='forumheader3' style='text-align:center;'>
|
||||
{DOWNLOAD_CAT_SUB_COUNT}
|
||||
@@ -70,11 +93,8 @@ if(!isset($DOWNLOAD_CAT_CHILD_TABLE))
|
||||
{DOWNLOAD_CAT_SUB_DOWNLOADED}
|
||||
</td>
|
||||
</tr>
|
||||
{DOWNLOAD_CAT_SUBSUB}
|
||||
";
|
||||
|
||||
{DOWNLOAD_CAT_SUBSUB}";
|
||||
}
|
||||
|
||||
if(!isset($DOWNLOAD_CAT_SUBSUB_TABLE))
|
||||
{
|
||||
$DOWNLOAD_CAT_SUBSUB_TABLE = "
|
||||
@@ -85,14 +105,11 @@ if(!isset($DOWNLOAD_CAT_SUBSUB_TABLE))
|
||||
<td class='forumheader3' style='width:100%'>
|
||||
<table>
|
||||
<tr>
|
||||
<td class='forumheader3' style='border:0'>".
|
||||
LAN_dl_42."
|
||||
</td>
|
||||
<td class='forumheader3' style='border:0'>
|
||||
{DOWNLOAD_CAT_SUBSUB_ICON}
|
||||
</td>
|
||||
<td class='forumheader3' style='border:0; width: 100%'>
|
||||
{DOWNLOAD_CAT_SUBSUB_NEW_ICON} {DOWNLOAD_CAT_SUBSUB_NAME}<br />
|
||||
{DOWNLOAD_CAT_SUBSUB_NEW_ICON} {DOWNLOAD_CAT_SUBSUB_NAME}<br/>
|
||||
<span class='smalltext'>
|
||||
{DOWNLOAD_CAT_SUBSUB_DESCRIPTION}
|
||||
</span>
|
||||
@@ -100,7 +117,6 @@ if(!isset($DOWNLOAD_CAT_SUBSUB_TABLE))
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td class='forumheader3' style='text-align:center;'>
|
||||
{DOWNLOAD_CAT_SUBSUB_COUNT}
|
||||
</td>
|
||||
@@ -112,19 +128,13 @@ if(!isset($DOWNLOAD_CAT_SUBSUB_TABLE))
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if(!isset($DOWNLOAD_CAT_TABLE_END))
|
||||
{
|
||||
$DOWNLOAD_CAT_TABLE_END = "
|
||||
<tr><td class='forumheader3' colspan='5' style='text-align:right;'>{DOWNLOAD_CAT_NEWDOWNLOAD_TEXT}</td></tr>
|
||||
<tr><td class='forumheader3' colspan='5' style='text-align:right;'>{DOWNLOAD_CAT_SEARCH}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>\n";
|
||||
}
|
||||
// ##### ------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// ##### LIST TABLE -------------------------------------------------------------------------------
|
||||
if(!isset($DOWNLOAD_LIST_TABLE_START))
|
||||
{
|
||||
@@ -132,6 +142,15 @@ if(!isset($DOWNLOAD_LIST_TABLE_START))
|
||||
<div style='text-align:center'>
|
||||
<form method='post' action='".e_SELF."?".e_QUERY."'>
|
||||
<table class='fborder' style='".USER_WIDTH."'>\n
|
||||
<colgroup>
|
||||
<col style='width:35%;'/>
|
||||
<col style='width:15%;'/>
|
||||
<col style='width:20%;'/>
|
||||
<col style='width:10%;'/>
|
||||
<col style='width:5%;'/>
|
||||
<col style='width:10%;'/>
|
||||
<col style='width:5%;'/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td colspan='7' style='text-align:center' class='forumheader'>
|
||||
<span class='defaulttext'>".LAN_dl_37."</span>
|
||||
@@ -162,17 +181,15 @@ if(!isset($DOWNLOAD_LIST_TABLE_START))
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:35%; text-align:center' class='fcaption'>".LAN_dl_28."</td>
|
||||
<td style='width:15%; text-align:center' class='fcaption'>".LAN_dl_22."</td>
|
||||
<td style='width:20%; text-align:center' class='fcaption'>".LAN_dl_24."</td>
|
||||
<td style='width:10%; text-align:center' class='fcaption'>".LAN_dl_21."</td>
|
||||
<td style='width:5%; text-align:center' class='fcaption'>".LAN_dl_29."</td>
|
||||
<td style='width:10%; text-align:center' class='fcaption'>".LAN_dl_12."</td>
|
||||
<td style='width:5%; text-align:center' class='fcaption'>".LAN_dl_8."</td>
|
||||
<th class='fcaption'>".LAN_dl_28."</th>
|
||||
<th class='fcaption'>".LAN_dl_22."</th>
|
||||
<th class='fcaption'>".LAN_dl_24."</th>
|
||||
<th class='fcaption'>".LAN_dl_21."</th>
|
||||
<th class='fcaption'>".LAN_dl_29."</th>
|
||||
<th class='fcaption'>".LAN_dl_12."</th>
|
||||
<th class='fcaption'>".LAN_dl_8."</th>
|
||||
</tr>";
|
||||
|
||||
}
|
||||
|
||||
if(!isset($DOWNLOAD_LIST_TABLE))
|
||||
{
|
||||
$DOWNLOAD_LIST_TABLE = "
|
||||
@@ -196,7 +213,7 @@ if(!isset($DOWNLOAD_LIST_TABLE))
|
||||
{DOWNLOAD_LIST_RATING}
|
||||
</td>
|
||||
<td class='forumheader3' style='text-align:center;'>
|
||||
{DOWNLOAD_LIST_LINK} {DOWNLOAD_LIST_ICON}</a>
|
||||
{DOWNLOAD_LIST_LINK}
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
@@ -204,21 +221,18 @@ if(!isset($DOWNLOAD_LIST_TABLE))
|
||||
if(!isset($DOWNLOAD_LIST_TABLE_END))
|
||||
{
|
||||
$DOWNLOAD_LIST_TABLE_END = "
|
||||
<tr><td class='forumheader3' colspan='7' style='text-align:right;'>{DOWNLOAD_LIST_TOTAL_AMOUNT} {DOWNLOAD_LIST_TOTAL_FILES}</td></tr>
|
||||
<tr>
|
||||
<td class='forumheader3' colspan='7' style='text-align:right;'>{DOWNLOAD_LIST_TOTAL_AMOUNT} {DOWNLOAD_LIST_TOTAL_FILES}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>\n";
|
||||
}
|
||||
// ##### ------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ##### VIEW TABLE -------------------------------------------------------------------------------
|
||||
|
||||
$DL_VIEW_PAGETITLE = PAGE_NAME." / {DOWNLOAD_CATEGORY} / {DOWNLOAD_VIEW_NAME}";
|
||||
$DL_VIEW_CAPTION = "{DOWNLOAD_VIEW_CAPTION}";
|
||||
|
||||
$DL_VIEW_NEXTPREV = "
|
||||
<div style='text-align:center'>
|
||||
$DL_VIEW_NEXTPREV = "
|
||||
<div style='text-align:center'>
|
||||
<table style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<td style='width:40%;'>{DOWNLOAD_VIEW_PREV}</td>
|
||||
@@ -226,7 +240,7 @@ $DL_VIEW_CAPTION = "{DOWNLOAD_VIEW_CAPTION}";
|
||||
<td style='width:40%; text-align: right;'>{DOWNLOAD_VIEW_NEXT}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>\n";
|
||||
</div>\n";
|
||||
|
||||
// Only renders the following rows when data is present.
|
||||
$sc_style['DOWNLOAD_VIEW_AUTHOR_LAN']['pre'] = "<tr><td style='width:20%' class='forumheader3'>";
|
||||
@@ -251,82 +265,81 @@ if(!isset($DOWNLOAD_VIEW_TABLE))
|
||||
{
|
||||
$DOWNLOAD_VIEW_TABLE = "
|
||||
<div style='text-align:center'>
|
||||
<table class='fborder' style='".USER_WIDTH."'>\n
|
||||
<table class='fborder' style='".USER_WIDTH."'>
|
||||
<colgroup>
|
||||
<col style='width:30%;'>
|
||||
<col style='width:70%;'>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption' style='text-align:left;'>
|
||||
{DOWNLOAD_VIEW_NAME}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{DOWNLOAD_VIEW_AUTHOR_LAN}
|
||||
{DOWNLOAD_VIEW_AUTHOR}
|
||||
|
||||
{DOWNLOAD_VIEW_AUTHOREMAIL_LAN}
|
||||
{DOWNLOAD_VIEW_AUTHOREMAIL}
|
||||
|
||||
{DOWNLOAD_VIEW_AUTHORWEBSITE_LAN}
|
||||
{DOWNLOAD_VIEW_AUTHORWEBSITE}
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>{DOWNLOAD_VIEW_DESCRIPTION_LAN}</td>
|
||||
<td style='width:80%' class='forumheader3'>{DOWNLOAD_VIEW_DESCRIPTION}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_DESCRIPTION_LAN}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_DESCRIPTION}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>{DOWNLOAD_VIEW_IMAGE_LAN}</td>
|
||||
<td style='width:80%' class='forumheader3'>{DOWNLOAD_VIEW_IMAGE}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_IMAGE_LAN}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_IMAGE}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>{DOWNLOAD_VIEW_FILESIZE_LAN}</td>
|
||||
<td style='width:80%' class='forumheader3'>{DOWNLOAD_VIEW_FILESIZE}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_FILESIZE_LAN}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_FILESIZE}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>{DOWNLOAD_VIEW_DATE_LAN}</td>
|
||||
<td style='width:80%' class='forumheader3'>{DOWNLOAD_VIEW_DATE=long}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_DATE_LAN}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_DATE=long}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>{DOWNLOAD_VIEW_REQUESTED_LAN}</td>
|
||||
<td style='width:80%' class='forumheader3'>{DOWNLOAD_VIEW_REQUESTED}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_REQUESTED_LAN}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_REQUESTED}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>{DOWNLOAD_VIEW_LINK_LAN}</td>
|
||||
<td style='width:80%' class='forumheader3'>{DOWNLOAD_VIEW_LINK}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_LINK_LAN}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_LINK}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>{DOWNLOAD_VIEW_RATING_LAN}</td>
|
||||
<td style='width:80%' class='forumheader3'>{DOWNLOAD_VIEW_RATING}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_RATING_LAN}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_VIEW_RATING}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3' colspan='2'>{DOWNLOAD_REPORT_LINK}</td>
|
||||
<td class='forumheader3' colspan='2'>{DOWNLOAD_REPORT_LINK}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style='text-align:right; ".USER_WIDTH."; margin-left: auto; margin-right: auto'>{DOWNLOAD_ADMIN_EDIT}</div>
|
||||
</div>\n";
|
||||
}
|
||||
|
||||
// ##### ------------------------------------------------------------------------------------------
|
||||
|
||||
// ##### MIRROR LIST -------------------------------------------------------------------------------
|
||||
|
||||
if(!isset($DOWNLOAD_MIRROR_START))
|
||||
{
|
||||
$DOWNLOAD_MIRROR_START = "
|
||||
<div style='text-align:center'>
|
||||
<table class='fborder' style='".USER_WIDTH."'>
|
||||
<colgroup>
|
||||
<col style='width:1%'/>
|
||||
<col style='width:29%'/>
|
||||
<col style='width:40%'/>
|
||||
<col style='width:20%'/>
|
||||
<col style='width:10%'/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class='fcaption' colspan='4'>{DOWNLOAD_MIRROR_REQUEST}</td>
|
||||
<th class='fcaption'>{DOWNLOAD_MIRROR_REQUEST_ICON}</th>
|
||||
<th class='fcaption' colspan='5'>".LAN_dl_72."{DOWNLOAD_MIRROR_REQUEST}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='forumheader' style='width: 30%; text-align: center;'>{DOWNLOAD_MIRROR_HOST_LAN}</td>
|
||||
<td class='forumheader' style='width: 40%;'>{DOWNLOAD_MIRROR_DESCRIPTION_LAN}</td>
|
||||
<td class='forumheader' style='width: 20%; text-align: center;'>{DOWNLOAD_MIRROR_LOCATION_LAN}</td>
|
||||
<td class='forumheader' style='width: 10%; text-align: center;'>{DOWNLOAD_MIRROR_GET_LAN}</td>
|
||||
<th class='forumheader' colspan='2'>".LAN_dl_68."</th>
|
||||
<th class='forumheader'>".LAN_dl_71."</th>
|
||||
<th class='forumheader'>".LAN_dl_70."</th>
|
||||
<th class='forumheader'>".LAN_dl_21."</th>
|
||||
<th class='forumheader'>".LAN_dl_32."</th>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
@@ -335,10 +348,18 @@ if(!isset($DOWNLOAD_MIRROR))
|
||||
{
|
||||
$DOWNLOAD_MIRROR = "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width: 30%; text-align: center;'>{DOWNLOAD_MIRROR_IMAGE}<br /><br /><div class='smalltext'>{DOWNLOAD_MIRROR_REQUESTS}<br />{DOWNLOAD_TOTAL_MIRROR_REQUESTS}</div></td>
|
||||
<td class='forumheader3' style='width: 40%'><div class='smalltext'>{DOWNLOAD_MIRROR_DESCRIPTION}</div></td>
|
||||
<td class='forumheader3' style='width: 20%;; text-align: center;'>{DOWNLOAD_MIRROR_LOCATION}</td>
|
||||
<td class='forumheader3' style='width: 10%; text-align: center;'><div class='smalltext'>{DOWNLOAD_MIRROR_LINK} {DOWNLOAD_MIRROR_FILESIZE}</div></td>
|
||||
<td class='forumheader3'>{DOWNLOAD_MIRROR_IMAGE}</td>
|
||||
<td class='forumheader3'>
|
||||
{DOWNLOAD_MIRROR_NAME}
|
||||
<div class='smalltext'>
|
||||
{DOWNLOAD_MIRROR_REQUESTS}
|
||||
<br/>{DOWNLOAD_TOTAL_MIRROR_REQUESTS}
|
||||
</div>
|
||||
</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_MIRROR_DESCRIPTION}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_MIRROR_LOCATION}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_MIRROR_FILESIZE}</td>
|
||||
<td class='forumheader3'>{DOWNLOAD_MIRROR_LINK}</div></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
Reference in New Issue
Block a user