Ejemplo n.º 1
0
stdhead("Мои списки пользователей");
print "<table class=main width=100% border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>";
print "<table width=100% border=1 cellspacing=0 cellpadding=5>";
print "<tr><td class=\"colhead\"><a name=\"friends\">" . $tracker_lang['friends_list'] . "</a></tr></td>";
print "<tr><td>";
$i = 0;
$res = sql_query("SELECT f.friendid as id, u.username AS name, u.class, u.avatar, u.title, u.donor, u.warned, u.enabled, u.last_access FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid={$userid} ORDER BY name") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
    $friends = "<em>" . $tracker_lang['no_friends'] . ".</em>";
} else {
    while ($friend = mysql_fetch_array($res)) {
        $title = $friend["title"];
        if (!$title) {
            $title = get_user_class_name($friend["class"]);
        }
        $body1 = "<a href=\"userdetails.php?id=" . $friend['id'] . "\"><b>" . get_user_class_color($friend["class"], $friend['name']) . "</b></a>" . get_user_icons($friend) . " ({$title})<br /><br />" . $tracker_lang['last_seen'] . $friend['last_access'] . "<br />(" . get_et(sql_ts_to_ut($friend[last_access])) . " " . $tracker_lang['ago'] . ")";
        $body2 = "<br /><a href=\"friends.php?id={$userid}&action=delete&type=friend&targetid=" . $friend['id'] . "\">" . $tracker_lang['delete'] . "</a>" . "<br /><br /><a href=\"message.php?action=sendmessage&amp;receiver=" . $friend['id'] . "\">" . $tracker_lang['pm'] . "</a>";
        $avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars_uni($friend["avatar"]) : "";
        if (!$avatar) {
            $avatar = "pic/default_avatar.gif";
        }
        if ($i % 2 == 0) {
            print "<table width=100% style='padding: 0px'><tr><td class=bottom style='padding: 5px' width=50% align=center>";
        } else {
            print "<td class=bottom style='padding: 5px' width=50% align=center>";
        }
        print "<table class=main width=100% height=100px>";
        print "<tr valign=top><td width=100 align=center style='padding: 0px'>" . ($avatar ? "<div style='width:100px;height:100px;overflow: hidden'><img width=\"100\" src=\"{$avatar}\" /></div>" : "") . "</td><td>\n";
        print "<table class=main>";
        print "<tr><td class=embedded style='padding: 5px' width=80%>{$body1}</td>\n";
        print "<td class=embedded style='padding: 5px' width=20%>{$body2}</td></tr>\n";
Ejemplo n.º 2
0
        }
        $cat = "<a href=\"browse.php?cat={$a['catid']}\"><img src=\"pic/cats/{$a['catimage']}\" alt=\"{$a['catname']}\" border=\"0\" /></a>";
        $completed .= "<tr><td style=\"padding: 0px\">{$cat}</td><td><nobr><a href=\"details.php?id=" . $a["id"] . "&amp;hit=1\"><b>" . $a["name"] . "</b></a></nobr></td>" . "<td align=\"right\">{$a['seeders']}</td><td align=\"right\">{$a['leechers']}</td><td align=\"right\">{$uploaded}</td><td align=\"right\">{$downloaded}</td><td align=\"center\">{$ratio}</td><td align=\"center\"><nobr>{$a['startdat']}<br />{$a['completedat']}</nobr></td><td align=\"center\"><nobr>{$a['last_action']}</nobr></td><td align=\"center\">{$seeder}</td>\n";
    }
    $completed .= "</table>";
}
if ($user[added] == "0000-00-00 00:00:00") {
    $joindate = 'N/A';
} else {
    $joindate = "{$user['added']} (" . get_et(sql_timestamp_to_unix_timestamp($user["added"])) . " " . $tracker_lang['ago'] . ")";
}
$lastseen = $user["last_access"];
if ($lastseen == "0000-00-00 00:00:00") {
    $lastseen = $tracker_lang['never'];
} else {
    $lastseen .= " (" . get_et(sql_timestamp_to_unix_timestamp($lastseen)) . " " . $tracker_lang['ago'] . ")";
}
$res = sql_query("SELECT COUNT(*) FROM comments WHERE user = "******"<img src=pic/starbig.gif>";
$res = sql_query("SELECT name, flagpic FROM countries WHERE id = {$user['country']} LIMIT 1") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 1) {
    $arr = mysql_fetch_assoc($res);
    $country = "<td class=\"embedded\"><img src=\"pic/flag/{$arr['flagpic']}\" alt=\"{$arr['name']}\" style=\"margin-left: 8pt\"></td>";
}
//if ($user["donor"] == "yes") $donor = "<td class=embedded><img src=pic/starbig.gif alt='Donor' style='margin-left: 4pt'></td>";
//if ($user["warned"] == "yes") $warned = "<td class=embedded><img src=pic/warnedbig.gif alt='Warned' style='margin-left: 4pt'></td>";
if ($user["gender"] == "1") {
    $gender = "<img src=\"" . $pic_base_url . "/male.gif\" alt=\"Парень\" title=\"Парень\">";
Ejemplo n.º 3
0
} else {
    header("Content-Type: text/html; charset=" . $tracker_lang['language_charset']);
    $announces_a = $announces_urls = array();
    $announces_r = sql_query('SELECT url, seeders, leechers, last_update, state, error FROM torrents_scrape WHERE tid = ' . $tid);
    while ($announce = mysql_fetch_array($announces_r)) {
        $announces_a[] = $announce;
        $announces_urls[] = $announce['url'];
    }
    unset($announce);
    $row = mysql_fetch_array(sql_query('SELECT last_mt_update FROM torrents WHERE id = ' . $tid));
    if (count($announces_a)) {
        foreach ($announces_a as $announce) {
            if ($announce['state'] == 'ok') {
                $anns[] = '<li><b>' . $announce['url'] . '</b> - раздающие: <b>' . $announce['seeders'] . '</b>, качающие: <b>' . $announce['leechers'] . '</b>';
            } else {
                $anns[] = '<li><font color="red"><b>' . $announce['url'] . '</b></font> - не работает, ошибка: ' . $announce['error'] . '</b>';
            }
        }
        if (strtotime($row['last_mt_update']) < TIMENOW - 3600 && $CURUSER) {
            $update_link = '<br />Данные могли устареть. <a href="update_multi.php?id=' . $tid . '" onclick="update_multi(); return false;">' . $tracker_lang['details_update_multitracker'] . '</a>';
        }
        if ($row['last_mt_update'] == '0000-00-00 00:00:00') {
            $update_link .= '<br />' . $tracker_lang['details_update_last_mt_update'] . ' <b>' . $tracker_lang['never'] . '</b>';
        } else {
            $update_link .= '<br />' . $tracker_lang['details_update_last_mt_update'] . ' <b>' . get_et(strtotime($row['last_mt_update'])) . '</b> ' . $tracker_lang['ago'];
        }
        echo '<ul style="margin: 0;">' . implode($anns) . '</ul>' . $update_link;
    } else {
        echo 'WTF? Multitracker = YES, but no announces';
    }
}