Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. function dt_ajax_get_all() {
  2.         $users_table = $this->_table;
  3.         $roles_table = $this->_roles_table;
  4.         $edit = "<a href=" . site_url('auth/change_user_info/$1') . " title='Edit'><img src=" . base_url('assets/images/icons/small/grey/create%20write.png') . " width='18' height='18' alt='edit'/></a>";
  5.         $lock = "<a  id='del_id_$1' href='#' onclick='lockUser($1)' title='Lock' ><img src=" . base_url('assets/images/icons/small/grey/Acces%20Denied%20Sign.png') . " width='18' height='18' alt='Lock user'/></a>";
  6.         $this->load->helper("datatables_helper");
  7.         $this->datatables->select("$users_table.username as username,$users_table.email,$roles_table.name AS role_name,$users_table.banned as is_locked,$users_table.last_ip,$users_table.last_login as user_last_login,$users_table.created as user_created,$users_table.id as user_id", FALSE);
  8.         $this->datatables->from($this->_table);
  9.         $this->datatables->join($roles_table, "$roles_table.id = $users_table.role_id");
  10.         $this->datatables->edit_column('user_id', $edit . $lock, 'user_id');
  11.         $this->datatables->edit_column('is_locked', '$1', "lock_to_YN(is_locked)");
  12.         $this->datatables->edit_column('user_last_login', '$1', "formatdate(user_last_login)");
  13.         $this->datatables->edit_column('user_created', '$1', "formatdate(user_created)");
  14.         return $this->datatables->generate();
  15.     }