Empty commit

This commit is contained in:
Git 2013-11-05 08:01:12 +00:00
parent 0060b74688
commit 8bbc4b1511
32 changed files with 160 additions and 115 deletions

View File

@ -525,15 +525,15 @@ public static function is_utf8($Str) {
/**
* Modified accessor for the $TorrentLabels array
*
* Converts $text to lowercase and strips non-word characters
* Converts $Text to lowercase and strips non-word characters
*
* @param string $text Search string
* @param string $Text Search string
* @return string CSS class(es)
*/
public static function find_torrent_label_class ($text) {
$index = mb_eregi_replace('(?:[^\w\d\s]+)', '', strtolower($text));
if (isset(self::$TorrentLabels[$index])) {
return self::$TorrentLabels[$index];
public static function find_torrent_label_class($Text) {
$Index = mb_eregi_replace('(?:[^\w\d\s]+)', '', strtolower($Text));
if (isset(self::$TorrentLabels[$Index])) {
return self::$TorrentLabels[$Index];
} else {
return self::$TorrentLabels['default'];
}
@ -543,18 +543,18 @@ public static function find_torrent_label_class ($text) {
* Creates a strong element that notes the torrent's state.
* E.g.: snatched/freeleech/neutral leech/reported
*
* The CSS class is infered using find_torrent_label_class($text)
* The CSS class is inferred using find_torrent_label_class($Text)
*
* @param string $text Display text
* @param string $class Custom CSS class
* @return string Strong element
* @param string $Text Display text
* @param string $Class Custom CSS class
* @return string <strong> element
*/
public static function torrent_label ($text, $class = '') {
if (empty($class)) {
$class = self::find_torrent_label_class($text);
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" style="white-space: nowrap;">%2$s</strong>',
display_str($class), display_str($text));
return sprintf('<strong class="torrent_label tooltip %1$s" title="%2$s" style="white-space: nowrap;">%2$s</strong>',
display_str($Class), display_str($Text));
}
/**
@ -563,7 +563,7 @@ public static function torrent_label ($text, $class = '') {
* @param int|string $CategoryID This number will be subtracted by one
* @return string
*/
public static function css_category ($CategoryID = 1) {
public static function css_category($CategoryID = 1) {
global $Categories;
return 'cats_' . strtolower(str_replace(array('-', ' '), '',
$Categories[$CategoryID - 1]));

View File

@ -15,7 +15,7 @@ public static function render_sidebar($LastFMUsername, $UserID, $OwnProfile) {
<div class="head colhead_dark">Last.fm</div>
<ul class="stats nobullet">
<li>
Username: <a id="lastfm_username" href="<?=$LastFMInfo['user']['url']?>" target="_blank" title="<?=$LastFMInfo['user']['name']?> on Last.fm: <?=number_format($LastFMInfo['user']['playcount'])?> plays, <?=number_format($LastFMInfo['user']['playlists'])?> playlist<?=$LastFMInfo['user']['playlists'] != 1 ? 's' : ''?>."><?=$LastFMUsername?></a>
Username: <a id="lastfm_username" href="<?=$LastFMInfo['user']['url']?>" target="_blank" class="tooltip" title="<?=$LastFMInfo['user']['name']?> on Last.fm: <?=number_format($LastFMInfo['user']['playcount'])?> plays, <?=number_format($LastFMInfo['user']['playlists'])?> playlist<?=$LastFMInfo['user']['playlists'] != 1 ? 's' : ''?>."><?=$LastFMUsername?></a>
</li>
<div id="lastfm_stats"<?=$OwnProfile ? ' data-uid="1"' : ''?>>
</div>

View File

@ -208,7 +208,7 @@ public function row ($Sort, $GroupID, $GroupYear, $DisplayName, $TorrentLink, $D
<td><?=$GroupYear ? trim($GroupYear) : ' '?></td>
<td><?=$DisplayName ? trim($DisplayName) : ' '?></td>
<td><?=$TorrentLink ? trim($TorrentLink) : ' '?></td>
<td class="nobr" title="<?=$DateAdded?>"><?=$DateAdded ? time_diff($DateAdded) : ' '?></td>
<td class="nobr tooltip" title="<?=$DateAdded?>"><?=$DateAdded ? time_diff($DateAdded) : ' '?></td>
<td class="center"><input type="checkbox" name="remove[<?=$GroupID?>]" value="" /></td>
</tr>
<?

View File

@ -210,7 +210,7 @@ public function local_url ($Str) {
// If for some reason your site does not require subdomains or contains a directory in the SITE_URL, revert to the line below.
//if ($Host == NONSSL_SITE_URL || $Host == SSL_SITE_URL || $Host == 'www.'.NONSSL_SITE_URL) {
if (empty($URLInfo['port']) && preg_match('/(\S+\.)*'.NONSSL_SITE_URL.'/', $Host)) {
$URL = $URLInfo['path'];
$URL = '/'.ltrim($URLInfo['path'], '/'); // Things break if the path starts with '//'
if (!empty($URLInfo['query'])) {
$URL .= '?'.$URLInfo['query'];
}

View File

@ -542,7 +542,7 @@ public static function format_username($UserID, $Badges = false, $IsWarned = tru
if ($Badges) {
$ClassesDisplay = array();
foreach (array_intersect_key($SecondaryClasses, $UserInfo['ExtraClasses']) as $PermID => $PermShort) {
$ClassesDisplay[] = '<span class="secondary_class" title="'.$Classes[$PermID]['Name'].'">'.$PermShort.'</span>';
$ClassesDisplay[] = '<span class="tooltip secondary_class" title="'.$Classes[$PermID]['Name'].'">'.$PermShort.'</span>';
}
if (!empty($ClassesDisplay)) {
$Str .= '&nbsp;'.implode('&nbsp;', $ClassesDisplay);

View File

@ -685,7 +685,7 @@ function compare($X, $Y) {
?>
<li>
<span title="<?=$Score?>"><a href="artist.php?id=<?=$Artist2ID?>" style="float: left; display: block;"><?=$Artist2Name?></a></span>
<span class="tooltip" title="<?=$Score?>"><a href="artist.php?id=<?=$Artist2ID?>" style="float: left; display: block;"><?=$Artist2Name?></a></span>
<div style="float: right; display: block; letter-spacing: -1px;">
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=up" class="tooltip brackets vote_artist_up" title="Vote up this similar artist. Use this when you feel that the two artists are quite similar.">&and;</a>
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=down" class="tooltip brackets vote_artist_down" title="Vote down this similar artist. Use this when you feel that the two artists are not all that similar.">&or;</a>

View File

@ -67,13 +67,13 @@
<thead>
<tr class="colhead">
<th style="width: 7%;">Order</th>
<th style="width: 1%;"><span><abbr title="Current rank">#</abbr></span></th>
<th style="width: 1%;"><span><abbr class="tooltip" title="Current rank">#</abbr></span></th>
<th style="width: 7%;"><span>Cat.&nbsp;#</span></th>
<th style="width: 1%;"><span>Year</span></th>
<th style="width: 15%;"><span>Artist</span></th>
<th><span>Torrent group</span></th>
<th style="width: 1%;"><span>User</span></th>
<th style="width: 1%; text-align: right;" class="nobr"><span><abbr title="Modify an individual row.">Tweak</abbr></span></th>
<th style="width: 1%; text-align: right;" class="nobr"><span><abbr class="tooltip" title="Modify an individual row">Tweak</abbr></span></th>
</tr>
</thead>
<tbody>

View File

@ -62,10 +62,10 @@
<thead>
<tr class="colhead">
<th style="width: 7%;">Order</th>
<th style="width: 1%;"><span><abbr title="Current rank">#</abbr></span></th>
<th style="width: 1%;"><span><abbr class="tooltip" title="Current rank">#</abbr></span></th>
<th style="text-align: left;"><span>Artist</span></th>
<th style="width: 7%;"><span>User</span></th>
<th style="width: 7%; text-align: right;" class="nobr"><span><abbr title="Modify an individual row.">Tweak</abbr></span></th>
<th style="width: 7%; text-align: right;" class="nobr"><span><abbr class="tooltip" title="Modify an individual row.">Tweak</abbr></span></th>
</tr>
</thead>
<tbody>

View File

@ -584,33 +584,33 @@
</div>
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border">
<tr>
<td class="label">Sticky</td>
<td class="label"><label for="sticky_thread_checkbox">Sticky</label></td>
<td>
<input type="checkbox" onclick="$('#ranking_row').gtoggle();" name="sticky"<? if ($ThreadInfo['IsSticky']) { echo ' checked="checked"'; } ?> tabindex="2" />
<input type="checkbox" id="sticky_thread_checkbox" onclick="$('#ranking_row').gtoggle();" name="sticky"<? if ($ThreadInfo['IsSticky']) { echo ' checked="checked"'; } ?> tabindex="2" />
</td>
</tr>
<tr id="ranking_row"<?=!$ThreadInfo['IsSticky'] ? ' class="hidden"' : ''?>>
<td class="label">Ranking</td>
<td class="label"><label for="thread_ranking_textbox">Ranking</label></td>
<td>
<input type="text" name="ranking" value="<?=$ThreadInfo['Ranking']?>" tabindex="2" />
<input type="text" id="thread_ranking_textbox" name="ranking" value="<?=$ThreadInfo['Ranking']?>" tabindex="2" />
</td>
</tr>
<tr>
<td class="label">Locked</td>
<td class="label"><label for="locked_thread_checkbox">Locked</label></td>
<td>
<input type="checkbox" name="locked"<? if ($ThreadInfo['IsLocked']) { echo ' checked="checked"'; } ?> tabindex="2" />
<input type="checkbox" id="locked_thread_checkbox" name="locked"<? if ($ThreadInfo['IsLocked']) { echo ' checked="checked"'; } ?> tabindex="2" />
</td>
</tr>
<tr>
<td class="label">Title</td>
<td class="label"><label for="thread_title_textbox">Title</label></td>
<td>
<input type="text" name="title" style="width: 75%;" value="<?=display_str($ThreadInfo['Title'])?>" tabindex="2" />
<input type="text" id="thread_title_textbox" name="title" style="width: 75%;" value="<?=display_str($ThreadInfo['Title'])?>" tabindex="2" />
</td>
</tr>
<tr>
<td class="label">Move thread</td>
<td class="label"><label for="move_thread_selector">Move thread</label></td>
<td>
<select name="forumid" tabindex="2">
<select name="forumid" id="move_thread_selector" tabindex="2">
<?
$OpenGroup = false;
$LastCategoryID = -1;
@ -637,9 +637,9 @@
</tr>
<? if (check_perms('site_admin_forums')) { ?>
<tr>
<td class="label">Delete thread</td>
<td class="label"><label for="delete_thread_checkbox">Delete thread</label></td>
<td>
<input type="checkbox" name="delete" tabindex="2" />
<input type="checkbox" id="delete_thread_checkbox" name="delete" tabindex="2" />
</td>
</tr>
<? } ?>

View File

@ -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
@ -48,18 +48,18 @@
LEFT JOIN pm_conversations_users AS cu2 ON cu2.ConvID = c.ID AND cu2.UserID != '$UserID' AND cu2.ForwardedTo = 0
LEFT JOIN users_main AS um ON um.ID = cu2.UserID";
if (!empty($_GET['search']) && $_GET['searchtype'] == 'message') {
if (!empty($_GET['search']) && $_GET['searchtype'] === 'message') {
$sql .= ' JOIN pm_messages AS m ON c.ID = m.ConvID';
}
$sql .= ' WHERE ';
if (!empty($_GET['search'])) {
$Search = db_string($_GET['search']);
if ($_GET['searchtype'] == 'user') {
if ($_GET['searchtype'] === 'user') {
$sql .= "um.Username LIKE '$Search' AND ";
} elseif ($_GET['searchtype'] == 'subject') {
} elseif ($_GET['searchtype'] === 'subject') {
$Words = explode(' ', $Search);
$sql .= "c.Subject LIKE '%".implode("%' AND c.Subject LIKE '%", $Words)."%' AND ";
} elseif ($_GET['searchtype'] == 'message') {
} elseif ($_GET['searchtype'] === 'message') {
$Words = explode(' ', $Search);
$sql .= "m.Body LIKE '%".implode("%' AND m.Body LIKE '%", $Words)."%' AND ";
}
@ -94,14 +94,14 @@
<input type="radio" name="searchtype" value="message"<?=(!empty($_GET['searchtype']) && $_GET['searchtype'] == 'message' ? ' checked="checked"' : '')?> /> Message
<span style="float: right;">
<? // provide a temporary toggle for sorting PMs
$ToggleTitle = 'Temporary toggle switch for sorting PMs. To permanently change the sorting behavior, edit the setting in your profile.';
$BaseURL = 'inbox.php';
$ToggleTitle = 'Temporary toggle switch for sorting PMs. To permanently change the sorting behavior, edit the setting in your profile.';
$BaseURL = 'inbox.php';
if ($_GET['sort'] == 'unread') { ?>
<a href="<?=$BaseURL?>" class="brackets" title="<?=$ToggleTitle?>">List latest first</a>
<? } else { ?>
<a href="<?=$BaseURL?>?sort=unread" class="brackets" title="<?=$ToggleTitle?>">List unread first</a>
<? } ?>
if ($_GET['sort'] === 'unread') { ?>
<a href="<?=$BaseURL?>" class="brackets tooltip" title="<?=$ToggleTitle?>">List latest first</a>
<? } else { ?>
<a href="<?=$BaseURL?>?sort=unread" class="brackets tooltip" title="<?=$ToggleTitle?>">List unread first</a>
<? } ?>
</span>
<br />
<input type="text" name="search" value="<?=(!empty($_GET['search']) ? display_str($_GET['search']) : 'Search '.($Section === 'sentbox' ? 'Sentbox' : 'Inbox'))?>" style="width: 98%;"

View File

@ -23,7 +23,7 @@
<?=Artists::display_artists($Artists, true, true)?><a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>"><?=$FeaturedAlbum['Name']?></a>
</div>
<div class="center pad">
<a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>" title="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>">
<a href="torrents.php?id=<?=$FeaturedAlbum['GroupID']?>" class="tooltip" title="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>">
<img src="<?=ImageTools::process($FeaturedAlbum['WikiImage'], true)?>" alt="<?=Artists::display_artists($Artists, false, false)?> - <?=$FeaturedAlbum['Name']?>" width="100%" />
</a>
</div>

View File

@ -55,7 +55,7 @@
if ($Attempts > 0) {
?>
<br /><br />
Lost your password? <a href="login.php?act=recover" title="Recover your password">Recover it here!</a>
Lost your password? <a href="login.php?act=recover" class="tooltip" title="Recover your password">Recover it here!</a>
<?
}
?>

View File

@ -9,5 +9,5 @@
<a href="reportsv2.php?view=unauto" class="brackets">New (un-auto)</a>
<a href="reportsv2.php?view=staff&amp;id=<?=$LoggedUser['ID']?>" class="brackets">View your claimed reports</a>
<a href="reportsv2.php?view=resolved" class="brackets">View old reports</a>
<a href="reportsv2.php?action=search" class="brackets" title="vaporware">Search reports</a>
<a href="reportsv2.php?action=search" class="brackets tooltip" title="vaporware">Search reports</a>
</div>

View File

@ -278,9 +278,9 @@
//PM
if ($Escaped['uploader_pm'] || $Warning > 0 || isset($Escaped['delete']) || $SendPM) {
if (isset($Escaped['delete'])) {
$PM = '[url='.site_url()."/torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported and has been deleted.\n\n";
$PM = '[url='.site_url()."torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported and has been deleted.\n\n";
} else {
$PM = '[url='.site_url()."/torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported but not deleted.\n\n";
$PM = '[url='.site_url()."torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported but not deleted.\n\n";
}
$Preset = $ResolveType['resolve_options']['pm'];
@ -290,7 +290,7 @@
}
if ($Warning > 0) {
$PM .= "This has resulted in a [url=".site_url()."/wiki.php?action=article&amp;id=218]$Warning week warning.[/url]\n\n";
$PM .= "This has resulted in a [url=".site_url()."wiki.php?action=article&amp;id=218]$Warning week warning.[/url]\n\n";
}
if ($Upload) {

View File

@ -127,7 +127,7 @@
?>
<p align="center"><img style="width: 100%;" src="<?=ImageTools::process($Request['Image'], true)?>" alt="<?=$FullName?>" onclick="lightbox.init('<?=ImageTools::process($Request['Image'])?>', 220);" /></p>
<? } else { ?>
<p align="center"><img style="width: 100%;" src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$Request['CategoryID'] - 1]?>" alt="<?=$CategoryName?>" title="<?=$CategoryName?>" height="220" border="0" /></p>
<p align="center"><img style="width: 100%;" src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$Request['CategoryID'] - 1]?>" alt="<?=$CategoryName?>" class="tooltip" title="<?=$CategoryName?>" height="220" border="0" /></p>
<? } ?>
</div>
</div>

View File

@ -115,15 +115,15 @@
<td><?=Format::get_ratio_html($Uploaded, $Downloaded)?><br /><?=Format::get_ratio_html($InviterUploaded, $InviterDownloaded)?></td>
<td>
<span style="float: left;"><?=display_str($Email)?></span>
<span style="float: right;"><a href="userhistory.php?action=email&amp;userid=<?=$UserID?>" title="History" class="brackets">H</a> <a href="/user.php?action=search&amp;email_history=on&amp;email=<?=display_str($Email)?>" title="Search" class="brackets">S</a></span><br />
<span style="float: right;"><a href="userhistory.php?action=email&amp;userid=<?=$UserID?>" title="History" class="brackets tooltip">H</a> <a href="/user.php?action=search&amp;email_history=on&amp;email=<?=display_str($Email)?>" title="Search" class="brackets tooltip">S</a></span><br />
<span style="float: left;"><?=display_str($InviterEmail)?></span>
<span style="float: right;"><a href="userhistory.php?action=email&amp;userid=<?=$InviterID?>" title="History" class="brackets">H</a> <a href="/user.php?action=search&amp;email_history=on&amp;email=<?=display_str($InviterEmail)?>" title="Search" class="brackets">S</a></span><br />
<span style="float: right;"><a href="userhistory.php?action=email&amp;userid=<?=$InviterID?>" title="History" class="brackets tooltip">H</a> <a href="/user.php?action=search&amp;email_history=on&amp;email=<?=display_str($InviterEmail)?>" title="Search" class="brackets tooltip">S</a></span><br />
</td>
<td>
<span style="float: left;"><?=display_str($IP)?></span>
<span style="float: right;"><?=display_str($Uses)?> <a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>" title="History" class="brackets">H</a> <a href="/user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($IP)?>" title="Search" class="brackets">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($IP)?>" title="WI" class="brackets">WI</a></span><br />
<span style="float: right;"><?=display_str($Uses)?> <a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>" title="History" class="brackets tooltip">H</a> <a href="/user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($IP)?>" title="Search" class="brackets tooltip">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($IP)?>" title="WI" class="brackets tooltip">WI</a></span><br />
<span style="float: left;"><?=display_str($InviterIP)?></span>
<span style="float: right;"><?=display_str($InviterUses)?> <a href="userhistory.php?action=ips&amp;userid=<?=$InviterID?>" title="History" class="brackets">H</a> <a href="/user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($InviterIP)?>" title="Search" class="brackets">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($InviterIP)?>" title="WI" class="brackets">WI</a></span><br />
<span style="float: right;"><?=display_str($InviterUses)?> <a href="userhistory.php?action=ips&amp;userid=<?=$InviterID?>" title="History" class="brackets tooltip">H</a> <a href="/user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($InviterIP)?>" title="Search" class="brackets tooltip">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($InviterIP)?>" title="WI" class="brackets tooltip">WI</a></span><br />
</td>
<td>
<?=$IPCC?> <br />

View File

@ -63,7 +63,7 @@
<tr class="row<?=$Row?>">
<td><?=Users::format_username($UserID, true, true, true, true)?></td>
<td>
<span style="float: left;"><?=Tools::get_host_by_ajax($IP)." ($IP)"?></span><span style="float: right;"><a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>" title="History" class="brackets">H</a> <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($IP)?>" title="Search" class="brackets">S</a></span>
<span style="float: left;"><?=Tools::get_host_by_ajax($IP)." ($IP)"?></span><span style="float: right;"><a href="userhistory.php?action=ips&amp;userid=<?=$UserID?>" title="History" class="brackets tooltip">H</a> <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($IP)?>" title="Search" class="brackets tooltip">S</a></span>
</td>
<td><?=display_str($Uses)?></td>
<td><?=time_diff($Joined)?></td>

View File

@ -237,7 +237,7 @@
<? // END REPORTED STUFF :|: BEGIN MOD STUFF ?>
<tr>
<td class="label">
<a href="javascript:Load('<?=$ReportID?>')" title="Click here to reset the resolution options to their default values.">Resolve:</a>
<a href="javascript:Load('<?=$ReportID?>')" class="tooltip" title="Click here to reset the resolution options to their default values.">Resolve:</a>
</td>
<td colspan="3">
<select name="resolve_type" id="resolve_type<?=$ReportID?>" onchange="ChangeResolve(<?=$ReportID?>);">

View File

@ -169,7 +169,7 @@ function compare($X, $Y) {
<? if ($WikiImage != '') { ?>
<p align="center"><img width="100%" src="<?=ImageTools::process($WikiImage, true)?>" alt="<?=$AltName?>" onclick="lightbox.init('<?=ImageTools::process($WikiImage)?>', 220);" /></p>
<? } else { ?>
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$GroupCategoryID - 1]?>" alt="<?=$Categories[$GroupCategoryID - 1]?>" title="<?=$Categories[$GroupCategoryID - 1]?>" width="220" height="220" border="0" /></p>
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$GroupCategoryID - 1]?>" alt="<?=$Categories[$GroupCategoryID - 1]?>" class="brackets tooltip" title="<?=$Categories[$GroupCategoryID - 1]?>" width="220" height="220" border="0" /></p>
<?
}
$Index++;
@ -253,7 +253,7 @@ function compare($X, $Y) {
}
?>
(<span class="tooltip" title="Artist alias ID"><?=$AliasID?></span>)&nbsp;
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=4'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=4'); this.parentNode.parentNode.style.display = 'none';" class="brackets tooltip" title="Remove artist">X</a></span>
<? } ?>
</li>
<?

View File

@ -284,7 +284,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
// print row
?>
<tr class="torrent torrent_row<?=($TorrentInfo['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '')?>" id="torrent<?=$TorrentID?>"<?=($MatchingArtistsText ? ' title="'.display_str($MatchingArtistsText).'"' : '')?>>
<tr class="torrent torrent_row<?=($TorrentInfo['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '') . ($MatchingArtistsText ? ' tooltip" title="'.display_str($MatchingArtistsText) : '')?>" id="torrent<?=$TorrentID?>">
<td style="text-align: center;">
<input type="checkbox" class="notify_box notify_box_<?=$FilterID?>" value="<?=$TorrentID?>" id="clear_<?=$TorrentID?>" tabindex="1" />
</td>

View File

@ -112,19 +112,19 @@
<tr class="rowa">
<td><?=display_str($Values['Email'])?></td>
<td><?=time_diff($Values['Time'])?></td>
<td><?=display_str($Values['IP'])?> (<?=display_str($Values['Code'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Values['IP'])?>" class="brackets" title="Search">S</a></td>
<td><?=display_str($Values['IP'])?> (<?=display_str($Values['Code'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Values['IP'])?>" class="brackets tooltip" title="Search">S</a></td>
<?
if ($UsersOnly == 1) {
$ueQuery = $DB->query("
SELECT
ue.UserID,
Username,
ue.Time,
ue.IP
FROM users_history_emails AS ue, users_main
WHERE ue.Email = '".db_string($Values['Email'])."'
AND UserID != $UserID
AND ID = UserID");
SELECT
ue.UserID,
Username,
ue.Time,
ue.IP
FROM users_history_emails AS ue, users_main
WHERE ue.Email = '".db_string($Values['Email'])."'
AND UserID != $UserID
AND ID = UserID");
while (list($UserID2, $Time, $IP) = $DB->next_record()) { ?>
</tr>
<tr>

View File

@ -192,11 +192,19 @@
<td><?=time_diff($Current['StartTime'])?></td>
<td></td>
<td>
<?=display_str($Current['CurrentIP'])?> (<?=Tools::get_country_code_by_ajax($Current['CurrentIP'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Current['CurrentIP'])?>" class="brackets" title="Search">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($Current['CurrentIP'])?>" class="brackets" title="Search WIMIA.com">WI</a><br />
<?=display_str($Current['CurrentIP'])?>
(<?=Tools::get_country_code_by_ajax($Current['CurrentIP'])?>)
<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Current['CurrentIP'])?>" class="brackets tooltip" title="Search">S</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($Current['CurrentIP'])?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
<br />
<?=Tools::get_host_by_ajax($Current['CurrentIP'])?>
</td>
<td>
<?=display_str($Current['IP'])?> (<?=Tools::get_country_code_by_ajax($Current['IP'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Current['IP'])?>" class="brackets" title="Search">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($Current['IP'])?>" class="brackets" title="Search WIMIA.com">WI</a><br />
<?=display_str($Current['IP'])?>
(<?=Tools::get_country_code_by_ajax($Current['IP'])?>)
<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Current['IP'])?>" class="brackets tooltip" title="Search">S</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($Current['IP'])?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
<br />
<?=Tools::get_host_by_ajax($Current['IP'])?>
</td>
</tr>
@ -211,7 +219,11 @@
<td><?=time_diff($Match['EndTime'])?></td>
<td></td>
<td>
<?=display_str($Match['IP'])?> (<?=Tools::get_country_code_by_ajax($Match['IP'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Match['IP'])?>" class="brackets" title="Search">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($Match['IP'])?>" class="brackets" title="Search WIMIA.com">WI</a><br />
<?=display_str($Match['IP'])?>
(<?=Tools::get_country_code_by_ajax($Match['IP'])?>)
<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Match['IP'])?>" class="brackets tooltip" title="Search">S</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($Match['IP'])?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
<br />
<?=Tools::get_host_by_ajax($Match['IP'])?>
</td>
</tr>
@ -248,7 +260,11 @@
<td><?=time_diff($Match['EndTime'])?></td>
<td></td>
<td>
<?=display_str($Match['IP'])?> (<?=Tools::get_country_code_by_ajax($Match['IP'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Match['IP'])?>" class="brackets" title="Search">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($Match['IP'])?>" class="brackets" title="Search WIMIA.com">WI</a><br />
<?=display_str($Match['IP'])?>
(<?=Tools::get_country_code_by_ajax($Match['IP'])?>)
<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Match['IP'])?>" class="brackets tooltip" title="Search">S</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($Match['IP'])?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
<br />
<?=Tools::get_host_by_ajax($Match['IP'])?>
</td>
</tr>
@ -267,7 +283,11 @@
<td><?=time_diff($Record['EndTime'])?></td>
<td><?=time_diff($Record['ElapsedTime'])?></td>
<td>
<?=display_str($Record['IP'])?> (<?=Tools::get_country_code_by_ajax($Record['IP'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Record['IP'])?>" class="brackets" title="Search">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($Record['IP'])?>" class="brackets" title="Search WIMIA.com">WI</a><br />
<?=display_str($Record['IP'])?>
(<?=Tools::get_country_code_by_ajax($Record['IP'])?>)
<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Record['IP'])?>" class="brackets tooltip" title="Search">S</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($Record['IP'])?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
<br />
<?=Tools::get_host_by_ajax($Record['IP'])?>
</td>
</tr>
@ -306,7 +326,11 @@
<td><?=time_diff($Match['EndTime'])?></td>
<td></td>
<td>
<?=display_str($Match['IP'])?> (<?=Tools::get_country_code_by_ajax($Match['IP'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Match['IP'])?>" class="brackets" title="Search">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($Match['IP'])?>" class="brackets" title="Search WIMIA.com">WI</a><br />
<?=display_str($Match['IP'])?>
(<?=Tools::get_country_code_by_ajax($Match['IP'])?>)
<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Match['IP'])?>" class="brackets tooltip" title="Search">S</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($Match['IP'])?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
<br />
<?=Tools::get_host_by_ajax($Match['IP'])?>
</td>
</tr>
@ -324,7 +348,11 @@
<td><?=time_diff($Invite['EndTime'])?></td>
<td><?=time_diff($Invite['AccountAge'])?></td>
<td>
<?=display_str($Invite['IP'])?> (<?=Tools::get_country_code_by_ajax($Invite['IP'])?>) <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Invite['IP'])?>" class="brackets" title="Search">S</a> <a href="http://whatismyipaddress.com/ip/<?=display_str($Invite['IP'])?>" class="brackets" title="Search WIMIA.com">WI</a><br />
<?=display_str($Invite['IP'])?>
(<?=Tools::get_country_code_by_ajax($Invite['IP'])?>)
<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($Invite['IP'])?>" class="brackets tooltip" title="Search">S</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($Invite['IP'])?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
<br />
<?=Tools::get_host_by_ajax($Invite['IP'])?>
</td>
</tr>

View File

@ -80,7 +80,7 @@ function ShowIPs(rowname) {
<tr class="rowa">
<td>
<?=$IP?> (<?=Tools::get_country_code_by_ajax($IP)?>)<br /><?=Tools::get_host_by_ajax($IP)?>
<a href="http://whatismyipaddress.com/ip/<?=display_str($IP)?>" class="brackets" title="Search WIMIA.com">WI</a>
<a href="http://whatismyipaddress.com/ip/<?=display_str($IP)?>" class="brackets tooltip" title="Search WIMIA.com">WI</a>
</td>
<td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a></td>
<td><?=date('Y-m-d g:i:s', $Time)?></td>

View File

@ -20,8 +20,8 @@
um.Username,
p.Level AS Class
FROM users_main AS um
LEFT JOIN permissions AS p ON p.ID=um.PermissionID
WHERE um.ID = ".$UserID);
LEFT JOIN permissions AS p ON p.ID = um.PermissionID
WHERE um.ID = $UserID");
list($Username, $Class) = $DB->next_record();
if (!check_perms('users_view_keys', $Class)) {
@ -37,7 +37,7 @@
ChangeTime,
ChangerIP
FROM users_history_passkeys
WHERE UserID=$UserID
WHERE UserID = $UserID
ORDER BY ChangeTime DESC");
?>
@ -56,7 +56,7 @@
<td><?=display_str($OldPassKey)?></td>
<td><?=display_str($NewPassKey)?></td>
<td><?=time_diff($ChangeTime)?></td>
<td><?=display_str($ChangerIP)?> <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($ChangerIP)?>" class="brackets" title="Search">S</a><br /><?=display_str(Tools::get_host_by_ip($ChangerIP))?></td>
<td><?=display_str($ChangerIP)?> <a href="user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($ChangerIP)?>" class="brackets tooltip" title="Search">S</a><br /><?=display_str(Tools::get_host_by_ip($ChangerIP))?></td>
</tr>
<? } ?>
</table>

View File

@ -20,8 +20,8 @@
um.Username,
p.Level AS Class
FROM users_main AS um
LEFT JOIN permissions AS p ON p.ID=um.PermissionID
WHERE um.ID = ".$UserID);
LEFT JOIN permissions AS p ON p.ID = um.PermissionID
WHERE um.ID = $UserID");
list($Username, $Class) = $DB->next_record();
if (!check_perms('users_view_keys', $Class)) {
@ -35,7 +35,7 @@
ChangeTime,
ChangerIP
FROM users_history_passwords
WHERE UserID=$UserID
WHERE UserID = $UserID
ORDER BY ChangeTime DESC");
?>
@ -50,7 +50,7 @@
<? while (list($ChangeTime, $ChangerIP) = $DB->next_record()) { ?>
<tr class="rowa">
<td><?=time_diff($ChangeTime)?></td>
<td><?=display_str($ChangerIP)?> <a href="/user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($ChangerIP)?>" class="brackets" title="Search">S</a><br /><?=Tools::get_host_by_ajax($ChangerIP)?></td>
<td><?=display_str($ChangerIP)?> <a href="/user.php?action=search&amp;ip_history=on&amp;ip=<?=display_str($ChangerIP)?>" class="brackets tooltip" title="Search">S</a><br /><?=Tools::get_host_by_ajax($ChangerIP)?></td>
</tr>
<? } ?>
</table>

View File

@ -229,7 +229,7 @@
<td colspan="<?=Users::has_avatars_enabled() ? 2 : 1 ?>">
<span style="float: left;">
<?=time_diff($AddedTime) ?>
in <a href="forums.php?action=viewthread&amp;threadid=<?=$TopicID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>" title="<?=display_str($ThreadTitle)?>"><?=Format::cut_string($ThreadTitle, 75)?></a>
in <a href="forums.php?action=viewthread&amp;threadid=<?=$TopicID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>" class="tooltip" title="<?=display_str($ThreadTitle)?>"><?=Format::cut_string($ThreadTitle, 75)?></a>
<?
if ($ViewingOwn) {
if ((!$Locked || $Sticky) && (!$LastRead || $LastRead < $LastPostID)) { ?>

View File

@ -100,7 +100,7 @@
switch ($Result['Page']) {
case 'forums':
$Links = 'Forums: <a href="forums.php?action=viewforum&amp;forumid=' . $Result['ForumID'] . '">' . display_str($Result['ForumName']) . '</a> &gt; ' .
'<a href="forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '" title="' . display_str($Result['ForumTitle']) . '">' . Format::cut_string($Result['ForumTitle'], 75) . '</a>';
'<a href="forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '" class="tooltip" title="' . display_str($Result['ForumTitle']) . '">' . Format::cut_string($Result['ForumTitle'], 75) . '</a>';
$JumpLink = 'forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
break;
case 'artist':

View File

@ -54,7 +54,12 @@
LEFT JOIN users_comments_last_read AS lr ON lr.UserID = $LoggedUser[ID] AND lr.Page = s.Page AND lr.PageID = s.PageID
LEFT JOIN artists_group AS a ON s.Page = 'artist' AND a.ArtistID = s.PageID
LEFT JOIN collages AS co ON s.Page = 'collages' AND co.ID = s.PageID
LEFT JOIN comments AS c ON c.ID = (SELECT MAX(ID) FROM comments WHERE Page = s.Page AND PageID = s.PageID)
LEFT JOIN comments AS c ON c.ID = (
SELECT MAX(ID)
FROM comments
WHERE Page = s.Page
AND PageID = s.PageID
)
LEFT JOIN comments AS c_lr ON c_lr.ID = lr.PostID
LEFT JOIN users_main AS um ON um.ID = c_lr.AuthorID
LEFT JOIN users_info AS ui ON ui.UserID = um.ID
@ -66,7 +71,11 @@
LEFT JOIN forums_last_read_topics AS lr ON lr.UserID = $LoggedUser[ID] AND s.TopicID = lr.TopicID
LEFT JOIN forums_topics AS t ON t.ID = s.TopicID
LEFT JOIN forums AS f ON f.ID = t.ForumID
LEFT JOIN forums_posts AS p ON p.ID = (SELECT MAX(ID) FROM forums_posts WHERE TopicID = s.TopicID)
LEFT JOIN forums_posts AS p ON p.ID = (
SELECT MAX(ID)
FROM forums_posts
WHERE TopicID = s.TopicID
)
LEFT JOIN forums_posts AS p_lr ON p_lr.ID = lr.PostID
LEFT JOIN users_main AS um ON um.ID = p_lr.AuthorID
LEFT JOIN users_info AS ui ON ui.UserID = um.ID
@ -183,7 +192,7 @@
break;
case 'forums':
$Links = 'Forums: <a href="forums.php?action=viewforum&amp;forumid=' . $Result['ForumID'] . '">' . display_str($Result['ForumName']) . '</a> &gt; ' .
'<a href="forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '" title="' . display_str($Result['Name']) . '">' . Format::cut_string($Result['Name'], 75) . '</a>';
'<a href="forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '" class="tooltip" title="' . display_str($Result['Name']) . '">' . Format::cut_string($Result['Name'], 75) . '</a>';
$JumpLink = 'forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
break;
default:

View File

@ -26,7 +26,7 @@
<?
$ReplyText = new TEXTAREA_PREVIEW('body', 'body', $Body, 91, 22, true, false);
if (check_perms('admin_manage_wiki')) {
if (check_perms('admin_manage_wiki')) {
?>
<h3>Access</h3>
<p>There are some situations in which the viewing or editing of an article should be restricted to a certain class.</p>

View File

@ -7,15 +7,15 @@
include(SERVER_ROOT.'/classes/validate.class.php');
$Val = new VALIDATE;
$Val->SetFields('title', '1','string','The title must be between 3 and 100 characters',array('maxlength'=>100, 'minlength'=>3));
//$Val->SetFields('alias', '1','string','Please include at least 1 alias, the entire string should be between 2 and 100 characters.',array('maxlength'=>100, 'minlength'=>2));
$Val->SetFields('title', '1', 'string', 'The title must be between 3 and 100 characters', array('maxlength' => 100, 'minlength' => 3));
//$Val->SetFields('alias', '1', 'string', 'Please include at least 1 alias, the entire string should be between 2 and 100 characters.', array('maxlength' => 100, 'minlength' => 2));
$Err = $Val->ValidateForm($_POST);
if (!$Err) {
$DB->query("
SELECT ID
FROM wiki_articles
WHERE Title='$P[title]'");
WHERE Title = '$P[title]'");
if ($DB->has_results()) {
list($ID) = $DB->next_record();
$Err = 'An article with that name already exists <a href="wiki.php?action=article&amp;id='.$ID.'">here</a>.';
@ -73,6 +73,6 @@
Misc::write_log("Wiki article $ArticleID (".$_POST['title'].") was created by ".$LoggedUser['Username']);
header('Location: wiki.php?action=article&id='.$ArticleID);
header("Location: wiki.php?action=article&id=$ArticleID");
?>

View File

@ -7,7 +7,7 @@
if (!is_number($_POST['id']) || $_POST['id'] == '') {
error(0);
}
$Val->SetFields('title', '1','string','The title must be between 3 and 100 characters',array('maxlength'=>100, 'minlength'=>3));
$Val->SetFields('title', '1', 'string', 'The title must be between 3 and 100 characters', array('maxlength' => 100, 'minlength' => 3));
$Err = $Val->ValidateForm($_POST);
$ArticleID = $_POST['id'];
@ -46,19 +46,27 @@
error('This article has already been modified from its original version.');
}
$DB->query("INSERT INTO wiki_revisions (ID, Revision, Title, Body, Date, Author) VALUES ('".db_string($ArticleID)."', '".db_string($Revision)."', '".db_string($Title)."', '".db_string($Body)."', '".db_string($Date)."', '".db_string($Author)."')");
$SQL = "UPDATE wiki_articles SET
Revision='".db_string($Revision + 1)."',
Title='$P[title]',
Body='$P[body]',";
$DB->query("
INSERT INTO wiki_revisions
(ID, Revision, Title, Body, Date, Author)
VALUES
('".db_string($ArticleID)."', '".db_string($Revision)."', '".db_string($Title)."', '".db_string($Body)."', '".db_string($Date)."', '".db_string($Author)."')");
$SQL = "
UPDATE wiki_articles
SET
Revision = '".db_string($Revision + 1)."',
Title = '$P[title]',
Body = '$P[body]',";
if ($Read && $Edit) {
$SQL .= "MinClassRead='$Read',
MinClassEdit='$Edit',";
$SQL .= "
MinClassRead = '$Read',
MinClassEdit = '$Edit',";
}
$SQL .= "Date='".sqltime()."',
Author='$LoggedUser[ID]'
WHERE ID='$P[id]'";
$SQL .= "
Date = '".sqltime()."',
Author = '$LoggedUser[ID]'
WHERE ID = '$P[id]'";
$DB->query($SQL);
$Cache->delete_value('wiki_article_'.$ArticleID);
header('Location: wiki.php?action=article&id='.$ArticleID);
$Cache->delete_value("wiki_article_$ArticleID");
header("Location: wiki.php?action=article&id=$ArticleID");
?>

View File

@ -87,7 +87,7 @@ $(document).ready(function () {
sortableTable.counter();
},
noteToggle : function () {
var span = $('<a href="#" class="brackets" title="Toggle note">Hide</a>').click(function (e) {
var span = $('<a href="#" class="brackets tooltip" title="Toggle note">Hide</a>').click(function (e) {
e.preventDefault();
$('#drag_drop_textnote > :first-child').toggle();
var $this = $(this);