</td> <td style="border-left: 1px solid rgb(204, 204, 204); font-weight: bold;border-top:1px solid #CCCCCC;"> <img align="left" style="border: medium none;margin-top:2px;" src="../images/options3.png"> <b>Quản lý</b> </td> </tr> <?php include_once "/user/xulycacloaitin.php"; if (isset($curUserId)) { if (isset($_REQUEST["type"])) { echo MessageTypeProcessor::loadAllMessage($curUserId); } else { $result = MessageTypeProcessor::findSearchInContext($curUserId); if ($result != null) { echo $result; } else { echo MessageTypeProcessor::loadAllMessage($curUserId); } } } ?> </table> </div> </div> </div> </td> <!--/form> < End form --> </tr> </table> </td>
public static function findSearchContext2($strLink, $strSQL) { $curPage = 1; $totalItems = null; $business = null; if (isset($_REQUEST['page'])) { $curPage = $_REQUEST['page']; } $maxItems = 5; $maxPages = 25; $offset = ($curPage - 1) * $maxItems; $strCountSQL = str_replace("*", " count(*) ", $strSQL); $totalItems = DichVuBUS::countAllBySQL($strCountSQL); $strSQL .= " limit {$offset},{$maxItems}"; $business = DichVuBUS::getAllBySQL($strSQL); return MessageTypeProcessor::display($strLink, $business, $totalItems, $curPage, $maxPages, $maxItems); }