forked from styp152/SAEC-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenviarSMS.php
More file actions
29 lines (25 loc) · 699 Bytes
/
enviarSMS.php
File metadata and controls
29 lines (25 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
include('libreria.php');
include('clases/Factura.php');
include('clases/Cliente.php');
include('db/searchs.php');
conectarDB();
$codigo = $_REQUEST['Codigo'];
$texto = $_REQUEST['text'];
$factura = buscarFacturaPorCodigo($codigo);
$cliente = new Cliente();
$cliente->setCedula($factura->getCedulaCliente());
$cliente = buscarClientePorCedula($cliente);
if($cliente->getTelefono()==''){
?>
<script type="text/javascript">
alert('No se Puede Enviar SMS al Cliente porque no Tiene Telefono Registrado');
location.href='coladisenio.php';
</script>
<?php
}
sendSMS($cliente->getTelefono(), $texto);
?>
<script type="text/javascript">
location.href='coladisenio.php';
</script>