Ver Mensaje Individual
  #5 (permalink)  
Antiguo 26/05/2008, 15:54
Avatar de xxrandyxx
xxrandyxx
 
Fecha de Ingreso: abril-2008
Ubicación: En mi casa
Mensajes: 143
Antigüedad: 16 años
Puntos: 2
Respuesta: Por favor ayuda urgente

Código:
<?php require_once('../Connections/heaterco_db.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_heaterco_db, $heaterco_db);
$query_rs_car = "SELECT * FROM resistencia_cartucho ORDER BY diametro DESC";
$rs_car = mysql_query($query_rs_car, $heaterco_db) or die(mysql_error());
$row_rs_car = mysql_fetch_assoc($rs_car);
$totalRows_rs_car = mysql_num_rows($rs_car);

$select=$_GET[select];
$select1 = $row_rs_car['voltaje']

?>



<!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>Documento sin t&iacute;tulo</title>
<link href="estilos/stilos.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><table width="800" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="center"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','300','height','95','src','../peliculas/logo','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','menu','false','movie','../peliculas/logo' ); //end AC code
      </script>
        <noscript>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="95">
          <param name="movie" value="../peliculas/logo.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="menu" value="false" />
          <embed src="../peliculas/logo.swf" width="300" height="95" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent" menu="false"></embed>
        </object>
        </noscript>        </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table></td>
      </tr>
      <tr>
        <td align="center" class="text1">RESISTENCIAS TIPO CARTUCHO</td>
      </tr>
      <tr>
        <td align="center" class="text1">Lista de productos en Stock</td>
      </tr>
      <tr>
        <td align="center"><form name="form" id="form">
          <label></label>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td align="center"><label>
                <select name="select" id="select">
                  <option>Diametro del Tubo</option>
                </select>
              </label>
                <label>
                <select name="select2" id="select2">
                  <option>Largo</option>
                </select>
                </label>
                <label>
                <select name="select3" id="select3">
                  <option>Potencia</option>
                </select>
                </label>
                <label>
                <select name="select4" id="select4">
                  <option>Voltaje</option>
                </select>
                </label></td>
            </tr>
          </table>
          <br />
          <label></label>
        </form>
        </td>
      </tr>
      <tr>
        <td align="center"></td>
      </tr>
      <tr>
        <td><table width="800" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="70" height="20" align="center" class="text3">CODIGO</td>
            <td width="100" height="20" align="center" class="text3"><span class="text3">&Oslash;</span> DEL TUBO</td>
            <td width="100" height="20" align="center" class="text3">LARGO</td>
            <td width="100" height="20" align="center" class="text3">POTENCIA</td>
            <td width="100" height="20" align="center" class="text3">VOLTAJE</td>
            <td width="130" height="20" align="center" class="text3">LARGO D' CABLE</td>
            <td width="100" height="20" align="center" class="text3">PRECIO</td>
            <td width="100" align="center" class="text3">Ver Producto</td>
          </tr>
          
        </table>
          <table >
            <tr>
              <?php
$rs_car_endRow = 0;
$rs_car_columns = 1; // number of columns
$rs_car_hloopRow1 = 0; // first row flag
do {
    if($rs_car_endRow == 0  && $rs_car_hloopRow1++ != 0) echo "<tr>";
   ?>
              <td><table width="800" border="0" cellpadding="0" cellspacing="0" class="text4">
                  <tr>
                    <td width="70" align="center"><?php echo $row_rs_car['item']; ?></td>
                    <td width="100" align="center"><?php echo $row_rs_car['diametro']; ?> mm</td>
                    <td width="100" align="center"><?php echo $row_rs_car['largo']; ?> mm</td>
                    <td width="100" align="center"><?php echo $row_rs_car['potencia']; ?> w</td>
                    <td width="100" align="center"><?php echo $row_rs_car['voltaje']; ?> v</td>
                    <td width="130" align="center"><?php echo $row_rs_car['largo_cable']; ?> cm</td>
                    <td width="100" align="center">S/ .<?php echo $row_rs_car['precio']; ?></td>
                    <td width="100" align="center"><a href="detalle_stock.php?item=<?php echo $row_rs_car['item']; ?>">Ver</a> </td>
                  </tr>
              </table></td>
              <?php  $rs_car_endRow++;
if($rs_car_endRow >= $rs_car_columns) {
  ?>
            </tr>
            <?php
 $rs_car_endRow = 0;
  }
} while ($row_rs_car = mysql_fetch_assoc($rs_car));
if($rs_car_endRow != 0) {
while ($rs_car_endRow < $rs_car_columns) {
    echo("<td>&nbsp;</td>");
    $rs_car_endRow++;
}
echo("</tr>");
}?>
                    </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="center"><a href="menu.php">Regresar al Menu de Productos Generales</a></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result($rs_car);
?>