コード例 #1
0
 function ProcessRequest()
 {
     $Obj = new Mahasiswa();
     $totalData = $Obj->GetCountMahasiswa();
     $itemViewed = 5;
     $currPage = 1;
     $startRec = 0;
     if (isset($_GET['page'])) {
         $currPage = (string) $_GET['page']->StripHtmlTags()->SqlString()->Raw();
         $startRec = ($currPage - 1) * $itemViewed;
     }
     $return['dataMahasiswa'] = $Obj->GetListMahasiswa($startRec, $itemViewed);
     $url = Dispatcher::Instance()->GetUrl(Dispatcher::Instance()->mModule, Dispatcher::Instance()->mSubModule, Dispatcher::Instance()->mAction, Dispatcher::Instance()->mType);
     $destination_id = "subcontent-element";
     Messenger::Instance()->SendToComponent('paging', 'Paging', 'view', 'html', 'paging_top', array($itemViewed, $totalData, $url, $currPage, $destination_id), Messenger::CurrentRequest);
     $return['start_number'] = $startRec + 1;
     return $return;
 }