예제 #1
0
function read_invitations()
{
    global $TABLE_PREFIX, $admintpl, $language, $CURUSER, $STYLEPATH, $btit_settings;
    $scriptname = htmlspecialchars($_SERVER["PHP_SELF"] . "?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=invitations");
    $addparam = "";
    $res = get_result("SELECT COUNT(*) as invites FROM {$TABLE_PREFIX}invitations", true);
    $count = $res[0]["invites"];
    list($pagertop, $pagerbottom, $limit) = pager('15', $count, $scriptname . "&");
    $admintpl->set("inv_pagertop", $pagertop);
    $admintpl->set("inv_pagerbottom", $pagerbottom);
    $results = get_result("SELECT * FROM {$TABLE_PREFIX}invitations ORDER BY id DESC {$limit}", true);
    $invitees = array();
    $i = 0;
    foreach ($results as $id => $data) {
        $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE id = " . $data["inviter"], true);
        if (mysql_num_rows($res) > 0) {
            $inviter_name = mysql_result($res, 0, 0);
        } else {
            $inviter_name = 'Unknown';
        }
        $invitees[$i]["inviter"] = "<a href=\"index.php?page=userdetails&amp;user="******"inviter"] . "\">" . $inviter_name . "</a>";
        $invitees[$i]["invitee"] = unesc($data["invitee"]);
        $invitees[$i]["hash"] = unesc($data["hash"]);
        $invitees[$i]["time_invited"] = $data["time_invited"];
        $invitees[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=invitations&amp;action=delete&amp;id=" . $data["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
        $i++;
    }
    $admintpl->set("invitees", $invitees);
    $admintpl->set("language", $language);
}
예제 #2
0
function faq_read()
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("faq_add", false, true);
    $admintpl->set("language", $language);
    $cres = genrelistfaq('', 'faq_group');
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = unesc($cres[$i]["title"]);
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=faq_group&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=faq_group&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("faq", $cres);
    $admintpl->set("faq_add_new", "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=faq_group&amp;action=add\">" . $language["FAQ_ADD"] . "</a>");
    unset($cres);
}
예제 #3
0
function category_read()
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("category_add", false, true);
    $admintpl->set("language", $language);
    $cres = genrelist();
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = unesc($cres[$i]["name"]);
        $cres[$i]["image"] = "<img src=\"{$STYLEURL}/images/categories/" . $cres[$i]["image"] . "\" alt=\"\" border=\"0\" />";
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("categories", $cres);
    $admintpl->set("category_add_new", "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=add\">" . $language["CATEGORY_ADD"] . "</a>");
    unset($cres);
}
예제 #4
0
function read_styles()
{
    global $TABLE_PREFIX, $language, $CURUSER, $admintpl, $STYLEPATH;
    $sres = style_list();
    for ($i = 0; $i < count($sres); $i++) {
        $res = do_sqlquery("SELECT COUNT(*) FROM {$TABLE_PREFIX}users WHERE style = " . $sres[$i]["id"], true);
        $sres[$i]["style_users"] = mysql_result($res, 0, 0);
        $sres[$i]["style"] = unesc($sres[$i]["style"]);
        $sres[$i]["style_url"] = unesc($sres[$i]["style_url"]);
        $sres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=style&amp;action=edit&amp;id=" . $sres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $sres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=style&amp;action=delete&amp;id=" . $sres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("style_add", false, true);
    $admintpl->set("language", $language);
    $admintpl->set("styles", $sres);
    $admintpl->set("style_add_new", "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=style&amp;action=add\">" . $language["STYLE_ADD"] . "</a>");
    unset($sres);
    mysql_free_result($res);
}
예제 #5
0
function category_read()
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("category_add", false, true);
    $admintpl->set("language", $language);
    $admintpl->set("perm", false, true);
    $admintpl->set("permedit", false, true);
    $cres = genrelist();
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = unesc($cres[$i]["name"]);
        $cres[$i]["perm"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=perm&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["PERMISSIONS"]) . "</a>";
        $cres[$i]["image"] = "<img src=\"{$STYLEURL}/images/categories/" . $cres[$i]["image"] . "\" alt=\"\" border=\"0\" />";
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("categories", $cres);
    $admintpl->set("category_add_new", "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=add\">" . $language["CATEGORY_ADD"] . "</a>");
    $ajax_order = "<script type=\"text/javascript\">\n\t   \t\tfunction updateOrder()\n            {\n                var options = {\n                                method : 'post',\n                                parameters : Sortable.serialize('categories_list'),\n                                onComplete : function(request) {                                \t\n\t\t\t                        new Effect.Highlight(ID.id,{duration:3});\n\t\t\t                        \n\t\t\t                    }\n                              };\n                new Ajax.Request('index.php?page=admin&user="******"user"] . "&code=" . $_GET["code"] . "&do=category&action=order', options);\n            }\n  \t Sortable.create('categories_list', { onUpdate : updateOrder });\n\t   \n            \n</script>";
    $admintpl->set('ajax_order', $ajax_order);
    unset($cres);
}
예제 #6
0
unset($ruploaded);
if ($numtorrent > 0) {
    list($pagertop, $pagerbottom, $limit) = pager($utorrents == 0 ? 15 : $utorrents, $numtorrent, "index.php?page=usercp&amp;uid={$uid}&amp;");
    $usercptpl->set("pagertop", $pagertop);
    $resuploaded = do_sqlquery("SELECT f.filename, UNIX_TIMESTAMP(f.data) as added, f.size, {$tseeds} as seeds, {$tleechs} as leechers, {$tcompletes} as finished, f.info_hash as hash FROM {$ttables} WHERE uploader={$uid} ORDER BY data DESC {$limit}", true);
}
if ($resuploaded && mysql_num_rows($resuploaded) > 0) {
    include "include/offset.php";
    $usercptpl->set("RESULTS", true, true);
    $uptortpl = array();
    $i = 0;
    while ($rest = mysql_fetch_assoc($resuploaded)) {
        $uptortpl[$i]["filename"] = cut_string(unesc($rest["filename"]), intval($btit_settings["cut_name"]));
        $uptortpl[$i]["added"] = date("d/m/Y", $rest["added"] - $offset);
        $uptortpl[$i]["size"] = makesize($rest["size"]);
        $uptortpl[$i]["seedcolor"] = linkcolor($rest["seeds"]);
        $uptortpl[$i]["seeds"] = $rest[seeds];
        $uptortpl[$i]["leechcolor"] = linkcolor($rest["leechers"]);
        $uptortpl[$i]["leechers"] = $rest[leechers];
        $uptortpl[$i]["completed"] = $rest["finished"] > 0 ? $rest["finished"] : "---";
        $uptortpl[$i]["editlink"] = "index.php?page=edit&amp;info_hash=" . $rest["hash"] . "&amp;returnto=" . urlencode("index.php?page=torrents") . "";
        $uptortpl[$i]["dellink"] = "index.php?page=delete&amp;info_hash=" . $rest["hash"] . "&amp;returnto=" . urlencode("index.php?page=torrents") . "";
        $uptortpl[$i]["editimg"] = image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]);
        $uptortpl[$i]["delimg"] = image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]);
        $i++;
    }
    $usercptpl->set("uptor", $uptortpl);
} else {
    $usercptpl->set("RESULTS", false, true);
    $usercptpl->set("pagertop", "");
}
예제 #7
0
    $i = 0;
    foreach ($sub_forums as $id => $subfor) {
        $subforums[$i]["status"] = image_or_link("{$STYLEPATH}/images/" . $subfor["img"] . ".png", "", $subfor["img"]);
        $subforums[$i]["name"] = "<a href=\"index.php?page=forum&amp;action=viewforum&amp;forumid=" . $subfor["id"] . "\">" . htmlspecialchars(unesc($subfor["name"])) . "</a>";
        $subforums[$i]["description"] = $subfor["description"] ? "<br />\n" . format_comment(unesc($subfor["description"])) : "";
        $subforums[$i]["topics"] = number_format($subfor["topiccount"]);
        $subforums[$i]["posts"] = number_format($subfor["postcount"]);
        if ($subfor["uid"]) {
            $subforums[$i]["lastpost"] = date("", $subfor["date"]) . "<br />by&nbsp;" . ($subfor["username"] ? "<a href=\"index.php?page=userdetails&amp;id=" . $subfor["uid"] . "\"><b>" . unesc($subfor["username"]) . "</b></a><br />" : $language["MEMBER"] . "[" . $subfor["topicid"] . "]") . "<br />\n" . "in <a href=\"index.php?page=forum&amp;action=viewtopic&amp;topicid=" . $subfor["topicid"] . "&amp;msg=" . $subfor["lastpost"] . "#" . $subfor["lastpost"] . "\">" . htmlspecialchars(unesc($subfor["subject"])) . "</a>";
        } else {
            $subforums[$i]["lastpost"] = $language["NA"];
        }
        $i++;
    }
    $forumtpl->set("forums", $subforums);
    $forumtpl->set("HAS_SUBFORUMS", true, true);
} else {
    $forumtpl->set("HAS_SUBFORUMS", false, true);
}
$forumtpl->set("forum_name", $forumname);
$forumtpl->set("sub_forum_name", $forumname . "'s " . $language["SUBFORUMS"]);
$forumtpl->set("locked_legend", image_or_link("{$STYLEPATH}/images/locked.png", "style='margin-right: 5px'", "locked") . "&nbsp;" . $language["LOCKED"]);
$forumtpl->set("unlocked_legend", image_or_link("{$STYLEPATH}/images/unlocked.png", "style='margin-right: 5px'", "unlocked") . "&nbsp;" . $language["UNLOCKED"]);
$forumtpl->set("locked_new_legend", image_or_link("{$STYLEPATH}/images/lockednew.png", "style='margin-right: 5px'", "lockednew") . "&nbsp;" . $language["LOCKED_NEW"]);
$forumtpl->set("unlocked_new_legend", image_or_link("{$STYLEPATH}/images/unlockednew.png", "style='margin-right: 5px'", "unlockednew") . "&nbsp;" . $language["UNLOCKED_NEW"]);
$forumtpl->set("quick_jump_combo", $quickjmp);
$forumtpl->set("forum_action", "index.php?page=forum&amp;action=newtopic&amp;forumid={$forumid}");
$forumtpl->set("can_create", $user_can_create, true);
unset($topics);
unset($topicarr);
mysql_free_result($topicsres);
예제 #8
0
파일: index.php 프로젝트: Karpec/gizd
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
ob_start();
if (!defined("IN_BTIT")) {
    die("non direct access!");
}
require_once "include/functions.php";
require_once "include/config.php";
dbconn();
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT id, name , image FROM {$TABLE_PREFIX}categories ORDER BY name");
while ($cat = mysqli_fetch_assoc($res)) {
    if ($cat["image"] == "") {
        $catoptions .= "";
    } else {
        $catoptions .= "<a href=\"index.php?page=torrents&amp;category={$cat['id']}\">" . image_or_link($cat["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $cat["image"], "", $cat["name"]) . "</a><input type=\"checkbox\" name=\"cat[]\" value=\"{$cat['id']}\" " . (strpos($CURUSER['notifs'], "[cat{$cat['id']}]") !== false ? " checked" : "") . "/>";
    }
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (empty($_POST['cat'])) {
        stderr("Error", "You need to chose at least one category !!");
    }
    if (empty($_POST['feed'])) {
        stderr("Error", "You need to chose a feed type !!");
    }
    $link = "{$BASEURL}/rss_torrents.php";
    if ($_POST['feed'] == "dl") {
        $query[] = "feed=dl";
    }
    foreach ($_POST['cat'] as $cat) {
        $query[] = "cat[]={$cat}";
예제 #9
0
파일: peers.php 프로젝트: fchypzero/cybyd
 if ($resu) {
     if ($XBTT_USE) {
         $rowuser["username"] = $row["username"];
         $rowuser["id"] = $row["uid"];
         $rowuser["flagpic"] = $row["flagpic"];
         $rowuser["name"] = $row["name"];
     } else {
         $rowuser = $resu[0];
     }
     if ($rowuser && $rowuser["id"] > 1) {
         if ($GLOBALS["usepopup"]) {
             $peers[$i]["USERNAME"] = "******"javascript: windowunder('index.php?page=userdetails&amp;id=" . $rowuser["id"] . "')\">" . unesc($rowuser["username"]) . "</a>";
             $peers[$i]["PM"] = "<a href=\"javascript: windowunder('index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid={$CURUSER['uid']}&amp;what=new&amp;to=" . urlencode(unesc($rowuser["username"])) . "')\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", "PM") . "</a>";
         } else {
             $peers[$i]["USERNAME"] = "******"index.php?page=userdetails&amp;id=" . $rowuser["id"] . "\">" . unesc($rowuser["username"]) . "</a>";
             $peers[$i]["PM"] = "<a href=\"index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid=" . $CURUSER["uid"] . "&amp;what=new&amp;to=" . urlencode(unesc($rowuser["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", "PM") . "</a>";
         }
     } else {
         $peers[$i]["USERNAME"] = $language["GUEST"];
         $peers[$i]["PM"] = "";
     }
 } else {
     $peers[$i]["USERNAME"] = $language["GUEST"];
     $peers[$i]["PM"] = "";
 }
 if ($row["flagpic"] != "" && $row["flagpic"] != "unknown.gif") {
     $peers[$i]["FLAG"] = "<img src=\"images/flag/" . $row["flagpic"] . "\" alt=\"" . unesc($row["name"]) . "\" />";
 } elseif ($rowuser["flagpic"] != "" && !empty($rowuser["flagpic"])) {
     $peers[$i]["FLAG"] = "<img src=\"images/flag/" . $rowuser["flagpic"] . "\" alt=\"" . unesc($rowuser["name"]) . "\" />";
 } else {
     $peers[$i]["FLAG"] = "<img src=\"images/flag/unknown.gif\" alt=\"" . $language["UNKNOWN"] . "\" />";
예제 #10
0
     $gold_picture = $value["gold_picture"];
 }
 $gold = '';
 if ($data['gold'] == 1) {
     $gold = '<img src="gold/' . $silver_picture . '" alt="silver" align="right"/>';
 }
 if ($data['gold'] == 2) {
     $gold = '<img src="gold/' . $gold_picture . '" alt="gold" align="right"/>';
 }
 // Gold/Silver Torrent v 1.2 by Losmi / end
 if ($GLOBALS["usepopup"]) {
     echo "\n\t<td width=\"55%\" class=\"lista\" style=\"padding-left:10px;\"><a class=\"lasttor\" href=\"javascript:popdetails('index.php?page=torrent-details&amp;id=" . $data['hash'] . "');\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $filename . "</a>" . $gold . ($data["external"] == "no" ? "" : " (<span style=\"color:red\">EXT</span>)") . "</td>";
 } else {
     echo "\n\t<td width=\"55%\" class=\"lista\" style=\"padding-left:10px;\"><a class=\"lasttor\" href=\"index.php?page=torrent-details&amp;id=" . $data['hash'] . "\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $filename . "</a>" . $gold . ($data["external"] == "no" ? "" : " (<span style=\"color:red\">EXT</span>)") . "</td>";
 }
 echo "\n\t<td align=\"center\" class=\"lista\" width=\"45\" style=\"text-align: center;\"><a class=\"lasttor\" href=\"index.php?page=torrents&amp;category={$data['catid']}\">" . image_or_link($data["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $data["image"], "", $data["cname"]) . "</a></td>";
 //waitingtime
 // only if current user is limited by WT
 if (max(0, $CURUSER["WT"]) > 0) {
     $wait = 0;
     // $resuser=do_sqlquery("SELECT * FROM {$TABLE_PREFIX}users WHERE id=".$CURUSER["uid"]);
     // $rowuser=mysql_fetch_array($resuser);
     if (max(0, $CURUSER['downloaded']) > 0) {
         $ratio = number_format($CURUSER['uploaded'] / $CURUSER['downloaded'], 2);
     } else {
         $ratio = 0.0;
     }
     // $res2 = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}files WHERE info_hash='".$data["hash"]."'");
     // $added = mysql_fetch_array($res2);
     $vz = $data['added'];
     //sql_timestamp_to_unix_timestamp($data["data"]);
예제 #11
0
     $sql = $full . " WHERE moder!='ok'";
     $row = do_sqlquery($sql, true);
     if (mysql_num_rows($row) > 0) {
         $selecting = "<table border=\"1\">";
         $selecting .= "<tr><td align=\"center\"><b>Mod.</b></td><td align=\"center\"><b>Cat.</b></td><td align=\"center\"><b>Name<b></td><td align=\"center\"><b>Dl<b></td><td align=\"center\"><b>Uploader</b></td></tr>";
         while ($data = mysql_fetch_array($row)) {
             if ($CURUSER['edit_torrents'] == "yes") {
                 $link = "edit&info_hash";
             } else {
                 $link = "moder&edit";
             }
             $selecting .= "<tr>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=" . $link . "=" . $data["info_hash"] . "\" title=\"" . $data["moder"] . "\"><img alt=\"" . $data["moder"] . "\" src=\"images/mod/" . $data["moder"] . ".png\"></a></td>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=torrents&category={$data['catid']}\" title=\"" . $data["cname"] . "\">" . image_or_link($data["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $data["image"], "", $data["cname"]) . "</a></td>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=torrent-details&id=" . $data['info_hash'] . "\">" . $data['filename'] . "</a></td>";
             $selecting .= "<td align=\"center\"><a href=\"download.php?id=" . $data["info_hash"] . "&f=" . urlencode($data["filename"]) . ".torrent\" title=\"" . $data["filename"] . "\">" . image_or_link("images/download.gif", "", "torrent") . "</a></td>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=userdetails&id=" . $data['upname'] . "\">" . $data['uploader'] . "</a></td>";
             $selecting .= "</tr>";
         }
         $selecting .= "</table>";
     } else {
         $selecting = "No torrents unmodered.<br>";
     }
     $torrenttpl->set("selecting", $selecting);
     $torrenttpl->set("return", "index.php?page=torrents");
 }
 $torrenttpl->set("CHECK", $check, TRUE);
 $torrenttpl->set("CHECK2", $check2, TRUE);
 $torrenttpl->set("CHECK3", $check3, TRUE);
 $torrenttpl->set("CHECK4", $check4, TRUE);
 $torrenttpl->set("CHECK5", $check5, TRUE);
예제 #12
0
<?php

//Torrent RSS by DiemThuy ( jul 2012 ) TBDEV conversion with some improvements; Adapated by Yupy for BtiTracker...
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
if (user::$current['view_torrents'] == 'yes') {
    standardheader('RSS');
    $res = $db->query("SELECT id, name, image FROM categories ORDER BY name");
    while ($cat = $res->fetch_assoc()) {
        if ($cat['image'] == '') {
            $catoptions .= '';
        } else {
            $catoptions .= "<a href='torrents.php?category=" . $cat['id'] . "'>" . image_or_link($cat['image'] == '' ? '' : "{$STYLEPATH}/images/categories/" . $cat['image'], '', security::html_safe($cat['name'])) . "</a><input type='checkbox' name='cat[]' value='" . (int) $cat['id'] . "' " . (strpos($CURUSER['notifs'], "[cat{$cat['id']}]") !== false ? " checked" : '') . "/>";
        }
    }
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if (empty($_POST['cat'])) {
            stderr('Error', 'You need to chose at least one Category !');
        }
        if (empty($_POST['feed'])) {
            stderr('Error', 'You need to chose a feed type !');
        }
        $link = $BASEURL . '/rss_torrents.php';
        if ($_POST['feed'] == 'dl') {
            $query[] = 'feed=dl';
        }
        foreach ($_POST['cat'] as $cat) {
            $query[] = 'cat[]=' . $cat;
        }
        $query[] = 'pid=' . user::$current['pid'];
        $queries = implode('&', $query);
예제 #13
0
function rules_read($search = '')
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("rules_add", false, true);
    $admintpl->set("language", $language);
    $admintpl->set("groups", cat_combo_search($_POST['rules_id']));
    $append = '';
    if (strlen($search) > 0 && strlen($_POST['rules_id']) > 0) {
        $append = " AND cat_id = " . sqlesc($_POST['rules_id']) . "";
        $admintpl->set("frm_action", "index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=serch");
    }
    $cres = genrelistrules($append);
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = format_comment(unesc($cres[$i]["text"]));
        $cres[$i]["sort_index"] = unesc($cres[$i]["sort_index"]);
        $cres[$i]["id"] = unesc($cres[$i]["id"]);
        $cres[$i]["group_name"] = unesc(getGroup($cres[$i]["cat_id"]));
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("categories", $cres);
    $admintpl->set("rules_add_new", "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=add\">" . $language["RULES_ADD"] . "</a>");
    unset($cres);
}
예제 #14
0
        $lasttopic = security::html_safe(unesc($topic_arr['subject']));
        //---- Get reply count
        $postsperpage = user::$current["postsperpage"] > 0 ? user::$current["postsperpage"] : 15;
        $res = $db->query("SELECT COUNT(*) FROM posts WHERE topicid = " . $lasttopicid) or sqlerr(__FILE__, __LINE__);
        $arr = $res->fetch_row();
        $posts = (int) $arr[0];
        $tpages = floor($posts / $postsperpage);
        if ($tpages * $postsperpage != $posts) {
            ++$tpages;
        }
        for ($i = 1; $i <= $tpages; ++$i) {
            $postpages = "<a href='?action=viewtopic&topicid=" . $lasttopicid . "&page=" . $i . "#" . $lastpostid . "'><b>" . $lasttopic . "</b></a>";
        }
        $lastpost = "<nobr>" . $lastpostdate . "<br />" . "by <a href='userdetails.php?id=" . $lastposterid . "'><b>" . $lastposter . "</b></a><br />" . "in " . $postpages . "</nobr>";
        $r = $db->query("SELECT lastpostread FROM readposts WHERE userid = " . user::$current["uid"] . " AND topicid = " . $lasttopicid) or sqlerr(__FILE__, __LINE__);
        $a = $r->fetch_row();
        if ($a && $a[0] >= $lastpostid) {
            $img = "unlocked";
        } else {
            $img = "unlockednew";
        }
    } else {
        $lastpost = "N/A";
        $img = "unlocked";
    }
    print "<tr><td class='lista' align='left'><table border='0' cellspacing='0' cellpadding='0'><tr><td class='embedded' style='padding-right: 5px'>" . image_or_link($STYLEPATH . "/" . $img . ".png", "", $img) . "</td><td class='embedded'><a href='?action=viewforum&forumid=" . $forumid . "'><b>" . $forumname . "</b></a><br />\n" . "" . $forumdescription . "</td></tr></table></td><td class='lista' align='center'>" . $topiccount . "</td><td class='lista' align='center'>" . $postcount . "</td>" . "<td class='lista' align='center'>" . $lastpost . "</td></tr>\n";
}
print "</table>\n";
print "<p align='center'><a href='?action=search'><b>" . SEARCH . "</b></a> | <a href='?action=viewunread'><b>" . VIEW_UNREAD . "</b></a> | <a href='?catchup'><b>" . CATCHUP . "</b></a></p>";
block_end();
stdfoot();
예제 #15
0
            $don8 = '<font color = red>none yet</font>';
        } else {
            $don8 = "<font color = green>" . substr($arr['donate_date_8'], 8, -9) . "-" . substr($arr['donate_date_8'], 5, -12) . "-" . substr($arr['donate_date_8'], 0, 4) . "<font color = purple><br> " . $arr['don_ation_8'] . $unit . "</font>";
        }
        if ($arr['donate_date_9'] == '0000-00-00 00:00:00') {
            $don9 = '<font color = red>none yet</font>';
        } else {
            $don9 = "<font color = green>" . substr($arr['donate_date_9'], 8, -9) . "-" . substr($arr['donate_date_9'], 5, -12) . "-" . substr($arr['donate_date_9'], 0, 4) . "<font color = purple><br> " . $arr['don_ation_9'] . $unit . "</font>";
        }
        if ($arr['donate_date_10'] == '0000-00-00 00:00:00') {
            $don10 = '<font color = red>none yet</font>';
        } else {
            $don10 = "<font color = green>" . substr($arr['donate_date_10'], 8, -9) . "-" . substr($arr['donate_date_10'], 5, -12) . "-" . substr($arr['donate_date_10'], 0, 4) . "<font color = purple><br> " . $arr['don_ation_10'] . $unit . "</font>";
        }
        $donation[$i]["Username"] = "******" . $arr["id"] . ">" . $namee . "</a>";
        $donation[$i]["id"] = $arr["don_id"];
        $donation[$i]["a"] = $don;
        $donation[$i]["b"] = $don1;
        $donation[$i]["c"] = $don2;
        $donation[$i]["d"] = $don3;
        $donation[$i]["e"] = $don4;
        $donation[$i]["f"] = $don5;
        $donation[$i]["g"] = $don6;
        $donation[$i]["h"] = $don7;
        $donation[$i]["i"] = $don8;
        $donation[$i]["j"] = $don9;
        $donation[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=don_edit&amp;id=" . $donation[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $i++;
    }
}
$admintpl->set("donation", $donation);
예제 #16
0
    redirect("index.php?page=usercp&uid=" . $CURUSER["uid"] . "&do=ignore");
    exit;
} else {
    $qry = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}ignore WHERE user_id = " . $CURUSER['uid']);
    $coun = mysqli_num_rows($qry);
    if ($coun > 0) {
        $usercptpl->set("seznam", true, true);
        $usercptpl->set("noseznam", false, true);
    } else {
        $usercptpl->set("noseznam", true, true);
        $usercptpl->set("seznam", false, true);
    }
    if (!$coun) {
        $ignore = array();
    }
    $i = 0;
    while ($res = mysqli_fetch_array($qry)) {
        $tor = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT ul.prefixcolor, ul.suffixcolor, ul.level, u.username, u.avatar, UNIX_TIMESTAMP(u.lastconnect) AS lastconnect FROM {$TABLE_PREFIX}users u LEFT JOIN {$TABLE_PREFIX}users_level ul ON u.id_level=ul.id WHERE u.id>1 AND u.id = " . $res['ignore_id']);
        $ret = mysqli_fetch_array($tor);
        $ignore[$i]["id"] = $res["id"];
        $ignore[$i]["name"] = "<a href=index.php?page=userdetails&id=" . $res["ignore_id"] . ">" . unesc($ret["prefixcolor"]) . unesc($ret["username"]) . unesc($ret["suffixcolor"]) . "</a>";
        $ignore[$i]["added"] = "<center>{$res['added']}</center>";
        $ignore[$i]["delete"] = "<center><a href=\"index.php?page=usercp&uid=" . $CURUSER["uid"] . "&do=ignore&action=del&amp;id=" . $ignore[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a></center>";
        $i++;
    }
    if (!$coun) {
        $usercptpl->set("nic", "<tr><td class=lista align=center colspan=40><center>List Ignore users is empty</tr></td>");
    }
}
$usercptpl->set("ignore", $ignore);
block_end();
예제 #17
0
     if ($ratio < 1.0 && $rowuser['id'] != $added["uploader"]) {
         $wait = $CURUSER["WT"];
     }
     $wait -= $timer;
     if ($wait <= 0) {
         $wait = 0;
     }
 }
 //end waitingtime
 echo "</td>";
 if ($GLOBALS["usepopup"]) {
     echo "\t<td width=60% class=\"lista\" style=\"padding-left:10px;\"><a href=\"javascript:popdetails('index.php?page=torrent-details&amp;id=" . $data['hash'] . "');\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $data["filename"] . "</a></td>";
 } else {
     echo "\t<TD align=\"left\" class=\"lista\" style=\"padding-left:10px;\"><A HREF=\"index.php?page=torrent-details&amp;id=" . $data["hash"] . "\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $data["filename"] . "</A></td>";
 }
 echo "\t<td align=\"center\" class=\"lista\" style=\"text-align: center;\"><a href=\"index.php?page=torrents&category={$data['catid']}\">" . image_or_link($data["image"] == "" ? "" : "{$STYLEURL}/images/categories/" . $data["image"], "", $data["cname"]) . "</td>";
 if (max(0, $CURUSER["WT"]) > 0) {
     echo "\t<td align=\"center\" class=\"lista\" style=\"text-align: center;\">" . $wait . " h</td>";
 }
 include "include/offset.php";
 echo "\t<td nowrap=\"nowrap\" class=\"lista\" align=\"center\" style=\"text-align: center;\">" . date("d/m/Y", $data["added"] - $offset) . "</td>";
 echo "\t<td nowrap=\"nowrap\" align=\"center\" class=\"lista\" style=\"text-align: center;\">" . makesize($data["size"]) . "</td>";
 if ($data["external"] == "no") {
     if ($GLOBALS["usepopup"]) {
         echo "\t<td align=\"center\" class=\"" . linkcolor($data["seeds"]) . "\" style=\"text-align: center;\"><a href=\"javascript:poppeer('index.php?page=peers&amp;id=" . $data["hash"] . "');\" title=\"" . $language["PEERS_DETAILS"] . "\">" . $data["seeds"] . "</a></td>\n";
         echo "\t<td align=\"center\" class=\"" . linkcolor($data["leechers"]) . "\" style=\"text-align: center;\"><a href=\"javascript:poppeer('index.php?page=peers&amp;id=" . $data["hash"] . "');\" title=\"" . $language["PEERS_DETAILS"] . "\">" . $data["leechers"] . "</a></td>\n";
         if ($data["finished"] > 0) {
             echo "\t<td align=\"center\" class=\"lista\" style=\"text-align: center;\"><a href=\"javascript:poppeer('index.php?page=torrent_history&amp;id=" . $data["hash"] . "');\" title=\"History - " . $data["filename"] . "\">" . $data["finished"] . "</a></td>";
         } else {
             echo "\t<td align=\"center\" class=\"lista\" style=\"text-align: center;\">---</td>";
         }
예제 #18
0
     $posts[$pn]["actions"] = "";
     if ((!$locked || $CURUSER["edit_forum"] == "yes") && $usercan_write) {
         $posts[$pn]["actions"] .= "<a href=\"index.php?page=forum&amp;action=quotepost&amp;topicid={$topicid}&amp;postid=" . $arr["id"] . "\">" . image_or_link($STYLEPATH . "/images/f_quote.png", "", "[" . $language["QUOTE"] . "]") . "</a>";
     }
     if ($CURUSER["uid"] == $posterid && !$locked || $CURUSER["edit_forum"] == "yes") {
         $posts[$pn]["actions"] .= "&nbsp;&nbsp;<a href=\"index.php?page=forum&amp;action=editpost&amp;postid=" . $arr["id"] . "\">" . image_or_link($STYLEPATH . "/images/f_edit.png", "", "[" . $language["EDIT"] . "]") . "</a>";
     }
     if ($CURUSER["delete_forum"] == "yes") {
         $posts[$pn]["actions"] .= "&nbsp;&nbsp;<a href=\"index.php?page=forum&amp;action=deletepost&amp;postid=" . $arr["id"] . "&amp;forumid={$forumid}\">" . image_or_link($STYLEPATH . "/images/f_delete.png", "", "[" . $language["DELETE"] . "]") . "</a>";
     }
     $posts[$pn]["body"] = format_comment($arr["body"]);
     if (is_valid_id($arr['editedby'])) {
         $posts[$pn]["body"] .= "<p><font size=\"1\">" . $language["LAST_EDITED_BY"] . " <a href=index.php?page=userdetails&amp;id=" . $arr["editedby"] . "<b>" . $arr["editor"] . "</b></a> at " . get_date_time($arr['editedat']) . "</font></p>\n";
     }
     $posts[$pn]["pm"] = $CURUSER["uid"] > 1 ? "<a href=\"index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid={$userid}&amp;what=new&amp;to=" . urlencode($arr["username"]) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", $language["PM"]) . "</a>" : "";
     $posts[$pn]["top"] = image_or_link("{$STYLEPATH}/images/top.gif", "", $language["TOP"]);
     ++$pn;
 }
 unset($arr);
 unset($res);
 $forumtpl->set("old_posts", $pn > 0, true);
 $forumtpl->set("frm_action", "index.php?page=forum&amp;action=post");
 $forumtpl->set("topic_id", "{$topicid}");
 $forumtpl->set("newtopic", false, true);
 $forumtpl->set("newtopic_1", false, true);
 $forumtpl->set("posts", $posts);
 $forumtpl->set("replies", true, true);
 $forumtpl->set("post_subject", "");
 if ($quote) {
     $postid = intval(0 + $_GET["postid"]);
     $arr = get_result("SELECT p.*, u.username FROM {$TABLE_PREFIX}posts p LEFT JOIN {$TABLE_PREFIX}users u ON p.userid = u.id WHERE p.id={$postid} LIMIT 1", true);
예제 #19
0
     }
     $vz = $data["added"];
     $timer = floor((vars::$timestamp - $vz) / 3600);
     if ($ratio < 1.0 && $rowuser['id'] != $data["uploader"]) {
         $wait = user::$current["WT"];
     }
     $wait -= $timer;
     if ($wait <= 0) {
         $wait = 0;
     }
     if (utf8::strlen($data["hash"]) > 0) {
         echo "\t<td align='center' class='lista'>" . ($wait > 0 ? $wait . " h" : "---") . "</td>\n";
     }
     //end waitingtime
 }
 echo "\t<td align='center' class='lista'><a href='download.php?id=" . $data["hash"] . "&amp;f=" . urlencode($data["filename"]) . ".torrent'>" . image_or_link("images/download.gif", "", "torrent") . "</a></td>\n";
 include INCL_PATH . "offset.php";
 echo "\t<td align='center' class='lista'>" . date("d/m/Y H:m:s", $data["added"] - $offset) . "</td>\n";
 echo "\t<td align='center' class='lista'>" . misc::makesize((int) $data["size"]) . "</td>\n";
 //Uploaders nick details
 if ($SHOW_UPLOADER && $data["anonymous"] == "true") {
     echo "\t<td align='center' class='lista'>" . ANONYMOUS . "</td>\n";
 } elseif ($SHOW_UPLOADER && $data["anonymous"] == "false") {
     echo "\t<td align='center' class='lista'><a href='userdetails.php?id=" . (int) $data["upname"] . "'>" . StripSlashes($data['prefixcolor'] . security::html_safe($data["uploader"]) . $data['suffixcolor']) . "</a></td>\n";
 }
 //Uploaders nick details
 if ($data["external"] == "no") {
     echo "\t<td align='center' class='" . linkcolor($data["seeds"]) . "'><a href='peers.php?id=" . $data["hash"] . "' title='" . PEERS_DETAILS . "'>" . (int) $data["seeds"] . "</a></td>\n";
     echo "\t<td align='center' class='" . linkcolor($data["leechers"]) . "'><a href='peers.php?id=" . $data["hash"] . "' title='" . PEERS_DETAILS . "'>" . (int) $data["leechers"] . "</a></td>\n";
     if ($data["finished"] > 0) {
         echo "\t<td align='center' class='lista'><a href='torrent_history.php?id=" . $data["hash"] . "' title='History - " . security::html_safe($data["filename"]) . "'>" . number_format((int) $data["finished"], 0) . "</a></td>";
예제 #20
0
        } elseif (!"{$subrow['custom_title']}") {
            $title = "" . $lvl['level'] . "";
        } else {
            $title = unesc($subrow["custom_title"]);
        }
        $comments[$count]["user"] = "******"index.php?page=userdetails&amp;id=" . $subrow["uid"] . "\">" . unesc($subrow["user"]) . warn($row) . "</a>";
        $comments[$count]["user"] .= "</a><br/> " . $title;
        $comments[$count]["date"] = date("d/m/Y H.i.s", $subrow["data"] - $offset);
        $comments[$count]["elapsed"] = "(" . get_elapsed_time($subrow["data"]) . " ago)";
        $comments[$count]["avatar"] = "<img onload=\"resize_avatar(this);\" src=\"" . ($subrow["avatar"] && $subrow["avatar"] != "" ? htmlspecialchars($subrow["avatar"]) : "{$STYLEURL}/images/default_avatar.gif") . "\" alt=\"\" />";
        $comments[$count]["ratio"] = "<img src=\"images/arany.png\">&nbsp;" . (intval($subrow['downloaded']) > 0 ? number_format($subrow['uploaded'] / $subrow['downloaded'], 2) : "---");
        $comments[$count]["uploaded"] = "<img src=\"images/speed_up.png\">&nbsp;" . makesize($subrow["uploaded"]);
        $comments[$count]["downloaded"] = "<img src=\"images/speed_down.png\">&nbsp;" . makesize($subrow["downloaded"]);
        // only users able to delete torrents can delete comments...
        if ($CURUSER["delete_torrents"] == "yes") {
            $comments[$count]["delete"] = "<a onclick=\"return confirm('" . str_replace("'", "\\'", $language["DELETE_CONFIRM"]) . "')\" href=\"index.php?page=comment&amp;id=" . $row["info_hash"] . "&amp;cid=" . $subrow["id"] . "&amp;action=delete\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
        }
        $comments[$count]["comment"] = format_comment($subrow["text"]);
        $count++;
    }
    unset($subrow);
    unset($subres);
}
$torrenttpl->set("current_username", $CURUSER["username"]);
if ($GLOBALS["usepopup"]) {
    $torrenttpl->set("torrent_footer", "<a href=\"javascript: window.close();\">" . $language["CLOSE"] . "</a>");
} else {
    $torrenttpl->set("torrent_footer", "<a href=\"javascript: history.go(-1);\">" . $language["BACK"] . "</a>");
}
$torrenttpl->set("torrent", $row);
$torrenttpl->set("comments", $comments);
예제 #21
0
                $added = sqlesc(time());
                do_sqlquery("INSERT INTO {$TABLE_PREFIX}bannedip (added, addedby, first, last, comment) VALUES({$added}, {$CURUSER['uid']}, {$firstip}, {$lastip}, {$comment})", true);
            }
        }
        // don't break, so now we read directly ;)
    // don't break, so now we read directly ;)
    case '':
    case 'read':
    default:
        $banned = array();
        $getbanned = do_sqlquery("SELECT b.*, u.username FROM {$TABLE_PREFIX}bannedip b LEFT JOIN {$TABLE_PREFIX}users u ON u.id=b.addedby ORDER BY b.added DESC", true);
        $rowsbanned = @mysql_num_rows($getbanned);
        $admintpl->set("frm_action", "index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=banip&amp;action=write");
        $i = 0;
        if ($rowsbanned > 0) {
            $admintpl->set("no_records", false, true);
            while ($arr = mysql_fetch_assoc($getbanned)) {
                $banned[$i]["first_ip"] = long2ip($arr["first"]);
                $banned[$i]["last_ip"] = long2ip($arr["last"]);
                $banned[$i]["date"] = get_date_time($arr['added']);
                $banned[$i]["comments"] = htmlspecialchars(unesc($arr["comment"]));
                $banned[$i]["by"] = "<a href=\"index.php?page=userdetails&amp;id=" . $arr["addedby"] . "\">" . unesc($arr["username"]) . "</a>";
                $banned[$i]["remove"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=banip&amp;action=delete&amp;ip={$arr['id']}\" onclick=\"return confirm('" . str_replace("'", "\\'", $language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
                $i++;
            }
        } else {
            $admintpl->set("no_records", true, true);
        }
        $admintpl->set("bannedip", $banned);
        $admintpl->set("language", $language);
}
예제 #22
0
파일: users.php 프로젝트: wilian32/xbtit
    $users = array();
    $i = 0;
    while ($row_user = mysql_fetch_array($rusers)) {
        // start while
        $users[$i]["username"] = "******"index.php?page=userdetails&amp;id=" . $row_user["id"] . "\">" . unesc($row_user["prefixcolor"]) . unesc($row_user["username"]) . unesc($row_user["suffixcolor"]) . "</a>";
        $users[$i]["userlevel"] = $row_user["level"];
        $users[$i]["joined"] = $row_user["joined"] == 0 ? $language["NOT_AVAILABLE"] : date("d/m/Y H:i:s", $row_user["joined"] - $offset);
        $users[$i]["lastconnect"] = $row_user["lastconnect"] == 0 ? $language["NOT_AVAILABLE"] : date("d/m/Y H:i:s", $row_user["lastconnect"] - $offset);
        $users[$i]["flag"] = $row_user["flag"] == 0 ? "<img src='images/flag/unknown.gif' alt='" . $language["UNKNOWN"] . "' title='" . $language["UNKNOWN"] . "' />" : "<img src='images/flag/" . $row_user['flagpic'] . "' alt='" . $row_user['name'] . "' title='" . $row_user['name'] . "' />";
        //user ratio
        if (intval($row_user["downloaded"]) > 0) {
            $ratio = number_format($row_user["uploaded"] / $row_user["downloaded"], 2);
        } else {
            $ratio = '&#8734;';
        }
        $users[$i]["ratio"] = $ratio;
        if ($CURUSER["uid"] > 1 && $CURUSER["uid"] != $row_user["id"]) {
            $users[$i]["pm"] = "<a href=\"index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid={$CURUSER['uid']}&amp;what=new&amp;to=" . urlencode(unesc($row_user["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", $language["USERS_PM"]) . "</a>";
        }
        if ($CURUSER["edit_users"] == "yes" && $CURUSER["uid"] != $row_user["id"]) {
            $users[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=edit&amp;uid=" . $row_user["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        }
        if ($CURUSER["delete_users"] == "yes" && $CURUSER["uid"] != $row_user["id"]) {
            $users[$i]["delete"] = "<a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=delete&amp;uid=" . $row_user["id"] . "&amp;smf_fid=" . $row_user["smf_fid"] . "&amp;returnto=" . urlencode("index.php?page=users") . "\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
        }
        $i++;
    }
    // end while
    $userstpl->set("users", $users);
}
// end 'view_users'
예제 #23
0
                 $addedby = "<td class=lista align=center><center><a href=index.php?page=userdetails&id={$arr['userid']}><b>{$arr['username']} ({$ratio})</b></a></td>";
             } else {
                 $addedby = "<td class=lista align=center><center><a href=index.php?page=userdetails&id={$arr['userid']}><b>{$arr['username']} (----)</b></a></td>";
             }
         } else {
             $addedby = "<td class=lista align=center><center><a href=index.php?page=userdetails&id={$arr['userid']}><b>{$arr['username']} ({$ratio})</b></a></td>";
         }
         $filled = $arr[filled];
         if ($filled) {
             $filled = "<a href={$filled}><font color=green><b>Yes</b></font></a>";
             $filledbydata = "<a href=index.php?page=userdetails&id={$arr['filledby']}><b>{$arr2['username']}</b></a>";
         } else {
             $filled = "<a href=index.php?page=reqdetails&id={$arr['id']}><font color=red><b>No</b></font></a>";
             $filledbydata = "<i>nobody</i>";
         }
         $req[$ii]["vr21"] = "<tr><td class=lista align=left><a href=index.php?page=reqdetails&id={$arr['id']}><b>{$arr['request']}</b></a></td>" . "<td class=lista align=center><center>" . image_or_link($arr['catimg'] == '' ? '' : 'style/xbtit_default/images/categories/' . $arr[catimg], ' title=' . $arr[cat] . '', $arr['cat']) . "</td><td class=lista align=center><center>" . $arr["added"] . "</td>{$addedby}<td class=lista align=center><center>{$filled}</td><td class=lista><center>{$filledbydata}</td><td class=lista align=center><a href=index.php?page=votesview&requestid={$arr['id']}><b><center>{$arr['hits']}</b></a></td>\n";
         if (!$CURUSER || $CURUSER["edit_torrents"] == "yes") {
             $req[$ii]["vr22"] = "<td class=lista align=center><center><input type=\"checkbox\" name=\"delreq[]\" value=\"" . $arr[id] . "\" /></td></tr>\n";
         }
         $ii++;
     }
     $viewrequeststpl->set("req", $req);
     $viewrequeststpl->set("vr23", "</table>\n");
     if (!$CURUSER || $CURUSER["edit_torrents"] == "yes") {
         $viewrequeststpl->set("vr23", "<table width=99%><td align=right><input type=submit value=Go></td></table>");
     }
     $viewrequeststpl->set("vr24", "</form>");
 } else {
     stderr("Offline Message", "The request section is offline on the moment");
     stdfoot();
     die;
예제 #24
0
$utorrents = intval($CURUSER["torrentsperpage"]);
$userdetailtpl = new bTemplate();
$userdetailtpl->set("language", $language);
$userdetailtpl->set("userdetail_username", unesc($row["username"]));
// just current username viewing the page - start
$userdetailtpl->set("current_username", unesc($CURUSER["username"]));
// just current username viewing the page - end
//$userdetailtpl-> set("userdetail_no_guest", $CURUSER["uid"]>1, TRUE);
if ($CURUSER["uid"] > 1 && $id != $CURUSER["uid"]) {
    $userdetailtpl->set("userdetail_send_pm", "&nbsp;&nbsp;&nbsp;<a href=\"index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid=" . $CURUSER["uid"] . "&amp;what=new&amp;to=" . urlencode(unesc($row["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", $language["PM"]) . "</a>");
}
if ($CURUSER["edit_users"] == "yes" && $id != $CURUSER["uid"]) {
    $userdetailtpl->set("userdetail_edit", "&nbsp;&nbsp;&nbsp<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=edit&amp;uid={$id}&amp;returnto=index.php?page=userdetails&amp;id={$id}\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>");
}
if ($CURUSER["delete_users"] == "yes" && $id != $CURUSER["uid"]) {
    $userdetailtpl->set("userdetail_delete", "&nbsp;&nbsp;&nbsp<a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=delete&amp;uid={$id}&amp;smf_fid=" . $row["smf_fid"] . "&amp;returnto=" . urlencode("index.php?page=users") . ">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>");
}
$userdetailtpl->set("userdetail_has_avatar", $row["avatar"] && $row["avatar"] != "", TRUE);
$userdetailtpl->set("userdetail_avatar", "<img border=\"0\" onload=\"resize_avatar(this);\" src=\"" . htmlspecialchars($row["avatar"]) . "\" alt=\"\" />");
$userdetailtpl->set("userdetail_edit_admin", $CURUSER["edit_users"] == "yes" || $CURUSER["admin_access"] == "yes", TRUE);
if ($CURUSER["edit_users"] == "yes" || $CURUSER["admin_access"] == "yes") {
    $userdetailtpl->set("userdetail_email", "<a href=\"mailto:" . $row["email"] . "\">" . $row["email"] . "</a>");
    $userdetailtpl->set("userdetail_last_ip", $row["cip"]);
    $userdetailtpl->set("userdetail_level_admin", $row["level"]);
    $userdetailtpl->set("userdetail_colspan", "2");
} else {
    $userdetailtpl->set("userdetail_level", $row["level"]);
    $userdetailtpl->set("userdetail_colspan", "0");
}
$userdetailtpl->set("userdetail_joined", $row["joined"] == 0 ? "N/A" : get_date_time($row["joined"]));
// Custom title - start
예제 #25
0
function read_blocks()
{
    global $TABLE_PREFIX, $language, $admintpl, $CURUSER, $USERLANG, $STYLEPATH;
    require_once load_language("lang_blocks.php");
    $br = get_result("SELECT * FROM {$TABLE_PREFIX}blocks ORDER BY sortid", true);
    $tops = array();
    $lefts = array();
    $centers = array();
    $rights = array();
    $bottom = array();
    $t = 0;
    $l = 0;
    $c = 0;
    $r = 0;
    $b = 0;
    $rlevel = mysql_query("SELECT DISTINCT id_level, predef_level, level FROM {$TABLE_PREFIX}users_level ORDER BY id_level");
    $alevel = array();
    while ($reslevel = mysql_fetch_assoc($rlevel)) {
        $alevel[] = $reslevel;
    }
    foreach ($br as $id => $blk) {
        switch ($blk["position"]) {
            case 't':
                $tops[$t]["pos"] = "\n<select name=\"position_" . $blk["blockid"] . "\" size=\"1\">";
                $tops[$t]["pos"] .= "\n<option selected=\"selected\" value=\"t\">" . $language["TOP"] . "</option>";
                $tops[$t]["pos"] .= "\n<option value=\"l\">" . $language["LEFT"] . "</option>";
                $tops[$t]["pos"] .= "\n<option value=\"c\">" . $language["CENTER"] . "</option>";
                $tops[$t]["pos"] .= "\n<option value=\"r\">" . $language["RIGHT"] . "</option>";
                $tops[$t]["pos"] .= "\n<option value=\"b\">" . $language["BOTTOM"] . "</option>";
                $tops[$t]["pos"] .= "\n</select>";
                $tops[$t]["combo_min_view"] = "\n<select name=\"minclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $tops[$t]["combo_min_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["minclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $tops[$t]["combo_min_view"] .= "\n</select>";
                $tops[$t]["combo_max_view"] = "\n<select name=\"maxclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $tops[$t]["combo_max_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["maxclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $tops[$t]["combo_max_view"] .= "\n</select>";
                $tops[$t]["combo"] = "\n<select name=\"sort_" . $blk["blockid"] . "\" size=\"1\">";
                for ($i = 0; $i < count($br); $i++) {
                    $tops[$t]["combo"] .= "\n<option value=\"{$i}\" " . ($i == $blk["sortid"] ? "selected=\"selected\"" : "") . ">{$i}</option>";
                }
                $tops[$t]["combo"] .= "\n</select>";
                $tops[$t]["status"] = $blk["status"];
                $tops[$t]["title"] = $language[$blk["title"]] . "&nbsp;&nbsp;<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=blocks&amp;action=edit&amp;id=" . $blk["blockid"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
                $tops[$t]["check"] = "<input name=\"status_" . $blk["blockid"] . "\" type=\"checkbox\" " . ($blk["status"] == "1" ? "checked=\"checked\"" : "") . " />";
                $t++;
                break;
            case 'l':
                $lefts[$l]["pos"] = "\n<select name=\"position_" . $blk["blockid"] . "\" size=\"1\">";
                $lefts[$l]["pos"] .= "\n<option value=\"t\">" . $language["TOP"] . "</option>";
                $lefts[$l]["pos"] .= "\n<option selected=\"selected\" value=\"l\">" . $language["LEFT"] . "</option>";
                $lefts[$l]["pos"] .= "\n<option value=\"c\">" . $language["CENTER"] . "</option>";
                $lefts[$l]["pos"] .= "\n<option value=\"r\">" . $language["RIGHT"] . "</option>";
                $lefts[$l]["pos"] .= "\n<option value=\"b\">" . $language["BOTTOM"] . "</option>";
                $lefts[$l]["pos"] .= "\n</select>";
                $lefts[$l]["combo_min_view"] = "\n<select name=\"minclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $lefts[$l]["combo_min_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["minclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $lefts[$l]["combo_min_view"] .= "\n</select>";
                $lefts[$l]["combo_max_view"] = "\n<select name=\"maxclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $lefts[$l]["combo_max_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["maxclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $lefts[$l]["combo_max_view"] .= "\n</select>";
                $lefts[$l]["combo"] = "\n<select name=\"sort_" . $blk["blockid"] . "\" size=\"1\">";
                for ($i = 0; $i < count($br); $i++) {
                    $lefts[$l]["combo"] .= "\n<option value=\"{$i}\" " . ($i == $blk["sortid"] ? "selected=\"selected\"" : "") . ">{$i}</option>";
                }
                $lefts[$l]["combo"] .= "\n</select>";
                $lefts[$l]["status"] = $blk["status"];
                $lefts[$l]["title"] = $language[$blk["title"]] . "&nbsp;&nbsp;<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=blocks&amp;action=edit&amp;id=" . $blk["blockid"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
                $lefts[$l]["check"] = "<input name=\"status_" . $blk["blockid"] . "\" type=\"checkbox\" " . ($blk["status"] == "1" ? "checked=\"checked\"" : "") . " />";
                $l++;
                break;
            case 'c':
                $centers[$c]["pos"] = "\n<select name=\"position_" . $blk["blockid"] . "\" size=\"1\">";
                $centers[$c]["pos"] .= "\n<option value=\"t\">" . $language["TOP"] . "</option>";
                $centers[$c]["pos"] .= "\n<option value=\"l\">" . $language["LEFT"] . "</option>";
                $centers[$c]["pos"] .= "\n<option selected=\"selected\" value=\"c\">" . $language["CENTER"] . "</option>";
                $centers[$c]["pos"] .= "\n<option value=\"r\">" . $language["RIGHT"] . "</option>";
                $centers[$c]["pos"] .= "\n<option value=\"b\">" . $language["BOTTOM"] . "</option>";
                $centers[$c]["pos"] .= "\n</select>";
                $centers[$c]["combo_min_view"] = "\n<select name=\"minclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $centers[$c]["combo_min_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["minclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $centers[$c]["combo_min_view"] .= "\n</select>";
                $centers[$c]["combo_max_view"] = "\n<select name=\"maxclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $centers[$c]["combo_max_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["maxclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $centers[$c]["combo_max_view"] .= "\n</select>";
                $centers[$c]["combo"] = "\n<select name=\"sort_" . $blk["blockid"] . "\" size=\"1\">";
                for ($i = 0; $i < count($br); $i++) {
                    $centers[$c]["combo"] .= "\n<option value=\"{$i}\" " . ($i == $blk["sortid"] ? "selected=\"selected\"" : "") . ">{$i}</option>";
                }
                $centers[$c]["combo"] .= "\n</select>";
                $centers[$c]["status"] = $blk["status"];
                $centers[$c]["title"] = $language[$blk["title"]] . "&nbsp;&nbsp;<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=blocks&amp;action=edit&amp;id=" . $blk["blockid"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
                $centers[$c]["check"] = "<input name=\"status_" . $blk["blockid"] . "\" type=\"checkbox\" " . ($blk["status"] == "1" ? "checked=\"checked\"" : "") . " />";
                $c++;
                break;
            case 'r':
                $rights[$r]["pos"] = "\n<select name=\"position_" . $blk["blockid"] . "\" size=\"1\">";
                $rights[$r]["pos"] .= "\n<option value=\"t\">" . $language["TOP"] . "</option>";
                $rights[$r]["pos"] .= "\n<option value=\"l\">" . $language["LEFT"] . "</option>";
                $rights[$r]["pos"] .= "\n<option value=\"c\">" . $language["CENTER"] . "</option>";
                $rights[$r]["pos"] .= "\n<option selected=\"selected\" value=\"r\">" . $language["RIGHT"] . "</option>";
                $rights[$r]["pos"] .= "\n<option value=\"b\">" . $language["BOTTOM"] . "</option>";
                $rights[$r]["pos"] .= "\n</select>";
                $rights[$r]["combo_min_view"] = "\n<select name=\"minclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $rights[$r]["combo_min_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["minclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $rights[$r]["combo_min_view"] .= "\n</select>";
                $rights[$r]["combo_max_view"] = "\n<select name=\"maxclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $rights[$r]["combo_max_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["maxclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $rights[$r]["combo_max_view"] .= "\n</select>";
                $rights[$r]["combo"] = "\n<select name=\"sort_" . $blk["blockid"] . "\" size=\"1\">";
                for ($i = 0; $i < count($br); $i++) {
                    $rights[$r]["combo"] .= "\n<option value=\"{$i}\" " . ($i == $blk["sortid"] ? "selected=\"selected\"" : "") . ">{$i}</option>";
                }
                $rights[$r]["combo"] .= "\n</select>";
                $rights[$r]["status"] = $blk["status"];
                $rights[$r]["title"] = $language[$blk["title"]] . "&nbsp;&nbsp;<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=blocks&amp;action=edit&amp;id=" . $blk["blockid"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
                $rights[$r]["check"] = "<input name=\"status_" . $blk["blockid"] . "\" type=\"checkbox\" " . ($blk["status"] == "1" ? "checked=\"checked\"" : "") . " />";
                $r++;
                break;
            case 'b':
                $bottom[$b]["pos"] = "\n<select name=\"position_" . $blk["blockid"] . "\" size=\"1\">";
                $bottom[$b]["pos"] .= "\n<option value=\"t\">" . $language["TOP"] . "</option>";
                $bottom[$b]["pos"] .= "\n<option value=\"l\">" . $language["LEFT"] . "</option>";
                $bottom[$b]["pos"] .= "\n<option value=\"c\">" . $language["CENTER"] . "</option>";
                $bottom[$b]["pos"] .= "\n<option value=\"r\">" . $language["RIGHT"] . "</option>";
                $bottom[$b]["pos"] .= "\n<option selected=\"selected\" value=\"b\">" . $language["BOTTOM"] . "</option>";
                $bottom[$b]["pos"] .= "\n</select>";
                $bottom[$b]["combo_min_view"] = "\n<select name=\"minclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $bottom[$b]["combo_min_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["minclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $bottom[$b]["combo_min_view"] .= "\n</select>";
                $bottom[$b]["combo_max_view"] = "\n<select name=\"maxclassview_" . $blk["blockid"] . "\" size=\"1\">";
                foreach ($alevel as $level) {
                    $bottom[$b]["combo_max_view"] .= "\n<option value=\"" . $level["id_level"] . ($blk["maxclassview"] == $level["id_level"] ? "\" selected=\"selected\">" : "\">") . $level["level"] . "</option>";
                }
                $bottom[$b]["combo_max_view"] .= "\n</select>";
                $bottom[$b]["combo"] = "\n<select name=\"sort_" . $blk["blockid"] . "\" size=\"1\">";
                for ($i = 0; $i < count($br); $i++) {
                    $bottom[$b]["combo"] .= "\n<option value=\"{$i}\" " . ($i == $blk["sortid"] ? "selected=\"selected\"" : "") . ">{$i}</option>";
                }
                $bottom[$b]["combo"] .= "\n</select>";
                $bottom[$b]["status"] = $blk["status"];
                $bottom[$b]["title"] = $language[$blk["title"]] . "&nbsp;&nbsp;<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=blocks&amp;action=edit&amp;id=" . $blk["blockid"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
                $bottom[$b]["check"] = "<input name=\"status_" . $blk["blockid"] . "\" type=\"checkbox\" " . ($blk["status"] == "1" ? "checked=\"checked\"" : "") . " />";
                $b++;
                break;
        }
    }
    unset($br);
    $admintpl->set("frm_action", "index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=blocks&amp;action=save");
    $admintpl->set("top_blocks", $t > 0, true);
    $admintpl->set("left_blocks", $l > 0, true);
    $admintpl->set("center_blocks", $c > 0, true);
    $admintpl->set("right_blocks", $r > 0, true);
    $admintpl->set("bottom_blocks", $b > 0, true);
    $admintpl->set("tops", $tops);
    $admintpl->set("lefts", $lefts);
    $admintpl->set("centers", $centers);
    $admintpl->set("rights", $rights);
    $admintpl->set("bottoms", $bottom);
    $admintpl->set("language", $language);
    $admintpl->set("edit_block", false, true);
    $admintpl->set("add_new_block", "index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=blocks&amp;action=edit");
}
예제 #26
0
파일: seedbox.php 프로젝트: Karpec/gizd
     if ($wait <= 0) {
         $wait = 0;
     }
 }
 //end waitingtime
 $id = mysqli_query($GLOBALS["___mysqli_ston"], "select username,id_level FROM {$TABLE_PREFIX}users WHERE id =" . $data["uploader"]);
 $rowt = mysqli_fetch_array($id);
 $idi = mysqli_query($GLOBALS["___mysqli_ston"], "select prefixcolor, suffixcolor FROM {$TABLE_PREFIX}users_level WHERE id =" . $rowt["id_level"]);
 $rowti = mysqli_fetch_array($idi);
 $seedbox[$i]["sw15"] = "</td>";
 if ($GLOBALS["usepopup"]) {
     $seedbox[$i]["sw16"] = "<td width=60% class=\"lista\" style=\"padding-left:10px;\"><a href=\"javascript:popdetails('index.php?page=torrent-details&amp;id=" . $data['hash'] . "');\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $data["filename"] . "</a></td>";
 } else {
     $seedbox[$i]["sw17"] = "<TD align=\"left\" class=\"lista\" style=\"padding-left:10px;\"><A HREF=\"index.php?page=torrent-details&amp;id=" . $data["hash"] . "\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $data["filename"] . "</A></td>";
 }
 $seedbox[$i]["sw18"] = "<td align=\"center\" class=\"lista\" style=\"text-align: center;\"><a href=\"index.php?page=torrents&amp;category={$data['catid']}\">" . image_or_link($data["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $data["image"], "", $data["cname"]) . "</a></td>";
 if (max(0, $CURUSER["WT"]) > 0) {
     $seedbox[$i]["sw19"] = "<td align=\"center\" class=\"lista\" style=\"text-align: center;\">" . $wait . " h</td>";
 }
 include "include/offset.php";
 $seedbox[$i]["sw20"] = "<td nowrap=\"nowrap\" class=\"lista\" align=\"center\" style=\"text-align: center;\">" . date("d/m/Y", $data["added"] - $offset) . "</td>";
 $seedbox[$i]["sw20.5"] = "<td nowrap=\"nowrap\" class=\"lista\" align=\"center\" style=\"text-align: center;\">" . $rowti['prefixcolor'] . $rowt["username"] . $rowti['suffixcolor'] . "</td>";
 $seedbox[$i]["sw21"] = "<td nowrap=\"nowrap\" align=\"center\" class=\"lista\" style=\"text-align: center;\">" . makesize($data["size"]) . "</td>";
 if ($data["external"] == "no") {
     if ($GLOBALS["usepopup"]) {
         $seedbox[$i]["sw22"] = "<td align=\"center\" class=\"" . linkcolor($data["seeds"]) . "\" style=\"text-align: center;\"><a href=\"javascript:poppeer('index.php?page=peers&amp;id=" . $data["hash"] . "');\" title=\"" . $language["PEERS_DETAILS"] . "\">" . $data["seeds"] . "</a></td>\n";
         $seedbox[$i]["sw23"] = "<td align=\"center\" class=\"" . linkcolor($data["leechers"]) . "\" style=\"text-align: center;\"><a href=\"javascript:poppeer('index.php?page=peers&amp;id=" . $data["hash"] . "');\" title=\"" . $language["PEERS_DETAILS"] . "\">" . $data["leechers"] . "</a></td>\n";
         if ($data["finished"] > 0) {
             $seedbox[$i]["sw24"] = "<td align=\"center\" class=\"lista\" style=\"text-align: center;\"><a href=\"javascript:poppeer('index.php?page=torrent_history&amp;id=" . $data["hash"] . "');\" title=\"History - " . $data["filename"] . "\">" . $data["finished"] . "</a></td>";
         } else {
             $seedbox[$i]["sw24"] = "<td align=\"center\" class=\"lista\" style=\"text-align: center;\">---</td>";
예제 #27
0
}
// select lastest 30 records for infohash
$res = $db->query("SELECT history.*, username, countries.name AS country, countries.flagpic, level, prefixcolor, suffixcolor FROM history INNER JOIN users ON history.uid = users.id INNER JOIN countries ON users.flag = countries.id INNER JOIN users_level ON users.id_level = users_level.id WHERE history.infohash = '" . $id . "' AND history.date IS NOT NULL ORDER BY date DESC LIMIT 0, 30");
block_begin("Torrent History (Last 30 Snatchers)");
$spacer = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
print "<table class='lista' border='0' width='100%'>\n";
print "<tr><td align='center' class='header' colspan='2'>" . USER_NAME . "</td>";
print "<td align='center' class='header'>" . PEER_COUNTRY . "</td>";
print "<td align='center' class='header'>Active</td>";
print "<td align='center' class='header'>" . PEER_CLIENT . "</td>\n";
print "<td align='center' class='header'>" . DOWNLOADED . "</td>\n";
print "<td align='center' class='header'>" . UPLOADED . "</td>\n";
print "<td align='center' class='header'>" . RATIO . "</td>\n";
print "<td align='center' class='header'>" . FINISHED . "</td></tr>\n";
while ($row = $res->fetch_array(MYSQLI_BOTH)) {
    print "<tr><td align='center' class='lista'>" . "<a href='userdetails.php?id=" . (int) $row["uid"] . "'>" . security::html_safe(unesc($row["username"])) . "</a></td>" . "<td align='center' class='lista'><a href='usercp.php?do=pm&action=edit&uid=" . user::$current['uid'] . "&what=new&to=" . urlencode(unesc($row["username"])) . "'>" . image_or_link($STYLEPATH . "/pm.png", "", "PM") . "</a></td>";
    if ($row["flagpic"] != "") {
        print "<td align='center' class='lista'><img src='images/flag/" . $row["flagpic"] . "' alt='" . security::html_safe($row["country"]) . "' /></td>";
    } else {
        print "<td align='center' class='lista'><img src='images/flag/unknown.gif' alt='" . UNKNOWN . "' /></td>";
    }
    print "<td align='center' class='lista'>" . $row["active"] . "</td>";
    print "<td align='center' class='lista'>" . security::html_safe($row["agent"]) . "</td>";
    $dled = misc::makesize((int) $row["downloaded"]);
    $upld = misc::makesize((int) $row["uploaded"]);
    print "<td align='center' class='lista'>" . $dled . "</td>";
    print "<td align='center' class='lista'>" . $upld . "</td>";
    if (intval($row["downloaded"]) > 0) {
        $ratio = number_format((int) $row["uploaded"] / (int) $row["downloaded"], 2);
    } else {
        $ratio = "&infin;";
예제 #28
0
파일: users.php 프로젝트: Karpec/gizd
                $ratio = '&#8734;';
            }
        } else {
            $ratio = "<img src=\"images/private2.png\" title=\"private\">";
        }
        $users[$i]["ratio"] = $ratio;
        if ($CURUSER["uid"] > 1 && $CURUSER["uid"] != $row_user["id"]) {
            $users[$i]["pm"] = "<a href=\"index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid={$CURUSER['uid']}&amp;what=new&amp;to=" . urlencode(unesc($row_user["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", $language["USERS_PM"]) . "</a>";
        }
        if ($CURUSER["id_level"] == "8" or $row_user["immunity"] == "no") {
            if ($CURUSER["edit_users"] == "yes" && $CURUSER["uid"] != $row_user["id"]) {
                $users[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=edit&amp;uid=" . $row_user["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
            }
            if ($CURUSER["delete_users"] == "yes" && $CURUSER["uid"] != $row_user["id"]) {
                $users[$i]["delete"] = "<a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=delete&amp;uid=" . $row_user["id"] . "&amp;smf_fid=" . $row_user["smf_fid"] . "&amp;returnto=" . urlencode("index.php?page=users") . "\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
            }
            if ($CURUSER["delete_users"] == "yes" && $CURUSER["uid"] != $row_user["id"]) {
                $users[$i]["ban"] = "<a href=index.php?page=banbutton&ban_id=" . $row_user["id"] . "><font color=green>" . image_or_link("{$STYLEPATH}/images/trash.png", "", $language["DTBAN"]) . "</a>";
            }
            //shitlist
            if ($CURUSER["delete_users"] == "yes" && $CURUSER["uid"] != $row_user["id"] && $btit_settings["slon"] == true) {
                $users[$i]["shit"] = "<a href=index.php?page=shitlist&do=add&shit_id=" . $row_user["id"] . "><font color=green>" . image_or_link("images/shit.gif", "", $language["SHIT"]) . "</a>";
            }
            //shitlist
        }
        $i++;
    }
    // end while
    $userstpl->set("users", $users);
}
// end 'view_users'
예제 #29
0
         $forums[$i]["writelevel"] = $result["writelevel"];
         $forums[$i]["createlevel"] = $result["createlevel"];
         $forums[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=forum&amp;action=edit&amp;id=" . $result["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
         $forums[$i]["delete"] = "<a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=forum&amp;action=delete&amp;id=" . $result["id"] . "\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
         $res_subf = get_result("SELECT f.*,uread.level as readlevel,uwrite.level as writelevel, ucreate.level as createlevel FROM {$TABLE_PREFIX}forums f INNER JOIN {$TABLE_PREFIX}users_level  as uread on uread.id_level=minclassread INNER JOIN {$TABLE_PREFIX}users_level as uwrite on uwrite.id_level=minclasswrite INNER JOIN {$TABLE_PREFIX}users_level as ucreate on ucreate.id_level=minclasscreate WHERE f.id_parent=" . $result["id"] . " AND uread.can_be_deleted='no' AND uwrite.can_be_deleted='no' AND ucreate.can_be_deleted='no' ORDER BY f.sort,f.id", true);
         $i++;
         foreach ($res_subf as $ids => $sub_f) {
             $forums[$i]["td_padding"] = "style=\"padding-left:35px;\"";
             $forums[$i]["name"] = "<b>" . unesc($sub_f["name"]) . "</b><br />" . unesc($sub_f["description"]);
             $forums[$i]["topiccount"] = $sub_f["topiccount"];
             $forums[$i]["postcount"] = $sub_f["postcount"];
             $forums[$i]["readlevel"] = $sub_f["readlevel"];
             $forums[$i]["writelevel"] = $sub_f["writelevel"];
             $forums[$i]["createlevel"] = $sub_f["createlevel"];
             $forums[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=forum&amp;action=edit&amp;id=" . $sub_f["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
             $forums[$i]["delete"] = "<a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=forum&amp;action=delete&amp;id=" . $sub_f["id"] . "\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
             $i++;
         }
         unset($res_subf);
         unset($sub_f);
     }
     unset($resf);
     unset($result);
     $block_title = $language["FORUM_SETTINGS"];
     $admintpl->set("language", $language);
     $admintpl->set("read", true, true);
     $admintpl->set("forums", $forums);
     $admintpl->set("add_link", "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=forum&amp;action=edit&amp;what=new\">" . $language["FORUM_ADD_NEW"] . "</a>");
     unset($forums);
     break;
 case "edit":
예제 #30
0
	<h2>	<b><center><a href="/index.php?page=torrent-details&id=<?php 
    echo $tor[info_hash];
    ?>
">
    <?php 
    echo $tor[filename];
    ?>
</a></b></center>
</td></tr>
<tr class="lista">
<td class="lista">
    
    <?php 
    if (isset($tor["cat_name"])) {
        print "<a href=\"index.php?page=torrents&amp;category={$tor['cat_id']}\">" . image_or_link($tor["cat_image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $tor["cat_image"], "", $tor["cat_name"]) . "</a>";
    }
    ?>
<br /><b>Seeders: </b><?php 
    echo $tor[seeds];
    ?>
<br />
    <b>Leechers: </b><?php 
    echo $tor[leechers];
    ?>
	
</td><td class="lista">
<span class="desc">
<table border=0 style="border:0px" width="99%"><tr><td>
<?php 
    echo $description;