First commit 10/07/2002
75
prod/cesta.php
Normal file
@ -0,0 +1,75 @@
|
||||
<style>
|
||||
td.menu
|
||||
{
|
||||
background-color:#800000;
|
||||
font-size: 12pt;
|
||||
border-style : solid;
|
||||
border-left-width : 0;
|
||||
border-top-width : 0;
|
||||
border-bottom-width : 0;
|
||||
border-right-width : 0;
|
||||
}
|
||||
td.menut
|
||||
{
|
||||
border-style:solid;
|
||||
border-left-width : 0;
|
||||
border-top-width : 1;
|
||||
border-bottom-width : 0;
|
||||
border-right-width : 0;
|
||||
border-color:#800000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>Cesta de la compra</h1>
|
||||
|
||||
<br>
|
||||
<?
|
||||
// $error_prod = true;
|
||||
|
||||
if ( isset($error_prod) && $error_prod )
|
||||
{
|
||||
echo ' <br><br>
|
||||
<p class=remark>En estos momento la cesta de la compra esta desactivada.</p>
|
||||
|
||||
<ul>
|
||||
<li>Puede que la base de datos de productos este desconectada</li>
|
||||
<li>El servicio de cesta este desconectado</li>
|
||||
<li>Incluso que distintas partes de este servidor esten "apagadas" por mantenimiento</li>
|
||||
</ul>
|
||||
|
||||
<br><br>Intentelo mas tarde.';
|
||||
} else {
|
||||
|
||||
if (isset($itemsEnCesta)){
|
||||
echo '<script src="prod/moreinfo.js"></script>';
|
||||
|
||||
require ("open_db_prod.php" );
|
||||
|
||||
echo'<p class=remark>Contenido cesta:</p><br>';
|
||||
|
||||
$total=0.0;
|
||||
echo '<table width=100% cellspacing=0><tr><td class=menu>Descripci<63>n</td><td width=70 class=menu>PV</td><td width=10 class=menu> </td><td width=80 class=menu>unds</td></tr>';
|
||||
foreach($itemsEnCesta as $k => $v){
|
||||
$res=@mysql_query("SELECT descr,precioVenta1 FROM productos WHERE id=".$k,$conexion_prod);
|
||||
$datos=@mysql_fetch_array($res);
|
||||
$total+=$datos[1]*$v;
|
||||
echo '<tr><td><a href="#" onclick="javascript:moreInfo('.$k.');">'.$datos[0].'</a></td>';
|
||||
echo '<td style="text-align:right">'.number_format($datos[1],2,"'",".").'</td>';
|
||||
echo '<td></td>';
|
||||
echo '<td><input type=text value='.$v.' name=unds_'.$k.' size=5></td></tr>';
|
||||
}
|
||||
echo '<tr>';
|
||||
|
||||
echo '<td class=menut style="text-align:right">Base Imponible:<br>IVA 16%:<br>Total:</td>';
|
||||
echo '<td class=menut style="text-align:right">'.number_format($total,2,"'",".").'<br>'.number_format(($total*0.16),2,"'",".").'<br>'.number_format(($total*1.16),2,"'",".").'</td>';
|
||||
|
||||
echo '<td class=menut> </td>';
|
||||
echo '<td class=menut> </td>';
|
||||
echo '</tr></table>';
|
||||
|
||||
mysql_free_result($res);
|
||||
mysql_close($conexion_prod);
|
||||
}
|
||||
|
||||
} // fin cesta desconectada
|
||||
?>
|
56
prod/familias.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
function getFamLevel( $familia )
|
||||
{
|
||||
if ( ($familia & 0x000000FF) ) return 4;
|
||||
if ( ($familia & 0x0000FF00) ) return 3;
|
||||
if ( ($familia & 0x00FF0000) ) return 2;
|
||||
if ( ($familia & 0xFF000000) ) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
function printLevel( $familia )
|
||||
{
|
||||
switch( getFamLevel( $familia ) )
|
||||
{
|
||||
case 1:
|
||||
echo "-> ";
|
||||
break;
|
||||
case 2:
|
||||
echo " > ";
|
||||
break;
|
||||
case 3:
|
||||
echo " - ";
|
||||
break;
|
||||
case 4:
|
||||
echo " - ";
|
||||
break;
|
||||
default:
|
||||
echo "NiVeL DeScOnOcIdO - Error de interpretación -";
|
||||
}
|
||||
}
|
||||
|
||||
function printSelectFAM( $conexion, $currFAM, $extrasSelect )
|
||||
{
|
||||
echo "\n";
|
||||
echo "<select name=\"FiltrarPor\" size=\"1\" $extrasSelect>\n";
|
||||
echo " <option value=\"-1\" >-=[ TODOS ]=-</option>\n";
|
||||
echo " <option ";
|
||||
if ( $currFAM == 0 ) echo "selected";
|
||||
echo " value=\"0\" >Sin Clasificar</option>";
|
||||
|
||||
$consulta = "SELECT id, Familia, descr FROM productos WHERE EsNodo='Y' ORDER BY Familia";
|
||||
$resF = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta de familias<br>$consulta<br>".mysql_error($conexion));
|
||||
while ( $datos = mysql_fetch_array($resF) )
|
||||
{
|
||||
echo "<option value=\"$datos[1]\"";
|
||||
if ( $currFAM == $datos[1] ) echo " SELECTED ";
|
||||
echo ">";printLevel($datos[1]);echo"$datos[2]</option>\n";
|
||||
}
|
||||
mysql_free_result($resF);
|
||||
|
||||
echo "</select>\n";
|
||||
}
|
||||
|
||||
?>
|
407
prod/generador.php
Normal file
@ -0,0 +1,407 @@
|
||||
<?
|
||||
require ("open_db_prod.php" );
|
||||
|
||||
$camposDisp[Procesador]=;
|
||||
$camposDisp[PlacaBase]=;
|
||||
$camposDisp[Memoria]=;
|
||||
$camposDisp[DiscoDuro]=;
|
||||
$camposDisp[CD]=;
|
||||
$camposDisp[Grabadora]=;
|
||||
$camposDisp[Grafica]=;
|
||||
$camposDisp[Sonido]=;
|
||||
$camposDisp[Altavoces]=;
|
||||
$camposDisp[TecladoRaton]=;
|
||||
$camposDisp[Monitor]=;
|
||||
$camposDisp[Modem]=;
|
||||
$camposDisp[Red]=;
|
||||
$camposDisp[SO]=;
|
||||
$camposDisp[Impresora]=;
|
||||
$camposDisp[Scanner]=;
|
||||
|
||||
|
||||
function rSelect( $campoSel )
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<p><!--webbot bot="HTMLMarkup" startspan --><style TYPE="TEXT/CSS">.g_si { BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px
|
||||
solid; } .g_sc { BORDER-TOP: black 1px solid; } .g_sd { BORDER-TOP:
|
||||
black 1px solid; BORDER-RIGHT: black 1px solid; } .g_ci { BORDER-LEFT:
|
||||
black 1px solid; } .g_dc { BORDER-RIGHT: black 1px solid; } .g_ii
|
||||
{ BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; }
|
||||
.g_ic { BORDER-BOTTOM: black 1px solid; } .g_id { BORDER-BOTTOM:
|
||||
black 1px solid; BORDER-RIGHT: black 1px solid; } .g_sel { color: #FFDF00; width:150px; } .g_tot {text-align:right;}
|
||||
.g_opt {text-align:right;}
|
||||
</style> <!--webbot
|
||||
bot="HTMLMarkup" endspan --><script language="JavaScript"><!--
|
||||
var camposDisp = new Array("Procesador", "PlacaBase", "Memoria", "DiscoDuro", "CD", "Grabadora", "Grafica", "Sonido", "Altavoces", "TecladoRaton", "Monitor", "Modem", "Red", "SO", "Impresora", "Scanner");
|
||||
|
||||
function acota( N )
|
||||
{
|
||||
return Math.round(eval(N)*100) / 100;
|
||||
}
|
||||
|
||||
function fijaCambios( campo )
|
||||
{
|
||||
eval( "generador.i"+campo+".value=generador.s"+campo+".options[generador.s"+campo+".selectedIndex].value");
|
||||
|
||||
var sumaBaseImp = 0.0;
|
||||
for ( i=0; i<camposDisp.length; i++)
|
||||
sumaBaseImp = eval(sumaBaseImp) + eval( eval( "generador.i"+camposDisp[i]+".value" ));
|
||||
|
||||
generador.baseImp.value = acota( sumaBaseImp );
|
||||
generador.iva.value = acota( eval(sumaBaseImp)*0.16 );
|
||||
generador.total.value = acota( eval(sumaBaseImp)*1.16 );
|
||||
}
|
||||
|
||||
function componerURL()
|
||||
{
|
||||
|
||||
var ParamURL = "";
|
||||
for ( i=0; i<camposDisp.length; i++)
|
||||
ParamURL +="&s"+camposDisp[i]+"="+eval("generador.s"+camposDisp[i]+".options[generador.s"+camposDisp[i]+".selectedIndex].text")
|
||||
+ "&i"+camposDisp[i]+"="+eval("generador.s"+camposDisp[i]+".options[generador.s"+camposDisp[i]+".selectedIndex].value")
|
||||
|
||||
alert( "Esta ser<65> la cadena pasada:\n\n"+ParamURL );
|
||||
|
||||
}
|
||||
|
||||
// --></script></p>
|
||||
|
||||
<form method="POST" name="generador">
|
||||
<table border="0" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top" width="240"><div align="center"><center><table
|
||||
border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><img src="prod/images/move66.gif" width="150"
|
||||
height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="center"><center><table
|
||||
border="0" cellspacing="0"
|
||||
style="border-left: black 1px solid;border-right: black 1px solid;border-bottom: black 1px solid;">
|
||||
<tr>
|
||||
<td align="center" colspan="2"
|
||||
bgcolor="#000000"
|
||||
style="text-align:center;">Equipo
|
||||
Actual</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Base Imp.:</td>
|
||||
<td><input type="text" size="10"
|
||||
name="baseImp" class="g_tot" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>i.v.a. 16%:</td>
|
||||
<td><input type="text" size="10"
|
||||
name="iva" class="g_tot" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style="border-top:black 1px solid;">Total:</td>
|
||||
<td
|
||||
style="border-top:black 1px solid;"><input
|
||||
type="text" size="10" name="total"
|
||||
class="g_tot" readonly></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div><p>Elige los componentes de tu
|
||||
ordenador y no se te olvide <u>combinar</u>
|
||||
correctamente el tipo de <u>Procesador</u>, <u>PlacaBase</u>
|
||||
y <u>Memoria</u>.</p>
|
||||
<p>Cuando acabes, puedes pulsar "<a
|
||||
href="javascript:componerURL();">Generar Presupuesto</a>",
|
||||
para obtener un resumen de tu selecci<63>n.</p>
|
||||
<p>Adem<65>s si pinchas en la "bombilla",
|
||||
obtendras informaci<63>n sobre ese componente y su
|
||||
funci<63>n dentro del equipo.</p>
|
||||
</td>
|
||||
<td><div align="center"><center><table border="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td class="g_si">Procesador:</td>
|
||||
<td class="g_sc"><select name="sProcesador"
|
||||
size="1" onchange="fijaCambios('Procesador')"
|
||||
class="g_sel">
|
||||
<option selected value="300.50">AMD K7 XP 1800 Mhz</option>
|
||||
<option value="400.50">AMD K7 XP 2000 Mhz</option>
|
||||
</select></td>
|
||||
<td class="g_sd"><input type="text" size="6"
|
||||
name="iProcesador" class="g_opt" readonly></td>
|
||||
<td><a
|
||||
href="javascript:help(%22procesador%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ci">Placa Base:</td>
|
||||
<td><select name="sPlacaBase" size="1"
|
||||
onchange="fijaCambios('PlacaBase')"
|
||||
class="g_sel">
|
||||
<? rSelect( 'PlacaBase' ); ?>
|
||||
</select></td>
|
||||
<td class="g_cd"><input type="text" size="6"
|
||||
name="iPlacaBase" class="g_opt" readonly></td>
|
||||
<td><a
|
||||
href="javascript:help(%22placabase%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ii">Memoria:</td>
|
||||
<td class="g_ic"><select name="sMemoria"
|
||||
size="1" onchange="fijaCambios('Memoria')"
|
||||
class="g_sel">
|
||||
<? rSelect( 'Memoria' ); ?>
|
||||
</select></td>
|
||||
<td class="g_id"><input type="text" size="6"
|
||||
name="iMemoria" class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22memoria%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_si">Disco Duro:</td>
|
||||
<td><select name="sDiscoDuro" size="1"
|
||||
onchange="fijaCambios('DiscoDuro')"
|
||||
class="g_sel">
|
||||
<? rSelect( 'DiscoDuro' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iDiscoDuro" class="g_opt" readonly></td>
|
||||
<td><a
|
||||
href="javascript:help(%22discoduro%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ci">CD / DVD:</td>
|
||||
<td><select name="sCD" size="1"
|
||||
onchange="fijaCambios('CD')" class="g_sel">
|
||||
<? rSelect( 'CD' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6" name="iCD"
|
||||
class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22opticos%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ii">ReGrabadora:</td>
|
||||
<td><select name="sGrabadora" size="1"
|
||||
onchange="fijaCambios('Grabadora')"
|
||||
class="g_sel">
|
||||
<? rSelect( 'Grabadora' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iGrabadora" class="g_opt" readonly></td>
|
||||
<td><a
|
||||
href="javascript:help(%22grabadora%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_si">Gr<47>fica:</td>
|
||||
<td><select name="sGrafica" size="1"
|
||||
onchange="fijaCambios('Grafica')"
|
||||
class="g_sel">
|
||||
<option selected value="0">standard</option>
|
||||
<? rSelect( 'Grafica' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iGrafica" class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22grafica%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ci">Sonido:</td>
|
||||
<td><select name="sSonido" size="1"
|
||||
onchange="fijaCambios('Sonido')" class="g_sel">
|
||||
<option selected value="0">standard</option>
|
||||
<option value="50.1">SB 5.1</option>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iSonido" class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22sonido%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ii">Altavoces:</td>
|
||||
<td><select name="sAltavoces" size="1"
|
||||
onchange="fijaCambios('Altavoces')"
|
||||
class="g_sel">
|
||||
<option selected value="0">ninguno</option>
|
||||
<? rSelect( 'Altavoces' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iAltavoces" class="g_opt" readonly></td>
|
||||
<td><a
|
||||
href="javascript:help(%22altavoces%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_si">Teclado y Raton:</td>
|
||||
<td><select name="sTecladoRaton" size="1"
|
||||
onchange="fijaCambios('TecladoRaton')"
|
||||
class="g_sel">
|
||||
<option selected value="0">standard</option>
|
||||
<? rSelect( 'TecladoRaton' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iTecladoRaton" class="g_opt" readonly></td>
|
||||
<td><a
|
||||
href="javascript:help(%22tecladoraton%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ii">Monitor:</td>
|
||||
<td><select name="sMonitor" size="1"
|
||||
onchange="fijaCambios('Monitor')"
|
||||
class="g_sel">
|
||||
<option selected value="0">ninguno</option>
|
||||
<? rSelect( 'Monitor' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iMonitor" class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22monitor%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_si">Modem:</td>
|
||||
<td><select name="sModem" size="1"
|
||||
onchange="fijaCambios('Modem')" class="g_sel">
|
||||
<option selected value="0">ninguno</option>
|
||||
<? rSelect( 'Modem' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6" name="iModem"
|
||||
class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22modem%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ii">Tarjeta de Red:</td>
|
||||
<td><select name="sRed" size="1"
|
||||
onchange="fijaCambios('Red')" class="g_sel">
|
||||
<option selected value="0">ninguno</option>
|
||||
<? rSelect( 'Red' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6" name="iRed"
|
||||
class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22red%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sistema Operativo:</td>
|
||||
<td><select name="sSO" size="1"
|
||||
onchange="fijaCambios('SO')" class="g_sel">
|
||||
<option selected value="0">ninguno</option>
|
||||
<? rSelect( 'SO' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6" name="iSO"
|
||||
class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22so%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_si">Impresora:</td>
|
||||
<td><select name="sImpresora" size="1"
|
||||
onchange="fijaCambios('Impresora')"
|
||||
class="g_sel">
|
||||
<option selected value="0">ninguno</option>
|
||||
<? rSelect( 'Impresora' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iImpresora" class="g_opt" readonly></td>
|
||||
<td><a
|
||||
href="javascript:help(%22impresora%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="g_ii">Scanner:</td>
|
||||
<td><select name="sScanner" size="1"
|
||||
onchange="fijaCambios('Scanner')"
|
||||
class="g_sel">
|
||||
<option selected value="0">ninguno</option>
|
||||
<? rSelect( 'Scanner' ); ?>
|
||||
</select></td>
|
||||
<td><input type="text" size="6"
|
||||
name="iScanner" class="g_opt" readonly></td>
|
||||
<td><a href="javascript:help(%22scanner%22);"><img
|
||||
src="prod/images/idea.gif" border="0" width="16"
|
||||
height="16"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p><script language="JavaScript"><!--
|
||||
for ( i=0; i<camposDisp.length; i++)
|
||||
eval( "generador.i"+camposDisp[i]+".value=generador.s"+camposDisp[i]+".options[generador.s"+camposDisp[i]+".selectedIndex].value");
|
||||
|
||||
var sumaBaseImp = 0.0;
|
||||
for ( i=0; i<camposDisp.length; i++)
|
||||
sumaBaseImp = eval(sumaBaseImp) + eval( eval( "generador.i"+camposDisp[i]+".value" ));
|
||||
generador.baseImp.value = acota( sumaBaseImp );
|
||||
generador.iva.value = acota( eval(sumaBaseImp)*0.16 );
|
||||
generador.total.value = acota( eval(sumaBaseImp)*1.16 );
|
||||
// --></script></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
mysql_free_result($res);
|
||||
mysql_close($conexion_prod);
|
||||
?>
|
28
prod/getImg.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?
|
||||
if($idf) {
|
||||
require ("open_db_prod.php" );
|
||||
|
||||
$query = "SELECT Imagen, filetype FROM productos WHERE id=".$idf;
|
||||
$res = mysql_query($query, $conexion_prod) or die("ERROR BUSCANDO IMAGEN");
|
||||
|
||||
$data = mysql_result($res,0,'Imagen');
|
||||
$type = mysql_result($res,0,'filetype');
|
||||
mysql_free_result($res);
|
||||
mysql_close($conexion);
|
||||
if ( !empty( $type) )
|
||||
{
|
||||
Header( "Content-type: $type" );
|
||||
echo $data;
|
||||
} else {
|
||||
Header("Content-type: image/gif");
|
||||
|
||||
$fp = fopen("images/simagen.gif","rb");
|
||||
$file = fread($fp,filesize("images/simagen.gif"));
|
||||
fclose($fp);
|
||||
|
||||
echo $file;
|
||||
}
|
||||
} else {
|
||||
echo "<META CONTENT=\"0; URL=error.htm\" HTTP-EQUIV=\"REFRESH\">";
|
||||
}
|
||||
?>
|
8
prod/help.htm
Normal file
@ -0,0 +1,8 @@
|
||||
<table width="80%" style="border-bottom:black 1px solid;"><tr><td>
|
||||
|
||||
<h1>Ayuda</h1>
|
||||
|
||||
<p class=remark>Interfaz de compra on-line</p>
|
||||
|
||||
</td></tr></table>
|
||||
|
BIN
prod/images/Sin título-1.psd
Normal file
BIN
prod/images/bfl.gif
Normal file
After Width: | Height: | Size: 151 B |
BIN
prod/images/bfm.gif
Normal file
After Width: | Height: | Size: 135 B |
BIN
prod/images/bfr.gif
Normal file
After Width: | Height: | Size: 150 B |
BIN
prod/images/cerezas_presup.gif
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
prod/images/help.gif
Normal file
After Width: | Height: | Size: 724 B |
BIN
prod/images/idea.gif
Normal file
After Width: | Height: | Size: 571 B |
BIN
prod/images/move66.gif
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
prod/images/plano copiar.jpg
Normal file
After Width: | Height: | Size: 123 KiB |
BIN
prod/images/plano.psd
Normal file
BIN
prod/images/t-descr.gif
Normal file
After Width: | Height: | Size: 355 B |
BIN
prod/images/t-precio.gif
Normal file
After Width: | Height: | Size: 218 B |
BIN
prod/images/t-subtotal.gif
Normal file
After Width: | Height: | Size: 257 B |
BIN
prod/images/t-unds.gif
Normal file
After Width: | Height: | Size: 187 B |
BIN
prod/images/tree.gif
Normal file
After Width: | Height: | Size: 461 B |
8
prod/index.htm
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>:: No dispone de permisos para acceder a esta carpeta ::</title>
|
||||
<META CONTENT="0; URL=/" HTTP-EQUIV="REFRESH">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
140
prod/listado_productos.php
Normal file
@ -0,0 +1,140 @@
|
||||
<?
|
||||
global $error_prod;
|
||||
|
||||
require ("open_db_prod.php" );
|
||||
|
||||
// $error_prod = true;
|
||||
|
||||
if ( isset( $error_prod ) && $error_prod==true )
|
||||
{
|
||||
echo "<h1>Listado de productos</h1><br><br>".
|
||||
"<p class=remark>Base de datos bloqueada</p>".
|
||||
"<br>Actualmente la base de datos de productos se encuentra bloqueada.".
|
||||
"<br>Pruebe a intentar acceder mas tarde.";
|
||||
} else {
|
||||
|
||||
require ("familias.php");
|
||||
|
||||
if ( !isset( $FiltrarPor ) ) $FiltrarPor = -1;
|
||||
imprimeCabecera();
|
||||
}
|
||||
|
||||
mysql_free_result($res);
|
||||
mysql_close($conexion_prod);
|
||||
|
||||
function resize($H, $W)
|
||||
{
|
||||
$nW = 100; $nH = 100;
|
||||
$image_prop = "";
|
||||
|
||||
if ( $W > 0 )
|
||||
{
|
||||
if ( $W > $H )
|
||||
{
|
||||
$nH = intval(($H/$W)*$nW); $image_prop = " width=\"$nW\" height=\"".$nH."\"";
|
||||
} else {
|
||||
$nW = intval(($W/$H)*$nH); $image_prop = " height=\"$nH\" width=\"".$nW."\"";
|
||||
}
|
||||
}
|
||||
|
||||
return $image_prop;
|
||||
}
|
||||
|
||||
function imprimeCabecera()
|
||||
{
|
||||
global $conexion_prod, $FiltrarPor, $findp;
|
||||
|
||||
echo '<script src="prod/moreinfo.js"></script>';
|
||||
echo '<form method="POST" name="sfam" action="./?dgo=prod/listado_productos.php"><table border="0" width="98%" style="border-bottom: black 1px solid;">';
|
||||
echo '<tr><td valign="bottom"><h1>Listado de Productos</h1></td>';
|
||||
echo '<td valign="bottom">Familia: ';
|
||||
printSelectFAM( $conexion_prod, $FiltrarPor, "" );
|
||||
echo '<br>Buscar: <input type="text" value="" name="findp" size=15> <a href="./?go=../prod/help.htm"><img src="prod/images/help.gif" align="absmiddle" width="18" height="19" border="0" alt="<22>Necesita ayuda?"></a>';
|
||||
echo '</td><td><a href="javascript:document.sfam.submit();"><img src="prod/images/tree.gif" alt="Filtrar listado" width="32" height="32" border="0" align="bottom"></a></td></tr></table></form>';
|
||||
|
||||
$sqlFIND = "";
|
||||
// Listados parciales...
|
||||
if ( $FiltrarPor > -1 || !empty($findp) )
|
||||
{
|
||||
echo "<br><br>";
|
||||
if ( $FiltrarPor == -1 ) $FiltrarPor = 0x00000000; else $sqlFIND = "Familia=$FiltrarPor AND";
|
||||
|
||||
if ( empty( $findp ) )
|
||||
$resp = @mysql_query( "SELECT id, descr, precioVenta1 FROM productos WHERE Familia=$FiltrarPor AND EsNodo='N' ORDER BY descr", $conexion_prod );
|
||||
else
|
||||
$resp = @mysql_query( "SELECT id, descr, precioVenta1 FROM productos WHERE $sqlFIND descr LIKE '%$findp%' AND EsNodo='N' ORDER BY descr", $conexion_prod );
|
||||
|
||||
if ( mysql_numrows( $resp )>0 )
|
||||
{
|
||||
echo '<table border=0 width="100%" cellpadding="2" cellspacing="0" style="border-top:white 1px solid;border-bottom:white 1px solid;border-left:white 1px solid;border-right:white 1px solid;">';
|
||||
echo '<tr><td style="background-color:#FFFFFF;color:#000000"><b>Descripción</b></td><td style="background-color:#FFFFFF;color:#000000"><b>PV</b></td><td style="background-color:#FFFFFF;color:#000000"><b>-ptas-</b></td><td style="background-color:#FFFFFF;"></td></tr>';
|
||||
while ( $datos = mysql_fetch_array($resp) )
|
||||
{
|
||||
echo "\n<tr><td><a href=\"#\" onclick=\"javascript:moreInfo($datos[0]);\">$datos[1]</a></td>".
|
||||
"<td style=\"text-align:right\">".number_format($datos[2],2,"'",".")."</td><td style=\"text-align:right\">".number_format( round(166.386*$datos[2]), 0, "'",".")."</td>";
|
||||
echo "<td><a href=\"javascript:aCesta($datos[0],1,'$datos[2]',$FiltrarPor)\">C</a></td></tr>";
|
||||
}
|
||||
echo '</table>';
|
||||
} else {
|
||||
echo '<center><p class=remark>No se encontraron productos.</p></center>';
|
||||
}
|
||||
} else {
|
||||
echo "<p class=remark>Si desea precios de un semi-equipo <20> equipo completo...</p>...consulta nuestro \"<a href=\"./?dgo=prod/make_ord.php\">Maquetador de Equipos</a>\" y construyete tú mismo el equipo.<br>Tambien puedes elegir una de las dos alternativas que te mostramos mas abajo.";
|
||||
$FiltrarPor = 0x00000000;
|
||||
}
|
||||
|
||||
echo "\n<br><br><br>";
|
||||
|
||||
// Obtenemos las descendencias directas de la familia ACTUAL
|
||||
// ** Esto es un pelin complicado, asi que prestad atenci<63>n ** JDsoft.
|
||||
// <20>Se nota que me gusta jugar con Bitwise? P-))
|
||||
// Familia & ~( 0xFF<<nivel_sig ) == FAMILIA_ACTUAL
|
||||
if ( empty( $findp ) )
|
||||
{
|
||||
$nivel_act = getFamLevel( $FiltrarPor );
|
||||
if ( $nivel_act < 4 )
|
||||
{
|
||||
$nivel_sig = ~(0xFF << (3-$nivel_act)*8 );
|
||||
$resp = @mysql_query( "SELECT id, Familia, descr, imgH, imgW FROM productos WHERE (Familia & $nivel_sig)=$FiltrarPor AND EsNodo='Y' ORDER BY descr ", $conexion_prod );
|
||||
if ( mysql_numrows( $resp )>1 )
|
||||
{
|
||||
echo '<table border="0" width="98%" style="border-bottom: black 1px solid;"><tr><td align=center><p class=remark>Familias relacionadas con la actual</p></tr></table>';
|
||||
echo '<table border=0 width="100%" cellpadding="0" cellspacing="0" >';
|
||||
$rowCount = 0;
|
||||
while ( $datos = mysql_fetch_array($resp) )
|
||||
{
|
||||
if ( $datos[1] != $FiltrarPor )
|
||||
{
|
||||
|
||||
if ( $rowCount == 0 )
|
||||
echo "\n<tr><td width=10><img src=\"prod/images/bfl.gif\"></td>";
|
||||
|
||||
echo "<td background=\"prod/images/bfm.gif\" align=center>";
|
||||
echo "<a href=\"./?dgo=prod/listado_productos.php&FiltrarPor=$datos[1]\"><img src=\"prod/getImg.php?idf=$datos[0]\" ".resize($datos[3], $datos[4])." border=0><br>$datos[2]</a>";
|
||||
echo "</td>";
|
||||
|
||||
if ( $rowCount == 4 )
|
||||
{
|
||||
echo "<td width=10><img src=\"prod/images/bfr.gif\"></td></tr>";
|
||||
$rowCount=0;
|
||||
} else
|
||||
$rowCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $rowCount>0 )
|
||||
{
|
||||
while( $rowCount<5 ) { $rowCount++; echo "<td background=\"prod/images/bfm.gif\"></td>"; }
|
||||
echo "<td width=10><img src=\"prod/images/bfr.gif\"></td></tr>";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
mysql_free_result($resp);
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
9
prod/makeord.php
Normal file
@ -0,0 +1,9 @@
|
||||
<h1>Maqueta tu ordenador</h1>
|
||||
<br><br>
|
||||
<p class=remark>Actualmente esta sección esta desconectada por mantenimiento</p>
|
||||
<br>
|
||||
No obstante, pruebe a acceder al listado completo de productos:
|
||||
<ul>
|
||||
<li>Men<EFBFBD> :: Productos -> Listado completo</li>
|
||||
<li>url: <a href="http://infdj.com/?dgo=prod/listado_productos.php">http://infdj.com/?dgo=prod/listado_productos.php</a> </li>
|
||||
</ul>
|
23
prod/moreinfo.js
Normal file
@ -0,0 +1,23 @@
|
||||
function abreVentana( hVentana, url, W, H )
|
||||
{
|
||||
if ( hVentana.location && !hVentana.closed )
|
||||
{
|
||||
hVentana.location.href = url;
|
||||
} else {
|
||||
hVentana =
|
||||
window.open(url,hVentana,"width="+W+",height="+H+",top=50,left=50,resizable=no,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
|
||||
if ( !hVentana.opener ) hVentana.opener = self;
|
||||
}
|
||||
if ( window.focus ) hVentana.focus();
|
||||
}
|
||||
|
||||
var hwd_info="hwd_info";
|
||||
function moreInfo( idp )
|
||||
{
|
||||
abreVentana( hwd_info, "prod/moreinfo.php?idp="+idp, 700, 350 );
|
||||
}
|
||||
|
||||
function aCesta( idp, und, pv, fp )
|
||||
{
|
||||
this.location.href="./?dgo=prod/listado_productos.php&FiltrarPor="+fp+"&item="+idp+"&cantidad="+und+"&importe="+pv;
|
||||
}
|
70
prod/moreinfo.php
Normal file
@ -0,0 +1,70 @@
|
||||
<html>
|
||||
<head><title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<?
|
||||
require ("open_db_prod.php" );
|
||||
|
||||
if ( isset( $idp ) )
|
||||
{
|
||||
$res = @mysql_query( "SELECT p.cprod, p.descr, p.precioVenta1, i.tipo AS iva, p.notas, p.fabricante, p.garantia, p.imgH, p.imgW FROM productos AS p, tipos_iva AS i WHERE p.id=$idp AND i.id=p.tipo_iva",$conexion_prod ) or die(mysql_error($conexion_prod));
|
||||
if ( @mysql_num_rows($res)>0 )
|
||||
{
|
||||
list( $db_cprod, $db_descr, $db_pv, $db_iva, $db_notas, $db_fabr, $db_gar, $db_imgH, $db_imgW ) = @mysql_fetch_array( $res );
|
||||
echo "<table>".
|
||||
"<tr><td colspan=2>".
|
||||
"<b>$db_descr</b></td></tr>".
|
||||
"<tr><td>";
|
||||
echo "<br><b>C<>digo:</b> $db_cprod".
|
||||
|
||||
"<br><b>Precio:</b> $db_pv <20>".
|
||||
"<br><b>IVA:</b> $db_iva".
|
||||
"<br><b>Garant<6E>a:</b> $db_gar meses".
|
||||
"<br><b>Fabricante:</b> <a href='$db_fabr' target=_new>$db_fabr</a>";
|
||||
echo "</td><td width=300 valign=top>";
|
||||
if ( $db_imgH > 0 )
|
||||
{
|
||||
echo '<img src="getImg.php?idf='.$idp.'" '.resize( $db_imgH, $db_imgW ).'>';
|
||||
}
|
||||
echo "</td></tr></table>";
|
||||
echo "<b>Notas:</b><br> ".nl2br($db_notas)."<br><br><br>";
|
||||
}
|
||||
}
|
||||
|
||||
mysql_free_result($res);
|
||||
mysql_close($conexion);
|
||||
|
||||
function resize($H, $W)
|
||||
{
|
||||
$nW = 200; $nH = 200;
|
||||
$image_prop = "";
|
||||
|
||||
if ( $W > 0 )
|
||||
{
|
||||
if ( !($W < $nW ||$H < $nH ) )
|
||||
{
|
||||
if ( $W > $H )
|
||||
{
|
||||
$nH = intval(($H/$W)*$nW); $image_prop = " width=\"$nW\" height=\"".$nH."\"";
|
||||
} else {
|
||||
$nW = intval(($W/$H)*$nH); $image_prop = " height=\"$nH\" width=\"".$nW."\"";
|
||||
}
|
||||
} else {
|
||||
$image_prop=" width=\"$W\" height=\"$H\"";
|
||||
}
|
||||
}
|
||||
|
||||
return $image_prop;
|
||||
}
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
5
prod/open_db_prod.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?
|
||||
global $conexion_prod, $id_prod;
|
||||
$conexion_prod = @mysql_connect( 'localhost', 'TPVweb_user', 'nuevo_y_mejorado_TPV' ) OR $error_prod = true;
|
||||
$id_prod = @mysql_select_db( 'TPV', $conexion_prod ) OR $error_prod = true;
|
||||
?>
|
142
prod/presupuesto.htm
Normal file
@ -0,0 +1,142 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
|
||||
|
||||
body {border: 0; margin: 0; background: buttonface;}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="1" width="650"
|
||||
bgcolor="#000000">
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF"><font color="#808080" size="2"
|
||||
face="Arial Narrow">f</font><br>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td><img src="images/cerezas_presup.gif"
|
||||
width="58" height="92"></td>
|
||||
<td><font size="4" face="Arial Black">Inform<EFBFBD>tica
|
||||
D.J. </font><font size="2" face="Arial Black"><em>programadores</em></font><font
|
||||
size="1" face="Verdana"><sup><br>
|
||||
<br>
|
||||
c</sup>/ Murillo n<>11 - Alcal<61> de Guadaira (Sevilla)
|
||||
CP:41500<em><br>
|
||||
</em>Telf. 955.615.854 - Fax. 955-614-913<br>
|
||||
url: </font><a href="http://www.infdj.com"><font
|
||||
size="1" face="Verdana">www.infdj.com</font></a><font
|
||||
size="1" face="Verdana"> - e-mail: </font><a
|
||||
href="mailto:comercial@infdj.com"><font size="1"
|
||||
face="Verdana">comercial@infdj.com</font></a><font
|
||||
size="1" face="Verdana"> </font></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><br>
|
||||
</p>
|
||||
<table border="0" cellspacing="0" bgcolor="#000000"
|
||||
bordercolor="#000000">
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF"><table border="0"
|
||||
cellpadding="0" cellspacing="0" width="100%"
|
||||
bordercolor="#000000">
|
||||
<tr>
|
||||
<td align="center" width="400"
|
||||
bgcolor="#000000"><font size="1"><img
|
||||
src="images/t-descr.gif" width="387"
|
||||
height="20"></font></td>
|
||||
<td align="center" width="100"
|
||||
bgcolor="#000000"><font size="1"><img
|
||||
src="images/t-precio.gif" width="100"
|
||||
height="20"></font></td>
|
||||
<td align="center" width="50"
|
||||
bgcolor="#000000"><font size="1"><img
|
||||
src="images/t-unds.gif" width="52"
|
||||
height="20"></font></td>
|
||||
<td align="center" width="100"
|
||||
bgcolor="#000000"><font size="1"><img
|
||||
src="images/t-subtotal.gif" width="101"
|
||||
height="20"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="400"><font face="Courier New">adsd</font></td>
|
||||
<td width="100"> </td>
|
||||
<td width="50"> </td>
|
||||
<td width="100"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p align="center"><font size="2" face="Arial Narrow"></font> </p>
|
||||
<div align="right"><table border="1" cellpadding="0"
|
||||
cellspacing="0" bordercolor="#000000">
|
||||
<tr>
|
||||
<td><table border="0" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td>Base Imponible:</td>
|
||||
<td align="right"><font
|
||||
face="Courier New">0'0</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IVA 16%</td>
|
||||
<td align="right"><font
|
||||
face="Courier New">0'0</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Presupuesto: </td>
|
||||
<td align="right"><font
|
||||
face="Courier New">000'00</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><p align="center"><font size="2"
|
||||
face="Arial Narrow">Este presupuesto tiene una validez de
|
||||
5 d<>as, pasado este periodo Inform<72>tica D.J., se
|
||||
reserva el derecho de anularlo.<br>
|
||||
Precios v<>lidos salvo errores de trascripci<63>n o fin de
|
||||
existencia.</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF"><font size="1" face="Arial">Generador
|
||||
On-Line 2.0<br>
|
||||
</font><a href="http://jd.infdj.com"><font size="1"
|
||||
face="Arial">JD soft</font></a><font size="1"
|
||||
face="Arial"> (c) 2003</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
9
prod/resumen_productos.php
Normal file
@ -0,0 +1,9 @@
|
||||
<h1>Productos mas comúnes</h1>
|
||||
<br><br>
|
||||
<p class=remark>Actualmente esta sección esta desconectada por mantenimiento</p>
|
||||
<br>
|
||||
No obstante, pruebe a acceder al listado completo de productos:
|
||||
<ul>
|
||||
<li>Men<EFBFBD> :: Productos -> Listado completo</li>
|
||||
<li>url: <a href="http://infdj.com/?dgo=prod/listado_productos.php">http://infdj.com/?dgo=prod/listado_productos.php</a> </li>
|
||||
</ul>
|