mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 18:30:53 +02:00
* A few bug fixes and some code re-org
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/download.php,v $
|
||||
| $Revision: 1.7 $
|
||||
| $Date: 2009-05-04 20:09:45 $
|
||||
| $Revision: 1.8 $
|
||||
| $Date: 2009-07-14 23:19:22 $
|
||||
| $Author: bugrain $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@@ -268,11 +268,11 @@ if ($action == "list")
|
||||
$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);
|
||||
$dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18=>e_SELF, $type, DOWLAN_54));
|
||||
$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
|
||||
$text = ""; // If other files, show in a separate block
|
||||
$dl_title = ""; // Cancel title once displayed
|
||||
} // End of subcategory display
|
||||
|
||||
// Now display individual downloads
|
||||
|
@@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/adminDownload_class.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2009-06-24 22:19:27 $
|
||||
| $Author: e107coders $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-07-14 23:14:41 $
|
||||
| $Author: bugrain $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -111,7 +111,8 @@ class adminDownload extends download
|
||||
<td>
|
||||
";
|
||||
$text .= $this->_getConditionList('download_filter[date_condition]', $this->filterFields['date_condition']);
|
||||
// $text .= $eform->datepicker('download_filter[date]', $this->filterFields['date']);
|
||||
//TODO $text .= $eform->datepicker('download_filter[date]', $this->filterFields['date']);
|
||||
$text .= "//TODO";
|
||||
$text .= "
|
||||
</td>
|
||||
<td>Status</td>
|
||||
@@ -288,7 +289,7 @@ class adminDownload extends download
|
||||
|
||||
while ($row = $sql->db_Fetch())
|
||||
{
|
||||
$rowStyle = ($rowStyle == "odd") ? "even" : "odd";
|
||||
$rowStyle = ($rowStyle == "odd") ? "even" : "odd";
|
||||
$text .= "<tr class='{$rowStyle}'><td>".$row['download_id']."</td>";
|
||||
|
||||
// Display Chosen options
|
||||
@@ -672,6 +673,14 @@ class adminDownload extends download
|
||||
$text .= $eform->bbarea('download_description',$download_description);
|
||||
$text .= " </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Activation between
|
||||
</td>
|
||||
<td>
|
||||
// TODO
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:20%'>".DOWLAN_19."</td>
|
||||
<td style='width:80%'>
|
||||
@@ -1271,9 +1280,9 @@ class adminDownload extends download
|
||||
$preset = $pst->read_preset("admin_dl_cat"); // read preset values into array
|
||||
extract($preset);
|
||||
|
||||
$frm_action = (isset($_POST['add_category'])) ? e_SELF."?cat" : e_SELF."?".e_QUERY;
|
||||
$eform_action = (isset($_POST['add_category'])) ? e_SELF."?cat" : e_SELF."?".e_QUERY;
|
||||
$text = "<div style='text-align:center'>
|
||||
<form method='post' action='{$frm_action}' id='dlform'>
|
||||
<form method='post' action='{$eform_action}' id='dlform'>
|
||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
||||
<colgroup>
|
||||
<col style='width:30%'/>
|
||||
@@ -1351,6 +1360,155 @@ class adminDownload extends download
|
||||
$ns->tablerender(DOWLAN_39, $text);
|
||||
}
|
||||
|
||||
function show_options() {
|
||||
global $pref, $ns;
|
||||
|
||||
require_once(e_HANDLER."form_handler.php");
|
||||
$eform = new e_form(true); //enable inner tabindex counter
|
||||
|
||||
$agree_flag = $pref['agree_flag'];
|
||||
$agree_text = $pref['agree_text'];
|
||||
$c = $pref['download_php'] ? " checked = 'checked' " : "";
|
||||
$sacc = (varset($pref['download_incinfo'],0) == '1') ? " checked = 'checked' " : "";
|
||||
$order_options = array(
|
||||
"download_id" => "Id No.",
|
||||
"download_datestamp" => LAN_DATE,
|
||||
"download_requested" => ADLAN_24,
|
||||
"download_name" => DOWLAN_59,
|
||||
"download_author" => DOWLAN_15
|
||||
);
|
||||
$sort_options = array(
|
||||
"ASC" => DOWLAN_62,
|
||||
"DESC" => DOWLAN_63
|
||||
);
|
||||
|
||||
$text = "
|
||||
<div class='admintabs' id='tab-container'>
|
||||
<ul class='e-tabs e-hideme' id='download-option-tabs'>
|
||||
<li id='tab-download'><a href='#core-download-download1'>".LAN_DL_DOWNLOAD_OPT_GENERAL."</a></li>
|
||||
<li id='tab-download'><a href='#core-download-download2'>".LAN_DL_DOWNLOAD_OPT_BROKEN."</a></li>
|
||||
<li id='tab-download'><a href='#core-download-download3'>".LAN_DL_DOWNLOAD_OPT_AGREE."</a></li>
|
||||
<li id='tab-upload'><a href='#core-download-upload'>".LAN_DL_UPLOAD."</a></li>
|
||||
</ul>
|
||||
|
||||
<form method='post' action='".e_SELF."?".e_QUERY."'>\n
|
||||
<fieldset id='core-download-download1'>
|
||||
<div style='text-align:center'>
|
||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
||||
<colgroup>
|
||||
<col style='width:30%'/>
|
||||
<col style='width:70%'/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".LAN_DL_USE_PHP."</td>
|
||||
<td>"
|
||||
.$eform->checkbox('download_subsub', '1', $pref['download_php'])
|
||||
.$eform->label(LAN_DL_USE_PHP_INFO, 'download_php', '1')
|
||||
."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_DL_SUBSUB_CAT."</td>
|
||||
<td>"
|
||||
.$eform->checkbox('download_subsub', '1', $pref['download_subsub'])
|
||||
.$eform->label(LAN_DL_SUBSUB_CAT_INFO, 'download_subsub', '1')
|
||||
."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_DL_SUBSUB_COUNT."</td>
|
||||
<td>"
|
||||
.$eform->checkbox('download_incinfo', '1', $pref['download_incinfo'])
|
||||
.$eform->label(LAN_DL_SUBSUB_COUNT_INFO, 'download_incinfo', '1')
|
||||
."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".DOWLAN_55."</td>
|
||||
<td>".$eform->text('download_view', $pref['download_view'], '4', array('size'=>'4'))."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".DOWLAN_56."</td>
|
||||
<td>".$eform->selectbox('download_order', $order_options, $pref['download_order'])."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_ORDER."</td>
|
||||
<td>".$eform->selectbox('download_sort', $sort_options, $pref['download_sort'])."</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".DOWLAN_160."</td>
|
||||
<td>
|
||||
<select name='mirror_order' class='tbox'>".
|
||||
($pref['mirror_order'] == "0" ? "<option value='0' selected='selected'>".DOWLAN_161."</option>" : "<option value='0'>".DOWLAN_161."</option>").
|
||||
($pref['mirror_order'] == "1" ? "<option value='1' selected='selected'>".DOWLAN_162."</option>" : "<option value='1'>".DOWLAN_162."</option>").
|
||||
($pref['mirror_order'] == "2" ? "<option value='2' selected='selected'>".DOWLAN_163."</option>" : "<option value='2'>".DOWLAN_163."</option>")."
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".DOWLAN_164."</td>
|
||||
<td><input name='recent_download_days' class='tbox' value='".$pref['recent_download_days']."' size='3' maxlength='3'/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id='core-download-download2'>
|
||||
<div style='text-align:center'>
|
||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
||||
<colgroup>
|
||||
<col style='width:30%'/>
|
||||
<col style='width:70%'/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".DOWLAN_151."</td>
|
||||
<td>". r_userclass("download_reportbroken", $pref['download_reportbroken'])."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".DOWLAN_150."</td>
|
||||
<td>". ($pref['download_email'] ? "<input type='checkbox' name='download_email' value='1' checked='checked'/>" : "<input type='checkbox' name='download_email' value='1'/>")."</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id='core-download-download3'>
|
||||
<div style='text-align:center'>
|
||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
||||
<colgroup>
|
||||
<col style='width:30%'/>
|
||||
<col style='width:70%'/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".DOWLAN_100."</td>
|
||||
<td>". ($agree_flag ? "<input type='checkbox' name='agree_flag' value='1' checked='checked'/>" : "<input type='checkbox' name='agree_flag' value='1'/>")."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".DOWLAN_101."</td>
|
||||
<td>".$eform->bbarea('agree_text',$agree_text)."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".DOWLAN_146."</td>
|
||||
<td>".$eform->bbarea('download_denied',$pref['download_denied'])."</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id='core-download-upload'>
|
||||
<div style='text-align:center'>
|
||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
||||
<colgroup>
|
||||
<col style='width:30%'/>
|
||||
<col style='width:70%'/>
|
||||
</colgroup>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class='buttons-bar center'>
|
||||
<input class='button' type='submit' name='updateoptions' value='".DOWLAN_64."'/>
|
||||
</div>
|
||||
</form>
|
||||
";
|
||||
$ns->tablerender(LAN_DL_OPTIONS, $text);
|
||||
}
|
||||
|
||||
function create_category($subAction, $id)
|
||||
{
|
||||
global $sql, $tp, $admin_log;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: plugin.xml,v 1.8 2009-07-14 03:50:55 e107coders Exp $ -->
|
||||
<!-- $Id: plugin.xml,v 1.9 2009-07-14 23:18:22 bugrain Exp $ -->
|
||||
<e107Plugin name="Download" version="1.0" compatibility="0.8" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org"/>
|
||||
<description>DOWLAN_DESCRIPTION</description>
|
||||
@@ -7,7 +7,7 @@
|
||||
<category>content</category>
|
||||
<installLanguageFile filename="languages/--LAN--/admin_download.php" />
|
||||
<administration>
|
||||
<configFile>download_admin.php</configFile>
|
||||
<configFile>admin_download.php</configFile>
|
||||
<subMenuItem title="DOWLAN_29" description="" link="download_admin.php" icon="manage" />
|
||||
<subMenuItem title="DOWLAN_30" description="" link="download_admin.php?create" icon="add" />
|
||||
<subMenuItem title="DOWLAN_31" description="" link="download_admin.php?cat" icon="images/downloads_32.png" />
|
||||
|
Reference in New Issue
Block a user