当前位置: 首页>>代码示例>>PHP>>正文


PHP get_user_class函数代码示例

本文整理汇总了PHP中get_user_class函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_class函数的具体用法?PHP get_user_class怎么用?PHP get_user_class使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_user_class函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: std_view

function std_view()
{
    global $READPOST_EXPIRY, $CURUSER, $forum_pic_url;
    $forums_res = mysql_query("SELECT * FROM forums ORDER BY sort, name") or sqlerr(__FILE__, __LINE__);
    stdhead("Forums");
    $htmlout = "<h1>Forums</h1>\n";
    $htmlout .= "<div style='width:80%'><p align=right><span class='btn'><a href='forums.php?action=search'>Search</a></span>&nbsp;<span class='btn'><a href='forums.php?action=viewunread'>View unread</a></span>&nbsp;<span class='btn'><a href='forums.php?action=catchup'>Catch up</a></span></p></div>";
    $htmlout .= "<table border=1 cellspacing=0 cellpadding=5 width='80%'>\n";
    $htmlout .= "<tr><td class=colhead align=left>Forum</td><td class=colhead align=right>Topics</td>" . "<td class=colhead align=right>Posts</td>" . "<td class=colhead align=left>Last post</td></tr>\n";
    while ($forums_arr = mysql_fetch_assoc($forums_res)) {
        if (get_user_class() < $forums_arr["minclassread"]) {
            continue;
        }
        $forumid = $forums_arr["id"];
        $forumname = htmlspecialchars($forums_arr["name"]);
        $forumdescription = htmlspecialchars($forums_arr["description"]);
        $topiccount = number_format($forums_arr["topiccount"]);
        $postcount = number_format($forums_arr["postcount"]);
        $lastpostid = get_forum_last_post($forumid);
        // Get last post info
        $post_res = mysql_query("SELECT p.added, p.topicid, p.userid, u.username, t.subject\r\n\t\t\t\t\t\t\tFROM posts p\r\n\t\t\t\t\t\t\tLEFT JOIN users u ON p.userid = u.id\r\n\t\t\t\t\t\t\tLEFT JOIN topics t ON p.topicid = t.id\r\n\t\t\t\t\t\t\tWHERE p.id = {$lastpostid}") or sqlerr(__FILE__, __LINE__);
        if (mysql_num_rows($post_res) == 1) {
            $post_arr = mysql_fetch_assoc($post_res) or die("Bad forum last_post");
            $lastposterid = $post_arr["userid"];
            $lastpostdate = get_date($post_arr["added"], '');
            $lasttopicid = $post_arr["topicid"];
            //$user_res = mysql_query("SELECT username FROM users WHERE id=$lastposterid") or sqlerr(__FILE__, __LINE__);
            //$user_arr = mysql_fetch_assoc($user_res);
            $lastposter = htmlspecialchars($post_arr['username']);
            //$topic_res = mysql_query("SELECT subject FROM topics WHERE id=$lasttopicid") or sqlerr(__FILE__, __LINE__);
            //$topic_arr = mysql_fetch_assoc($topic_res);
            $lasttopic = htmlspecialchars($post_arr['subject']);
            $lastpost = "<nobr>{$lastpostdate}<br>" . "by <a href=userdetails.php?id={$lastposterid}><b>{$lastposter}</b></a><br>" . "in <a href=?action=viewtopic&topicid={$lasttopicid}&amp;page=p{$lastpostid}#{$lastpostid}><b>{$lasttopic}</b></a></nobr>";
            $r = mysql_query("SELECT lastpostread FROM readposts WHERE userid={$CURUSER['id']} AND topicid={$lasttopicid}") or sqlerr(__FILE__, __LINE__);
            $a = mysql_fetch_row($r);
            //..rp..
            $npostcheck = $post_arr['added'] > time() - $READPOST_EXPIRY ? !$a or $lastpostid > $a[0] : 0;
            /* if ($a && $a[0] >= $lastpostid)
            	$img = "unlocked";
            	else
            	$img = "unlockednew";
            	*/
            if ($npostcheck) {
                $img = "unlockednew";
            } else {
                $img = "unlocked";
            }
            // ..rp..
        } else {
            $lastpost = "N/A";
            $img = "unlocked";
        }
        $htmlout .= "<tr><td align=left><table border=0 cellspacing=0 cellpadding=0><tr><td class=embedded style='padding-right: 5px'>" . "<img src=\"{$forum_pic_url}{$img}.gif\"></td>" . "<td class=embedded><a href=?action=viewforum&forumid={$forumid}><b>{$forumname}</b></a><br>\n" . "{$forumdescription}</td></tr></table></td><td align=right>{$topiccount}</td>" . "</td><td align=right>{$postcount}</td>" . "<td align=left>{$lastpost}</td></tr>\n";
    }
    $htmlout .= "</table>\n<br />\n";
    $htmlout .= "<div style='width:80%'><p align=right><span class='btn'><a href='forums.php?action=search'>Search</a></span>&nbsp;<span class='btn'><a href='forums.php?action=viewunread'>View unread</a></span>&nbsp;<span class='btn'><a href='forums.php?action=catchup'>Catch up</a></span></p></div>";
    echo $htmlout;
    stdfoot();
    exit;
}
开发者ID:CtrlSystem,项目名称:biotorrents,代码行数:60,代码来源:forums.php

