Exemplo n.º 1
0
    $download->show_categories($sub_action, $id);
}
if ($delete == 'main') {
    $result = admin_update($sql->db_Delete('download', 'download_id=' . $del_id), 'delete', DOWLAN_27 . " #" . $del_id . " " . DOWLAN_36);
    if ($result) {
        $admin_log->log_event('DOWNL_07', $del_id, E_LOG_INFORMATIVE, '');
        admin_purge_related('download', $del_id);
        $e_event->trigger('dldelete', $del_id);
    }
    unset($sub_action, $id);
}
if (isset($message)) {
    $ns->tablerender("", "<div style='text-align:center'><b>" . $message . "</b></div>");
}
if (!e_QUERY || $action == "main") {
    $download->show_existing_items($action, $sub_action, $id, $from, $amount);
}
if ($action == "opt") {
    global $pref, $ns;
    $agree_flag = $pref['agree_flag'];
    $agree_text = $pref['agree_text'];
    $text = "<div style='text-align:center'>\n\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\n\t\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t<colgroup>\n\t\t<col style='width:70%' />\n\t\t<col style='width:30%' />\n\t\t</colgroup>\n\t\t<tr>\n\t\t<td class='forumheader3'>" . DOWLAN_69 . "</td>\n\t\t<td class='forumheader3' style='text-align:left'>";
    $c = $pref['download_php'] ? " checked = 'checked' " : "";
    $ssc = !isset($pref['download_subsub']) || $pref['download_subsub'] == '1' ? " checked = 'checked' " : "";
    $sacc = varset($pref['download_incinfo'], 0) == '1' ? " checked = 'checked' " : "";
    $text .= "<input type='checkbox' name='download_php' value='1' {$c} /> <span class='smalltext'>" . DOWLAN_70 . "</span></td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . DOWLAN_158 . "</td>\n\t\t<td class='forumheader3' style='text-align:left'>\n\t\t<input type='checkbox' name='download_subsub' value='1' {$ssc} /> </td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . DOWLAN_159 . "</td>\n\t\t<td class='forumheader3' style='text-align:left'>\n\t\t<input type='checkbox' name='download_incinfo' value='1' {$sacc} /> </td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>\n\t\t" . DOWLAN_55 . "\n\t\t</td>\n\t\t<td class='forumheader3' style='text-align:left'>\n\t\t<select name='download_view' class='tbox'>" . ($pref['download_view'] == 5 ? "<option selected='selected'>5</option>" : "<option>5</option>") . ($pref['download_view'] == 10 ? "<option selected='selected'>10</option>" : "<option>10</option>") . ($pref['download_view'] == 15 ? "<option selected='selected'>15</option>" : "<option>15</option>") . ($pref['download_view'] == 20 ? "<option selected='selected'>20</option>" : "<option>20</option>") . ($pref['download_view'] == 50 ? "<option selected='selected'>50</option>" : "<option>50</option>") . "\n\t\t</select>\n\t\t</td>\n\t\t</tr>\n\n\t\t<tr><td class='forumheader3'>\n\t\t" . DOWLAN_56 . "\n\t\t</td>\n\t\t<td class='forumheader3' style='text-align:left'>\n\n\t\t<select name='download_order' class='tbox'>";
    $order_options = array("download_id" => "Id No.", "download_datestamp" => LAN_DATE, "download_requested" => ADLAN_24, "download_name" => DOWLAN_59, "download_author" => DOWLAN_15);
    foreach ($order_options as $value => $label) {
        $select = $pref['download_order'] == $value ? "selected='selected'" : "";
        $text .= "<option value='{$value}' {$select} >{$label}</option>\n";
    }