/home/techb158/exp.abdallabala.com/application/autoload
Edit: /home/techb158/exp.abdallabala.com/application/autoload/Paginator.php (6122B)
where_like($w1, $c1)
->count();
} elseif ($w2 != '') {
$totalReq = ORM::for_table($table)
->where_like($w1, $c1)
->where($w2, $c2)
->count();
} elseif ($w3 != '') {
$totalReq = ORM::for_table($table)
->where($w1, $c1)
->where($w2, $c2)
->where($w3, $c3)
->count();
} elseif ($w4 != '') {
$totalReq = ORM::for_table($table)
->where($w1, $c1)
->where($w2, $c2)
->where($w3, $c3)
->where($w4, $c4)
->count();
} else {
$totalReq = ORM::for_table($table)->count();
}
$i = 0;
$page = $page == 0 ? 1 : $page;
$start = ($page - 1) * $per_page;
$prev = $page - 1;
$next = $page + 1;
$lastpage = ceil($totalReq / $per_page);
$lpm1 = $lastpage - 1;
$limit = $per_page;
$startpoint = $page * $limit - $limit;
if ($lastpage >= 1) {
$pagination .= '";
// exit;
if ($totalReq == '') {
$totalReq = '0';
}
if ($page == '') {
$page = '0';
}
////////////////////////////////////////////////////////////////////////////////////////////
} else {
}
$gen = [
"startpoint" => $startpoint,
"limit" => $limit,
"found" => $totalReq,
"page" => $page,
"lastpage" => $lastpage,
"contents" => $pagination,
];
return $gen;
}
}