Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/12/2008, 10:50
juanjoseab
 
Fecha de Ingreso: abril-2008
Mensajes: 88
Antigüedad: 16 años
Puntos: 5
Respuesta: $_server[http_host]

Código:
<body>
		<?

		include('conex2.php'); // Conexion a la base de datos
		$link=conectarse(); //variable donde guardo la conexion.
		include('check_pr.php');
		echo '<center>';
			if (isset($ingreso[ingreso])) { 
				echo '<table width="75%" border="1" cellspacing="0" cellpadding="0"><tr><td class="notificacion">'.$ingreso[ingreso].'</td></tr></table>';
			}
			if (isset($error[primeros]) {
				echo '<table width="75%" border="1" cellspacing="0" cellpadding="0"><tr><td class="notificacion">'.$error[falta].'</td></tr></table>';
			}
			echo '</center>';
		 ?>
<table width="80%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%" valign="top" class="afiliados">
	<?php
	$vacio=array();
	$dominio='http://'.$HTTP_HOST; // ESTE PARAMETRO CAMBIE POR $_SERVER[HTTPE_HOST];
echo '<table><th title="Google PageRank">PR</th><th></th>';
$buscar=mysql_query("select * from afiliados where enlace_afi='$dominio'",$link);
$site=mysql_fetch_object($buscar);


$afi=mysql_query("SELECT * FROM afiliados",$link);
$cont=0;
		while($row = mysql_fetch_array($afi)) {
			$cont=$cont+1;
			$pr = get_page_rank($row[enlace_afi]);
			if ($pr<0){ $pr=0; }
			echo '<tr><td>  <img src="http://www.tppemarketing.com/opti_images/pr'.$pr.'.gif" title="Google PageRank: '.$pr.'/10" />  </td><td><b><a href="'.$row[enlace_afi].'" title="'.$p.'">'.$row[nombre_afi].' </a></b> - '.$row[enlace_afi].' <br />'.$row[descripcion_afi].'</td></tr>';
			if($cont==1) { $p=$site->kw1_afi; }
			if($cont==2) { $p=$site->kw2_afi; }
			if($cont==3) { $p=$site->kw3_afi; $cont=0;	}
		}		
				
		$intercambio=mysql_query("SELECT * FROM intecambio where local_inter='$dominio' AND status_inter='activo'",$link);
		while($row2 = mysql_fetch_array($intercambio)) {
			$cont=$cont+1;
			$pr = get_page_rank($row2[remote_inter]);
			if ($pr<0){ $pr=0; }
			echo '<tr><td>  <img src="http://www.tppemarketing.com/opti_images/pr'.$pr.'.gif" title="Google PageRank: '.$pr.'/10" />  </td><td><b><a href="'.$row2[remote_inter].'" title="'.$p.'">'.$row2[titulo_inter].' </a></b> - '.$row2[remote_inter].' <br />'.$row2[descrip_inter].'</td></tr>';
			if($cont==1) { $p=$site->kw1_afi; }
			if($cont==2) { $p=$site->kw2_afi; }
			if($cont==3) { $p=$site->kw3_afi; $cont=0;	}
		}		
		

echo '</table>';
?></td>
    <td width="50%" valign="top" class="ingresa" id="stylized"><form action="interlink.php" method="post" name="intercambio" id="intercambio">
        <fieldset>
        <legend><b>INGRESA TU ENLACE</b></legend>		
        <p><b>1er PASO</b>: agrega un enlace de nuestra pagina en tu sitio. </p>
        <table border="0">
          <tr>
            <td valign="top">Direccion URL:</td>
            <td valign="top"><a href="<?php echo $site->enlace_afi; ?>" target="_blank"><?php echo $site->enlace_afi; ?></a></td>
          </tr>
          <tr>
            <td valign="top">Titulo del enlace :</td>
            <td valign="top"><?php echo $site->nombre_afi; ?></td>
          </tr>
          <tr>
            <td valign="top">Descripcion:</td>
            <td valign="top"><?php echo $site->descripcion_afi; ?></td>
          </tr>
        </table>
        <p><br />
          &oacute; puedes copiar el texto de abajo y pegarlo en tu sitio web. <br /><br />
          <textarea name="textarea" cols="30" rows="2" onfocus="this.select()">&lt;a href=&quot;<?php echo $site->enlace_afi; ?>&quot;&gt;<?php echo $site->nombre_afi; ?>&lt;/a&gt; - <?php echo $site->descripcion_afi; ?></textarea>
          <br />
          <br /> <br />
          </p>
        <b>2do PASO</b>: Ingresa los datos de tu enlace:
       
        <table border="0">
          <tr>
            <td><strong>Tu nombre :</strong>
            <input type="text" name="nombre" size="40" maxlength="50" id="nombre" /></td>
			<td><? echo $error[nombre];  ?></td>
          </tr>
          <tr>
            <td><b>tu E-mail:</b><input type="text" name="email" size="40" maxlength="50" id="email"/></td>
			<td><? echo $error[email];  ?></td>
          </tr>
          <tr>
            <td><b>Titulo de tu sitio :</b>
              <input type="text" name="titulo" size="40" maxlength="50" id="titulo" /></td><td><? echo $error[titulo];  ?></td>
          </tr>
          <tr>
            <td><b>URL de tu enlace:</b>
              <input type="text" name="enlace" maxlength="100" value="http://" size="40" id="direccion" /></td><td><? echo $error[enlace];  ?></td>
          </tr>
          <tr>
            <td><b>URL donde esta el enlace: </b>
              <input type="text" name="renlace" maxlength="100" value="http://" size="40" /></td><td><? echo $error[renlace];  ?></td>
          </tr>
		  <tr>
            <td><b>Descripcion del enlace: </b>
              <input name="descripcion" type="text"  maxlength="200" size="60" id="descripcion"/></td><td><? echo $error[descripcion];  ?></td>
          </tr>
        </table>
        <br />
        <center>
          Acepto <a href="http://www.tppemarketing.com/terminos.html">los terminos</a><br>
          <input name="terminos" type="checkbox" value="aceptado" id="aceptar"/> <? echo $error[terminos];  ?>
          <br />
          <br />
		  Codigo de Verificacion: <br />  <? $valoraleatorio=rand(100000,999999) ; $_SESSION['rand']=$valoraleatorio;  echo $valoraleatorio; ?><br />
		  <label for="valor">codigo:</label><br><input name="valor" type="text" maxlength="6" width="25" size="6"  id="codigo"/><? echo $error[rando]; 
		  for($i=0;$i<=count($error);$i++) {
		  $error[$i]=0; 
		  }
		  $ingreso=$vacio;
		  ?>
		  <br />
		  <br />
          <input type="submit" value="ingresar" id="aceptar" />
        </center>
        <br />
		
		

        </p>
        </fieldset>
    </form>    </td>
  </tr>
</table>
<?
mysql_free_result($afi);
mysql_free_result($intercambio);
mysql_free_result($buscar);
?>
</body>
</html>

ACA ESTA EL CODIGO QUE SOLICISTASTE. ESPERO QUE ALGUIEN TENGA ALGUNA IDEA.