-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
147 lines (111 loc) · 5.6 KB
/
index.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
session_start();
require 'requirelanguage.php';
include 'library/configServer.php';
include 'library/consulSQL.php';
$_SESSION['t-index']=date('s');
// echo $_SESSION['t-index-m']=date('s');
include './inc/link.php';
?>
<!DOCTYPE html>
<html lang="es">
<head><meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
<link href="https://panel.chatcompose.com/static/global/export/css\main.af14124f.css" rel="stylesheet"> <script async type="text/javascript" src="https://panel.chatcompose.com/static/global/export/js\main.82da0a06.js" user="cecilio1877-ChatControl"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-156978057-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-156978057-2');
</script>
<!-- clicky -->
<script>var clicky_site_ids = clicky_site_ids || []; clicky_site_ids.push(101232897);</script>
<script async src="//static.getclicky.com/js"></script>
<title><?php echo $inicio; ?></title>
</head>
<body id="container-page-index">
<?php include './inc/navbar.php';?>
<div class="jumbotron" id="jumbotron-index">
<h1><span class="tittles-pages-logo">Lunch Fast</span> <small style="color: #fff;">Ecuador</small></h1>
<p>
<!--Visitas:--> <script type="text/javascript" src="http://localhost/OnlineStore/process/visitas.php"></script>
<br> <?php echo $Bienvenido;
?>
</p>
</div>
<section id="new-prod-index">
<div class="container">
<div class="page-header">
<h1><?php echo $nvdds; ?><small><?php echo $prs; ?></small></h1>
</div>
<div class="row">
<?php
$busca="";
$busca=$_POST["busca"];
$consultabusca= ejecutarSQL::consultar("select * from producto where NombreProd like '%".$busca."%'");
$totalproductosbusca = mysqli_num_rows($consultabusca);
if($totalproductosbusca>0){
$nums=1;
while($fila=mysqli_fetch_array($consultabusca)){
echo '
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="thumbnail">
<a href="infoProd.php?CodigoProd='.$fila['CodigoProd'].'"><img src="assets/img-products/'.$fila['Imagen'].'"></a>
<div class="caption">
<h3>'.$fila['NombreProd'].'</h3>
<p>Cantidad: '.$fila['Stock'].'</p>
<p>Precio: $'.$fila['Precio'].'</p>
<p>Hora maxima del pedido: '.$fila['Marca'].' horas.</p>
<p class="text-center">
<a href="infoProd.php?CodigoProd='.$fila['CodigoProd'].'" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> Detalles</a>
<button value="'.$fila['CodigoProd'].'" class="btn btn-success btn-sm botonCarrito"><i class="fa fa-shopping-cart"></i> Añadir</button>
</p>
</div>
</div>
</div>
';
if ($nums%4==0){
echo '<div class="clearfix"></div>';
}
$nums++;
}
}else{
echo '<h2>No hay productos en esta categoria</h2>';
}
?>
</div>
</div>
</section>
<section id="reg-info-index">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-6 text-center">
<article style="margin-top:20%;">
<p><i class="fa fa-users fa-4x"></i></p>
<h3><?php echo $inregi; ?></h3>
<p> <?php echo $regtcli; ?> <span class="tittles-pages-logo">Lunch Fast</span><?php echo $parareci; ?></p>
<p><a href="registration.php" class="btn btn-info btn-block"><?php echo $inregi; ?></a></p>
</article>
</div>
<div class="col-xs-12 col-sm-6">
<img src="assets/img/Smart-TV-RegInfo.png" alt="Smart-TV" class="img-responsive">
</div>
</div>
</div>
</section>
<?php include './inc/footer.php';
?>
</body>
</html>
<?php
if ($_SESSION['nombreUser'] != "")
$usuario = $_SESSION['nombreUser'];
else if ($_SESSION['nombreAdmin'] != "")
$usuario = $_SESSION['nombreAdmin'];
$codigo = "INGRESO_OK_INDEX";
$curPageName = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
$tipoAccion = "INGRESO";
$mensaje = "USUARIO INGRESO CORRECTAMENTE A INDEX[".$tipoAccion.": ".$codigo."]";
ejecutarSQL::consultar("insert ACCIONES values ('$codigo','$usuario','$tipoAccion','$mensaje','$curPageName',CURRENT_TIMESTAMP) ");
?>