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


PHP SQL_Query_exec函数代码示例

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


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

示例1: peerstable

function peerstable($res)
{
    $ret = "<table align='center' cellpadding=\"3\" cellspacing=\"0\" class=\"table_table\" width=\"100%\" border=\"1\"><tr><th class='table_head'>" . T_("NAME") . "</th><th class='table_head'>" . T_("SIZE") . "</th><th class='table_head'>" . T_("UPLOADED") . "</th>\n<th class='table_head'>" . T_("DOWNLOADED") . "</th><th class='table_head'>" . T_("RATIO") . "</th></tr>\n";
    while ($arr = mysql_fetch_assoc($res)) {
        $res2 = SQL_Query_exec("SELECT name,size FROM torrents WHERE id={$arr['torrent']} ORDER BY name");
        $arr2 = mysql_fetch_assoc($res2);
        if ($arr["downloaded"] > 0) {
            $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);
        } else {
            $ratio = "---";
        }
        $ret .= "<tr><td class='table_col1'><a href='torrents-details.php?id={$arr['torrent']}&amp;hit=1'><b>" . htmlspecialchars($arr2["name"]) . "</b></a></td><td align='center' class='table_col2'>" . mksize($arr2["size"]) . "</td><td align='center' class='table_col1'>" . mksize($arr["uploaded"]) . "</td><td align='center' class='table_col2'>" . mksize($arr["downloaded"]) . "</td><td align='center' class='table_col1'>{$ratio}</td></tr>\n";
    }
    $ret .= "</table>\n";
    return $ret;
}
开发者ID:l3oncoder,项目名称:TorrentTrader,代码行数:16,代码来源:account-details.php

示例2: show_error_msg

    show_error_msg(T_("FILE_NOT_FOUND"), T_("FILE_UNREADABLE"), 1);
}
$name = $row['filename'];
$friendlyurl = str_replace("http://", "", $site_config["SITEURL"]);
$friendlyname = str_replace(".torrent", "", $name);
$friendlyext = ".torrent";
$name = $friendlyname . "[" . $friendlyurl . "]" . $friendlyext;
SQL_Query_exec("UPDATE torrents SET hits = hits + 1 WHERE id = {$id}");
require_once "backend/BEncode.php";
require_once "backend/BDecode.php";
//if user dont have a passkey generate one, only if tracker is set to members only
if ($site_config["MEMBERSONLY"]) {
    if (strlen($CURUSER['passkey']) != 32) {
        $rand = array_sum(explode(" ", microtime()));
        $CURUSER['passkey'] = md5($CURUSER['username'] . $rand . $CURUSER['secret'] . $rand * mt_rand());
        SQL_Query_exec("UPDATE users SET passkey='{$CURUSER['passkey']}' WHERE id={$CURUSER['id']}");
    }
}
if ($row["external"] != 'yes' && $site_config["MEMBERSONLY"]) {
    // local torrent so add passkey
    $dict = BDecode(file_get_contents($fn));
    $dict['announce'] = sprintf($site_config["PASSKEYURL"], $CURUSER["passkey"]);
    unset($dict['announce-list']);
    $data = BEncode($dict);
    //header('Content-Disposition: attachment; filename="'.$name.'"');
    header('Content-Disposition: attachment; filename=' . sqlesc($name) . '');
    //header('Content-Length: ' . strlen($data));
    header("Content-Type: application/x-bittorrent");
    print $data;
} else {
    // external torrent so no passkey needed
开发者ID:Arkhana,项目名称:TorrentTrader2.08,代码行数:31,代码来源:download.php

示例3: SQL_Query_exec

    $res = SQL_Query_exec("SELECT id, name FROM torrents WHERE id = {$id}");
    $row = mysql_fetch_array($res);
    if (!$row) {
        show_error_msg(T_("ERROR"), "News id invalid", 0);
        stdfoot();
    }
    echo "<center><b>" . T_("COMMENTSFOR") . "</b> <a href='torrents-details.php?id=" . $row['id'] . "'>" . htmlspecialchars($row['name']) . "</a></center><br />";
}
begin_frame(T_("COMMENTS"));
$subres = SQL_Query_exec("SELECT COUNT(*) FROM comments WHERE {$type} = {$id}");
$subrow = mysql_fetch_array($subres);
$commcount = $subrow[0];
if ($commcount) {
    list($pagertop, $pagerbottom, $limit) = pager(10, $commcount, "comments.php?id={$id}&amp;type={$type}&amp;");
    $commquery = "SELECT comments.id, text, user, comments.added, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM comments LEFT JOIN users ON comments.user = users.id WHERE {$type} = {$id} ORDER BY comments.id {$limit}";
    $commres = SQL_Query_exec($commquery);
} else {
    unset($commres);
}
if ($commcount) {
    print $pagertop;
    commenttable($commres, $type);
    print $pagerbottom;
} else {
    print "<br /><b>" . T_("NOCOMMENTS") . "</b><br />\n";
}
echo "<center>";
echo "<form name=\"comment\" method=\"post\" action=\"comments.php?type={$type}&amp;id={$id}&amp;takecomment=yes\">";
echo textbbcode("comment", "body") . "<br />";
echo "<input type=\"submit\"  value=\"" . T_("ADDCOMMENT") . "\" />";
echo "</form></center>";
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:31,代码来源:comments.php

