Swap Post/Preview buttons on request page

Clean up some code

Broken markup if open registration is disabled

Clear ip_bans key after ban addition
This commit is contained in:
What.CD 2011-04-30 08:00:06 +00:00
parent dedc15976d
commit 3b0f7f967a
18 changed files with 8 additions and 58 deletions

View File

@ -147,7 +147,6 @@ function permissions_form(){ ?>
<? display_perm('site_collages_recover', 'Can recover \'deleted\' collages.'); ?>
<? display_perm('site_forums_double_post', 'Can double post in the forums.'); ?>
<? display_perm('project_team', 'Part of the project team.'); ?>
<??>
</td>
</tr>
</table>
@ -189,7 +188,6 @@ function permissions_form(){ ?>
<? display_perm('users_make_invisible', 'Can make users invisible'); ?>
<? display_perm('users_logout', 'Can log users out'); ?>
<? display_perm('users_mod', 'Can access basic moderator tools (Admin comment)'); ?>
<??>
*Everything is only applicable to users with the same or lower class level
</td>
</tr>
@ -243,7 +241,6 @@ function permissions_form(){ ?>
<? display_perm('admin_login_watch', 'Can manage login watch.'); ?>
<? display_perm('admin_manage_wiki', 'Can manage wiki access.'); ?>
<? display_perm('admin_update_geoip', 'Can update geoip data.'); ?>
<??>
</td>
</tr>
</table>

View File

@ -31,18 +31,17 @@
<body>
<div id="head">
<?=($SSL)?'<span>SSL</span>':''?>
<?
?>
</div>
<table id="maincontent">
<tr>
<td align="center" valign="middle">
<div id="logo">
<ul>
<li><a href="index.php<?=($Lang != DEFAULT_LOCALE ? '?lang='.$Lang : '')?>">Home</a></li>
<li><a href="login.php<?=($Lang != DEFAULT_LOCALE ? '?lang='.$Lang : '')?>">Login</a></li>
<li><a href="index.php">Home</a></li>
<li><a href="login.php">Login</a></li>
<? if (OPEN_REGISTRATION) { ?>
<li><a href="register.php<?=($Lang != DEFAULT_LOCALE ? '?lang='.$Lang : '')?>">Register</a></li>
<li><a href="register.php">Register</a></li>
<? } ?>
</ul>
<? } ?>
</div>

View File

@ -17,7 +17,7 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName><?=SITE_NAME.' '.ucfirst($Type)?> </ShortName>
<Description>Search <?=SITE_NAME?> for <?=ucfirst($Type)?></Description>
<Developer><??></Developer>
<Developer></Developer>
<Image width="16" height="16" type="image/x-icon">http<?=($SSL?'s':'')?>://<?=SITE_URL?>/favicon.ico</Image>
<?
switch ($Type) {

View File

@ -248,9 +248,6 @@ function compare($X, $Y){
<a href="bookmarks.php?action=remove_snatched&amp;auth=<?=$LoggedUser['AuthKey']?>" onclick="return confirm('Are you sure you want to remove the bookmarks for all items you\'ve snatched?');">[Remove Snatched]</a>
</div>
<div class="sidebar">
<?
?>
<div class="box">
<div class="head"><strong>Stats</strong></div>
<ul class="stats nobullet">

View File

@ -106,8 +106,6 @@
<td valign="top">
<input type="hidden" name="friendid" value="<?=$FriendID?>" />
<?
?>
<textarea name="comment" rows="4" cols="80"><?=$Comment?></textarea>
</td>
<td class="left" valign="top">
@ -115,9 +113,6 @@
<input type="submit" name="action" value="Defriend" /><br />
<input type="submit" name="action" value="Contact" /><br />
<?
?>
</td>
</tr>
</table>

View File

@ -65,10 +65,6 @@
?>
<div class="thin">
<h2><?=$Subject.($ForwardedID > 0 ? ' (Forwarded to '.$ForwardedName.')':'')?></h2>
<?
?>
<div class="linkbox">
<a href="inbox.php">[Back to inbox]</a>
</div>

View File

@ -97,7 +97,6 @@
<? } else { ?>
<form action="inbox.php" method="get" id="searchbox">
<div>
<??>
<input type="radio" name="searchtype" value="user" checked="checked" /> User
<input type="radio" name="searchtype" value="subject" /> Subject
<input type="radio" name="searchtype" value="message" /> Message
@ -156,7 +155,6 @@
</tr>
<? } ?>
</table>
<? ?>
<input type="submit" value="Delete message(s)" />
</form>
<? } ?>

View File

@ -197,9 +197,6 @@
<li>Seeders: <?=number_format($SeederCount) ?></li>
<li>Leechers: <?=number_format($LeecherCount) ?></li>
<li>Seeder/Leecher Ratio: <?=$Ratio?></li>
<?
?>
</ul>
</div>
<?

View File

@ -196,6 +196,7 @@ function log_attempt($UserID) {
$DB->query("INSERT INTO ip_bans
(FromIP, ToIP, Reason) VALUES
('$IP','$IP', 'Automated ban per >60 failed login attempts')");
$Cache->delete_value('ip_bans');
}
}
} else {

View File

@ -159,8 +159,6 @@
<? } else { ?>
<?=$LinkName?>
<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
<?
?>
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
<br />
<div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
@ -303,9 +301,6 @@
<?=($First ? "" : "<br />")?>
<?=$ExtraLinkName?>
<a href="torrents.php?action=download&amp;id=<?=$ExtraID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
<?
?>
uploaded by <a href="user.php?id=<?=$ExtraUploaderID?>"><?=$ExtraUploaderName?></a> <?=time_diff($ExtraTime)?> [<a href="#" onclick="Switch(<?=$ReportID?>, <?=$TorrentID?>, <?=$ExtraID?>); return false;">Switch</a>]
<?
$First = false;

View File

@ -301,9 +301,6 @@
<? } else {?>
<?=$LinkName?>
<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
<?
?>
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
<br />
<div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
@ -448,9 +445,6 @@
<?=($First ? "" : "<br />")?>
<?=$ExtraLinkName?>
<a href="torrents.php?action=download&amp;id=<?=$ExtraID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
<?
?>
uploaded by <a href="user.php?id=<?=$ExtraUploaderID?>"><?=$ExtraUploaderName?></a> <?=time_diff($ExtraTime)?> [<a href="#" onclick="Switch(<?=$ReportID?>, <?=$TorrentID?>, <?=$ExtraID?>); return false;">Switch</a>]
<?
$First = false;

View File

@ -463,8 +463,8 @@
<input type="hidden" name="requestid" value="<?=$RequestID?>" />
<textarea id="quickpost" name="body" cols="70" rows="8"></textarea> <br />
</div>
<input type="submit" value="Post reply" />
<input id="post_preview" type="button" value="Preview" onclick="if(this.preview){Quick_Edit();}else{Quick_Preview();}" />
<input type="submit" value="Post reply" />
</form>
</div>
<? } ?>

View File

@ -65,7 +65,6 @@
<? } ?>
</table>
</div>
<??>
<div class="box pad" style="padding:0px 10px 10px 10px;">
<?

