Ejemplo n.º 1
0
     $msgs = $outbox->getOutboxMsgs();
     foreach ($msgs as $msg) {
         if (!$msg->error) {
             $msg->delete();
         }
     }
     exit();
 }
 
 $mbox = new Mailbox($uid, $course_id);
 
 $limit = intval($_GET['iDisplayLength']);
 $offset = intval($_GET['iDisplayStart']);
 
 //Total records
 $data['iTotalRecords'] = $mbox->MsgsNumber($mbox_type);
 
 $keyword = $_GET['sSearch'];
 
 if ($mbox_type == 'inbox') {
     //Total records after applying search filter
     $data['iTotalDisplayRecords'] = count($mbox->getInboxMsgs($keyword));
     
     $msgs = $mbox->getInboxMsgs($keyword, $limit, $offset);
 } else {
     //Total records after applying search filter
     $data['iTotalDisplayRecords'] = count($mbox->getOutboxMsgs($keyword));
     
     $msgs = $mbox->getOutboxMsgs($keyword, $limit, $offset);
 }