• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_row_count函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: cleanup_show_main

function cleanup_show_main()
{
    $count1 = get_row_count('cleanup');
    $perpage = 15;
    $pager = pager($perpage, $count1, 'staffpanel.php?tool=cleanup_manager&');
    $htmlout = "<h2>Current Cleanup Tasks</h2>\n    <table class='torrenttable' bgcolor='#333333' border='1' cellpadding='5px' width='80%'>\n    <tr>\n      <td class='colhead'>Cleanup Title &amp; Description</td>\n      <td class='colhead' width='150px'>Runs every</td>\n      <td class='colhead' width='150px'>Next Clean Time</td>\n      <td class='colhead' width='40px'>Edit</td>\n      <td class='colhead' width='40px'>Delete</td>\n      <td class='colhead' width='40px'>Off/On</td>\n      <td class='colhead' style='width: 40px;'>Run&nbsp;now</td>\n    </tr>";
    $sql = sql_query("SELECT * FROM cleanup ORDER BY clean_time ASC " . $pager['limit']) or sqlerr(__FILE__, __LINE__);
    if (!mysqli_num_rows($sql)) {
        stderr('Error', 'Fucking panic now!');
    }
    while ($row = mysqli_fetch_assoc($sql)) {
        $row['_clean_time'] = get_date($row['clean_time'], 'LONG');
        $row['clean_increment'] = $row['clean_increment'];
        $row['_class'] = $row['clean_on'] != 1 ? " style='color:red'" : '';
        $row['_title'] = $row['clean_on'] != 1 ? " (Locked)" : '';
        $row['_clean_time'] = $row['clean_on'] != 1 ? "<span style='color:red'>{$row['_clean_time']}</span>" : $row['_clean_time'];
        $htmlout .= "<tr>\n          <td{$row['_class']}><strong>{$row['clean_title']}{$row['_title']}</strong><br />{$row['clean_desc']}</td>\n          <td>" . mkprettytime($row['clean_increment']) . "</td>\n          <td>{$row['_clean_time']}</td>\n          <td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=edit&amp;cid={$row['clean_id']}'>\n            <img src='./pic/aff_tick.gif' alt='Edit Cleanup' title='Edit' border='0' height='12' width='12' /></a></td>\n\n          <td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=delete&amp;cid={$row['clean_id']}'>\n            <img src='./pic/aff_cross.gif' alt='Delete Cleanup' title='Delete' border='0' height='12' width='12' /></a></td>\n          <td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=unlock&amp;cid={$row['clean_id']}&amp;clean_on={$row['clean_on']}'>\n            <img src='./pic/warned.png' alt='On/Off Cleanup' title='on/off' border='0' height='12' width='12' /></a></td>\n<td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=run&amp;cid={$row['clean_id']}'>Run it now</a></td>\n </tr>";
    }
    $htmlout .= "</table>";
    if ($count1 > $perpage) {
        $htmlout .= $pager['pagerbottom'];
    }
    $htmlout .= "<br />\n                <span class='btn'><a href='./staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=new'>Add New</a></span>";
    echo stdhead('Cleanup Manager - View') . $htmlout . stdfoot();
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:25,代码来源:cleanup_manager.php


示例2: set_count_so_far

 function set_count_so_far()
 {
     $userid = $this->userid;
     $now = date("Y-m-d H:i:s", TIMENOW - 86400);
     $countsofar = get_row_count("attachments", "WHERE userid=" . sqlesc($userid) . " AND added > " . sqlesc($now));
     $this->countsofar = $countsofar;
 }
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:7,代码来源:class_attachment.php


示例3: addbookmark

 function addbookmark($torrentid)
 {
     global $CURUSER;
     if (get_row_count("bookmarks", "WHERE userid={$CURUSER['id']} AND torrentid = {$torrentid}") > 0) {
         stderr("Error", "Torrent already bookmarked");
     }
     sql_query("INSERT INTO bookmarks (userid, torrentid) VALUES ({$CURUSER['id']}, {$torrentid})") or sqlerr(__FILE__, __LINE__);
 }
开发者ID:thefkboss,项目名称:U-232,代码行数:8,代码来源:bookmark.php


示例4: addbookmark

 function addbookmark($torrentid)
 {
     global $CURUSER, $mc1, $INSTALLER09;
     if (get_row_count("bookmarks", "WHERE userid=" . sqlesc($CURUSER['id']) . " AND torrentid = " . sqlesc($torrentid)) > 0) {
         stderr("Error", "Torrent already bookmarked");
     }
     sql_query("INSERT INTO bookmarks (userid, torrentid) VALUES (" . sqlesc($CURUSER['id']) . ", " . sqlesc($torrentid) . ")") or sqlerr(__FILE__, __LINE__);
     $mc1->delete_value('bookmm_' . $CURUSER['id']);
     make_bookmarks($CURUSER['id'], 'bookmm_');
 }
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:10,代码来源:bookmark.php


示例5: Copyright

/**
|--------------------------------------------------------------------------|
|   https://github.com/Bigjoos/                			    |
|--------------------------------------------------------------------------|
|   Licence Info: GPL			                                    |
|--------------------------------------------------------------------------|
|   Copyright (C) 2010 U-232 V4					    |
|--------------------------------------------------------------------------|
|   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.   |
|--------------------------------------------------------------------------|
|   Project Leaders: Mindless,putyn.					    |
|--------------------------------------------------------------------------|
 _   _   _   _   _     _   _   _   _   _   _     _   _   _   _
/ \ / \ / \ / \ / \   / \ / \ / \ / \ / \ / \   / \ / \ / \ / \
( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e )
\_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/
*/
function docleanup($data)
{
    global $INSTALLER09, $queries;
    set_time_limit(0);
    ignore_user_abort(1);
    //== 09 Stats
    $XBT_Seeder = mysqli_fetch_assoc(sql_query("SELECT sum(seeders) AS seeders FROM torrents")) or sqlerr(__FILE__, __LINE__);
    $XBT_Leecher = mysqli_fetch_assoc(sql_query("SELECT sum(leechers) AS leechers FROM torrents")) or sqlerr(__FILE__, __LINE__);
    $registered = get_row_count('users');
    $unverified = get_row_count('users', "WHERE status='pending'");
    $torrents = get_row_count('torrents');
    $seeders = XBT_TRACKER == true ? $XBT_Seeder : get_row_count('peers', "WHERE seeder='yes'");
    $leechers = XBT_TRACKER == true ? $XBT_Leecher : get_row_count('peers', "WHERE seeder='no'");
    $torrentstoday = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 86400');
    $donors = get_row_count('users', "WHERE donor ='yes'");
    $unconnectables = XBT_TRACKER == true ? '0' : get_row_count("peers", " WHERE connectable='no'");
    $forumposts = get_row_count("posts");
    $forumtopics = get_row_count("topics");
    $dt = TIME_NOW - 300;
    // Active users last 5 minutes
    $numactive = get_row_count("users", "WHERE last_access >= {$dt}");
    $torrentsmonth = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 2592000');
    $gender_na = get_row_count('users', "WHERE gender='NA'");
    $gender_male = get_row_count('users', "WHERE gender='Male'");
    $gender_female = get_row_count('users', "WHERE gender='Female'");
    $powerusers = get_row_count('users', "WHERE class='" . UC_POWER_USER . "'");
    $disabled = get_row_count('users', "WHERE enabled='no'");
    $uploaders = get_row_count('users', "WHERE class='" . UC_UPLOADER . "'");
    $moderators = get_row_count('users', "WHERE class='" . UC_MODERATOR . "'");
    $administrators = get_row_count('users', "WHERE class='" . UC_ADMINISTRATOR . "'");
    $sysops = get_row_count('users', "WHERE class='" . UC_SYSOP . "'");
    $seeders = (int) $XBT_Seeder['seeders'];
    $leechers = (int) $XBT_Leecher['leechers'];
    sql_query("UPDATE stats SET regusers = '{$registered}', unconusers = '{$unverified}', torrents = '{$torrents}', seeders = '{$seeders}', leechers = '{$leechers}', unconnectables = '{$unconnectables}', torrentstoday = '{$torrentstoday}', donors = '{$donors}', forumposts = '{$forumposts}', forumtopics = '{$forumtopics}', numactive = '{$numactive}', torrentsmonth = '{$torrentsmonth}', gender_na = '{$gender_na}', gender_male = '{$gender_male}', gender_female = '{$gender_female}', powerusers = '{$powerusers}', disabled = '{$disabled}', uploaders = '{$uploaders}', moderators = '{$moderators}', administrators = '{$administrators}', sysops = '{$sysops}' WHERE id = '1' LIMIT 1");
    if ($queries > 0) {
        write_log("Stats clean-------------------- Stats cleanup Complete using {$queries} queries --------------------");
    }
    if (false !== mysqli_affected_rows($GLOBALS["___mysqli_ston"])) {
        $data['clean_desc'] = mysqli_affected_rows($GLOBALS["___mysqli_ston"]) . " items updated";
    }
    if ($data['clean_log']) {
        cleanup_log($data);
    }
}
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:61,代码来源:sitestats_update.php


示例6: docleanup

/**
 *   https://github.com/Bigjoos/
 *   Licence Info: GPL
 *   Copyright (C) 2010 U-232 v.3
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless, putyn.
 *
 */
function docleanup($data)
{
    global $INSTALLER09, $queries;
    set_time_limit(0);
    ignore_user_abort(1);
    //== 09 Stats
    $registered = get_row_count('users');
    $unverified = get_row_count('users', "WHERE status='pending'");
    $torrents = get_row_count('torrents');
    $seeders = get_row_count('peers', "WHERE seeder='yes'");
    $leechers = get_row_count('peers', "WHERE seeder='no'");
    $torrentstoday = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 86400');
    $donors = get_row_count('users', "WHERE donor ='yes'");
    $unconnectables = get_row_count("peers", " WHERE connectable='no'");
    $forumposts = get_row_count("posts");
    $forumtopics = get_row_count("topics");
    $dt = TIME_NOW - 300;
    // Active users last 5 minutes
    $numactive = get_row_count("users", "WHERE last_access >= {$dt}");
    $torrentsmonth = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 2592000');
    $gender_na = get_row_count('users', "WHERE gender='N/A'");
    $gender_male = get_row_count('users', "WHERE gender='Male'");
    $gender_female = get_row_count('users', "WHERE gender='Female'");
    $powerusers = get_row_count('users', "WHERE class='1'");
    $disabled = get_row_count('users', "WHERE enabled='no'");
    $uploaders = get_row_count('users', "WHERE class='3'");
    $moderators = get_row_count('users', "WHERE class='4'");
    $administrators = get_row_count('users', "WHERE class='5'");
    $sysops = get_row_count('users', "WHERE class='6'");
    sql_query("UPDATE stats SET regusers = '{$registered}', unconusers = '{$unverified}', torrents = '{$torrents}', seeders = '{$seeders}', leechers = '{$leechers}', unconnectables = '{$unconnectables}', torrentstoday = '{$torrentstoday}', donors = '{$donors}', forumposts = '{$forumposts}', forumtopics = '{$forumtopics}', numactive = '{$numactive}', torrentsmonth = '{$torrentsmonth}', gender_na = '{$gender_na}', gender_male = '{$gender_male}', gender_female = '{$gender_female}', powerusers = '{$powerusers}', disabled = '{$disabled}', uploaders = '{$uploaders}', moderators = '{$moderators}', administrators = '{$administrators}', sysops = '{$sysops}' WHERE id = '1' LIMIT 1");
    if ($queries > 0) {
        write_log("Stats clean-------------------- Stats cleanup Complete using {$queries} queries --------------------");
    }
    if (false !== mysqli_affected_rows($GLOBALS["___mysqli_ston"])) {
        $data['clean_desc'] = mysqli_affected_rows($GLOBALS["___mysqli_ston"]) . " items updated";
    }
    if ($data['clean_log']) {
        cleanup_log($data);
    }
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:48,代码来源:sitestats_update.php


示例7: sql_query

	<?php 
print "<td align=center class=tabletitle><b>" . $lang_usercp['text_recently_read_topics'] . "</b></td>";
?>
</table>
<?php 
print "<table border=0 cellspacing=0 cellpadding=3 width=940><tr>" . "<td class=colhead align=left width=80%>" . $lang_usercp['col_topic_title'] . "</td>" . "<td class=colhead align=center><nobr>" . $lang_usercp['col_replies'] . "/" . $lang_usercp['col_views'] . "</nobr></td>" . "<td class=colhead align=center>" . $lang_usercp['col_topic_starter'] . "</td>" . "<td class=colhead align=center width=20%>" . $lang_usercp['col_last_post'] . "</td>" . "</tr>";
$res_topics = sql_query("SELECT * FROM readposts INNER JOIN topics ON topics.id = readposts.topicid WHERE readposts.userid = " . $CURUSER[id] . " ORDER BY readposts.id DESC LIMIT 5") or sqlerr();
while ($topicarr = mysql_fetch_assoc($res_topics)) {
    $topicid = $topicarr["id"];
    $topic_title = $topicarr["subject"];
    $topic_userid = $topicarr["userid"];
    $topic_views = $topicarr["views"];
    $views = number_format($topic_views);
    /// GETTING TOTAL NUMBER OF POSTS ///
    if (!($posts = $Cache->get_value('topic_' . $topicid . '_post_count'))) {
        $posts = get_row_count("posts", "WHERE topicid=" . sqlesc($topicid));
        $Cache->cache_value('topic_' . $topicid . '_post_count', $posts, 3600);
    }
    $replies = max(0, $posts - 1);
    /// GETTING USERID AND DATE OF LAST POST ///
    $arr = get_post_row($topicarr['lastpost']);
    $postid = 0 + $arr["id"];
    $userid = 0 + $arr["userid"];
    $added = gettime($arr['added'], true, false);
    /// GET NAME OF LAST POSTER ///
    $username = get_username($userid);
    /// GET NAME OF THE AUTHOR ///
    $author = get_username($topic_userid);
    $subject = "<a href=forums.php?action=viewtopic&topicid={$topicid}><b>" . htmlspecialchars($topicarr["subject"]) . "</b></a>";
    print "<tr class=tableb><td style='padding-left: 10px' align=left class=rowfollow>{$subject}</td>" . "<td align=center class=rowfollow>" . $replies . "/" . $views . "</td>" . "<td align=center class=rowfollow>" . $author . "</td>" . "<td align=center class=rowfollow><nobr>" . $added . " | " . $username . "</nobr></td></tr>";
}
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:usercp.php


示例8: begin_frame

    }
} else {
    $HTMLOUT .= begin_frame();
    $s = isset($_GET["s"]) ? htmlsafechars($_GET["s"]) : "";
    $w = isset($_GET["w"]) ? htmlsafechars($_GET["w"]) : "";
    if ($s && $w == "name") {
        $where = "WHERE s.name LIKE " . sqlesc("%" . $s . "%");
    } elseif ($s && $w == "imdb") {
        $where = "WHERE s.imdb LIKE " . sqlesc("%" . $s . "%");
    } elseif ($s && $w == "comment") {
        $where = "WHERE s.comment LIKE " . sqlesc("%" . $s . "%");
    } else {
        $where = "";
    }
    $link = $s && $w ? "s={$s}&amp;w={$w}&amp;" : "";
    $count = get_row_count("subtitles AS s", "{$where}");
    if ($count == 0 && !$s && !$w) {
        stdmsg("", "There is no subtitle, go <a href=\"subtitles.php?mode=upload\">here</a> and start uploading.", false);
    }
    $perpage = 5;
    $pager = pager($perpage, $count, "subtitles.php?" . $link);
    $res = sql_query("SELECT s.id, s.name,s.lang, s.imdb,s.fps,s.poster,s.cds,s.hits,s.added,s.owner,s.comment, u.username FROM subtitles AS s LEFT JOIN users AS u ON s.owner=u.id {$where} ORDER BY s.added DESC {$pager['limit']}") or sqlerr(__FILE__, __LINE__);
    $HTMLOUT .= "<table width='700' cellpadding='5' cellspacing='0' border='0' align='center' style='font-weight:bold'>\n<tr><td style='border:none' valign='middle'>\n<fieldset style='text-align:center; border:#0066CC solid 1px; background-color:#999999'>\n<legend style='text-align:center; border:#0066CC solid 1px ; background-color:#999999;font-size:13px;'><b>Search</b></legend>\n<form action='subtitles.php' method='get'>\n<input size='50' value='" . $s . "' name='s' type='text' />\n<select name='w'>\n<option value='name' " . ($w == "name" ? "selected='selected'" : "") . ">Name</option>\n<option value='imdb' " . ($w == "imdb" ? "selected='selected'" : "") . ">IMDb</option>\n<option value='comment' " . ($w == "comment" ? "selected='selected'" : "") . ">Comments</option>\n</select>\n<input type='submit' value='Search' />&nbsp;<input type='button' onclick=\"window.location.href='subtitles.php?mode=upload'\" value='Upload' />\n</form></fieldset></td></tr>";
    if ($s) {
        $HTMLOUT .= "<tr><td style='border:none;'>Search result for <i>'{$s}'</i><br />" . (mysqli_num_rows($res) == 0 ? "Nothing found! Try again with a refined search string." : "") . "</td></tr>";
    }
    $HTMLOUT .= "\n</table>\n<br />";
    if (mysqli_num_rows($res) > 0) {
        if ($count > $perpage) {
            $HTMLOUT .= "<div align=\"left\" style=\"padding:5px\">{$pager['pagertop']}</div>";
        }
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:31,代码来源:subtitles.php


示例9: floor

    }
    if ($hours > 0) {
        $mins_elapsed = floor(($st - $hours * 60 * 60) / 60);
        $secs_elapsed = floor($st - $mins * 60);
        return "<font color='red'><b>{$hours}:{$mins_elapsed}:{$secs_elapsed}</b></font>";
    }
    if ($mins > 0) {
        $secs_elapsed = floor($st - $mins * 60);
        return "<font color='red'><b>0:{$mins}:{$secs_elapsed}</b></font>";
    }
    if ($secs > 0) {
        return "<font color='red'><b>0:0:{$secs}</b></font>";
    }
    return "<font color='red'><b>{$lang['ad_snatched_torrents_none']}<br />{$lang['ad_snatched_torrents_reported']}</b></font>";
}
$count = number_format(get_row_count("snatched", "WHERE complete_date != '0'"));
$HTMLOUT .= "<h2 align='center'>{$lang['ad_snatched_torrents_allsnatched']}</h2>\r\n<font class='small'>{$lang['ad_snatched_torrents_currently']}&nbsp;" . htmlspecialchars($count) . "&nbsp;{$lang['ad_snatched_torrents_snatchedtor']}</font>";
$HTMLOUT .= begin_main_frame();
$res = sql_query("SELECT COUNT(id) FROM snatched") or sqlerr();
$row = mysql_fetch_row($res);
$count = $row[0];
$snatchedperpage = 15;
$pager = pager($snatchedperpage, $count, "staffpanel.php?tool=snatched_torrents&amp;action=snatched_torrents&amp;");
if ($count > $snatchedperpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$sql = "SELECT sn.userid, sn.id, sn.torrentid, sn.timesann, sn.hit_and_run, sn.mark_of_cain, sn.uploaded, sn.downloaded, sn.start_date, sn.complete_date, sn.seeder, sn.leechtime, sn.seedtime, u.username, t.name " . "FROM snatched AS sn " . "LEFT JOIN users AS u ON u.id=sn.userid " . "LEFT JOIN torrents AS t ON t.id=sn.torrentid WHERE complete_date != '0'" . "ORDER BY sn.complete_date DESC " . $pager['limit'] . "";
$result = sql_query($sql) or print mysql_error();
if (mysql_num_rows($result) != 0) {
    $HTMLOUT .= "<table width='100%' border='1' cellspacing='0' cellpadding='5' align='center'>\r\n<tr>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_name']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_torname']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_hnr']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_marked']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_announced']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_upload']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_download']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_seedtime']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_leechtime']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_startdate']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_enddate']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_seeding']}</td>\r\n</tr>";
    while ($row = mysql_fetch_assoc($result)) {
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:snatched_torrents.php


示例10: array_merge

    $HTMLOUT = '';
    $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\r\n\t\t<head>\r\n\t\t<title>Error!</title>\r\n\t\t</head>\r\n\t\t<body>\r\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\r\n\t</body></html>";
    print $HTMLOUT;
    exit;
}
require_once INCL_DIR . 'user_functions.php';
require_once INCL_DIR . 'pager_functions.php';
require_once INCL_DIR . 'html_functions.php';
require_once INCL_DIR . 'bbcode_functions.php';
$lang = array_merge($lang);
if (!min_class(UC_STAFF)) {
    header("Location: {$TBDEV['baseurl']}/index.php");
}
$HTMLOUT = "";
// //////////////////////
$count1 = get_row_count('shoutbox');
$perpage = 15;
$pager = pager($perpage, $count1, 'admin.php?action=shistory&amp;');
$res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__);
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= begin_main_frame();
if (mysql_num_rows($res) == 0) {
    $HTMLOUT .= "No shouts here";
} else {
    $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n";
    while ($arr = mysql_fetch_assoc($res)) {
        if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
            continue;
        }
开发者ID:thefkboss,项目名称:U-232,代码行数:31,代码来源:shistory.php


示例11: header

}
if (isset($CURUSER)) {
    header("Location: {$INSTALLER09['baseurl']}/index.php");
    exit;
}
ini_set('session.use_trans_sid', '0');
$stdfoot = array('js' => array('check', 'jquery.pstrength-min.1.2', 'jquery.simpleCaptcha-0.2'));
if (!$INSTALLER09['openreg']) {
    stderr('Sorry', 'Invite only - Signups are closed presently if you have an invite code click <a href="' . $INSTALLER09['baseurl'] . '/invite_signup.php"><b> Here</b></a>');
}
$HTMLOUT = $year = $month = $day = $gender = '';
$HTMLOUT .= "\n    <script type='text/javascript'>\n    /*<![CDATA[*/\n    \$(function() {\n    \$('.password').pstrength();\n    });\n    /*]]>*/\n    </script>";
$lang = array_merge(load_language('global'), load_language('signup'));
$newpage = new page_verify();
$newpage->create('tesu');
if (get_row_count('users') >= $INSTALLER09['maxusers']) {
    stderr($lang['stderr_errorhead'], sprintf($lang['stderr_ulimit'], $INSTALLER09['maxusers']));
}
//==timezone select
$offset = (string) $INSTALLER09['time_offset'];
$time_select = "<select name='user_timezone'>";
foreach ($TZ as $off => $words) {
    if (preg_match("/^time_(-?[\\d\\.]+)\$/", $off, $match)) {
        $time_select .= $match[1] == $offset ? "<option value='{$match[1]}' selected='selected'>{$words}</option>\n" : "<option value='{$match[1]}'>{$words}</option>\n";
    }
}
$time_select .= "</select>";
//==country by pdq
function countries()
{
    global $mc1, $INSTALLER09;
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:signup.php


示例12: maxcoder

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("Reset Ratio - Nosey Cunt !");
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $tid = isset($_POST["tid"]) ? 0 + $_POST["tid"] : 0;
    if ($tid == 0) {
        stderr(":w00t:", "wtf are your trying to do!?");
    }
    if (get_row_count("torrents", "where id=" . $tid) != 1) {
        stderr(":w00t:", "That is not a torrent !!!!");
    }
    $q = mysql_query("SELECT s.downloaded as sd , t.id as tid, t.name,t.size, u.username,u.id as uid,u.downloaded as ud FROM torrents as t LEFT JOIN snatched as s ON s.torrentid = t.id LEFT JOIN users as u ON u.id = s.userid WHERE t.id =" . $tid) or print mysql_error();
    while ($a = mysql_fetch_assoc($q)) {
        $newd = $a["ud"] > 0 ? $a["ud"] - $a["sd"] : 0;
        $new_download[] = "(" . $a["uid"] . "," . $newd . ")";
        $tname = $a["name"];
        $msg = "Hey , " . $a["username"] . "\n";
        $msg .= "Looks like torrent [b]" . $a["name"] . "[/b] is nuked and we want to take back the data you downloaded\n";
        $msg .= "So you downloaded " . prefixed($a["sd"]) . " your new download will be " . prefixed($newd) . "\n";
        $pms[] = "(0," . $a["uid"] . "," . sqlesc(get_date_time()) . "," . sqlesc($msg) . ")";
    }
    //send the pm !!
    mysql_query("INSERT into messages (sender, receiver, added, msg) VALUES " . join(",", $pms)) or print mysql_error();
    //update user download amount
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:datareset.php


示例13: dbconn

require "include/bittorrent.php";
require_once "include/bbcode_functions.php";
dbconn(true);
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_MODERATOR) {
    hacker_dork("Admin Bookmarks - Nosey Cunt !");
}
stdhead("Staff Bookmarks");
begin_main_frame();
$addbookmark = number_format(get_row_count("users", "WHERE addbookmark='yes'"));
begin_frame("In total ({$addbookmark})", true);
begin_table();
?>
<table cellpadding="4" cellspacing="1" border="0" style="width:800px" class="tableinborder" ><tr><td class="tabletitle">ID</td><td class="tabletitle" align="left">Username</td><td class="tabletitle" align="left">Suspicion</td><td class="tabletitle" align="left">Uploaded</td><td class="tabletitle" align="left">Downloaded</td><td class="tabletitle" align="left">Ratio</td></tr>
<?php 
$res = mysql_query("SELECT id,username,bookmcomment,uploaded,downloaded FROM users WHERE addbookmark='yes' ORDER BY id") or print mysql_error();
while ($arr = @mysql_fetch_assoc($res)) {
    if ($arr["downloaded"] != 0) {
        $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
    } else {
        $ratio = "---";
    }
    $ratio = "<font color=" . get_ratio_color($ratio) . ">{$ratio}</font>";
    $uploaded = prefixed($arr["uploaded"]);
    $downloaded = prefixed($arr["downloaded"]);
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:adminbookmarks.php


示例14: safeChar

    }
    $do = safeChar($_POST['do']);
    if ($do == 'enabled') {
        sql_query("UPDATE users SET enabled = 'yes' WHERE ID IN(" . join(', ', $ids) . ") AND enabled = 'no'");
    } elseif ($do == 'confirm') {
        sql_query("UPDATE users SET status = 'confirmed' WHERE ID IN(" . join(', ', $ids) . ") AND status = 'pending'");
    } elseif ($do == 'delete') {
        sql_query("DELETE FROM users WHERE ID IN(" . join(', ', $ids) . ")");
    } else {
        header('Location: ' . $_SERVER['PHP_SELF']);
        exit;
    }
}
$disabled = number_format(get_row_count("users", "WHERE enabled='no'"));
$pending = number_format(get_row_count("users", "WHERE status='pending'"));
$count = number_format(get_row_count("users", "WHERE enabled='no' OR status='pending' ORDER BY username DESC"));
$perpage = '25';
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, $_SERVER['PHP_SELF'] . "?");
$res = mysql_query("SELECT id, username, added, downloaded, uploaded, last_access, class, donor, warned, enabled, status FROM users WHERE enabled='no' OR status='pending' ORDER BY username DESC");
stdhead("ACP Manager");
begin_main_frame("Disabled Users: [{$disabled}] | Pending Users: [{$pending}]");
?>
<script language="Javascript" type="text/javascript">eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 2="3";6 d=b 9;f e(a){c(2=="3"){4(1=0;1<a.5;1++){a[1].7=8}2="8"}g{4(1=0;1<a.5;1++){a[1].7=3}2="3"}};',17,17,'|i|checkflag|false|for|length|var|checked|true|Array||new|if|marked_row|check|function|else'.split('|'),0,{}))</script><?php 
if (mysql_num_rows($res) != 0) {
    echo $pagertop;
    begin_table('', true);
    ?>
<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post" name="viewusers">
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:acpmanage.php


示例15: while

<td class="colhead"><?php 
        echo $lang_admanage['col_end_time'];
        ?>
</td>
<td class="colhead"><?php 
        echo $lang_admanage['col_clicks'];
        ?>
</td>
<td class="colhead"><?php 
        echo $lang_admanage['col_action'];
        ?>
</td>
</tr>
<?php 
        while ($row = mysql_fetch_array($res)) {
            $clickcount = get_row_count("adclicks", "WHERE adid=" . sqlesc($row['id']));
            ?>
<tr>
<td class="colfollow"><?php 
            echo $row['enabled'] ? "<font color=\"green\">" . $lang_admanage['text_yes'] . "</font>" : "<font color=\"red\">" . $lang_admanage['text_no'] . "</font>";
            ?>
</td>
<td class="colfollow"><?php 
            echo htmlspecialchars($row['name']);
            ?>
</td>
<td class="colfollow"><?php 
            echo get_position_name($row['position']);
            ?>
</td>
<td class="colfollow"><?php 
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:admanage.php


示例16: class_check

        <h1 style="text-align:center;">Error</h1>
	<div style="font-size:33px;color:white;background-color:red;text-align:center;">Incorrect access<br />You cannot access this file directly.</div>
	</body></html>';
    echo $HTMLOUT;
    exit;
}
require_once INCL_DIR . 'user_functions.php';
require_once INCL_DIR . 'pager_functions.php';
require_once INCL_DIR . 'html_functions.php';
require_once INCL_DIR . 'bbcode_functions.php';
require_once CLASS_DIR . 'class_check.php';
class_check(UC_STAFF);
$lang = array_merge($lang, load_language('ad_shistory'));
$HTMLOUT = '';
// //////////////////////
$count1 = get_row_count('shoutbox', "WHERE staff_shout='no'");
$perpage = (int) $CURUSER['postsperpage'];
if (!$perpage) {
    $perpage = 15;
}
$pager = pager($perpage, $count1, 'staffpanel.php?tool=shistory&amp;');
$res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id WHERE staff_shout='no' AND (to_user ={$CURUSER['id']} OR userid ={$CURUSER['id']} OR to_user =0) ORDER BY s.date DESC " . $pager['limit']) or sqlerr(__FILE__, __LINE__);
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagertop'] . "<br>";
}
$HTMLOUT .= "<div class='row'><div class='col-md-12'>";
if (mysqli_num_rows($res) == 0) {
    $HTMLOUT .= $lang['shistory_none'];
} else {
    $HTMLOUT .= "<table class='table table-bordered'>\n";
    while ($arr = mysqli_fetch_assoc($res)) {
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:31,代码来源:shistory.php


示例17: mksize

         } else {
             $status = "<a href=checkuser.php?id={$arr['id']}><font color=#ca0226>" . $lang_invite['text_pending'] . "</font></a>";
         }
         print "<tr class=rowfollow>{$user}<td>{$arr['email']}</td><td class=rowfollow>" . mksize($arr[uploaded]) . "</td><td class=rowfollow>" . mksize($arr[downloaded]) . "</td><td class=rowfollow>{$ratio}</td><td class=rowfollow>{$status}</td>";
         if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP) {
             print "<td>";
             if ($arr[status] == 'pending') {
                 print "<input type=\"checkbox\" name=\"conusr[]\" value=\"" . $arr[id] . "\" />";
             }
             print "</td>";
         }
         print "</tr>";
     }
 }
 if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP) {
     $pendingcount = number_format(get_row_count("users", "WHERE  status='pending' AND invited_by={$CURUSER['id']}"));
     if ($pendingcount) {
         print "<input type=hidden name=email value={$arr['email']}>";
         print "<tr><td colspan=7 align=right><input type=submit style='height: 20px' value=" . $lang_invite['submit_confirm_users'] . "></td></tr>";
     }
     print "</form>";
     print "<tr><td colspan=7 align=center><form method=post action=invite.php?id=" . htmlspecialchars($id) . "&type=new><input type=submit " . ($CURUSER[invites] <= 0 ? "disabled " : "") . " value='" . $lang_invite['sumbit_invite_someone'] . "'></form></td></tr>";
 }
 print "</table>";
 $rul = sql_query("SELECT COUNT(*) FROM invites WHERE inviter =" . mysql_real_escape_string($id)) or sqlerr();
 $arre = mysql_fetch_row($rul);
 $number1 = $arre[0];
 $rer = sql_query("SELECT invitee, hash, time_invited FROM invites WHERE inviter = " . mysql_real_escape_string($id)) or sqlerr();
 $num1 = mysql_num_rows($rer);
 print "<table border=1 width=737 cellspacing=0 cellpadding=5>" . "<h2 align=center>" . $lang_invite['text_sent_invites_status'] . " ({$number1})</h2>";
 if (!$num1) {
开发者ID:chenrizhi,项目名称:mtpt,代码行数:31,代码来源:invite.php


示例18: check_whether_exist

function check_whether_exist($id, $place = 'forum')
{
    global $lang_forums;
    int_check($id, true);
    switch ($place) {
        case 'forum':
            $count = get_row_count("forums", "WHERE id=" . sqlesc($id));
            if (!$count) {
                stderr($lang_forums['std_error'], $lang_forums['std_no_forum_id']);
            }
            break;
        case 'topic':
            $count = get_row_count("topics", "WHERE id=" . sqlesc($id));
            if (!$count) {
                stderr($lang_forums['std_error'], $lang_forums['std_bad_topic_id']);
            }
            $forumid = get_single_value("topics", "forumid", "WHERE id=" . sqlesc($id));
            check_whether_exist($forumid, 'forum');
            break;
        case 'post':
            $count = get_row_count("posts", "WHERE id=" . sqlesc($id));
            if (!$count) {
                stderr($lang_forums['std_error'], $lang_forums['std_no_post_id']);
            }
            $topicid = get_single_value("posts", "topicid", "WHERE id=" . sqlesc($id));
            check_whether_exist($topicid, 'topic');
            break;
    }
}
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:29,代码来源:forums.php


示例19: dbconn

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_row_css_class函数代码示例发布时间:2022-05-15
下一篇:
PHP get_row_color函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap