static function savelog($camp_id, $device_id, $acc_id, $status, $log_text, $log_multicast_id)
 {
     $nl = new PushLoggerCaps();
     $nl->log_camp_id = $camp_id;
     $nl->log_device_id = $device_id;
     $nl->log_macc_id = $acc_id;
     $nl->log_status = $status;
     $nl->log_text = $log_text;
     $nl->log_multicast_id = $log_multicast_id;
     $nl->log_date = leap_mysqldate();
     $nl->log_active = 1;
     //        $nl->log_app_id = $log_app_id;
     //        $nl->log_client_id = $client_camp_id;
     return $nl->save();
 }
 function deleteByLogID()
 {
     if (Efiwebsetting::getData('checkOAuth') == 'yes') {
         IMBAuth::checkOAuth();
     }
     $macc_id = addslashes($_POST['acc_id']);
     $lid = addslashes($_POST['lid']);
     $psl = new PushLoggerCaps();
     $psl->getByID($lid);
     $json['status_code'] = 0;
     if ($psl->log_macc_id == $macc_id) {
         //tidak active lagi
         $psl->log_active = 0;
         $psl->load = 1;
         if ($psl->save()) {
             $json['status_code'] = 1;
         }
     }
     echo json_encode($json);
     die;
 }