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


PHP get_user_class_color函数代码示例

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


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

示例1: 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&amp;cid={$row['id']}\" class=\"altlink_white\">Цитата</a>]" : "") . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? " [<a href=" . $redaktor . ".php?action=edit&amp;cid={$row['id']} class=\"altlink_white\">Изменить</a>]" : "") . (get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=delete&amp;cid={$row['id']}\" class=\"altlink_white\">Удалить</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=vieworiginal&amp;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>";
    }
}
开发者ID:klldll,项目名称:tbdev,代码行数:60,代码来源:functions_commenttable.php

示例2: DoStaff

function DoStaff($staff, $staffclass, $cols = 2)
{
    global $INSTALLER09;
    $htmlout = '';
    $dt = TIME_NOW - 180;
    $counter = count($staff);
    $rows = ceil($counter / $cols);
    $cols = $counter < $cols ? $counter : $cols;
    $r = 0;
    $htmlout .= "<div class='global_text'><div class='headline'><h2>{$staffclass}</h2></div><div class='row'><div class='col-md-12'><table class='table table-bordered'>";
    for ($ia = 0; $ia < $rows; $ia++) {
        $htmlout .= "<tr>";
        for ($i = 0; $i < $cols; $i++) {
            if (isset($staff[$r])) {
                $htmlout .= "<td class='staff_username'><a href='userdetails.php?id=" . (int) $staff[$r]['id'] . "'><font color='#" . get_user_class_color($staff[$r]['class']) . "'><b>" . htmlsafechars($staff[$r]['username']) . "</b></font></a></td>" . "\n            <td class='staff_online'><img style='vertical-align: middle;' src='images/staff" . ($staff[$r]['last_access'] > $dt && $staff[$r]['perms'] < bt_options::PERMS_STEALTH ? "/online.png" : "/offline.png") . "' border='0' height='16' alt='' /></td>" . "\n            <td class='staff_online'><a href='pm_system.php?action=send_message&amp;receiver=" . (int) $staff[$r]['id'] . "&amp;returnto=" . urlencode($_SERVER['REQUEST_URI']) . "'><img style='vertical-align: middle;' src='{$INSTALLER09['pic_base_url']}mailicon.png' border='0' title=\"Personal Message\" alt='' /></a></td>" . "\n            <td class='staff_online'><img style='vertical-align: middle;' height='16' src='{$INSTALLER09['pic_base_url']}flag/" . htmlsafechars($staff[$r]['flagpic']) . "' border='0' alt='" . htmlsafechars($staff[$r]['name']) . "' /></td>";
                $r++;
            } else {
                $htmlout .= "<td>&nbsp;</td>";
            }
        }
        $htmlout .= "</tr>";
    }
    $htmlout .= "</table></div></div></div>";
    return $htmlout;
}
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:25,代码来源:staff.php

示例3: do_sort

function do_sort($arr, $empty = false)
{
    global $CURUSER, $lang;
    $count = $arr->num_rows;
    $ret_html = '';
    if ($empty) {
        if ($count < 1) {
            return false;
        }
        while ($res = mysqli_fetch_assoc($arr)) {
            $ret_html .= "<tr><td align='center'><a href='details.php?id=" . (int) $res['id'] . "'>" . htmlsafechars($res['name']) . "</a></td><td align='center'>" . date('h:i:s d/m/Y', $res['added']) . "</td><td align='center'><a class='btn-small btn btn-danger' href='edit.php?id=" . (int) $res['id'] . "' >" . $lang['mtor_edit'] . "</a></td></tr>";
        }
        return $ret_html;
    }
    if ($count == 1) {
        $res = mysqli_fetch_assoc($arr);
        $users[$res['checked_by']] = isset($users[$res['checked_by']]) && $users[$res['checked_by']] > 0 ? $users[$res['checked_by']] + 1 : 1;
        $ret_html .= "<tr><td align='center'><a href='details.php?id=" . (int) $res['id'] . "'>" . htmlsafechars($res['name']) . "</a></td><td align='center'><a href='userdetails.php?id=" . (int) $res['uid'] . "'><font color='#" . get_user_class_color($CURUSER['class']) . "'>" . htmlsafechars($res['checked_by']) . "</font></a></td><td align='center'>" . date('h:i:s d/m/Y', $res['checked_when']) . "</td></tr>";
        return array($users, $ret_html);
    } elseif ($count > 1) {
        while ($res = mysqli_fetch_assoc($arr)) {
            $users[$res['checked_by']] = isset($users[$res['checked_by']]) && $users[$res['checked_by']] > 0 ? $users[$res['checked_by']] + 1 : 1;
            $ret_html .= "<tr><td align='center'><a href='details.php?id=" . (int) $res['id'] . "'>" . htmlsafechars($res['name']) . "</a></td><td align='center'><a href='userdetails.php?id=" . (int) $res['uid'] . "'>" . htmlsafechars($res['checked_by']) . "</a></td><td align='center'>" . date('h:i:s d/m/Y', $res['checked_when']) . "</td></tr>";
        }
        return array($users, $ret_html);
    }
}
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:27,代码来源:modded_torrents.php

