1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 13:41:52 +02:00

Downloads language-file cleanup. Feature-box inline editing enabled.

This commit is contained in:
Cameron 2013-02-23 04:05:08 -08:00
parent d7b0dcc755
commit dc42c53d76
7 changed files with 616 additions and 607 deletions

@ -197,6 +197,8 @@ if (varset($action) == "tools")
$data = file_get_contents($script);
$dir = dirname($script);
$dir = str_replace("/includes","",$dir);
$plugin = basename($dir);
$newLangs = array(
@ -693,7 +695,7 @@ function show_tools()
<tr>
<td>".LAN_CHECK_1."</td>
<td>
<select name='language' class='tbox e-select'>
<select name='language' class='tbox'>
<option value=''>".LAN_SELECT."</option>";
$languages = explode(",", e_LANLIST);
sort($languages);
@ -728,7 +730,7 @@ function show_tools()
<tr>
<td>".LANG_LAN_23."</td>
<td>
<select name='language' class='tbox e-select'>
<select name='language' class='tbox'>
<option value=''>".LAN_SELECT."</option>";
$languages = explode(",", e_LANLIST);
sort($languages);
@ -753,7 +755,7 @@ function show_tools()
<tr>
<td>Search for Deprecated Lans</td>
<td>
<select name='deprecatedLans' class='tbox e-select'>
<select name='deprecatedLans' class='tbox'>
<option value=''>".LAN_SELECT."</option>";
$fl = e107::getFile();

@ -318,516 +318,7 @@ if ($action == "uopt")
function showLimits()
{
$sql = e107::getDb();
$ns = e107::getRender();
$tp = e107::getParser();
global $pref;
if ($sql->db_Select('userclass_classes','userclass_id, userclass_name'))
{
$classList = $sql->db_getList();
}
if ($sql->db_Select("generic", "gen_id as limit_id, gen_datestamp as limit_classnum, gen_user_id as limit_bw_num, gen_ip as limit_bw_days, gen_intdata as limit_count_num, gen_chardata as limit_count_days", "gen_type = 'download_limit'"))
{
while($row = $sql->db_Fetch())
{
$limitList[$row['limit_classnum']] = $row;
}
}
$txt = "
<form method='post' action='".e_SELF."?".e_QUERY."'>
<table class='table adminform'>
<tr>
<td colspan='4' style='text-align:left'>
";
if(vartrue($pref['download_limits']) == 1)
{
$chk = "checked = 'checked'";
}
else
{
$chk = "";
}
$txt .= "
<input type='checkbox' name='download_limits' {$chk}/> ".DOWLAN_125."
</td>
</tr>
<tr>
<th class='fcaption'>".DOWLAN_67."</th>
<th class='fcaption'>".DOWLAN_113."</th>
<th class='fcaption'>".DOWLAN_107."</th>
<th class='fcaption'>".DOWLAN_108."</th>
</tr>
";
if(is_array(vartrue($limitList)))
{
foreach($limitList as $row)
{
$txt .= "
<tr>
<td>".$row['limit_id']."</td>
<td>".r_userclass_name($row['limit_classnum'])."</td>
<td>
<input type='text' class='tbox' size='5' name='count_num[{$row['limit_id']}]' value='".($row['limit_count_num'] ? $row['limit_count_num'] : "")."'/> ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='count_days[{$row['limit_id']}]' value='".($row['limit_count_days'] ? $row['limit_count_days'] : "")."'/> ".DOWLAN_110."
</td>
<td>
<input type='text' class='tbox' size='5' name='bw_num[{$row['limit_id']}]' value='".($row['limit_bw_num'] ? $row['limit_bw_num'] : "")."'/> ".DOWLAN_111." ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='bw_days[{$row['limit_id']}]' value='".($row['limit_bw_days'] ? $row['limit_bw_days'] : "")."'/> ".DOWLAN_110."
</td>
</tr>
";
}
}
$txt .= "
</table>
<div class='buttons-bar center'>
<input type='submit' class='button' name='updatelimits' value='".DOWLAN_115."'/>
</div>
<table class='table adminlist'>
<tr>
<td colspan='4'><br/><br/></td>
</tr>
<tr>
<td colspan='2'>".r_userclass("newlimit_class", 0, "off", "guest, member, admin, classes, language")."</td>
<td>
<input type='text' class='tbox' size='5' name='new_count_num' value=''/> ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='new_count_days' value=''/> ".DOWLAN_110."
</td>
<td>
<input type='text' class='tbox' size='5' name='new_bw_num' value=''/> ".DOWLAN_111." ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='new_bw_days' value=''/> ".DOWLAN_110."
</td>
</tr>
<tr>
";
$txt .= "</table>
<div class='buttons-bar center'>
<input type='submit' class='button' name='addlimit' value='".DOWLAN_114."'/>
</div></form>";
echo $txt;
// $ns->tablerender(DOWLAN_112, $txt);
// require_once(e_ADMIN.'footer.php');
// exit;
}
function showMaint() // Deprecated.
{
$mes = e107::getMessage();
$mes->addInfo("Deprecated Area - please use filter instead under 'Manage' ");
global $pref;
$ns = e107::getRender();
$sql = e107::getDb();
$frm = e107::getForm();
$tp = e107::getParser();
if (isset($_POST['dl_maint'])) {
switch ($_POST['dl_maint'])
{
case 'duplicates':
{
$title = DOWLAN_166;
$query = 'SELECT GROUP_CONCAT(d.download_id SEPARATOR ",") as gc, d.download_id, d.download_name, d.download_url, dc.download_category_name
FROM #download as d
LEFT JOIN #download_category AS dc ON dc.download_category_id=d.download_category
GROUP BY d.download_url
HAVING COUNT(d.download_id) > 1
';
$text = "";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
$currentURL = "";
while($row = $sql->db_Fetch()) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminform">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$query = "SELECT d.*, dc.* FROM `#download` AS d
LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category
WHERE download_id IN (".$row['gc'].")
ORDER BY download_id ASC";
$count = $sql2->db_Select_gen($query);
while($row = $sql2->db_Fetch()) {
$text .= '<tr>';
if ($currentURL != $row['download_url']) {
$text .= '<td>'.$tp->toHTML($row['download_url']).'</td>';
$currentURL = $row['download_url'];
} else {
$text .= '<td>*</td>';
}
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$tp->toHTML($row['download_category_name']).'</td>';
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.duplicates">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
}
break;
}
case 'orphans':
{
$title = DOWLAN_167;
$text = "";
require_once(e_HANDLER."file_class.php");
$efile = new e_file();
$files = $efile->get_files(e_DOWNLOAD);
$foundSome = false;
foreach($files as $file) {
if (0 == $sql->db_Count('download', '(*)', " WHERE download_url='".$file['fname']."'")) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminform">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.DOWLAN_182.'</th>';
$text .= '<th>'.DOWLAN_66.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$filesize = (is_readable(e_DOWNLOAD.$row['download_url']) ? $e107->parseMemorySize(filesize(e_DOWNLOAD.$file['fname'])) : DOWLAN_181);
$filets = (is_readable(e_DOWNLOAD.$row['download_url']) ? $gen->convert_date(filectime(e_DOWNLOAD.$file['fname']), "long") : DOWLAN_181);
$text .= '<tr>';
$text .= '<td>'.$tp->toHTML($file['fname']).'</td>';
$text .= '<td>'.$filets.'</td>';
$text .= '<td>'.$filesize.'</td>';
//TODO $text .= '<td>
//TODO <a href="'.e_SELF.'?create.add.'. urlencode($file["fname"]).'">'.E_16_CREATE.'</a>
//TODO <input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$file["fname"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_173.' [ '.$file["fname"].' ]').'") \'/>
//TODO </td>';
$text .= '</tr>';
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_174);
}
break;
}
case 'missing':
{
$title = DOWLAN_168;
$text = "";
$query = "SELECT d.*, dc.* FROM `#download` AS d LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (!is_readable(e_DOWNLOAD.$row['download_url'])) {
if (!$foundSome)
{
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="adminlist">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$tp->toHTML($row['download_category_name']).'</td>';
$text .= '<td>'.$tp->toHTML($row['download_url']).'</td>';
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.missing">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'inactive':
{
$title = DOWLAN_169;
$text = "";
$query = "SELECT d.*, dc.* FROM `#download` AS d LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category WHERE download_active=0";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (!$foundSome)
{
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminform">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$e107->tp->toHTML($row['download_category_name']).'</td>';
if (strlen($row['download_url']) > 0) {
$text .= '<td>'.$row['download_url'].'</td>';
} else {
$mirrorArray = download::makeMirrorArray($row['download_mirror'], TRUE);
$text .= '<td>';
foreach($mirrorArray as $mirror) {
$text .= $mirror['url'].'<br/>';
}
$text .= '</td>';
}
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.inactive">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'nocategory':
{
$title = DOWLAN_178;
$text = "";
$query = "SELECT * FROM `#download` WHERE download_category=0";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '
<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminlist">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
if (strlen($row['download_url']) > 0) {
$text .= '<td>'.$e107->tp->toHTML($row['download_url']).'</td>';
} else {
$mirrorArray = download::makeMirrorArray($row['download_mirror'], TRUE);
$text .= '<td>';
foreach($mirrorArray as $mirror) {
$text .= $mirror['url'].'<br/>';
}
$text .= '</td>';
}
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.nocategory">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'filesize':
{
$title = DOWLAN_66;
$text = "";
$query = "SELECT d.*, dc.* FROM `#download` AS d LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category WHERE d.download_url<>''";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (is_readable(e_DOWNLOAD.$row['download_url'])) {
$filesize = filesize(e_DOWNLOAD.$row['download_url']);
if ($filesize <> $row['download_filesize']) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminlist">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.DOWLAN_180.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$e107->tp->toHTML($row['download_category_name']).'</td>';
$text .= '<td>'.$e107->tp->toHTML($row['download_url']).'</td>';
$text .= '<td>'.$row['download_filesize'].' / ';
$text .= $filesize;
$text .= '</td>';
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.filesize">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'log':
{
$text = "log - view manage download history log";
header('location: '.e_ADMIN.'admin_log.php?downlog');
exit();
break;
}
}
}
else {
$title = DOWLAN_193;
$text = DOWLAN_179;
$eform = new e_form();
$text = "
<form method='post' action='".e_SELF."?".e_QUERY."' id='core-db-main-form'>
<fieldset id='core-db-plugin-scan'>
<legend class='e-hideme'>".DOWLAN_10."</legend>
<table class='table adminform'>
<colgroup span='2'>
<col style='width: 40%'></col>
<col style='width: 60%'></col>
</colgroup>
<tbody>
<tr>
<td>".DOWLAN_166."</td>
<td>
".$eform->radio('dl_maint', 'duplicates').$eform->label(DOWLAN_185, 'dl_maint', 'duplicates')."
</td>
</tr>
<tr>
<td>".DOWLAN_167."</td>
<td>
".$eform->radio('dl_maint', 'orphans').$eform->label(DOWLAN_186, 'dl_maint', 'orphans')."
</td>
</tr>
<tr>
<td>".DOWLAN_168."</td>
<td>
".$eform->radio('dl_maint', 'missing').$eform->label(DOWLAN_187, 'dl_maint', 'missing')."
</td>
</tr>
<tr>
<td>".DOWLAN_169."</td>
<td>
".$eform->radio('dl_maint', 'inactive').$eform->label(DOWLAN_188, 'dl_maint', 'inactive')."
</td>
</tr>
<tr>
<td>".DOWLAN_178."</td>
<td>
".$eform->radio('dl_maint', 'nocategory').$eform->label(DOWLAN_189, 'dl_maint', 'nocategory')."
</td>
</tr>
<tr>
<td>".DOWLAN_66."</td>
<td>
".$eform->radio('dl_maint', 'filesize').$eform->label(DOWLAN_190, 'dl_maint', 'filesize')."
</td>
</tr>
<tr>
<td>".DOWLAN_171."</td>
<td>
".$eform->radio('dl_maint', 'log').$eform->label(DOWLAN_191, 'dl_maint', 'log')."
</td>
</tr>
</tbody>
</table>
<div class='buttons-bar center'>
".$eform->admin_button('trigger_db_execute', DOWLAN_192, 'execute')."
</div>
</fieldset>
</form>
";
}
echo $text;
// $ns->tablerender(DOWLAN_165.$title, $text);
}
// UNUSED

@ -16,11 +16,8 @@
if (!defined('e107_INIT')) { exit; }
if (e_QUERY)
{
$tmp = explode(".", e_QUERY);
$action = $tmp[0];
}
$action = vartrue($_GET['action']);
switch(vartrue($action)) {
case 'create' :{
@ -74,5 +71,9 @@ switch(vartrue($action)) {
$text = "";
}
}
$ns -> tablerender(DOWLAN_HELP_1, $text);
if($text)
{
$ns -> tablerender(DOWLAN_HELP_1, $text);
}
?>

@ -53,10 +53,10 @@ class plugin_download_admin extends e_admin_dispatcher
protected $adminMenu = array(
'main/list' => array('caption'=> 'Manage', 'perm' => 'P'),
'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'),
'cat/list' => array('caption'=> DOWLAN_31, 'perm'=>'P'),
'cat/list' => array('caption'=> LAN_CATEGORIES, 'perm'=>'P'),
'cat/create' => array('caption'=> "Create Category", 'perm' => 'Q'),
'main/settings' => array('caption'=> 'Settings', 'perm' => 'P'),
'main/maint' => array('caption'=> DOWLAN_165, 'perm' => 'P'),
'main/settings' => array('caption'=> LAN_PREFS, 'perm' => 'P'),
// 'main/maint' => array('caption'=> DOWLAN_165, 'perm' => 'P'),
'main/limits' => array('caption'=> DOWLAN_112, 'perm' => 'P'),
'main/mirror' => array('caption'=> DOWLAN_128, 'perm' => 'P')
);
@ -103,13 +103,13 @@ class plugin_download_admin extends e_admin_dispatcher
* Navigation menu title
* @var string
*/
protected $menuTitle = 'Downloads Menu';
protected $menuTitle = LAN_PLUGIN_DOWNLOAD_NAME;
}
class download_cat_ui extends e_admin_ui
{
protected $pluginTitle = 'Download Categories';
protected $pluginTitle = LAN_PLUGIN_DOWNLOAD_NAME;
protected $pluginName = 'download';
protected $table = "download_category";
protected $pid = "download_category_id";
@ -188,7 +188,7 @@ class download_cat_form_ui extends e_admin_form_ui
class download_main_admin_ui extends e_admin_ui
{
// required
protected $pluginTitle = "Downloads";
protected $pluginTitle = LAN_PLUGIN_DOWNLOAD_NAME;
protected $pluginName = 'download';
protected $table = "download"; // DB Table, table alias is supported. Example: 'r.release'
protected $listQry = "SELECT m.*,u.user_id,u.user_name FROM #download AS m LEFT JOIN #user AS u ON m.download_author = u.user_id "; // without any Order or Limit.
@ -476,7 +476,7 @@ $columnInfo = array(
function limitsPage()
{
showLimits();
$this->showLimits();
}
function maintPage()
@ -490,6 +490,521 @@ $columnInfo = array(
$this->show_existing_mirrors();
}
function showLimits()
{
$sql = e107::getDb();
$ns = e107::getRender();
$tp = e107::getParser();
global $pref;
if ($sql->db_Select('userclass_classes','userclass_id, userclass_name'))
{
$classList = $sql->db_getList();
}
if ($sql->db_Select("generic", "gen_id as limit_id, gen_datestamp as limit_classnum, gen_user_id as limit_bw_num, gen_ip as limit_bw_days, gen_intdata as limit_count_num, gen_chardata as limit_count_days", "gen_type = 'download_limit'"))
{
while($row = $sql->db_Fetch())
{
$limitList[$row['limit_classnum']] = $row;
}
}
$txt = "
<form method='post' action='".e_SELF."?".e_QUERY."'>
<table class='table adminform'>
<tr>
<td colspan='4' style='text-align:left'>
";
if(vartrue($pref['download_limits']) == 1)
{
$chk = "checked = 'checked'";
}
else
{
$chk = "";
}
$txt .= "
<input type='checkbox' name='download_limits' {$chk}/> ".DOWLAN_125."
</td>
</tr>
<tr>
<th class='fcaption'>".DOWLAN_67."</th>
<th class='fcaption'>".DOWLAN_113."</th>
<th class='fcaption'>".DOWLAN_107."</th>
<th class='fcaption'>".DOWLAN_108."</th>
</tr>
";
if(is_array(vartrue($limitList)))
{
foreach($limitList as $row)
{
$txt .= "
<tr>
<td>".$row['limit_id']."</td>
<td>".r_userclass_name($row['limit_classnum'])."</td>
<td>
<input type='text' class='tbox' size='5' name='count_num[{$row['limit_id']}]' value='".($row['limit_count_num'] ? $row['limit_count_num'] : "")."'/> ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='count_days[{$row['limit_id']}]' value='".($row['limit_count_days'] ? $row['limit_count_days'] : "")."'/> ".DOWLAN_110."
</td>
<td>
<input type='text' class='tbox' size='5' name='bw_num[{$row['limit_id']}]' value='".($row['limit_bw_num'] ? $row['limit_bw_num'] : "")."'/> ".DOWLAN_111." ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='bw_days[{$row['limit_id']}]' value='".($row['limit_bw_days'] ? $row['limit_bw_days'] : "")."'/> ".DOWLAN_110."
</td>
</tr>
";
}
}
$txt .= "
</table>
<div class='buttons-bar center'>
<input type='submit' class='button' name='updatelimits' value='".DOWLAN_115."'/>
</div>
<table class='table adminlist'>
<tr>
<td colspan='4'><br/><br/></td>
</tr>
<tr>
<td colspan='2'>".r_userclass("newlimit_class", 0, "off", "guest, member, admin, classes, language")."</td>
<td>
<input type='text' class='tbox' size='5' name='new_count_num' value=''/> ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='new_count_days' value=''/> ".DOWLAN_110."
</td>
<td>
<input type='text' class='tbox' size='5' name='new_bw_num' value=''/> ".DOWLAN_111." ".DOWLAN_109."
<input type='text' class='tbox' size='5' name='new_bw_days' value=''/> ".DOWLAN_110."
</td>
</tr>
<tr>
";
$txt .= "</table>
<div class='buttons-bar center'>
<input type='submit' class='button' name='addlimit' value='".DOWLAN_114."'/>
</div></form>";
echo $txt;
// $ns->tablerender(DOWLAN_112, $txt);
// require_once(e_ADMIN.'footer.php');
// exit;
}
function showMaint() //XXX Deprecated.
{
$mes = e107::getMessage();
$mes->addInfo("Deprecated Area - please use filter instead under 'Manage' ");
global $pref;
$ns = e107::getRender();
$sql = e107::getDb();
$frm = e107::getForm();
$tp = e107::getParser();
if (isset($_POST['dl_maint'])) {
switch ($_POST['dl_maint'])
{
case 'duplicates':
{
$title = DOWLAN_166;
$query = 'SELECT GROUP_CONCAT(d.download_id SEPARATOR ",") as gc, d.download_id, d.download_name, d.download_url, dc.download_category_name
FROM #download as d
LEFT JOIN #download_category AS dc ON dc.download_category_id=d.download_category
GROUP BY d.download_url
HAVING COUNT(d.download_id) > 1
';
$text = "";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
$currentURL = "";
while($row = $sql->db_Fetch()) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminform">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$query = "SELECT d.*, dc.* FROM `#download` AS d
LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category
WHERE download_id IN (".$row['gc'].")
ORDER BY download_id ASC";
$count = $sql2->db_Select_gen($query);
while($row = $sql2->db_Fetch()) {
$text .= '<tr>';
if ($currentURL != $row['download_url']) {
$text .= '<td>'.$tp->toHTML($row['download_url']).'</td>';
$currentURL = $row['download_url'];
} else {
$text .= '<td>*</td>';
}
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$tp->toHTML($row['download_category_name']).'</td>';
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.duplicates">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
}
break;
}
case 'orphans':
{
$title = DOWLAN_167;
$text = "";
require_once(e_HANDLER."file_class.php");
$efile = new e_file();
$files = $efile->get_files(e_DOWNLOAD);
$foundSome = false;
foreach($files as $file) {
if (0 == $sql->db_Count('download', '(*)', " WHERE download_url='".$file['fname']."'")) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminform">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.DOWLAN_182.'</th>';
$text .= '<th>'.DOWLAN_66.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$filesize = (is_readable(e_DOWNLOAD.$row['download_url']) ? $e107->parseMemorySize(filesize(e_DOWNLOAD.$file['fname'])) : DOWLAN_181);
$filets = (is_readable(e_DOWNLOAD.$row['download_url']) ? $gen->convert_date(filectime(e_DOWNLOAD.$file['fname']), "long") : DOWLAN_181);
$text .= '<tr>';
$text .= '<td>'.$tp->toHTML($file['fname']).'</td>';
$text .= '<td>'.$filets.'</td>';
$text .= '<td>'.$filesize.'</td>';
//TODO $text .= '<td>
//TODO <a href="'.e_SELF.'?create.add.'. urlencode($file["fname"]).'">'.E_16_CREATE.'</a>
//TODO <input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$file["fname"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_173.' [ '.$file["fname"].' ]').'") \'/>
//TODO </td>';
$text .= '</tr>';
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_174);
}
break;
}
case 'missing':
{
$title = DOWLAN_168;
$text = "";
$query = "SELECT d.*, dc.* FROM `#download` AS d LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (!is_readable(e_DOWNLOAD.$row['download_url'])) {
if (!$foundSome)
{
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="adminlist">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$tp->toHTML($row['download_category_name']).'</td>';
$text .= '<td>'.$tp->toHTML($row['download_url']).'</td>';
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.missing">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'inactive':
{
$title = DOWLAN_169;
$text = "";
$query = "SELECT d.*, dc.* FROM `#download` AS d LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category WHERE download_active=0";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (!$foundSome)
{
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminform">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$e107->tp->toHTML($row['download_category_name']).'</td>';
if (strlen($row['download_url']) > 0) {
$text .= '<td>'.$row['download_url'].'</td>';
} else {
$mirrorArray = download::makeMirrorArray($row['download_mirror'], TRUE);
$text .= '<td>';
foreach($mirrorArray as $mirror) {
$text .= $mirror['url'].'<br/>';
}
$text .= '</td>';
}
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.inactive">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'nocategory':
{
$title = DOWLAN_178;
$text = "";
$query = "SELECT * FROM `#download` WHERE download_category=0";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '
<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminlist">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
if (strlen($row['download_url']) > 0) {
$text .= '<td>'.$e107->tp->toHTML($row['download_url']).'</td>';
} else {
$mirrorArray = download::makeMirrorArray($row['download_mirror'], TRUE);
$text .= '<td>';
foreach($mirrorArray as $mirror) {
$text .= $mirror['url'].'<br/>';
}
$text .= '</td>';
}
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.nocategory">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'filesize':
{
$title = DOWLAN_66;
$text = "";
$query = "SELECT d.*, dc.* FROM `#download` AS d LEFT JOIN `#download_category` AS dc ON dc.download_category_id=d.download_category WHERE d.download_url<>''";
$count = $sql->db_Select_gen($query);
$foundSome = false;
if ($count) {
while($row = $sql->db_Fetch()) {
if (is_readable(e_DOWNLOAD.$row['download_url'])) {
$filesize = filesize(e_DOWNLOAD.$row['download_url']);
if ($filesize <> $row['download_filesize']) {
if (!$foundSome) {
// $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform");
$text .= '<form method="post" action="'.e_SELF.'?'.e_QUERY.'" id="myform">
<table class="table adminlist">';
$text .= '<tr>';
$text .= '<th>'.DOWLAN_67.'</th>';
$text .= '<th>'.DOWLAN_27.'</th>';
$text .= '<th>'.DOWLAN_11.'</th>';
$text .= '<th>'.DOWLAN_13.'</th>';
$text .= '<th>'.DOWLAN_180.'</th>';
$text .= '<th>'.LAN_OPTIONS.'</th>';
$text .= '</tr>';
$foundSome = true;
}
$text .= '<tr>';
$text .= '<td>'.$row['download_id'].'</td>';
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
$text .= '<td>'.$e107->tp->toHTML($row['download_category_name']).'</td>';
$text .= '<td>'.$e107->tp->toHTML($row['download_url']).'</td>';
$text .= '<td>'.$row['download_filesize'].' / ';
$text .= $filesize;
$text .= '</td>';
$text .= '<td>
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.filesize">'.ADMIN_EDIT_ICON.'</a>
<input type="image" title="'.LAN_DELETE.'" name="delete[main_'.$row["download_id"].']" src="'.ADMIN_DELETE_ICON_PATH.'" onclick=\'return jsconfirm("'.$tp->toJS(DOWLAN_33.' [ID: '.$row["download_id"].' ]').'") \'/>
</td>';
$text .= '</tr>';
}
}
}
}
if ($foundSome) {
$text .= '</table></form>';
}
else
{
e107::getMessage()->addInfo(DOWLAN_172);
// $text = DOWLAN_172;
}
break;
}
case 'log':
{
$text = "log - view manage download history log";
header('location: '.e_ADMIN.'admin_log.php?downlog');
exit();
break;
}
}
}
else {
$title = DOWLAN_193;
$text = DOWLAN_179;
$eform = new e_form();
$text = "
<form method='post' action='".e_SELF."?".e_QUERY."' id='core-db-main-form'>
<fieldset id='core-db-plugin-scan'>
<legend class='e-hideme'>".DOWLAN_10."</legend>
<table class='table adminform'>
<colgroup span='2'>
<col style='width: 40%'></col>
<col style='width: 60%'></col>
</colgroup>
<tbody>
<tr>
<td>".DOWLAN_166."</td>
<td>
".$eform->radio('dl_maint', 'duplicates').$eform->label(DOWLAN_185, 'dl_maint', 'duplicates')."
</td>
</tr>
<tr>
<td>".DOWLAN_167."</td>
<td>
".$eform->radio('dl_maint', 'orphans').$eform->label(DOWLAN_186, 'dl_maint', 'orphans')."
</td>
</tr>
<tr>
<td>".DOWLAN_168."</td>
<td>
".$eform->radio('dl_maint', 'missing').$eform->label(DOWLAN_187, 'dl_maint', 'missing')."
</td>
</tr>
<tr>
<td>".DOWLAN_169."</td>
<td>
".$eform->radio('dl_maint', 'inactive').$eform->label(DOWLAN_188, 'dl_maint', 'inactive')."
</td>
</tr>
<tr>
<td>".DOWLAN_178."</td>
<td>
".$eform->radio('dl_maint', 'nocategory').$eform->label(DOWLAN_189, 'dl_maint', 'nocategory')."
</td>
</tr>
<tr>
<td>".DOWLAN_66."</td>
<td>
".$eform->radio('dl_maint', 'filesize').$eform->label(DOWLAN_190, 'dl_maint', 'filesize')."
</td>
</tr>
<tr>
<td>".DOWLAN_171."</td>
<td>
".$eform->radio('dl_maint', 'log').$eform->label(DOWLAN_191, 'dl_maint', 'log')."
</td>
</tr>
</tbody>
</table>
<div class='buttons-bar center'>
".$eform->admin_button('trigger_db_execute', DOWLAN_192, 'execute')."
</div>
</fieldset>
</form>
";
}
echo $text;
// $ns->tablerender(DOWLAN_165.$title, $text);
}
function saveSettings()

@ -24,18 +24,18 @@ define("LAN_DL_SUBSUB_COUNT_INFO", "Include sub-sub-category counts in sub-c
define("DOWLAN_1", "Download added to database.");
define("DOWLAN_2", "Download updated in database.");
define("DOWLAN_3", "Download deleted.");
define("DOWLAN_4", "Please tick the confirm box to delete the download");
// define("DOWLAN_3", "Download deleted.");
// define("DOWLAN_4", "Please tick the confirm box to delete the download");
define("DOWLAN_5", "There are no download categories defined yet, until you define some you cannot enter any downloads.");
define("DOWLAN_6", "No existing downloads");
define("DOWLAN_7", "Existing Downloads"); //FIXME Use Generic
// define("DOWLAN_6", "No existing downloads");
// define("DOWLAN_7", "Existing Downloads"); //FIXME Use Generic
define("DOWLAN_8", "Nothing changed - not saved");
define("DOWLAN_9", "Download detail:");
define("DOWLAN_10", "Uploads"); //FIXME Use Generic
define("DOWLAN_11", "Category"); //FIXME Use Generic
define("DOWLAN_12", "Name"); //FIXME Use Generic
define("DOWLAN_13", "File");
define("DOWLAN_14", "Enter address if download is an external file");
// define("DOWLAN_14", "Enter address if download is an external file");
define("DOWLAN_15", "Author"); //FIXME Use Generic
define("DOWLAN_16", "Author Email"); //FIXME Use Generic
define("DOWLAN_17", "Author Website");
@ -47,40 +47,40 @@ define("DOWLAN_22", "List uploads");
define("DOWLAN_23", "File types");
define("DOWLAN_24", "Update Download");
define("DOWLAN_25", "Submit Download");
define("DOWLAN_26", "Uploads enabled?");
// define("DOWLAN_26", "Uploads enabled?");
define("DOWLAN_27", "Download");
define("DOWLAN_28", "None");
define("DOWLAN_31", "Categories");
define("DOWLAN_32", "Downloads");
define("DOWLAN_33", "Are you sure you want to delete this download?"); //FIXME Use Generic
define("DOWLAN_34", "Are you sure you want to delete this download category?"); //FIXME Use Generic
define("DOWLAN_35", "Maximum file size");
define("DOWLAN_36", "deleted"); //FIXME Use Generic
define("DOWLAN_37", "Parent");
define("DOWLAN_38", "No existing categories");
define("DOWLAN_39", "Download categories");
define("DOWLAN_40", "None - main parent");
define("DOWLAN_41", "Icon"); //FIXME Use Generic
// define("DOWLAN_34", "Are you sure you want to delete this download category?"); //FIXME Use Generic
// define("DOWLAN_35", "Maximum file size");
// define("DOWLAN_36", "deleted"); //FIXME Use Generic
// define("DOWLAN_37", "Parent");
// define("DOWLAN_38", "No existing categories");
// define("DOWLAN_39", "Download categories");
// define("DOWLAN_40", "None - main parent");
// define("DOWLAN_41", "Icon"); //FIXME Use Generic
define("DOWLAN_42", "View Images");
define("DOWLAN_43", "Visible to");
define("DOWLAN_44", "Selection will make the category visible to only users in that class");
define("DOWLAN_45", "Create Category"); //FIXME Use Generic
define("DOWLAN_46", "Update Category"); //FIXME Use Generic
define("DOWLAN_47", "Category created"); //FIXME Use Generic
define("DOWLAN_48", "Category Updated"); //FIXME Use Generic
define("DOWLAN_49", "Download Category"); //FIXME Use Generic
define("DOWLAN_50", "Download Category"); //FIXME Use Generic
define("DOWLAN_51", "No public uploads will be permitted if disabled");
define("DOWLAN_52", "Files");
define("DOWLAN_53", "Subcategory");
define("DOWLAN_54", "Subcategories");
// define("DOWLAN_44", "Selection will make the category visible to only users in that class");
// define("DOWLAN_45", "Create Category"); //FIXME Use Generic
// define("DOWLAN_46", "Update Category"); //FIXME Use Generic
// define("DOWLAN_47", "Category created"); //FIXME Use Generic
// define("DOWLAN_48", "Category Updated"); //FIXME Use Generic
// define("DOWLAN_49", "Download Category"); //FIXME Use Generic
// define("DOWLAN_50", "Download Category"); //FIXME Use Generic
// define("DOWLAN_51", "No public uploads will be permitted if disabled");
// define("DOWLAN_52", "Files");
// define("DOWLAN_53", "Subcategory");
// define("DOWLAN_54", "Subcategories");
define("DOWLAN_55", "Number of downloads to display per page");
define("DOWLAN_56", "Sort by ");
define("DOWLAN_57", "Clear filters");
define("DOWLAN_58", "Absolute maximum upload size in bytes. Further limited by settings from php.ini, and by the settings in filetypes.xml (upload_max_filesize = %1, post_max_size = %2)");
// define("DOWLAN_57", "Clear filters");
// define("DOWLAN_58", "Absolute maximum upload size in bytes. Further limited by settings from php.ini, and by the settings in filetypes.xml (upload_max_filesize = %1, post_max_size = %2)");
define("DOWLAN_59", "Filename");
define("DOWLAN_60", "Select to allow only certain users to upload");
define("DOWLAN_61", "Permissions");
// define("DOWLAN_60", "Select to allow only certain users to upload");
// define("DOWLAN_61", "Permissions");
define("DOWLAN_62", "Ascending");
define("DOWLAN_63", "Descending");
define("DOWLAN_64", "Update Options");
@ -88,28 +88,28 @@ define("DOWLAN_65", "Options Updated");
define("DOWLAN_66", "Filesize");
define("DOWLAN_67", "ID"); //FIXME Use Generic
define("DOWLAN_68", "File Missing!");
define("DOWLAN_69", "Downloads handled by PHP");
define("DOWLAN_70", "Checking this will send all download requests through PHP.");
// define("DOWLAN_69", "Downloads handled by PHP");
// define("DOWLAN_70", "Checking this will send all download requests through PHP.");
// define("DOWLAN_71", "This page helps you create a file for managing file upload permissions. The file is saved as ../e107_files/temp/filetypes_.xml, and must be copied to ../e107_admin/filetypes.xml before it takes effect.");
define("DOWLAN_72", "Source for values: ");
define("DOWLAN_73", "Userclass"); //FIXME Use Generic
define("DOWLAN_74", "File extensions");
define("DOWLAN_75", "Max upload size");
define("DOWLAN_76", "Delete"); //FIXME Use Generic
define("DOWLAN_77", "Save and generate file");
define("DOWLAN_78", "Date");
define("DOWLAN_79", "Uploader");
define("DOWLAN_80", "There");
define("DOWLAN_81", "is");
define("DOWLAN_82", "are");
define("DOWLAN_83", "unmoderated public download");
define("DOWLAN_84", "unmoderated public downloads");
define("DOWLAN_85", "This page helps you create a file for managing file upload permissions. The file is saved as <strong>--SOURCE--</strong>, and must be copied to <strong>--DEST--</strong> before it takes effect.");
define("DOWLAN_86", "Settings written to ");
define("DOWLAN_87", "Now move this file to ");
define("DOWLAN_88", "Error writing file: ");
define("DOWLAN_90", "Add new entry");
define("DOWLAN_91", "Copy to download manager");
// define("DOWLAN_72", "Source for values: ");
// define("DOWLAN_73", "Userclass"); //FIXME Use Generic
// define("DOWLAN_74", "File extensions");
// define("DOWLAN_75", "Max upload size");
// define("DOWLAN_76", "Delete"); //FIXME Use Generic
// define("DOWLAN_77", "Save and generate file");
// define("DOWLAN_78", "Date");
// define("DOWLAN_79", "Uploader");
// define("DOWLAN_80", "There");
// define("DOWLAN_81", "is");
// define("DOWLAN_82", "are");
// define("DOWLAN_83", "unmoderated public download");
// define("DOWLAN_84", "unmoderated public downloads");
// define("DOWLAN_85", "This page helps you create a file for managing file upload permissions. The file is saved as <strong>--SOURCE--</strong>, and must be copied to <strong>--DEST--</strong> before it takes effect.");
// define("DOWLAN_86", "Settings written to ");
// define("DOWLAN_87", "Now move this file to ");
// define("DOWLAN_88", "Error writing file: ");
// define("DOWLAN_90", "Add new entry");
// define("DOWLAN_91", "Copy to download manager");
define("DOWLAN_100", "Activate Download Agreement");
define("DOWLAN_101", "Agreement Text");
define("DOWLAN_102", "Allow Comments?");
@ -126,18 +126,18 @@ define("DOWLAN_112", "Limits");
define("DOWLAN_113", "Userclass"); //FIXME Use Generic
define("DOWLAN_114", "Add New Limit");
define("DOWLAN_115", "Update limits");
define("DOWLAN_116", "Limit for that userclass already exists");
define("DOWLAN_117", "Limit successfully added");
define("DOWLAN_118", "Limit not added - unknown error");
define("DOWLAN_119", "Limit successfully removed");
define("DOWLAN_120", "Limit not removed - unknown error");
define("DOWLAN_121", "Limit successfully updated");
// define("DOWLAN_116", "Limit for that userclass already exists");
// define("DOWLAN_117", "Limit successfully added");
// define("DOWLAN_118", "Limit not added - unknown error");
// define("DOWLAN_119", "Limit successfully removed");
// define("DOWLAN_120", "Limit not removed - unknown error");
// define("DOWLAN_121", "Limit successfully updated");
define("DOWLAN_122", "Inactive");
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"); // TODO not used?
// define("DOWLAN_126", "Activation status updated");
// 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");
@ -157,7 +157,7 @@ define("DOWLAN_143", "Create Mirror");
define("DOWLAN_144", "No mirrors defined in mirror section.");
define("DOWLAN_145", "Download visible to");
define("DOWLAN_146", "Custom Download-denial message or URL");
define("DOWLAN_147", "Icon for empty category");
// define("DOWLAN_147", "Icon for empty category");
define("DOWLAN_148", "Check to update date stamp to current time");
define("DOWLAN_149", "URL"); //FIXME Use Generic
define("DOWLAN_150", "Email admin when broken download reported");
@ -168,11 +168,11 @@ define("DOWLAN_154", "if using mirrors, select how they will be displayed");
define("DOWLAN_155", "Mirror display type:");
define("DOWLAN_156", "show mirror list, allow user to choose mirror");
define("DOWLAN_157", "use random mirror - no user choice");
define("DOWLAN_158", "Show sub-sub-categories on main download page");
define("DOWLAN_159", "Include sub-sub-category counts in subcategory counts");
// define("DOWLAN_158", "Show sub-sub-categories on main download page");
// define("DOWLAN_159", "Include sub-sub-category counts in subcategory counts");
define("DOWLAN_160", "Mirror list order");
define("DOWLAN_161", "Random");
define("DOWLAN_162", "Copy to newspost");
// define("DOWLAN_162", "Copy to newspost");
define("DOWLAN_164", "Recent downloads age (in days)");
define("DOWLAN_165", "Download Maintenance");
@ -187,14 +187,14 @@ 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_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_181", "Not readable");
define("DOWLAN_182", "Timestamp");
define("DOWLAN_183", "Advanced search");
define("DOWLAN_184", "");
// define("DOWLAN_183", "Advanced search");
// define("DOWLAN_184", "");
define("DOWLAN_185", "Files referenced multiple times in the database");
define("DOWLAN_186", "Files not referenced in the database");
define("DOWLAN_187", "Database entries referencing non-existent files");
@ -204,15 +204,15 @@ define("DOWLAN_190", "Size differences between database entry and the file itsel
define("DOWLAN_191", "Downloads log entries");
define("DOWLAN_192", "Execute selected option");
define("DOWLAN_193", "Select option");
define("DOWLAN_194", "Search"); //FIXME Use Generic
// define("DOWLAN_194", "Search"); //FIXME Use Generic
define("DOWLAN_195", "Mirror type");
define("DOWLAN_196", "list"); //FIXME Use Generic
define("DOWLAN_197", "random");
define("DOWLAN_198", "Filter"); //FIXME Use Generic
// define("DOWLAN_198", "Filter"); //FIXME Use Generic
define('DOWLAN_FP_01', 'Front page');
define('DOWLAN_FP_02', 'Category list');
// define('DOWLAN_FP_01', 'Front page');
// define('DOWLAN_FP_02', 'Category list');
define("DOWLAN_HELP_1", "Help");
@ -226,7 +226,7 @@ define("DOWLAN_HELP_8", "Help for upload list");
define("DOWLAN_HELP_9", "Help for upload types");
define("DOWLAN_HELP_10", "Help for upload options");
define("DOWLAN_INSTALL_DONE", "Your download plugin is now installed");
define("DOWLAN_DESCRIPTION", "This plugin is a fully featured Download system");
define("DOWLAN_CAPTION", "Configure Download");
// define("DOWLAN_INSTALL_DONE", "Your download plugin is now installed");
// define("DOWLAN_DESCRIPTION", "This plugin is a fully featured Download system");
// define("DOWLAN_CAPTION", "Configure Download");
?>

@ -1,7 +1,7 @@
<?php
define('DOWLAN_29', 'Downloads');
define('DOWLAN_30', 'Create Download');
define("LAN_PLUGIN_DOWNLOAD_NAME", "Downloads");
define("LAN_PLUGIN_DOWNLOAD_DIZ", "This plugin is a fully featured File-download system");

@ -40,9 +40,9 @@ class fb_admin extends e_admin_dispatcher
);
protected $adminMenu = array(
'main/list' => array('caption'=> 'Featurebox List', 'perm' => 'P'),
'main/create' => array('caption'=> 'Create Featurebox Entry', 'perm' => 'P'),
'category/list' => array('caption'=> 'Categories', 'perm' => 'P'),
'main/list' => array('caption'=> 'Featurebox List', 'perm' => 'P'),
'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'),
'category/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'),
'category/create' => array('caption'=> "Create Category", 'perm' => 'P'),
// 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0')
@ -69,10 +69,10 @@ class fb_category_ui extends e_admin_ui
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center first'),
'fb_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'data' => 'int', 'width' =>'5%', 'forced'=> TRUE),
'fb_category_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'data' => 'str', 'width' => '5%', 'thclass' => 'center', 'class'=>'center'),
'fb_category_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'validate' => 'str', 'rule' => '1-200', 'error' => 'String between 1-200 characters expected', 'help' => 'up to 200 characters', 'thclass' => 'left'),
'fb_category_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'validate' => 'str', 'rule' => '1-200', 'error' => 'String between 1-200 characters expected', 'help' => 'up to 200 characters', 'thclass' => 'left'),
'fb_category_template' => array('title'=> 'Category template', 'type' => 'layouts', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'writeParms' => 'plugin=featurebox&id=featurebox_category&merge=1', 'filter' => true),
'fb_category_random' => array('title'=> 'Random', 'type' => 'boolean', 'data' => 'int', 'width' => '5%', 'thclass' => 'center', 'class' => 'center', 'batch' => true, 'filter' => true),
'fb_category_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'batch' => true),
'fb_category_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'filter' => true, 'batch' => true),
'fb_category_limit' => array('title'=> 'Limit', 'type' => 'number', 'data' => 'int', 'width' => '5%', 'thclass' => 'left', 'help' => 'number of items to be shown, 0 - show all'),
'fb_category_parms' => array('title'=> 'Parameters (optional)', 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left','writeParms' => 'expand=Advanced&help=Optional Javascript Parameters (format subject to change)'),
@ -173,15 +173,15 @@ class fb_main_ui extends e_admin_ui
protected $fields = array(
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center first', 'class'=>'center'),
'fb_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE),
'fb_category' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'data'=> 'int', 'width' => '5%', 'filter'=>TRUE, 'batch'=>TRUE),
'fb_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'),
'fb_category' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'inline'=>true, 'data'=> 'int', 'width' => '5%', 'filter'=>TRUE, 'batch'=>TRUE),
'fb_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left'),
'fb_text' => array('title'=> FBLAN_08, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1','writeParms'=>'template=admin'),
//DEPRECATED 'fb_mode' => array('title'=> FBLAN_12, 'type' => 'dropdown', 'data'=> 'int', 'width' => '5%', 'filter'=>TRUE, 'batch'=>TRUE),
//DEPRECATED 'fb_rendertype' => array('title'=> FBLAN_22, 'type' => 'dropdown', 'data'=> 'int', 'width' => 'auto', 'noedit' => TRUE),
'fb_template' => array('title'=> LAN_TEMPLATE, 'type' => 'layouts', 'data'=> 'str', 'width' => 'auto', 'writeParms' => 'plugin=featurebox', 'filter' => true, 'batch' => true), // Photo
'fb_image' => array('title'=> "Image", 'type' => 'image', 'width' => 'auto', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60'),
'fb_imageurl' => array('title'=> "Image Link", 'type' => 'url', 'width' => 'auto'),
'fb_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'batch' => true), // User id
'fb_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'filter' => true, 'batch' => true), // User id
'fb_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'data'=> 'int','width' => '5%' ),
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center')
);