mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
sessionlist
This commit is contained in:
parent
e5afc20e9b
commit
8a5d5f2844
@ -53,6 +53,7 @@ $route['lists'] = 'main/lists';
|
||||
$route['lists/rss'] = 'main/lists/rss';
|
||||
$route['lists/:num'] = 'main/lists/$1';
|
||||
$route['spamadmin/:num'] = 'spamadmin/index';
|
||||
$route['spamadmin/session/:any'] = 'spamadmin/session';
|
||||
$route['about'] = 'main/about';
|
||||
|
||||
$route['iphone/:num'] = 'iphone';
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Function list:
|
||||
* - __construct()
|
||||
* - index()
|
||||
* - session()
|
||||
* Classes list:
|
||||
* - Spamadmin extends CI_Controller
|
||||
*/
|
||||
@ -22,4 +23,12 @@ class Spamadmin extends CI_Controller
|
||||
$data = $this->pastes->getSpamLists();
|
||||
$this->load->view('spamlist', $data);
|
||||
}
|
||||
|
||||
function session()
|
||||
{
|
||||
$this->load->model('pastes');
|
||||
$session_id = 'sdf';
|
||||
$data = $this->pastes->getSpamLists($session_id);
|
||||
$this->load->view('list_sessionid', $data);
|
||||
}
|
||||
}
|
||||
|
44
htdocs/application/views/list_sessionid.php
Executable file
44
htdocs/application/views/list_sessionid.php
Executable file
@ -0,0 +1,44 @@
|
||||
<?php $this->load->view('defaults/header');?>
|
||||
<h1>Spamadmin</h1>
|
||||
|
||||
<?php
|
||||
function checkNum($num){
|
||||
return ($num%2) ? TRUE : FALSE;
|
||||
}
|
||||
$n = 0;
|
||||
if(!empty($pastes)){ ?>
|
||||
<table class="recent">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="title">Title</th>
|
||||
<th class="name">Name</th>
|
||||
<th class="lang">Language</th>
|
||||
<th class="time">When</th>
|
||||
<th class="time">Session</th>
|
||||
</tr>
|
||||
<?php foreach($pastes as $paste) {
|
||||
if(checkNum($n) == TRUE) {
|
||||
$eo = "even";
|
||||
} else {
|
||||
$eo = "odd";
|
||||
}
|
||||
$n++;
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $eo; ?>">
|
||||
<td class="first"><a href="<?php echo site_url("view/".$paste['pid']); ?>"><?php echo $paste['title']; ?></a></td>
|
||||
<td><?php echo $paste['name']; ?></td>
|
||||
<td><?php echo $paste['lang']; ?></td>
|
||||
<td><?php $p = explode(",", timespan($paste['created'], time())); echo $p[0]; ?> ago.</td>
|
||||
<td><a href="<?php echo site_url('spamadmin/session/' . $paste['session_id']) ?>">[<?php echo substr($paste['session_id'], 0, 8); ?>...]</a></td>
|
||||
</tr>
|
||||
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } else { ?>
|
||||
<p>There have been no pastes :(</p>
|
||||
<?php }?>
|
||||
<?php echo $pages; ?>
|
||||
<div class="spacer"></div>
|
||||
<?php $this->load->view('defaults/footer');?>
|
Loading…
x
Reference in New Issue
Block a user