/
sessions_overview.php
78 lines (59 loc) · 2.24 KB
/
sessions_overview.php
1
<div id="sessions_container"> <h1>Sessions</h1> <?php $this->load->view('pagebits/page_buttons'); ?> <div id="sessions_content"> <h2>Overview</h2> <?php $this->object =& get_instance(); $tmpl = array ( 'table_open' => '<table class="overview">', 'heading_row_start' => '<tr class="titles">', 'heading_row_end' => '</tr>', 'heading_cell_start' => '<th align="left">', 'heading_cell_end' => '</th>', 'row_start' => '<tr class="overview_data">', 'row_end' => '</tr>', 'cell_start' => '<td>', 'cell_end' => '</td>', 'row_alt_start' => '<tr class="overview_data">', 'row_alt_end' => '</tr>', 'cell_alt_start' => '<td>', 'cell_alt_end' => '</td>', 'table_close' => '</table>' ); $this->object->load->library('table'); $this->object->table->set_template($tmpl); $this->object->table->set_heading(array(' ', 'Time Created', 'Last Activity', 'Session ID', 'User ID', 'User Name')); $i = 0; foreach($sessions as $session_row){ $this->object->table->add_row(array( '<input type="checkbox" class="checkbox_clear" name="session_' . $i . '"/>', date( 'h:ia d/m/y', $session_row['time_created']), date('h:ia d/m/y', $session_row['last_activity']), $session_row['session_id'], $session_row['user_id'], anchor('/sessions/user/' . $session_row['user_id'], $session_row['username']) )); $i++; } echo $this->object->table->generate(); ?> <table class="overview"> <tr class="options_divider"> <td colspan="7"> </td> <tr> <tr class="options"> <td colspan="7"> <div id="option_buttons"> <span class="all_button"> </span> <a href="#">edit</a> <a href="#">delete</a> </div> </td> <tr> </table> </div> </div>