Php
function Get_links_list_all ($key)
{
$result = Get_filter ();
if ($result = = = False)
{
$filter = Array ();
$filter [' sort_by '] = Empty ($_request[' sort_by ')? ' user_id ': Trim ($_request[' sort_by ');
$filter [' sort_order '] = Empty ($_request[' sort_order ')? ' DESC ': Trim ($_request[' sort_order ');
$sql = ' SELECT COUNT (*) from '. $GLOBALS [' ECS ']->table (' users '). " WHERE employee_key= ' $key ';
$filter [' record_count '] = $GLOBALS [' db ']->getone ($sql);
$filter = page_and_size($filter); $sql = 'SELECT * FROM ' .$GLOBALS['ecs']->table('users'). " WHERE employee_key='$key'"; set_filter($filter, $sql);}else{ $sql = $result['sql']; $filter = $result['filter'];}$res = $GLOBALS['db']->selectLimit($sql, $filter['page_size'], $filter['start']);$list = array();while ($rows = $GLOBALS['db']->fetchRow($res)){ date_default_timezone_set('PRC'); $rows['reg_time']=date('Y-m-d H:i:s',$rows['reg_time']); $list[] = $rows;}return array('list' => $list, 'filter' => $filter, 'page_count' => $filter['page_count'], 'record_count' => $filter['record_count']);
}