![]() |
|
Castle Owner Script [PHP] - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193) +---- Forum: Tutorials & Guides (https://lckb.dev/forum/forumdisplay.php?fid=124) +----- Forum: Ep1 Guides (https://lckb.dev/forum/forumdisplay.php?fid=178) +----- Thread: Castle Owner Script [PHP] (/showthread.php?tid=399) |
- reneh - 11-20-2011 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! - smogg - 01-11-2013 Script only copy from the first MaX Website |