Beruflich Dokumente
Kultur Dokumente
php
include("conexion.php");
?>
<html lang="es">
<head>
<meta charset="utf-8"/>
<title>Carrito de Compras</title>
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jquery.ui.touch-punch.js"></script>
img{
background-color: #D8D8D8;
color: #393939;
margin-bottom: 10px;
padding: 10px;
list-style: none;
text-align: center;
}
li{background-color: #D8D8D8; color:#393939; marginbottom:10px;padding:10px;list-style:none;}
.carrito{width: 100px;height:auto; backgroundcolor:#FFFAFA;border:solid 1px #FF6366; border-radius:5px; }
ol{width: 200px;height: auto;}
.zona{background-color:#A1ECB5;}
.activo{background-color:#29B34C;}
.articulonew{width: 100px;}
#product div ul table tr td {
font-family: Verdana, Geneva, sans-serif;
}
#product div ul table {
font-size: 10px;
text-align: center;
}
#apDiv1 {
position: absolute;
left: 694px;
top: 176px;
width: 328px;
height: 164px;
z-index: 1;
}
</style>
<script>
$(function()
{
var cedula = document.getElementById("txtcedula").value;
var factura= document.getElementById('txtfactura').value;
var nombre= document.getElementById('txtcoger').value;
var cantidad= document.getElementById('txtcant').value;
var precio= document.getElementById('txtprecio').value;
$("#catalog img").draggable({
appendTo: "body",
helper: "clone"
});
$("#cart ol").droppable({
activeClass: "zona",
hoverClass: "activo",
drop: function(event, ui){
$.ajax({
type: "POST",
url: "insertar.php",
data:
('cedula='+cedula+'&factura='+factura+'&nombre='+nombre+'&cantidad
='+cantidad+'&precio='+precio),
})
.done(function( msg ) {
alert ("Guardado: " + msg );
window.location.reload();
});
$('<li></li>').text(ui.draggable.text()).appendTo( this );
}
}).sortable({
items: "img:not(.placeholder)",
sort:function() {
}
});
});
</script>
<?php
?>
<?php
// $cedulaC=$_POST['usuario'];
//$cedulaC=123;
?>
</ol>
</div>
</div>
<div id="catalog">
<div id="product"><h3>
<label for="textfield3"></label>
Usuario
onMouseDown="document.getElementById('txtprecio').value=document.ge
tElementById('txtprecio5').value"></a><?php echo $f['nombre'];?
></div></td>
</tr>
<tr>
<td width="104"><div align="center">
<label for="ropa1"></label>
<input name="ropa1" type="text" id="ropa1" value="Vestido"
size="10" maxlength="10" readonly>
</div></td>
<td width="76"><div align="center">
<input name="ropa2" type="text" id="ropa2" value="Pantaloneta"
size="13" maxlength="13" readonly>
</div></td>
<td width="84"><div align="center">
<input name="ropa3" type="text" id="ropa3" value="Pantaln"
size="13" maxlength="13" readonly>
</div></td>
<td width="61"><div align="center">
<input name="ropa4" type="text" id="ropa4" value="Pelucas"
size="10" maxlength="10" readonly>
</div></td>
<td width="108"><div align="center">
<input name="ropa5" type="text" id="ropa5" value="Sombreros"
size="13" maxlength="13" readonly>
</div></td>
</tr>
<tr>
<td><div align="center">Precio:
$.
<label for="textfield"></label>
<label for="v3"></label>
<input name="txtcant1" type="text" id="txtcant1" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="v4"></label>
<input name="txtcant2" type="text" id="txtcant2" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="v5"></label>
<input name="txtcant3" type="text" id="txtcant3" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="textfield7"></label>
<input name="txtcant4" type="text" id="txtcant4" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="textfield8"></label>
<input name="txtcant5" type="text" id="txtcant5" value="1"
size="2" maxlength="2"></td>
</tr>
</table>
</ul>
</div>
</div>
<div id="catalog">
<h3>Calzado</h3>
<div>
<ul>
<table width="559" border="1">
<tr>
</tr>
<tr>
<td><div align="center">
<label for="ropa1"></label>
<input name="ropa6" type="text" id="ropa6" value="Botas"
size="10" maxlength="10" readonly>
</div></td>
<td><div align="center">
<input name="ropa7" type="text" id="ropa7" value="Zapatillas"
size="13" maxlength="13" readonly>
</div></td>
<td><div align="center">
<input name="ropa8" type="text" id="ropa8" value="Zandallas"
size="13" maxlength="13" readonly>
</div></td>
<td><div align="center">
<input name="ropa9" type="text" id="ropa9" value="Ballet"
size="10" maxlength="10" readonly>
</div></td>
<td><div align="center">
<input name="ropa10" type="text" id="ropa10" value="Cmaras"
size="13" maxlength="13" readonly>
</div></td>
</tr>
<tr>
<td><div align="center">Precio:
$.
<label for="textfield"></label>
<input type="text" name="txtprecio6" id="txtprecio6" value="75"
size="4" maxlength="2" readonly>
</div></td>
<td><div align="center">Precio:
$.
<label for="textfield"></label>
<input type="text" name="txtprecio7" id="txtprecio7" value="95"
size="4" maxlength="2" readonly>
</div></td>
<td><div align="center">Precio:
$.
<label for="textfield"></label>
<input type="text" name="txtprecio8" id="txtprecio8" value="18"
size="4" maxlength="2" readonly>
</div></td>
<td><div align="center">Precio:
$.
<label for="textfield"></label>
<input type="text" name="txtprecio9" id="txtprecio9" value="36"
size="4" maxlength="2" readonly>
</div></td>
<td><div align="center">Precio:
$.
<label for="textfield"></label>
<input type="text" name="txtprecio10" id="txtprecio10"
value="150" size="5" maxlength="3" readonly>
</div></td>
</tr>
<tr>
<td height="26">Cant:
<label for="v8"></label>
<input name="txtcant6" type="text" id="txtcant6" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="v9"></label>
<input name="txtcant7" type="text" id="txtcant7" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="v10"></label>
<input name="txtcant8" type="text" id="txtcant8" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="textfield5"></label>
<input name="txtcant9" type="text" id="txtcant9" value="1"
size="2" maxlength="2"></td>
<td>Cant:
<label for="textfield6"></label>
<input name="txtcant10" type="text" id="txtcant10" value="1"
size="2" maxlength="2"></td>
</tr>
</table>
</ul>
</div>
</div>
</form>
</body>
</html>