예제 #1
0
         $message .= $locale['412'];
     }
 }
 if ($message != "") {
     echo "<div id='close-message'><div class='admin-message'>" . $message . "</div></div>\n";
 }
 $editlist = "";
 $sel = "";
 $result2 = dbquery("SELECT download_cat_id, download_cat_name FROM " . DB_DOWNLOAD_CATS . " WHERE  download_cat_parent='0' ORDER BY download_cat_name");
 if (dbrows($result2) != 0) {
     while ($data2 = dbarray($result2)) {
         if (isset($_GET['action']) && $_GET['action'] == "edit") {
             $sel = $data['download_cat'] == $data2['download_cat_id'] ? " selected='selected'" : "";
         }
         $editlist .= "<option value='" . $data2['download_cat_id'] . "'{$sel}>" . $data2['download_cat_name'] . "</option>\n";
         $editlist .= download_subdownloads($data2['download_cat_id']);
         //subdownloads
     }
 }
 require_once INCLUDES . "bbcode_include.php";
 echo "<form id='inputform' name='inputform' method='post' action='" . $formaction . "' enctype='multipart/form-data'>\n";
 echo "<table cellpadding='0' cellspacing='0' class='center' style='width:500px;'>\n<tr>\n";
 echo "<td class='tbl1' style='width:80px;'>" . $locale['420'] . "</td>\n";
 echo "<td class='tbl1'><input type='text' name='download_title' value='" . $download_title . "' class='textbox' style='width:380px;' /></td>\n";
 echo "</tr>\n";
 echo "<tr>\n<td class='tbl1' style='width:80px;vertical-align:top;'>" . $locale['421b'] . "<br /><br />";
 echo "<span id='shortdesc_display' style='padding: 1px 3px 1px 3px; border:1px solid; display:none;'>";
 echo "<strong>" . (255 - mb_strlen($download_description_short)) . "</strong>";
 echo "</span>";
 echo "</td>\n";
 echo "<td class='tbl1'><textarea name='download_description_short' cols='60' rows='4' class='textbox' style='width:380px;' onkeydown=\"shortdesc_counter(this,'shortdesc_display',255);\" onkeyup=\"shortdesc_counter(this,'shortdesc_display',255);\">" . $download_description_short . "</textarea></td>\n";
예제 #2
0
// Filter form, list of existing cats and downloads
if (!isset($_GET['download_id']) || !isnum($_GET['download_id'])) {
    opentable($locale['400']);
    echo "<!--pre_download_idx-->\n";
    $cat_list_result = dbquery("SELECT download_cat_id, download_cat_name\n\t\tFROM " . DB_DOWNLOAD_CATS . " WHERE download_cat_parent='0' AND " . groupaccess('download_cat_access') . "\n\t\tORDER BY download_cat_name");
    //subdownloads
    $cats_list = "";
    $filter = "";
    $order_by = "";
    $sort = "";
    $getString = "";
    if (dbrows($cat_list_result)) {
        while ($cat_list_data = dbarray($cat_list_result)) {
            $sel = isset($_GET['cat_id']) && $_GET['cat_id'] == $cat_list_data['download_cat_id'] ? " selected='selected'" : "";
            $cats_list .= "<option value='" . $cat_list_data['download_cat_id'] . "'" . $sel . ">" . $cat_list_data['download_cat_name'] . "</option>";
            $cats_list .= download_subdownloads($cat_list_data['download_cat_id']);
            //subdownloads
        }
        if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart']) || $_GET['rowstart'] > dbrows($cat_list_result)) {
            $_GET['rowstart'] = 0;
        }
        if (isset($_GET['cat_id']) && isnum($_GET['cat_id']) && $_GET['cat_id'] != "all") {
            $filter .= " AND download_cat_id='" . $_GET['cat_id'] . "'";
            $order_by_allowed = array("download_id", "download_user", "download_count", "download_datestamp");
            if (isset($_GET['orderby']) && in_array($_GET['orderby'], $order_by_allowed)) {
                $order_by = $_GET['orderby'];
                $getString .= "&amp;orderby=" . $order_by;
            } else {
                $order_by = "";
            }
            if (isset($_GET['sort']) && $_GET['sort'] == "DESC") {