mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 12:51:52 +02:00
Download plugin clean-up mostly complete. (cache still needs to be done)
This commit is contained in:
@@ -15,50 +15,49 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
require_once(e_HANDLER.'shortcode_handler.php');
|
||||
//register_shortcode('download_shortcodes', true);
|
||||
//initShortcodeClass('download_shortcodes');
|
||||
|
||||
/**
|
||||
* download_shortcodes
|
||||
*/
|
||||
class download_shortcodes extends e_shortcode
|
||||
{
|
||||
var $e107;
|
||||
var $postInfo;
|
||||
var $qry;
|
||||
|
||||
public $qry;
|
||||
public $dlsubrow;
|
||||
public $dlsubsubrow;
|
||||
public $mirror;
|
||||
|
||||
/**
|
||||
* download_shortcodes constructor
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->e107 = e107::getInstance();
|
||||
$this->postInfo = array();
|
||||
|
||||
}
|
||||
|
||||
function sc_download_breadcrumb($parm='')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$frm = e107::getForm();
|
||||
|
||||
global $dlrow;
|
||||
|
||||
|
||||
$breadcrumb = array();
|
||||
|
||||
switch ($this->qry['action'])
|
||||
{
|
||||
case 'mirror':
|
||||
$breadcrumb[] = array('text' => LAN_dl_18, 'url' => e_SELF);
|
||||
$breadcrumb[] = array('text' => $dlrow['download_category_name'], 'url' => e_SELF."?action=list&id=".$dlrow['download_category_id']);
|
||||
$breadcrumb[] = array('text' => $dlrow['download_name'], 'url' => e_SELF."?action=view&id=".$dlrow['download_id']);
|
||||
$breadcrumb[] = array('text' => LAN_dl_67, 'url' => null);
|
||||
$breadcrumb[] = array('text' => LAN_dl_18, 'url' => e_SELF);
|
||||
$breadcrumb[] = array('text' => $this->var['download_category_name'], 'url' => e_SELF."?action=list&id=".$this->var['download_category_id']);
|
||||
$breadcrumb[] = array('text' => $this->var['download_name'], 'url' => e_SELF."?action=view&id=".$this->var['download_id']);
|
||||
$breadcrumb[] = array('text' => LAN_dl_67, 'url' => null);
|
||||
break;
|
||||
|
||||
case 'maincats':
|
||||
$breadcrumb[] = array('text' => LAN_dl_18, 'url' => e_SELF);
|
||||
break;
|
||||
|
||||
default:
|
||||
$breadcrumb[] = array('text' => LAN_dl_18, 'url' => e_SELF);
|
||||
$breadcrumb[] = array('text' => $dlrow['download_category_name'], 'url' => e_SELF."?action=list&id=".$dlrow['download_category_id']);
|
||||
$breadcrumb[] = array('text' => $dlrow['download_name'], 'url' => null);
|
||||
$breadcrumb[] = array('text' => LAN_dl_18, 'url' => e_SELF);
|
||||
$breadcrumb[] = array('text' => $this->var['download_category_name'], 'url' => e_SELF."?action=list&id=".$this->var['download_category_id']);
|
||||
$breadcrumb[] = array('text' => $this->var['download_name'], 'url' => null);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -68,95 +67,109 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
// Category ************************************************************************************
|
||||
function sc_download_cat_main_name() {
|
||||
global $tp, $dlrow;
|
||||
return $tp->toHTML($dlrow['download_category_name'], FALSE, 'TITLE');
|
||||
function sc_download_cat_main_name()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
return $tp->toHTML($this->var['download_category_name'], FALSE, 'TITLE');
|
||||
}
|
||||
function sc_download_cat_main_description() {
|
||||
global $tp, $dlrow;
|
||||
return $tp->toHTML($dlrow['download_category_description'], TRUE, 'DESCRIPTION');
|
||||
|
||||
function sc_download_cat_main_description()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
return $tp->toHTML($this->var['download_category_description'], TRUE, 'DESCRIPTION');
|
||||
}
|
||||
function sc_download_cat_main_icon() {
|
||||
global $dlrow;
|
||||
|
||||
function sc_download_cat_main_icon()
|
||||
{
|
||||
// Pass count as 1 to force non-empty icon
|
||||
return $this->_sc_cat_icons($dlrow['download_category_icon'], 1, $dlrow['download_category_name']);
|
||||
return $this->_sc_cat_icons($this->var['download_category_icon'], 1, $this->var['download_category_name']);
|
||||
}
|
||||
|
||||
// Sub-Category ********************************************************************************
|
||||
function sc_download_cat_sub_name() {
|
||||
global $tp, $dlsubrow;
|
||||
if ($dlsubrow['d_count'])
|
||||
function sc_download_cat_sub_name()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
if ($this->dlsubrow['d_count'])
|
||||
{
|
||||
return "<a href='".e_PLUGIN."download/download.php?action=list&id=".$dlsubrow['download_category_id']."'>".$tp->toHTML($dlsubrow['download_category_name'], FALSE, 'TITLE')."</a>";
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?action=list&id=".$this->dlsubrow['download_category_id']."'>".$tp->toHTML($this->dlsubrow['download_category_name'], FALSE, 'TITLE')."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $tp->toHTML($dlsubrow['download_category_name'], FALSE, 'TITLE');
|
||||
return $tp->toHTML($this->dlsubrow['download_category_name'], FALSE, 'TITLE');
|
||||
}
|
||||
}
|
||||
function sc_download_cat_sub_description() {
|
||||
global $tp, $dlsubrow;
|
||||
return $tp->toHTML($dlsubrow['download_category_description'], TRUE, 'DESCRIPTION');
|
||||
|
||||
function sc_download_cat_sub_description()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
return $tp->toHTML($this->dlsubrow['download_category_description'], TRUE, 'DESCRIPTION');
|
||||
}
|
||||
function sc_download_cat_sub_icon() {
|
||||
global $dlsubrow;
|
||||
return $this->_sc_cat_icons($dlsubrow['download_category_icon'], $dlsubrow['d_count'], $dlsubrow['download_category_name']);
|
||||
|
||||
function sc_download_cat_sub_icon()
|
||||
{
|
||||
return $this->_sc_cat_icons($this->dlsubrow['download_category_icon'], $this->dlsubrow['d_count'], $this->dlsubrow['download_category_name']);
|
||||
}
|
||||
function sc_download_cat_sub_new_icon() {
|
||||
global $dlsubrow;
|
||||
return $this->_check_new_download($dlsubrow['d_last_subs']);
|
||||
|
||||
function sc_download_cat_sub_new_icon()
|
||||
{
|
||||
return $this->_check_new_download($this->dlsubrow['d_last_subs']);
|
||||
}
|
||||
function sc_download_cat_sub_count() {
|
||||
global $dlsubrow;
|
||||
return $dlsubrow['d_count'];
|
||||
|
||||
function sc_download_cat_sub_count()
|
||||
{
|
||||
return $this->dlsubrow['d_count'];
|
||||
}
|
||||
function sc_download_cat_sub_size() {
|
||||
global $e107, $dlsubrow;
|
||||
return $this->e107->parseMemorySize($dlsubrow['d_size']);
|
||||
|
||||
function sc_download_cat_sub_size()
|
||||
{
|
||||
return eHelper::parseMemorySize($this->dlsubrow['d_size']);
|
||||
}
|
||||
function sc_download_cat_sub_downloaded() {
|
||||
global $dlsubrow;
|
||||
return intval($dlsubrow['d_requests']);
|
||||
|
||||
function sc_download_cat_sub_downloaded()
|
||||
{
|
||||
return intval($this->dlsubrow['d_requests']);
|
||||
}
|
||||
|
||||
|
||||
// Sub-Sub-Category ****************************************************************************
|
||||
|
||||
|
||||
function sc_download_cat_subsub_name() {
|
||||
global $tp, $dlsubsubrow;
|
||||
if ($dlsubsubrow['d_count'])
|
||||
function sc_download_cat_subsub_name()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
if ($this->dlsubsubrow['d_count'])
|
||||
{
|
||||
return "<a href='".e_PLUGIN."download/download.php?action=list&id=".$dlsubsubrow['download_category_id']."'>".$tp->toHTML($dlsubsubrow['download_category_name'], FALSE, 'TITLE')."</a>";
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?action=list&id=".$this->dlsubsubrow['download_category_id']."'>".$tp->toHTML($this->dlsubsubrow['download_category_name'], FALSE, 'TITLE')."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $tp->toHTML($dlsubsubrow['download_category_name'], FALSE, 'TITLE');
|
||||
return $tp->toHTML($this->dlsubsubrow['download_category_name'], FALSE, 'TITLE');
|
||||
}
|
||||
}
|
||||
|
||||
function sc_download_cat_subsub_description() {
|
||||
global $tp, $dlsubsubrow;
|
||||
return $tp->toHTML($dlsubsubrow['download_category_description'], TRUE, 'DESCRIPTION');
|
||||
function sc_download_cat_subsub_description()
|
||||
{
|
||||
return e107::getParser()->toHTML($this->dlsubsubrow['download_category_description'], TRUE, 'DESCRIPTION');
|
||||
}
|
||||
|
||||
function sc_download_cat_subsub_icon() {
|
||||
global $dlsubsubrow;
|
||||
return $this->_sc_cat_icons($dlsubsubrow['download_category_icon'], $dlsubsubrow['d_count'], $dlsubsubrow['download_category_name']);
|
||||
function sc_download_cat_subsub_icon()
|
||||
{
|
||||
return $this->_sc_cat_icons($this->dlsubsubrow['download_category_icon'], $this->dlsubsubrow['d_count'], $this->dlsubsubrow['download_category_name']);
|
||||
}
|
||||
|
||||
function sc_download_cat_subsub_count() {
|
||||
global $dlsubsubrow;
|
||||
return $dlsubsubrow['d_count'];
|
||||
function sc_download_cat_subsub_count()
|
||||
{
|
||||
return $this->dlsubsubrow['d_count'];
|
||||
}
|
||||
|
||||
function sc_download_cat_subsub_size() {
|
||||
global $e107, $dlsubsubrow;
|
||||
return $this->e107->parseMemorySize($dlsubsubrow['d_size']);
|
||||
function sc_download_cat_subsub_size()
|
||||
{
|
||||
return eHelper::parseMemorySize($this->dlsubsubrow['d_size']);
|
||||
}
|
||||
|
||||
function sc_download_cat_subsub_downloaded() {
|
||||
global $dlsubsubrow;
|
||||
return intval($dlsubsubrow['d_requests']);
|
||||
function sc_download_cat_subsub_downloaded()
|
||||
{
|
||||
return intval($this->dlsubsubrow['d_requests']);
|
||||
}
|
||||
|
||||
|
||||
@@ -216,71 +229,79 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
|
||||
function sc_download_list_name()
|
||||
function sc_download_list_name($parm='')
|
||||
{
|
||||
global $dlrow,$tp,$pref,$parm;
|
||||
if ($parm == "nolink"){
|
||||
return $tp->toHTML($dlrow['download_name'],TRUE,'LINKTEXT');
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
if ($parm == "nolink")
|
||||
{
|
||||
return $tp->toHTML($this->var['download_name'],TRUE,'LINKTEXT');
|
||||
}
|
||||
if ($parm == "request"){
|
||||
|
||||
if ($parm == "request")
|
||||
{
|
||||
$agreetext = $tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'));
|
||||
if ($dlrow['download_mirror_type']){
|
||||
$text = ($pref['agree_flag'] ? "<a href='".e_PLUGIN."download/download.php?mirror.".$dlrow['download_id']."' onclick= \"return confirm('{$agreetext}');\">" : "<a href='".e_PLUGIN."download/download.php?mirror.".$dlrow['download_id']."' title='".LAN_dl_32."'>");
|
||||
}else{
|
||||
$text = ($pref['agree_flag'] ? "<a href='".e_BASE."request.php?".$dlrow['download_id']."' onclick= \"return confirm('{$agreetext}');\">" : "<a href='".e_BASE."request.php?".$dlrow['download_id']."' title='".LAN_dl_32."'>");
|
||||
|
||||
if ($this->var['download_mirror_type'])
|
||||
{
|
||||
$text = ($pref['agree_flag'] ? "<a href='".e_PLUGIN_ABS."download/download.php?mirror.".$this->var['download_id']."' onclick= \"return confirm('{$agreetext}');\">" : "<a href='".e_PLUGIN_ABS."download/download.php?mirror.".$this->var['download_id']."' title='".LAN_dl_32."'>");
|
||||
}
|
||||
$text .= $tp->toHTML($dlrow['download_name'], FALSE, 'TITLE')."</a>";
|
||||
else
|
||||
{
|
||||
$text = ($pref['agree_flag'] ? "<a href='".e_PLUGIN_ABS."download/request.php?".$this->var['download_id']."' onclick= \"return confirm('{$agreetext}');\">" : "<a href='".e_PLUGIN_ABS."download/request.php?".$this->var['download_id']."' title='".LAN_dl_32."'>");
|
||||
}
|
||||
|
||||
$text .= $tp->toHTML($this->var['download_name'], FALSE, 'TITLE')."</a>";
|
||||
|
||||
return $text;
|
||||
}
|
||||
return "<a href='".e_PLUGIN."download/download.php?action=view&id=".$dlrow['download_id']."'>".$tp->toHTML($dlrow['download_name'],TRUE,'LINKTEXT')."</a>";
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?action=view&id=".$this->var['download_id']."'>".$tp->toHTML($this->var['download_name'],TRUE,'LINKTEXT')."</a>";
|
||||
}
|
||||
|
||||
function sc_download_list_author()
|
||||
{
|
||||
global $dlrow;
|
||||
return $dlrow['download_author'];
|
||||
return $this->var['download_author'];
|
||||
}
|
||||
|
||||
function sc_download_list_requested()
|
||||
{
|
||||
global $dlrow;
|
||||
return $dlrow['download_requested'];
|
||||
return $this->var['download_requested'];
|
||||
}
|
||||
|
||||
function sc_download_list_newicon()
|
||||
{
|
||||
global $dlrow;
|
||||
return (USER && $dlrow['download_datestamp'] > USERLV ? "<img src='".IMAGE_NEW."' alt='*' style='vertical-align:middle' />" : "");
|
||||
return (USER && $this->var['download_datestamp'] > USERLV ? "<img src='".IMAGE_NEW."' alt='*' style='vertical-align:middle' />" : "");
|
||||
}
|
||||
|
||||
function sc_download_list_recenticon()
|
||||
{
|
||||
global $dlrow, $pref;
|
||||
$pref = e107::getPref();
|
||||
// convert "recent_download_days" to seconds
|
||||
return ($dlrow['download_datestamp'] > time()-($pref['recent_download_days']*86400) ? '<img src="'.IMAGE_NEW.'" alt="" style="vertical-align:middle" />' : '');
|
||||
return ($this->var['download_datestamp'] > time()-($pref['recent_download_days']*86400) ? '<img src="'.IMAGE_NEW.'" alt="" style="vertical-align:middle" />' : '');
|
||||
}
|
||||
|
||||
function sc_download_list_filesize()
|
||||
{
|
||||
global $dlrow, $e107;
|
||||
return $e107->parseMemorySize($dlrow['download_filesize']);
|
||||
return eHelper::parseMemorySize($this->var['download_filesize']);
|
||||
}
|
||||
|
||||
function sc_download_list_datestamp()
|
||||
{
|
||||
global $dlrow;
|
||||
|
||||
$tp = e107::getParser();
|
||||
return $tp->toDate($dlrow['download_datestamp'], "short");
|
||||
return $tp->toDate($this->var['download_datestamp'], "short");
|
||||
}
|
||||
|
||||
function sc_download_list_thumb()
|
||||
function sc_download_list_thumb($parm='')
|
||||
{
|
||||
global $dlrow,$parm;
|
||||
$tp = e107::getParser();
|
||||
|
||||
$img = ($dlrow['download_thumb']) ? "<img src='".$tp->replaceConstants($dlrow['download_thumb'])."' alt='*' style='".DL_IMAGESTYLE."' />" : "";
|
||||
if ($parm == "link" && $dlrow['download_thumb']){
|
||||
return "<a href='".e_PLUGIN."download/download.php?action=view&id=".$dlrow['download_id']."'>".$img."</a>";
|
||||
$img = ($this->var['download_thumb']) ? "<img class='download-thumb' src='".$tp->replaceConstants($this->var['download_thumb'])."' alt='*' />" : "";
|
||||
|
||||
if ($parm == "link" && $this->var['download_thumb'])
|
||||
{
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?action=view&id=".$this->var['download_id']."'>".$img."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -290,50 +311,44 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
function sc_download_list_id()
|
||||
{
|
||||
global $dlrow;
|
||||
return $dlrow['download_id'];
|
||||
return $this->var['download_id'];
|
||||
}
|
||||
|
||||
function sc_download_list_rating()
|
||||
{
|
||||
global $dlrow;
|
||||
|
||||
return e107::getForm()->rate("download", $dlrow['download_id']);
|
||||
|
||||
|
||||
$rater = new rater();
|
||||
$ratearray = $rater->getrating("download", $dlrow['download_id']);
|
||||
if (!$ratearray[0]) {
|
||||
return LAN_dl_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ($ratearray[2] ? "{$ratearray[1]}.{$ratearray[2]}/{$ratearray[0]}" : "{$ratearray[1]}/{$ratearray[0]}");
|
||||
}
|
||||
return e107::getForm()->rate("download", $this->var['download_id']);
|
||||
}
|
||||
|
||||
function sc_download_list_link()
|
||||
function sc_download_list_link($parm='')
|
||||
{
|
||||
global $tp, $dlrow, $pref, $parm;
|
||||
$agreetext = $tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'));
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
$img = "<img src='".IMAGE_DOWNLOAD."' alt='".LAN_dl_32."' title='".LAN_dl_32."' />";
|
||||
if ($dlrow['download_mirror_type'])
|
||||
$agreetext = $tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'));
|
||||
|
||||
$img = "<img src='".IMAGE_DOWNLOAD."' alt='".LAN_dl_32."' title='".LAN_dl_32."' />";
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$img = '<i class="icon-download"></i>';
|
||||
}
|
||||
|
||||
if ($this->var['download_mirror_type'])
|
||||
{
|
||||
return "<a href='".e_PLUGIN."download/download.php?mirror.".$dlrow['download_id']."'>{$img}</a>";
|
||||
return "<a class='e-tip' title='".LAN_dl_32."' href='".e_PLUGIN_ABS."download/download.php?mirror.".$this->var['download_id']."'>{$img}</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return ($pref['agree_flag'] ? "<a href='".e_BASE."request.php?".$dlrow['download_id']."' onclick= \"return confirm('{$agreetext}');\">{$img}</a>" : "<a href='".e_BASE."request.php?".$dlrow['download_id']."' >{$img}</a>");
|
||||
return ($pref['agree_flag'] ? "<a class='e-tip' title='".LAN_dl_32."' href='".e_PLUGIN_ABS."download/request.php?".$this->var['download_id']."' onclick= \"return confirm('{$agreetext}');\">{$img}</a>" : "<a class='e-tip' title='".LAN_dl_32."' href='".e_PLUGIN_ABS."download/request.php?".$this->var['download_id']."' >{$img}</a>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function sc_download_list_icon()
|
||||
function sc_download_list_icon($parm='')
|
||||
{
|
||||
global $dlrow,$parm;
|
||||
if ($parm == "link"){
|
||||
return "<a href='".e_PLUGIN."download/download.php?action=view&id=".$dlrow['download_id']."' >".$img."</a>";
|
||||
if ($parm == "link")
|
||||
{
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?action=view&id=".$this->var['download_id']."' >".$img."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -342,16 +357,14 @@ class download_shortcodes extends e_shortcode
|
||||
return;
|
||||
}
|
||||
|
||||
function sc_download_list_imagefull()
|
||||
function sc_download_list_imagefull($parm='')
|
||||
{
|
||||
global $dlrow,$parm;
|
||||
$tp = e107::getParser();
|
||||
|
||||
$img = ($this->var['download_image']) ? "<img class='download-image dl_image' src='".e107::getParser()->replaceConstants($this->var['download_image'])."' alt='' />" : "";
|
||||
|
||||
$img = ($dlrow['download_image']) ? "<img class='dl_image' src='".$tp->replaceConstants($dlrow['download_image'])."' alt='' style='".DL_IMAGESTYLE."' />" : "";
|
||||
|
||||
if($parm == "link" && $dlrow['download_image'])
|
||||
if($parm == "link" && $this->var['download_image'])
|
||||
{
|
||||
return "<a href='".e_BASE."download.php?action=view&id=".$dlrow['download_id']."'>".$img."</a>";
|
||||
return "<a href='".e_BASE."download.php?action=view&id=".$this->var['download_id']."'>".$img."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -362,16 +375,18 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
function sc_download_list_nextprev()
|
||||
{
|
||||
global $nextprev_parms,$tp;
|
||||
return $tp->parseTemplate("{NEXTPREV={$nextprev_parms}}");
|
||||
global $nextprev_parms;
|
||||
return e107::getParser()->parseTemplate("{NEXTPREV={$nextprev_parms}}");
|
||||
}
|
||||
|
||||
function sc_download_list_total_amount() {
|
||||
function sc_download_list_total_amount()
|
||||
{
|
||||
global $dltdownloads;
|
||||
return intval($dltdownloads)." ".LAN_dl_16;
|
||||
}
|
||||
|
||||
function sc_download_list_total_files() {
|
||||
function sc_download_list_total_files()
|
||||
{
|
||||
global $dlft;
|
||||
return intval($dlft)." ".LAN_dl_17;
|
||||
}
|
||||
@@ -384,22 +399,23 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
function sc_download_view_id()
|
||||
{
|
||||
global $dlrow;
|
||||
return $dlrow['download_id'];
|
||||
return $this->var['download_id'];
|
||||
}
|
||||
|
||||
function sc_download_admin_edit()
|
||||
{
|
||||
global $dlrow;
|
||||
return (ADMIN && getperms('6')) ? "<a href='".e_ADMIN."download.php?create.edit.".$dlrow['download_id']."' title='edit'><img src='".e_IMAGE."generic/lite/edit.png' alt='*' style='padding:0px;border:0px' /></a>" : "";
|
||||
return (ADMIN && getperms('6')) ? "<a href='".e_ADMIN."download.php?create.edit.".$this->var['download_id']."' title='edit'><img src='".e_IMAGE."generic/lite/edit.png' alt='*' style='padding:0px;border:0px' /></a>" : "";
|
||||
}
|
||||
|
||||
function sc_download_category()
|
||||
{
|
||||
global $dlrow;
|
||||
return $dlrow['download_category_name'];
|
||||
return $this->var['download_category_name'];
|
||||
}
|
||||
|
||||
function sc_download_category_description()
|
||||
{
|
||||
global $tp,$dl,$parm;
|
||||
|
||||
$text = $tp -> toHTML($dl['download_category_description'], TRUE,'DESCRIPTION');
|
||||
if ($parm){
|
||||
return substr($text,0,$parm);
|
||||
@@ -407,128 +423,164 @@ class download_shortcodes extends e_shortcode
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
function sc_download_view_name()
|
||||
function sc_download_view_name($parm='')
|
||||
{
|
||||
global $dlrow,$parm;
|
||||
$link['view'] = "<a href='".e_PLUGIN."download/download.php?action=view&id=".$dlrow['download_id']."'>".$dlrow['download_name']."</a>";
|
||||
$link['request'] = "<a href='".e_BASE."request.php?".$dlrow['download_id']."' title='".LAN_dl_46."'>".$dlrow['download_name']."</a>";
|
||||
if ($parm){
|
||||
return $link[$parm];
|
||||
$tp = e107::getParser();
|
||||
|
||||
$link['view'] = "<a href='".e_PLUGIN_ABS."download/download.php?action=view&id=".$this->var['download_id']."'>".$this->var['download_name']."</a>";
|
||||
$link['request'] = "<a href='".e_PLUGIN_ABS."download/request.php?".$this->var['download_id']."' title='".LAN_dl_46."'>".$this->var['download_name']."</a>";
|
||||
|
||||
if ($parm)
|
||||
{
|
||||
return $tp->toHTML($link[$parm],true, 'TITLE');
|
||||
}
|
||||
return $dlrow['download_name'];
|
||||
|
||||
return $this->var['download_name'];
|
||||
}
|
||||
|
||||
function sc_download_view_name_linked()
|
||||
{
|
||||
global $pref,$dl,$tp;
|
||||
if ($pref['agree_flag'] == 1) {
|
||||
return "<a href='".e_BASE."request.php?".$dl['download_id']."' onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'))."');\" title='".LAN_dl_46."'>".$dl['download_name']."</a>";
|
||||
} else {
|
||||
return "<a href='".e_BASE."request.php?".$dl['download_id']."' title='".LAN_dl_46."'>".$dl['download_name']."</a>";
|
||||
global $dl;
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
if ($pref['agree_flag'] == 1)
|
||||
{
|
||||
return "<a href='".e_PLUGIN_ABS."download/request.php?".$dl['download_id']."' onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'))."');\" title='".LAN_dl_46."'>".$dl['download_name']."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "<a href='".e_PLUGIN_ABS."download/request.php?".$dl['download_id']."' title='".LAN_dl_46."'>".$dl['download_name']."</a>";
|
||||
}
|
||||
}
|
||||
|
||||
function sc_download_view_author()
|
||||
{
|
||||
global $dlrow;
|
||||
return ($dlrow['download_author'] ? $dlrow['download_author'] : "");
|
||||
return ($this->var['download_author'] ? $this->var['download_author'] : "");
|
||||
}
|
||||
|
||||
function sc_download_view_authoremail()
|
||||
{
|
||||
global $tp,$dlrow;
|
||||
return ($dlrow['download_author_email']) ? $tp -> toHTML($dlrow['download_author_email'], TRUE, 'LINKTEXT') : "";
|
||||
return ($this->var['download_author_email']) ? e107::getParser()->toHTML($this->var['download_author_email'], TRUE, 'LINKTEXT') : "";
|
||||
}
|
||||
|
||||
function sc_download_view_authorwebsite()
|
||||
{
|
||||
global $tp,$dlrow;
|
||||
return ($dlrow['download_author_website']) ? $tp -> toHTML($dlrow['download_author_website'], TRUE,'LINKTEXT') : "";
|
||||
return ($this->var['download_author_website']) ? e107::getParser()->toHTML($this->var['download_author_website'], TRUE,'LINKTEXT') : "";
|
||||
}
|
||||
function sc_download_view_description()
|
||||
|
||||
function sc_download_view_description($parm='')
|
||||
{
|
||||
global $tp,$dlrow,$parm;
|
||||
$maxlen = ($parm ? intval($parm) : 0);
|
||||
$text = ($dlrow['download_description'] ? $tp->toHTML($dlrow['download_description'], TRUE, 'DESCRIPTION') : "");
|
||||
if ($maxlen){
|
||||
$text = ($this->var['download_description'] ? e107::getParser()->toHTML($this->var['download_description'], TRUE, 'DESCRIPTION') : "");
|
||||
|
||||
if ($maxlen)
|
||||
{
|
||||
return substr($text, 0, $maxlen);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
return $text;
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
function sc_download_view_date()
|
||||
|
||||
function sc_download_view_date($parm='')
|
||||
{
|
||||
global $gen,$dlrow,$parm;
|
||||
$tp = e107::getParser();
|
||||
return ($dlrow['download_datestamp']) ? $tp->toDate($dlrow['download_datestamp'], $parm) : "";
|
||||
return ($this->var['download_datestamp']) ? e107::getParser()->toDate($this->var['download_datestamp'], $parm) : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @Deprecated DOWNLOAD_VIEW_DATE should be used instead.
|
||||
*/
|
||||
function sc_download_view_date_short()
|
||||
{
|
||||
// deprecated: DOWNLOAD_VIEW_DATE should be used instead.
|
||||
global $gen,$dlrow;
|
||||
return ($dlrow['download_datestamp']) ? $gen->convert_date($dlrow['download_datestamp'], "short") : "";
|
||||
return $this->sc_download_view_date('short');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Deprecated DOWNLOAD_VIEW_DATE should be used instead.
|
||||
*/
|
||||
function sc_download_view_date_long()
|
||||
{
|
||||
// deprecated: DOWNLOAD_VIEW_DATE should be used instead.
|
||||
global $gen,$dlrow;
|
||||
return ($dlrow['download_datestamp']) ? $gen->convert_date($dlrow['download_datestamp'], "long") : "";
|
||||
return $this->sc_download_view_date('long');
|
||||
}
|
||||
|
||||
function sc_download_view_image()
|
||||
{
|
||||
global $dlrow;
|
||||
$tp = e107::getParser();
|
||||
|
||||
if ($dlrow['download_thumb']) {
|
||||
return ($dlrow['download_image'] ? "<a href='".e_BASE."request.php?download.".$dlrow['download_id']."'><img class='dl_image' src='".$tp->replaceConstants($dlrow['download_thumb'])."' alt='*' style='".DL_IMAGESTYLE."' /></a>" : "<img class='dl_image' src='".$tp->replaceConstants($dlrow['download_thumb'])."' alt='*' style='".DL_IMAGESTYLE."' />");
|
||||
if ($this->var['download_thumb'])
|
||||
{
|
||||
return ($this->var['download_image'] ? "<a href='".e_PLUGIN_ABS."download/request.php?download.".$this->var['download_id']."'><img class='download-image dl_image' src='".$tp->replaceConstants($this->var['download_thumb'])."' alt='*' /></a>" : "<img class='download-image dl_image' src='".$tp->replaceConstants($this->var['download_thumb'])."' alt='*' />");
|
||||
}
|
||||
else if ($dlrow['download_image']) {
|
||||
return "<a href='".e_BASE."request.php?download.".$dlrow['download_id']."'>".LAN_dl_40."</a>";
|
||||
elseif ($this->var['download_image'])
|
||||
{
|
||||
return "<a href='".e_PLUGIN_ABS."download/request.php?download.".$this->var['download_id']."'>".LAN_dl_40."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return LAN_dl_75;
|
||||
}
|
||||
}
|
||||
|
||||
function sc_download_view_imagefull()
|
||||
{
|
||||
global $dlrow;
|
||||
$tp = e107::getParser();
|
||||
return ($dlrow['download_image']) ? "<img class='dl_image' src='".$tp->replaceConstants($dlrow['download_image'])."' alt='*' style='".DL_IMAGESTYLE."' />" : "";
|
||||
return ($this->var['download_image']) ? "<img class='download-image dl_image' src='".$tp->replaceConstants($this->var['download_image'])."' alt='*' />" : "";
|
||||
}
|
||||
function sc_download_view_link()
|
||||
{
|
||||
global $pref,$dlrow,$tp;
|
||||
$click = "";
|
||||
if ($pref['agree_flag'] == 1) {
|
||||
$click = " onclick='return confirm(\"".$tp->toJS($tp->toHTML($pref['agree_text'],true,'emotes, no_tags'))."\")'";
|
||||
}
|
||||
$dnld_link = "<a href='".e_BASE."request.php?".$dlrow['download_id']."'{$click}>";
|
||||
if ($dlrow['download_mirror'])
|
||||
{
|
||||
if ($dlrow['download_mirror_type'])
|
||||
{
|
||||
return "<a href='".e_PLUGIN."download/download.php?mirror.".$dlrow['download_id']."'>".LAN_dl_66."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $dnld_link."<img src='".IMAGE_DOWNLOAD."' alt='*' /></a>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return $dnld_link."<img src='".IMAGE_DOWNLOAD."' alt='*' /></a>";
|
||||
}
|
||||
}
|
||||
function sc_download_view_filesize()
|
||||
{
|
||||
global $dlrow, $e107;
|
||||
return ($dlrow['download_filesize']) ? $e107->parseMemorySize($dlrow['download_filesize']) : "";
|
||||
}
|
||||
function sc_download_view_rating()
|
||||
{
|
||||
global $dlrow;
|
||||
|
||||
function sc_download_view_link()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
$click = "";
|
||||
|
||||
$img = "<img src='".IMAGE_DOWNLOAD."' alt='".LAN_dl_32."' title='".LAN_dl_32."' />";
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$img = '<i class="icon-download"></i>';
|
||||
}
|
||||
|
||||
if ($pref['agree_flag'] == 1)
|
||||
{
|
||||
$click = " onclick='return confirm(\"".$tp->toJS($tp->toHTML($pref['agree_text'],true,'emotes, no_tags'))."\")'";
|
||||
}
|
||||
$dnld_link = "<a href='".e_PLUGIN_ABS."download/request.php?".$this->var['download_id']."'{$click}>";
|
||||
|
||||
if ($this->var['download_mirror'])
|
||||
{
|
||||
if ($this->var['download_mirror_type'])
|
||||
{
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?mirror.".$this->var['download_id']."'>".LAN_dl_66."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $dnld_link.$img."</a>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return $dnld_link.$img."</a>";
|
||||
}
|
||||
}
|
||||
|
||||
function sc_download_view_filesize()
|
||||
{
|
||||
return ($this->var['download_filesize']) ? eHelper::parseMemorySize($this->var['download_filesize']) : "";
|
||||
}
|
||||
|
||||
function sc_download_view_rating()
|
||||
{
|
||||
|
||||
$frm = e107::getForm();
|
||||
$options = array('label'=>' ','template'=>'RATE|VOTES|STATUS');
|
||||
return $frm->rate("download", $dlrow['download_id'],$options);
|
||||
return $frm->rate("download", $this->var['download_id'], $options);
|
||||
|
||||
/*
|
||||
require_once(e_HANDLER."rate_class.php");
|
||||
$rater = new rater;
|
||||
|
||||
@@ -536,7 +588,7 @@ class download_shortcodes extends e_shortcode
|
||||
<table style='width:100%'>
|
||||
<tr>
|
||||
<td style='width:50%'>";
|
||||
if ($ratearray = $rater->getrating("download", $dlrow['download_id'])) {
|
||||
if ($ratearray = $rater->getrating("download", $this->var['download_id'])) {
|
||||
for($c = 1; $c <= $ratearray[1]; $c++) {
|
||||
$text .= "<img src='".e_IMAGE."rate/star.png' alt='*' />";
|
||||
}
|
||||
@@ -552,8 +604,8 @@ class download_shortcodes extends e_shortcode
|
||||
$text .= LAN_dl_13;
|
||||
}
|
||||
$text .= "</td><td style='width:50%; text-align:right'>";
|
||||
if (!$rater->checkrated("download", $dlrow['download_id']) && USER) {
|
||||
$text .= $rater->rateselect(" <b>".LAN_dl_14, "download", $dlrow['download_id'])."</b>";
|
||||
if (!$rater->checkrated("download", $this->var['download_id']) && USER) {
|
||||
$text .= $rater->rateselect(" <b>".LAN_dl_14, "download", $this->var['download_id'])."</b>";
|
||||
}
|
||||
else if (!USER) {
|
||||
$text .= " ";
|
||||
@@ -562,85 +614,86 @@ class download_shortcodes extends e_shortcode
|
||||
}
|
||||
$text .= "</td></tr></table>";
|
||||
return $text;
|
||||
}
|
||||
function sc_download_report_link()
|
||||
{
|
||||
global $dlrow,$pref;
|
||||
return (check_class($pref['download_reportbroken'])) ? "<a href='".e_PLUGIN."download/download.php?action=report&id=".$dlrow['download_id']."'>".LAN_dl_45."</a>" : "";
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function sc_download_report_link()
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
return (check_class($pref['download_reportbroken'])) ? "<a href='".e_PLUGIN_ABS."download/download.php?action=report&id=".$this->var['download_id']."'>".LAN_dl_45."</a>" : "";
|
||||
}
|
||||
|
||||
function sc_download_view_caption()
|
||||
{
|
||||
global $dlrow;
|
||||
$text = $dlrow['download_category_name'];
|
||||
$text .= ($dlrow['download_category_description']) ? " [ ".$dlrow['download_category_description']." ]" : "";
|
||||
return $text;
|
||||
}
|
||||
function sc_download_view_caption()
|
||||
{
|
||||
$text = $this->var['download_category_name'];
|
||||
$text .= ($this->var['download_category_description']) ? " [ ".$this->var['download_category_description']." ]" : "";
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
// Mirror **************************************************************************************
|
||||
|
||||
function sc_download_mirror_request()
|
||||
{
|
||||
global $dlrow;
|
||||
return $dlrow['download_name'];
|
||||
return $this->var['download_name'];
|
||||
}
|
||||
|
||||
function sc_download_mirror_request_icon()
|
||||
{
|
||||
global $dlrow;
|
||||
$tp = e107::getParser();
|
||||
return ($dlrow['download_thumb'] ? "<img src='".$tp->replaceConstants($dlrow['download_thumb'])."' alt='*'/>" : "");
|
||||
return ($this->var['download_thumb'] ? "<img src='".e107::getParser()->replaceConstants($this->var['download_thumb'])."' alt='*'/>" : "");
|
||||
}
|
||||
|
||||
function sc_download_mirror_name()
|
||||
{
|
||||
global $dlmirror;
|
||||
return "<a href='{$dlmirror['mirror_url']}' rel='external'>".$dlmirror['mirror_name']."</a>";
|
||||
return "<a href='{$this->mirror['dlmirror']['mirror_url']}' rel='external'>".$this->mirror['dlmirror']['mirror_name']."</a>";
|
||||
}
|
||||
|
||||
function sc_download_mirror_image()
|
||||
{
|
||||
global $dlrow, $dlmirror;
|
||||
$tp = e107::getParser();
|
||||
return ($dlmirror['mirror_image'] ? "<a href='{$dlmirror['mirror_url']}' rel='external'><img src='".$tp->replaceConstants($dlmirror['mirror_image'])."' alt='*'/></a>" : "");
|
||||
return ($this->mirror['dlmirror']['mirror_image'] ? "<a href='{$this->mirror['dlmirror']['mirror_url']}' rel='external'><img src='".$tp->replaceConstants($this->mirror['dlmirror']['mirror_image'])."' alt='*'/></a>" : "");
|
||||
}
|
||||
|
||||
function sc_download_mirror_location() {
|
||||
global $dlmirror;
|
||||
return ($dlmirror['mirror_location'] ? $dlmirror['mirror_location'] : "");
|
||||
function sc_download_mirror_location()
|
||||
{
|
||||
return ($this->mirror['dlmirror']['mirror_location'] ? $this->mirror['dlmirror']['mirror_location'] : "");
|
||||
}
|
||||
|
||||
function sc_download_mirror_description()
|
||||
{
|
||||
global $dlmirror,$tp;
|
||||
return ($dlmirror['mirror_description'] ? $tp->toHTML($dlmirror['mirror_description'], TRUE) : "");
|
||||
return ($this->mirror['dlmirror']['mirror_description'] ? e107::getParser()->toHTML($this->mirror['dlmirror']['mirror_description'], TRUE) : "");
|
||||
}
|
||||
|
||||
function sc_download_mirror_filesize()
|
||||
{
|
||||
global $e107, $dlmirrorfile;
|
||||
return $e107->parseMemorySize($dlmirrorfile[3]);
|
||||
return eHelper::parseMemorySize($this->mirror['dlmirrorfile'][3]);
|
||||
}
|
||||
|
||||
function sc_download_mirror_link()
|
||||
{
|
||||
global $dlrow, $dlmirrorfile, $tp, $pref;
|
||||
$click = " onclick='return confirm(\"".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'))."\")'";
|
||||
return "<a href='".e_PLUGIN."download/download.php?mirror.{$dlrow['download_id']}.{$dlmirrorfile[0]}' title='".LAN_dl_32."'{$click}>
|
||||
<img src='".IMAGE_DOWNLOAD."' alt='*' title='".LAN_dl_32."' /></a>";
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
$click = " onclick='return confirm(\"".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'))."\")'";
|
||||
|
||||
$img = "<img src='".IMAGE_DOWNLOAD."' alt='".LAN_dl_32."' title='".LAN_dl_32."' />";
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$img = '<i class="icon-download"></i>';
|
||||
}
|
||||
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?mirror.{$this->var['download_id']}.{$this->mirror['dlmirrorfile'][0]}' title='".LAN_dl_32."'{$click}>".$img."</a>";
|
||||
}
|
||||
|
||||
function sc_download_mirror_requests()
|
||||
{
|
||||
global $dlmirrorfile;
|
||||
return (ADMIN ? LAN_dl_73.$dlmirrorfile[2] : "");
|
||||
return (ADMIN ? LAN_dl_73.$this->mirror['dlmirrorfile'][2] : "");
|
||||
}
|
||||
|
||||
function sc_download_total_mirror_requests()
|
||||
{
|
||||
global $dlmirror;
|
||||
return (ADMIN ? LAN_dl_74.$dlmirror['mirror_count'] : "");
|
||||
return (ADMIN ? LAN_dl_74.$this->mirror['dlmirror']['mirror_count'] : "");
|
||||
}
|
||||
|
||||
|
||||
@@ -648,26 +701,26 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
function sc_download_view_author_lan()
|
||||
{
|
||||
global $dlrow;
|
||||
return ($dlrow['download_author']) ? LAN_dl_24 : "";
|
||||
|
||||
return ($this->var['download_author']) ? LAN_dl_24 : "";
|
||||
}
|
||||
|
||||
function sc_download_view_authoremail_lan()
|
||||
{
|
||||
global $dlrow;
|
||||
return ($dlrow['download_author_email']) ? LAN_dl_30 : "";
|
||||
|
||||
return ($this->var['download_author_email']) ? LAN_dl_30 : "";
|
||||
}
|
||||
|
||||
function sc_download_view_authorwebsite_lan()
|
||||
{
|
||||
global $dlrow;
|
||||
return ($dlrow['download_author_website']) ? LAN_dl_31 : "";
|
||||
|
||||
return ($this->var['download_author_website']) ? LAN_dl_31 : "";
|
||||
}
|
||||
|
||||
function sc_download_view_date_lan()
|
||||
{
|
||||
global $dlrow;
|
||||
return ($dlrow['download_datestamp']) ? LAN_dl_22 : "";
|
||||
|
||||
return ($this->var['download_datestamp']) ? LAN_dl_22 : "";
|
||||
}
|
||||
|
||||
function sc_download_view_image_lan()
|
||||
@@ -677,8 +730,8 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
function sc_download_view_requested()
|
||||
{
|
||||
global $dlrow;
|
||||
return $dlrow['download_requested'];
|
||||
|
||||
return $this->var['download_requested'];
|
||||
}
|
||||
|
||||
function sc_download_view_rating_lan()
|
||||
@@ -711,33 +764,43 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
function sc_download_view_prev()
|
||||
{
|
||||
global $dlrow,$sql;
|
||||
$dlrow_id = intval($dlrow['download_id']);
|
||||
if ($sql->db_Select("download", "*", "download_category='".intval($dlrow['download_category_id'])."' AND download_id < {$dlrow_id} AND download_active > 0 && download_visible IN (".USERCLASS_LIST.") ORDER BY download_datestamp DESC LIMIT 1")) {
|
||||
$dlrowrow = $sql->db_Fetch();
|
||||
return "<a href='".e_PLUGIN."download/download.php?action=view&id=".$dlrowrow['download_id']."'><< ".LAN_dl_33." [".$dlrowrow['download_name']."]</a>\n";
|
||||
} else {
|
||||
$sql = e107::getDb();
|
||||
|
||||
$dlrow_id = intval($this->var['download_id']);
|
||||
|
||||
if ($sql->select("download", "*", "download_category='".intval($this->var['download_category_id'])."' AND download_id < {$dlrow_id} AND download_active > 0 && download_visible IN (".USERCLASS_LIST.") ORDER BY download_datestamp DESC LIMIT 1"))
|
||||
{
|
||||
$dlrowrow = $sql->fetch();
|
||||
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?action=view&id=".$dlrowrow['download_id']."'><< ".LAN_dl_33." [".$dlrowrow['download_name']."]</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
|
||||
function sc_download_view_next()
|
||||
{
|
||||
global $dlrow,$sql;
|
||||
$dlrow_id = intval($dlrow['download_id']);
|
||||
if ($sql->db_Select("download", "*", "download_category='".intval($dlrow['download_category_id'])."' AND download_id > {$dlrow_id} AND download_active > 0 && download_visible IN (".USERCLASS_LIST.") ORDER BY download_datestamp ASC LIMIT 1")) {
|
||||
$dlrowrow = $sql->db_Fetch();
|
||||
function sc_download_view_next()
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$dlrow_id = intval($this->var['download_id']);
|
||||
|
||||
if ($sql->select("download", "*", "download_category='".intval($this->var['download_category_id'])."' AND download_id > {$dlrow_id} AND download_active > 0 && download_visible IN (".USERCLASS_LIST.") ORDER BY download_datestamp ASC LIMIT 1"))
|
||||
{
|
||||
$dlrowrow = $sql->fetch();
|
||||
extract($dlrowrow);
|
||||
return "<a href='".e_PLUGIN."download/download.php?action=view&id=".$dlrowrow['download_id']."'>[".$dlrowrow['download_name']."] ".LAN_dl_34." >></a>\n";
|
||||
} else {
|
||||
|
||||
return "<a href='".e_PLUGIN_ABS."download/download.php?action=view&id=".$dlrowrow['download_id']."'>[".$dlrowrow['download_name']."] ".LAN_dl_34." >></a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function sc_download_back_to_list()
|
||||
{
|
||||
global $dlrow;
|
||||
return "<a class='btn' href='".e_PLUGIN."download/download.php?action=list&id=".$dlrow['download_category']."'>".LAN_dl_35."</a>";
|
||||
return "<a class='btn' href='".e_PLUGIN_ABS."download/download.php?action=list&id=".$this->var['download_category']."'>".LAN_dl_35."</a>";
|
||||
}
|
||||
|
||||
function sc_download_back_to_category_list()
|
||||
|
Reference in New Issue
Block a user