Index.php<!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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--
body {
background-color: #6AA991;
}
.Estilo7 {font-family: Tahoma; font-size: 10pt; }
.Estilo8 {font-size: 25pt}
.Estilo9 {font-family: Tahoma; font-size: 25pt; }
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
<table width="270" border="0" align="center" cellpadding="0" cellspacing="0"> <td><p align="center" class="Estilo7 Estilo8"><a href="search.php">Buscar
</a></p> </td> <td><div align="center"><a href="boletanueva.php"><span class="Estilo9">Nueva boleta
</span></a></div></td>
boletanueva.php<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language="javascript"> function txtAreaEnabled(radio, txtarea) {
txtarea.disabled = radio[1].checked;
}
<!--
a {
font-family: lucida Console;
color: #000000;
font-size: 9pt;
font-weight: bold;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #000000;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
a:link {
text-decoration: none;
}
.Estilo1 {
font-size: 7pt;
font-style: italic;
}
.Estilo2 {font-size: 7pt}
-->
<!--
.Estilo2 {font-family: tahoma; }
.Estilo8 {font-size: 10pt}
.Estilo9 {font-family: tahoma; font-size: 10pt; }
.Estilo10 {
font-family: Tahoma;
font-size: 10pt;
font-weight: bold;
}
.Estilo11 {
font-family: Tahoma;
font-size: 10pt;
}
body {
background-color: #6AA991;
}
-->
<form action="impresionboletanueva.php" id="BoletaNueva" name="BoletaNueva" method="post" /> <table width="546" align="center" cellpadding="1" cellspacing="1"> <td colspan="5" bgcolor="#FFFFFF"><div align="center" class="Estilo10">Datos del Titular
</div> <td width="26%" bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Fecha
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="Fecha" type="text" id="Fecha" value=" - - 2008" size="15"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Nombre
</span></td> <input name="Nombre" type="text" id="Nombre" size="20" maxlength="18" maxlenght="20"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8"> Apellido
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="Apellido" type="text" id="Apellido" size="20" maxlength="18" maxlenght="20"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Dirección
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="Direccion" type="text" id="Direccion" size="45" maxlength="43" maxlenght="45"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Localidad
</span></td> <td colspan="4" bgcolor="#CCCCCC"><span class="Estilo2 Estilo8"> <input name="Localidad" type="text" id="Localidad" size="20" maxlength="18" maxlenght="20"> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Código Postal
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="CodigoPostal" type="text" id="CodigoPostal" size="10" maxlength="8" maxlenght="10"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">D.N.I.
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="DNI" type="text" id="DNI" size="10" maxlength="8" maxlenght="10"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Fecha de Nacimiento
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="FechaNacDia" type="text" id="FechaNacDia" size="2" maxlength="2" maxlenght="2"> /
<input name="FechaNacMes" type="text" id="FechaNacMes" size="2" maxlength="2" maxlenght="2"> /
<input name="FechaNacAno" type="text" id="FechaNacAno" size="4" maxlength="4" maxlenght="4"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Teléfono de Referencia
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="ctel" type="text" id="ctel" size="8" maxlength="6" maxlenght="8"> -
<input name="Tel" type="text" id="Tel" size="10" maxlength="8" maxlenght="10"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Marca
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="Marca" type="text" id="Marca" size="60" maxlength="58"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Modelo
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="Modelo" type="text" id="Modelo" size="60" maxlength="58"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">ESN/IMEI
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="IMEI" type="text" id="IMEI" size="60" maxlength="58" maxlenght="35"></td> <td rowspan="2" bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Accesorios
</span></td> <input name="Accesorios" type="radio" id="Si" onClick="txtAreaEnabled(this.form.Accesorios, this.form.Especificar)" value="Si" /> <td width="48%" bgcolor="#CCCCCC">
<td colspan="3" bgcolor="#CCCCCC"><input name="Accesorios" type="radio" id="No" onClick="txtAreaEnabled(this.form.Accesorios, this.form.Especificar)" value="No" checked /> <td width="48%" bgcolor="#CCCCCC"><textarea name="Especificar" cols="15" rows="2" id="Especificar" disabled="disabled"></textarea></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Falla
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="Falla" type="text" id="Falla" size="60" maxlength="58" maxlenght="25"></td> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Presupuesto
</span></td> <td width="3%" bgcolor="#CCCCCC"><div align="center"><span class="Estilo9">$
</span></div></td> <td colspan="3" bgcolor="#CCCCCC"><span class="Estilo9"> <input name="Presupuesto" type="text" id="Presupuesto" size="5" maxlength="3" maxlenght="5"> <td bgcolor="#CCCCCC"><span class="Estilo2 Estilo8">Observaciones
</span></td> <td colspan="4" bgcolor="#CCCCCC"><input name="Observaciones" type="text" id="Observaciones" size="60" maxlength="58" maxlenght="50"></td> <td colspan="5" bgcolor="#FFFFFF"><div align="center"> <input type="submit" name="Enviar" id="Enviar" value="Enviar"> <td colspan="5" bgcolor="#FFFFFF"><div align="center"> <input type="reset" name="Reestablecer" id="Reestablecer" value="Reestablecer"> <td colspan="5" bgcolor="#FFFFFF"><div align="right"><a href="index.php">Volver al principio
</a></div></td> <td colspan="5" bgcolor="#FFFFFF"><div align="right" class="Estilo1"><a href="boletanueva.php" class="Estilo2">Actualizar
</a></div></td>
impresionboletanueva.php<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
/*$dia=$_REQUEST['Dia'];
$mes=$_REQUEST['Mes'];
$ano=$_REQUEST['Ano'];*/
$fecha=$_REQUEST['Fecha'];
$nombre=$_REQUEST['Nombre'];
$apellido=$_REQUEST['Apellido'];
$direccion=$_REQUEST['Direccion'];
$localidad=$_REQUEST['Localidad'];
$codigopostal=$_REQUEST['CodigoPostal'];
$dni=$_REQUEST['DNI'];
$fechanacdia=$_REQUEST['FechaNacDia'];
$fechanacmes=$_REQUEST['FechaNacMes'];
$fechanacano=$_REQUEST['FechaNacAno'];
$ctel=$_REQUEST['ctel'];
$tel=$_REQUEST['Tel'];
$marca=$_REQUEST['Marca'];
$modelo=$_REQUEST['Modelo'];
$imei=$_REQUEST['IMEI'];
$especificar=$_REQUEST['Especificar'];
$falla=$_REQUEST['Falla'];
$presupuesto=$_REQUEST['Presupuesto'];
$observaciones=$_REQUEST['Observaciones'];
echo "<b>Fecha:</b> $fecha";
echo "<br>";
echo "<b>Nombre y Apellido:</b> $nombre $apellido";
echo "<br>";
echo "<b>Direccion:</b> $direccion";
echo "<br>";
echo "<b>Localidad:</b> $localidad";
echo "<br>";
echo "<b>Código Postal:</b> $codigopostal";
echo "<br>";
echo "<b>D.N.I.:</b> $dni";
echo "<br>";
echo "<b>Fecha de Nacimiento:</b> $fechanacdia/$fechanacmes/$fechanacano";
echo "<br>";
echo "<b>Teléfono de Referencia:</b> $ctel - $tel";
echo "<br>";
echo "<b>Modelo:</b> $modelo";
echo "<br>";
echo "<b>ESN/IMEI:</b> $imei";
echo "<br>";
echo "<b>Accesorios:</b> $especificar";
echo "<br>";
echo "<b>Falla:</b> $falla";
echo "<br>";
echo "<b>Presupuesto:</b> $$presupuesto";
echo "<br>";
echo "<b>Observaciones:</b> $observaciones";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
?>
<title>Versión imprimible: Boleta</title>
<style type="text/css">
<!--
body,td,th {
color: #333333;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
a {
font-family: tahoma;
}
body {
background-color: #6AA991;
}
-->
</style><p> </p>
<p> </p>
<p><a href="javascript:window.print()">Imprimir boleta</a></p>
<p><a href="index.php">Volver al principio</a></p>
<?php
$conexion=mysql_connect("localhost","root","") or
die("Problemas en la conexion"); mysql_select_db("remito",$conexion) or
die("Problemas en la seleccion de la base de datos"); mysql_query("insert into clientes(Nombre,Apellido,Marca,Modelo,Fecha,Falla,Presupuesto,IMEI) values ('$_REQUEST[Nombre]','$_REQUEST[Apellido]','$_REQUEST[Marca]','$_REQUEST[Modelo]','$_REQUEST[Fecha]','$_REQUEST[Falla]','$$_REQUEST[Presupuesto]','$_REQUEST[IMEI]')", $conexion) or
die("Problemas en el select".mysql_error()); echo "El remito fue correctamente almacenado en la base de datos.";
?>
search.php<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--
body {
background-color: #6AA991;
}
a {
font-family: tahoma;
font-size: 15pt;
color: #000000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
.Estilo18 {
font-size: 11px;
font-weight: bold;
font-family: Tahoma;
}
.Estilo19 {
font-size: 15px;
font-family: Tahoma;
font-weight: bold;
}
.Estilo20 {
font-family: Tahoma;
font-size: 11px;
}
-->
<table width="382" border="0" align="center" cellpadding="0" cellspacing="0"> <td width="382"><span class="Estilo19">Buscar por:
</span></td> <td><form id="Buscar" name="Buscar" method="post" action="search2.php"><p align="justify"><label> <input type="radio" name="Buscar" value="Nombre" id="Buscar_8" /> <input type="text" name="Nombre" id="Nombre" size="25" /> <input type="radio" name="Buscar" value="Apellido" id="Buscar_9" /> <input type="text" name="Apellido" id="Apellido" size="25" /> <input type="radio" name="Buscar" value="Marca" id="Buscar_10" /> <input type="text" name="Marca" id="Marca" size="25" /> <input type="radio" name="Buscar" value="Modelo" id="Buscar_11" /> <input type="text" name="Modelo" id="Modelo" size="25" /> <input type="radio" name="Buscar" value="Fecha" id="Buscar_12" /> <input type="text" name="Fecha" id="Nombre6" size="25" /> <input type="radio" name="Buscar" value="Falla" id="Buscar_13" /> <input type="text" name="Falla" id="Nombre7" size="25" /> <input type="radio" name="Buscar" value="Presupuesto" id="Buscar_14" /> <input type="text" name="Presupuesto" id="Nombre8" size="25" /> <input type="radio" name="Buscar" value="Boleta" id="Buscar_15" /> <input type="text" name="Boleta" id="Nombre" size="25" /> <input type="radio" name="Buscar" value="IMEI" id="Buscar_16" /> <input type="text" name="IMEI" id="IMEI" size="25" /> <p align="justify"><input type="submit" name="Enviar" value="Buscar" />
<p align="justify"> </p> <p align="justify"> </p> <p align="justify"> </p>
search2.php Acá es donde tendría que salir la información de la DB
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--
body {
background-color: #6AA991;
}
.Estilo3 {
font-family: Tahoma;
font-size: 10px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="Estilo3"> <td width="10%" bgcolor="#CCCCCC" class="Estilo3"><div align="center" class="Estilo3">Nombre
</div></td> <td width="12%" bgcolor="#CCCCCC" class="Estilo3"><div align="center">Apellido
</div></td> <td width="9%" bgcolor="#CCCCCC" class="Estilo3"><div align="center">Marca
</div></td> <td width="10%" bgcolor="#CCCCCC" class="Estilo3"><div align="center">Modelo
</div></td> <td width="13%" bgcolor="#CCCCCC" class="Estilo3"><div align="center">Fecha
</div></td> <td width="14%" bgcolor="#CCCCCC" class="Estilo3"><div align="center">Falla
</div></td> <td width="17%" bgcolor="#CCCCCC" class="Estilo3"><div align="center">Presupuesto
</div></td> <td width="15%" bgcolor="#CCCCCC" class="Estilo3"><div align="center">N
úmero de boleta
</div></td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#999999" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td bgcolor="#CCCCCC" class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <td class="Estilo3"> </td> <p class="Estilo3"> </p> <p class="Estilo3"><a href="search.php">Volver
</a></p>
Eso es todo.