Empty commit

This commit is contained in:
Git 2013-10-25 08:00:59 +00:00
parent 6557395078
commit dc486b7509
26 changed files with 140 additions and 81 deletions

View File

@ -52,8 +52,8 @@ private static function render_events_day($Day, $Events) {
}
public static function render_calendar($Month, $Year, $Events) {
$RunningDay = date('w',mktime(0, 0, 0, $Month, 1, $Year));
$DaysInMonth = date('t',mktime(0 ,0 ,0, $Month, 1, $Year));
$RunningDay = date('w', mktime(0, 0, 0, $Month, 1, $Year));
$DaysInMonth = date('t', mktime(0 ,0 ,0, $Month, 1, $Year));
$DaysThisWeek = 1;
$DayCounter = 0;
$DatesArray = array();

View File

@ -553,7 +553,7 @@ public static function torrent_label ($text, $class = '') {
if (empty($class)) {
$class = self::find_torrent_label_class($text);
}
return sprintf('<strong class="torrent_label %1$s" title="%2$s">%2$s</strong>',
return sprintf('<strong class="torrent_label %1$s" title="%2$s" style="white-space: nowrap;">%2$s</strong>',
display_str($class), display_str($text));
}

View File

@ -56,6 +56,8 @@ class UserAgent {
// 'tablet PC' => 'Windows RT',
// 'ARM; Trident' => 'Windows RT',
//Windows
'Windows NT 6.3' => 'Windows 8.1',
'Windows 8.1' => 'Windows 8.1',
'Windows NT 6.2' => 'Windows 8',
'Windows 8' => 'Windows 8',
'Windows NT 6.1' => 'Windows 7',

View File

@ -791,7 +791,7 @@ function compare($X, $Y) {
</tr>
<?
$Tags = Requests::get_tags(array_keys($Requests));
$Row = 0;
$Row = 'b';
foreach ($Requests as $RequestID => $Request) {
$CategoryName = $Categories[$Request['CategoryID'] - 1];
$Title = display_str($Request['Title']);
@ -815,7 +815,7 @@ function compare($X, $Y) {
$ReqTagList = '';
}
?>
<tr class="row<?=($Row++ & 1 ? 'a' : 'b')?>">
<tr class="row<?=($Row === 'b' ? 'a' : 'b')?>">
<td>
<?=$FullName?>
<div class="tags"><?=$ReqTagList?></div>

View File

@ -274,6 +274,7 @@
<? } ?>
<a href="collages.php?userid=<?=$LoggedUser['ID']?>" class="brackets">Collages you started</a>
<a href="collages.php?userid=<?=$LoggedUser['ID']?>&amp;contrib=1" class="brackets">Collages you contributed to</a>
<br /><br />
<? } else { ?>
<a href="bookmarks.php?type=torrents" class="brackets">Torrents</a>
<a href="bookmarks.php?type=artists" class="brackets">Artists</a>
@ -332,7 +333,7 @@
</td>
<td class="number_column"><?=number_format((int)$NumTorrents)?></td>
<td class="number_column"><?=number_format((int)$Subscribers)?></td>
<td><?=time_diff($Updated)?></td>
<td class="nobr"><?=time_diff($Updated)?></td>
<td><?=Users::format_username($UserID, false, false, false)?></td>
</tr>
<?

View File

@ -551,12 +551,12 @@
$Notes = G::$DB->to_array();
?>
<br />
<h3 id="thread_notes">Thread notes</h3>
<h3 id="thread_notes">Thread notes</h3> <a href="#" onclick="$('#thread_notes_table').gtoggle(); return false;" class="brackets">Toggle</a>
<form action="forums.php" method="post">
<input type="hidden" name="action" value="take_topic_notes" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="topicid" value="<?=$ThreadID?>" />
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border">
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border hidden" id="thread_notes_table">
<?
foreach ($Notes as $Note) {
?>
@ -566,7 +566,7 @@
?>
<tr>
<td colspan="2" class="center">
<div class="field_div textarea_wrap"><textarea id="topic_notes" name="body" cols="90" rows="3" onkeyup="resize('threadnotes')" style=" margin: 0px; width: 735px;"></textarea></div>
<div class="field_div textarea_wrap"><textarea id="topic_notes" name="body" cols="90" rows="3" onkeyup="resize('threadnotes');" style=" margin: 0px; width: 735px;"></textarea></div>
<input type="submit" value="Save" />
</td>
</tr>

View File

@ -17,12 +17,12 @@
View::show_header('Inbox');
?>
<div class="thin">
<h2><?=(($Section == 'sentbox') ? 'Sentbox' : 'Inbox')?></h2>
<h2><?=($Section === 'sentbox' ? 'Sentbox' : 'Inbox')?></h2>
<div class="linkbox">
<?
if ($Section == 'inbox') { ?>
if ($Section === 'inbox') { ?>
<a href="<?=Inbox::get_inbox_link('sentbox'); ?>" class="brackets">Sentbox</a>
<? } elseif ($Section == 'sentbox') { ?>
<? } elseif ($Section === 'sentbox') { ?>
<a href="<?=Inbox::get_inbox_link(); ?>" class="brackets">Inbox</a>
<? }
@ -30,7 +30,7 @@
<br /><br />
<?
$Sort = (empty($_GET['sort']) || $_GET['sort'] != 'unread' ? 'Date DESC' : "cu.Unread = '1' DESC, DATE DESC");
$Sort = empty($_GET['sort']) || $_GET['sort'] != 'unread' ? 'Date DESC' : "cu.Unread = '1' DESC, DATE DESC";
$sql = "
SELECT
@ -41,7 +41,7 @@
cu.Sticky,
cu.ForwardedTo,
cu2.UserID,";
$sql .= (($Section == 'sentbox') ? ' cu.SentDate ' : ' cu.ReceivedDate ');
$sql .= $Section === 'sentbox' ? ' cu.SentDate ' : ' cu.ReceivedDate ';
$sql .= "AS Date
FROM pm_conversations AS c
LEFT JOIN pm_conversations_users AS cu ON cu.ConvID = c.ID AND cu.UserID = '$UserID'
@ -64,7 +64,7 @@
$sql .= "m.Body LIKE '%".implode("%' AND m.Body LIKE '%", $Words)."%' AND ";
}
}
$sql .= (($Section == 'sentbox') ? ' cu.InSentbox' : ' cu.InInbox');
$sql .= $Section === 'sentbox' ? ' cu.InSentbox' : ' cu.InInbox';
$sql .= " = '1'";
$sql .= "
@ -84,9 +84,9 @@
<div class="box pad">
<? if ($Count == 0 && empty($_GET['search'])) { ?>
<h2>Your <?=(($Section == 'sentbox') ? 'sentbox' : 'inbox')?> is empty.</h2>
<h2>Your <?=($Section === 'sentbox' ? 'sentbox' : 'inbox')?> is empty.</h2>
<? } else { ?>
<form class="search_form" name="<?=(($Section == 'sentbox') ? 'sentbox' : 'inbox')?>" action="inbox.php" method="get" id="searchbox">
<form class="search_form" name="<?=($Section === 'sentbox' ? 'sentbox' : 'inbox')?>" action="inbox.php" method="get" id="searchbox">
<div>
<input type="hidden" name="action" value="<?=$Section?>" />
<input type="radio" name="searchtype" value="user"<?=(empty($_GET['searchtype']) || $_GET['searchtype'] == 'user' ? ' checked="checked"' : '')?> /> User
@ -104,9 +104,9 @@
<? } ?>
</span>
<br />
<input type="text" name="search" value="<?=(!empty($_GET['search']) ? display_str($_GET['search']) : 'Search '.($Section == 'sentbox' ? 'Sentbox' : 'Inbox'))?>" style="width: 98%;"
onfocus="if (this.value == 'Search <?=(($Section == 'sentbox') ? 'Sentbox' : 'Inbox')?>') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Search <?=(($Section == 'sentbox') ? 'Sentbox' : 'Inbox')?>'; }"
<input type="text" name="search" value="<?=(!empty($_GET['search']) ? display_str($_GET['search']) : 'Search '.($Section === 'sentbox' ? 'Sentbox' : 'Inbox'))?>" style="width: 98%;"
onfocus="if (this.value == 'Search <?=($Section === 'sentbox' ? 'Sentbox' : 'Inbox')?>') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Search <?=($Section === 'sentbox' ? 'Sentbox' : 'Inbox')?>'; }"
/>
</div>
</form>
@ -121,7 +121,7 @@
<tr class="colhead">
<td width="10"><input type="checkbox" onclick="toggleChecks('messageform', this);" /></td>
<td width="50%">Subject</td>
<td><?=(($Section == 'sentbox') ? 'Receiver' : 'Sender')?></td>
<td><?=($Section === 'sentbox' ? 'Receiver' : 'Sender')?></td>
<td>Date</td>
<? if (check_perms('users_mod')) { ?>
<td>Forwarded to</td>
@ -138,8 +138,8 @@
if ($Unread === '1') {
$RowClass = 'unreadpm';
} else {
$Row = (($Row === 'a') ? 'b' : 'a');
$RowClass = 'row'.$Row;
$Row = $Row === 'a' ? 'b' : 'a';
$RowClass = "row$Row";
}
?>
<tr class="<?=$RowClass?>">

View File

@ -188,7 +188,7 @@
$Message = $Message.' '.$MessageParts[$i];
}
}
$Row = (($Row == 'a') ? 'b' : 'a');
$Row = $Row === 'a' ? 'b' : 'a';
?>
<tr class="row<?=$Row?>" id="log_<?=$ID?>">
<td class="nobr">

View File

@ -40,8 +40,13 @@
<?
foreach ($Results as $Result) {
list($Username, $Reports) = $Result;
if ($Username == $LoggedUser['Username']) {
$RowClass = ' class="rowa"';
} else {
$RowClass = '';
}
?>
<tr>
<tr<?=$RowClass?>>
<td><?=$Username?></td>
<td class="number_column"><?=number_format($Reports)?></td>
</tr>
@ -72,8 +77,13 @@
<?
foreach ($Results as $Result) {
list($Username, $Reports) = $Result;
if ($Username == $LoggedUser['Username']) {
$RowClass = ' class="rowa"';
} else {
$RowClass = '';
}
?>
<tr>
<tr<?=$RowClass?>>
<td><?=$Username?></td>
<td class="number_column"><?=number_format($Reports)?></td>
</tr>
@ -104,8 +114,13 @@
<?
foreach ($Results as $Result) {
list($Username, $Reports) = $Result;
if ($Username == $LoggedUser['Username']) {
$RowClass = ' class="rowa"';
} else {
$RowClass = '';
}
?>
<tr>
<tr<?=$RowClass?>>
<td><?=$Username?></td>
<td class="number_column"><?=number_format($Reports)?></td>
</tr>
@ -134,8 +149,13 @@
<?
foreach ($Results as $Result) {
list($Username, $Reports) = $Result;
if ($Username == $LoggedUser['Username']) {
$RowClass = ' class="rowa"';
} else {
$RowClass = '';
}
?>
<tr>
<tr<?=$RowClass?>>
<td><?=$Username?></td>
<td class="number_column"><?=number_format($Reports)?></td>
</tr>
@ -147,17 +167,17 @@
} //if (check_perms('admin_reports')) ?>
<tr>
<?
$DB->query("
SELECT u.Username,
count(LastPostAuthorID) as Trashed
FROM forums_topics as f
LEFT JOIN users_main as u on u.id = LastPostAuthorID
WHERE ForumID = 12
GROUP BY LastPostAuthorID
ORDER BY Trashed DESC
LIMIT 30");
$Results = $DB->to_array();
?>
$DB->query("
SELECT u.Username,
COUNT(LastPostAuthorID) as Trashed
FROM forums_topics as f
LEFT JOIN users_main as u on u.id = LastPostAuthorID
WHERE ForumID = 12
GROUP BY LastPostAuthorID
ORDER BY Trashed DESC
LIMIT 30");
$Results = $DB->to_array();
?>
<td class="label"><strong>Threads trashed since the beginning of time</strong></td>
<td>
<table style="width: 50%; margin-left: auto; margin-right: auto;" class="border">
@ -167,22 +187,28 @@
<td class="head colhead_dark">Trashed</td>
</tr>
<?
$i = 1;
foreach ($Results as $Result) {
list($Username, $Trashed) = $Result;
?>
<tr>
$i = 1;
foreach ($Results as $Result) {
list($Username, $Trashed) = $Result;
if ($Username == $LoggedUser['Username']) {
$RowClass = ' class="rowa"';
} else {
$RowClass = '';
}
?>
<tr<?=$RowClass?>>
<td><?=$i?></td>
<td><?=$Username?></td>
<td class="number_column"><?=number_format($Trashed)?></td>
</tr>
<?
$i++;
} ?>
</table>
</td>
</tr>
</table>
$i++;
}
?>
</table>
</td>
</tr>
</table>
</div>
<?
View::show_footer();

View File

@ -437,7 +437,7 @@ foreach ($Categories as $CatKey => $CatName) {
$FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\">$Title</a>";
}
$Row = (($Row === 'a') ? 'b' : 'a');
$Row = $Row === 'a' ? 'b' : 'a';
$Tags = Requests::get_tags($RequestID);
?>

View File

@ -27,12 +27,12 @@
foreach ($WhitelistedClients as $Client) {
//list($ClientName, $Notes) = $Client;
list($ClientName) = $Client;
$Row = ($Row == 'a') ? 'b' : 'a';
$Row = $Row === 'a' ? 'b' : 'a';
?>
<tr class="row<?=$Row?>">
<td><?=$ClientName?></td>
</tr>
<? } ?>
<? } ?>
</table>
</div>

View File

@ -14,7 +14,7 @@
*/
function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', $HiddenBy = 'Hidden by user') {
$Text = new Text;
$Row = ($Row == 'a') ? 'b' : 'a';
$Row = $Row === 'a' ? 'b' : 'a';
echo "\t\t\t<tr class=\"row$Row\">
<td class=\"nobr\">

View File

@ -46,7 +46,7 @@
<h3>Open messages</h3>
<table class="message_table checkboxes">
<tr class="colhead">
<td width="10"><input type="checkbox" onclick="toggleChecks('messageform',this)" /></td>
<td width="10"><input type="checkbox" onclick="toggleChecks('messageform', this);" /></td>
<td width="50%">Subject</td>
<td>Date</td>
<td>Assigned to</td>
@ -59,8 +59,8 @@
if ($Unread === '1') {
$RowClass = 'unreadpm';
} else {
$Row = (($Row === 'a') ? 'b' : 'a');
$RowClass = 'row'.$Row;
$Row = $Row === 'a' ? 'b' : 'a';
$RowClass = "row$Row";
}
if ($Status == 'Resolved') {

View File

@ -108,7 +108,7 @@
$Row = 'a';
foreach ($Tables as $Table) {
list($Name,$Engine,,,$Rows,$RowSize,$DataSize,,$IndexSize) = $Table;
$Row = ($Row == 'a') ? 'b' : 'a';
$Row = $Row === 'a' ? 'b' : 'a';
$TotalRows += $Rows;
$TotalDataSize += $DataSize;

View File

@ -28,13 +28,13 @@
<table class="event_form_table">
<tr>
<tr>
<td class="label">Title:</td>
<td class="label small_label">Title:</td>
<td>
<input type="text" id="title" name="title" class="required" value="<?=$Event['Title']?>" />
</td>
</tr>
<tr>
<td class="label">Category:</td>
<td class="label small_label">Category:</td>
<td>
<select id="category" name="category" class="required">
<?
@ -47,7 +47,7 @@
</td>
</tr>
<tr>
<td class="label">Importance:</td>
<td class="label small_label">Importance:</td>
<td>
<select id="importance" name="importance" class="required">
<?
@ -60,7 +60,7 @@
</td>
</tr>
<tr>
<td class="label">Team:</td>
<td class="label small_label">Team:</td>
<td>
<select id="team" name="team" class="required">
<?
@ -73,7 +73,7 @@
</td>
</tr>
<tr>
<td class="label">Start date:</td>
<td class="label small_label">Start date:</td>
<td>
<input type="date" id="start_date" name="start_date" class="required"
<? if ($Event) { ?>
@ -84,7 +84,7 @@
</td>
</tr>
<tr>
<td class="label">End date:</td>
<td class="label small_label">End date:</td>
<td>
<input type="date" id="end_date" name="end_date" class="required"
<? if ($Event) { ?>
@ -95,7 +95,7 @@
</td>
</tr>
<tr>
<td class="label">Created by:</td>
<td class="label small_label">Created by:</td>
<td>
<?=$Event ? Users::format_username($Event['AddedBy']) : Users::format_username($LoggedUser['ID'])?>
</td>

View File

@ -79,7 +79,7 @@ function class_list($Selected = 0) {
<?
$Row = 'b';
while (list($ID, $CategoryID, $Sort, $Name, $Description, $MinClassRead, $MinClassWrite, $MinClassCreate, $AutoLock, $AutoLockWeeks) = $DB->next_record()) {
$Row = ($Row === 'a' ? 'b' : 'a');
$Row = $Row === 'a' ? 'b' : 'a';
?>
<tr class="row<?=$Row?>">
<form class="manage_form" name="forums" action="" method="post">

View File

@ -5,7 +5,9 @@
if (isset($_POST['submit']) && isset($_POST['id']) && $_POST['submit'] == 'Unban' && is_number($_POST['id'])) {
authorize();
$DB->query('DELETE FROM login_attempts WHERE ID='.$_POST['id']);
$DB->query('
DELETE FROM login_attempts
WHERE ID = '.$_POST['id']);
}
View::show_header('Login Watch');
@ -41,7 +43,7 @@
<?
$Row = 'b';
while (list($ID, $IP, $UserID, $LastAttempt, $Attempts, $BannedUntil, $Bans) = $DB->next_record()) {
$Row = ($Row === 'a' ? 'b' : 'a');
$Row = $Row === 'a' ? 'b' : 'a';
?>
<tr class="row<?=$Row?>">
<td>

View File

@ -22,7 +22,7 @@
<?
$Row = 'b';
while (list($ID, $Client, $Peer_ID) = $DB->next_record()) {
$Row = ($Row === 'a' ? 'b' : 'a');
$Row = $Row === 'a' ? 'b' : 'a';
?>
<form class="manage_form" name="clients" action="" method="post">
<input type="hidden" name="action" value="whitelist_alter" />

View File

@ -19,14 +19,16 @@
i.Donor,
i.Warned,
i.JoinDate,
( SELECT COUNT(DISTINCT h.UserID)
(
SELECT COUNT(DISTINCT h.UserID)
FROM users_history_ips AS h
WHERE h.IP = m.IP
) AS Uses
FROM users_main AS m
LEFT JOIN users_info AS i ON i.UserID = m.ID
WHERE
( SELECT COUNT(DISTINCT h.UserID)
(
SELECT COUNT(DISTINCT h.UserID)
FROM users_history_ips AS h
WHERE h.IP = m.IP
) >= ".IP_OVERLAPS."
@ -54,8 +56,9 @@
<td>Registered</td>
</tr>
<?
$Row = 'b';
while (list($UserID, $IP, $Username, $PermissionID, $Enabled, $Donor, $Warned, $Joined, $Uses) = $DB->next_record()) {
$Row = ($Row == 'b') ? 'a' : 'b';
$Row = $Row === 'b' ? 'a' : 'b';
?>
<tr class="row<?=$Row?>">
<td><?=Users::format_username($UserID, true, true, true, true)?></td>

View File

@ -17,7 +17,7 @@
DELETE FROM users_sessions
WHERE UserID = '$UserID'
AND SessionID != '$SessionID'");
$Cache->delete_value('users_sessions_'.$UserID);
$Cache->delete_value("users_sessions_$UserID");
}
if (isset($_POST['session'])) {
@ -27,7 +27,7 @@
DELETE FROM users_sessions
WHERE UserID = '$UserID'
AND SessionID = '".db_string($_POST['session'])."'");
$Cache->delete_value('users_sessions_'.$UserID);
$Cache->delete_value("users_sessions_$UserID");
}
$UserSessions = $Cache->get_value('users_sessions_'.$UserID);
@ -43,7 +43,7 @@
WHERE UserID = '$UserID'
ORDER BY LastUpdate DESC");
$UserSessions = $DB->to_array('SessionID', MYSQLI_ASSOC);
$Cache->cache_value('users_sessions_'.$UserID, $UserSessions, 0);
$Cache->cache_value("users_sessions_$UserID", $UserSessions, 0);
}
list($UserID, $Username) = array_values(Users::user_info($UserID));
@ -57,10 +57,10 @@
<div class="box pad">
<table cellpadding="5" cellspacing="1" border="0" class="session_table border" width="100%">
<tr class="colhead">
<td><strong>IP address</strong></td>
<td class="nobr"><strong>IP address</strong></td>
<td><strong>Browser</strong></td>
<td><strong>Platform</strong></td>
<td><strong>Last activity</strong></td>
<td class="nobr"><strong>Last activity</strong></td>
<td>
<form class="manage_form" name="sessions" action="" method="post">
<input type="hidden" name="action" value="sessions" />
@ -74,10 +74,10 @@
$Row = 'a';
foreach ($UserSessions as $Session) {
list($ThisSessionID, $Browser, $OperatingSystem, $IP, $LastUpdate) = array_values($Session);
$Row = ($Row == 'a') ? 'b' : 'a';
$Row = $Row === 'a' ? 'b' : 'a';
?>
<tr class="row<?=$Row?>">
<td><?=$IP?></td>
<td class="nobr"><?=$IP?></td>
<td><?=$Browser?></td>
<td><?=$OperatingSystem?></td>
<td><?=time_diff($LastUpdate)?></td>

View File

@ -803,7 +803,7 @@ function check_paranoia_here($Setting) {
</td>
</tr>
<?
$Row = 0;
$Row = 'a';
$Requests = Requests::get_requests(array_keys($SphRequests));
foreach ($SphRequests as $RequestID => $SphRequest) {
$Request = $Requests[$RequestID];
@ -821,7 +821,7 @@ function check_paranoia_here($Setting) {
$FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\">$Request[Title]</a>";
}
?>
<tr class="row<?=($Row++ & 1) ? 'a' : 'b'?>">
<tr class="row<?=$Row === 'b' ? 'a' : 'b'?>">
<td>
<?=$FullName ?>
<div class="tags">

View File

@ -879,3 +879,8 @@ div[class~=tooltipster-content] > a {
#request_top_contrib tr th:last-child {
border-right: 0;
}
/* workaround for calendar display issue */
div.sidebar #event_div {
margin-left: -232px;
}

View File

@ -639,3 +639,8 @@ tr.torrent .bookmark>a:after {
.field_div:last-of-type {
margin-bottom: 0;
}
.small_label {
text-align: right;
width: auto;
}

View File

@ -929,3 +929,8 @@ tr.torrent .bookmark > a:after { color:#999; }
.vote_tag_down, .vote_artist_down, .vote_album_down, .small_downvote, .small_downvoted {
color: red;
}
/* workaround for calendar display issue */
div.sidebar #event_div {
margin-left: -232px;
}

View File

@ -840,3 +840,8 @@ div[class~=tooltipster-content] > a {
#request_top_contrib tr th:last-child {
border-right: 0;
}
/* workaround for calendar display issue */
div.sidebar #event_div {
margin-left: -232px;
}

View File

@ -1107,3 +1107,8 @@ div[class~=tooltipster-content] > a {
.vote_tag_down, .vote_artist_down, .vote_album_down, .small_downvote, .small_downvoted {
color: red;
}
/* workaround for calendar display issue */
div.sidebar #event_div {
margin-left: -50px;
}