diff --git a/e107_plugins/download/admin_download.php b/e107_plugins/download/admin_download.php index f8765b945..5e26c0df5 100644 --- a/e107_plugins/download/admin_download.php +++ b/e107_plugins/download/admin_download.php @@ -60,12 +60,6 @@ $adminDownload = new adminDownload(); new plugin_download_admin(); require_once(e_ADMIN."auth.php"); - - - - - - $pst->save_preset(); // unique name(s) for the presets - comma separated. /* @@ -275,7 +269,7 @@ if (isset($_POST['submit_mirror'])) if ($action == "mirror") { - $adminDownload->show_existing_mirrors(); + //$adminDownload->show_existing_mirrors(); } @@ -287,48 +281,6 @@ if ($action == "dlm") } -if ($action == "create") -{ - $adminDownload->create_download($subAction, $id); -} - - -if (isset($delete) && $delete == 'category') -{ - if (admin_update($sql->db_Delete('download_category', 'download_category_id='.$del_id), 'delete', DOWLAN_49." #".$del_id." ".DOWLAN_36)) - { - $sql->db_Delete('download_category', 'download_category_parent='.$del_id); - $admin_log->log_event('DOWNL_04',$del_id,E_LOG_INFORMATIVE,''); - } -} - - -if ($action == 'cat') -{ - $adminDownload->show_categories($subAction, $id); -} - - -if (isset($delete) && $delete == 'main') -{ - $result = $sql->db_Delete('download', 'download_id='.$del_id); - if ($result) - { - // Process triggers before calling admin_update so trigger messages can be shown - $data = array('method'=>'delete', 'table'=>'download', 'id'=>$del_id, 'plugin'=>'download', 'function'=>'delete_download'); - $hooks = $e107->e_event->triggerHook($data); - require_once(e_HANDLER."message_handler.php"); - $emessage = &eMessage::getInstance(); - $emessage->add($hooks, E_MESSAGE_SUCCESS); - - admin_update($result, 'delete', DOWLAN_27." #".$del_id." ".DOWLAN_36); - - $admin_log->log_event('DOWNL_07',$del_id,E_LOG_INFORMATIVE,''); - admin_purge_related('download', $del_id); - $e_event->trigger('dldelete', $del_id); - } - unset($subAction, $id); -} if (isset($message)) { @@ -348,10 +300,10 @@ if ($from === "maint" && isset($_POST['submit_download'])) if (!e_QUERY || $action == "main") { - $text = $emessage->render(); - $text .= $adminDownload->show_filter_form($action, $subAction, $id, $from, $amount); - $text .= $adminDownload->show_existing_items($action, $subAction, $id, $from, $amount); - $ns->tablerender(DOWLAN_7, $text); + //$text = $emessage->render(); + //$text .= $adminDownload->show_filter_form($action, $subAction, $id, $from, $amount); + //$text .= $adminDownload->show_existing_items($action, $subAction, $id, $from, $amount); + //$ns->tablerender(DOWLAN_7, $text); } @@ -388,6 +340,8 @@ function showLimits() { $sql = e107::getDb(); $ns = e107::getRender(); + $tp = e107::getParser(); + global $pref; if ($sql->db_Select('userclass_classes','userclass_id, userclass_name')) @@ -491,6 +445,8 @@ function showMaint() global $pref; $ns = e107::getRender(); $sql = e107::getDb(); + $frm = e107::getForm(); + $tp = e107::getParser(); if (isset($_POST['dl_maint'])) { switch ($_POST['dl_maint']) @@ -511,8 +467,9 @@ function showMaint() $currentURL = ""; while($row = $sql->db_Fetch()) { if (!$foundSome) { - $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform"); - $text .= '