示例4: T_

print "<br /><center><a href='torrents.php'>" . T_("BROWSE_TORRENTS") . "</a> - <a href='torrents-search.php'>" . T_("SEARCH_TORRENTS") . "</a></center><br />";
if ($site_config["MEMBERSONLY"] && !$CURUSER) {
    echo "<br /><br /><center><b>" . T_("BROWSE_MEMBERS_ONLY") . "</b></center><br /><br />";
} else {
    $query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25";
    $res = SQL_Query_exec($query);
    if (mysql_num_rows($res)) {
        torrenttable($res);
    } else {
        print "<div class='f-border'>";
        print "<div class='f-cat' width='100%'>" . T_("NOTHING_FOUND") . "</div>";
        print "<div>";
        print T_("NO_UPLOADS");
        print "</div>";
        print "</div>";
    }
    if ($CURUSER) {
        SQL_Query_exec("UPDATE users SET last_browse=" . gmtime() . " WHERE id={$CURUSER['id']}");
    }
}
end_frame();
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
}
if ($site_config['DISCLAIMERON']) {
    begin_frame(T_("DISCLAIMER"));
    echo "<MARQUEE behavior=\"scroll\" align=\"center\" direction=\"up\" height=\"80\" scrollamount=\"0.8\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>\n";
    echo T_("DISCLAIMERTXT");
    echo "</marquee>";
    end_frame();
}
stdfoot();
开发者ID:Arkhana,项目名称:TorrentTrader2.08,代码行数:31,代码来源:index.php

示例5: dbconn

<?php

//
//  TorrentTrader v2.x
//      $LastChangedDate: 2012-09-28 20:35:06 +0100 (Fri, 28 Sep 2012) $
//      $LastChangedBy: torrenttrader $
//
//      http://www.torrenttrader.org
//
require_once "backend/functions.php";
dbconn();
$id = (int) $_GET["id"];
$md5 = $_GET["secret"];
$email = $_GET["email"];
if (!$id || !$md5 || !$email) {
    show_error_msg(T_("ERROR"), T_("MISSING_FORM_DATA"), 1);
}
$res = SQL_Query_exec("SELECT `editsecret` FROM `users` WHERE `enabled` = 'yes' AND `status` = 'confirmed' AND `editsecret` != '' AND `id` = '{$id}'");
$row = mysql_fetch_assoc($res);
if (!$row) {
    show_error_msg(T_("ERROR"), T_("NOTHING_FOUND"), 1);
}
$sec = $row["editsecret"];
if ($md5 != md5($sec . $email . $sec)) {
    show_error_msg(T_("ERROR"), T_("NOTHING_FOUND"), 1);
}
SQL_Query_exec("UPDATE `users` SET `editsecret` = '', `email` = " . sqlesc($email) . " WHERE `id` = '{$id}' AND `editsecret` = " . sqlesc($row["editsecret"]));
header("Refresh: 0; url=account.php");
header("Location: account.php");
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:29,代码来源:account-ce.php

