} if ($showstandard) { $standard_select = torrent_selection($lang_edit['text_standard'], "standard_sel", "standards", $row["standard"]); } else { $standard_select = ""; } if ($showprocessing) { $processing_select = torrent_selection($lang_edit['text_processing'], "processing_sel", "processings", $row["processing"]); } else { $processing_select = ""; } tr($lang_edit['row_quality'], $source_select . $medium_select . $codec_select . $audiocodec_select . $standard_select . $processing_select, 1); } if ($showteam) { if ($showteam) { $team_select = torrent_selection($lang_edit['text_team'], "team_sel", "teams", $row["team"]); } else { $showteam = ""; } tr($lang_edit['row_content'], $team_select, 1); } tr($lang_edit['row_check'], "<input type=\"checkbox\" name=\"visible\"" . ($row["visible"] == "yes" ? " checked=\"checked\"" : "") . " value=\"1\" /> " . $lang_edit['checkbox_visible'] . " " . (get_user_class() >= $beanonymous_class || get_user_class() >= $torrentmanage_class ? "<input type=\"checkbox\" name=\"anonymous\"" . ($row["anonymous"] == "yes" ? " checked=\"checked\"" : "") . " value=\"1\" />" . $lang_edit['checkbox_anonymous_note'] . " " : "") . (get_user_class() >= $torrentmanage_class ? "<input type=\"checkbox\" name=\"banned\"" . ($row["banned"] == "yes" ? " checked=\"checked\"" : "") . " value=\"yes\" /> " . $lang_edit['checkbox_banned'] : ""), 1); if (get_user_class() >= $torrentsticky_class || get_user_class() >= $torrentmanage_class && $CURUSER["picker"] == 'yes') { $pickcontent = ""; if (get_user_class() >= $torrentsticky_class) { $pickcontent .= "<b>" . $lang_edit['row_special_torrent'] . ": </b>" . "<select name=\"sel_spstate\" style=\"width: 100px;\">" . promotion_selection($row["sp_state"], 0) . "</select> "; $pickcontent .= "<b>" . $lang_edit['row_torrent_position'] . ": </b>" . "<select name=\"sel_posstate\" style=\"width: 100px;\">" . "<option" . ($row["pos_state"] == "normal" ? " selected=\"selected\"" : "") . " value=\"0\">" . $lang_edit['select_normal'] . "</option>" . "<option" . ($row["pos_state"] == "sticky" ? " selected=\"selected\"" : "") . " value=\"1\">" . $lang_edit['select_sticky'] . "</option>" . "</select> "; } if (get_user_class() >= $torrentmanage_class && $CURUSER["picker"] == 'yes') { $pickcontent .= "<b>" . $lang_edit['row_recommended_movie'] . ": </b>" . "<select name=\"sel_recmovie\" style=\"width: 100px;\">" . "<option" . ($row["picktype"] == "normal" ? " selected=\"selected\"" : "") . " value=\"0\">" . $lang_edit['select_normal'] . "</option>" . "<option" . ($row["picktype"] == "hot" ? " selected=\"selected\"" : "") . " value=\"1\">" . $lang_edit['select_hot'] . "</option>" . "<option" . ($row["picktype"] == "classic" ? " selected=\"selected\"" : "") . " value=\"2\">" . $lang_edit['select_classic'] . "</option>" . "<option" . ($row["picktype"] == "recommended" ? " selected=\"selected\"" : "") . " value=\"3\">" . $lang_edit['select_recommended'] . "</option>" . "</select>"; }
} if ($showstandard) { $standard_select = torrent_selection($lang_upload['text_standard'], "standard_sel", "standards"); } else { $standard_select = ""; } if ($showprocessing) { $processing_select = torrent_selection($lang_upload['text_processing'], "processing_sel", "processings"); } else { $processing_select = ""; } tr($lang_upload['row_quality'], $source_select . $medium_select . $codec_select . $audiocodec_select . $standard_select . $processing_select, 1); } if ($showteam) { if ($showteam) { $team_select = torrent_selection($lang_upload['text_team'], "team_sel", "teams"); } else { $showteam = ""; } tr($lang_upload['row_content'], $team_select, 1); } //==== offer dropdown for offer mod from code by S4NE $offerres = sql_query("SELECT id, name FROM offers WHERE userid = " . sqlesc($CURUSER[id]) . " AND allowed = 'allowed' ORDER BY name ASC") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($offerres) > 0) { $offer = "<select name=\"offer\"><option value=\"0\">" . $lang_upload['select_choose_one'] . "</option>"; while ($offerrow = mysql_fetch_array($offerres)) { $offer .= "<option value=\"" . $offerrow["id"] . "\">" . htmlspecialchars($offerrow["name"]) . "</option>"; } $offer .= "</select>"; tr($lang_upload['row_your_offer'] . (!$uploadfreely && !$allowspecial ? "<font color=red>*</font>" : ""), $offer . $lang_upload['text_please_select_offer'], 1); }
function print_category_editor($type, $row = '') { global $lang_catmanage; global $validsubcattype; if (in_array($type, $validsubcattype)) { print_sub_category_editor($type, $row); } else { $typename = return_type_name($type); ?> <div style="width: 940px"> <h1 align="center"><a class="faqlink" href="?action=view&type=<?php echo $type; ?> "><?php echo $typename; ?> </a></h1> <div> <table border="1" cellspacing="0" cellpadding="10" width="100%"> <?php if ($type == 'searchbox') { if ($row) { $name = $row['name']; $showsource = $row['showsource']; $showmedium = $row['showmedium']; $showcodec = $row['showcodec']; $showstandard = $row['showstandard']; $showprocessing = $row['showprocessing']; $showteam = $row['showteam']; $showaudiocodec = $row['showaudiocodec']; $catsperrow = $row['catsperrow']; $catpadding = $row['catpadding']; } else { $name = ''; $showsource = 0; $showmedium = 0; $showcodec = 0; $showstandard = 0; $showprocessing = 0; $showteam = 0; $showaudiocodec = 0; $catsperrow = 8; $catpadding = 3; } tr($lang_catmanage['row_searchbox_name'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($name) . "\" style=\"width: 300px\" /> " . $lang_catmanage['text_searchbox_name_note'], 1); tr($lang_catmanage['row_show_sub_category'], "<input type=\"checkbox\" name=\"showsource\" value=\"1\"" . ($showsource ? " checked=\"checked\"" : "") . " /> " . $lang_catmanage['text_sources'] . "<input type=\"checkbox\" name=\"showmedium\" value=\"1\"" . ($showmedium ? " checked=\"checked\"" : "") . " /> " . $lang_catmanage['text_media'] . "<input type=\"checkbox\" name=\"showcodec\" value=\"1\"" . ($showcodec ? " checked=\"checked\"" : "") . " /> " . $lang_catmanage['text_codecs'] . "<input type=\"checkbox\" name=\"showstandard\" value=\"1\"" . ($showstandard ? " checked=\"checked\"" : "") . " /> " . $lang_catmanage['text_standards'] . "<input type=\"checkbox\" name=\"showprocessing\" value=\"1\"" . ($showprocessing ? " checked=\"checked\"" : "") . " /> " . $lang_catmanage['text_processings'] . "<input type=\"checkbox\" name=\"showteam\" value=\"1\"" . ($showteam ? " checked=\"checked\"" : "") . " /> " . $lang_catmanage['text_teams'] . "<input type=\"checkbox\" name=\"showaudiocodec\" value=\"1\"" . ($showaudiocodec ? " checked=\"checked\"" : "") . " /> " . $lang_catmanage['text_audio_codecs'] . "<br />" . $lang_catmanage['text_show_sub_category_note'], 1); tr($lang_catmanage['row_items_per_row'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"catsperrow\" value=\"" . $catsperrow . "\" style=\"width: 100px\" /> " . $lang_catmanage['text_items_per_row_note'], 1); tr($lang_catmanage['row_padding_between_items'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"catpadding\" value=\"" . $catpadding . "\" style=\"width: 100px\" /> " . $lang_catmanage['text_padding_between_items_note'], 1); } elseif ($type == 'caticon') { if ($row) { $name = $row['name']; $folder = $row['folder']; $multilang = $row['multilang']; $secondicon = $row['secondicon']; $cssfile = $row['cssfile']; $designer = $row['designer']; $comment = $row['comment']; } else { $name = ''; $folder = ''; $multilang = 'no'; $secondicon = 'no'; $cssfile = ''; $designer = ''; $comment = ''; } ?> <tr><td colspan="2"><?php echo $lang_catmanage['text_icon_directory_note']; ?> </td></tr> <?php tr($lang_catmanage['col_name'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($name) . "\" style=\"width: 300px\" /> " . $lang_catmanage['text_category_icon_name_note'], 1); tr($lang_catmanage['col_folder'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"folder\" value=\"" . htmlspecialchars($folder) . "\" style=\"width: 300px\" /><br />" . $lang_catmanage['text_folder_note'], 1); tr($lang_catmanage['text_multi_language'], "<input type=\"checkbox\" name=\"multilang\" value=\"yes\"" . ($multilang == 'yes' ? " checked=\"checked\"" : "") . " />" . $lang_catmanage['text_yes'] . "<br />" . $lang_catmanage['text_multi_language_note'], 1); tr($lang_catmanage['text_second_icon'], "<input type=\"checkbox\" name=\"secondicon\" value=\"yes\"" . ($secondicon == 'yes' ? " checked=\"checked\"" : "") . " />" . $lang_catmanage['text_yes'] . "<br />" . $lang_catmanage['text_second_icon_note'], 1); tr($lang_catmanage['text_css_file'], "<input type=\"text\" name=\"cssfile\" value=\"" . htmlspecialchars($cssfile) . "\" style=\"width: 300px\" /> " . $lang_catmanage['text_css_file_note'], 1); tr($lang_catmanage['text_designer'], "<input type=\"text\" name=\"designer\" value=\"" . htmlspecialchars($designer) . "\" style=\"width: 300px\" /> " . $lang_catmanage['text_designer_note'], 1); tr($lang_catmanage['text_comment'], "<input type=\"text\" name=\"comment\" value=\"" . htmlspecialchars($comment) . "\" style=\"width: 300px\" /> " . $lang_catmanage['text_comment_note'], 1); } elseif ($type == 'secondicon') { if ($row) { $name = $row['name']; $image = $row['image']; $class_name = $row['class_name']; $source = $row['source']; $medium = $row['medium']; $codec = $row['codec']; $standard = $row['standard']; $processing = $row['processing']; $team = $row['team']; $audiocodec = $row['audiocodec']; } else { $name = ''; $image = ''; $class_name = ''; $source = 0; $medium = 0; $codec = 0; $standard = 0; $processing = 0; $team = 0; $audiocodec = 0; } tr($lang_catmanage['col_name'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($name) . "\" style=\"width: 300px\" /> " . $lang_catmanage['text_second_icon_name_note'], 1); tr($lang_catmanage['col_image'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"image\" value=\"" . htmlspecialchars($image) . "\" style=\"width: 300px\" /><br />" . $lang_catmanage['text_image_note'], 1); tr($lang_catmanage['text_class_name'], "<input type=\"text\" name=\"class_name\" value=\"" . htmlspecialchars($class_name) . "\" style=\"width: 300px\" /><br />" . $lang_catmanage['text_class_name_note'], 1); tr($lang_catmanage['row_selections'] . "<font color=\"red\">*</font>", torrent_selection(return_type_name('source'), 'source', return_category_db_table_name('source'), $source) . torrent_selection(return_type_name('source'), 'source', return_category_db_table_name('source'), $source) . torrent_selection(return_type_name('medium'), 'medium', return_category_db_table_name('medium'), $medium) . torrent_selection(return_type_name('codec'), 'codec', return_category_db_table_name('codec'), $codec) . torrent_selection(return_type_name('standard'), 'standard', return_category_db_table_name('standard'), $standard) . torrent_selection(return_type_name('processing'), 'processing', return_category_db_table_name('processing'), $processing) . torrent_selection(return_type_name('team'), 'team', return_category_db_table_name('team'), $team) . torrent_selection(return_type_name('audiocodec'), 'audiocodec', return_category_db_table_name('audiocodec'), $audiocodec) . "<br />" . $lang_catmanage['text_selections_note'], 1); } elseif ($type == 'category') { if ($row) { $name = $row['name']; $mode = $row['mode']; $image = $row['image']; $class_name = $row['class_name']; $sort_index = $row['sort_index']; } else { $name = ''; $mode = 1; $image = ''; $class_name = ''; $sort_index = 0; } tr($lang_catmanage['row_category_name'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($name) . "\" style=\"width: 300px\" /> " . $lang_catmanage['text_category_name_note'], 1); tr($lang_catmanage['col_image'] . "<font color=\"red\">*</font>", "<input type=\"text\" name=\"image\" value=\"" . htmlspecialchars($image) . "\" style=\"width: 300px\" /><br />" . $lang_catmanage['text_image_note'], 1); tr($lang_catmanage['text_class_name'], "<input type=\"text\" name=\"class_name\" value=\"" . htmlspecialchars($class_name) . "\" style=\"width: 300px\" /><br />" . $lang_catmanage['text_class_name_note'], 1); tr($lang_catmanage['row_mode'] . "<font color=\"red\">*</font>", return_category_mode_selection('mode', $mode), 1); tr($lang_catmanage['col_order'], "<input type=\"text\" name=\"sort_index\" value=\"" . $sort_index . "\" style=\"width: 100px\" /> " . $lang_catmanage['text_order_note'], 1); } ?> </table> </div> <div style="text-align: center; margin-top: 10px;"> <input type="submit" value="<?php echo $lang_catmanage['submit_submit']; ?> " /> </div> </div> <?php } }