Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/04/2009, 10:19
harvestmoon
 
Fecha de Ingreso: febrero-2009
Ubicación: cancun!
Mensajes: 898
Antigüedad: 15 años, 3 meses
Puntos: 15
Respuesta: enviar Id para abrir PDF pero url llega vacia

Código PHP:
<?PHP
$dblink 
mssql_connect("cyarespaldo","sa","")  
or die(
"no se puede conectar a SQL Server"); 
$success mssql_select_db("archivo",$dblink);
?>
<!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>
<script language="javascript"> 
<!-- 
function solonumeros(evt){
    var key = evt.keyCode || evt.which; 
    return ((key > 47 && key < 58) || key < 14 || key == 46 || (key > 36 && key < 41));
}
--> 
</script> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>[email protected] Sistema de digitalización de Documentos Notariales</title>

</head>

<body>
 <form id="digita" name="index" method="post" action=""enctype="multipart/form-data">
  <div align="center">
  <table width="960" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><img src="cabecera_generica.jpg" width="960" height="82" /></td>
    </tr>
  </table>
  <hr align="center" size="20" color="#685c53" />
  <table width="167" border="0" align="left" cellpadding="0" cellspacing="0">
    <tr>
      <td width="167" height="15" bgcolor="8b2346"><div align="left" class="style1">Búsqueda Rápida</div></td>
    </tr>
  </table>
  <br />
  <table width="186" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#002C5F">
    <tr>
     <td width="186" height="38"><label><span class="style2"><span class="Estilo3">Número de Escritura</span></span><br />
          <input name="numescri" type="text" id="numescritura" style="background-color:#EBEBEB" onkeypress="javascript:return solonumeros(event)"/>
          
          <br />
          <input name="busca" type="image" id="busca" src="lupa.jpg" align="bottom" />
     </label></td>
     
    </tr>
  </table>
   <table width="778" border="1" cellspacing="0" cellpadding="0">
   <tr>
      <td width="245" bgcolor="#FFCFFF"><div align="left" class="style1 Estilo1">Escritura</div></td>
      <td width="156" bgcolor="#FFCCFF"><div align="left" class="style1 Estilo1">Notaria</div></td>
      <td width="120" bgcolor="#FFCCFF"><div align="left" class="style1 Estilo1">Tipo</div></td>
      <td width="247" bgcolor="#FFCCFF"><div align="left" class="style1 Estilo1">Protocolo</div></td>
    </tr>
    
<?php 
       $db
->debug=1;
    
$boton=$_REQUEST["busca"];
    
$cadena=$_REQUEST["numescri"];
    if (
$cadena!="" )
    {
     
$resultreg mssql_query("select * from expedientes where numero= '" $cadena"' ")or die("ha ocurrido un error en la base de datos fallo la consulta");
      while (
$rowreg mssql_fetch_array($resultregMSSQL_ASSOC)) {
    
$clave=$rowreg["clave"];
    
$numescri$rowreg["numero"];
    
$ano=$rowreg["ano"];
    
$doc=$rowreg["documento"];
    
$check="tipoar".$doc;
    
$bot="verpdf".$doc;
    
    print(
"<tr>");
    print 
"<td bgcolor=#FFCCFF><font color=#000000 face=Trebuchet MS><a href=\"#\" onClick=\"datosg(documento='".$check."',boton='".$bot."',id='".$clave."')\" >".$rowreg["numero"]."</font></a></td>";
    print 
"<td bgcolor=#FFCCFF ><font color=#000000 face=Trebuchet MS>".$rowreg["notaria"]."</font></td>";
    print 
"<td bgcolor=#FFCCFF><font color=#000000 face=Trebuchet MS>".$rowreg["tipo"]."</font></td>";
    print 
"<td bgcolor=#FFCCFF ><font color=#000000 face=Trebuchet MS>".$rowreg["protocolo"]."</font></td>";
    print(
"</tr>");
    }
 }
