Pero luego me salta este error todo el rato:
Código:
Creo que hay bastantes varibles malParse error: syntax error, unexpected '}' in /var/www/info/onlineplayers.php on line 6
onlineplayers.php
Código:
<?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. ?>
<?php }elseif($_GET['server']){ ?>
<table width="579" border="0" bgcolor="#2E6177" align="center" style="margin-bottom:15px;">
<tr bgcolor="#084360"><td colspan="6" align="center"><font color="#7C94B0"><b><?php echo $server_info['name']; ?></b></font></td></tr>
<tr bgcolor="#084360"><td width="23" align="center"><font color="#7C94B0"><b>#</b></font></td>
<td width="122" align="center"><font color="#7C94B0"><b>Name</b></font></td>
<td width="89" align="center"><font color="#7C94B0"><b>Race</b></font></td>
<td width="134" align="center"><font color="#7C94B0"><b>Class</b></font></td><td width="22" align="center"><font color="#7C94B0"><b>Lvl</b></font></td>
<td width="163" align="center"><font color="#7C94B0"><b>Location </b></font></td>
</tr>
<?php foreach($res_info as $res){ ?>
<tr bgcolor="#00192C"><td align="center"><?php echo $res['number']; ?></td>
<td><?php echo $res['name']; ?></td><td><?php echo $res["race"]; ?></td><td><?php echo $res["class"]; ?></td><td align="center"><?php echo $res['level']; ?></td>
<td><?php echo $res['pos']; ?></td></tr>
<?php }
if(empty($res['number'])) echo '<tr bgcolor="#00192C"><td colspan="6" align="center"><b>Not there is Online Players</b></td></tr>';
?>
</table>
<?php } ?>
</td>
</tr>
</table>
Connection.php (archivo datos DB)
Código:
<?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.
//
//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 = "root"; //your sql username goes here
$db_pass = "pass"; //your sql password goes here
$db_name = "l2jdb"; //your database name goes here
$db_serv = "localhost"; //the address of the database goes here
$db_port = "puerto"; //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 );
?>

