-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMisPedidos.php
125 lines (109 loc) · 3.23 KB
/
MisPedidos.php
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!--
"pagina descripción de productos por busqueda"
VERSIÓN 2.1
AUTOR CM.Soft
CopyRight 2020
Todos los derechos reservados
-->
<?php
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
session_start();
include './library/consulSQL.php'; //Conexión a la base de datos
include './inc/link.php'; //Enlace de estilos y librerias incluidas
include './inc/navbar.php'; //Brra de navegación
?>
<!DOCTYPE html>
<html lang="es">
<head>
<title>Mis Pedidos</title> <!-- Titulo de la pagina -->
</head>
<body id="container-page-product"> <!-- Cuerpo de la pagina -->
<!--Sección Pedidos del cliente -->
<section id="store">
<div class="container">
<div class="page-header">
<h1>Mis pedidos <small class="tittles-pages-logo">Farmaceutica San Gabriel
</small> </h1>
</div>
<!--Panel pedidos-->
</div>
<!--Mensaje de entrega-->
<div class="panel panel-warning">
<div class="panel-heading">
<h6>tiempo estimado de entrega de 30 minutos a 1 hora.
Si su pedido se atrasa mas de una hora nuestros asesores
se pondrán en contacto con usted, o bien comuníquese al teléfono
<strong style="color: black">33-18-54-22-64 </strong>
o al correo <strong style="color: black">[email protected]
</strong> </h6>
</div>
<div class="table-responsive">
<!--tabla de pedidos-->
<table class="table table-bordered">
<tr>
<th class="text-center" >Folio</th>
<th class="text-center">Fecha</th>
<th class="text-center">Cliente</th>
<th class="text-center">Dirección de envio</th>
<th class="text-center">Total</th>
<th class="text-center">Estado</th>
<th class="text-center">Opciones</th>
</tr>
<?php
//Consulta para mostrar las ventas del cliente
$pedidoU= ejecutarSQL::consultar(
"select * from venta where NIT='".$_SESSION['nombreUser']."'"."");
$upp=1;
//Ciclo para mostrar las ventas del cliente
while($peU=mysql_fetch_array($pedidoU)){
echo '
<div id="update-pedido">
<form method="post" action="process/delPedido.php"
id="res-update-pedido-'.$upp.'">
<tr>
<td>'.$peU['NumPedido'].'<input type="hidden"
name="num-pedido" value="'.$peU['NumPedido'].'"></td>
<td>'.$peU['Fecha'].'</td>
<td>'.$peU['NIT'].'</td>
<td>'.$peU['DirecEnvio'].'</td>
<td>'.$peU['TotalPagar'].'</td>
<td>';
if( $peU['Estado']=="Pendiente"){
echo $peU['Estado'];
}
if($peU['Estado']=="Entregado"){
echo $peU['Estado'];
}
if($peU['Estado']=="Declinado"){
echo $peU['Estado'];
}
if( $peU['Estado']=="Pendiente"){
echo '
</td>
<td class="text-center">
<button type="submit" class="btn btn-sm btn-primary button-UPPE"
value="res-update-pedido-'.$upp.'">Eiminar o Cancelar </button>
<div id="res-update-pedido-'.$upp.'" style="width: 170%;
margin:0px; padding:0px;"></div></td>
</tr>
</form>
</div>';
}else{
echo'</td>
<td class="text-center">
Sin Acciones
</td>
</tr>
</form>
</div>';
}
$upp=$upp+1; //Actualizador del contador para incrementar las filas
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>