示例4: array

    $latestuser = $a['username'];
}
$title_who = array();
$dt = sqlesc(time() - 300);
if ($use_sessions) {
    $result = sql_query("SELECT s.uid, s.username, s.class FROM sessions AS s WHERE s.time > {$dt} ORDER BY s.class DESC");
} else {
    $result = sql_query("SELECT u.id, u.username, u.class FROM users AS u WHERE u.last_access > " . sqlesc(get_date_time(time() - 300)) . " ORDER BY u.class DESC");
}
$users = $guests = $staff = $total = 0;
$parsed = array();
$parsed_id = array();
while (list($uid, $uname, $class) = mysql_fetch_row($result)) {
    if (!empty($uname) && !in_array($uname, $parsed)) {
        $parsed[] = $uname;
        $title_who[] = "<a href=\"userdetails.php?id=" . $uid . "\" class=\"online\">" . get_user_class_color($class, $uname) . "</a>";
    }
    if ($class >= UC_MODERATOR && !in_array($uid, $parsed_id)) {
        $staff++;
    } elseif (empty($uname)) {
        $guests++;
    } elseif ($class < UC_MODERATOR && !in_array($uid, $parsed_id)) {
        $users++;
    }
    if (!in_array($uid, $parsed_id)) {
        $parsed_id[] = $uid;
    }
    $total++;
    /*if (empty($uname))
    		continue;
    	else
开发者ID:klldll,项目名称:tbdev,代码行数:31,代码来源:block-online.php

示例5: sql_query

 }
 $res = sql_query('SELECT staffpanel.*, users.username ' . 'FROM staffpanel ' . 'LEFT JOIN users ON users.id = staffpanel.added_by ' . 'WHERE av_class <= ' . sqlesc($CURUSER['class']) . ' ' . 'ORDER BY av_class DESC, page_name ASC') or sqlerr(__FILE__, __LINE__);
 if (mysql_num_rows($res) > 0) {
     $db_classes = $unique_classes = $mysql_data = array();
     while ($arr = mysql_fetch_assoc($res)) {
         $mysql_data[] = $arr;
     }
     foreach ($mysql_data as $key => $value) {
         $db_classes[$value['av_class']][] = $value['av_class'];
     }
     $i = 1;
     foreach ($mysql_data as $key => $arr) {
         $end_table = count($db_classes[$arr['av_class']]) == $i ? true : false;
         if (!in_array($arr['av_class'], $unique_classes)) {
             $unique_classes[] = $arr['av_class'];
             $HTMLOUT .= "<table cellpadding='5' width='100%' align='center'" . (!isset($staff_classes[$arr['av_class']]) ? 'style="background-color:#000000;"' : '') . ">\r\n      <tr>\r\n      <td colspan='4' align='center'>\r\n      <h2>" . ($class_color ? '<font color="#' . get_user_class_color($arr['av_class']) . '">' : '') . get_user_class_name($arr['av_class']) . ' Panel' . ($class_color ? '</font>' : '') . "</h2>\r\n      </td>\r\n      </tr>\r\n      <tr align='center'>\r\n      <td class='colhead' align='left' width='100%'>Page name</td>\r\n      <td class='colhead'><span style='white-space: nowrap;'>Added by</span></td>\r\n      <td class='colhead'><span style='white-space: nowrap;'>Date added</span></td>";
             if ($staff_classes[$CURUSER['class']]['edit'] || $staff_classes[$CURUSER['class']]['delete']) {
                 $HTMLOUT .= "<td class='colhead'>Links</td>";
             }
             $HTMLOUT .= "</tr>";
         }
         $HTMLOUT .= "<tr align='center'>\r\n\t\t\t<td align='left'>\r\n      <a href='" . htmlspecialchars($arr['file_name']) . "' title='" . htmlspecialchars($arr['page_name']) . "'>\r\n      " . htmlspecialchars($arr['page_name']) . "</a><br /><font class='small'>" . htmlspecialchars($arr['description']) . "</font>\r\n\t\t\t</td>\r\n      <td>\r\n\t\t  <a href='userdetails.php?id=" . (int) $arr['added_by'] . "'>{$arr['username']}</a>\r\n      </td>\r\n      <td>\r\n      <span style='white-space: nowrap;'>" . get_date($arr['added'], 'LONG', 0, 1) . "<br /></span>\r\n      </td>";
         if ($staff_classes[$CURUSER['class']]['edit'] || $staff_classes[$CURUSER['class']]['delete']) {
             $HTMLOUT .= "<td>\r\n      <span style='white-space: nowrap;'>";
             if ($staff_classes[$CURUSER['class']]['edit']) {
                 $HTMLOUT .= "<b>[</b><a href='staffpanel.php?action=edit&amp;id=" . (int) $arr['id'] . "' title='Edit'>E</a><b>]</b>";
             }
             if ($staff_classes[$CURUSER['class']]['delete']) {
                 $HTMLOUT .= "<b>[</b><a href='staffpanel.php?action=delete&amp;id=" . (int) $arr['id'] . "' title='Delete'>D</a><b>]</b>";
             }
             $HTMLOUT .= "</span>\r\n\t\t\t</td>";
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:staffpanel.php

示例6: stdhead

stdhead("Администрация");
begin_main_frame();
begin_frame("");
?>


<?php 
$act = $_GET["act"];
if (!$act) {
    // Get current datetime
    $dt = gmtime() - 300;
    $dt = sqlesc(get_date_time($dt));
    // Search User Database for Moderators and above and display in alphabetical order
    $res = sql_query("SELECT * FROM users WHERE class>=" . UC_UPLOADER . " AND status='confirmed' ORDER BY username") or sqlerr(__FILE__, __LINE__);
    while ($arr = mysql_fetch_assoc($res)) {
        $staff_table[$arr['class']] = $staff_table[$arr['class']] . "<td class=embedded><a class=altlink href=userdetails.php?id=" . $arr['id'] . "><b>" . get_user_class_color($arr['class'], $arr['username']) . "</b></a></td><td class=embedded> " . ("'" . $arr['last_access'] . "'" > $dt ? "<img src=" . $pic_base_url . "/button_online.gif border=0 alt=\"online\">" : "<img src=" . $pic_base_url . "/button_offline.gif border=0 alt=\"offline\">") . "</td>" . "<td class=embedded><a href=message.php?action=sendmessage&amp;receiver=" . $arr['id'] . ">" . "<img src=" . $pic_base_url . "/button_pm.gif border=0></a></td>" . " ";
        // Show 3 staff per row, separated by an empty column
        ++$col[$arr['class']];
        if ($col[$arr['class']] <= 2) {
            $staff_table[$arr['class']] = $staff_table[$arr['class']] . "<td class=embedded>&nbsp;</td>";
        } else {
            $staff_table[$arr['class']] = $staff_table[$arr['class']] . "</tr><tr height=15>";
            $col[$arr['class']] = 0;
        }
    }
    begin_frame("Администрация");
    ?>

<table width=100% cellspacing=0>
<tr>
<tr><td class=embedded colspan=11>Вопросы, на которые есть ответы в правилах или FAQ, будут оставлены без внимания.</td></tr>
开发者ID:klldll,项目名称:tbdev,代码行数:31,代码来源:staff.php

示例7: get_user_class_color

         $arr["username"] = " <font color='#" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>";
         break;
     case UC_MODERATOR:
         $arr["username"] = " <font color='#" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>";
         break;
     case UC_UPLOADER:
         $arr["username"] = " <font color='#" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>";
         break;
     case UC_VIP:
         $arr["username"] = " <font color='#" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>";
         break;
     case UC_POWER_USER:
         $arr["username"] = " <font color='#" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>";
         break;
     case UC_USER:
         $arr["username"] = " <font color='#" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>";
         break;
 }
 $donator = $arr["donor"] === "yes";
 $warned = $arr["warned"] === "yes";
 if ($CURUSER) {
     $birthdayusers .= "<a href=userdetails.php?id={$arr["id"]}><b>{$arr["username"]}</b></a>";
 } else {
     $birthdayusers .= "<b>{$arr["username"]}</b>";
 }
 if ($donator) {
     $birthdayusers .= "<img src={$pic_base_url}star.gif alt='Donated' />";
 }
 if ($warned) {
     $birthdayusers .= "<img src={$pic_base_url}warned.gif alt='Warned' />";
 }
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:index.php

示例8: torrenttable


//.........这里部分代码省略.........
                $hl = '#b22222 ';
            }
            $bgc = "bgcolor=" . $hl . "";
            echo '<tr ' . $bgc . '>';
        }
        // //////////////////end highlight torrenttable - comment out to use standard or gif indicator code lower/////////
        echo "<td align=center style='padding: 0px'>";
        // cached category icons
        include 'include/cache/categories.php';
        foreach ($categories as $cat) {
            if ($cat["id"] == $row["category"]) {
                echo "<a href=\"browse.php?cat=" . $cat["id"] . "\"><img src=\"pic/caticons/{$cat_ico_uri}/" . $cat["image"] . "\" border=\"0\" title=\"category " . $cat["name"] . "\" /></a>";
            }
        }
        echo "</td>\n";
        // end cat icon cache
        // ///////added under torrent name - uncomment out to use////
        //$added = "$row[added] (" . get_elapsed_time(sql_timestamp_to_unix_timestamp($row["added"])) . " ago)";
        // ////////////////////////////////////end added///////////
        $genre = safeChar($row["newgenre"]);
        $nukereason = safeChar($row["nukereason"]);
        $scene = $row["scene"] == "yes" ? "&nbsp;<img src='pic/scene.gif' border=0 title='Scene' alt='Scene'/>" : "";
        $request = $row["request"] == "yes" ? "&nbsp;<img src='pic/request.gif' border=0 title='Request' alt='Request'/>" : "";
        $nuked = $row["nuked"] == "yes" ? "&nbsp;<img src='pic/nuked.gif' border=0 title='nuked' alt='Nuked'/>" : "";
        $newtag = sql_timestamp_to_unix_timestamp($row['added']) >= $_SESSION['browsetime'] ? '&nbsp;<img src=' . $pic_base_url . 'new.gif alt=NEW!>' : '';
        $viponly = $row["vip"] == "yes" ? "<img src='pic/star.gif' border=0 title='Vip Torrent' />" : "";
        // ///////freeslot in use on browse//////////
        $freeimg = '<img src="/pic/freedownload.gif" border=0"/>';
        $doubleimg = '<img src="/pic/doubleseed.gif" border=0"/>';
        $isdlfree = $row['doubleslot'] == 'yes' ? ' ' . $doubleimg . ' slot in use' : '';
        $isdouble = $row['freeslot'] == 'yes' ? ' ' . $freeimg . ' slot in use' : '';
        $uclass = '';
        // torrent name
        $dispname = $CURUSER["view_uclass"] == 'no' ? safeChar($row["name"]) : "<font color=\"#" . get_user_class_color($row["uclass"]) . "\">" . safeChar($row["name"]) . "</font>";
        // checked mod by pdq
        $checked = !empty($row['checked_by']) && $CURUSER['class'] >= UC_MODERATOR ? "&nbsp;<img src='" . $pic_base_url . "mod.gif' width='15' border='0' title='Checked - by " . safeChar($row['checked_by']) . "' />" : "";
        $sticky = $row["sticky"] == "yes" ? "<img src='pic/sticky.gif' border='0' alt='sticky' title='Sticky'>" : "";
        $countstats = $row["countstats"] == "no" ? "<img src='pic/freedownload.gif' border='0' alt='Free' title='Free Torrent'>" : "";
        $half = $row["half"] == "yes" ? "<img src='pic/halfdownload.png' border='0' alt='Half Leech' title='Half Leech'>" : "";
        // ///
        ///////////small description
        if (!empty($row['description'])) {
            $description = "(" . safeChar($row["description"]) . ")";
        } else {
            $description = "";
        }
        // ////////////////////////////////////////////////////////////////////////
        // ////////////////////////////////////////////////////////////////////////
        if ($row["poster"]) {
            $poster = "<img src=" . $row["poster"] . " width=150 border=0 />";
        }
        if ($row["descr"]) {
            $descr = ereg_replace("\"", "&quot;", readMore($row["descr"], 350, "details.php?id=" . $row["id"] . "&amp;hit=1"));
        }
        // userclass color mod ==end
        $dispname = ereg_replace('\\.', ' ', $dispname);
        echo "<td align=left><a href=details.php?id={$id} onmouseover=\"Tip('{$poster}');\" onmouseout=\"UnTip();\"><b>" . CutName($dispname, $char) . "</b></a>&nbsp;<a href=\"javascript:klappe_descr('descr" . $row["id"] . "');\" ><img src=\"/pic/plus.gif\" border=\"0\" title=\"Show torrent info in this page\"/></a>&nbsp;{$sticky}&nbsp;{$request}&nbsp;{$scene}&nbsp;{$nuked}<br />{$nukereason}&nbsp;{$newtag}&nbsp;{$viponly}&nbsp;{$countstats}&nbsp;{$half}&nbsp;{$description}\n";
        // //////////multiplicator///
        if ($row["multiplicator"] == "2") {
            $multiplicator = "&nbsp;<img src=\"pic/multi2.gif\" title=\"X2 Upload\">&nbsp;";
        } elseif ($row["multiplicator"] == "3") {
            $multiplicator = "&nbsp;<img src=\"pic/multi3.gif\" title=\"X3 Upload\">&nbsp;";
        } elseif ($row["multiplicator"] == "4") {
            $multiplicator = "&nbsp;<img src=\"pic/multi4.gif\" title=\"X4 Upload\">&nbsp;";
        } elseif ($row["multiplicator"] == "5") {
            $multiplicator = "&nbsp;<img src=\"pic/multi5.gif\" title=\"X5 Upload\">&nbsp;";
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:67,代码来源:function_torrenttable.php

示例9: mysql_fetch_row

        $a = mysql_fetch_row(mysql_query("SELECT userid,date FROM shoutbox ORDER by id DESC LIMIT 1 ")) or print "bad thing in query";
        if (empty($text) || strlen($text) == 1) {
            print "<font class=\"small\" color=\"red\">Shout can't be empty</font>";
        } elseif ($a[0] == $userid && time() - $a[1] < $limit && get_user_class() < UC_MODERATOR) {
            print "<font class=\"small\" color=\"red\">{$limit} seconds between shouts <font class=\"small\">Seconds Remaining : (" . ($limit - (time() - $a[1])) . ")</font></font>";
        } else {
            sql_query("INSERT INTO shoutbox (id, userid, date, text, text_parsed) VALUES ('id'," . sqlesc($userid) . ", {$date}, " . sqlesc($text) . "," . sqlesc($text_parsed) . ")") or sqlerr(__FILE__, __LINE__);
            print "<script type=\"text/javascript\">parent.document.forms[0].shbox_text.value='';</script>";
        }
    }
}
// //////////////////////
$res = sql_query("SELECT s.id, s.userid, s.date , s.text,u.username,u.class,u.donor,u.warned,u.downloadpos,u.chatpost,u.forumpost,u.uploadpos,u.parked  FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC LIMIT 30") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
    print "No shouts here ";
} else {
    print "<table border=0 cellspacing=0 cellpadding=2 width='100%' align='left' class='small'>\n";
    while ($arr = mysql_fetch_assoc($res)) {
        $edit = get_user_class() >= UC_MODERATOR ? "<a href=/shoutbox.php?edit=" . $arr['id'] . "><img src=" . $pic_base_url . "button_edit2.gif border=0 title=\"Edit Shout\" /></a> " : "";
        $del = get_user_class() >= UC_MODERATOR ? "<a href=/shoutbox.php?del=" . $arr['id'] . "><img src=" . $pic_base_url . "button_delete2.gif border=0 title=\"Delete Single Shout\" /></a> " : "";
        $delall = get_user_class() >= UC_SYSOP ? "<a href=/shoutbox.php?delall onclick=\"confirm_delete(); return false;\" ><img src=" . $pic_base_url . "del.png border=0 title=\"Empty Shout\" /></a> " : "";
        $pm = "<font  class='date' style=\"color:{$dtcolor}\"><a target=_blank href=sendmessage.php?receiver={$arr['userid']}><img src=" . $pic_base_url . "button_pm2.gif border=0 title=\"Pm User\"/></a></font>\n";
        $datum = gmdate("d M H:i", $arr["date"] + ($CURUSER['dst'] + $CURUSER["timezone"]) * 60);
        print "<tr {$bg}><td><font class='date' color={$fontcolor}>['{$datum}']</font>\n{$del} {$delall} {$edit} {$pm} <a href='userdetails.php?id=" . $arr["userid"] . "' target='_blank'><font color='#" . get_user_class_color($arr['class']) . "'>" . safechar($arr['username']) . "</font></a>\n" . ($arr["donor"] == "yes" ? "<img src=pic/star.gif alt='DONOR' />\n" : "") . ($arr["warned"] == "yes" ? "<img src=" . "pic/warned.gif alt='Warned' />\n" : "") . ($arr["chatpost"] == "no" ? "<img src=pic/chatpos.gif alt='No Chat' />\n" : "") . ($arr["downloadpos"] == "no" ? "<img src=pic/downloadpos.gif alt='No Downloads' />\n" : "") . ($arr["forumpost"] == "no" ? "<img src=pic/forumpost.gif alt='No Posting' />\n" : "") . ($arr["uploadpos"] == "no" ? "<img src=pic/uploadpos.gif alt='No upload' />\n" : "") . ($arr["parked"] == "yes" ? "<img src=pic/parked.gif alt='Account Parked' />\n" : "") . "<font color={$fontcolor}> " . format_comment($arr["text"]) . "\n</font></td></tr>\n";
    }
    print "</table>";
}
?>

</body>
</html>
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:shoutbox.php

示例10: unset

                        unset($pm_buffer, $count);
                    }
                }
                header('Location: staffpanel.php?tool=mass_bonus_for_members&action=mass_bonus_for_members&pm=2');
                die;
            }
        }
        break;
}
//=== end switch
//=== make the class based selection thingie bit here :D
$count = 1;
$all_classes_check_boxes = '<table border="0" cellspacing="5" cellpadding="5" align="left"><tr>';
for ($i = UC_MIN; $i <= UC_MAX; ++$i) {
    $all_classes_check_boxes .= '<td class="one">
		<input type="checkbox" name="free_for_classes[]" value="' . $i . '" checked="checked" /> <span style="font-weight: bold;color:#' . get_user_class_color($i) . ';">' . get_user_class_name($i) . '</span></td>';
    if ($count == 6) {
        $all_classes_check_boxes .= '</tr>' . ($i < UC_MAX ? '<tr>' : '');
        $count = 0;
    }
    $count++;
}
$all_classes_check_boxes .= ($count == 0 ? '</table>' : '<tr><td colspan="' . (7 - $count) . '" class="one"></td></tr></table>') . '';
$bonus_GB = '<select name="GB">
        <option class="head" value="">Add Upload Credit</option>
        <option class="body" value="1073741824">1 GB</option>
        <option class="body" value="2147483648">2 GB</option>
        <option class="body" value="3221225472">3 GB</option>
        <option class="body" value="4294967296">4 GB</option>
        <option class="body" value="5368709120">5 GB</option>
        <option class="body" value="6442450944">6 GB</option>
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:mass_bonus_for_members.php

示例11: number_format

                    }
                    if ($arr["downloaded"] != 0) {
                        $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
                    } else {
                        $ratio = "---";
                    }
                    $ratio = "<font color=" . get_ratio_color($ratio) . ">{$ratio}</font>";
                    $uploaded = mksize($arr["uploaded"]);
                    $downloaded = mksize($arr["downloaded"]);
                    $added = substr($arr['added'], 0, 10);
                    $last_access = substr($arr['last_access'], 0, 10);
                    if ($uc % 2 == 0) {
                        $utc = "";
                    } else {
                        $utc = " bgcolor=\"ECE9D8\"";
                    }
                    /*$peer_res = sql_query("SELECT count(*) FROM peers WHERE ip = " . sqlesc($ras['ip']) . " AND userid = " . $arr['id']);
                      $peer_row = mysql_fetch_row($peer_res);*/
                    print "<tr{$utc}><td align=left><b><a href='userdetails.php?id=" . $arr['id'] . "'>" . get_user_class_color($arr['class'], $arr['username']) . "</b></a>" . get_user_icons($arr) . "</td>\n                                  <td align=center>{$arr['email']}</td>\n                                  <td align=center>{$added}</td>\n                                  <td align=center>{$last_access}</td>\n                                  <td align=center>{$downloaded}</td>\n                                  <td align=center>{$uploaded}</td>\n                                  <td align=center>{$ratio}</td>\n                                  <td align=center><span style=\"font-weight: bold;\">{$arr['ip']}</span></td>\n<td align=center>" . ($arr['peer_count'] > 0 ? "<span style=\"color: red; font-weight: bold;\">Да</span>" : "<span style=\"color: green; font-weight: bold;\">Нет</span>") . "</td></tr>\n";
                    $ip = $arr["ip"];
                }
            }
        }
    }
} else {
    print "<br /><table width=60% border=1 cellspacing=0 cellpadding=9><tr><td align=center>";
    print "<h2>Извините, только для администрации</h2></table></td></tr>";
}
end_frame();
end_table();
stdfoot();
开发者ID:klldll,项目名称:tbdev,代码行数:31,代码来源:ipcheck.php

