本文整理汇总了PHP中get_user_class_name函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_class_name函数的具体用法?PHP get_user_class_name怎么用?PHP get_user_class_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_user_class_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: classes2name
function classes2name($min, $max)
{
global $sent2classes;
for ($i = $min; $i < $max + 1; $i++) {
$sent2classes[] = get_user_class_name($i);
}
}
示例2: usercommenttable
function usercommenttable($rows)
{
global $CURUSER, $pic_base_url, $userid;
begin_main_frame();
begin_frame();
$count = 0;
foreach ($rows as $row) {
echo "<p class=sub>#" . $row["id"] . " by ";
if (isset($row["username"])) {
$title = $row["title"];
if ($title == "") {
$title = get_user_class_name($row["class"]);
} else {
$title = safeChar($title);
}
echo "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . "><b>" . safeChar($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$pic_base_url}star.gif\" alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "\"{$pic_base_url}warned.gif\" alt=\"Warned\">" : "") . " ({$title})\n";
} else {
echo "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n";
}
echo " at " . $row["added"] . " GMT" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=edit&cid={$row['id']}>Edit</a>]" : "") . ($userid == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=delete&cid={$row['id']}>Delete</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=vieworiginal&cid={$row['id']}>View original</a>]" : "") . "</p>\n";
$avatar = $CURUSER["avatars"] == "yes" ? safeChar($row["avatar"]) : "";
$text = format_comment($row["text"]);
if ($row["editedby"]) {
$text .= "<p><font size=1 class=small>Last edited by <a href=userdetails.php?id={$row['editedby']}><b>{$row['username']}</b></a> at {$row['editedat']} GMT</font></p>\n";
}
begin_table(true);
echo "<tr valign=top>\n";
echo "<td align=center width=150 style='padding: 0px'><img width=150 src=\"{$avatar}\"></td>\n";
echo "<td class=text>{$text}</td>\n";
echo "</tr>\n";
end_table();
}
end_frame();
end_main_frame();
}
示例3: commenttable
function commenttable($rows, $redaktor = "comment")
{
global $CURUSER, $avatar_max_width;
$count = 0;
foreach ($rows as $row) {
if ($row["downloaded"] > 0) {
$ratio = $row['uploaded'] / $row['downloaded'];
$ratio = number_format($ratio, 2);
} elseif ($row["uploaded"] > 0) {
$ratio = "Inf.";
} else {
$ratio = "---";
}
if (strtotime($row["last_access"]) > gmtime() - 600) {
$online = "online";
$online_text = "В сети";
} else {
$online = "offline";
$online_text = "Не в сети";
}
print "<table class=maibaugrand width=100% border=1 cellspacing=0 cellpadding=3>";
print "<tr><td class=colhead align=\"left\" colspan=\"2\" height=\"24\">";
if (isset($row["username"])) {
$title = $row["title"];
if ($title == "") {
$title = get_user_class_name($row["class"]);
} else {
$title = htmlspecialchars_uni($title);
}
print ":: <img src=\"pic/buttons/button_" . $online . ".gif\" alt=\"" . $online_text . "\" title=\"" . $online_text . "\" style=\"position: relative; top: 2px;\" border=\"0\" height=\"14\">" . " <a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . " class=altlink_white><b>" . get_user_class_color($row["class"], htmlspecialchars_uni($row["username"])) . "</b></a> ::" . ($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=\"/pic/warned.gif\" alt=\"Warned\">" : "") . " {$title} ::\n" . " <img src=\"pic/upl.gif\" alt=\"upload\" border=\"0\" width=\"12\" height=\"12\"> " . mksize($row["uploaded"]) . " :: <img src=\"pic/down.gif\" alt=\"download\" border=\"0\" width=\"12\" height=\"12\"> " . mksize($row["downloaded"]) . " :: <font color=\"" . get_ratio_color($ratio) . "\">{$ratio}</font> :: ";
} else {
print "<a name=\"comm" . $row["id"] . "\"><i>[Anonymous]</i></a>\n";
}
$avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars_uni($row["avatar"]) : "";
if (!$avatar) {
$avatar = "pic/default_avatar.gif";
}
if (md5($row['text']) == $row['text_hash']) {
$text = $row['text_parsed'];
} else {
$text = format_comment($row['text']);
sql_query('INSERT INTO comments_parsed (cid, text_hash, text_parsed) VALUES (' . implode(', ', array_map('sqlesc', array($row['id'], md5($row['text']), $text))) . ')') or sqlerr(__FILE__, __LINE__);
}
if ($row["editedby"]) {
//$res = mysql_fetch_assoc(sql_query("SELECT * FROM users WHERE id = $row[editedby]")) or sqlerr(__FILE__,__LINE__);
$text .= "<p><font size=1 class=small>Последний раз редактировалось <a href=userdetails.php?id={$row['editedby']}><b>{$row['editedbyname']}</b></a> в {$row['editedat']}</font></p>\n";
}
print "</td></tr>";
print "<tr valign=top>\n";
print "<td style=\"padding: 0px; width: 5%;\" align=\"center\"><img src={$avatar} width=\"{$avatar_max_width}\"> </td>\n";
print "<td width=100% class=text>";
//print("<span style=\"float: right\"><a href=\"#top\"><img title=\"Top\" src=\"pic/top.gif\" alt=\"Top\" border=\"0\" width=\"15\" height=\"13\"></a></span>");
print "{$text}</td>\n";
print "</tr>\n";
print "<tr><td class=colhead align=\"center\" colspan=\"2\">";
print "<div style=\"float: left; width: auto;\">" . ($CURUSER ? " [<a href=\"" . $redaktor . ".php?action=quote&cid={$row['id']}\" class=\"altlink_white\">Цитата</a>]" : "") . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? " [<a href=" . $redaktor . ".php?action=edit&cid={$row['id']} class=\"altlink_white\">Изменить</a>]" : "") . (get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=delete&cid={$row['id']}\" class=\"altlink_white\">Удалить</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=vieworiginal&cid={$row['id']}\" class=\"altlink_white\">Оригинал</a>]" : "") . (get_user_class() >= UC_MODERATOR ? " IP: " . ($row["ip"] ? "<a href=\"usersearch.php?ip={$row['ip']}\" class=\"altlink_white\">" . $row["ip"] . "</a>" : "Неизвестен") : "") . "</div>";
print "<div align=\"right\"><!--<font size=1 class=small>-->Комментарий добавлен: " . $row["added"] . " GMT<!--</font>--></td></tr>";
print "</table><br>";
}
}
示例4: reqcommenttable
function reqcommenttable($rows)
{
global $CURUSER, $HTTP_SERVER_VARS;
begin_main_frame();
begin_frame();
$count = 0;
foreach ($rows as $row) {
print("<p class=sub>#" . $row["id"] . " bY: ");
if (isset($row["username"])) {
$username = $row["username"];
$ratres = mysql_query("SELECT uploaded, downloaded FROM users WHERE username='$username'");
$rat = mysql_fetch_array($ratres);
if ($rat["downloaded"] > 0) {
$ratio = $rat['uploaded'] / $rat['downloaded'];
$ratio = number_format($ratio, 3);
$color = get_ratio_color($ratio);
if ($color)
$ratio = "<font color=$color>$ratio</font>";
} else
if ($rat["uploaded"] > 0)
$ratio = "Inf.";
else
$ratio = "---";
$title = $row["title"];
if ($title == "")
$title = get_user_class_name($row["class"]);
else
$title = htmlspecialchars($title);
print("<a name=comm".$row["id"]." href=userdetails.php?id=".$row["user"]."><b>".htmlspecialchars($row["username"])."</b></a>".($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "").($row["warned"] == "yes" ? "<img src="."/pic/warned.gif alt=\"Warned\">" : "")." ($title) (Ratio: $ratio)\n");
} else
print("<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n");
print(" at " . $row["added"] . " GMT" .($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=edit&cid=$row[id]>Edit</a>]" : "") .(get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=delete&cid=$row[id]>Delete</a>]" : "") . "</p>\n");$avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : "");
if (!$avatar)
$avatar = "/pic/default_avatar.gif";
$text = format_comment($row["text"]);
begin_table(true);
print("<tr valign=top>\n");
print("<td align=center width=150 style='padding: 0px'><img width=150 src=$avatar></td>\n");
print("<td class=text>$text</td>\n");
print("</tr>\n");
end_table();
}
end_frame();
end_main_frame();
}
示例5: check_admins
function check_admins($flag = true, $usertypes = "")
{
//$flag=false 表示是否为论坛版主,否则为各等级管理员;
global $lang_signin;
global $CURUSER;
if ($flag) {
if (get_user_class() < 12) {
stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_only'] . get_user_class_name(12, false, true, true) . $lang_signin['std_or_above_can_view'], false, false, true, true);
}
} elseif ($usertypes == "admin") {
if (get_user_class() < 14) {
stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_onlyadmin'] . get_user_class_name(14, false, true, true) . $lang_signin['std_or_admin_can_view'], false, false, true, true);
}
return true;
//不是管理员
} elseif ($usertypes == "forumman") {
//以下内容不在等级系统中
$mysql = "SELECT * FROM forummods WHERE forummods.userid = '" . $CURUSER['id'] . "'";
$res = mysql_query($mysql);
if ("" == mysql_fetch_array($res)) {
return false;
//bu是论坛版主
}
return true;
//确实是论坛版主
} elseif ($usertypes == "picker") {
$mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.picker = 'yes'";
$res = mysql_query($mysql);
if ("" == mysql_fetch_array($res)) {
return false;
//不是保种员
}
return true;
//确实是保种员
} elseif ($usertypes == "support") {
$mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.support = 'yes'";
$res = mysql_query($mysql);
if ("" == mysql_fetch_array($res)) {
return false;
//不是保种员
}
return true;
//确实是保种员
}
}
示例6: autoinvites
function autoinvites($interval, $minlimit, $maxlimit, $minratio, $invites, $maxinvites)
{
$time = gmtime() - $interval * 86400;
$minlimit = $minlimit * 1024 * 1024 * 1024;
$maxlimit = $maxlimit * 1024 * 1024 * 1024;
$res = SQL_Query_exec("SELECT id, username, class, invites FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND downloaded >= {$minlimit} AND downloaded < {$maxlimit} AND uploaded / downloaded >= {$minratio} AND warned = 'no' AND UNIX_TIMESTAMP(invitedate) <= {$time}");
if (mysql_num_rows($res) > 0) {
while ($arr = mysql_fetch_assoc($res)) {
$maxninvites = $maxinvites[$arr['class']];
if ($arr['invites'] >= $maxninvites) {
continue;
}
if ($maxninvites - $arr['invites'] < $invites) {
$invites = $maxninvites - $arr['invites'];
}
SQL_Query_exec("UPDATE users SET invites = invites+{$invites}, invitedate = NOW() WHERE id={$arr['id']}");
write_log("Gave {$invites} invites to '{$arr['username']}' - Class: " . get_user_class_name($arr['class']) . "");
}
}
}
示例7: usercommenttable
function usercommenttable($rows)
{
$htmlout = '';
global $CURUSER, $INSTALLER09, $userid, $lang;
$htmlout .= "<table class='main' width='750' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'>";
$htmlout .= begin_frame();
$count = 0;
foreach ($rows as $row) {
$htmlout .= "<p class='sub'>#" . (int) $row["id"] . " by ";
if (isset($row["username"])) {
$title = $row["title"];
if ($title == "") {
$title = get_user_class_name($row["class"]);
} else {
$title = htmlsafechars($title);
}
$htmlout .= "<a name='comm" . (int) $row['id'] . "' href='userdetails.php?id=" . (int) $row['user'] . "'><b>" . htmlsafechars($row['username']) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$INSTALLER09['pic_base_url']}star.gif\" alt='{$lang['userdetails_donor']}' />" : "") . ($row["warned"] >= "1" ? "<img src=" . "\"{$INSTALLER09['pic_base_url']}warned.gif\" alt=\"{$lang['userdetails_warned']}\" />" : "") . " ({$title})\n";
} else {
$htmlout .= "<a name=\"comm" . (int) $row["id"] . "\"><i>{$lang['userdetails_orphaned']}</i></a>\n";
}
$htmlout .= " " . get_date($row["added"], 'DATE', 0, 1) . "" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=edit&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_edit']}</a>]" : "") . ($userid == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=delete&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_delete']}</a>]" : "") . ($row["editedby"] && $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=vieworiginal&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_voriginal']}</a>]" : "") . "</p>\n";
$avatar = $CURUSER["avatars"] == "yes" ? htmlsafechars($row["avatar"]) : "";
if (!$avatar) {
$avatar = "{$INSTALLER09['pic_base_url']}default_avatar.gif";
}
$text = format_comment($row["text"]);
if ($row["editedby"]) {
$text .= "<font size='1' class='small'><br /><br />{$lang['userdetails_comm_ledited']}<a href='userdetails.php?id=" . (int) $row['editedby'] . "'><b>" . htmlsafechars($row['username']) . "</b></a> " . get_date($row['editedat'], 'DATE', 0, 1) . "</font>\n";
}
$htmlout .= "<table width='100%' border='1' cellspacing='0' cellpadding='5'>";
$htmlout .= "<tr valign='top'>\n";
$htmlout .= "<td align='center' width='150' style='padding:0px'><img width='150' src=\"{$avatar}\" alt=\"Avatar\" /></td>\n";
$htmlout .= "<td class='text'>{$text}</td>\n";
$htmlout .= "</tr>\n";
$htmlout .= "</table>";
}
$htmlout .= end_frame();
$htmlout .= "</td></tr></table>";
return $htmlout;
}
示例8: tr_small
if ($showmovies['hot'] == "yes" || $showmovies['classic'] == "yes") {
tr_small($lang_usercp['row_recommended_movies'], ($showmovies['hot'] == "yes" ? "<input type=checkbox name=show_hot" . ($CURUSER["showhot"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['checkbox_show_hot'] . " " : "") . ($showmovies['classic'] == "yes" ? "<input type=checkbox name=show_classic" . ($CURUSER["showclassic"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['checkbox_show_classic'] . " " : ""), 1);
}
tr_small($lang_usercp['row_pm_boxes'], $lang_usercp['text_show'] . "<input type=text name=pmnum size=5 value=" . $CURUSER['pmnum'] . " >" . $lang_usercp['text_pms_per_page'], 1);
if ($showshoutbox_main == "yes") {
//system side setting for shoutbox
tr_small($lang_usercp['row_shoutbox'], $lang_usercp['text_show_last'] . "<input type=text name=sbnum size=5 value=" . $CURUSER['sbnum'] . " >" . $lang_usercp['text_messages_at_shoutbox'] . "<br />" . $lang_usercp['text_refresh_shoutbox_every'] . "<input type=text name=sbrefresh size=5 value=" . $CURUSER['sbrefresh'] . " >" . $lang_usercp['text_seconds'] . ($showhelpbox_main == 'yes' ? "<br /><input type=checkbox name=hidehb" . ($CURUSER["hidehb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_hide_helpbox_messages'] : ""), 1);
}
if ($showfunbox_main == 'yes') {
//siteside setting for funbox
tr_small($lang_usercp['row_funbox'], "<input type=checkbox name=showfb" . ($CURUSER["showfb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_funbox'], 1);
}
tr_small($lang_usercp['row_torrent_detail'], "<input type=checkbox name=showdescription" . ($CURUSER["showdescription"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_description'] . "<br />" . ($enablenfo_main == 'yes' && get_user_class() >= UC_POWER_USER ? "<input type=checkbox name=shownfo" . ($CURUSER["shownfo"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_nfo'] . "<br />" : "") . ($showextinfo['imdb'] == 'yes' ? "<input type=checkbox name=showimdb" . ($CURUSER["showimdb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_imdb_info'] . "<br />" : "") . ($showextinfo['douban'] == 'yes' ? "<input type=checkbox name=showdouban" . ($CURUSER["showdouban"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_douban_info'] : ""), 1);
tr_small($lang_usercp['row_discuss'], "<input type=checkbox name=showcomment" . ($CURUSER["showcomment"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_comments'], 1);
if ($enablead_advertisement == 'yes') {
tr_small($lang_usercp['row_show_advertisements'], "<input type=\"checkbox\" name=\"showad\"" . ($CURUSER["noad"] == "yes" ? "" : " checked=\"checked\"") . ($showaddisabled ? " disabled=\"disabled\"" : "") . " value=\"yes\" />" . $lang_usercp['text_show_advertisement_note'] . ($enablenoad_advertisement == 'yes' ? "<br />" . get_user_class_name($noad_advertisement, false, true, true) . $lang_usercp['text_can_turn_off_advertisement'] : "") . ($enablebonusnoad_advertisement == 'yes' ? "<br />" . get_user_class_name($bonusnoad_advertisement, false, true, true) . $lang_usercp['text_buy_no_advertisement'] . "<a href=\"mybonus.php\"><b>" . $lang_usercp['text_bonus_center'] . "</b></a>" : ""), 1);
}
tr_small($lang_usercp['row_time_type'], "<input type=radio name=timetype " . ($CURUSER['timetype'] == 'timeadded' ? " checked" : "") . " value=timeadded>" . $lang_usercp['text_time_added'] . " <input type=radio name=timetype " . ($CURUSER['timetype'] == 'timealive' ? " checked" : "") . " value=timealive>" . $lang_usercp['text_time_elapsed'] . "<br />", 1);
//Setting for browse page
tr_small($lang_usercp['row_browse_page'], $lang_usercp['text_browse_setting_warning'] . "\n\t\t<br /><b>" . $lang_usercp['row_torrent_page'] . ": </b><br />" . $lang_usercp['text_show'] . "<input type=text size=5 name=torrentsperpage value=" . $CURUSER['torrentsperpage'] . "> " . $lang_usercp['text_torrents_per_page'] . $lang_usercp['text_zero_equals_default'] . "<br />" . ($showtooltipsetting ? "<b>" . $lang_usercp['text_tooltip_type'] . "</b>: <br />" . ($showextinfo['imdb'] == 'yes' ? "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'minorimdb' ? " checked" : "") . " value=minorimdb>" . $lang_usercp['text_minor_imdb_info'] . "<br /><input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'medianimdb' ? " checked" : "") . " value=medianimdb>" . $lang_usercp['text_median_imdb_info'] . "<br />" : "") . ($showextinfo['douban'] == 'yes' ? "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'minorimdb' ? "" : ($CURUSER['tooltip'] == 'minordouban' ? "checked" : "")) . " value=minordouban>" . $lang_usercp['text_minor_douban_info'] . "<br /><input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'medianimdb' ? "" : ($CURUSER['tooltip'] == 'mediandouban' ? "checked" : "")) . " value=mediandouban>" . $lang_usercp['text_median_douban_info'] . "<br />" : "") . "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'off' ? " checked" : "") . " value=off>" . $lang_usercp['text_off'] . "<br />" : "") . "<b>" . $lang_usercp['text_append_words_to_torrents'] . ": </b><br /><input type=checkbox name=appendsticky " . ($CURUSER['appendsticky'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_sticky'] . "<br /><input type=checkbox name=appendnew " . ($CURUSER['appendnew'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_new'] . "<br />" . $lang_usercp['text_torrents_on_promotion'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'highlight' ? " checked" : "") . " value='highlight'>" . $lang_usercp['text_highlight'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'word' ? " checked" : "") . " value='word'>" . $lang_usercp['text_append_words'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'icon' ? " checked" : "") . " value='icon'>" . $lang_usercp['text_append_icon'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'off' ? " checked" : "") . " value='off'>" . $lang_usercp['text_no_mark'] . "<br /><input type=checkbox name=appendpicked " . ($CURUSER['appendpicked'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_picked'] . "<br />\n\t\t<b>" . $lang_usercp['text_show_title'] . ": </b><br />" . "<input type=checkbox name=smalldescr " . ($CURUSER['showsmalldescr'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_small_description'] . "<br />\n\t\t<b>" . $lang_usercp['text_show_action_icons'] . ": </b><br />" . "<input type=checkbox name=dlicon " . ($CURUSER['dlicon'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_download_icon'] . " <img class=\"download\" src=\"pic/trans.gif\" alt=\"Download\" /><br /><input type=checkbox name=bmicon " . ($CURUSER['bmicon'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_bookmark_icon'] . " <img class=\"bookmark\" src=\"pic/trans.gif\" alt=\"Bookmark\" /><br />\n\t\t<b>" . $lang_usercp['text_comments_reviews'] . ": </b><br /><input type=checkbox name=showcomnum " . ($CURUSER['showcomnum'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_comment_number'] . ($showtooltipsetting ? "<select name=\"showlastcom\" style=\"width: 70px;\"><option value=\"yes\" " . ($CURUSER['showlastcom'] != 'no' ? " selected" : "") . ">" . $lang_usercp['select_with'] . "</option><option value=\"no\" " . ($CURUSER['showlastcom'] == 'no' ? " selected" : "") . ">" . $lang_usercp['select_without'] . "</option></select>" . $lang_usercp['text_last_comment_on_tooltip'] : ""), 1);
submit();
print "</table>";
stdfoot();
die;
break;
case "forum":
if ($enabletooltip_tweak == 'yes') {
$showtooltipsetting = true;
} else {
$showtooltipsetting = false;
}
示例9: elseif
} elseif (isset($takesubtitleid) && isset($takereason)) {
takereport($takesubtitleid, 'subtitle', $takereason);
} elseif (isset($user)) {
int_check($user);
if ($user == $CURUSER[id]) {
stderr($lang_report['std_sorry'], $lang_report['std_cannot_report_oneself']);
die;
}
$res = sql_query("SELECT username, class FROM users WHERE id=" . sqlesc($user)) or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
stderr($lang_report['std_error'], $lang_report['std_invalid_user_id']);
die;
}
$arr = mysql_fetch_assoc($res);
if ($arr["class"] >= $staffmem_class) {
stderr($lang_report['std_sorry'], $lang_report['std_cannot_report'] . get_user_class_name($arr["class"], false, true, true), false);
die;
} else {
stderr($lang_report['std_are_you_sure'], $lang_report['text_are_you_sure_user'] . get_username(htmlspecialchars($user)) . $lang_report['text_to_staff'] . "<br />" . $lang_report['text_not_for_leechers'] . "<br />" . $lang_report['text_reason_note'] . "<br /><form method=post action=report.php><input type=hidden name=takeuser value=\"" . htmlspecialchars($user) . "\">" . $lang_report['text_reason_is'] . "<input type=text style=\"width: 200px\" name=reason><input type=submit value=\"" . $lang_report['submit_confirm'] . "\"></form>", false);
}
} elseif (isset($torrent)) {
int_check($torrent);
$res = sql_query("SELECT name FROM torrents WHERE id=" . sqlesc($torrent));
if (mysql_num_rows($res) == 0) {
stderr($lang_report['std_error'], $lang_report['std_invalid_torrent_id']);
die;
}
$arr = mysql_fetch_array($res);
stderr($lang_report['std_are_you_sure'], $lang_report['text_are_you_sure_torrent'] . "<a href=details.php?id=" . htmlspecialchars($torrent) . "><b>" . htmlspecialchars($arr[name]) . "</b></a>" . $lang_report['text_to_staff'] . "<br />" . $lang_report['text_reason_note'] . "<br /><form method=post action=report.php><input type=hidden name=taketorrent value=\"" . htmlspecialchars($torrent) . "\">" . $lang_report['text_reason_is'] . "<input type=text style=\"width: 200px\" name=reason><input type=submit value=\"" . $lang_report['submit_confirm'] . "\"></form>", false);
} elseif (isset($forumpost)) {
int_check($forumpost);
示例10: while
<tr>
<td class="one" align="center" valign="top" colspan="4">
<img src="pic/smilies/shit.gif" alt="*" /> Your shit list is empty. <img src="pic/smilies/shit.gif" alt="*" /></td>
</tr>';
} else {
while ($shit_list = mysqli_fetch_array($res)) {
$shit = '';
for ($poop = 1; $poop <= $shit_list['shittyness']; $poop++) {
$shit .= ' <img src="pic/smilies/shit.gif" title="' . (int) $shit_list['shittyness'] . ' out of 10 on the sittyness scale" alt="*" />';
}
$HTMLOUT .= ($i % 2 == 1 ? '<tr>' : '') . '
<td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="center" valign="top" width="80">' . avatar_stuff($shit_list) . '
' . print_user_stuff($shit_list) . '
<b> [ ' . get_user_class_name($shit_list['class']) . ' ]</b>
<a class="altlink" href="staffpanel.php?tool=shit_list&action=shit_list&action2=delete&shit_list_id=' . (int) $shit_list['suspect_id'] . '" title="remove this toad from your shit list">Remove</a>
<a class="altlink" href="sendmessage.php?receiver=' . (int) $shit_list['suspect_id'] . '" title="send a PM to this evil toad">Send PM</a></td>
<td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="left" valign="top">' . $shit . '
<b>joined:</b> ' . get_date($shit_list['added'], '') . '
[ ' . get_date($shit_list['added'], '', 0, 1) . ' ]
<b>added to shit list:</b> ' . get_date($shit_list['shit_list_added'], '') . '
[ ' . get_date($shit_list['shit_list_added'], '', 0, 1) . ' ]
示例11: format_comment
//==
}
$body = $arr['bbcode'] == 'yes' ? format_comment($arr['body']) : format_comment_no_bbcode($arr['body']);
$post_id = (int) $arr['post_id'];
$width = 100;
$HTMLOUT .= '<tr>
<td class="forum_head_dark" colspan="3" align="left">' . $lang['fe_forum'] . ':
<a class="altlink" href="forums.php?action=view_forum&forum_id=' . (int) $arr['forum_id'] . '" title="' . $lang['fe_link_to_forum'] . '">
<span style="color: white;font-weight: bold;">' . htmlsafechars($arr['forum_name'], ENT_QUOTES) . '</span></a>
' . $lang['fe_topic'] . ': <a class="altlink" href="forums.php?action=view_topic&topic_id=' . (int) $arr['topic_id'] . '" title="' . $lang['fe_link_to_forum'] . '">
<span style="color: white;font-weight: bold;">' . htmlsafechars($arr['topic_name'], ENT_QUOTES) . '</span></a>' . $topic_status_image . '</td>
</tr>
<tr>
<td class="forum_head" align="left" width="100" valign="middle"><a name="' . $post_id . '"></a></td>
<td class="forum_head" align="left" valign="middle"> <span style="white-space:nowrap;">' . $post_icon . '
<a class="altlink" href="forums.php?action=view_topic&topic_id=' . (int) $arr['topic_id'] . '&page=' . $page . '#' . (int) $arr['post_id'] . '" title="' . $lang['fe_link_to_post'] . '">
' . $post_title . '</a> ' . $post_status_image . ' ' . $lang['fe_posted_on'] . ': ' . get_date($arr['added'], '') . ' [' . get_date($arr['added'], '', 0, 1) . ']</span></td>
<td class="forum_head" align="right" valign="middle"><span style="white-space:nowrap;">
<a href="forums.php?action=view_my_posts&page=' . $page . '#top"><img src="pic/forums/up.gif" alt="' . $lang['fe_top'] . '" /></a>
<a href="forums.php?action=view_my_posts&page=' . $page . '#bottom"><img src="pic/forums/down.gif" alt="' . $lang['fe_bottom'] . '" /></a></span></td>
</tr>
<tr>
<td class="' . $class_alt . '" align="center" width="100px" valign="top">' . ($arr['anonymous'] == 'yes' ? '<img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" />' : avatar_stuff($user_arr)) . '<br />' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : print_user_stuff($user_arr)) . ($arr['anonymous'] == 'yes' || $user_arr['title'] == '' ? '' : '<br /><span style=" font-size: xx-small;">[' . htmlsafechars($user_arr['title']) . ']</span>') . '<br /><span style="font-weight: bold;">' . ($arr['anonymous'] == 'yes' ? '' : get_user_class_name($user_arr['class'])) . '</span><br /></td>
<td class="' . $post_status . '" align="left" valign="top" colspan="2">' . $body . $edited_by . '</td>
</tr>
<tr>
<td class="' . $class_alt . '" align="right" valign="middle" colspan="3"></td>
</tr>';
}
//=== end while loop
$HTMLOUT .= $the_top_and_bottom . '</table><a name="bottom"></a><br />' . $links . '<br />';
示例12: stderr
if (isset($_POST['modcomment']) && ($modcomment = $_POST['modcomment'])) {
} else {
$modcomment = "";
}
// Set class
if (isset($_POST['class']) && ($class = $_POST['class']) != $user['class']) {
if ($CURUSER['class'] < UC_SYSOP && $user['class'] >= $CURUSER['class']) {
stderr("{$lang['modtask_user_error']}", "{$lang['modtask_try_again']}");
}
// Notify user
$what = $class > $user['class'] ? "{$lang['modtask_promoted']}" : "{$lang['modtask_demoted']}";
$msg = sqlesc(sprintf($lang['modtask_have_been'], $what) . " '" . get_user_class_name($class) . "' {$lang['modtask_by']} " . $CURUSER['username']);
$added = time();
mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES(0, {$userid}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__);
$updateset[] = "class = " . sqlesc($class);
$modcomment = get_date(time(), 'DATE', 1) . " - {$what} to '" . get_user_class_name($class) . "' by {$CURUSER['username']}.\n" . $modcomment;
}
// Clear Warning - Code not called for setting warning
if (isset($_POST['warned']) && ($warned = $_POST['warned']) != $user['warned']) {
$updateset[] = "warned = " . sqlesc($warned);
$updateset[] = "warneduntil = 0";
if ($warned == 'no') {
$modcomment = get_date(time(), 'DATE', 1) . "{$lang['modtask_warned']}" . $CURUSER['username'] . ".\n" . $modcomment;
$msg = sqlesc("{$lang['modtask_warned_removed']}" . $CURUSER['username'] . ".");
$added = time();
mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES (0, {$userid}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__);
}
}
// Reset LastUpload
// Auto Demote Uploader by XiaNYdE // start
// support - http://bit.ly/5NtmgT
示例13: get_user_class_name
} else {
$userbar = '<center><form method="post" action="takelogin.php">
<br />
' . $tracker_lang['username'] . ': <br />
<input type="text" size=20 name="username" /><br />
' . $tracker_lang['password'] . ': <br />
<input type="password" size=20 name="password" /><br />
<input type="submit" value="' . $tracker_lang['login'] . '!" class=\\"btn\\"><br /><br />
</form></center>
<a class="menu" href="signup.php"><center>' . $tracker_lang['signup'] . '</center></a>';
}
if ($CURUSER['override_class'] != 255) {
$usrclass = " <img src=\"pic/warning.gif\" title=" . get_user_class_name($CURUSER['class']) . " alt=" . get_user_class_name($CURUSER['class']) . "> ";
} elseif (get_user_class() >= UC_MODERATOR) {
$usrclass = " <a href=\"setclass.php\"><img src=\"pic/warning.gif\" title=\"" . get_user_class_name($CURUSER['class']) . "\" alt=\"" . get_user_class_name($CURUSER['class']) . "\" border=\"0\"></a> ";
}
blok_menu($tracker_lang['welcome_back'] . ($CURUSER ? "<a href=\"{$DEFAULTBASEURL}/userdetails.php?id=" . $CURUSER["id"] . "\">" . $CURUSER["username"] . "</a> " . $usrclass . " " : "гость") . $medaldon . $warn, $userbar, "155");
echo "<br />";
$mainmenu = "<a class=\"menu\" href=\"index.php\"> " . $tracker_lang['homepage'] . "</a>" . "<a class=\"menu\" href=\"browse.php\"> " . $tracker_lang['browse'] . "</a>" . "<a class=\"menu\" href=\"log.php\"> " . $tracker_lang['log'] . "</a>" . "<a class=\"menu\" href=\"rules.php\"> " . $tracker_lang['rules'] . "</a>" . "<a class=\"menu\" href=\"faq.php\"> " . $tracker_lang['faq'] . "</a>" . "<a class=\"menu\" href=\"topten.php\"> " . $tracker_lang['topten'] . "</a>" . "<a class=\"menu\" href=\"formats.php\"> " . $tracker_lang['formats'] . "</a>";
blok_menu($tracker_lang['main_menu'], $mainmenu, "155");
echo "<br />";
if ($CURUSER) {
$usermenu = "<a class=\"menu\" href=\"my.php\"> " . $tracker_lang['my'] . "</a>" . "<a class=\"menu\" href=\"userdetails.php?id=" . $CURUSER["id"] . "\"> " . $tracker_lang['profile'] . "</a>" . "<a class=\"menu\" href=\"bookmarks.php\"> " . $tracker_lang['bookmarks'] . "</a>" . "<a class=\"menu\" href=\"mybonus.php\"> " . $tracker_lang['my_bonus'] . "</a>" . "<a class=\"menu\" href=\"invite.php\"> " . $tracker_lang['invite'] . "</a>" . "<a class=\"menu\" href=\"users.php\"> " . $tracker_lang['users'] . "</a>" . "<a class=\"menu\" href=\"friends.php\"> " . $tracker_lang['personal_lists'] . "</a>" . "<a class=\"menu\" href=\"subnet.php\"> " . $tracker_lang['neighbours'] . "</a>" . "<a class=\"menu\" href=\"mytorrents.php\"> " . $tracker_lang['my_torrents'] . "</a>" . "<a class=\"menu\" href=\"logout.php\"> " . $tracker_lang['logout'] . "!</a>";
blok_menu($tracker_lang['user_menu'], $usermenu, "155");
echo "<br />";
$messages = "<a class=\"menu\" href=\"message.php\"> " . $tracker_lang['inbox'] . "</a>" . "<a class=\"menu\" href=\"message.php?action=viewmailbox&box=-1\"> " . $tracker_lang['outbox'] . "</a>";
blok_menu($tracker_lang['messages'], $messages, "155");
echo "<br />";
}
$bt_clients = ' <a href="http://bitconjurer.org/BitTorrent/download.html" target="_blank"><font class=small color=green>' . $tracker_lang['official'] . '</font></a><br />' . ' <a href="http://azureus.sourceforge.net/" target="_blank"><font class=small color=green>Azureus (Java)</font></a><br />' . ' <a href="http://www.bittornado.com/" target="_blank"><font class=small color=green>BitTornado</font></a><br />' . ' <a href="http://www.bitcomet.com/" target="_blank"><font class=small color=green>BitComet</font></a><br />' . ' <a href="http://www.bitlord.com/" target="_blank"><font class=small color=green>BitLord</font></a><br />' . ' <a href="http://www.macupdate.com/info.php/id/7170" target="_blank"><font class="small" color=green>Acquisition (Mac)</font></a><br />' . ' <a href="http://www.167bt.com/intl/" target="_blank"><font class=small color=green>BitSpirit</font></a><br />' . '<hr width=100% color=#ffc58c size=1>' . '<font class=small color=red> ' . $tracker_lang['clients_recomened_by_us'] . '</font>';
示例14: mysqli_fetch_row
//=== get the last post read by CURUSER (with Retro's $readpost_expiry thingie) - cached \0/
if (($last_read_post_arr = $mc1->get_value('last_read_post_' . $last_post_arr['topic_id'] . '_' . $CURUSER['id'])) === false) {
$last_read_post_arr = mysqli_fetch_row(sql_query('SELECT last_post_read FROM read_posts WHERE user_id=' . sqlesc($CURUSER['id']) . ' AND topic_id=' . sqlesc($last_post_arr['topic_id'])));
$mc1->cache_value('last_read_post_' . $last_post_arr['topic_id'] . '_' . $CURUSER['id'], $last_read_post_arr, $INSTALLER09['expires']['last_read_post']);
}
$image_to_use = $last_post_arr['added'] > TIME_NOW - $readpost_expiry ? !$last_read_post_arr or $last_post_id > $last_read_post_arr[0] : 0;
$img = $image_to_use ? 'unlockednew' : 'unlocked';
//== Anonymous ->
if ($last_post_arr["tan"] == "yes") {
if ($CURUSER['class'] < UC_STAFF && $last_post_arr["user_id"] != $CURUSER["id"]) {
$last_post = '<span style="white-space:nowrap;">' . $lang['fe_last_post_by'] . ': <i>' . $lang['fe_anonymous'] . '</i> in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=' . $last_post_id . '#' . $last_post_id . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '"><span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />' . get_date($last_post_arr['added'], '') . '<br /></span>';
} else {
$last_post = '<span style="white-space:nowrap;">' . $lang['fe_last_post_by'] . ': <i>' . $lang['fe_anonymous'] . '</i> [' . ($last_post_arr['username'] !== '' ? print_user_stuff($last_post_arr) : '' . $lang['fe_lost'] . '') . '] <span style="font-size: x-small;"> [ ' . get_user_class_name($last_post_arr['class']) . ' ] </span><br />in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=' . $last_post_id . '#' . $last_post_id . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '"><span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />' . get_date($last_post_arr['added'], '') . '<br /></span>';
}
} else {
$last_post = '<span style="white-space:nowrap;">' . $lang['fe_last_post_by'] . ': ' . ($last_post_arr['username'] !== '' ? print_user_stuff($last_post_arr) : '' . $lang['fe_lost'] . '') . ' <span style="font-size: x-small;"> [ ' . get_user_class_name($last_post_arr['class']) . ' ] </span><br />in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=' . $last_post_id . '#' . $last_post_id . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '"><span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />' . get_date($last_post_arr['added'], '') . '<br /></span>';
}
//==
//=== get child boards if any - cached \0/
$keys['child_boards'] = 'child_boards_' . $last_post_id . '_' . $CURUSER['class'];
if (($child_boards_cache = $mc1->get_value($keys['child_boards'])) === false) {
$child_boards = '';
$child_boards_cache = array();
$res = sql_query('SELECT name, id FROM forums WHERE parent_forum = ' . sqlesc($arr_forums['real_forum_id']) . ' AND min_class_read <= ' . sqlesc($CURUSER['class']) . ' ORDER BY sort ASC') or sqlerr(__FILE__, __LINE__);
while ($arr = mysqli_fetch_assoc($res)) {
if ($child_boards) {
$child_boards .= ', ';
}
$child_boards .= '<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_forum&forum_id=' . (int) $arr['id'] . '" title="' . $lang['fm_click_to_view'] . '!" class="altlink">' . htmlsafechars($arr['name'], ENT_QUOTES) . '</a>';
}
$child_boards_cache['child_boards'] = $child_boards;
示例15: stderr
if (mysqli_num_rows($res) == 0) {
stderr('Error', 'No forum found with that ID!');
}
$forum = mysqli_fetch_assoc($res);
if ($INSTALLER09['forums_online'] == 0) {
$HTMLOUT .= stdmsg('Warning', 'Forums are currently in maintainance mode');
}
$HTMLOUT .= begin_main_frame();
$HTMLOUT .= begin_frame("Edit Forum", "center");
$HTMLOUT .= "<form method='post' action='{$INSTALLER09['baseurl']}/forums.php?action=updateforum&forumid={$forumid}'>\n";
$HTMLOUT .= begin_table();
$HTMLOUT .= "<tr><td class='rowhead'>Forum name</td>\r\n <td align='left' style='padding: 0px'><input type='text' size='60' maxlength='{$Multi_forum['configs']['maxsubjectlength']}' name='name' style='border: 0px; height: 19px' value=\"" . htmlsafechars($forum['name']) . "\" /></td></tr>\r\n <tr><td class='rowhead'>Description</td><td align='left' style='padding: 0px'><textarea name='description' cols='68' rows='3' style='border: 0px'>" . htmlsafechars($forum['description']) . "</textarea></td></tr>\r\n <tr><td class='rowhead'></td><td align='left' style='padding: 0px'> Minimum <select name='readclass'>";
for ($i = 0; $i <= MAX_CLASS; ++$i) {
$HTMLOUT .= "<option value='{$i}' " . ($i == $forum['min_class_read'] ? " selected='selected'" : "") . ">" . get_user_class_name($i) . "</option>\n";
}
$HTMLOUT .= "</select> Class required to View<br />\n Minimum <select name='writeclass'>";
for ($i = 0; $i <= MAX_CLASS; ++$i) {
$HTMLOUT .= "<option value='{$i}' " . ($i == $forum['min_class_write'] ? " selected='selected'" : "") . ">" . get_user_class_name($i) . "</option>\n";
}
$HTMLOUT .= "</select> Class required to Post<br />\n Minimum <select name='createclass'>";
for ($i = 0; $i <= MAX_CLASS; ++$i) {
$HTMLOUT .= "<option value='{$i}' " . ($i == $forum['min_class_create'] ? " selected='selected'" : "") . ">" . get_user_class_name($i) . "</option>\n";
}
$HTMLOUT .= "</select> Class required to Create Topics</td></tr>\r\n <tr><td colspan='2' align='center'><input type='submit' value='Submit' /></td></tr>\n";
$HTMLOUT .= end_table();
$HTMLOUT .= "</form>";
$HTMLOUT .= end_frame();
$HTMLOUT .= end_main_frame();
echo stdhead("{$lang['forums_title']}", true, $stdhead) . $HTMLOUT . stdfoot($stdfoot);
exit;
}