mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
spamcounter works
This commit is contained in:
parent
1bcc843b72
commit
6e8d81f6f2
@ -411,6 +411,8 @@ class Pastes extends CI_Model
|
||||
$n++;
|
||||
}
|
||||
}
|
||||
|
||||
//pagination
|
||||
$config['base_url'] = site_url($root);
|
||||
$config['total_rows'] = $this->countPastes($ip_address);
|
||||
$config['per_page'] = $amount;
|
||||
@ -420,6 +422,14 @@ class Pastes extends CI_Model
|
||||
$config['uri_segment'] = $seg;
|
||||
$this->pagination->initialize($config);
|
||||
$data['pages'] = $this->pagination->create_links();
|
||||
|
||||
//total spam attempts
|
||||
$this->db->select('SUM(spam_attempts) as sum');
|
||||
$query = $this->db->get('blocked_ips');
|
||||
$q = $query->result_array();
|
||||
$data['total_spam_attempts'] = $q[0]['sum'];
|
||||
|
||||
//return
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php $this->load->view('defaults/header');?>
|
||||
<h1><a href="<?php echo site_url('spamadmin'); ?>">Spamadmin</a> - blocked IP ranges</h1>
|
||||
<h1><a href="<?php echo site_url('spamadmin'); ?>">Spamadmin</a> - blacklist</h1>
|
||||
|
||||
<?php
|
||||
function checkNum($num){
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php $this->load->view('defaults/header');?>
|
||||
<h1>Spamadmin</h1>
|
||||
<p>51 spam-pastes eaten so far. <a href="<?php echo site_url('spamadmin/blacklist'); ?>">View blocked IPs</a>.</p>
|
||||
<p><?php echo $total_spam_attempts; ?> spam-pastes eaten so far. <a href="<?php echo site_url('spamadmin/blacklist'); ?>">View blocked IPs</a>.</p>
|
||||
|
||||
<?php
|
||||
function checkNum($num){
|
||||
|
Loading…
x
Reference in New Issue
Block a user