示例12: while

    $HTMLOUT .= "No shouts here";
} else {
    $HTMLOUT .= "<table border='0' cellspacing='0' cellpadding='2' width='100%' align='left' class='small'>\n";
    $gotpm = 0;
    while ($arr = mysql_fetch_assoc($res)) {
        if ($arr['pms'] > 0 && $gotpm == 0) {
            $HTMLOUT .= '<tr><td align=\'center\'><a href=\'' . $INSTALLER09['baseurl'] . '/messages.php\' target=\'_parent\'><font color=\'blue\'>You have ' . $arr['pms'] . ' new message' . ($arr['pms'] > 1 ? 's' : '') . '</font></a></td></tr>';
            $gotpm++;
        }
        if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
            continue;
        } elseif ($arr['to_user'] == $CURUSER['id'] || $arr['userid'] == $CURUSER['id'] && $arr['to_user'] != 0) {
            $private = "<a href=\"javascript:private_reply('" . $arr['username'] . "')\"><img src=\"{$INSTALLER09['pic_base_url']}private-shout.png\" alt=\"Private shout\" title=\"Private shout! click to reply to " . $arr['username'] . "\" width=\"16\" style=\"padding-left:2px;padding-right:2px;\" border=\"0\" /></a>";
        } else {
            $private = '';
        }
        $edit = $CURUSER['class'] >= UC_STAFF || $arr['userid'] == $CURUSER['id'] && ($CURUSER['class'] >= UC_POWER_USER && $CURUSER['class'] <= UC_STAFF) ? "<a href='{$INSTALLER09['baseurl']}/shoutbox.php?edit={$arr['id']}&amp;user={$arr['userid']}'><img src='{$INSTALLER09['pic_base_url']}button_edit2.gif' border='0' alt=\"Edit Shout\"  title=\"Edit Shout\" /></a> " : "";
        $del = $CURUSER['class'] >= UC_STAFF ? "<a href='./shoutbox.php?del={$arr['id']}'><img src='{$INSTALLER09['pic_base_url']}button_delete2.gif' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a> " : "";
        //$delall = ( $CURUSER['class'] >= UC_SYSOP ? "<a href='./shoutbox.php?delall' onclick=\"confirm_delete(); return false;\"><img src='{$INSTALLER09['pic_base_url']}del.png' border='0' alt=\"Empty Shout\" title=\"Empty Shout\" /></a> " : "" );
        //$delall
        $pm = "<span class='date' style=\"color:{$dtcolor}\"><a target='_blank' href='./sendmessage.php?receiver={$arr['userid']}'><img src='{$INSTALLER09['pic_base_url']}button_pm2.gif' border='0' alt=\"Pm User\" title=\"Pm User\" /></a></span>\n";
        $date = get_date($arr["date"], 0, 1);
        $reply = "<a href='javascript:window.top.SmileIT(\"[b][i]=>&nbsp;[color=#" . get_user_class_color($arr['class']) . "]" . htmlspecialchars($arr['username']) . "[/color]&nbsp;-[/i][/b]\",\"shbox\",\"shbox_text\")'><img height='10' src='{$INSTALLER09['pic_base_url']}reply.gif' title='Reply' alt='Reply' style='border:none;' /></a>";
        $user_stuff = $arr;
        $user_stuff['id'] = $arr['userid'];
        $HTMLOUT .= "<tr style='background-color:{$bg};'><td><span class='size1' style='color:{$fontcolor}; '>[{$date}]</span>\n{$del} {$edit} {$pm} {$reply} {$private} " . format_username($user_stuff) . "<span class='size2' style='color:{$fontcolor};'> " . format_comment($arr["text"]) . "\n</span></td></tr>\n";
    }
    $HTMLOUT .= "</table>";
}
$HTMLOUT .= "</body></html>";
echo $HTMLOUT;
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:shoutbox.php