示例6: loggedinonly

if ($site_config["MEMBERSONLY"]) {
    loggedinonly();
    if ($CURUSER["view_torrents"] == "no") {
        show_error_msg(T_("ERROR"), T_("NO_TORRENT_VIEW"), 1);
    }
}
$id = (int) $_GET["id"];
$res = SQL_Query_exec("SELECT name, external, banned FROM torrents WHERE id = {$id}");
$row = mysql_fetch_assoc($res);
if (!$row || $row["banned"] == "yes" && $CURUSER["edit_torrents"] == "no") {
    show_error_msg(T_("ERROR"), T_("TORRENT_NOT_FOUND"), 1);
}
if ($row["external"] == "yes") {
    show_error_msg(T_("ERROR"), T_("THIS_TORRENT_IS_EXTERNALLY_TRACKED"), 1);
}
$res = SQL_Query_exec("SELECT users.id, users.username, users.uploaded, users.downloaded, users.privacy, completed.date FROM users LEFT JOIN completed ON users.id = completed.userid WHERE users.enabled = 'yes' AND completed.torrentid = '{$id}'");
if (mysql_num_rows($res) == 0) {
    show_error_msg(T_("ERROR"), T_("NO_DOWNLOADS_YET"), 1);
}
$title = sprintf(T_("COMPLETED_DOWNLOADS"), CutName($row["name"], 40));
stdhead($title);
begin_frame($title);
?>
  
  <table cellpadding="3" cellspacing="0" align="center" class="table_table">
  <tr>
     <th class="table_head"><?php 
echo T_("USERNAME");
?>
</th>
     <th class="table_head"><?php 
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:31,代码来源:torrents-completed.php

示例7: unlink

        if ($row[image1]) {
            $del = unlink($site_config["torrent_dir"] . "/images/{$row['image1']}");
            $updateset[] = "image1 = ''";
        }
    }
    $img2action = $_POST['img2action'];
    if ($img2action == "update") {
        $updateset[] = "image2 = " . sqlesc(uploadimage(1, $row["image2"], $id));
    }
    if ($img2action == "delete") {
        if ($row[image2]) {
            $del = unlink($site_config["torrent_dir"] . "/images/{$row['image2']}");
            $updateset[] = "image2 = ''";
        }
    }
    SQL_Query_exec("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = {$id}");
    $returl = "torrents-edit.php?id={$id}&edited=1";
    if (isset($_POST["returnto"])) {
        $returl = $_POST["returnto"];
    }
    write_log("Torrent {$id} (" . htmlspecialchars($_POST["name"]) . ") was edited by {$CURUSER['username']}");
    header("Location: {$returl}");
    die;
}
//END SAVE TO DB
//UPDATE CATEGORY DROPDOWN
$catdropdown = "<select name=\"type\">\n";
$cats = genrelist();
foreach ($cats as $catdropdownubrow) {
    $catdropdown .= "<option value=\"" . $catdropdownubrow["id"] . "\"";
    if ($catdropdownubrow["id"] == $row["category"]) {
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:31,代码来源:torrents-edit.php

示例8: SQL_Query_exec

            if (strtolower(substr($val, 0, 4)) != "udp:") {
                SQL_Query_exec("INSERT INTO `announce` (`torrent`, `url`) VALUES({$id}, " . sqlesc($val) . ")");
            }
        }
    }
    if ($nfo == 'yes') {
        move_uploaded_file($nfofilename, "{$nfo_dir}/{$id}.nfo");
    }
    //EXTERNAL SCRAPE
    if ($external == 'yes' && $site_config['UPLOADSCRAPE']) {
        $tracker = str_replace("/announce", "/scrape", $announce);
        $stats = torrent_scrape_url($tracker, $infohash);
        $seeders = (int) strip_tags($stats['seeds']);
        $leechers = (int) strip_tags($stats['peers']);
        $downloaded = (int) strip_tags($stats['downloaded']);
        SQL_Query_exec("UPDATE torrents SET leechers='" . $leechers . "', seeders='" . $seeders . "',times_completed='" . $downloaded . "',last_action= '" . get_date_time() . "',visible='yes' WHERE id='" . $id . "'");
    }
    //END SCRAPE
    write_log(sprintf(T_("TORRENT_UPLOADED"), htmlspecialchars($name), $CURUSER["username"]));
    //Uploaded ok message (update later)
    if ($external == 'no') {
        $message = sprintf(T_("TORRENT_UPLOAD_LOCAL"), $name, $id, $id);
    } else {
        $message = sprintf(T_("TORRENT_UPLOAD_EXTERNAL"), $name, $id);
    }
    show_error_msg(T_("UPLOAD_COMPLETE"), $message, 1);
    die;
}
//takeupload
///////////////////// FORMAT PAGE ////////////////////////
stdhead(T_("UPLOAD"));
开发者ID:Arkhana,项目名称:TorrentTrader2.08,代码行数:31,代码来源:torrents-upload.php

