<?php include 'sesion_user.php';  if ($cat_user != 'admin') { echo "SIN PERMISOS PARA EDITAR"; exit; } else { ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Panel</title>





<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> 

<link href="http://radioshosting.com/css/delalora4new.css" rel="stylesheet">

<link rel="stylesheet" href="https://unpkg.com/flickity@2/dist/flickity.min.css"/>

<link rel="stylesheet" href="http://ejemplo.radiosnet.com.ar/css/font-awesome.min.css"/>

<style>

.caca {

    max-width: 200px;

	max-height:200px;

}</style>







</head>



<body>

<div class="container-fluid">



<div class="row">



<div class="col-lg-3 col-md-3 col-sm-12">





<?php 

include 'nav.php';?>



</div>



<div class="col-lg-9 col-md-9 col-sm-12">

<?php include 'inc_buscar.php';?>







<?

$ID = (int)$_GET['ID_producto'];



include 'concha.php';



mysql_connect("$host","$usuario","$contra");



mysql_select_db ("$basedatos");





$sql = "SELECT * FROM `articulos` WHERE `ID` = '$ID' LIMIT 1";









$consulta = mysql_query ($sql);



while ($row = mysql_fetch_array($consulta))



{





$ID_producto = $row["ID"];

$titulo = $row["titulo"];

$foto = $row["foto"];

$precio = $row["precio"];

$stock = $row["stock"];

$barcode = $row["barcode"];

$limite =  = $row["limite"];

?>

<form action="form_editar_articulo.php" method="post">



<input name="ID_producto" type="hidden" value="<?php echo $ID_producto ?>" />

<input name="stock" type="hidden" value="<?php echo $stock ?>" />





<table width="100%" border="0" cellpadding="5" bgcolor="#FFFFFF">

  <tr>

    <td width="200px" align="center">

    

    

    

    <img class="lazy caca" <?php if($foto == '') {?> src="../Imagen_no_disponible-0.png" <?php } else {?> src="http://radioshosting.com/ajax-loader.gif" data-original="<?php echo $dom ?>/img/<?php echo $foto ?>"  <?php };?>/>

    </td>

    <td align="left" ><span class="h2" style="font-size:25;"><input name="titulo" type="text" value="<?php echo $titulo ?>" size="25" /></span> <hr />

PRECIO: <span class="h2" style="color:#006600">$ <input name="precio" type="text" value="<?php echo $precio ?>" size="7" />

</span><hr />



STOCK ACTUAL: <b><?php echo $stock ?></b> UNIDADES.<br />

AGREGAR STOCK: <input name="stock_mas" type="text" id="stock_mas" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;" size="8" maxlength="15" placeholder="Cantidad"> UNIDADES.

  <br />

<span style="color:#999999; font-size:9px;">(SI DESEA QUITAR UNIDADES DEL STOCK COLOQUE EL NUMERO EN FORMATO NEGATIVO, CON EL SIGNO "MENOS" DELANTE)</span>

  <hr />

  <p><i class="fa fa-barcode" aria-hidden="true"></i> COD: <?php echo $barcode ?></p>

  <p>CAT: 

    <select name="cat" id="cat">

     <option selected="selected">NINGUNA </option>

      <option value="1">CIGARRILLOS</option>

    </select>

    </p>

  <p>Limite Aviso Stock:

    <select name="limite" id="limite">

          

<?php $i = 0;

while ($i <= 100) {

      /* el valor presentado sería

                   $i antes del incremento

                   (post-incremento) */ ?>

                   

                   <option <?php if ($limite == '$i') {?> selected="selected" <?php };?> value="<?php echo $i ?>"><?php echo $i ?></option>

                   

                    <? $i++;

}?>



      

    </select>

<br />

    <br />

  </p>

  <label>

 <input type="submit" name="button2" id="button2" value="GUARDAR CAMBIOS"  class="h3"/>

 </label></td>

  </tr>

</table></form>

<br />





<?



}



mysql_free_result($consulta);



?>

</div>

</div>











    



  <script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>

  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>

  

  

  <script type="text/javascript">window.setInterval(function(){

  $('.grid').isotope({

  itemSelector: '.grid-item'

});

}, 2000);

</script>



<script language=javascript>

function ventanaSecundaria56 (URL){

   window.open(URL,"ventana1","width=960,height=630,scrollbars=NO")

}

  </script>

  

  

<script src="http://radioshosting.com/recursos/js/jquery.lazyload.js?v=1.9.1"></script>

  <script type="text/javascript" charset="utf-8">

  $(function() {

     $("img.lazy").lazyload({

         effect : "fadeIn"

     });



  });

</script>



  

</body>

</html>



<?php };?>