示例13: forum_stats

function forum_stats()
{
    //== 09 Active users in forums
    $htmlout = '';
    global $TBDEV, $forum_width, $lang, $CURUSER;
    $forum3 = "";
    $file = "./cache/forum.txt";
    $expire = 30;
    // 30 seconds
    if (file_exists($file) && filemtime($file) > time() - $expire) {
        $forum3 = unserialize(file_get_contents($file));
    } else {
        $dt = sqlesc(time() - 180);
        $forum1 = mysql_query("SELECT id, username, class, warned, donor, king, pirate, anonymous FROM users WHERE forum_access >= {$dt} ORDER BY class DESC") or sqlerr(__FILE__, __LINE__);
        while ($forum2 = mysql_fetch_assoc($forum1)) {
            $forum3[] = $forum2;
        }
        $OUTPUT = serialize($forum3);
        $fp = fopen($file, "w");
        fputs($fp, $OUTPUT);
        fclose($fp);
    }
    // end else
    $forumusers = "";
    if (is_array($forum3)) {
        foreach ($forum3 as $arr) {
            if ($forumusers) {
                $forumusers .= ",\n";
            }
            $forumusers .= "<span style=\"white-space: nowrap;\">";
            if ($arr["anonymous"] == "yes") {
                if ($CURUSER['class'] < UC_MODERATOR && $arr["id"] != $CURUSER["id"]) {
                    $arr["username"] = "<i>Anonymous</i>";
                } else {
                    $arr["username"] = "<font color='#" . get_user_class_color($arr['class']) . "'> " . htmlspecialchars($arr['username']) . "</font>+";
                }
            } else {
                $arr["username"] = "<font color='#" . get_user_class_color($arr['class']) . "'> " . htmlspecialchars($arr['username']) . "</font>";
            }
            $donator = $arr["donor"] === "yes";
            $warned = $arr["warned"] === "yes";
            if ($CURUSER) {
                $forumusers .= "<a href='{$TBDEV['baseurl']}/userdetails.php?id={$arr["id"]}'><b>{$arr["username"]}</b></a>";
            } else {
                $forumusers .= "<b>{$arr["username"]}</b>";
            }
            if ($arr["anonymous"] == "yes") {
                if ($CURUSER['class'] < UC_MODERATOR && $arr["id"] != $CURUSER["id"]) {
                    $forumusers .= "";
                } else {
                    if ($donator) {
                        $forumusers .= "<img src='{$TBDEV['pic_base_url']}star.gif' alt='Donated' />";
                    }
                }
            }
            if ($arr["anonymous"] == "yes") {
                if ($CURUSER['class'] < UC_MODERATOR && $arr["id"] != $CURUSER["id"]) {
                    $forumusers .= "";
                } else {
                    if ($warned) {
                        $forumusers .= "<img src='{$TBDEV['pic_base_url']}warned.gif' alt='Warned' />";
                    }
                }
            }
            $forumusers .= "</span>";
        }
    }
    if (!$forumusers) {
        $forumusers = "Currently No Active users in the Forum";
    }
    $topic_post_res = mysql_query("SELECT SUM(topiccount) AS topics, SUM(postcount) AS posts FROM forums");
    $topic_post_arr = mysql_fetch_assoc($topic_post_res);
    $htmlout .= "<br />\r\n\t<table width='{$forum_width}' border='0' cellspacing='0' cellpadding='5'>\r\n \t<tr>\r\n \t<td class='colhead' align='center'>Now active in Forums:</td>\r\n \t</tr>\r\n\t<tr>\r\n\t<td class='text'>";
    if ($CURUSER['anonymous'] == 'yes') {
        $htmlout .= "<p align='center'>(+) next to your username indicates you are Anonymous !</p>";
    }
    $htmlout .= "{$forumusers}</td>\r\n \t</tr>\r\n \t<tr>\r\n \t<td class='colhead' align='center'><h2>Our members wrote <b>" . number_format($topic_post_arr['posts']) . "</b> Posts in <b>" . number_format($topic_post_arr['topics']) . "</b> Threads</h2></td>\r\n \t</tr>\r\n\t</table>";
    return $htmlout;
}
开发者ID:thefkboss,项目名称:U-232,代码行数:79,代码来源:forums.php

