// $pilaTmp = $_SESSION['pilaSesion']; $pilaTmp = $_REQUEST['pilaPhp']; $a = ""; //Declaramos la variable donde se almacenara el query $longitud = count($pilaTmp); //saco el numero de elementos for ($i = 0; $i < $longitud; $i++) { //Recorro todos los elementos $a .= "id_arreglo= {$pilaTmp[$i]} or "; //saco el valor de cada elemento } $a .= "id_arreglo= -1"; include "../bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM arreglo WHERE " . $a . " "); $Resultado = $NuevaConexion->getResultado(); while ($row = mysql_fetch_row($Resultado)) { ///* $NuevaConexion->Consulta("SELECT id_arreglo FROM carrito WHERE id_arreglo = " . $row[0] . " "); $idRepetido = $NuevaConexion->getResultado(); $repetido = mysql_fetch_row($idRepetido); //*/ $NuevaConexion->Consulta("SELECT * FROM carrito "); $vacio = $NuevaConexion->getResultado(); ///* if (!($row[0] == $repetido[0])) { $NuevaConexion->Consulta("INSERT INTO carrito(id_arreglo, precio, descripcion, ruta_imagen) \n\t\t\t\t\t\t\t\t\t\t VALUES ('{$row['0']}','{$row['1']}','{$row['2']}','{$row['3']}')"); } //*/ if ($vacio == null) {
<?php //tomamos los datos del archivo conexion.php $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM producto"); $Resultado = $NuevaConexion->getResultado(); echo "Lista de Productos<br><br>"; echo "<div style='text-align:center;'>"; echo "<table width='100%' border='1' bordercolor='#0E69AE' >"; echo "<tr>"; echo "<th>Folio</th>"; echo "<th>Producto</th>"; echo "<th>Tipo de Producto</th>"; echo "<th>Costo de compra</th>"; echo "<th>Existencia</th>"; echo "</tr>"; while ($row = mysql_fetch_row($Resultado)) { echo "<tr>"; echo "<td>{$row['0']}</td>"; echo "<td>{$row['1']}</td>"; echo "<td>{$row['2']}</td>"; echo "<td>{$row['3']}</td>"; echo "<td>{$row['4']}</td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; echo "<br><br><br>"; $NuevaConexion->Consulta("SELECT * FROM arreglo"); $Resultado = $NuevaConexion->getResultado(); $NuevaConexion->cerrarConexion();
<?php echo "<link rel='stylesheet' href='estilos.css'>"; echo "<body>"; include "conexion.php"; $usuario = $_POST['usuario']; $contraseña = $_POST['pass']; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM usuarios WHERE nombreUsuario = '{$usuario}' AND pass = '******'"); $Resultado = $NuevaConexion->getResultado(); $NuevaConexion->setNombre(); $nombre = $NuevaConexion->getNombre(); $NuevaConexion->cerrarConexion(); echo '<br><br><div align="center"> <img src="cargando.gif"> </div align="center">'; $count = mysql_num_rows($Resultado); if ($usuario == "ADMIN" && $contraseña == "ADMIN") { echo "\n\t\t\t<meta http-equiv='Refresh' content='1;URL=../inicio.php?op=" . "Ingresaste como SUPER USUARIO" . "'/>"; } else { if ($count == 1) { echo "\n\t\t\t<meta http-equiv='Refresh' content='1;URL=../inicio.php?op=" . $nombre . "'/>"; /* Echo " <meta http-equiv='Refresh' content='1;URL=inicio.php?op=".$NombreUsuario."'/>"; //header("location:uno.php"); //Damos Acceso al usuario*/ } else { echo "\n\t\t\t<meta http-equiv='Refresh' content='1;URL=../index.php?op=" . "false" . "'/>"; } } echo "</body>";
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="inicio/tabla.css" rel="stylesheet" type="text/css"> <script src="inicio/tabla.js"></script> </head> <body> <!-- Comentarios --> <br></br> <?php include "bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM arreglo WHERE top='si' and activo='si'"); $Resultado = $NuevaConexion->getResultado(); $NuevaConexion->cerrarConexion(); echo '<table id="tabla" style="margin: 0 auto;"> '; for ($i = 0; $i < 3; $i++) { echo "<tr>"; for ($j = 0; $j < 3; $j++) { $row = mysql_fetch_row($Resultado); echo "<td id='celda'><img id='imagen' src='../FloreriaAdm/producto/{$row['9']}'>"; echo "<br>{$row['1']}"; echo "<br>MXN {$row['7']}"; echo "<br><button type='submit' name='carrito' id='{$row['0']}'\n \t\t\t\t onclick='agregar_carrito(this.id)'>Agregar a Carrito</button>\n \t\t\t\t </td>"; } echo "</tr>"; } echo '</table>'; ?>
for ($k = 1; $k < $j; $k++) { $ConsultaNueva = "SELECT rutaImagen \n\tFROM Arreglo WHERE idArreglo='{$arregloId[$k]}'"; $NuevaConexion->Consulta($ConsultaNueva); $Resultado = $NuevaConexion->getResultado(); echo "<br>"; while ($row = mysql_fetch_row($Resultado)) { $arregloDireccion[$k] = $row[0]; } } for ($h = 1; $h < $k; $h++) { echo "<td><img src='../FloreriaAdm/producto/{$arregloDireccion[$h]}'width='150' height ='150' ></td>"; } $NuevaConexion->cerrarConexion(); $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM carrito"); $Resultado = $NuevaConexion->getResultado(); $arreglo = $Resultado; $NuevaConexion->cerrarConexion(); echo '<table id="tabla"> '; //echo "<th colspan='5'>Su pedido es el siguiente</th>"; echo "<tr id=info >"; while ($arreglo = mysql_fetch_row($Resultado)) { echo "<td>"; echo "<br>{$arreglo['2']}"; echo "<br>{$arreglo['3']}"; echo "</td>"; } echo "</tr>"; echo '</table>'; ?>
<?php $id = $_POST['id']; $nombre = $_POST['nombreProducto']; $tipo = $_POST['tipoProducto']; $costo = $_POST['costo']; $cantidad = $_POST['cantidad']; echo "Actualizacion de Usuario con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Producto: " . $nombre . '<br>'; echo "Tipo de Producto: " . $tipo . '<br>'; echo "Costo de Compra: " . $costo . '<br>'; echo "Existencia: " . $cantidad . '<br>'; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../productos.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("UPDATE producto\n SET \n idProducto='{$id} ',\n nombreProducto='{$nombre}',\n tipoProducto='{$tipo} ',\n costoCompraProducto='{$costo}' ,\n existenciaProducto='{$cantidad} ' WHERE idProducto = '{$id}' "); $Nueva->cerrarConexion();
<html> <body> <?php include "../bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $dell = $_POST['id']; $NuevaConexion->Consulta("DELETE FROM proveedor WHERE idProveedor = '{$dell}' "); $NuevaConexion->cerrarConexion(); echo "<script>"; echo "alert('Datos eliminados con exito');"; header('location: ../Proveedores.php'); echo "</script>"; ?> </html>
<html> <body> <?php include "../bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $dell = $_POST['id']; $NuevaConexion->Consulta("DELETE FROM producto WHERE idProducto= '{$dell}' "); $NuevaConexion->cerrarConexion(); echo "<script>"; echo "alert('Datos eliminados con exito');"; header('location: ../Productos.php'); echo "</script>"; ?> </html>
$id = $_POST['id']; $nombreEmpresa = $_POST['nombreEmpresa']; $nombre = $_POST['nombre']; $ape_pat = $_POST['apePaterno']; $ape_mat = $_POST['apeMaterno']; $tel = $_POST['telefono']; $correo = $_POST['correo']; $direccion = $_POST['direccion']; $rfc = $_POST['RFC']; echo "Alta de Proveedor con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Empresa: " . $nombreEmpresa . '<br>'; echo "Nombre: " . $nombre . '<br>'; echo "Paterno: " . $ape_pat . '<br>'; echo "Materno: " . $ape_mat . '<br>'; echo "Telefono: " . $tel . '<br>'; echo "Correo: " . $correo . '<br>'; echo "Direccion: " . $direccion . '<br>'; echo "RFC: " . $rfc . '<br>'; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../proveedores.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("INSERT INTO proveedor(idProveedor, nombreEmpresa, nombreProveedor, apPaProveedor, apMaProveedor,telefonoProveedor,correoProveedor,direccionFiscal,rfcProveedor) \n\t\tVALUES ('{$id}','{$nombreEmpresa} ','{$nombre}','{$ape_pat}','{$ape_mat}','{$tel}','{$correo}','{$direccion}','{$rfc}')"); $Nueva->cerrarConexion(); ?>
</div> </header> <div class="container"> <?php include "../bd/Conexion.php"; $busqueda = $_POST['buscarpor']; $buscar = $_POST['buscar']; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); if ($busqueda == "Folio") { echo "Busqueda por Folio"; $NuevaConexion->Consulta("SELECT * FROM arreglo WHERE idArreglo = '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarArreglo.php' method='post' >\n\t\t<BR>FOLIO <BR>\n\t\t\t<input type='text' name='id' size='7' value='" . $fila[0] . "'>\n\t\t\t<BR>Nombre del Arreglo<BR>\n\t\t\t<input type='text' name='nombreArreglo' size='20' value='" . $fila[1] . "'>\n\t\t\t<br>Categoria<br>\n\t\t\t<select name='Categoria'>\n\t\t\t<option>" . $fila[2] . "</option>\n\t\t\t<option>10 Mayo</option>\n\t\t\t<option>14 Febrero</option>\n\t\t\t<option>Cumpleaños</option>\n\t\t\t<option>Fiestas</option>\n\t\t\t<option>Velorio</option>\n\n\t\t\t</select>\n\t\t\t<BR><BR>Descripcion <BR>\n\t\t\t\n\t\t\t<BR>Flores<BR> \n\t\t\t\n\t\t\t<select name='Flores'>\n\t\t\t<option>" . $fila[3] . "</option>\n\t\t\t<option>Rosas</option>\n\t\t\t<option>Bugambilia</option>\n\t\t\t<option>Girasol</option>\n\t\t\t<option>Carnivora</option>\n\t\t\t</select>\n\t\t\t<br>Cantidad <br>\n\t\t\t<input type='text' name='CantidadFlores' size='5' value='" . $fila[4] . "'>\n\t\t\t<BR>Forma<BR> \n\t\t\t<select name='Forma'>\n\t\t\t<option>" . $fila[5] . "</option>\n\t\t\t<option>Corazon</option>\n\t\t\t<option>Osito</option>\n\t\t\t<option>Estrella</option>\n\t\t\t<option>Sin forma</option>\n\t\t\t</select>\n\t\t\t<BR>Adorno<BR> \n\t\t\t<select name='Adorno'>\n\t\t\t<option>" . $fila[6] . "</option>\n\t\t\t<option>Moño azul</option>\n\t\t\t<option>Moño naranja</option>\n\t\t\t<option>Sin moño</option>\n\t\t\t</select>\n\t\t\t<BR>Precio <BR>\n\t\t\t<input type='text' name='costo' size='20' value='" . $fila[7] . "'>\n\t\t\t<BR>¿Cuantos arreglos agregara?<BR>\n\t\t\t<input type='text' name='CantidadArreglo' size='20' value='" . $fila[8] . "'>\n\t\t\t\n\n\t\t\t\t<br><br><button type=' submit' size=' 20' name=' Guardar' > Actualizar</button >\n\t\t\t\n\t\t\t</form>\n\t\t\t<form action='../productos.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name=' Cancelar' > Cancelar </button >\n\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<form action='eliminarArreglo.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>"); } else { echo "<br><br>Folio no encontrado"; } } else { if ($busqueda == "Nombre") { echo "Busqueda Nombre de arreglo"; $NuevaConexion->Consulta("SELECT * FROM arreglo WHERE nombreArreglo = '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarArreglo.php' method='post' >\n\t\t<BR>FOLIO <BR>\n\t\t\t<input type='text' name='id' size='7' value='" . $fila[0] . "'>\n\t\t\t<BR>Nombre del Arreglo<BR>\n\t\t\t<input type='text' name='nombreArreglo' size='20' value='" . $fila[1] . "'>\n\t\t\t<br>Categoria<br>\n\t\t\t<select name='Categoria'>\n\t\t\t<option>" . $fila[2] . "</option>\n\t\t\t<option>10 Mayo</option>\n\t\t\t<option>14 Febrero</option>\n\t\t\t<option>Cumpleaños</option>\n\t\t\t<option>Fiestas</option>\n\t\t\t<option>Velorio</option>\n\n\t\t\t</select>\n\t\t\t<BR><BR>Descripcion <BR>\n\t\t\t\n\t\t\t<BR>Flores<BR> \n\t\t\t\n\t\t\t<select name='Flores'>\n\t\t\t<option>" . $fila[3] . "</option>\n\t\t\t<option>Rosas</option>\n\t\t\t<option>Bugambilia</option>\n\t\t\t<option>Girasol</option>\n\t\t\t<option>Carnivora</option>\n\t\t\t</select>\n\t\t\t<br>Cantidad <br>\n\t\t\t<input type='text' name='CantidadFlores' size='5' value='" . $fila[4] . "'>\n\t\t\t<BR>Forma<BR> \n\t\t\t<select name='Forma'>\n\t\t\t<option>" . $fila[5] . "</option>\n\t\t\t<option>Corazon</option>\n\t\t\t<option>Osito</option>\n\t\t\t<option>Estrella</option>\n\t\t\t<option>Sin forma</option>\n\t\t\t</select>\n\t\t\t<BR>Adorno<BR> \n\t\t\t<select name='Adorno'>\n\t\t\t<option>" . $fila[6] . "</option>\n\t\t\t<option>Moño azul</option>\n\t\t\t<option>Moño naranja</option>\n\t\t\t<option>Sin moño</option>\n\t\t\t</select>\n\t\t\t<BR>Precio <BR>\n\t\t\t<input type='text' name='costo' size='20' value='" . $fila[7] . "'>\n\t\t\t<BR>¿Cuantos arreglos agregara?<BR>\n\t\t\t<input type='text' name='CantidadArreglo' size='20' value='" . $fila[8] . "'>\n\t\t\t\n\n\t\t\t<br><br><button type=' submit' size=' 20' name=' Guardar' > Actualizar</button >\n\t\t\t\n\t\t\t</form>\n\t\t\t<form action='../productos.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name=' Cancelar' > Cancelar </button >\n\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\n\t<form action='eliminarArreglo.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>"); } else { echo "<br><br>Arreglo no encontrado";
<?php $id = $_POST['id']; $nombreEmpresa = $_POST['empresa']; $nom = $_POST['nom']; $pat = $_POST['apeP']; $mat = $_POST['apM']; $tel = $_POST['Tel']; $corr = $_POST['corr']; $Dirfis = $_POST['DirFi']; $rfc = $_POST['RFC']; echo "Actualizacion de Proveedor con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Empresa: " . $nombreEmpresa . '<br>'; echo "Nombre: " . $nom . '<br>'; echo "Paterno: " . $pat . '<br>'; echo "Materno: " . $mat . '<br>'; echo "Telefono: " . $tel . '<br>'; echo "Correo: " . $corr . '<br>'; echo "Direccion: " . $Dirfis . '<br>'; echo "RFC: " . $rfc . '<br>'; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../proveedores.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("UPDATE proveedor\n SET \n nombreEmpresa='{$nombreEmpresa} ',\n nombreProveedor='{$nom} ',\n apPaProveedor='{$pat}' ,\n apMaProveedor='{$mat}',\n telefonoProveedor = '{$tel}',\n correoProveedor = '{$corr}',\ndireccionFiscal = '{$Dirfis}',\n rfcProveedor = '{$rfc}' WHERE idProveedor = '{$id}' "); $Nueva->cerrarConexion();
$costo = $_POST['costo']; $existencia = $_POST['existencia']; $activo = $_POST['activo']; $top = $_POST['top']; $ruta = "fotosArreglos"; $archivoTemporal = $_FILES['imagen']['tmp_name']; $archivo = $_FILES['imagen']['name']; move_uploaded_file($archivoTemporal, $ruta . "/" . $archivo); $ruta = $ruta . "/" . $archivo; echo "Alta de Adorno con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Producto: " . $nombreArreglo . '<br>'; echo "Categoria: " . $categoria . '<br>'; echo "<br>Descripcion<br>"; echo "Usted dio de alta un arreglo para " . $categoria . " con " . $cantidadFlores . " " . $flores . " En forma de " . $forma . " con un " . $adorno; echo "<br><br>Costo por pieza: \$" . $costo . ' pesos<br>'; echo "Activo en listas: " . $activo . '<br>'; echo "Aparecera en el top: " . $top . '<br>'; echo "<img src='{$ruta}'>"; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../productos.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("INSERT INTO \n\t\t\tarreglo(idArreglo,\n\t\t\t\t nombreArreglo,\n\t \t\t\t categoriaArreglo,\n\t floresArreglo, \n\t cantidadFlores,\n\t formaArreglo,\n\t adornoArreglo,\n\t precioArreglo,\n\t existenciaArreglo,\n\t activo,\n\t top,\n\t rutaImagen\n\t ) \n\t\tVALUES ('{$id}',\n\t\t\t\t'{$nombreArreglo}',\n\t\t\t\t'{$categoria}',\n\t\t\t\t'{$flores}',\n\t\t\t\t'{$cantidadFlores}',\n\t\t\t\t'{$forma}',\n\t\t\t\t'{$adorno}',\n\t\t\t\t'{$costo}',\n\t\t\t\t'{$existencia}',\n\t\t\t\t'{$activo}',\n\t\t\t\t'{$top}',\n\t\t\t\t'{$ruta}')"); $Nueva->cerrarConexion(); ?>
</div> </header> <div class="container"> <?php include "../bd/Conexion.php"; $busqueda = $_POST['buscarpor']; $buscar = $_POST['buscar']; $id = ""; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); if ($busqueda == "ID") { echo "Busqueda por ID"; $NuevaConexion->Consulta("SELECT * FROM usuarios WHERE id= '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarUsuario.php' method='post' >\n\t\t\t\t<BR><br>Folio<BR>\n\t\t\t\t<input type=' text' name=' id' size=' 7' value='" . ($id = $fila[0] . "'>\n\t\t\t\t\n\t\t\t\t<BR>Nombre<BR>\n\t\t\t\t<input type=' text' name=' nombre' size=' 20' value='" . $fila[1] . "'> \n\t\t\t\t<BR>Apellido Paterno <BR>\n\t\t\t\t<input type=' text' name='apePaterno'size=' 20' value='" . $fila[2] . "'>\n\t\t\t\t<BR>Apellido Materno <BR>\n\t\t\t\t<input type=' text' name='apeMaterno' size=' 20' value='" . $fila[3] . "'>\n\t\t\t\t<BR>Tipo de usuario <BR>\n\t\t\t\t<select name=' tipoUsuario' value= '" . $fila[4] . "'>\n\t\t\t\t<option>" . $fila[4] . "</option>\n\t\t\t\t<option>Administrador</option>\n\t\t\t\t<option>Ventas</option>\n\t\t\t\t<option>Repartidor</option>\n\t\t\t\t</select>\n\t\t\t\t<BR>Nombre de usuario<BR>\n\t\t\t\t<input type=' text' name='nombreUsuario' size=' 20' value='" . $fila[5] . "'>\n\t\t\t\t<BR>Contraseña <BR>\n\t\t\t\t<input type=' text' name='contrasenia'size=' 20' value='" . $fila[6] . "'>\n\t\t\t\t<BR>Repita su contraseña <BR>\n\t\t\t\t<input type=' text' name='pruebaContrasenia' size=' 20' value='" . $fila[6] . "'>\n\t\t\n\t\t\t\t<br><BR>\n\n\n\t\t\t\t<button type=' submit' size=' 20' name='Guardar' > Actualizar</button >\n\t\t\n\t\t\t</form>\n\t\t\t\t<form action='../usuarios.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name='Cancelar' >Cancelar</button >\n\t\t\t\t</form>\n\n\t\t\t\t<form action='eliminarUsuario.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>")); } else { echo "<br><br>Folio no encontrado"; } } else { if ($busqueda == "Usuario") { echo "Busqueda por Usuario"; $NuevaConexion->Consulta("SELECT * FROM usuarios WHERE nombreUsuario = '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarUsuario.php' method='post' >\n\t\t\t\t<BR><br>Folio<BR>\n\t\t\t\t<input type=' text' name=' id' size=' 7' value='" . ($id = $fila[0] . "'>\n\t\t\t\t\n\t\t\t\t<BR>Nombre<BR>\n\t\t\t\t<input type=' text' name=' nombre' size=' 20' value='" . $fila[1] . "'> \n\t\t\t\t<BR>Apellido Paterno <BR>\n\t\t\t\t<input type=' text' name='apePaterno'size=' 20' value='" . $fila[2] . "'>\n\t\t\t\t<BR>Apellido Materno <BR>\n\t\t\t\t<input type=' text' name='apeMaterno' size=' 20' value='" . $fila[3] . "'>\n\t\t\t\t<BR>Tipo de usuario <BR>\n\t\t\t\t<select name=' tipoUsuario' value= '" . $fila[4] . "'>\n\t\t\t\t<option>" . $fila[4] . "</option>\n\t\t\t\t<option>Administrador</option>\n\t\t\t\t<option>Ventas</option>\n\t\t\t\t<option>Repartidor</option>\n\t\t\t\t</select>\n\t\t\t\t<BR>Nombre de usuario<BR>\n\t\t\t\t<input type=' text' name='nombreUsuario' size=' 20' value='" . $fila[5] . "'>\n\t\t\t\t<BR>Contraseña <BR>\n\t\t\t\t<input type=' text' name='contrasenia'size=' 20' value='" . $fila[6] . "'>\n\t\t\t\t<BR>Repita su contraseña <BR>\n\t\t\t\t<input type=' text' name='pruebaContrasenia' size=' 20' value='" . $fila[6] . "'>\n\t\t\n\t\t\t\t<br><BR>\n\n\n\t\t\t\t<button type=' submit' size=' 20' name=' Guardar' > Actualizar</button >\n\t\t\n\t\t\t</form>\n\t\t\t\t<form action='../usuarios.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name=' Cancelar' >Cancelar</button >\n\t\t\t\t</form>\n<form action='eliminarUsuario.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>")); } else { echo "<br><br>Usuario no encontrado";
<?php $id = $_POST['id']; $nombreProducto = $_POST['nombreProducto']; $tipoProducto = $_POST['tipoProducto']; $costo = $_POST['costo']; $existencia = $_POST['existencia']; echo "Alta de Producto con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Producto: " . $nombreProducto . '<br>'; echo "Tipo: " . $tipoProducto . '<br>'; echo "Costo de compra \$ " . $costo . " Pesos "; echo "Existencia " . $existencia; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../productos.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("INSERT INTO producto(idProducto,\n\t\t\t\t nombreProducto,\n\t \t\t\t tipoProducto,\n\t costoCompraProducto,\n\t existenciaProducto) \n\t\tVALUES ('{$id}',\n\t\t\t\t'{$nombreProducto} ',\n\t\t\t\t'{$tipoProducto}',\n\t\t\t\t'{$costo}',\n\t\t\t\t'{$existencia}')"); $Nueva->cerrarConexion(); ?>
// $pilaTmp = $_SESSION['pilaSesion']; $pilaTmp = $_REQUEST['pilaPhp']; $a = ""; //Declaramos la variable donde se almacenara el query $longitud = count($pilaTmp); //saco el numero de elementos for ($i = 0; $i < $longitud; $i++) { //Recorro todos los elementos $a .= "idArreglo= {$pilaTmp[$i]} or "; //saco el valor de cada elemento } $a .= "idArreglo= -1"; include "../bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM arreglo WHERE " . $a . " "); $Resultado = $NuevaConexion->getResultado(); while ($row = mysql_fetch_row($Resultado)) { ///* $NuevaConexion->Consulta("SELECT idArreglo FROM carrito WHERE idArreglo = " . $row[0] . " "); $idRepetido = $NuevaConexion->getResultado(); $repetido = mysql_fetch_row($idRepetido); //*/ $NuevaConexion->Consulta("SELECT * FROM carrito "); $vacio = $NuevaConexion->getResultado(); ///* if (!($row[0] == $repetido[0])) { $NuevaConexion->Consulta("INSERT INTO carrito(idArreglo, cantidad, precio, nombreArreglo) \n\t\t\t\t\t\t\t\t\t\t VALUES ('{$row['0']}','1','{$row['7']}','{$row['1']}')"); } //*/ if ($vacio == null) {
<?php include "../bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("DELETE FROM carrito WHERE 1"); $NuevaConexion->cerrarConexion(); //se eliminaron las comillas echo "<script>"; header('location: ../carrito.php'); echo "</script>";
$nombre = $_POST['nombre']; $ape_pat = $_POST['apePaterno']; $ape_mat = $_POST['apeMaterno']; $tipoUsuario = $_POST['tipoUsuario']; $nombreUsuario = $_POST['nombreUsuario']; $contra = $_POST['contrasenia']; $SegundaContra = $_POST['pruebaContrasenia']; if ($contra == $SegundaContra) { echo "Actualizacion de Usuario con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Nombre: " . $nombre . '<br>'; echo "Paterno: " . $ape_pat . '<br>'; echo "Materno: " . $ape_mat . '<br>'; echo "Tipo de usuario: " . $tipoUsuario . '<br>'; echo "Nombre de usuario: " . $nombreUsuario . '<br>'; echo "Contraseña: " . $contra . '<br>'; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../usuarios.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("UPDATE usuarios\n SET \n nombre='{$nombre} ',\n apPaterno='{$ape_pat}' ,\n apMaterno='{$ape_mat}',\n tipoUsuario='{$tipoUsuario}' ,\n nombreUsuario='{$nombreUsuario}' ,\n pass='******' WHERE id = '{$id}' "); $Nueva->cerrarConexion(); } else { echo "Contraseñas diferentes favor de verificarlas"; echo ' <br> <br> <form action="editarUsuario.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; }
$nombreUsuario = $_POST['nombreUsuario']; $contra = $_POST['contrasenia']; $SegundaContra = $_POST['pruebaContrasenia']; if ($contra == $SegundaContra) { echo "Alta de usuario con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Nombre: " . $nombre . '<br>'; echo "Nombre: " . $nombre . '<br>'; echo "Paterno: " . $ape_pat . '<br>'; echo "Materno: " . $ape_mat . '<br>'; echo "Tipo de usuario: " . $tipoUsuario . '<br>'; echo "Nombre de usuario: " . $nombreUsuario . '<br>'; echo "Contraseña: " . $contra . '<br>'; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../usuarios.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("INSERT INTO usuarios(id, nombre, apPaterno, apMaterno, tipoUsuario,nombreUsuario,pass) \n\t\tVALUES ('{$id}','{$nombre}','{$ape_pat}','{$ape_mat}','{$tipoUsuario}','{$nombreUsuario}','{$contra}')"); $Nueva->cerrarConexion(); } else { echo "Contraseñas diferentes favor de verificarlas"; echo ' <br> <br> <form action="../usuarios.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; } ?>
<html> <body> <?php include "../bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $dell = $_POST['id']; $NuevaConexion->Consulta("DELETE FROM usuarios WHERE id = '{$dell}' "); $NuevaConexion->cerrarConexion(); echo "<script>"; echo "alert('Datos eliminados con exito');"; header('location: ../usuarios.php'); echo "</script>"; ?> </html>
</div> </header> <div class="container"> <?php include "../bd/Conexion.php"; $busqueda = $_POST['buscarpor']; $buscar = $_POST['buscar']; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); if ($busqueda == "Folio") { echo "Busqueda por FOLIO"; $NuevaConexion->Consulta("SELECT * FROM proveedor WHERE idProveedor = '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n\t<center>\n\t\t<table bordercolor='#0E69AE' > \n\t\t\t<th> \n\t\t\t<form action='editarProveedor.php' method='post' >\n\t\t\t\t<BR><br>Folio<BR>\n\t\t\t\t<input type=' text' name='id' size=' 7' value='" . $fila[0] . "'>\n\t\t\t\t<BR>Empresa<BR>\n\t\t\t\t<input type=' text' name=' empresa' size=' 20' value='" . $fila[1] . "'> \n\t\t\t\t<BR>Nombre <BR>\n\t\t\t\t<input type=' text' name='nom'size=' 20' value='" . $fila[2] . "'>\n\t\t\t\t<BR>Apellido Paterno<BR>\n\t\t\t\t<input type=' text' name='apeP' size=' 20' value='" . $fila[3] . "'>\n\t\t\t\t<BR>Apellido Materno <BR>\n\t\t\t\t<input type=' text' name='apM' size=' 20' value='" . $fila[4] . "'>\n\t\t\t\t<BR>Telefono<BR>\n\t\t\t\t<input type=' text' name='Tel' size=' 20' value='" . $fila[5] . "'>\n\t\t\t\t<BR>Correo <BR>\n\t\t\t\t<input type=' text' name='corr'size=' 20' value='" . $fila[6] . "'>\n\t\t\t\t<BR>Direccion Fisica <BR>\n\t\t\t\t<input type=' text' name='DirFi' size=' 20' value='" . $fila[7] . "'>\n\t\t\t\t<BR>RFC <BR>\n\t\t\t\t<input type=' text' name='RFC' size=' 20' value='" . $fila[8] . "'>\n\t\t\n\t\t\t\t<br><BR>\n\n\n\t\t\t\t<button type=' submit' size=' 20' name=' Guardar' > Actualizar</button >\n\t\t\t\n\t\t</form>\n\t\t\t<form action='../Proveedores.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name=' Cancelar' > Cancelar </button >\n\t\t\t\t</form>\t\t\n<form action='eliminarProveedor.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>"); } else { echo "<br><br>Folio no encontrado"; } } else { if ($busqueda == "Empresa") { echo "Busqueda por EMPRESA"; $NuevaConexion->Consulta("SELECT * FROM proveedor WHERE nombreEmpresa = '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarProveedor.php' method='post' >\n\t\t\t\t<BR><br>Folio<BR>\n\t\t\t\t<input type=' text' name='id' size=' 7' value='" . $fila[0] . "'>\n\t\t\t\t<BR>Empresa<BR>\n\t\t\t\t<input type=' text' name=' empresa' size=' 20' value='" . $fila[1] . "'> \n\t\t\t\t<BR>Nombre <BR>\n\t\t\t\t<input type=' text' name='nom'size=' 20' value='" . $fila[2] . "'>\n\t\t\t\t<BR>Apellido Paterno<BR>\n\t\t\t\t<input type=' text' name='apeP' size=' 20' value='" . $fila[3] . "'>\n\t\t\t\t<BR>Apellido Materno <BR>\n\t\t\t\t<input type=' text' name='apM' size=' 20' value='" . $fila[4] . "'>\n\t\t\t\t<BR>Telefono<BR>\n\t\t\t\t<input type=' text' name='Tel' size=' 20' value='" . $fila[5] . "'>\n\t\t\t\t<BR>Correo <BR>\n\t\t\t\t<input type=' text' name='corr'size=' 20' value='" . $fila[6] . "'>\n\t\t\t\t<BR>Direccion Fisica <BR>\n\t\t\t\t<input type=' text' name='DirFi' size=' 20' value='" . $fila[7] . "'>\n\t\t\t\t<BR>RFC <BR>\n\t\t\t\t<input type=' text' name='RFC' size=' 20' value='" . $fila[8] . "'>\n\t\t\n\t\t\t\t<br><BR>\n\n\n\t\t\t\t<button type=' submit' size=' 20' name=' Guardar' > Actualizar</button >\n\t</form>\n\t\t\t<form action='../Proveedores.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name=' Cancelar' > Cancelar </button >\n\t\t\t\t</form>\n\t\t\t\t\t<form action='eliminarProveedor.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\t\t\t\t\n\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>"); } else { echo "<br><br>Empresa no encontrada";
$direccionEnvio = $_POST['direccionE']; $telefonoEnvio = $_POST['telefonoE']; $fechaEnvio = $_POST['fechaE']; //REPORTE DE LO GUARDADO EN LA BD echo "Compra Exitosa <br> <br>"; echo "Nombre del Cliente: " . $nombreCliente . $apellidosCliente . '<br>'; echo "Numero deTelefono: " . $telefonoCliente . '<br>'; echo "Email: " . $emailCliente . '<br>'; //AL ACEPTAR NOS REGRESA A LA PAGINA DE CARRITO echo ' <br> <br> <form action="../seccionPago/eliminarCompra.php" method="post"> <button type="submit" name="Aceptar"> Aceptar</button > </form>'; //CONECTAMOS CON LA BD, PARA INGRESAR LOS VALORES GUARDADOS include "../bd/conexion.php"; //PARA TABLA DATOCLIENTE $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("INSERT INTO datocliente (nombreCliente, apellidoCliente,\n\t telefonoCliente, emailCliente, nombreTarjeta, tipoTarjeta,\n\t numeroTarjeta, vigencia, numVerificacionTarjeta, nombreDestino,\n\t apellidoDestino, direccionDestino, telefonoDestino) \n\n\tVALUES ('{$nombreCliente}','{$apellidosCliente}','{$telefonoCliente}',\n\t\t'{$emailCliente}','{$nombreTarjeta}','{$tipoTarjeta}','{$numeroTarjeta}',\n\t\t'{$vigenciaTarjeta}','{$verificacionTarjeta}','{$nombreEnvio}',\n\t\t'{$apellidosEnvio}','{$direccionEnvio}','{$telefonoEnvio}')"); $Nueva->cerrarConexion(); //OBTENEMOS LOS VALORES DE CARRITO PARA GUARDARLO EN VARIABLES $NuevaConexion->Consulta("SELECT * FROM carrito"); $Resultado = $NuevaConexion->getResultado(); $NuevaConexion->cerrarConexion(); $Arr = $Resultado; //PARA TABLA DATOVENTA $NuevaConexion->Consulta("INSERT INTO 'datoventa'('nombreArreglo', 'costoUnit', 'cantidadArreglo', 'precioTotal','fechaEntrega') \n\n\t\t\t VALUES ('{$Arr['3']}','{$Arr['2']}','{$Arr['1']}','','{$fechaEnvio}')"); $NuevaConexion->cerrarConexion(); ?>
<html> <body> <?php include "../bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $dell = $_POST['id']; $NuevaConexion->Consulta("DELETE FROM arreglo WHERE idArreglo= '{$dell}' "); $NuevaConexion->cerrarConexion(); echo "<script>"; echo "alert('Datos eliminados con exito');"; header('location: ../Productos.php'); echo "</script>"; ?> </html>
<?php //tomamos los datos del archivo conexion.php include "bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM usuarios"); $Resultado = $NuevaConexion->getResultado(); $NuevaConexion->cerrarConexion(); echo "Lista de usuarios <br><br>"; echo "<div style='text-align:center;'>"; echo "<table width='100%' border='1' bordercolor='#0E69AE' >"; echo "<tr>"; echo "<th>ID</th>"; echo "<th>NOMBRE</th>"; echo "<th>PATERNO</th>"; echo "<th>MATERNO</th>"; echo "<th>TIPO</th>"; echo "<th>USUARIO</th>"; echo "<th>CONTRASEÑA</th>"; echo "</tr>"; while ($row = mysql_fetch_row($Resultado)) { echo "<tr>"; echo "<td>{$row['0']} </td>"; echo "<td>{$row['1']}</td>"; echo "<td>{$row['2']}\n </td>"; echo "<td>{$row['3']}</td>"; echo "<td>{$row['4']}</td>"; echo "<td>{$row['5']}</td>"; echo "<td>{$row['6']} </td>"; echo "</tr>";
<?php $id = $_POST['id']; $nombreArreglo = $_POST['nombreArreglo']; $categoria = $_POST['Categoria']; $flores = $_POST['Flores']; $cantidadFlores = $_POST['CantidadFlores']; $forma = $_POST['Forma']; $adorno = $_POST['Adorno']; $costo = $_POST['costo']; $existencia = $_POST['CantidadArreglo']; echo "Actualizacion de Arreglo con Exito <br> <br>"; echo "Folio: " . $id . '<br>'; echo "Producto: " . $nombreArreglo . '<br>'; echo "Categoria: " . $categoria . '<br>'; echo "<br>Descripcion<br>"; echo "Usted dio de alta un arreglo para " . $categoria . " con " . $cantidadFlores . " " . $flores . " En forma de " . $forma . " con un " . $adorno; echo "<br><br>Costo por pieza: \$" . $costo . ' pesos<br>'; echo "<br><br>Existencia: " . $existencia . ' <br>'; //echo $SegundaContra . '<br>'; echo ' <br> <br> <form action="../productos.php" method="post"> <button type="submit" name="Regresar"> Regresar</button > </form>'; include "../bd/conexion.php"; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("UPDATE arreglo\n SET \n idArreglo='{$id} ',\n nombreArreglo='{$nombreArreglo} ',\ncategoriaArreglo='{$categoria}',\n floresArreglo='{$flores}' ,\ncantidadFlores='{$cantidadFlores}' ,\n formaArreglo='{$forma}',\n adornoArreglo='{$adorno} ',\n precioArreglo='{$costo} ',\n existenciaArreglo='{$existencia} '\n WHERE idArreglo= '{$id}' "); $Nueva->cerrarConexion();
<?php //tomamos los datos del archivo conexion.php include "bd/conexion.php"; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); $NuevaConexion->Consulta("SELECT * FROM proveedor"); $Resultado = $NuevaConexion->getResultado(); $NuevaConexion->cerrarConexion(); echo "Lista de Proveedores <br><br>"; echo "<div style='text-align:center;'>"; echo "<table width='100%' border='1' bordercolor='#0E69AE' >"; echo "<tr>"; echo "<th>Folio</th>"; echo "<th>Empresa</th>"; echo "<th>Nombre</th>"; echo "<th>Paterno</th>"; echo "<th>Materno</th>"; echo "<th>Telefono</th>"; echo "<th>Correo</th>"; echo "<th>Direccion Fiscal</th>"; echo "<th>RFC</th>"; echo "</tr>"; while ($row = mysql_fetch_row($Resultado)) { echo "<tr>"; echo "<td>{$row['0']}</td>"; echo "<td>{$row['1']}</td>"; echo "<td>{$row['2']}</td>"; echo "<td>{$row['3']}</td>"; echo "<td>{$row['4']}</td>"; echo "<td>{$row['5']}</td>";
$NuevaConexion = new BD(); $NuevaConexion->Conexion(); if ($busqueda == "Folio") { echo "Busqueda por Folio"; $NuevaConexion->Consulta("SELECT * FROM arreglo WHERE idArreglo = '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { $idBorrar = $fila[0]; echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarArreglo.php' method='post' >\n\t\t<BR>FOLIO <BR>\n\t\t\t<input type='text' name='id' size='7' value='" . $fila[0] . "'>\n\t\t\t<BR>Nombre del Arreglo<BR>\n\t\t\t<input type='text' name='nombreArreglo' size='20' value='" . $fila[1] . "'>\n\t\t\t<br>Categoria<br>\n\t\t\t<select name='Categoria'>\n\t\t\t<option>" . $fila[2] . "</option>\n\t\t\t<option>10 Mayo</option>\n\t\t\t<option>14 Febrero</option>\n\t\t\t<option>Cumpleaños</option>\n\t\t\t<option>Fiestas</option>\n\t\t\t<option>Velorio</option>\n\n\t\t\t</select>\n\t\t\n\t\n\t\t\t<br>Cantidad <br>\n\t\t\t<input type='text' name='CantidadFlores' size='5' value='" . $fila[4] . "'>\n\t\t\t<BR>Forma<BR> \n\n\t\t\t<select name='Forma'>\n\t\t\t<option>" . $fila[5] . "</option>\n\t\t\t<option>Corazon</option>\n\t\t\t<option>Osito</option>\n\t\t\t<option>Estrella</option>\n\t\t\t<option>Sin forma</option>\n\t\t\t</select>"; $nuevoAdorno = $fila[6]; echo "<BR>Precio <BR>\n\t\t\t<input type='text' name='costo' size='20' value='" . $fila[7] . "'>\n\t\t\t<BR>¿Cuantos arreglos agregara?<BR>\n\t\t\t<input type='text' name='CantidadArreglo' size='20' value='" . $fila[8] . "'>\n\n\n\t\t\t<BR>¿Desea Activarlo en las listas? <BR>\n\t\t\t\t<select name='activo'>\n\t\t\t\t<option>" . $fila[10] . "</option>\n\t\t\t\t<option>si</option>\n\t\t\t\t<option>no</option>\n\t\t\t</select>\n\t\t\t<BR>¿Desea que aparesca en el TOP? <BR>\n\t\t\t\t<select name='top'>\n\t\t\t\t<option>" . $fila[11] . "</option>\n\t\t\t\t<option>si</option>\n\t\t\t\t<option>no</option>\n\t\t\t</select>"; echo "\t<BR>Flores<BR> "; $nueva = $fila[3]; $Nueva = new BD(); $Nueva->Conexion(); $Nueva->Consulta("SELECT idProducto,nombreProducto FROM producto WHERE tipoProducto = 'Flores' order by nombreProducto asc"); $Resultado = $Nueva->getResultado(); $Nueva->cerrarConexion(); echo "<select name = 'flores'>"; echo "<option>" . $nuevoAdorno . "</option>"; echo "<option>" . $nueva . "</option>"; while ($fila = mysql_fetch_row($Resultado)) { echo "<option value='" . $fila['1'] . "'>" . $fila['1'] . "</option>"; } echo " </select>"; echo "<BR>Adorno<BR> "; $Nueva->Conexion(); $Nueva->Consulta("SELECT idProducto,nombreProducto FROM producto WHERE tipoProducto = 'Adorno' order by nombreProducto asc"); $Resultado = $Nueva->getResultado(); $Nueva->cerrarConexion(); echo "<select name = 'adorno'>";
</div> </header> <div class="container"> <?php include "../bd/Conexion.php"; $busqueda = $_POST['buscarpor']; $buscar = $_POST['buscar']; $NuevaConexion = new BD(); $NuevaConexion->Conexion(); if ($busqueda == "Folio") { echo "Busqueda por ID"; $NuevaConexion->Consulta("SELECT * FROM producto WHERE idProducto = '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarProducto.php' method='post' >\n\n\t\t\t\t\t<BR>FOLIO <BR>\n\t\t\t<input type=' text' name='id' size='7' value='" . $fila[0] . "'>\n\t\t\t<BR>Nombre del producto<BR>\n\t\t\t<input type='text' name='nombreProducto' size='20' value='" . $fila[1] . "'>\n\t\t\t<option>Tipo de producto</option>\n\t\t\t<input type='text' name='tipoProducto' size='20' value='" . $fila[2] . "'>\n\t\t\t<BR>Descripcion <BR>\n\t\t\t<input type='text' name='descripcion' size='20' value='" . $fila[3] . "'>\n\t\t\t<BR>Costo de compra <BR>\n\t\t\t<input type='text' name='costo' size='20' value='" . $fila[4] . "'>\n\t\t\t<BR>Cantidad <BR>\n\t\t\t<input type='text' name='cantidad' size='20' value='" . $fila[5] . "'>\n\t\t\t\n\n\t\t\t\t<button type=' submit' size=' 20' name=' Guardar' > Actualizar</button >\n\t\t\t\n\t\t\t</form>\n\t\t\t<form action='../productos.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name=' Cancelar' > Cancelar </button >\n\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\n\t<form action='eliminarProducto.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>"); } else { echo "<br><br>Folio no encontrado"; } } else { if ($busqueda == "Nombre") { echo "Busqueda por Nombre"; $NuevaConexion->Consulta("SELECT * FROM producto WHERE nombreProducto= '{$buscar}' "); $Resultado = $NuevaConexion->getResultado(); if ($fila = mysql_fetch_row($Resultado)) { echo "\n<center>\n\t<table bordercolor='#0E69AE' > \n\t\t<th> \n\t\t\t<form action='editarProducto.php' method='post' >\n\n\t\t\t\t\t<BR>FOLIO <BR>\n\t\t\t<input type=' text' name='id' size='7' value='" . $fila[0] . "'>\n\t\t\t<BR>Nombre del producto<BR>\n\t\t\t<input type='text' name='nombreProducto' size='20' value='" . $fila[1] . "'>\n\t\t\t<option>Tipo de producto</option>\n\t\t\t<input type='text' name='tipoProducto' size='20' value='" . $fila[2] . "'>\n\t\t\t<BR>Descripcion <BR>\n\t\t\t<input type='text' name='descripcion' size='20' value='" . $fila[3] . "'>\n\t\t\t<BR>Costo de compra <BR>\n\t\t\t<input type='text' name='costo' size='20' value='" . $fila[4] . "'>\n\t\t\t<BR>Cantidad <BR>\n\t\t\t<input type='text' name='cantidad' size='20' value='" . $fila[5] . "'>\n\t\t\t\n\n\t\t\t\t<button type=' submit' size=' 20' name=' Guardar' > Actualizar</button >\n\t\t\t\n\t\t\t</form>\n\t\t\t<form action='../productos.php' method='post'>\n\t\t\t\t<br><button type=' submit' size=' 20' name=' Cancelar' > Cancelar </button >\n\t\t\t\t</form>\n\t\t\t\t\t\t<form action='eliminarProducto.php' method='post'>\n\t\t\t\t<input type=' text' name=' id' size=' 7' style='visibility:hidden' value='" . ($id = $fila[0] . "'>\n\t\t\t\t<br><button type=' submit' size='0' name='eliminar'>Eliminar</button >\n\t\t\t\t</form>\t\t\t\t\n\n\t\t</th> \n\t<table>\n\n</center>\n\t<br><BR>"); } else { echo "<br><br>Nombre no encontrado";