commonsql_model->page_access_check($role,$userid,$module,$submodule,$page); //echo $CI->db->last_query(); if($page_access_module->num_rows()>0){ return TRUE; }else{ return FALSE; } } } function times_counter($time){ $seconds = 0; foreach($time as $t) { $new=$t.":00"; $timeArr = array_reverse(explode(":", $new)); foreach ($timeArr as $key => $value) { if ($key > 2) break; $seconds += pow(60, $key) * $value; } } $hours = floor($seconds / 3600); $mins = floor(($seconds - ($hours*3600)) / 60); //$secs = floor($seconds % 60); echo $hours.':'.$mins; }