confirm removal

This commit is contained in:
Claude 2012-08-30 22:56:47 +02:00
parent 1d5303de40
commit c872b5339c
2 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,7 @@
* Function list:
* - __construct()
* - index()
* - session()
* - spam_detail()
* Classes list:
* - Spamadmin extends CI_Controller
*/
@ -44,6 +44,8 @@ class Spamadmin extends CI_Controller
{
$this->db->where('ip_address', $ip_address);
$this->db->delete('pastes');
//todo: catch duplicate error
if ($this->input->post('block_ip'))
{

View File

@ -12,7 +12,11 @@
<input type="checkbox" id="block_ip" name="block_ip" value="1" checked="checked" />
</div>
<?php if($this->uri->segment(3) == 'confirm') { ?>
<input class="dangerbutton" type="submit" name="confirm_remove" value="Confirm removal of all pastes below" />
<?php } else { ?>
<p><a href="<?php echo site_url('spamadmin/' . $ip_address . '/confirm'); ?>">Remove all pastes below</a></p>
<?php } ?>
</form>
</div>