View File

@ -602,9 +602,6 @@ function header_link($SortKey,$DefaultWay="desc") {
</form>
<div class="linkbox"><?=$Pages?></div>
<?
?>
<? if(count($Results)==0) {
$DB->query("SELECT
tags.Name,

View File

@ -431,7 +431,6 @@ function filelist($Str) {
| <a href="torrents.php?action=delete&amp;torrentid=<?=$TorrentID ?>" title="Remove">RM</a>
<? } ?>
<??>
| <a href="torrents.php?torrentid=<?=$TorrentID ?>" title="Permalink">PL</a>
]</span>
<a href="#" onclick="$('#torrent_<?=$TorrentID?>').toggle(); return false;">&raquo; <?=$ExtraInfo; ?></a>
@ -459,8 +458,6 @@ function filelist($Str) {
<? } ?>
<?
?>
</blockquote>
<? if(check_perms('site_moderate_requests')) { ?>
<div class="linkbox">

View File

@ -93,9 +93,6 @@
if(check_perms('torrents_edit') && $Properties['CategoryID'] == 1) {
?>
<div class="thin">
<?
?>
<h2>Change Group</h2>
<form action="torrents.php" method="post">
<input type="hidden" name="action" value="editgroupid" />
@ -150,9 +147,6 @@
</table>
</form>
<br />
<?
?>
</div>
<?
} // if check_perms('torrents_edit')

View File

@ -77,9 +77,6 @@ function checked($Checked) {
<strong>Site preferences</strong>
</td>
</tr>
<?
?>
<tr>
<td class="label"><strong>Stylesheet</strong></td>
<td>
@ -215,8 +212,6 @@ function checked($Checked) {
<label for="disableavatars">Disable avatars</label>
</td>
</tr>
<?
?>
<tr>
<td class="label"><strong>Download torrents as text files</strong></td>
<td>

View File

@ -1021,7 +1021,6 @@ function check_paranoia_here($Setting) {
<input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech==0) { ?>checked="checked"<? } ?> /><label for="DisableLeech">Leech</label> |
<input type="checkbox" name="DisablePM" id="DisablePM"<? if ($DisablePM==1) { ?>checked="checked"<? } ?> /><label for="DisablePM">PM</label> |
<input type="checkbox" name="DisableIRC" id="DisableIRC"<? if ($DisableIRC==1) { ?>checked="checked"<? } ?> /><label for="DisableIRC">IRC</label>
<??>
</td>
</tr>
<tr>