Ejemplo n.º 1
0
<?php

include_once 'message/messageDB.php';
include_once 'message/communication.php';
// if(!empty($_POST['number'])){
// 	echo "number: ".$_POST['number'];
// 	echo "   sms: ".$_POST['send_message'];
// }
// if(!empty($_POST['received_message']) && $_POST['dbOps'] == "read message"){
// 	$filterMessage = DBOperations::filterMessageDetails($_POST['received_message']);
// 	DBOperations::sendMessageDetails($filterMessage);
// }
if (!empty($_POST['number']) && !empty($_POST['send_message'])) {
    $mobileNumber = Communication::prepareNumber($_POST['number']);
    Communication::sendMessage($_POST['send_message'], $mobileNumber);
}
//DBOperations::receiveMessages("hgsr hjk", "94713535362"); //Supplier request message
//DBOperations::displayMessageTable();
//DBOperations::receiveTicketMachine("0001 20", "94713535362"); //ticket machine message
?>

Ejemplo n.º 2
0
    $msg = '<div class="alert alert-warning alert-dismissable">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
  <h4>  <i class="icon fa fa-check"></i> Sorry!</h4>
  supplier allready exists , Please Try another one.
</div>';
    // $msg = "
    //       <div class='alert alert-error'>
    //     <button class='close' data-dismiss='alert'>&times;</button>
    //       <strong>Sorry !</strong>  email allready exists , Please Try another one
    //     </div>
    //     ";
} else {
    if ($supplier->register($scode, $fname, $lname, $nic, $iCheck, $email, $address_1, $mobile, $estate, $estate_name, $reg_no, $size_of_estate, $estate_address, $bankn, $branch, $account, $bankacc, $editor)) {
        $message = "Thalapalakanada Tea factory, username: 0001 password: {$nic} http://tsms.x10host.com/page/";
        if (!empty($mobile)) {
            $mobileNumber = Communication::prepareNumber($mobile);
            Communication::sendMessage($message, $mobileNumber);
        }
        echo '
<div class="row">
<div class="col-md-12">
  <div class="box">
    <div class="box-header">
      <h3 class="box-title">Supplier Settings</h3>
    </div>
    <div class="box-body">
      <p>Supplier Successfuly added to the database. Also You can change Supplier settings.</p>
      <a class="btn btn-app">
        <i href="supplieredit.php" class="fa fa-edit"></i> Edit
      </a>
      <a href="suppliers.php" class="btn btn-app">