示例9: begin_block

<?php

//USERS ONLINE
begin_block(T_("NEWEST_MEMBERS"));
$expire = 600;
// time in seconds
if (($rows = $TTCache->Get("newestmember_block", $expire)) === false) {
    $res = SQL_Query_exec("SELECT id, username FROM users WHERE enabled = 'yes' AND status='confirmed' AND privacy != 'strong' ORDER BY id DESC LIMIT 5");
    $rows = array();
    while ($row = mysql_fetch_assoc($res)) {
        $rows[] = $row;
    }
    $TTCache->Set("newestmember_block", $rows, $expire);
}
if (!$rows) {
    ?>
	<p class="text-center"><?php 
    echo T_("NOTHING_FOUND");
    ?>
</p>
<?php 
} else {
    ?>
		<div class="list-group">
	<?php 
    foreach ($rows as $row) {
        ?>
			<a href='account-details.php?id=<?php 
        echo $row["id"];
        ?>
' class="list-group-item"><?php 
开发者ID:nonconforme,项目名称:TorrentTrader-Bootstrap,代码行数:31,代码来源:newestmember_block.php

示例10: begin_block

<?php

if (!$site_config["MEMBERSONLY"] || $CURUSER) {
    begin_block(T_("BROWSE_TORRENTS"));
    $catsquery = SQL_Query_exec("SELECT distinct parent_cat FROM categories ORDER BY parent_cat");
    echo "<div id='maincats' class='bMenu'><ul>\n";
    echo "<li><a href='torrents.php'>" . T_("SHOW_ALL") . "</a></li>\n";
    while ($catsrow = mysql_fetch_assoc($catsquery)) {
        echo "<li><a href='torrents.php?parent_cat=" . urlencode($catsrow['parent_cat']) . "'>{$catsrow['parent_cat']}</a></li>\n";
    }
    echo "</ul></div>\n";
    end_block();
}
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:13,代码来源:maincats_block.php

示例11: begin_block

<?php

if (!$site_config["MEMBERSONLY"] || $CURUSER) {
    begin_block(T_("LATEST_TORRENTS"));
    $expire = 900;
    // time in seconds
    if (($latestuploadsrecords = $TTCache->Get("latestuploadsblock", $expire)) === false) {
        $latestuploadsquery = SQL_Query_exec("SELECT id, name, size, seeders, leechers FROM torrents WHERE banned='no' AND visible = 'yes' ORDER BY id DESC LIMIT 5");
        $latestuploadsrecords = array();
        while ($latestuploadsrecord = mysql_fetch_assoc($latestuploadsquery)) {
            $latestuploadsrecords[] = $latestuploadsrecord;
        }
        $TTCache->Set("latestuploadsblock", $latestuploadsrecords, $expire);
    }
    if ($latestuploadsrecords) {
        foreach ($latestuploadsrecords as $row) {
            $char1 = 18;
            //cut length
            $smallname = htmlspecialchars(CutName($row["name"], $char1));
            echo "<a href='torrents-details.php?id={$row['id']}' title='" . htmlspecialchars($row["name"]) . "'>{$smallname}</a><br />\n";
            echo "- [" . T_("SIZE") . ": " . mksize($row["size"]) . "]<br /><br />\n";
        }
    } else {
        print "<center>" . T_("NOTHING_FOUND") . "</center>\n";
    }
    end_block();
}
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:27,代码来源:latestuploads_block.php

示例12: while

 while ($ss_a = mysql_fetch_assoc($ss_r)) {
     $ss_id = $ss_a["id"];
     $ss_name = $ss_a["name"];
     $ss_sa[$ss_name] = $ss_id;
 }
 ksort($ss_sa);
 reset($ss_sa);
 while (list($ss_name, $ss_id) = each($ss_sa)) {
     if ($ss_id == $CURUSER["stylesheet"]) {
         $ss = " selected='selected'";
     } else {
         $ss = "";
     }
     $stylesheets .= "<option value='{$ss_id}'{$ss}>{$ss_name}</option>\n";
 }
 $lang_r = SQL_Query_exec("SELECT * from languages");
 $lang_sa = array();
 while ($lang_a = mysql_fetch_assoc($lang_r)) {
     $lang_id = $lang_a["id"];
     $lang_name = $lang_a["name"];
     $lang_sa[$lang_name] = $lang_id;
 }
 ksort($lang_sa);
 reset($lang_sa);
 while (list($lang_name, $lang_id) = each($lang_sa)) {
     if ($lang_id == $CURUSER["language"]) {
         $lang = " selected='selected'";
     } else {
         $lang = "";
     }
     $languages .= "<option value='{$lang_id}'{$lang}>{$lang_name}</option>\n";
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:31,代码来源:themelang_block.php

示例13: navmenu

function navmenu()
{
    global $site_config;
    //Get Last Cleanup
    $res = SQL_Query_exec("SELECT last_time FROM tasks WHERE task = 'cleanup'");
    $row = mysql_fetch_row($res);
    if (!$row) {
        $lastclean = "never done...";
    } else {
        $row[0] = gmtime() - $row[0];
        $days = intval($row[0] / 86400);
        $row[0] -= $days * 86400;
        $hours = intval($row[0] / 3600);
        $row[0] -= $hours * 3600;
        $mins = intval($row[0] / 60);
        $secs = $row[0] - $mins * 60;
        $lastclean = "{$days} days, {$hours} hrs, {$mins} minutes, {$secs} seconds ago.";
    }
    begin_frame(T_("MENU"));
    print "Last cleanup performed: " . $lastclean . " [<a href='admincp.php?action=forceclean'>" . T_("FORCE_CLEAN") . "</a>]<br /><br />";
    if ($site_config["ttversion"] != "2-svn") {
        $file = @file_get_contents('https://www.torrenttrader.org/tt2version.php');
        if ($site_config['ttversion'] >= $file) {
            echo "<br /><center><b>" . T_("YOU_HAVE_LATEST_VER_INSTALLED") . " v{$site_config['ttversion']}</b></center>";
        } else {
            echo "<br /><center><b><font class='error'>" . T_("NEW_VERSION_OF_TT_NOW_AVAIL") . ": v" . $file . " you have v" . $site_config['ttversion'] . "<br /> Please visit <a href=http://www.torrenttrader.org>TorrentTrader.org</a> to upgrade.</font></b></center>";
        }
    }
    $res = SQL_Query_exec("SELECT VERSION() AS mysql_version");
    $row = mysql_fetch_assoc($res);
    $mysqlver = $row['mysql_version'];
    $pending = get_row_count("users", "WHERE status = 'pending' AND invited_by = '0'");
    echo "<center><b>" . T_("USERS_AWAITING_VALIDATION") . ":</b> <a href='admincp.php?action=confirmreg'>({$pending})</a></center><br />";
    echo "<center>" . T_("VERSION_MYSQL") . ": <b>" . $mysqlver . "</b><br />" . T_("VERSION_PHP") . ": <b>" . phpversion() . "</b></center>";
    ?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
    <td align="center"><a href="admincp.php?action=usersearch"><img src="images/admin/user_search.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("ADVANCED_USER_SEARCH");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=avatars"><img src="images/admin/avatar_log.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("AVATAR_LOG");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=backups"><img src="images/admin/db_backup.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("BACKUPS");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=ipbans"><img src="images/admin/ip_block.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("BANNED_IPS");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=bannedtorrents"><img src="images/admin/banned_torrents.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("BANNED_TORRENTS");
    ?>
</a><br /></td>
</tr>
<tr>
    <td colspan="5">&nbsp;</td>
</tr>
<tr>
    <td align="center"><a href="admincp.php?action=blocks&amp;do=view"><img src="images/admin/blocks.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("BLOCKS");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=cheats"><img src="images/admin/cheats.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("DETECT_POSS_CHEATS");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=emailbans"><img src="images/admin/mail_bans.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("EMAIL_BANS");
    ?>
</a><br /></td>
    <td align="center"><a href="faq-manage.php"><img src="images/admin/faq.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("FAQ");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=freetorrents"><img src="images/admin/free_leech.png" border="0" width="32" height="32" alt="" /><br />Freeleech Torrents<?php 
    /*echo T_("TORRENTS_FREE_LEECH");*/
    ?>
</a><br /></td>
</tr>
<tr>
    <td colspan="5">&nbsp;</td>
</tr>
<tr>
    <td align="center"><a href="admincp.php?action=lastcomm"><img src="images/admin/comments.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("LATEST_COMMENTS");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=masspm"><img src="images/admin/mass_pm.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("MASS_PM");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=messagespy"><img src="images/admin/message_spy.png" border="0" width="32" height="32" alt="" /><br /><?php 
    echo T_("MESSAGE_SPY");
    ?>
</a><br /></td>
    <td align="center"><a href="admincp.php?action=news&amp;do=view"><img src="images/admin/news.png" border="0" width="32" height="32" alt="" /><br /><?php 
//.........这里部分代码省略.........
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:101,代码来源:admincp.php

示例14: SQL_Query_exec_cached

function SQL_Query_exec_cached($query, $cache_time = 300, $cache_blank = 1)
{
    global $TTCache;
    $cache = "queries/" . sha1($query);
    if (($rows = $TTCache->Get($cache, $cache_time)) === false) {
        $res = SQL_Query_exec($query);
        $rows = array();
        while ($row = mysql_fetch_assoc($res)) {
            $rows[] = $row;
        }
        if (count($rows) || $cache_blank) {
            $TTCache->Set($cache, $rows, $cache_time);
        }
    }
    return count($rows) ? $rows : false;
}
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:16,代码来源:cache.php

示例15: number_format

$ncomments = number_format(get_row_count("comments"));
$nmessages = number_format(get_row_count("messages"));
$ntor = number_format(get_row_count("torrents"));
$totaltoday = number_format(get_row_count("users", "WHERE users.last_access>='{$date_time}'"));
$regtoday = number_format(get_row_count("users", "WHERE users.added>='{$date_time}'"));
$todaytor = number_format(get_row_count("torrents", "WHERE torrents.added>='{$date_time}'"));
$guests = number_format(getguests());
$seeders = get_row_count("peers", "WHERE seeder='yes'");
$leechers = get_row_count("peers", "WHERE seeder='no'");
$members = number_format(get_row_count("users", "WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900"));
$totalonline = $members + $guests;
$result = SQL_Query_exec("SELECT SUM(downloaded) AS totaldl FROM users");
while ($row = mysql_fetch_array($result)) {
    $totaldownloaded = $row["totaldl"];
}
$result = SQL_Query_exec("SELECT SUM(uploaded) AS totalul FROM users");
while ($row = mysql_fetch_array($result)) {
    $totaluploaded = $row["totalul"];
}
$localpeers = $leechers + $seeders;
if ($CURUSER["edit_users"] == "yes") {
    begin_block(T_("STATS"));
    ?>

<ul class="list-unstyled">
	<p><strong><?php 
    echo T_("TORRENTS");
    ?>
</strong></p>
	<li><i class="fa fa-folder-open-o"></i> <?php 
    echo T_("TRACKING");
开发者ID:nonconforme,项目名称:TorrentTrader-Bootstrap,代码行数:31,代码来源:advancestats_block.php


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