示例2: iUsers

function iUsers($iname, $ipass, $imail)
{
    global $admin_file, $CURUSER;
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        list($iclass) = mysql_fetch_row(sql_query('SELECT class FROM users WHERE username = ' . sqlesc($iname)));
        if (get_user_class() <= $iclass) {
            stdmsg("Ошибка", "Смена пароля завершилась неудачей! Вы пробовали изменить учетные данные пользователя выше. Действие записано в логахъ.", "error");
            write_log('Администратор ' . $CURUSER['username'] . ' пробовал изменить учетные данные пользователя ' . $iname . ' классом выше!', 'red', 'error');
        } else {
            $updateset = array();
            if (!empty($ipass)) {
                $secret = mksecret();
                $hash = md5($secret . $ipass . $secret);
                $updateset[] = "secret = " . sqlesc($secret);
                $updateset[] = "passhash = " . sqlesc($hash);
            }
            if (!empty($imail) && validemail($imail)) {
                $updateset[] = "email = " . sqlesc($imail);
            }
            if (count($updateset)) {
                $res = sql_query("UPDATE users SET " . implode(", ", $updateset) . " WHERE username = " . sqlesc($iname)) or sqlerr(__FILE__, __LINE__);
            }
            if (mysql_modified_rows() < 1) {
                stdmsg("Ошибка", "Смена пароля завершилась неудачей! Возможно указано несуществующее имя пользователя.", "error");
            } else {
                stdmsg("Изменения пользователя прошло успешно", "Имя пользователя: " . $iname . (!empty($hash) ? "<br />Новый пароль: " . $ipass : "") . (!empty($imail) ? "<br />Новая почта: " . $imail : ""));
            }
        }
    } else {
        echo "<form method=\"post\" action=\"" . $admin_file . ".php?op=iUsers\">" . "<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\">" . "<tr><td class=\"colhead\" colspan=\"2\">Смена пароля</td></tr>" . "<tr>" . "<td><b>Пользователь</b></td>" . "<td><input name=\"iname\" type=\"text\"></td>" . "</tr>" . "<tr>" . "<td><b>Новый пароль</b></td>" . "<td><input name=\"ipass\" type=\"password\"></td>" . "</tr>" . "<tr>" . "<td><b>Новая почта</b></td>" . "<td><input name=\"imail\" type=\"text\"></td>" . "</tr>" . "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" name=\"isub\" value=\"Сделать\"></td></tr>" . "</table>" . "<input type=\"hidden\" name=\"op\" value=\"iUsers\" />" . "</form>";
    }
}
开发者ID:klldll,项目名称:tbdev,代码行数:32,代码来源:iusers.php

示例3: 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&amp;cid={$row['id']}>Edit</a>]" : "") . ($userid == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=delete&amp;cid={$row['id']}>Delete</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=vieworiginal&amp;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();
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:35,代码来源:userdetails.php

示例4: peer_list

