Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/08/2010, 12:11
Avatar de luzzifer
luzzifer
 
Fecha de Ingreso: julio-2009
Ubicación: Paraná - Argentina
Mensajes: 169
Antigüedad: 14 años, 9 meses
Puntos: 3
Pregunta Ayuda con este codigo

Necesito que este codigo no se conecte al Connection.php sino que tenga los datos necesarios para no dirigirse a connection.php. y que se escriban los datos del host donde debe en este codigo Alguna ayuda?

Código HTML:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="Windows-1251">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>PvP Stats</title>
</head>
<body bgcolor="#000000" style="color:#999999; font-size:11px; font-family:verdana;">
<?php
include("Connection.php");
//Do not remove this header
//This script package is distributed by kadar of L2j.sourceforge
//You are free to distribute this package as long as the headers stay intact.

$FORM2 = "<table width=400 style=\"font-size:11px; font-family:verdana; color:#999999;\" cellspacing=\"0\" cellpadding=\"0\" align=center>
<tr>
<td width=100% height=34 colspan=3 align=center class=\"content\" style=\"font-size:12px; font-family:verdana; color:#999999;\"><b>PvP Stats - Top 50<br><br></b>
</td>
</tr>
<tr>
<td style=\"font-size:12px; border:1px #999999 solid;\"><center><b>Position</b></center></td>
<td style=\"font-size:12px; border:1px #999999 solid;\"><center><b>Name</b></center></td>
<td style=\"font-size:12px; border:1px #999999 solid;\"><center><b>Kills</b></center></td>
</tr>";

$activity = mysql_query("SELECT characters.pvpkills,characters.char_name FROM characters Where ((characters.pvpkills >=1) AND (characters.accesslevel = 0)) ORDER BY characters.pvpkills DESC limit 50");
$i = 1;
while($row = mysql_fetch_array($activity))

{
   $FORM2 .= '<tr>
    <td style=\"font-size:10px; font-family:verdana; color:#999999;\" class=content align=center>'.$i.'</td>
   <td style=\"font-size:10px; font-family:verdana; color:#999999;\" class=content align=center>'.$row['char_name'].'</td>
    <td style=\"font-size:10px; font-family:verdana; color:#999999;\" class=content align=center>'.$row['pvpkills'].'</td>
  </tr>';
 
    $i++;
}
 
echo $FORM2;

?>
</body>
</html> 
el connection.php es el siquiente

Código:
<?php

//Do not remove this header
//This script package is distributed by kadar of .sourceforge
//You are free to distribute this package as long as the headers stay intact.
//
//This file must stay in the parent directory of the script folder
//and must be filled out correctly for the scripts to work.
//
//It is suggested to make a new user and pass for the scripts
//and set the permissions to select only.

$db_user = ""; //your sql username goes here
$db_pass = ""; //your sql password goes here
$db_name = "";    //your database name goes here
$db_serv = "localhost"; //the address of the database goes here
$db_port = ""; //the address of the database goes here
$res = mysql_connect ( $db_serv, $db_user, $db_pass, $db_port ) or die ("Coudn't connect to [$db_serv]");
mysql_select_db ( $db_name );

?>