示例14: mysql_num_rows

 $num = mysql_num_rows($ret);
 print "<form method=post action=takeconfirm.php?id={$id}><table border=1 width=100% cellspacing=0 cellpadding=5>" . "<tr class=tabletitle><td colspan=7><b>Статус приглашенных вами</b> ({$number})</td></tr>";
 if (!$num) {
     print "<tr class=tableb><td colspan=7>Еще никто вами не приглашен.</tr>";
 } else {
     print "<tr class=tableb><td><b>Пользователь</b></td><td><b>Email</b></td><td><b>Раздал</b></td><td><b>Скачал</b></td><td><b>Рейтинг</b></td><td><b>Статус</b></td>";
     if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP) {
         print "<td align=center><b>Подтвердить</b></td>";
     }
     print "</tr>";
     for ($i = 0; $i < $num; ++$i) {
         $arr = mysql_fetch_assoc($ret);
         if ($arr[status] == 'pending') {
             $user = "<td align=left>{$arr['username']}</td>";
         } else {
             $user = "<td align=left><a href=userdetails.php?id={$arr['id']}>" . get_user_class_color($arr["class"], "{$arr['username']}") . "</a>" . ($arr["warned"] == "yes" ? "&nbsp;<img src=pic/warned.gif border=0 alt='Warned'>" : "") . ($arr["enabled"] == "no" ? "&nbsp;<img src=pic/disabled.gif border=0 alt='Disabled'>" : "") . ($arr["donor"] == "yes" ? "&nbsp;<img src=pic/star.gif border=0 alt='Donor'>" : "") . "</td>";
         }
         if ($arr["downloaded"] > 0) {
             $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
             $ratio = "<font color=" . get_ratio_color($ratio) . ">{$ratio}</font>";
         } else {
             if ($arr["uploaded"] > 0) {
                 $ratio = "Inf.";
             } else {
                 $ratio = "---";
             }
         }
         if ($arr["status"] == 'confirmed') {
             $status = "<a href=userdetails.php?id={$arr['id']}><font color=green>Подтвержден</font></a>";
         } else {
             $status = "<font color=red>Не подтвержден</font>";
开发者ID:klldll,项目名称:tbdev,代码行数:31,代码来源:invite.php

示例15: htmlspecialchars_uni

    }
    ?>
 
</td>
</tr>
<?php 
}
if ($user["website"]) {
    print "<tr><td class=\"rowhead\">Сайт</td><td align=\"left\"><a href=\"{$user['website']}\" target=\"_blank\">{$user['website']}</a></td></tr>\n";
}
//if ($user['donated'] > 0 && (get_user_class() >= UC_MODERATOR || $CURUSER["id"] == $user["id"]))
//  print("<tr><td class=rowhead>Donated</td><td align=left>$$user[donated]</td></tr>\n");
if ($user["avatar"]) {
    print "<tr><td class=\"rowhead\">Аватар</td><td align=left><img src=\"" . htmlspecialchars_uni($user["avatar"]) . "\"></td></tr>\n";
}
print "<tr><td class=\"rowhead\">Класс</td><td align=\"left\"><b>" . get_user_class_color($user["class"], get_user_class_name($user["class"])) . ($user["title"] != "" ? " / <span style=\"color: purple;\">{$user["title"]}</span>" : "") . "</b></td></tr>\n";
print "<tr><td class=\"rowhead\">Пол</td><td align=\"left\">{$gender}</td></tr>\n";
if ($user["birthday"] != '0000-00-00') {
    print "<tr><td class=\"rowhead\">Возраст</td><td align=\"left\">{$age}</td></tr>\n";
    $birthday = date("d.m.Y", strtotime($birthday));
    print "<tr><td class=\"rowhead\">Дата Рождения</td><td align=\"left\">{$birthday}</td></tr>\n";
    $month_of_birth = substr($user["birthday"], 5, 2);
    $day_of_birth = substr($user["birthday"], 8, 2);
    for ($i = 0; $i < count($zodiac); $i++) {
        if ($month_of_birth == substr($zodiac[$i][2], 3, 2)) {
            if ($day_of_birth >= substr($zodiac[$i][2], 0, 2)) {
                $zodiac_img = $zodiac[$i][1];
                $zodiac_name = $zodiac[$i][0];
            } else {
                if ($i == 11) {
                    $zodiac_img = $zodiac[0][1];
开发者ID:klldll,项目名称:tbdev,代码行数:31,代码来源:userdetails.php


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