$mesg = $_REQUEST['smsmessage']; $smsname = $_REQUEST['smsname']; if ($_REQUEST['date'] != "TODAY" || $_REQUEST['time'] != "NOW") { $date = $_REQUEST['date']; $time = $_REQUEST['time']; if ($date == "TODAY") { $date = date('m/d/y'); } $times = epoch_sheduling($time, $date); //get the number of seconds that will elapse before sending message- wrt to the birth of unix $dateArray = getdate(); $dates = "{$dateArray['weekday']} {$dateArray['month']} {$dateArray['mday']}, {$dateArray['year']} By {$dateArray['hours']}:{$dateArray['minutes']}:{$dateArray['seconds']}"; $_SESSION['message'] = "{$dates}<hr/>"; foreach ($csv_array as $number_from_csv) { if (strlen($number_from_csv) >= 11) { sheduleSMS($_SESSION['phoneNo'], $mesg, $smsname, $number_from_csv, $times); } } $_SESSION['message'] .= "<p>Dear User, Your SMS Will be sent to " . $csv . " " . $date . " at " . $time . "<br/></p>"; echo $_SESSION['message']; exit; } $sql = "SELECT * FROM TRUNKregistration WHERE phoneNo = {$_SESSION['phoneNo']}"; $result = @mysql_query($sql); $row = @mysql_fetch_array($result); $units = $row['SMSunits']; $dateArray = getdate(); $date = "{$dateArray['weekday']} {$dateArray['month']} {$dateArray['mday']}, {$dateArray['year']} By {$dateArray['hours']}:{$dateArray['minutes']}:{$dateArray['seconds']}"; $_SESSION['message'] = "{$date}<hr/>"; ////////////////////////////////////////////// foreach ($csv_array as $number_from_csv) {
if (!empty($_REQUEST['phone']) && !empty($_REQUEST['smsmessage']) && !empty($_REQUEST['smsname'])) { $phoneNumber = $_REQUEST['phone']; $mesg = $_REQUEST['smsmessage']; $smsname = $_REQUEST['smsname']; if ($_REQUEST['date'] != "TODAY" || $_REQUEST['time'] != "NOW") { $date = $_REQUEST['date']; $time = $_REQUEST['time']; if ($date == "TODAY") { $date = date('m/d/y'); } $times = epoch_sheduling($time, $date); //get the number of seconds that will elapse before sending message- wrt to the birth of unix $dateArray = getdate(); $dates = "{$dateArray['weekday']} {$dateArray['month']} {$dateArray['mday']}, {$dateArray['year']} By {$dateArray['hours']}:{$dateArray['minutes']}:{$dateArray['seconds']}"; $_SESSION['message'] = "{$dates}<hr/>"; if (sheduleSMS($_SESSION['phoneNo'], $mesg, $smsname, $phoneNumber, $times)) { $_SESSION['message'] .= "<p>Dear User, Your SMS Will be sent to " . $phoneNumber . " " . $date . " at " . $time . "<br/></p>"; } else { $_SESSION['message'] .= "<p>Dear User, The Sheduling features of TrunkSMS will be coming up soon. Thanks<br/></p>"; } echo $_SESSION['message']; exit; } $sql = "SELECT * FROM TRUNKregistration WHERE phoneNo = {$_SESSION['phoneNo']}"; $result = @mysql_query($sql); $row = @mysql_fetch_array($result); $units = $row['SMSunits']; $dateArray = getdate(); $date = "{$dateArray['weekday']} {$dateArray['month']} {$dateArray['mday']}, {$dateArray['year']} By {$dateArray['hours']}:{$dateArray['minutes']}:{$dateArray['seconds']}"; $_SESSION['message'] = "{$date}<hr/>"; if ($units > 1 || $units == 1) {