11-20-2011, 02:28 AM
Hey Guys this is a Simple PHP Script for your Homepage to see the Castle-Owners. It shows Zone-Name (Merak and Dratan) , Owner-Guildname and the Owner-Charname (Guildleader)
This is the Code:
<?php
//currently an example, change to your desired infomation
$dbuser = "root";
$dbpass = "root";
$dbhost = "localhost";
$dbname = "newproject_db";
//connect to database
$msconn = mysql_connect($dbhost, $dbuser, $dbpass);
$db = mysql_select_db($dbname, $msconn);
mysql_query("set names UTF8");
$q = mysql_query("SELECT a_owner_guild_name, a_owner_char_name, a_zone_index FROM t_castle");
echo "</pre>
<table width="250" border="0" cellpadding="2" cellspacing="2">Zone GuildnameOwner</table>
<font color="#FFFF00">Dratan</font>";} <br> elseif ($row["a_zone_index"] == 7 && $row["a_zone_index"] == 7 ) {$class = "<font color="#FF0000">Merak</font>";} <br><br><br><br> echo "";<br> echo "<font size="3">".$class."</font>";<br> echo "<font size="3">".$row["a_owner_guild_name"]."</font>";<br> echo "<font size="3">".$row["a_owner_char_name"]."</font>";<br><br> }<br> echo "<br>";<br
You only need to edit the MySQL Data. Standart is
User: root
Passwort: root
IP: localhost or 127.0.0.1
Warning: Only works for EP1 Files!
