• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Gesior Acc] Last joined, Free Houses and other!

eyy Rented House not work in my ots rented house is 20+ and in script write Rented Houses: 0 :( not work plz fix it
 
Change:
PHP:
$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=1;')->fetch();
to:
PHP:
$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`>1;')->fetch();
 
Sorry for double post, can't edit, it should be:
PHP:
$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`>0;')->fetch();
 
8dd

BROW i have same problem,i change what u talk but the problem persist,i'll be grated for u help

thank's

8D
Sorry for double post, can't edit, it should be:
PHP:
$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`>0;')->fetch();
 
Hi.
I give you new functions:
Open latestnews.php
After
PHP:
<?PHP
Add
PHP:
$main_content = "
<script type=\"text/javascript\"><!--
function show_hide(flip)
{
	var tmp = document.getElementById(flip);
	if(tmp)
		tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
}
--></script>";
Now find
PHP:
<td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>

</table></td></tr></table><br>';
And after that
PHP:
</table></td></tr></table><br>';
Add
PHP:
	///
	$lua = parse_ini_file($config['site']['server_path'].'/config.lua');
	$red = explode("*", $lua['redSkullLength']);
	$black = explode("*", $lua['blackSkullLength']);
	$ip = explode("*", $lua['ipBanishmentLength']);
	$ban = explode("*", $lua['banLength']);
	$kills = explode("*", $lua['killsBanLength']);
	$final = explode("*", $lua['finalBanLength']);
	///
	$main_content .= '<table BORDER=0 CELLPaDDING="4" CELLSPACING="1" width=100%;> 
		<TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD ALIGN=center CLASS=white><B>';
	$main_content .= "<a onclick=\"show_hide('statl'); return false;\" style=\"cursor: pointer;\">&raquo; View information about Frags && Skull System &laquo;</a></B></TD></TR></TABLE>";
	
	$main_content .= '<center><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% id="statl" style="display: none;" ><TR><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Frags && Skull System</B></TD></TR>
		<tr bgcolor="'.$config['site']['darkborder'].'"><td><li>Daily Frags To RedSkull: '.$lua['dailyFragsToRedSkull'].'</li></td>
			<td><li>RedSkull Length: '.$red[0].' days</li></td></tr>
		<tr bgcolor="'.$config['site']['lightborder'].'"><td><li>Weekly Frags To RedSkull: '.$lua['weeklyFragsToRedSkull'].'</li></td>
			<td><li>BlackSkull Length: '.$black[0].' days</li></td></tr>
		<tr bgcolor="'.$config['site']['darkborder'].'"><td><li>Monthly Frags To RedSkull: '.$lua['monthlyFragsToRedSkull'].'</li></td>
			<td><li>IP Banishment Length: '.$ip[0].' days</li></tr>
		<tr bgcolor="'.$config['site']['lightborder'].'"><td><li>Ban Length: '.$ban[0].' days</li></td>
			<td><li>Kills Ban Length: '.$kills[0].' days</li></tr>
		<tr bgcolor="'.$config['site']['darkborder'].'"><td><li>Final Ban Length: '.$final[0].' days</li></td>
			<td><li>Notations To Ban: '.$lua['notationsToBan'].'</li></tr>
		<tr bgcolor="'.$config['site']['lightborder'].'"><td><li>Warnings To Final Ban: '.$lua['warningsToFinalBan'].' days</li></td>
			<td><li>Warnings To Deletion: '.$lua['warningsToDeletion'].' days</li></tr>
		</table>
	</table>
	';
Last joined, Free Houses and other + View information about Frags && Skull System
PHP:
///Queries ///
$query = $SQL->query('SELECT `players`.`name`,`players`.`id`,`players`.`level`, `players`.`experience`, `server_motd`.`id`, `server_motd`.`text` FROM `players`,`server_motd` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" AND `players`.`name` NOT LIKE "%sample" ORDER BY `players`.`level` DESC, `players`.`experience` DESC, `server_motd`.`id` DESC LIMIT 1;')->fetch();
$query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();
$housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();
$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=1;')->fetch();
$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
$banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();
$guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();

///End Queries ///

	$main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 width=100%>
	<tr bgcolor='. $config['site']['vdarkborder'] .'><td align="center" class=white colspan=1><b>Welcome to '.$config['server']['serverName'].'</b></td></tr>
	<tr><td><table border=0 cellpadding=1 cellspacing=1 width=100%>

	<tr bgcolor='. $config['site']['lightborder'] .'><td><center>Last joined us: <a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a>, player number '.$query2['id'].'. Welcome and wish you a nice game!</center></td></tr>
	<tr bgcolor='. $config['site']['lightborder'] .'><td><center>Currently, the best player on the server is: <a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).'). Congratulations!</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Server motd:</b> '.$query['text'].'</center></td></tr> 
	<table border=0 cellpadding=0 cellspacing=1 width=100%>
  	<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Free Houses:</b> '.$housesfree[0].'</center></td>
	<td><center><b>Rented Houses:</b> '.$housesrented[0].'</center></td></tr>	  
	<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$accounts[0].'</center></td>
	<td><center><b>Players</b> in database: '.$players[0].'</center></td></tr>
	<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Banned</b> accounts: '.$banned[0].'</center></td>
	<td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>

</table></td></tr></table><br>';
	///
	$lua = parse_ini_file($config['site']['server_path'].'/config.lua');
	$red = explode("*", $lua['redSkullLength']);
	$black = explode("*", $lua['blackSkullLength']);
	$ip = explode("*", $lua['ipBanishmentLength']);
	$ban = explode("*", $lua['banLength']);
	$kills = explode("*", $lua['killsBanLength']);
	$final = explode("*", $lua['finalBanLength']);
	///
	$main_content .= '<table BORDER=0 CELLPaDDING="4" CELLSPACING="1" width=100%;> 
		<TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD ALIGN=center CLASS=white><B>';
	$main_content .= "<a onclick=\"show_hide('statl'); return false;\" style=\"cursor: pointer;\">&raquo; View information about Frags && Skull System &laquo;</a></B></TD></TR></TABLE>";
	
	$main_content .= '<center><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% id="statl" style="display: none;" ><TR><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Frags && Skull System</B></TD></TR>
		<tr bgcolor="'.$config['site']['darkborder'].'"><td><li>Daily Frags To RedSkull: '.$lua['dailyFragsToRedSkull'].'</li></td>
			<td><li>RedSkull Length: '.$red[0].' days</li></td></tr>
		<tr bgcolor="'.$config['site']['lightborder'].'"><td><li>Weekly Frags To RedSkull: '.$lua['weeklyFragsToRedSkull'].'</li></td>
			<td><li>BlackSkull Length: '.$black[0].' days</li></td></tr>
		<tr bgcolor="'.$config['site']['darkborder'].'"><td><li>Monthly Frags To RedSkull: '.$lua['monthlyFragsToRedSkull'].'</li></td>
			<td><li>IP Banishment Length: '.$ip[0].' days</li></tr>
		<tr bgcolor="'.$config['site']['lightborder'].'"><td><li>Ban Length: '.$ban[0].' days</li></td>
			<td><li>Kills Ban Length: '.$kills[0].' days</li></tr>
		<tr bgcolor="'.$config['site']['darkborder'].'"><td><li>Final Ban Length: '.$final[0].' days</li></td>
			<td><li>Notations To Ban: '.$lua['notationsToBan'].'</li></tr>
		<tr bgcolor="'.$config['site']['lightborder'].'"><td><li>Warnings To Final Ban: '.$lua['warningsToFinalBan'].' days</li></td>
			<td><li>Warnings To Deletion: '.$lua['warningsToDeletion'].' days</li></tr>
		</table>
	</table>
	';

///Don't delete this! Please respect my work! I am counting on reputation.
$main_content .= '<div align="right"><small><b>Author of script: <a href="http://otland.net/members/aleh/">Aleh</a></b></small></div><br />';
///Don't delete this! Please respect my work! I am counting on reputation.

Screen:
89895710.png


If you have any suggestions as to the script - WRITE!

Thanks, REP ++!
 
Back
Top