Example #1
0
                echo safechar($arr['description']);
                ?>
</font>
				</td>
                <td>
					<a href="/userdetails.php?id=<?php 
                echo (int) $arr['added_by'];
                ?>
"><?php 
                echo $arr['username'];
                ?>
</a>
                </td>
                <td nowrap="nowrap">
                	<?php 
                echo function_exists('display_date_time') ? display_date_time(get_date_time($arr['added'])) : get_date_time($arr['added']);
                ?>
<br /><font class="small"><?php 
                echo get_elapsed_time($arr['added']);
                ?>
 ago</font>
                </td>
                <?php 
                if ($staff_classes[$CURUSER['class']]['edit'] || $staff_classes[$CURUSER['class']]['delete']) {
                    ?>
					<td nowrap="nowrap">
                    	<?php 
                    if ($staff_classes[$CURUSER['class']]['edit']) {
                        ?>
<b>[</b><a href="<?php 
                        echo $_SERVER['PHP_SELF'];
Example #2
0
         $ipcount = $arrip[0];

         $nip = ip2long($ip);
         $banres = mysql_query("SELECT COUNT(*) FROM bans WHERE $nip >= first AND $nip <= last") or 
sqlerr(__FILE__, __LINE__);
         $banarr = mysql_fetch_row($banres);
         if ($banarr[0] == 0)
            if ($ipcount > 1)
                 $ipshow = "<b><a href=ipsearch.php?ip=". $arr['ip'] .">" . $arr['ip'] ."</a></b>";
            else
                 $ipshow = "<a href=ipsearch.php?ip=". $arr['ip'] .">" . $arr['ip'] ."</a>";
         else
            $ipshow = "<a href='/testip.php?ip=" . $arr['ip'] . "'><font color='#FF0000'><b>" . $arr['ip'] . 
"</b></font></a>";
     }
     $date = display_date_time(sql_timestamp_to_unix_timestamp($arr["access"]) , $CURUSER[tzoffset] );
     print("<tr><td>$date</td>\n");
     print("<td>$ipshow</td>\n");
     print("<td>$addr</td>\n");
}

end_table();

if ($countrows > $perpage)
   echo $pagerbottom;

end_frame();


end_main_frame();
stdfoot();
Example #3
0
    }
    $message = '<h1>Success! <b>' . $arr_name['username'] . '</b> deleted from your shit list!</h1>';
}
// === default page
stdhead("Shit list for " . $CURUSER['username']);
echo $message . '<br><table width=750 border=0 cellspacing=0 cellpadding=0><tr><td class=colhead align=center valigh=top><h1>Shit List for ' . $CURUSER['username'] . '</h1>' . '<img src=pic/smilies/shit.gif alt=shit> shittiest at the top <img src=pic/smilies/shit.gif alt=shit></td></tr>' . '<tr><td class=embedded><table width=750 border=1 cellspacing=0 cellpadding=5><tr><td>';
$i = 0;
$res = mysql_query("SELECT s.suspect as id, s.text, s.shittyness, s.added AS shit_list_added, u.username AS name, u.added, u.class, u.avatar, u.donor, u.warned, u.enabled, u.last_access FROM shit_list AS s LEFT JOIN users as u ON s.suspect = u.id WHERE userid={$CURUSER['id']} ORDER BY shittyness DESC") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
    $shit_list = '<p align=center>Your shit list is empty.</p>';
} else {
    while ($shit_list = mysql_fetch_array($res)) {
        $class_name = get_user_class_name($shit_list['class']);
        $poop = 1;
        while ($poop <= $shit_list['shittyness']) {
            $shit .= ' <img src=pic/smilies/shit.gif title="' . $shit_list['shittyness'] . ' out of 10 on the sittyness scale">';
            $poop++;
        }
        $main = '<a class=altlink href=userdetails.php?id=' . $shit_list['id'] . '><b>' . $shit_list['name'] . '</b></a>' . get_user_icons($shit_list) . '<b> [ ' . $class_name . ' ]</b> ' . $shit . '<br><b>joined:</b> ' . $shit_list['added'] . ' [ ' . get_elapsed_time(sql_timestamp_to_unix_timestamp($shit_list['added'])) . ' ago ]' . '<br><b>added to shit list:</b> ' . $shit_list['shit_list_added'] . ' [ ' . get_elapsed_time(sql_timestamp_to_unix_timestamp($shit_list['shit_list_added'])) . ' ago ]<br>' . '<b>last seen:</b> ' . display_date_time($shit_list['last_access']) . ' [ ' . get_elapsed_time(sql_timestamp_to_unix_timestamp($shit_list['last_access'])) . ' ago ]<hr>' . format_comment($shit_list['text']);
        $buttons = '<br><a class=altlink href=?action=delete&shit_list_id=' . $shit_list['id'] . '>remove</a>' . '<br><br><a class=altlink href=sendmessage.php?receiver=' . $shit_list['id'] . '>PM</a>';
        $avatar = !$shit_list['avatar'] ? 'pic/default_avatar.gif' : safechar($shit_list['avatar']);
        $avatar = $CURUSER['avatars'] == 'yes' ? $avatar : '';
        echo $i % 2 == 0 ? '<table width=100% hight=100%><tr><td width=50% align=center>' : '<td width=50% align=center hight=100%>';
        echo '<table width=100% hight=100%><tr valign=top><td width=80 align=center valign=top>' . ($avatar ? '<img width=80px src=' . $avatar . '>' : '') . '</td><td><table width=420 hight=100%><tr><td class=embedded>' . $main . '</td>' . '<td class=embedded valign=top align=center>' . $buttons . '</td></tr></table></td></tr></td></tr></table>';
        echo $i % 2 == 1 ? '</td></tr></table>' : '</td>';
        $shit = '';
        $i++;
    }
}
echo ($i % 2 == 1 ? '<td width=50%>&nbsp;</td></tr></table>' : '') . $shit_list . '</td></tr></table>' . '</td></tr></table><p align=center><a class=altlink href=users.php><b>Find User/Browse User List</b></a></p>';
stdfoot();
function commenttable($rows)
{
    global $CURUSER, $HTTP_SERVER_VARS;
    // === get smilie based on ratio
    begin_main_frame();
    begin_frame();
    $count = 0;
    foreach ($rows as $row) {
        $querie = sql_query("SELECT anonymous FROM comments WHERE id =" . unsafeChar($row['id']) . "");
        $arraya = mysql_fetch_assoc($querie);
        echo "<p class=sub>#" . safeChar($row["id"]) . " by ";
        $title = !empty($row["title"]) ? $row["title"] : get_user_class_name($row["class"]);
        if ($arraya['anonymous'] == 'no' && isset($row["username"])) {
            $username = $row["username"];
            $ratres = sql_query("SELECT uploaded, downloaded from users where username='******'");
            $rat = mysql_fetch_array($ratres);
            if ($rat["downloaded"] > 0) {
                $ratio = $rat['uploaded'] / $rat['downloaded'];
                $ratio = number_format($ratio, 3);
                $color = get_ratio_color($ratio);
                if ($color) {
                    $ratio = "<font color={$color}>" . safeChar($ratio) . " " . get_user_ratio_image($ratio) . "</font>";
                }
            } else {
                if ($rat["uploaded"] > 0) {
                    $ratio = "Inf.";
                } else {
                    $ratio = "---";
                }
            }
            echo "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . safeChar($row["user"]) . "><b>" . safeChar($row["username"]) . "</b></a> " . $title . " " . ($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "/pic/warned.gif alt=\"Warned\">" : "") . " Ratio: {$ratio}\n";
        } else {
            if (!isset($row["username"])) {
                echo "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n";
            } else {
                if ($arraya['anonymous'] == 'yes') {
                    echo "<a name=\"comm" . $row["id"] . "\"><font color=blue><b>Anonymous</b></font></a>\n";
                }
            }
        }
        echo " at " . display_date_time($row["added"]) . " GMT" . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=comment.php?action=edit&amp;cid={$row['id']}>" . 'Edit' . "</a>] " : "") . (get_user_class() >= UC_VIP ? " - [<a href=report.php?type=Comment&id={$row['id']}>Report this Comment</a>]" : "") . (get_user_class() >= UC_MODERATOR ? "- [<a href=comment.php?action=delete&amp;cid={$row['id']}>" . 'Delete' . "</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? " - [<a href=comment.php?action=vieworiginal&amp;cid={$row['id']}>" . 'View_original' . "</a>]" : "") . "</p>\n";
        $resa = sql_query("SELECT owner, anonymous FROM torrents WHERE owner = {$row['user']}");
        $array = mysql_fetch_assoc($resa);
        if ($row['anonymous'] == 'yes' && $row['user'] == $array['owner']) {
            $avatar = "/pic/default_avatar.gif";
        } else {
            $avatar = $CURUSER["avatars"] == "yes" ? safeChar($row["avatar"]) : "";
        }
        if (!$avatar) {
            $avatar = "/pic/default_avatar.gif";
        }
        begin_table(true);
        echo "<tr valign=top>\n";
        echo "<td align=center width=100 style='padding: 0px'><img width=100 src={$avatar}><br />" . get_reputation($row, 'comments') . "</td>\n";
        echo "<td class=text>" . format_comment($row["text"]) . "</td>\n";
        echo "</tr>\n";
        end_table();
    }
    end_frame();
    end_main_frame();
}
Example #5
0
     $reply = "";
     $from = "Кому";
 } else {
     $from = "От кого";
     if ($message['sender'] == 0) {
         $sender = "Системное";
         $reply = "";
     } else {
         $res2 = sql_query("SELECT username FROM users WHERE id=" . sqlesc($message['sender'])) or sqlerr(__FILE__, __LINE__);
         $sender = mysql_fetch_array($res2);
         $sender = "<A href=\"userdetails.php?id=" . $message['sender'] . "\">" . $sender[0] . "</A>";
         $reply = " [ <A href=\"message.php?action=sendmessage&amp;receiver=" . $message['sender'] . "&amp;replyto=" . $pm_id . "\">Ответить</A> ]";
     }
 }
 $body = format_comment($message['msg']);
 $added = display_date_time(strtotime($message['added']), $CURUSER['tzoffset']);
 if (get_user_class() >= UC_MODERATOR && $message['sender'] == $CURUSER['id']) {
     $unread = $message['unread'] == 'yes' ? "<SPAN style=\"color: #FF0000;\"><b>(Новое)</b></A>" : "";
 } else {
     $unread = "";
 }
 $subject = htmlspecialchars_uni($message['subject']);
 if (strlen($subject) <= 0) {
     $subject = "Без темы";
 }
 // Mark message unread
 sql_query("UPDATE messages SET unread='no' WHERE id=" . sqlesc($pm_id) . " AND receiver=" . sqlesc($CURUSER['id']) . " LIMIT 1");
 // Display message
 stdhead("Личное Сообщение (Тема: {$subject})");
 ?>
     <TABLE width="660" border="0" cellpadding="4" cellspacing="0">