Skip to content

Commit

Permalink
Replacing some entities with their UTF-8 character equivalent.
Browse files Browse the repository at this point in the history
  • Loading branch information
reines committed May 15, 2010
1 parent 89452d1 commit 8d5b6c0
Show file tree
Hide file tree
Showing 23 changed files with 141 additions and 134 deletions.
31 changes: 19 additions & 12 deletions admin_bans.php
Expand Up @@ -79,7 +79,8 @@
else
message($lang_common['Bad request']);

$ban_expire = ($ban_expire != '') ? date('Y-m-d', $ban_expire) : '';
$diff = ($pun_user['timezone'] + $pun_user['dst']) * 3600;
$ban_expire = ($ban_expire != '') ? gmdate('Y-m-d', $ban_expire + $diff) : '';

$mode = 'edit';
}
Expand Down Expand Up @@ -232,9 +233,15 @@

if ($ban_expire != '' && $ban_expire != 'Never')
{
$ban_expire = strtotime($ban_expire);
$ban_expire = strtotime($ban_expire.' GMT');

if ($ban_expire == -1 || $ban_expire <= time())
if ($ban_expire == -1 || !$ban_expire)
message($lang_admin_bans['Invalid date message'].' '.$lang_admin_bans['Invalid date reasons']);

$diff = ($pun_user['timezone'] + $pun_user['dst']) * 3600;
$ban_expire -= $diff;

if ($ban_expire <= time())
message($lang_admin_bans['Invalid date message'].' '.$lang_admin_bans['Invalid date reasons']);
}
else
Expand Down Expand Up @@ -353,8 +360,8 @@
<div class="inbox crumbsplus">
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span>&#187;&#160;</span><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li>
<li><span>&#187;&#160;</span><strong><?php echo $lang_admin_bans['Results head'] ?></strong></li>
<li><span>»&#160;</span><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li>
<li><span>»&#160;</span><strong><?php echo $lang_admin_bans['Results head'] ?></strong></li>
</ul>
<p class="pagelink"><?php echo $paging_links ?></p>
<div class="clearer"></div>
Expand Down Expand Up @@ -392,11 +399,11 @@

?>
<tr>
<td class="tcl"><?php echo ($ban_data['username'] != '') ? pun_htmlspecialchars($ban_data['username']) : '&nbsp;' ?></td>
<td class="tc2"><?php echo ($ban_data['email'] != '') ? $ban_data['email'] : '&nbsp;' ?></td>
<td class="tc3"><?php echo ($ban_data['ip'] != '') ? $ban_data['ip'] : '&nbsp;' ?></td>
<td class="tcl"><?php echo ($ban_data['username'] != '') ? pun_htmlspecialchars($ban_data['username']) : '&#160;' ?></td>
<td class="tc2"><?php echo ($ban_data['email'] != '') ? $ban_data['email'] : '&#160;' ?></td>
<td class="tc3"><?php echo ($ban_data['ip'] != '') ? $ban_data['ip'] : '&#160;' ?></td>
<td class="tc4"><?php echo $expire ?></td>
<td class="tc5"><?php echo ($ban_data['message'] != '') ? pun_htmlspecialchars($ban_data['message']) : '&nbsp;' ?></td>
<td class="tc5"><?php echo ($ban_data['message'] != '') ? pun_htmlspecialchars($ban_data['message']) : '&#160;' ?></td>
<td class="tc6"><?php echo ($ban_data['ban_creator_username'] != '') ? '<a href="profile.php?id='.$ban_data['ban_creator'].'">'.pun_htmlspecialchars($ban_data['ban_creator_username']).'</a>' : $lang_admin_bans['Unknown'] ?></td>
<td class="tcr"><?php echo $actions ?></td>
</tr>
Expand All @@ -419,8 +426,8 @@
<p class="pagelink"><?php echo $paging_links ?></p>
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span>&#187;&#160;</span><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li>
<li><span>&#187;&#160;</span><strong><?php echo $lang_admin_bans['Results head'] ?></strong></li>
<li><span>»&#160;</span><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li>
<li><span>»&#160;</span><strong><?php echo $lang_admin_bans['Results head'] ?></strong></li>
</ul>
<div class="clearer"></div>
</div>
Expand Down Expand Up @@ -505,7 +512,7 @@
<option value="ip"><?php echo $lang_admin_bans['Order by ip'] ?></option>
<option value="email"><?php echo $lang_admin_bans['Order by e-mail'] ?></option>
<option value="expire"><?php echo $lang_admin_bans['Order by expire'] ?></option>
</select>&nbsp;&nbsp;&nbsp;<select name="direction" tabindex="11">
</select>&#160;&#160;&#160;<select name="direction" tabindex="11">
<option value="ASC" selected="selected"><?php echo $lang_admin_bans['Ascending'] ?></option>
<option value="DESC"><?php echo $lang_admin_bans['Descending'] ?></option>
</select>
Expand Down
2 changes: 1 addition & 1 deletion admin_censoring.php
Expand Up @@ -125,7 +125,7 @@
<?php

while ($cur_word = $db->fetch_assoc($result))
echo "\t\t\t\t\t\t\t\t".'<tr><td class="tcl"><input type="text" name="search_for['.$cur_word['id'].']" value="'.pun_htmlspecialchars($cur_word['search_for']).'" size="24" maxlength="60" /></td><td class="tc2"><input type="text" name="replace_with['.$cur_word['id'].']" value="'.pun_htmlspecialchars($cur_word['replace_with']).'" size="24" maxlength="60" /></td><td><input type="submit" name="update['.$cur_word['id'].']" value="'.$lang_admin_common['Update'].'" />&nbsp;<input type="submit" name="remove['.$cur_word['id'].']" value="'.$lang_admin_common['Remove'].'" /></td></tr>'."\n";
echo "\t\t\t\t\t\t\t\t".'<tr><td class="tcl"><input type="text" name="search_for['.$cur_word['id'].']" value="'.pun_htmlspecialchars($cur_word['search_for']).'" size="24" maxlength="60" /></td><td class="tc2"><input type="text" name="replace_with['.$cur_word['id'].']" value="'.pun_htmlspecialchars($cur_word['replace_with']).'" size="24" maxlength="60" /></td><td><input type="submit" name="update['.$cur_word['id'].']" value="'.$lang_admin_common['Update'].'" />&#160;<input type="submit" name="remove['.$cur_word['id'].']" value="'.$lang_admin_common['Remove'].'" /></td></tr>'."\n";

?>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion admin_forums.php
Expand Up @@ -293,7 +293,7 @@
<table id="forumperms" cellspacing="0">
<thead>
<tr>
<th class="atcl">&nbsp;</th>
<th class="atcl">&#160;</th>
<th><?php echo $lang_admin_forums['Read forum label'] ?></th>
<th><?php echo $lang_admin_forums['Post replies label'] ?></th>
<th><?php echo $lang_admin_forums['Post topics label'] ?></th>
Expand Down

0 comments on commit 8d5b6c0

Please sign in to comment.