本文整理汇总了PHP中unesc函数的典型用法代码示例。如果您正苦于以下问题:PHP unesc函数的具体用法?PHP unesc怎么用?PHP unesc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了unesc函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_config_table
function update_config_table($table_name, $default_cfg, $cfg, $type)
{
foreach ($default_cfg as $config_name => $config_value) {
if (isset($_POST[$config_name]) && $_POST[$config_name] != $cfg[$config_name]) {
if ($type == 'str') {
$config_value = "'" . bt_sql_esc(unesc($_POST[$config_name])) . "'";
} else {
if ($type == 'bool') {
$config_value = $_POST[$config_name] ? 1 : 0;
} else {
if ($type == 'num') {
$config_value = round(abs(intval($_POST[$config_name])));
} else {
return;
}
}
}
$sql = "UPDATE {$table_name} SET\n\t\t\t\tconfig_value = {$config_value}\n\t\t\t\tWHERE config_name = '{$config_name}'";
if (!DB()->sql_query($sql)) {
message_die(GENERAL_ERROR, "Failed to update configuration for {$config_name}", '', __LINE__, __FILE__, $sql);
}
}
}
return;
}
示例2: _torrenttable
function _torrenttable($rt, $frame_caption, $speed = false)
{
global $STYLEPATH, $extratpl, $language;
$torrent = array();
$num = 0;
foreach ($rt as $id => $a) {
$num++;
if ($a["leechers"] > 0) {
$r = $a["seeds"] / $a["leechers"];
$ratio = number_format($r, 2);
} else {
$ratio = $language["INFINITE"];
}
$torrent[$num - 1]["rank"] = $num;
if ($GLOBALS["usepopup"]) {
$torrent[$num - 1]["filename"] = "<a href=\"javascript:popdetails('index.php?page=details&id=" . $a['hash'] . "');\">" . unesc($a["name"]) . "</a>";
} else {
$torrent[$num - 1]["filename"] = "<a href=\"index.php?page=details&id=" . $a['hash'] . "\">" . unesc($a["name"]) . "</a>";
}
$torrent[$num - 1]["complete"] = number_format($a["finished"]);
$torrent[$num - 1]["seeds"] = number_format($a["seeds"]);
$torrent[$num - 1]["leechers"] = number_format($a["leechers"]);
$torrent[$num - 1]["peers"] = number_format($a["leechers"] + $a["seeds"]);
$torrent[$num - 1]["ratio"] = $ratio;
if ($speed) {
$torrent[$num - 1]["speed"] = makesize($a["speed"]);
}
}
$extratpl->set("language", $language);
$extratpl->set("torrent", $torrent);
$extratpl->set("DISPLAY_SPEED", $speed, true);
$extratpl->set("DISPLAY_SPEED1", $speed, true);
return set_block($frame_caption, "center", $extratpl->fetch(load_template("extra-stats.torrent.tpl")));
}
示例3: read_invitations
function read_invitations()
{
global $TABLE_PREFIX, $admintpl, $language, $CURUSER, $STYLEPATH, $btit_settings;
$scriptname = htmlspecialchars($_SERVER["PHP_SELF"] . "?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=invitations");
$addparam = "";
$res = get_result("SELECT COUNT(*) as invites FROM {$TABLE_PREFIX}invitations", true);
$count = $res[0]["invites"];
list($pagertop, $pagerbottom, $limit) = pager('15', $count, $scriptname . "&");
$admintpl->set("inv_pagertop", $pagertop);
$admintpl->set("inv_pagerbottom", $pagerbottom);
$results = get_result("SELECT * FROM {$TABLE_PREFIX}invitations ORDER BY id DESC {$limit}", true);
$invitees = array();
$i = 0;
foreach ($results as $id => $data) {
$res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE id = " . $data["inviter"], true);
if (mysql_num_rows($res) > 0) {
$inviter_name = mysql_result($res, 0, 0);
} else {
$inviter_name = 'Unknown';
}
$invitees[$i]["inviter"] = "<a href=\"index.php?page=userdetails&user=" . $data["inviter"] . "\">" . $inviter_name . "</a>";
$invitees[$i]["invitee"] = unesc($data["invitee"]);
$invitees[$i]["hash"] = unesc($data["hash"]);
$invitees[$i]["time_invited"] = $data["time_invited"];
$invitees[$i]["delete"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=invitations&action=delete&id=" . $data["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
$i++;
}
$admintpl->set("invitees", $invitees);
$admintpl->set("language", $language);
}
示例4: user_with_color
function user_with_color($username, $prefix = NULL, $suffix = NULL)
{
global $TABLE_PREFIX;
if (isset($prefix) && isset($suffix)) {
return unesc($prefix . $username . $suffix);
} else {
// get cached version for the user (prefix and suffix)
$rps = get_result("SELECT prefixcolor,suffixcolor FROM {$TABLE_PREFIX}users u INNER JOIN {$TABLE_PREFIX}users_level ul ON u.id_level=ul.id WHERE u.username=" . sqlesc($username) . "", false, 0);
return unesc($rps[0]['prefixcolor'] . $username . $rps[0]['suffixcolor']);
}
}
示例5: format_shout
function format_shout($text)
{
global $smilies, $BASEURL, $privatesmilies;
$s = $text;
$s = strip_tags($s);
$s = unesc($s);
$f = @fopen("badwords.txt", "r");
if ($f && filesize("badwords.txt") != 0) {
$bw = fread($f, filesize("badwords.txt"));
$badwords = explode("\n", $bw);
for ($i = 0; $i < count($badwords); ++$i) {
$badwords[$i] = trim($badwords[$i]);
}
$s = str_replace($badwords, "*censured*", $s);
}
@fclose($f);
// [b]Bold[/b]
$s = preg_replace("/\\[b\\]((\\s|.)+?)\\[\\/b\\]/", "<b>\\1</b>", $s);
// [i]Italic[/i]
$s = preg_replace("/\\[i\\]((\\s|.)+?)\\[\\/i\\]/", "<i>\\1</i>", $s);
// [u]Underline[/u]
$s = preg_replace("/\\[u\\]((\\s|.)+?)\\[\\/u\\]/", "<u>\\1</u>", $s);
// [color=blue]Text[/color]
$s = preg_replace("/\\[color=([a-zA-Z]+)\\]((\\s|.)+?)\\[\\/color\\]/i", "<font color=\\1>\\2</font>", $s);
// [color=#ffcc99]Text[/color]
$s = preg_replace("/\\[color=(#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])\\]((\\s|.)+?)\\[\\/color\\]/i", "<font color=\\1>\\2</font>", $s);
// [url=http://www.example.com]Text[/url]
$s = preg_replace("/\\[url=((http|ftp|https|ftps|irc):\\/\\/[^<>\\s]+?)\\]((\\s|.)+?)\\[\\/url\\]/i", "<a href=\\1 target=_blank>\\3</a>", $s);
// [url]http://www.example.com[/url]
$s = preg_replace("/\\[url\\]((http|ftp|https|ftps|irc):\\/\\/[^<>\\s]+?)\\[\\/url\\]/i", "<a href=\\1 target=_blank>\\1</a>", $s);
// [url]www.example.com[/url]
$s = preg_replace("/\\[url\\](www\\.[^<>\\s]+?)\\[\\/url\\]/i", "<a href='http://\\1' target='_blank'>\\1</a>", $s);
// [url=www.example.com]Text[/url]
$s = preg_replace("/\\[url=(www\\.[^<>\\s]+?)\\]((\\s|.)+?)\\[\\/url\\]/i", "<a href='http://\\1' target='_blank'>\\2</a>", $s);
// [size=4]Text[/size]
$s = preg_replace("/\\[size=([1-7])\\]((\\s|.)+?)\\[\\/size\\]/i", "<font size=\\1>\\2</font>", $s);
// [font=Arial]Text[/font]
$s = preg_replace("/\\[font=([a-zA-Z ,]+)\\]((\\s|.)+?)\\[\\/font\\]/i", "<font face=\"\\1\">\\2</font>", $s);
// Linebreaks
$s = nl2br($s);
// Maintain spacing
$s = str_replace(" ", " ", $s);
reset($smilies);
while (list($code, $url) = each($smilies)) {
$s = str_replace($code, "<img border=\"0\" src=\"{$BASEURL}/images/smilies/{$url}\" alt=\"{$code}\" />", $s);
}
reset($privatesmilies);
while (list($code, $url) = each($privatesmilies)) {
$s = str_replace($code, "<img border=\"0\" src=\"{$BASEURL}/images/smilies/{$url}\" alt=\"{$code}\" />", $s);
}
return $s;
}
示例6: invite
function invite($email)
{
global $CURUSER;
global $SITENAME;
global $BASEURL;
global $SITEEMAIL;
global $lang_takeinvite;
$id = $CURUSER[id];
$email = unesc(htmlspecialchars(trim($email)));
$email = safe_email($email);
if (!$email) {
bark($lang_takeinvite['std_must_enter_email']);
}
if (!check_email($email)) {
bark($lang_takeinvite['std_invalid_email_address']);
}
if (EmailBanned($email)) {
bark($lang_takeinvite['std_email_address_banned']);
}
if (!EmailAllowed($email)) {
bark($lang_takeinvite['std_wrong_email_address_domains'] . allowedemails());
}
$body = "\n你好,\n\n我邀请你加入 {$SITENAME}, 这是一个拥有丰富资源的非开放社区. \n如果你有兴趣加入我们请阅读规则并确认邀请.最后,确保维持一个良好的分享率 \n分享允许的资源.\n\n欢迎到来! :)\n";
$body = str_replace("<br />", "<br />", nl2br(trim(strip_tags($body))));
if (!$body) {
bark($lang_takeinvite['std_must_enter_personal_message']);
}
// check if email addy is already in use
$a = @mysql_fetch_row(@sql_query("select count(*) from users where email=" . sqlesc($email))) or die(mysql_error());
if ($a[0] != 0) {
bark($lang_takeinvite['std_email_address'] . htmlspecialchars($email) . $lang_takeinvite['std_is_in_use']);
}
$b = @mysql_fetch_row(@sql_query("select count(*) from invites where invitee=" . sqlesc($email))) or die(mysql_error());
if ($b[0] != 0) {
bark($lang_takeinvite['std_invitation_already_sent_to'] . htmlspecialchars($email) . $lang_takeinvite['std_await_user_registeration']);
}
$ret = sql_query("SELECT username FROM users WHERE id = " . sqlesc($id)) or sqlerr();
$arr = mysql_fetch_assoc($ret);
$hash = md5(mt_rand(1, 10000) . $CURUSER['username'] . TIMENOW . $CURUSER['passhash']);
$title = $SITENAME . $lang_takeinvite['mail_tilte'];
$message = <<<EOD
{$lang_takeinvite['mail_one']}{$arr[username]}{$lang_takeinvite['mail_two']}
<b><a href="http://{$BASEURL}/signup.php?type=invite&invitenumber={$hash}" target="_blank">{$lang_takeinvite['mail_here']}</a></b><br />
http://{$BASEURL}/signup.php?type=invite&invitenumber={$hash}
<br />{$lang_takeinvite['mail_three']}{$invite_timeout}{$lang_takeinvite['mail_four']}{$arr[username]}{$lang_takeinvite['mail_five']}<br />
{$body}
<br /><br />{$lang_takeinvite['mail_six']}
EOD;
sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $message), "invitesignup", false, false, '', get_email_encode(get_langfolder_cookie()));
//this email is sent only when someone give out an invitation
sql_query("INSERT INTO invites (inviter, invitee, hash, time_invited) VALUES ('" . mysql_real_escape_string($id) . "', '" . mysql_real_escape_string($email) . "', '" . mysql_real_escape_string($hash) . "', " . sqlesc(date("Y-m-d H:i:s")) . ")");
}
示例7: sub_cat
public static function sub_cat($sub)
{
global $db;
MCached::connect();
$key = 'sub::categories::' . $sub;
$name = MCached::get($key);
if ($name === MCached::NO_RESULT) {
$c_q = @$db->query("SELECT name FROM categories WHERE id = '" . $sub . "'");
$c_q = @$c_q->fetch_array(MYSQLI_BOTH);
$name = security::html_safe(unesc($c_q["name"]));
MCached::add($key, $name, self::ONE_DAY);
}
return $name;
}
示例8: 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);
}
示例9: readGoldSettings
function readGoldSettings()
{
global $TABLE_PREFIX, $settings;
$res = get_result("SELECT * FROM {$TABLE_PREFIX}gold WHERE id='1'", true);
$count = 0;
foreach ($res as $key => $value) {
$settings[$count]["gold_picture"] = unesc("<img src='../gold/" . $value["gold_picture"] . "' border='0' alt='gold'/>\r\n \t\t\t\t\t\t\t\t\t\t <br/>Choose new picture (max size 100px x 100px):<br/><input type='file' name='gold_picture'/>");
$settings[$count]["level"] = createUsersLevelCombo(unesc($value["level"]));
$settings[$count]["silver_picture"] = unesc("<img src='../gold/" . $value["silver_picture"] . "' border='0' alt='silver'/>\r\n \t\t\t\t\t\t\t\t\t\t\t<br/>Choose new picture (max size 100px x 100px):<br/><input type='file' name='silver_picture'/>");
$settings[$count]["gold_description"] = unesc("<textarea name='gold_description' style='width:250px; height:120px; border:1px solid #999999;'>" . $value["gold_description"] . "</textarea>");
$settings[$count]["silver_description"] = unesc("<textarea name='silver_description' style='width:250px; height:120px; border:1px solid #999999;'>" . $value["silver_description"] . "</textarea>");
$settings[$count]["classic_description"] = unesc("<textarea name='classic_description' style='width:250px; height:120px; border:1px solid #999999;'>" . $value["classic_description"] . "</textarea>");
$count++;
}
}
示例10: faq_read
function faq_read()
{
global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
$admintpl->set("faq_add", false, true);
$admintpl->set("language", $language);
$cres = genrelistfaq('', 'faq_group');
for ($i = 0; $i < count($cres); $i++) {
$cres[$i]["name"] = unesc($cres[$i]["title"]);
$cres[$i]["edit"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=faq_group&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=faq_group&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("faq", $cres);
$admintpl->set("faq_add_new", "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=faq_group&action=add\">" . $language["FAQ_ADD"] . "</a>");
unset($cres);
}
示例11: 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);
}
示例12: read_styles
function read_styles()
{
global $TABLE_PREFIX, $language, $CURUSER, $admintpl, $STYLEPATH;
$sres = style_list();
for ($i = 0; $i < count($sres); $i++) {
$res = do_sqlquery("SELECT COUNT(*) FROM {$TABLE_PREFIX}users WHERE style = " . $sres[$i]["id"], true);
$sres[$i]["style_users"] = mysql_result($res, 0, 0);
$sres[$i]["style"] = unesc($sres[$i]["style"]);
$sres[$i]["style_url"] = unesc($sres[$i]["style_url"]);
$sres[$i]["edit"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=style&action=edit&id=" . $sres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
$sres[$i]["delete"] = "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=style&action=delete&id=" . $sres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
}
$admintpl->set("style_add", false, true);
$admintpl->set("language", $language);
$admintpl->set("styles", $sres);
$admintpl->set("style_add_new", "<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=style&action=add\">" . $language["STYLE_ADD"] . "</a>");
unset($sres);
mysql_free_result($res);
}
示例13: comment_form
function comment_form()
{
global $comment, $id, $cid;
block_begin(NEW_COMMENT);
$comment = str_replace('\\r\\n', "\n", $comment);
?>
<center>
<form enctype='multipart/form-data' name='comment' method='post'>
<input type='hidden' name='info_hash' value='<?php
echo $id;
?>
' />
<table class='lista' border='0' cellpadding='10'>
<tr>
<tr><td align='left' class='header'><?php
echo USER_NAME;
?>
:</td><td class='lista' align='left'><input name='user' type='text' value='<?php
echo security::html_safe($_GET["usern"]);
?>
' size='20' maxlength='100' disabled; readonly></td></tr>
<tr><td align='left' class='header'><?php
echo COMMENT_1;
?>
:</td><td class='lista' align='left'><?php
textbbcode("comment", "comment", security::html_safe(unesc($comment)));
?>
</td></tr>
<tr><td class='header' colspan='2' align='center'><input type='submit' name='confirm' value='<?php
echo FRM_CONFIRM;
?>
' /> <input type='submit' name='confirm' value='<?php
echo FRM_PREVIEW;
?>
' /></td></tr>
</table>
</form>
</center>
<?php
block_end();
}
示例14: 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);
}
示例15: catnumber
function catnumber($val = "")
{
global $TABLE_PREFIX;
print "<div id=catnumber style=\"width:100%;overflow:auto\" align=left><table class=\"lista\" cellpadding=\"2\" cellspacing=\"1\" style=\"width:100%;\" align=left>";
$c_q = @mysql_query("SELECT * FROM {$TABLE_PREFIX}categories WHERE sub='0' ORDER BY sort_index ASC");
while ($c = mysql_fetch_array($c_q)) {
$cid = $c["id"];
$name = unesc($c["name"]);
// lets see if it has sub-categories.
$s_q = mysql_query("SELECT * FROM {$TABLE_PREFIX}categories WHERE sub='{$cid}'");
$s_t = mysql_num_rows($s_q);
$res = mysql_query("select count(*) as allincat FROM {$TABLE_PREFIX}files where category=" . $cid);
if ($res) {
$row = mysql_fetch_array($res);
$totalall = $row["allincat"];
} else {
$totalall = 0;
}
if ($s_t == 0) {
print "<tr><td class=lista align=left><a href='index.php?page=torrents&category={$cid}'><font style=\"font-size:11px;\">" . $name . "</font></a></td><td class=lista align=right><b>" . $totalall . "</b> </td></tr>";
} else {
print "<tr><td class=lista align=left colspan=2><font style=\"font-size:11px;\"><b>" . $name . " :</b></font></td></tr>";
// print("<tr><td class=lista align=left colspan=2><a href='torrents.php?category=$cid'><font style=\"font-size:11px;\">".$name." :</font></a></td></tr>");
while ($s = mysql_fetch_array($s_q)) {
$sub = $s["id"];
$name = unesc($s["name"]);
$name2 = unesc($c["name"]);
$res = mysql_query("select count(*) as allincat2 FROM {$TABLE_PREFIX}files where category=" . $sub);
if ($res) {
$row = mysql_fetch_array($res);
$totalall2 = $row["allincat2"];
} else {
$totalall2 = 0;
}
print "<tr><td class=lista align=left> » <a href='index.php?page=torrents&category={$sub}'><font style=\"font-size:11px;\">" . $name . "</font></a></td><td class=lista align=right><b>" . $totalall2 . "</b> </td></tr>";
}
}
}
print "</table></div>";
}