Beispiel #1
0
  <tbody>
    <tr>
      <th class="<?php 
echo table_sort($filter, 'email');
?>
">email</th>
      <th class="<?php 
echo table_sort($filter, 'first_name');
?>
">first</th>
      <th class="<?php 
echo table_sort($filter, 'last_name');
?>
">last</th>
      <th class="<?php 
echo table_sort($filter, 'phone');
?>
">phone</th>
    </tr>
    <?php 
foreach ($user_list as $user) {
    ?>
    <tr>
      <td><a href="<?php 
    echo base_url() . 'index.php/user/read/' . $user['id'];
    ?>
"><?php 
    echo $user['email'];
    ?>
</a></td>
      <td><?php 
Beispiel #2
0
function table_sort_second_time(&$matrix, $column_sorted, $column_to_sort){
	$sorted=array();
	$new_matrix=array();
	foreach($matrix as $row_id=>$row){
		$sorted[$row[$column_sorted]][$row_id]=$row;
	}
	
	foreach($sorted as $sorted_key=>$submatrix){
		table_sort($submatrix, $column_to_sort, 'asc');
		$new_matrix+=$submatrix;
	}
	
	$matrix=$new_matrix;
}
Beispiel #3
0
<table class="sortable">
  <tbody>
    <tr>
      <th class="<?php 
echo table_sort($filter, 'name');
?>
">event name</th>
      <th class="<?php 
echo table_sort($filter, 'date_start');
?>
">start</th>
      <th class="<?php 
echo table_sort($filter, 'date_end');
?>
">end</th>
      <th class="not-sortable"><?php 
echo $search_field_label;
?>
</th>
    </tr>
    <?php 
foreach ($event_list as $event) {
    ?>
    <tr>
      <td><a href="<?php 
    echo site_url();
    ?>
/event/read/<?php 
    echo $event['id'];
    ?>
"><?php 
Beispiel #4
0
  <tbody>
    <tr>
      <th class="<?php 
echo table_sort($filter, 'name');
?>
">product name</th>
      <th class="<?php 
echo table_sort($filter, 'price');
?>
">price</th>
      <th class="<?php 
echo table_sort($filter, 'model');
?>
">model</th>
      <th class="<?php 
echo table_sort($filter, 'type');
?>
">type</th>
    </tr>
    <?php 
foreach ($product_list as $p) {
    ?>
    <tr>
      <td><a href="<?php 
    echo site_url();
    ?>
/product/read/<?php 
    echo $p['id'];
    ?>
"><?php 
    echo $p['name'];