function peer_list($array)
{
    ?>
		 <table width="100%" border="1" cellpadding="5" style="border-collapse:collapse">
		<tr>
       		<td align="center" class="colhead">User</td>
            <td align="center" class="colhead">Port&amp;Ip</td>
            <td align="center" class="colhead">Ratio</td>
            <td align="center" class="colhead">Downloaded</td>
            <td align="center" class="colhead">Uploaded</td>
            <td align="center" class="colhead">Started</td>
            <td align="center" class="colhead">Finished</td>
       </tr>
		<?php 
    foreach ($array as $p) {
        $time = max(1, time() - $p["started"] - (time() - $p["last_action"]));
        ?>
			<tr>
       		<td align="center"><a href="userdetails.php?id=<?php 
        echo $p["p_uid"];
        ?>
" ><?php 
        echo $p["p_user"];
        ?>
</a></td>
            <td align="center"><?php 
        echo get_user_class() >= UC_MODERATOR ? $p["ip"] . ":" . $p["port"] : "xx.xx.xx.xx:xxxx";
        ?>
</td>
            <td align="center"><?php 
        echo $p["downloaded"] > 0 ? number_format($p["uploaded"] / $p["downloaded"], 2) : ($p["uploaded"] > 0 ? "&infin;" : "---");
        ?>
</td>
            <td align="center"><?php 
        echo $p["downloaded"] > 0 ? prefixed($p["downloaded"]) . " @" . prefixed(($p["downloaded"] - $p["downloadoffset"]) / $time) . "s" : "0kb";
        ?>
</td>
            <td align="center"><?php 
        echo $p["uploaded"] > 0 ? prefixed($p["uploaded"]) . " @" . prefixed(($p["uploaded"] - $p["uploadoffset"]) / $time) . "s" : "0kb";
        ?>
</td>
            <td align="center"><?php 
        echo date("d-M/Y H:i", $p["started"]);
        ?>
</td>
            <td align="center"><?php 
        echo date("d-M/Y H:i", $p["finishedat"]);
        ?>
</td>
			</tr>
		<?php 
    }
    print "</table>";
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:54,代码来源:catalogue.php

示例5: secureip

function secureip($rank)
{
    if (get_user_class() >= $rank) {
        $secureip = getip();
        $staffip = ip2long($secureip);
        $sanity = sql_query("SELECT * FROM ipsecureip WHERE {$staffip} >= first AND {$staffip} <= last") or sqlerr(__FILE__, __LINE__);
        if (mysql_num_rows($sanity) == 0) {
            stderr('Error', 'Time shall unfold what plighted cunning hides Who cover faults, at last shame them derides.<br> Click to add your ip to allowed ip\'s - you must use vaild site email address <a class=altlink href=ipstaff.php>when you register to use this</a> page.<br><br>');
            die;
        }
    }
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:12,代码来源:vfunc.php

示例6: ai_response

function ai_response($content)
{
    # AI Module V0.1.20130409
    # Test only.
    global $ai_library, $function_library;
    global $CURUSER;
    foreach ($ai_library as $value) {
        foreach ($value['keyword'] as $kw) {
            if (preg_match($kw, $content)) {
                $ret = $value['response'][array_rand($value['response'], 1)];
                if (preg_match("/function/", $ret)) {
                    if ($ret == "function:date") {
                        // date
                        //check user level
                        if (get_user_class() >= UC_INSANE_USER) {
                            $ret = $function_library['date']['success'];
                        } else {
                            $ret = $function_library['date']['fail'];
                        }
                    }
                    if ($ret == "function:midautumn") {
                        // mid autumn
                        $res = sql_query("SELECT * FROM midautumn WHERE userid = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
                        if (mysql_num_rows($res) != 0) {
                            $ret = $function_library['midautumn']['fail'];
                        } else {
                            $bscom = date("Y-m-d") . " - " . " 500 Points for Mid-autumn Festival.\n " . $CURUSER['bonuscomment'];
                            sql_query("UPDATE users SET seedbonus = seedbonus + 500, bonuscomment = " . sqlesc($bscom) . " WHERE id = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
                            sql_query("INSERT into midautumn (userid) VALUES (" . sqlesc($CURUSER['id']) . ")") or sqlerr(__FILE__, __LINE__);
                            $ret = $function_library['midautumn']['success'];
                        }
                    }
                    if ($ret == "function:closenhdrobot") {
                        // close NHDRobot
                        sql_query("UPDATE users SET shownhdrobot = 'no' WHERE id = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
                        //$ret = $function_library['closenhdrobot'];
                        $ret = "norep";
                    }
                    if ($ret == "function:opennhdrobot") {
                        // open NHDRobot
                        sql_query("UPDATE users SET shownhdrobot = 'yes' WHERE id = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
                        //$ret = $function_library['opennhdrobot'];
                        $ret = "norep";
                    }
                }
                return $ret;
            }
        }
    }
    return "";
}
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:51,代码来源:shoutbox.php

示例7: insert_quick_jump_menu

function insert_quick_jump_menu($currentforum = 0)
{
    print "<p align=center><form method=get action=? name=jump>\n";
    print "<input type=hidden name=action value=viewforum>\n";
    print "Quick jump: ";
    print "<select name=forumid onchange=\"if(this.options[this.selectedIndex].value != -1){ forms['jump'].submit() }\">\n";
    $res = mysql_query("SELECT * FROM forums ORDER BY name") or sqlerr(__FILE__, __LINE__);
    while ($arr = mysql_fetch_assoc($res)) {
        if (get_user_class() >= $arr["minclassread"]) {
            print "<option value=" . $arr["id"] . ($currentforum == $arr["id"] ? " selected>" : ">") . $arr["name"] . "\n";
        }
    }
    print "</select>\n";
    print "<input type=submit value='Go!'>\n";
    print "</form>\n</p>";
}
开发者ID:CtrlSystem,项目名称:biotorrents,代码行数:16,代码来源:forum_functions.php

示例8: 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&amp;cid=$row[id]>Edit</a>]" : "") .(get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=delete&amp;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();
}
开发者ID:herrag33k,项目名称:TomTorrent,代码行数:47,代码来源:reqdetails.php

示例9: 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;
        //确实是保种员
    }
}
开发者ID:chenrizhi,项目名称:mtpt,代码行数:45,代码来源:signin.php

示例10: httperr

}
if (empty($_REQUEST['attachmentid'])) {
    // return not found header
    httperr();
}
$id = (int) $_GET['attachmentid'];
$attachment_dir = ROOT_DIR . "forum_attachments";
$at = sql_query("SELECT * FROM attachments WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
$resat = mysql_fetch_assoc($at);
$filename = $attachment_dir . '/' . $resat['filename'];
if (!$resat || !is_file($filename) || !is_readable($filename)) {
    // return not found header
    httperr();
}
if ($_GET['action'] == 'delete') {
    if (get_user_class() >= UC_MODERATOR) {
        @unlink($filename);
        sql_query("DELETE FROM attachments WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        sql_query("DELETE FROM attachmentdownloads WHERE fileid=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        die('<font color=\\"red\\">File successfull deleted...');
    } else {
        httperr();
    }
}
$file_extension = strtolower(substr(strrchr($filename, "."), 1));
switch ($file_extension) {
    case "pdf":
        $ctype = "application/pdf";
        break;
    case "exe":
        $ctype = "application/octet-stream";
开发者ID:thefkboss,项目名称:U-232,代码行数:31,代码来源:attachment.php

示例11: tr_small

     }
     $s .= "\n</select>&nbsp;&nbsp;<font class=small>" . $lang_usercp['text_translation_note'] . "<a href=\"aboutnexus.php#translation\"><b>" . $lang_usercp['text_translation_link'] . "</b></a></font>.</td></tr>";
     tr_small($lang_usercp['row_site_language'], $s, 1);
     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'] . "&nbsp;" : "") . ($showmovies['classic'] == "yes" ? "<input type=checkbox name=show_classic" . ($CURUSER["showclassic"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['checkbox_show_classic'] . "&nbsp;" : ""), 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'] . "&nbsp;&nbsp;<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;
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:usercp.php

示例12: parked

<?php

require_once "include/bittorrent.php";
require_once "include/bbcode_functions.php";
require_once "include/user_functions.php";
parked();
dbconn(false);
maxcoder();
getpage();
if (!logged_in()) {
    header("HTTP/1.0 404 Not Found");
    // moddifed logginorreturn by retro//Remember to change the following line to match your server
    print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n";
    die;
}
if (get_user_class() < UC_POWER_USER) {
    stdhead();
    stdmsg("Sorry...", "You must be a Power User or above to play Blackjack.");
    stdfoot();
    exit;
}
if ($CURUSER["blackjackban"] == 'yes') {
    stdhead();
    stdmsg("Sorry...", "You are Banned from playing Blackjack.  (See site staff for the reason why !");
    stdfoot();
    exit;
}
// Bet size - 100 MB
$mb = 100 * 1024 * 1024;
$now = sqlesc(get_date_time());
// Pull the user's statisctics
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:blackjack.php

示例13: permissiondenied

        $ret .= "</tr>\n";
    }
    $ret .= "</table>\n";
    return $ret;
}
$id = 0 + $_GET['userid'];
$type = $_GET['type'];
if (!in_array($type, array('uploaded', 'seeding', 'leeching', 'completed', 'incomplete'))) {
    die;
}
if (get_user_class() < $torrenthistory_class && $id != $CURUSER["id"]) {
    permissiondenied();
}
switch ($type) {
    case 'uploaded':
        $res = sql_query("SELECT torrents.id AS torrent, torrents.name as torrentname, small_descr, seeders, leechers, anonymous, categories.name AS catname, categories.image, category, sp_state, size, snatched.seedtime, snatched.uploaded FROM torrents LEFT JOIN snatched ON torrents.id = snatched.torrentid LEFT JOIN categories ON torrents.category = categories.id WHERE torrents.owner={$id} AND snatched.userid={$id} " . ($CURUSER["id"] != $id ? get_user_class() < $viewanonymous_class ? " AND anonymous = 'no'" : "" : "") . " ORDER BY torrents.added DESC") or sqlerr(__FILE__, __LINE__);
        $count = mysql_num_rows($res);
        if ($count > 0) {
            $torrentlist = maketable($res, 'uploaded');
        }
        if ($id == $CURUSER['id']) {
            $res = sql_query("SELECT torrents.id AS torrent, torrents.name as torrentname, small_descr, seeders, leechers, anonymous, categories.name AS catname, categories.image, category, sp_state, size FROM torrents LEFT JOIN categories ON torrents.category = categories.id WHERE torrents.owner=" . $CURUSER['id'] . " AND torrents.banned='yes' ORDER BY torrents.added DESC") or sqlerr(__FILE__, __LINE__);
            $newcount = mysql_num_rows($res);
            $count += $newconut;
            if ($newcount > 0) {
                $torrentlist .= $lang_getusertorrentlistajax['text_disable_tor'] . maketable($res, 'uploaded');
            }
        }
        break;
        // Current Seeding
    // Current Seeding
开发者ID:chenrizhi,项目名称:mtpt,代码行数:31,代码来源:getusertorrentlistajax.php

示例14: dbconn

<?php

require_once "include/bittorrent.php";
require_once "include/user_functions.php";
require_once "include/bbcode_functions.php";
dbconn(false);
maxcoder();
if (!logged_in()) {
    header("HTTP/1.0 404 Not Found");
    // moddifed logginorreturn by retro//Remember to change the following line to match your server
    print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n";
    die;
}
if (get_user_class() < UC_ADMINISTRATOR) {
    hacker_dork("Secure Ip - Nosey Cunt !");
}
// in the case part add staff names exactly as they are on site
//example
//case 'Admin':
//case 'System':
// and so on
switch ($_POST['staffname']) {
    case 'Mindless':
    case 'System':
        $name = safeChar($_POST['staffname']);
        $pass = safeChar($_POST['secrettop']);
        break;
    default:
        $naughtyboy = getip();
        $name = safeChar($_POST['staffname']);
        $msg = "Someone is trying to login through the Staff login page with the name {$name} and ip {$naughtyboy}";
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:takesecureip.php

示例15: tr

    } 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);
}
//===end
if (get_user_class() >= $beanonymous_class) {
    tr($lang_upload['row_show_uploader'], "<input type=\"checkbox\" name=\"uplver\" value=\"yes\" />" . $lang_upload['checkbox_hide_uploader_note'], 1);
}
?>
				<tr><td class="toolbox" align="center" colspan="2"><b><?php 
echo $lang_upload['text_read_rules'];
?>
</b> <input id="qr" type="submit" class="btn" value="<?php 
echo $lang_upload['submit_upload'];
?>
" /></td></tr>
		</table>
	</form>
<?php 
stdfoot();
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:upload.php


注:本文中的get_user_class函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。