Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/10/2015, 20:50
flashtrix
 
Fecha de Ingreso: noviembre-2004
Mensajes: 249
Antigüedad: 19 años, 4 meses
Puntos: 1
Respuesta: Como Agrego este Script php dentro de mi otro PHP y que funcione

Gracias por responder...si claro aca posteo el codigo...

Código PHP:
<?
$nume 
$_POST['cedula']; 
$notificaciones $_POST['todas']; 
$serv mysql_connect("localhost","root","contrasena"); 
mysql_select_db("basededatos",$serv); 
//---------------------------------------------------------------
if($notificaciones=="si"){
   
$consulta mysql_query("SELECT * FROM datosmultas WHERE cedula='$nume' GROUP BY comparendo ORDER BY fecha_fijacion DESC",$serv);
   
$numero mysql_num_rows($consulta);
}else{
   
$consulta mysql_query("SELECT * FROM datosmultas WHERE cedula='".$nume."' AND fecha_desfijacion >= '".$fecha_actual."' GROUP BY comparendo ORDER BY fecha_fijacion DESC",$serv);    
}
if (
estado =='pago');
{
    
$mensaje "<h3>El (la) señor(a) ".strtoupper($row["nombre"]).", identificado(a) con Cedula No. ".strtoupper($row["cedula"]).", no posee a la fecha Notificaciones registradas en nuestro sistema.</h3>";
}
if(empty(
$nume))
{
echo 
"<h3><b><center>Ingrese un número de identificación válido,<br>no use puntos, ni espacios</center></h3></b><br><br>";
echo 
"<h3><b><center><a href='./porcedula.html'>Nueva Busqueda</a></center></h3></b>";
}else{
if(
$row mysql_fetch_array($consulta)) { 
///*
print "<center><table width='400' border=1 cellpadding=0 cellspacing=0>"
//--------------------------------------------------------------------------------------
$url $row['url'];
$urlexists url_exists($url);

function 
url_exists$url NULL ) {

    if(( 
$url == '' ) ||( $url == NULL ) ){
        return 
false;
    }

    
$headers = @get_headers$url );
    
sscanf($headers[0], 'HTTP/%*d.%*d %d'$httpcode);

    
//Aceptar solo respuesta 200 (Ok), 301 (redirección permanente) o 302 (redirección temporal)
    
$accepted_response = array(200,301,302);
    if( 
in_array$httpcode$accepted_response ) ) {
       echo 
"<center><a href=".$row['url']." target= '_blank' ><img src='botonpdf.png' width='32' height='32'></a></center>";
          } else {
       echo 
"<center><a href='https://www.pagina.com' target='_blank'><img src='btno.png' width='32' height='32'></a></center>"
    }
}
//-------------------------------------------------------------------
print "<tr>
  <td height=59 colspan='4'><br><p><b>&nbsp;&nbsp;&nbsp;Identificación: "
.strtoupper($row['cedula'])."</b><br>
    <b>&nbsp;&nbsp;&nbsp;Nombre: "
.strtoupper($row['nombre'])."</b><br>
      <b>&nbsp;&nbsp;&nbsp;Placa: "
.strtoupper($row['placa'])."</b>
       <b><p align=right>Notificaciones Encontradas: $numero&nbsp;&nbsp;&nbsp;</b><br><br>
      </b></p></td>
  </tr>
<tr>
<td width=90 bgcolor=#0066FF><center><b>Comparendo</b></center></td>  
<td width=100 bgcolor=#0066FF><center><b>Fecha Fijación</b></center></td>
<td width=90 bgcolor=#0066FF><center><b>Fecha Desfijación</b><center></td>
<td width=80 bgcolor=#0066FF><center><b>Ver Notificación</b></center></td>
</tr>
  "

do { 
print
"<tr class=off onMouseOver=this.className='on' onMouseOut=this.className='off'>
  <td><center><a href="
.$row["url"]." target= '_blank' >".$row["comparendo"]."</a></center></td>
  <td><center><a href="
.$row["url"]." target= '_blank' >".$row["fecha_fijacion"]."</a></center></td>
  <td><center><a href="
.$row["url"]." target= '_blank' >".$row["fecha_desfijacion"]."</a></center></td>
  <td><center>"
.url_exists($row['url'])."</center></td>
  </tr>"


while(
$row=mysql_fetch_array($consulta)); 
print
"</table></center>";
print
"<br>"
}
//*/
else{ 
echo 
"<br><br>";


print 
"<h3><center>El documento Número: <b>" .$nume."</b>, no posee a la fecha Notificaciones <br>registradas en nuestro sistema.</h3><br><br>";
echo 
"<h3><b><center><a href='./porcedula.html'>Nueva Busqueda</a></center></b></h3>";

}
?>
    </span></td>
  </tr>
</table>