spamadmin: basic styling

This commit is contained in:
Claude 2012-08-30 22:42:24 +02:00
parent dc01a2d1b0
commit 81119ff8e4
4 changed files with 20 additions and 12 deletions

View File

@ -72,8 +72,8 @@ $config['per_page'] = 10;
**/ **/
$config['private_only'] = false; $config['private_only'] = false;
$config['enable_captcha'] = false; $config['enable_captcha'] = false;
$config['spamadmin_user'] = ''; $config['spamadmin_user'] = 'a';
$config['spamadmin_pass'] = ''; $config['spamadmin_pass'] = 'a';
/** /**
* Default language * Default language

View File

@ -22,7 +22,7 @@ class Spamadmin extends CI_Controller
if ($user == '' || $pass == '' || !isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != $user || $_SERVER['PHP_AUTH_PW'] != $pass) if ($user == '' || $pass == '' || !isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != $user || $_SERVER['PHP_AUTH_PW'] != $pass)
{ {
header('WWW-Authenticate: Basic realm="Backup"'); header('WWW-Authenticate: Basic realm="Spamadmin"');
header('HTTP/1.0 401 Unauthorized'); header('HTTP/1.0 401 Unauthorized');
exit; exit;
} }

View File

@ -1,16 +1,20 @@
<?php $this->load->view('defaults/header');?> <?php $this->load->view('defaults/header');?>
<h1><a href="<?php echo site_url('spamadmin'); ?>">Spamadmin</a> - Pastes for ip <?php echo $ip_address; ?></h1> <h1><a href="<?php echo site_url('spamadmin'); ?>">Spamadmin</a> - Pastes for ip <?php echo $ip_address; ?></h1>
<form action="" method="post"> <div class="space">&nbsp;</div>
<label for="private">Block IP (<?php echo $ip_address; ?>)</label>
<div class="form_wrapper">
<form action="" method="post">
<label for="block_ip">Block IP
<span class="instruction">(<?php echo $ip_address; ?>)</span>
</label>
<div class="text_beside"> <div class="text_beside">
<input type="checkbox" name="block_ip" value="1" checked="checked" /> <input type="checkbox" id="block_ip" name="block_ip" value="1" checked="checked" />
</div> </div>
<div class="text_beside"> <input class="dangerbutton" type="submit" name="confirm_remove" value="Confirm removal of all pastes below" />
<input type="submit" name="confirm_remove" value="Confirm removal of all pastes below" /> </form>
</div> </div>
</form>
<div class="space"></div> <div class="space"></div>

View File

@ -254,6 +254,10 @@ h4 {
margin-top: 20px; margin-top: 20px;
} }
.form_wrapper .dangerbutton:hover {
background: #f00;
}
.form_wrapper .message_wrapper .message { .form_wrapper .message_wrapper .message {
margin-top: -10px; margin-top: -10px;
} }