Example #1
0
$unicode = trim($_REQUEST['unicode']) ? trim($_REQUEST['unicode']) : 0;
// DS specifics
$slid = trim($_REQUEST['slid']);
$c = trim($_REQUEST['c']);
$last = trim($_REQUEST['last']);
// default error return
$ret = "ERR 102";
if ($op) {
    $ta = $op;
}
if ($ta) {
    switch ($ta) {
        case "PV":
            if ($u && $p) {
                if (validatelogin($u, $p)) {
                    $ret = webservices_pv($u, $to, $msg, $type, $unicode);
                } else {
                    $ret = "ERR 100";
                }
            }
            break;
        case "BC":
            if ($u && $p) {
                if (validatelogin($u, $p)) {
                    $ret = webservices_bc($u, $to, $msg, $type, $unicode);
                } else {
                    $ret = "ERR 100";
                }
            }
            break;
        case "DS":
Example #2
0
             $json = webservices_login_key_set($data_username);
         } else {
             $json['status'] = 'ERR';
             $json['error'] = '625';
         }
     } else {
         $json['status'] = 'ERR';
         $json['error'] = '600';
     }
     $log_this = TRUE;
     break;
     // ------------------- INDIVIDUAL TASKS ------------------- //
 // ------------------- INDIVIDUAL TASKS ------------------- //
 case "PV":
     if ($u = webservices_validate($h, $u)) {
         $json = webservices_pv($u, $to, $msg, $type, $unicode, $nofooter, $footer, $from, $schedule);
     } else {
         $json['status'] = 'ERR';
         $json['error'] = '100';
     }
     $log_this = TRUE;
     break;
 case "DS":
     if ($u = webservices_validate($h, $u)) {
         $json = webservices_ds($u, $queue, $src, $dst, $dt, $smslog_id, $c, $last);
     } else {
         $json['status'] = 'ERR';
         $json['error'] = '100';
     }
     $log_this = TRUE;
     // ignore no data on log