Jump to content

Recommended Posts

Posted

this script shows all clanhalls (Name,Location,Lease,Paid until), if clanhall is free, in column paid until will shows "Free"

 

Screen

1009287_clanhalls.png

 

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 :)

Posted

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... ?

Posted

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 :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock