<?php define('p_title', '.:: Actualizar Producto ::.'); include 'templates/header.php'; include "clases/Dao.php"; session_start(); if (!isset($_SESSION['acceso'])) { header('Location: login.php'); } $db; $db = new Dao(array('server_ip' => 'localhost', 'server_user' => 'root', 'server_password' => '', 'server_db' => 'inventario_telematica')); $valor = $_GET['pr_id']; $info = $db->query_array("select * from productos where pr_id={$valor}"); $pr_categoria_array = array('', '', '', '', ''); $pr_categoria_array[$info[0]['pr_categoria']] = 'selected = "selected"'; //Colocar opcion del Select ?> <h1>Modificar Producto</h1> <div class="row"> <form action="mod.php" class="form" method="POST"> <div class="form-group col-xs-12"> <p class="col-xs-4"> <label for=""><span>*</span> Núm. Control</label> <br /> <input type="text" class="form-control" value="<?php echo $info[0]['pr_codigo']; ?> " placeholder="Ej. 0578D" name="pr_codigo"/> </p> </div>
<?php define('p_title', '.:: Listado de Productos ::.'); include 'templates/header.php'; include "clases/Dao.php"; $db; $db = new Dao(array('server_ip' => 'localhost', 'server_user' => 'root', 'server_password' => '', 'server_db' => 'inventario_telematica')); $datos = $db->query_array("select * from productos"); ?> <h1>Listado de Productos</h1> <div class="table-responsive"> <table class="table table-hover"> <thead> <th>Núm</th> <th>Código</th> <th>Nombre</th> <th>$CPA</th> <th>$VTA</th> <th>Categoría</th> <th>Status</th> <th>Acciones</th> </thead> <tbody> <?php $cont = 0; foreach ($datos as $row => $item) { $cont++; ?> <tr> <td><?php echo $cont;
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="estilos_index.css"> </head> <body> <?php $error = false; $incompleto = false; if (isset($_SESSION['acceso'])) { header("location: index.php"); } if (isset($_POST['btnlogin'])) { if ($_POST['user'] != '' && $_POST['password'] != '') { include "clases/Dao.php"; $db; $db = new Dao(array('server_ip' => 'localhost', 'server_user' => 'root', 'server_password' => '', 'server_db' => 'inventario_telematica')); $existe = $db->query_array("select * from usuarios where usuario='" . $_POST['user'] . "' and '" . $_POST['password'] . "'"); if (count($existe) > 0) { $_SESSION['acceso'] = $existe[0]; session_start(); header("Location: index.php"); } else { $error = true; } } else { $incompleto = true; } } ?> <div class="container"> <div class="jumbotron">