本文整理汇总了PHP中genrelist函数的典型用法代码示例。如果您正苦于以下问题:PHP genrelist函数的具体用法?PHP genrelist怎么用?PHP genrelist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了genrelist函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: category_read
function category_read()
{
global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH, $btit_settings;
$admintpl->set("language", $language);
$cres = genrelist();
for ($i = 0; $i < count($cres); $i++) {
$cres[$i]["frm_number"] = "form" . $i;
$cres[$i]["name"] = unesc($cres[$i]["name"]);
$cres[$i]["image"] = "<img src=\"{$STYLEURL}/images/categories/" . $cres[$i]["image"] . "\" alt=\"\" border=\"0\" />";
$cres[$i]["smf_select"] = get_forum_list($cres[$i]["forumid"], $cres[$i]["id"]);
}
$admintpl->set("categories", $cres);
unset($cres);
}
开发者ID:Karpec,项目名称:gizd,代码行数:14,代码来源:admin.cats.forum.php
示例2: category_read
function category_read()
{
global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
$admintpl->set("category_add", false, true);
$admintpl->set("language", $language);
$cres = genrelist();
for ($i = 0; $i < count($cres); $i++) {
$cres[$i]["name"] = unesc($cres[$i]["name"]);
$cres[$i]["image"] = "<img src=\"{$STYLEURL}/images/categories/" . $cres[$i]["image"] . "\" alt=\"\" border=\"0\" />";
$cres[$i]["edit"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=edit&id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
$cres[$i]["delete"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=delete&id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
}
$admintpl->set("categories", $cres);
$admintpl->set("category_add_new", "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=add\">" . $language["CATEGORY_ADD"] . "</a>");
unset($cres);
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:16,代码来源:admin.categories.php
示例3: category_read
function category_read()
{
global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
$admintpl->set("category_add", false, true);
$admintpl->set("language", $language);
$admintpl->set("perm", false, true);
$admintpl->set("permedit", false, true);
$cres = genrelist();
for ($i = 0; $i < count($cres); $i++) {
$cres[$i]["name"] = unesc($cres[$i]["name"]);
$cres[$i]["perm"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=perm&id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["PERMISSIONS"]) . "</a>";
$cres[$i]["image"] = "<img src=\"{$STYLEURL}/images/categories/" . $cres[$i]["image"] . "\" alt=\"\" border=\"0\" />";
$cres[$i]["edit"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=edit&id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
$cres[$i]["delete"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=delete&id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
}
$admintpl->set("categories", $cres);
$admintpl->set("category_add_new", "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=add\">" . $language["CATEGORY_ADD"] . "</a>");
$ajax_order = "<script type=\"text/javascript\">\n\t \t\tfunction updateOrder()\n {\n var options = {\n method : 'post',\n parameters : Sortable.serialize('categories_list'),\n onComplete : function(request) { \t\n\t\t\t new Effect.Highlight(ID.id,{duration:3});\n\t\t\t \n\t\t\t }\n };\n new Ajax.Request('index.php?page=admin&user=" . $_GET["user"] . "&code=" . $_GET["code"] . "&do=category&action=order', options);\n }\n \t Sortable.create('categories_list', { onUpdate : updateOrder });\n\t \n \n</script>";
$admintpl->set('ajax_order', $ajax_order);
unset($cres);
}
开发者ID:Karpec,项目名称:gizd,代码行数:21,代码来源:admin.categories.php
示例4: genrelist
print "</td></tr>\n";
if ($allowtorrents) {
$disablespecial = " onchange=\"disableother('browsecat','specialcat')\"";
$s = "<select name=\"type\" id=\"browsecat\" " . ($allowtwosec ? $disablespecial : "") . ">\n<option value=\"0\">" . $lang_upload['select_choose_one'] . "</option>\n";
$cats = genrelist($browsecatmode);
foreach ($cats as $row) {
$s .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n";
}
$s .= "</select>\n";
} else {
$s = "";
}
if ($allowspecial) {
$disablebrowse = " onchange=\"disableother('specialcat','browsecat')\"";
$s2 = "<select name=\"type\" id=\"specialcat\" " . $disablebrowse . ">\n<option value=\"0\">" . $lang_upload['select_choose_one'] . "</option>\n";
$cats2 = genrelist($specialcatmode);
foreach ($cats2 as $row) {
$s2 .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n";
}
$s2 .= "</select>\n";
} else {
$s2 = "";
}
tr($lang_upload['row_type'] . "<font color=\"red\">*</font>", ($allowtwosec ? $lang_upload['text_to_browse_section'] : "") . $s . ($allowtwosec ? $lang_upload['text_to_special_section'] : "") . $s2 . ($allowtwosec ? $lang_upload['text_type_note'] : ""), 1);
if ($showsource || $showmedium || $showcodec || $showaudiocodec || $showstandard || $showprocessing) {
if ($showsource) {
$source_select = torrent_selection($lang_upload['text_source'], "source_sel", "sources");
} else {
$source_select = "";
}
if ($showmedium) {
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:upload.php
示例5: bookmarktable
function bookmarktable($res, $variant = "index")
{
global $INSTALLER09, $CURUSER, $lang;
$htmlout = '';
$htmlout .= "\r\n <span>Icon Legend :\r\n <img src='{$INSTALLER09['pic_base_url']}aff_cross.gif' alt='Delete Bookmark' border='none' /> = Delete Bookmark |\r\n <img src='{$INSTALLER09['pic_base_url']}zip.gif' alt='Download Bookmark' border='none' /> = Download Torrent |\r\n <img alt='Bookmark is Private' src='{$INSTALLER09['pic_base_url']}key.gif' border='none' /> = Bookmark is Private |\r\n <img src='{$INSTALLER09['pic_base_url']}public.gif' alt='Bookmark is Public' border='none' /> = Bookmark is Public</span>\r\n <table border='1' cellspacing='0' cellpadding='5'>\r\n <tr>\r\n <td class='colhead' align='center'>{$lang["torrenttable_type"]}</td>\r\n <td class='colhead' align='left'>{$lang["torrenttable_name"]}</td>";
$htmlout .= ($variant == 'index' ? '<td class="colhead" align="center">Delete</td><td class="colhead" align="right">' : '') . 'Download</td><td class="colhead" align="right">Share</td>';
if ($variant == "mytorrents") {
$htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_edit"]}</td>\n";
$htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_visible"]}</td>\n";
}
$htmlout .= "<td class='colhead' align='right'>{$lang["torrenttable_files"]}</td>\r\n <td class='colhead' align='right'>{$lang["torrenttable_comments"]}</td>\r\n <td class='colhead' align='center'>{$lang["torrenttable_added"]}</td>\r\n <td class='colhead' align='center'>{$lang["torrenttable_size"]}</td>\r\n <td class='colhead' align='center'>{$lang["torrenttable_snatched"]}</td>\r\n <td class='colhead' align='right'>{$lang["torrenttable_seeders"]}</td>\r\n <td class='colhead' align='right'>{$lang["torrenttable_leechers"]}</td>";
if ($variant == 'index') {
$htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_uppedby"]}</td>\n";
}
$htmlout .= "</tr>\n";
$categories = genrelist();
foreach ($categories as $key => $value) {
$change[$value['id']] = array('id' => $value['id'], 'name' => $value['name'], 'image' => $value['image']);
}
while ($row = mysqli_fetch_assoc($res)) {
$row['cat_name'] = htmlsafechars($change[$row['category']]['name']);
$row['cat_pic'] = htmlsafechars($change[$row['category']]['image']);
$id = (int) $row["id"];
$htmlout .= "<tr>\n";
$htmlout .= "<td align='center' style='padding: 0px'>";
if (isset($row["cat_name"])) {
$htmlout .= '<a href="browse.php?cat=' . (int) $row['category'] . '">';
if (isset($row["cat_pic"]) && $row["cat_pic"] != "") {
$htmlout .= "<img border='0' src='{$INSTALLER09['pic_base_url']}caticons/{$CURUSER['categorie_icon']}/" . htmlsafechars($row['cat_pic']) . "' alt='" . htmlsafechars($row['cat_name']) . "' />";
} else {
$htmlout .= htmlsafechars($row["cat_name"]);
}
$htmlout .= "</a>";
} else {
$htmlout .= "-";
}
$htmlout .= "</td>\n";
$dispname = htmlsafechars($row["name"]);
$htmlout .= "<td align='left'><a href='details.php?";
if ($variant == "mytorrents") {
$htmlout .= "returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&";
}
$htmlout .= "id={$id}";
if ($variant == "index") {
$htmlout .= "&hit=1";
}
$htmlout .= "'><b>{$dispname}</b></a> </td>\n";
$htmlout .= $variant == "index" ? "<td align='center'><a href='bookmark.php?torrent={$id}&action=delete'><img src='{$INSTALLER09['pic_base_url']}aff_cross.gif' border='0' alt='Delete Bookmark!' title='Delete Bookmark!' /></a></td>" : "";
$htmlout .= $variant == "index" ? "<td align='center'><a href='download.php?torrent={$id}'><img src='{$INSTALLER09['pic_base_url']}zip.gif' border='0' alt='Download Bookmark!' title='Download Bookmark!' /></a></td>" : "";
$bm = sql_query("SELECT * FROM bookmarks WHERE torrentid=" . sqlesc($id) . " && userid=" . sqlesc($CURUSER['id']));
$bms = mysqli_fetch_assoc($bm);
if ($bms['private'] == 'yes' && $bms['userid'] == $CURUSER['id']) {
$makepriv = "<a href='bookmark.php?torrent={$id}&action=public'><img src='{$INSTALLER09['pic_base_url']}key.gif' border='0' alt='Mark Bookmark Public!' title='Mark Bookmark Public!' /></a>";
$htmlout .= "" . ($variant == "index" ? "<td align='center'>{$makepriv}</td>" : "");
} elseif ($bms['private'] == 'no' && $bms['userid'] == $CURUSER['id']) {
$makepriv = "<a href='bookmark.php?torrent=" . $id . "&action=private'><img src='{$INSTALLER09['pic_base_url']}public.gif' border='0' alt='Mark Bookmark Private!' title='Mark Bookmark Private!' /></a>";
$htmlout .= "" . ($variant == "index" ? "<td align='center'>{$makepriv}</td>" : "");
}
if ($variant == "mytorrents") {
$htmlout .= "</td><td align='center'><a href='edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&id=" . (int) $row["id"] . "'>{$lang["torrenttable_edit"]}</a>\n";
}
if ($variant == "mytorrents") {
$htmlout .= "<td align='right'>";
if ($row["visible"] == "no") {
$htmlout .= "<b>" . $lang["torrenttable_not_visible"] . "</b>";
} else {
$htmlout .= "" . $lang["torrenttable_visible"] . "";
}
$htmlout .= "</td>\n";
}
if ($row["type"] == "single") {
$htmlout .= "<td align='right'>" . (int) $row['numfiles'] . "</td>\n";
} else {
if ($variant == "index") {
$htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . (int) $row['numfiles'] . "</a></b></td>\n";
} else {
$htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . (int) $row['numfiles'] . "</a></b></td>\n";
}
}
if (!$row["comments"]) {
$htmlout .= "<td align='right'>" . (int) $row['comments'] . "</td>\n";
} else {
if ($variant == "index") {
$htmlout .= "<td align='right'><b><a href='details.php?id={$id}&hit=1&tocomm=1'>" . (int) $row['comments'] . "</a></b></td>\n";
} else {
$htmlout .= "<td align='right'><b><a href='details.php?id={$id}&page=0#startcomments'>" . (int) $row['comments'] . "</a></b></td>\n";
}
}
$htmlout .= "<td align='center'><span style='white-space: nowrap;'>" . str_replace(",", "<br />", get_date($row['added'], '')) . "</span></td>\n";
$htmlout .= "<td align='center'>" . str_replace(" ", "<br />", mksize($row["size"])) . "</td>\n";
if ($row["times_completed"] != 1) {
$_s = "" . $lang["torrenttable_time_plural"] . "";
} else {
$_s = "" . $lang["torrenttable_time_singular"] . "";
}
$htmlout .= "<td align='center'><a href='snatches.php?id={$id}'>" . number_format($row["times_completed"]) . "<br />{$_s}</a></td>\n";
if ((int) $row["seeders"]) {
if ($variant == "index") {
if ($row["leechers"]) {
$ratio = (int) $row["seeders"] / (int) $row["leechers"];
//.........这里部分代码省略.........
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:101,代码来源:bookmarks.php
示例6: textbbcode
print "<tr><td class=\"rowhead\">" . $lang_edit['row_description'] . "<font color=\"red\">*</font></td><td class=\"rowfollow\">";
textbbcode("edittorrent", "descr", $row["descr"], false);
print "</td></tr>";
$s = "<select name=\"type\" id=\"oricat\">";
$cats = genrelist($sectionmode);
foreach ($cats as $subrow) {
$s .= "<option value=\"" . $subrow["id"] . "\"";
if ($subrow["id"] == $row["category"]) {
$s .= " selected=\"selected\"";
}
$s .= ">" . htmlspecialchars($subrow["name"]) . "</option>\n";
}
$s .= "</select>\n";
if ($allowmove) {
$s2 = "<select name=\"type\" id=newcat disabled>\n";
$cats2 = genrelist($othermode);
foreach ($cats2 as $subrow) {
$s2 .= "<option value=\"" . $subrow["id"] . "\"";
if ($subrow["id"] == $row["category"]) {
$s2 .= " selected=\"selected\"";
}
$s2 .= ">" . htmlspecialchars($subrow["name"]) . "</option>\n";
}
$s2 .= "</select>\n";
$movecheckbox = "<input type=\"checkbox\" id=movecheck name=\"movecheck\" value=\"1\" onclick=\"disableother2('oricat','newcat')\" />";
}
tr($lang_edit['row_type'] . "<font color=\"red\">*</font>", $s . ($allowmove ? " " . $movecheckbox . $movenote . $s2 : ""), 1);
if ($showsource || $showmedium || $showcodec || $showaudiocodec || $showstandard || $showprocessing) {
if ($showsource) {
$source_select = torrent_selection($lang_edit['text_source'], "source_sel", "sources", $row["source"]);
} else {
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:edit.php
示例7: get_user_class_name
print "<p align=\"left\"><b><font size=\"5\">" . $lang_offers['text_rules'] . "</font></b></p>\n";
print "<div align=\"left\"><ul>";
print "<li>" . $lang_offers['text_rule_one_one'] . get_user_class_name($upload_class, false, true, true) . $lang_offers['text_rule_one_two'] . get_user_class_name($addoffer_class, false, true, true) . $lang_offers['text_rule_one_three'] . "</li>\n";
print "<li>" . $lang_offers['text_rule_two_one'] . "<b>" . $minoffervotes . "</b>" . $lang_offers['text_rule_two_two'] . "</li>\n";
if ($offervotetimeout_main) {
print "<li>" . $lang_offers['text_rule_three_one'] . "<b>" . $offervotetimeout_main / 3600 . "</b>" . $lang_offers['text_rule_three_two'] . "</li>\n";
}
if ($offeruptimeout_main) {
print "<li>" . $lang_offers['text_rule_four_one'] . "<b>" . $offeruptimeout_main / 3600 . "</b>" . $lang_offers['text_rule_four_two'] . "</li>\n";
}
print "</ul></div>";
if (get_user_class() >= $addoffer_class) {
print "<div align=\"center\" style=\"margin-bottom: 8px;\"><a href=\"?add_offer=1\">" . "<b>" . $lang_offers['text_add_offer'] . "</b></a></div>";
}
print "<div align=\"center\"><form method=\"get\" action=\"?\">" . $lang_offers['text_search_offers'] . " <input type=\"text\" id=\"specialboxg\" name=\"search\" /> ";
$cats = genrelist($browsecatmode);
$catdropdown = "";
foreach ($cats as $cat) {
$catdropdown .= "<option value=\"" . $cat["id"] . "\"";
$catdropdown .= ">" . htmlspecialchars($cat["name"]) . "</option>\n";
}
print "<select name=\"category\"><option value=\"0\">" . $lang_offers['select_show_all'] . "</option>" . $catdropdown . "</select> <input type=\"submit\" class=\"btn\" value=\"" . $lang_offers['submit_search'] . "\" /></form></div>";
end_frame();
print "<br /><br />";
$last_offer = strtotime($CURUSER['last_offer']);
if (!$num) {
stdmsg($lang_offers['text_nothing_found'], $lang_offers['text_nothing_found']);
} else {
$catid = $_GET[category];
print "<table class=\"torrents\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\">";
print "<tr><td class=\"colhead\" style=\"padding: 0px\"><a href=\"?category=" . $catid . "&sort=cat&type=" . $cat_order_type . "\">" . $lang_offers['col_type'] . "</a></td>" . "<td class=\"colhead\" width=\"100%\"><a href=\"?category=" . $catid . "&sort=name&type=" . $name_order_type . "\">" . $lang_offers['col_title'] . "</a></td>" . "<td colspan=\"3\" class=\"colhead\"><a href=\"?category=" . $catid . "&sort=v_res&type=" . $v_res_order_type . "\">" . $lang_offers['col_vote_results'] . "</a></td>" . "<td class=\"colhead\"><a href=\"?category=" . $catid . "&sort=comments&type=" . $comments_order_type . "\"><img class=\"comments\" src=\"pic/trans.gif\" alt=\"comments\" title=\"" . $lang_offers['title_comment'] . "\" />" . $lang_offers['col_comment'] . "</a></td>" . "<td class=\"colhead\"><a href=\"?category=" . $catid . "&sort=added&type=" . $added_order_type . "\"><img class=\"time\" src=\"pic/trans.gif\" alt=\"time\" title=\"" . $lang_offers['title_time_added'] . "\" /></a></td>";
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:offers.php
示例8: get_searchbox_value
$showprocessing = get_searchbox_value($brsectiontype, 'showprocessing') || $allowspecial && get_searchbox_value($spsectiontype, 'showprocessing');
//whether show processings or not
$showteam = get_searchbox_value($brsectiontype, 'showteam') || $allowspecial && get_searchbox_value($spsectiontype, 'showteam');
//whether show teams or not
$showaudiocodec = get_searchbox_value($brsectiontype, 'showaudiocodec') || $allowspecial && get_searchbox_value($spsectiontype, 'showaudiocodec');
//whether show audio codecs or not
$brcatsperror = get_searchbox_value($brsectiontype, 'catsperrow');
$catsperrow = get_searchbox_value($spsectiontype, 'catsperrow');
$catsperrow = !$allowspecial ? $brcatsperror : ($catsperrow > $catsperrow ? $catsperrow : $catsperrow);
//show how many cats per line
$brcatpadding = get_searchbox_value($brsectiontype, 'catpadding');
$spcatpadding = get_searchbox_value($spsectiontype, 'catpadding');
$catpadding = !$allowspecial ? $brcatpadding : ($brcatpadding < $spcatpadding ? $brcatpadding : $spcatpadding);
//padding space between categories in pixel
$brcats = genrelist($brsectiontype);
$spcats = genrelist($spsectiontype);
if ($showsubcat) {
if ($showsource) {
$sources = searchbox_item_list("sources");
}
if ($showmedium) {
$media = searchbox_item_list("media");
}
if ($showcodec) {
$codecs = searchbox_item_list("codecs");
}
if ($showstandard) {
$standards = searchbox_item_list("standards");
}
if ($showprocessing) {
$processings = searchbox_item_list("processings");
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:usercp.php
示例9: delete_cat_form
function delete_cat_form()
{
global $params, $lang;
if (!isset($params['id']) or !is_valid_id($params['id'])) {
stderr($lang['categories_error'], $lang['categories_no_id']);
}
$q = sql_query("SELECT * FROM categories WHERE id = " . intval($params['id']));
if (false == mysqli_num_rows($q)) {
stderr($lang['categories_error'], $lang['categories_exist_error']);
}
$r = mysqli_fetch_assoc($q);
$q = sql_query("SELECT COUNT(*) FROM torrents WHERE category = " . intval($r['id']));
$count = mysqli_fetch_array($q, MYSQLI_NUM);
$check = '';
if ($count[0]) {
$select = "<select name='new_cat_id'>\n<option value='0'>{$lang['categories_select']}</option>\n";
$cats = genrelist();
foreach ($cats as $c) {
$select .= $c['id'] != $r['id'] ? "<option value='{$c["id"]}'>" . htmlsafechars($c['name'], ENT_QUOTES) . "</option>\n" : "";
}
$select .= "</select>\n";
$check .= "<tr>\n <td align='right' width='50%'>{$lang['categories_select_new']}<br /><span style='color:red;font-weight:bold;'>{$lang['categories_del_warning']}</span></td>\n <td>{$select}</td>\n </tr>";
}
$htmlout = '';
$htlmout .= "<div class='row'><div class='col-md-12'>";
$htmlout .= "<form action='staffpanel.php?tool=categories&action=categories' method='post'>\n <input type='hidden' name='mode' value='takedel_cat' />\n <input type='hidden' name='id' value='" . (int) $r['id'] . "' />\n \n <table class='torrenttable' align='center' width='80%' bgcolor='#555555' cellspacing='2' cellpadding='2'>\n <tr>\n <td colspan='2' class='colhead'>{$lang['categories_del_about']}" . htmlsafechars($r['name'], ENT_QUOTES) . "</td>\n </tr>\n <tr>\n <td align='right' width='50%'>{$lang['categories_del_name']}</td>\n <td>" . htmlsafechars($r['name'], ENT_QUOTES) . "</td>\n </tr>\n <tr>\n <td align='right'>{$lang['categories_del_description']}</td>\n <td>" . htmlsafechars($r['cat_desc'], ENT_QUOTES) . "</td>\n </tr>\n <tr>\n <td align='right'>{$lang['categories_show_minclass']}</td>\n <td>" . htmlsafechars(get_user_class_name($r['min_class']), ENT_QUOTES) . "</td>\n </tr>\n <tr>\n <td align='right'>{$lang['categories_del_image']}</td>\n <td>" . htmlsafechars($r['image'], ENT_QUOTES) . "</td>\n </tr>\n {$check}\n <tr>\n <td colspan='2' align='center'>\n <input type='submit' class='btn' value='{$lang['categories_del_delete']}' /><input type='button' class='btn' value='{$lang['categories_cancel']}' onclick=\"history.go(-1)\" /></td>\n </tr>\n </table>\n </form>";
$htlmout .= "</div></div>";
echo stdhead($lang['categories_del_stdhead'] . $r['name']) . $htmlout . stdfoot();
}
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:29,代码来源:categories.php
示例10: fwrite
$foutput .= "\$GLOBALS['block_newslimit'] = '" . $_POST["newslimit"] . "';\n";
$foutput .= "\$GLOBALS['block_forumlimit'] = '" . $_POST["forumlimit"] . "';\n";
$foutput .= "\$GLOBALS['block_last10limit'] = '" . $_POST["last10limit"] . "';\n";
$foutput .= "\$GLOBALS['block_mostpoplimit'] = '" . $_POST["mostpoplimit"] . "';\n";
$foutput .= "\$GLOBALS['clocktype'] = " . $_POST["clocktype"] . ";\n";
$foutput .= "\n?>";
fwrite($fd, $foutput) or die(CANT_SAVE_CONFIG);
fclose($fd);
@chmod("include/config.php", 0744);
$db->query("UPDATE users SET language = " . $db->real_escape_string($_POST['default_langue']) . ", style = " . $db->real_escape_string($_POST['default_style']) . " WHERE id_level = 1");
print CONFIG_SAVED;
redirect("admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"]);
exit;
}
} elseif ($do == "category" && $action == "read") {
$cat = genrelist();
block_begin(CAT_SETTINGS);
print " <a href='admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=category&action=add'><img alt='" . CAT_INSERT_NEW . "' border='0' src='images/new.gif'></a>\n";
print "<br /><br />\n<table class='lista' width='100%' align='center'>\n";
print "<tr>\n";
print "<td class='header' align='center'>" . CAT_SORT_INDEX . "</td>\n";
print "<td class='header' align='center'>" . NAME . "</td>\n";
print "<td class='header' align='center'>" . PICTURE . "</td>\n";
print "<td class='header' align='center'>" . EDIT . "</td>\n";
print "<td class='header' align='center'>" . DELETE . "</td>\n";
print "</tr>\n";
foreach ($cat as $category) {
if ($category["sub"] != 0) {
$cate = sub_cat($category["sub"]) . " » " . security::html_safe($category["name"]);
} else {
$cate = security::html_safe($category["name"]);
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:admincp.php
示例11: search
function search($_GET, $CURUSER)
{
$cats = genrelist();
if (isset($_GET["search"])) {
$searchstr = unesc($_GET["search"]);
$cleansearchstr = searchfield($searchstr);
if (empty($cleansearchstr)) {
unset($cleansearchstr);
}
}
$orderby = "ORDER BY torrents.id DESC";
$addparam = "";
$wherea = array();
$wherecatina = array();
if (isset($_GET["incldead"]) && $_GET["incldead"] == 1) {
$addparam .= "incldead=1&";
if (!isset($CURUSER) || get_user_class() < UC_ADMINISTRATOR) {
$wherea[] = "banned != 'yes'";
}
} else {
if (isset($_GET["incldead"]) && $_GET["incldead"] == 2) {
$addparam .= "incldead=2&";
$wherea[] = "visible = 'no'";
} else {
$wherea[] = "visible = 'yes'";
}
}
$category = isset($_GET["cat"]) ? (int) $_GET["cat"] : false;
$license = isset($_GET["lic"]) ? (int) $_GET["lic"] : false;
$version = isset($_GET["ver"]) ? (int) $_GET["ver"] : false;
$user = isset($_GET["user"]) ? (int) $_GET["user"] : false;
$all = isset($_GET["all"]) ? $_GET["all"] : false;
$page_limit = isset($_GET["page_limit"]) ? $_GET["page_limit"] : false;
if (!$all) {
if (!$_GET && $CURUSER["notifs"]) {
$all = True;
foreach ($cats as $cat) {
$all &= $cat['id'];
if (strpos($CURUSER["notifs"], "[cat" . $cat['id'] . "]") !== False) {
$wherecatina[] = $cat['id'];
$addparam .= "c{$cat['id']}=1&";
}
}
} elseif ($category) {
if (!is_valid_id($category)) {
stderr("Error", "Invalid category ID.");
}
$wherecatina[] = $category;
$addparam .= "cat={$category}&";
} else {
$all = True;
foreach ($cats as $cat) {
$all &= isset($_GET["c{$cat['id']}"]);
if (isset($_GET["c{$cat['id']}"])) {
$wherecatina[] = $cat['id'];
$addparam .= "c{$cat['id']}=1&";
}
}
}
}
if ($all) {
$wherecatina = array();
$addparam = "";
}
if (count($wherecatina) > 1) {
$wherecatin = implode(",", $wherecatina);
} elseif (count($wherecatina) == 1) {
$wherea[] = "category = {$wherecatina['0']}";
}
if ($license > 0) {
$wherea[] = "license = {$license}";
}
if ($user > 0) {
$wherea[] = "owner = {$user}";
}
if ($version > 0) {
$wherea[] = "version = {$version}";
}
$wherebase = $wherea;
if (isset($cleansearchstr)) {
$wherea[] = "MATCH (search_text, ori_descr) AGAINST (" . sqlesc($searchstr) . ")";
//$wherea[] = "0";
$addparam .= "search=" . urlencode($searchstr) . "&";
$orderby = "";
/////////////// SEARCH CLOUD MALARKY //////////////////////
$searchcloud = sqlesc($cleansearchstr);
// $r = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM searchcloud WHERE searchedfor = $searchcloud"), MYSQL_NUM);
//$a = $r[0];
//if ($a)
// mysql_query("UPDATE searchcloud SET howmuch = howmuch + 1 WHERE searchedfor = $searchcloud");
//else
// mysql_query("INSERT INTO searchcloud (searchedfor, howmuch) VALUES ($searchcloud, 1)");
mysql_query("INSERT INTO searchcloud (searchedfor, howmuch) VALUES ({$searchcloud}, 1)\n ON DUPLICATE KEY UPDATE howmuch=howmuch+1");
/////////////// SEARCH CLOUD MALARKY END ///////////////////
}
$where = implode(" AND ", $wherea);
if (isset($wherecatin)) {
$where .= ($where ? " AND " : "") . "category IN(" . $wherecatin . ")";
}
if ($where != "") {
//.........这里部分代码省略.........
开发者ID:CtrlSystem,项目名称:biotorrents,代码行数:101,代码来源:search.php
示例12: delete_cat_form
function delete_cat_form()
{
global $params;
if (!isset($params['id']) or !is_valid_id($params['id'])) {
stderr('MOD ERROR', 'No category ID selected');
}
$q = @mysql_query("SELECT * FROM categories WHERE id = " . intval($params['id']));
if (false == mysql_num_rows($q)) {
stderr('MOD ERROR', 'That category does not exist or has been deleted');
}
$r = mysql_fetch_assoc($q);
$q = @mysql_query("SELECT COUNT(*) FROM torrents WHERE category = " . intval($r['id']));
$count = mysql_fetch_array($q, MYSQL_NUM);
$check = '';
if ($count[0]) {
$select = "<select name='new_cat_id'>\n<option value='0'>Select Category</option>\n";
$cats = genrelist();
foreach ($cats as $c) {
$select .= $c['id'] != $r['id'] ? "<option value='{$c["id"]}'>" . htmlentities($c['name'], ENT_QUOTES) . "</option>\n" : "";
}
$select .= "</select>\n";
$check .= "<tr>\r\n <td align='right' width='50%'>Select a new category:<br /><span style='color:red;font-weight:bold;'>Warning: There are torrents in this category, so you need to select a category to move them to.</span></td>\r\n <td>{$select}</td>\r\n </tr>";
}
$htmlout = '';
$htmlout .= "<form action='admin.php?action=categories' method='post'>\r\n <input type='hidden' name='mode' value='takedel_cat' />\r\n <input type='hidden' name='id' value='{$r['id']}' />\r\n \r\n <table class='torrenttable' align='center' width='80%' bgcolor='#cecece' cellspacing='2' cellpadding='2'>\r\n <tr>\r\n <td colspan='2' class='colhead'>You are about to delete category: " . htmlentities($r['name'], ENT_QUOTES) . "</td>\r\n </tr>\r\n <tr>\r\n <td align='right' width='50%'>Cat Name:</td>\r\n <td>" . htmlentities($r['name'], ENT_QUOTES) . "</td>\r\n </tr>\r\n <tr>\r\n <td align='right'>Description:</td>\r\n <td>" . htmlentities($r['cat_desc'], ENT_QUOTES) . "</td>\r\n </tr>\r\n <tr>\r\n <td align='right'>Image:</td>\r\n <td>" . htmlentities($r['image'], ENT_QUOTES) . "</td>\r\n </tr>\r\n {$check}\r\n <tr>\r\n <td colspan='2' align='center'>\r\n <input type='submit' class='btn' value='Delete' /><input type='button' class='btn' value='Cancel' onclick=\"history.go(-1)\" /></td>\r\n </tr>\r\n </table>\r\n </form>";
print stdhead("Deleting category {$r['name']}") . $htmlout . stdfoot();
}
开发者ID:thefkboss,项目名称:U-232,代码行数:27,代码来源:categories.php
示例13: get_searchbox_value
//whether show media or not
$showcodec = get_searchbox_value($sectiontype, 'showcodec');
//whether show codecs or not
$showstandard = get_searchbox_value($sectiontype, 'showstandard');
//whether show standards or not
$showprocessing = get_searchbox_value($sectiontype, 'showprocessing');
//whether show processings or not
$showteam = get_searchbox_value($sectiontype, 'showteam');
//whether show teams or not
$showaudiocodec = get_searchbox_value($sectiontype, 'showaudiocodec');
//whether show audio codec or not
$catsperrow = get_searchbox_value($sectiontype, 'catsperrow');
//show how many cats per line in search box
$catpadding = get_searchbox_value($sectiontype, 'catpadding');
//padding space between categories in pixel
$cats = genrelist($sectiontype);
if ($showsubcat) {
if ($showsource) {
$sources = searchbox_item_list("sources");
}
if ($showmedium) {
$media = searchbox_item_list("media");
}
if ($showcodec) {
$codecs = searchbox_item_list("codecs");
}
if ($showstandard) {
$standards = searchbox_item_list("standards");
}
if ($showprocessing) {
$processings = searchbox_item_list("processings");
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:torrents.php
示例14: tr
?>
</b></p>
<!--<p>The tracker's announce url is <b><?php
echo $announce_urls[0];
?>
</b></p>-->
<p>Please see the <a href="faq.php#up2">FAQ:Upload</a> section for more information.</p>
<table border="1" cellspacing="0" cellpadding="10">
<?php
tr("Torrent file", "<input type='file' name='file' size='80' />\n", 1);
tr("Torrent name", "<input type=\"text\" name=\"name\" size=\"80\" /><br />(Taken from filename if not specified. <b>Please use descriptive names.</b>)\n", 1);
#tr("NFO file", "<input type='file' name='nfo' size='80' /><br />(<b>Optional.</b> Can only be viewed by power users.)\n", 1);
tr("Description", "<textarea name=\"descr\" rows=\"10\" cols=\"80\"></textarea>" . "<br />(HTML/BB code is <b>not</b> allowed.)", 1);
#category
$s = "<select name=\"type\">\n<option value=\"0\">(choose one)</option>\n";
$cats = genrelist();
foreach ($cats as $row) {
$s .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n";
}
$s .= "</select>\n";
tr("Category", $s, 1);
#Morgan: license
$lic = "<select name=\"lic\">\n<option value=\"0\">(choose one)</option>\n";
$lic_cats = licenselist();
foreach ($lic_cats as $row) {
$lic .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . ' (' . htmlspecialchars($row["description"]) . ')' . "</option>\n";
}
$lic .= "</select>\n";
tr("License", $lic, 1);
#Morgan: version
$version = "<select name=\"version\">\n<option value=\"0\">(Select alternative version of this torrent)</option>\n";
开发者ID:CtrlSystem,项目名称:biotorrents,代码行数:31,代码来源:upload.php
示例15: torrenttable
function torrenttable($res, $variant = "index")
{
global $INSTALLER09, $CURUSER, $lang, $free, $mc1;
require_once INCL_DIR . 'bbcode_functions.php';
require_once CLASS_DIR . 'class_user_options_2.php';
$htmlout = $prevdate = $nuked = $free_sl
|
请发表评论