Пример #1
1
    begin_table();
    $res = SQL_Query_exec("SELECT COUNT(*), COUNT(`unread` = 'yes') FROM messages WHERE `receiver` = {$CURUSER['id']} AND `location` IN ('in','both')");
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND `location` IN ('in','both')");
    $inbox = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `receiver` = " . $CURUSER["id"] . " AND `location` IN ('in','both') AND `unread` = 'yes'");
    $unread = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` IN ('out','both')");
    $outbox = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` = 'draft'");
    $draft = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` = 'template'");
    $template = mysql_result($res, 0);
    tr2('<a href="mailbox.php?inbox">' . T_("INBOX") . ' </a> ', " {$inbox} " . P_("message", $inbox) . " ({$unread} " . T_("unread") . ")");
    tr2('<a href="mailbox.php?outbox">' . T_("OUTBOX") . ' </a> ', " {$outbox} " . P_("message", $outbox));
    tr2('<a href="mailbox.php?draft">' . T_("DRAFT") . ' </a> ', " {$draft} " . P_("message", $draft));
    tr2('<a href="mailbox.php?templates">' . T_("TEMPLATES") . ' </a> ', " {$template} " . P_("message", $template));
    end_table();
    echo "<br /><br />";
} elseif ($type == "Mail") {
    $order = order("added,sender,sendto,subject", "added", true);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE {$where}");
    $count = mysql_result($res, 0);
    list($pagertop, $pagerbottom, $limit) = pager2(20, $count);
    print $pagertop;
    begin_form();
    begin_table(0, "list");
    $table['&nbsp;'] = th("<input type=\"checkbox\" onclick=\"toggleChecked(this.checked);this.form.remove.disabled=true;\" />", 1);
    $table['Sender'] = th_left("Sender", 'sender');
    $table['Sent_to'] = th_left("Sent To", 'receiver');
    $table['Subject'] = th_left("Subject", 'subject');
    $table['Date'] = th_left("Date", 'added');
</a></li>

                    <?php 
    }
    //check for new pm's
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')");
    $arr = mysql_fetch_row($res);
    $unreadmail = $arr[0];
    if ($unreadmail) {
        ?>

                        <li><a href='mailbox.php?inbox'><strong><span class="label label-warning"><?php 
        echo $unreadmail;
        ?>
</span> <?php 
        echo P_("NEWPM", $unreadmail);
        ?>
</strong></a></li>

                         <?php 
    } else {
        ?>

                        <li><a href='mailbox.php'><?php 
        echo T_("YOUR_MESSAGES");
        ?>
</a></li>

                         <?php 
    }
    //end check for pm's
Пример #3
0
<?php

if (($site_config["INVITEONLY"] || $site_config["ENABLEINVITES"]) && $CURUSER) {
    $invites = $CURUSER["invites"];
    begin_block(T_("INVITES"));
    ?>
	<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
        <td align="center">
        <?php 
    printf(P_("YOU_HAVE_INVITES", $invites), $invites);
    ?>
        </td>
    </tr>
	<?php 
    if ($invites > 0) {
        ?>
	<tr>
        <td align="center">
        <a href="invite.php"><?php 
        echo T_("SEND_AN_INVITE");
        ?>
</a>
        </td>
    </tr>
	<?php 
    }
    ?>
	</table>
	<?php 
    end_block();
Пример #4
0
         case 7:
             $color = "#FF0000";
             // you and most trusted
             break;
     }
     print "<a href=\"../user/?id=" . $user["id"] . "\"><font style=\" color: " . $color . "\">" . class_user($user["username"]) . "</font></a>, ";
 }
 echo "<br /><b>" . T_("TORRENTS") . "</b>";
 echo "<br /><small>" . T_("TRACKING") . ":<small><b> {$ntor} " . P_("TORRENT", $ntor) . "</b></small>";
 echo "<br /><small>" . T_("NEW_TODAY") . ":<small><b> " . $todaytor . "</b></small>";
 echo "<br />" . T_("SEEDERS") . ":<b> " . number_format($seeders) . "</b><br />" . T_("LEECHERS") . ":<b> " . number_format($leechers) . "</b>";
 echo "<br /><small>" . T_("PEERS") . ":<b> " . number_format($localpeers) . "</b></small>";
 echo "<br /><small>" . T_("DOWNLOADED") . ":<b> " . mksize($totaldownloaded) . "</b></small>";
 echo "<br /><small>" . T_("UPLOADED") . ":<b> " . mksize($totaluploaded) . "</b></small>";
 echo "<br /><b>Total Members</b>";
 echo "<b> {$registered} " . P_("MEMBER", $registered) . "</b>";
 print "<center><font color='red' size='2'><b>Administrator</b></font> | <font color='#00FF00' size='2'><b>Super Moderator</b></font>  | <font color='#009900' size='2'><b>Moderator</b></font> | <font color='#0000FF' size='2'><b>Uploader</b></font> | <font color='#990099' size='2'><b>V.I.P</b></font> | <font color='#FF7519' size='2'><b>Power User</b></font> | <font color='#00FFFF' size='2'><b>User</b></font></center>, ";
 end_frame();
 begin_frame("{$members2} Users Online Last 24 Hours");
 $resew = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) <= 86400 ORDER BY username");
 while ($arr = mysql_fetch_assoc($resew)) {
     if ($todayactive) {
         $todayactive .= ", ";
     }
     switch ($arr["class"]) {
         case 7:
             $arr["username"] = "******" . class_user($arr['username']) . "</font>";
             break;
         case 6:
             $arr["username"] = "******" . class_user($arr['username']) . "</font>";
             break;
        <div class='infobar'>
          <?php 
if (!$CURUSER) {
    echo "[<a href=\"account-login.php\">" . T_("LOGIN") . "</a>]<b> " . T_("OR") . " </b>[<a href=\"account-signup.php\">" . T_("SIGNUP") . "</a>]";
} else {
    print T_("LOGGED_IN_AS") . ": " . $CURUSER["username"] . "";
    echo " [<a href=\"account-logout.php\">" . T_("LOGOUT") . "</a>] ";
    if ($CURUSER["control_panel"] == "yes") {
        print "[<a href='admincp.php'>" . T_("STAFFCP") . "</a>] ";
    }
    //check for new pm's
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')");
    $arr = mysql_fetch_row($res);
    $unreadmail = $arr[0];
    if ($unreadmail) {
        print "[<a href='mailbox.php?inbox'><b><font color='#ff0000'>{$unreadmail}</font> " . P_("NEWPM", $unreadmail) . "</b></a>]";
    } else {
        print "[<a href='mailbox.php'>" . T_("YOUR_MESSAGES") . "</a>] ";
    }
    //end check for pm's
}
?>
        </div>
        <!-- End Infobar -->
      </div>
      <!-- END HEADER -->
      <!-- START NAVIGATION -->
      <div class='navigation'>
        <div class='menu'>
          <ul id='nav-one' class='dropmenu'>
            <li><a href="index.php"><?php 
Пример #6
0
                    $user['last_access'] = '---';
                }
                if ($user['ip']) {
                    $ipstr = $user['ip'];
                } else {
                    $ipstr = "---";
                }
                $pul = $user['uploaded'];
                $pdl = $user['downloaded'];
                $auxres = SQL_Query_exec("SELECT COUNT(DISTINCT p.id) FROM forum_posts AS p LEFT JOIN forum_topics as t ON p.topicid = t.id\n\t\t\tLEFT JOIN forum_forums AS f ON t.forumid = f.id WHERE p.userid = " . $user['id'] . " AND f.minclassread <= " . $CURUSER['class']);
                $n = mysql_fetch_row($auxres);
                $n_posts = $n[0];
                $auxres = SQL_Query_exec("SELECT COUNT(id) FROM comments WHERE user = "******"<tr><td class='table_col1' align='center'><b><a href='account-details.php?id={$user['id']}'>{$user['username']}</a></b></td>" . "<td class='table_col2' align='center'>" . $ipstr . "</td><td class='table_col1' align='center'>" . $user['email'] . "</td>" . "<td class='table_col2' align='center'>" . utc_to_tz($user['added']) . "</td>" . "<td class='table_col1' align='center'>" . $user['last_access'] . "</td>" . "<td class='table_col2' align='center'>" . $user['status'] . "</td>" . "<td class='table_col1' align='center'>" . $user['enabled'] . "</td>" . "<td class='table_col2' align='center'>" . ratios($pul, $pdl) . "</td>" . "<td class='table_col1' align='center'>" . mksize($user['uploaded']) . "</td>" . "<td class='table_col2' align='center'>" . mksize($user['downloaded']) . "</td>" . "<td class='table_col1' align='center'>{$n_posts} " . P_("POST", $n_posts) . "<br />{$n_comments} " . P_("COMMENT", $n_comments) . "</td>" . "<td class='table_col2' align='center'>" . ($user["enabled"] == "yes" && $user["warned"] == "no" ? "--" : ($user["enabled"] == "no" ? "<img src=\"images/disable.png\" title=\"" . T_("DISABLED") . "\" alt=\"Disabled\" />" : "") . ($user["warned"] == "yes" ? "<img src=\"images/warned.png\" title=\"" . T_("WARNED") . "\" alt=\"Warned\" />" : "")) . "</td>" . "<td class='table_col1' align='center'><input type='checkbox' name=\"warndisable[]\" value='" . $user['id'] . "' /><input type='hidden' name=\"referer\" value=\"{$_SERVER['REQUEST_URI']}\" /></td></tr>\n";
            }
            echo "</table>\n            <br />\n\t\t\t<table border='0' align='center' cellspacing='0' cellpadding='0'>\n\t\t\t<tr><td colspan='2'></td></tr>\n\t\t\t<tr><td align='right'><img src=\"images/disable.png\" alt=\"Disabled\" /> <input type='submit' name='disable' value=\"Disable Selected Accounts\" /></td><td style=\"border: none; padding: 2px;\" align='left'><input type='submit' name='enable' value=\"Enable Selected Accounts\" /> <img src=\"images/disable.png\" alt=\"Disabled\" /> <img src=\"images/check.gif\" alt=\"Ok\" /></td></tr>\n\t\t\t<tr><td colspan='2'><br /><br /></td></tr>\n\t\t\t<tr><td align='center'><img src=\"images/warned.png\" alt=\"Warned\" /> <input type='submit' name='warn' value=\"Warn Selected\" /></td><td align='left'><input type='submit' name='unwarn' value=\"Remove Warning Selected\" /> <img src=\"images/warned.png\" alt=\"Warned\" /> <img src=\"images/check.gif\" alt=\"Ok\" /></td></tr>\n\t\t\t<tr><td align='center' colspan='2'>Mod Comment (reason):<input type='text' size='30' name='warnpm' /></td></tr>\n\t\t\t</table></form>\n";
            if ($count > $perpage) {
                echo $pagerbottom;
            }
        }
    }
    end_frame();
    stdfoot();
}
// End Advanced User Search
// Forum management
if ($action == "forum") {
    $error_ac == "";
    if ($_POST["do"] == "add_this_forum") {
if ($CURUSER["edit_users"] == "no") {
    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");
    ?>
: <strong><?php 
    echo $ntor;
    ?>
 <?php 
    echo P_("TORRENT", $ntor);
    ?>
</strong></li>
	<li><i class="fa fa-calendar-o"></i> <?php 
    echo T_("NEW_TODAY");
    ?>
: <strong><?php 
    echo $todaytor;
    ?>
</strong></li>
</ul>

<?php 
    end_block();
}
    echo "<div align='left'>";
    echo "<b>" . T_("TORRENTS") . "</b>";
    echo "<br /><small>" . T_("TRACKING") . ":<b> {$ntor} " . P_("TORRENT", $ntor) . "</b></small>";
    echo "<br /><small>" . T_("NEW_TODAY") . ":<b> " . $todaytor . "</b></small>";
    echo "<br /><small>" . T_("SEEDERS") . ":<b> " . number_format($seeders) . "</b></small>";
    echo "<br /><small>" . T_("LEECHERS") . ":<b> " . number_format($leechers) . "</b></small>";
    echo "<br /><small>" . T_("PEERS") . ":<b> " . number_format($localpeers) . "</b></small>";
    echo "<br /><small>" . T_("DOWNLOADED") . ":<b> " . mksize($totaldownloaded) . "</b></small>";
    echo "<br /><small>" . T_("UPLOADED") . ":<b> " . mksize($totaluploaded) . "</b></small>";
    echo "<br /><br /><b>" . T_("MEMBERS") . "</b>";
    echo "<br /><small>" . T_("WE_HAVE") . ":<b> {$registered} " . P_("MEMBER", $registered) . "</b></small>";
    echo "<br /><small>" . T_("NEW_TODAY") . ":<b> " . $regtoday . "</b></small>";
    echo "<br /><small>" . T_("VISITORS_TODAY") . ": <b>" . $totaltoday . "</b></small>";
    echo "<br /><br /><b>" . T_("ONLINE") . "</b>";
    echo "<br /><small>" . T_("TOTAL_ONLINE") . ":<b> " . $totalonline . "</b></small>";
    echo "<br /><small>" . T_("MEMBERS") . ":<b> " . $members . "</b></small>";
    echo "<br /><small>" . T_("GUESTS_ONLINE") . ":<b> " . $guests . "</b></small>";
    echo "<br /><small>" . T_("COMMENTS_POSTED") . ":<b> " . $ncomments . "</b></small>";
    echo "<br /><small>" . T_("MESSAGES_SENT") . ":<b> " . $nmessages . "</b></small>";
    echo "<br /><br /></div>";
    end_block();
}
if ($CURUSER["edit_users"] == "no") {
    begin_block(T_("STATS"));
    echo "<div align='left'>";
    echo "<b>" . T_("TORRENTS") . "</b>";
    echo "<br /><small>" . T_("TRACKING") . ":<b> {$ntor} " . P_("TORRENT", $ntor) . "</b></small>";
    echo "<br /><small>" . T_("NEW_TODAY") . ":<b> " . $todaytor . "</b></small>";
    echo "<br /><br /></div>";
    end_block();
}