Foros del Web » Creando para Internet » HTML »

Ayuda con este codigo

Estas en el tema de Ayuda con este codigo en el foro de HTML en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 27/08/2010, 12:11
Avatar de 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 );

?>
  #2 (permalink)  
Antiguo 27/08/2010, 12:36
Avatar de tupanka  
Fecha de Ingreso: marzo-2008
Mensajes: 62
Antigüedad: 16 años
Puntos: 1
Sonrisa Respuesta: Ayuda con este codigo

Es muy vaga tu pregunta, por que quieres hacer eso? cual es tu objetivo? da mas detalles
  #3 (permalink)  
Antiguo 27/08/2010, 12:51
Avatar de luzzifer  
Fecha de Ingreso: julio-2009
Ubicación: Paraná - Argentina
Mensajes: 169
Antigüedad: 14 años, 9 meses
Puntos: 3
Respuesta: Ayuda con este codigo

Hola tupanka gracias por contestar, Te esplico por que la ejecucion de ese codigo lo hara un juego on.line, ademas el juego tambien es ejecutado via internet y cuando yo dejo estos codigos instalados, via web funcionan pero via game no.
En el game lo que sudede es que carga el primer codigo pero al hacer click en PK o PVP no carga el siguiente dato ya que no se conecta a connection.php
Si sabes algo de esto ayudame.
O bien armemos un codigo html que se conecte directamente a las fuentes de esas 2 tablas pvp y pk
  #4 (permalink)  
Antiguo 27/08/2010, 13:05
Avatar de tupanka  
Fecha de Ingreso: marzo-2008
Mensajes: 62
Antigüedad: 16 años
Puntos: 1
Respuesta: Ayuda con este codigo

Sigues aportando pocos detalles. es dificil entender esto:
Cita:
En el game lo que sudede es que carga el primer codigo pero al hacer click en PK o PVP no carga el siguiente dato ya que no se conecta a connection.php


Se de php y Mysql, pero explicate mejor. Cual es tu area? como desarrollador de juegos?
  #5 (permalink)  
Antiguo 27/08/2010, 13:06
Avatar de luzzifer  
Fecha de Ingreso: julio-2009
Ubicación: Paraná - Argentina
Mensajes: 169
Antigüedad: 14 años, 9 meses
Puntos: 3
Respuesta: Ayuda con este codigo

Si soy desarrollador de juegos, este es uno y es de Lineage, pero tambien estoy en otros game de opensource de linux con gnu, pero no tienen tanta trama como este.

Este codigo si es el que anda en el game, pero necesito que se dirija a 2 tablas en mi base de datos que yo entro via navicat. Una de pvp y la otra de pk, tienes alguna idea de como hacer que se dirijan a las tablas que deseo?
Código:
<html>
<body>
<center>
<font color="66cc00">Rankin .::L2odix::.</font><br>
<center><img src="L2UI.SquareWhite" width=260 height=1></center><br>
<center><table width=150>
<tr>
	<td><center>
		<button value="TOP PK" action="bypass -h Quest 50300_PKlist 1" width=75 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
	</center></td>
</tr>
<tr>
	<td><center>
		<button value="TOP PvP" action="bypass -h Quest 50300_PKlist 2" width=75 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
	</center></td>
</tr>
</center></table>
<br>
<center><img src="L2UI.SquareWhite" width=260 height=1></center>
<center>
<img src=Sek.start_logo width=256 height=256 align=right>
</center>
</body>
</html>
Cualquier cosa la hablamos por msn si queres y podes.

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:36.