DarkKnightCZ Posted August 16, 2010 Posted August 16, 2010 this script shows all clanhalls (Name,Location,Lease,Paid until), if clanhall is free, in column paid until will shows "Free" Screen Script <?php $username = "root"; //your mysql username $password = "root"; //your mysql password $host = "localhost"; //your mysql host $database = "l2jdb"; //your mysql/lineage database mysql_connect($host,$username,$password) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); $query = mysql_query("SELECT name,location,lease,paidUntil FROM clanhall ORDER BY location ASC"); print "<table>"; print "<tr bgcolor='#707070' style='color:#ffffff;'><th>Name</th><th>Location</th><th>Lease</th><th>Paid until</th></tr>"; $i=1; while($row=mysql_fetch_array($query)){ if($i%2==0){ $bgcolor='#e3e3e3'; }else{ $bgcolor='#a6a6a6'; } if($row[paidUntil]==0){ $paiduntil="Free"; }else{$paiduntil=$row[paidUntil];} print "<tr bgcolor='" . $bgcolor . "'><td>" . $row[name] . "</td><td>" . $row[location] . "</td><td>" . $row[lease] . "</td><td>" . $paiduntil . "</td></tr>"; $i++; } print "</table>"; ?> Credits: Me (DarkKnight / DarkKnightCZ) but cant guarantee paid until (dont have syntax of that table), if someone sends me syntax of paidUntil (in clanhalls table in database), i will update it and if you wanna script for showing free clanhalls only or if you wanna add some collumn (like owner), just tell :)
rafole Posted August 16, 2010 Posted August 16, 2010 Cool script dude!! :) With this u can easily find unused ch [i think] ;)
Onix Posted August 16, 2010 Posted August 16, 2010 really great share, simple and good script ! thanks for share ! ;)
DarkKnightCZ Posted August 20, 2010 Author Posted August 20, 2010 remixed: eh? in english please :) (that sentence doesnt make sense :) )
HouLiGaN Posted August 20, 2010 Posted August 20, 2010 Very Nice man thanks .... keep it up... so i can understand is this like a npc? a command? only for admins?
crazynoodle Posted August 20, 2010 Posted August 20, 2010 Very Nice man thanks .... keep it up... so i can understand is this like a npc? a command? only for admins? Its for Site side... its shows (Name,Location,Lease,Paid until), if clanhall is free, in column paid until will shows "Free" ........Btw .my question is... can i use this one ... for ucoz template... ?
DarkKnightCZ Posted August 21, 2010 Author Posted August 21, 2010 HouLiGaN : no, it is for website :) crazynoodle: i think it would work, but i dont know, how ucoz works, so if you send me it, i can modify it and post here guide :) //edit Leki: but if you have apache server with mod_php, it will work :)
ServeSATAN Posted August 21, 2010 Posted August 21, 2010 you can't use in ucoz because have not php supporting
Fran-FX! Posted August 23, 2010 Posted August 23, 2010 you can put more grapichs to the table, it will was great but good job men :) i like it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now