mssql_close($dblink); 
echo 
"<script language=\"javascript\">
function datosg(){
document.getElementById(\"clavear\").value =\"id\";
document.getElementById(documento).checked = true;
document.getElementById(boton).disabled = false;"
;


echo 
"}</script>";

?>
</tr>
  
    
  </table>

   <p>&nbsp;</p>
   <table width="982" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#002C5F">
   <tr>
      <td><input name="clavehide" type="hidden" id="clavear"   />
      <?php 
      $clavebus
=$_GET['clavehide'];
      
      
$resultreg2 mssql_query("select * from expedientes where clave= '" $clavebus"'")or die("ha ocurrido un error en la base de datos fallo la consulta");
      while (
$rowreg mssql_fetch_array($resultregMSSQL_ASSOC)) {
      
$abrir=$rowreg["nombre"];
      
$notaria=$rowreg["notaria"];
    
    switch (
$notaria) {
    case 
"30":
        
$fichero="I:";//cambiar la direccion para q se vean desde el cyarespaldo \\cyarespaldo\30\
        
break;
    case 
"13":
        
$fichero="J:";
        break;
    case 
"13_ex":
       
$fichero="H:";
        break;
 }
}
?>
     </td>
      <td> </td>
      <td bgcolor="8b2346"><div align="center" class="style1">Documentos</div></td>
    </tr>
    <tr>
      <td width="199" height="27"><label><span class="style2"><span class="style4">Escritura</span></span>
            <input name="escritura" type="text" id="escri" style="background-color:#EBEBEB" readonly="true" value="<?php echo $numescri?>" />
      </label></td>
      <td width="163" height="27"><label><span class="style2"><span class="style4">Año</span></span><br />
            <input name="anioescri" type="text" id="anioescri" style="background-color:#EBEBEB" readonly="true" value="<?php echo $ano?>" />
      </label></td>
      <td colspan="2"><label>
        <input type="checkbox" name="tipoar" id="tipoar" />
        <span class="style4">BIS</span></label></td>
      <td width="210">&nbsp;</td>
      <td width="205">&nbsp;</td>
    </tr>
    <tr>
      <td><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI0" />
        <span class="style1">Testimonio</span>
       <input name="verpdfapen" type="image" disabled="disabled" id="verpdfI0" onclick="window.open('verpdf.php?ruta=<?php echo $fichero?> & pdf=<?php echo $abrir?>')" src="iconitoPDF.gif" />
      </label></td>
      <td><label>
        <input name="tipoar2" type="checkbox" disabled="disabled" id="tipoarI1"  />
        <span class="style1">Apéndice</span>
        <input type="image" name="verpdfapen" id="verpdfapen" src="iconitoPDF.gif" />
      </label></td>
      <td colspan="2"><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI2" />
        <span class="style1">Indexado1</span>
        <input type="image" name="verpdfindex1" id="verpdfindex1" src="iconitoPDF.gif" />
      </label></td>
      <td><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI3" value="" />
        <span class="style1">Indexado2</span>
        <input type="image" name="verpdfindex2" id="verpdfindex2" src="iconitoPDF.gif" />
      </label></td>
      <td><span class="style5">
        <label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI4" value="" />
        <span class="style6">Indexado3</span>
        <input type="image" name="verpdfindex3" id="verpdfindex3" src="iconitoPDF.gif" />
        </label>
      </span></td>
    </tr>
    <tr>
      <td><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI5" value="" />
        <span class="style1">Boleta de Registro</span>
        <input type="image" name="verpdfbolereg" id="verpdfbolereg" src="iconitoPDF.gif" />
      </label></td>
      <td><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI6" value="" />
        <span class="style1">Varios</span>
        <input type="image" name="verpdfvarios" id="verpdfvarios" src="iconitoPDF.gif" />
      </label></td>
      <td colspan="2"><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI7" value="" />
        <span class="style1">Boleta de Entrada</span>
        <input type="image" name="verpdfboleent" id="verpdfboleent" src="iconitoPDF.gif" />
      </label></td>
      <td><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI8" value="" />
        <span class="style1">Boleta de Rechazo</span>
        <input type="image" name="verpdfbolerech" id="verpdfbolerech" src="iconitoPDF.gif" />
      </label></td>
      <td><label>
        <input name="tipoar" type="checkbox" disabled="disabled" id="tipoarI9" value="" />
        <span class="style1">Cancelacion de </span>
        <input type="image" name="verpdfcancel" id="verpdfcancel" src="iconitoPDF.gif" />
        <span class="style1">Escritura</span></label></td>
    </tr>
    <tr>
      <td colspan="2" ><label><span class="style1">Observaciones </span>
            <textarea name="observ" id="observ" cols="45" rows="5"></textarea>
      </label></td>
      <td width="99"><label><span class="style1">Guardar</span><br />
            <input name="guardar" type="image" id="guardar" src="BtnGuardar.gif" align="center" />
      </label></td>
      <td width="106"><label><span class="style1">Salir</span><br />
          <input type="image" name="salir" id="salir" src="BtnSalir.gif" />
      </label></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  </div>
  <a href="Digita_cargar.php">Cargar Archivos.</a><br />
  </form>
  

</body>
</html>
ese es mi index.php lo q se muestra en la imagen q envie mil gracias
__________________
WHERE IS MY BLUE SUNNY SKY??
pd: todos los karmas son bienvenidos :D