CI Easy Flexgrid Table

October 13th, 2011

 

Download complete source code: here

Controller:

class Flexgrid extends CI_Controller {

function __construct() {
parent::__construct();
$this->load->model('flexgrid_model');
}

function index() {
$this->template->load("template", "flexgrid");
}

function jsondata($toLoad = 'list', $page = null, $search = null) {
switch ($toLoad) {
case 'list':
echo $this->flexgrid_model->getList($page, $search);
break;
default:
echo 'No Record Found.';
}
}

}

 

Model:

class Flexgrid_model extends CI_Model {

function __construct() {
parent::__construct();
$this->load->library("flex_table");
}

function SelectbyId($id) {
$this->db->where('id', $id);
return $this->db->get('signups');
}

function getList($page = null, $search = null) {
$sql = "Select users_id,user_fname,user_mname,user_lname,designation from acl_users
Where user_fname like '%$search%' OR user_lname like '%$search%'
order by user_fname ASC";
return $this->flex_table->getJSONRecord($sql, $search, $page, 10);
}

}

 

View:


cellpadding="2" cellspacing="0" id="usersTbl" name="usersTbl">First NameMiddle NameLast NameDesignation

jQuery Inline AJAX ComboPageLoader

August 24th, 2011

This jQuery plug-in used to simplified the ambitious loading of AJAX links. See sample usage:

        Add
        |
        Edit
        |
        Delete

This jQuery plugin is part of jquery.pagectrl.js in CI Easy Flexgrid Table

Dependencies:
jQuery, jQuery UI, jQuery facebox plugin

How to retrieve hidden files and folders using attrib command

October 6th, 2011

Some computer virus can hide you folders or files in your USB disk.

This is the command.

  1. Using cmd.exe
  2. Add type this command:  [usb drive]:\ attrib -s -h /s /d