Jump to content
  • 0

CeresCP whoisonline.php - how to hide map?


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

here who is online on my server

sg5no5r0n8.png

how i can change make only display Name Class And Blvl/Jlvl

i want hide the map

and here the php for who is online

<?php
/*
Ceres Control Panel
This is a control pannel program for Athena and Freya
Copyright © 2005 by Beowulf and Nightroad
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
To contact any of the authors about special permissions send
an e-mail to [email protected]
*/
session_start();
include_once './config.php'; // loads config variables
include_once './query.php'; // imports queries
include_once './functions.php';
$jobs = $_SESSION[$CONFIG_name.'jobs'];
if (is_woe())
redir("motd.php", "main_div", $lang['WOE_TIME']);
$query = sprintf(WHOISONLINE);
$result = execute_query($query, "whoisonline.php");
opentable($lang['WHOISONLINE_WHOISONLINE']);
echo "
<table width="500">
<tr>
<td align="left" class="head">".$lang['NAME']."</td>
<td align="left" class="head">".$lang['CLASS']."</td>
<td align="center" class="head">".$lang['BLVLJLVL']."</td>
";
if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
echo "
</tr>
";
if ($result) {
while ($line = $result->fetch_row()) {
 $charname = htmlformat($line[0]);
 if ($line[9] >= $CONFIG_gm_hide) {
  if (!isset($_SESSION[$CONFIG_name.'level']) || (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] < $line[9]))
continue;
 }
  echo "  
<tr>
 <td align="left">$charname</td>
 <td align="left">
";
if (isset($jobs[$line[1]]))
 echo $jobs[$line[1]];
else
 echo $lang['UNKNOWN'];
echo "
 </td>
 <td align="center">$line[2]/$line[3]</td>
 ";
if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
 echo "<td align="center">$line[4],$line[5]</td>";
echo "
 <td align="left">$line[6]</td>
</tr>
  ";
}
}
echo "</table>";
closetable();
fim();
?>

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

Try this


<?php
/*
Ceres Control Panel
This is a control pannel program for Athena and Freya
Copyright © 2005 by Beowulf and Nightroad
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
To contact any of the authors about special permissions send
an e-mail to [email protected]
*/
session_start();
include_once './config.php'; // loads config variables
include_once './query.php'; // imports queries
include_once './functions.php';
$jobs = $_SESSION[$CONFIG_name.'jobs'];
if (is_woe())
redir("motd.php", "main_div", $lang['WOE_TIME']);
$query = sprintf(WHOISONLINE);
$result = execute_query($query, "whoisonline.php");
opentable($lang['WHOISONLINE_WHOISONLINE']);
echo "
<table width="500">
<tr>
<td align="left" class="head">".$lang['NAME']."</td>
<td align="left" class="head">".$lang['CLASS']."</td>
<td align="center" class="head">".$lang['BLVLJLVL']."</td>
";
if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
echo "
</tr>
";
if ($result) {
while ($line = $result->fetch_row()) {
 $charname = htmlformat($line[0]);
 if ($line[9] >= $CONFIG_gm_hide) {
  if (!isset($_SESSION[$CONFIG_name.'level']) || (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] < $line[9]))
continue;
 }
  echo "  
<tr>
<td align="left">$charname</td>
<td align="left">
";
if (isset($jobs[$line[1]]))
echo $jobs[$line[1]];
else
echo $lang['UNKNOWN'];
echo "
</td>
<td align="center">$line[2]/$line[3]</td>
";
if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
echo "<td align="center">$line[4],$line[5]</td>";
echo "
</tr>
  ";
}
}
echo "</table>";
closetable();
fim();
?>

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

thx jaypee

but got some error

25xos1njew.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

try logout it seems its a header error

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

me not login on the website

can u make not show position also?

Edited by PapaZola
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

me not login on the website

can u make not show position also?

the session_start(); in whosonline.php causes the error but i dont know if you need to delete that. My guess is that session_start is already declared in another page and its being redeclared in whosonline.php

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Here is the edited whoisonline.php that does not show Map:

whoisonline.php

These are the changes I made:

--- D:/svn/cerescp/trunk/whoisonline.php	Tue Mar 10 18:24:33 2009
+++ D:/svn/cerescp/trunk/whoisonline.php	Sun Jan  8 06:46:56 2012
@@ -44,10 +44,12 @@
	<td align="left" class="head">".$lang['CLASS']."</td>
	<td align="center" class="head">".$lang['BLVLJLVL']."</td>
	";
-	if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
-	echo "<td align="center" class="head">".$lang['WHOISONLINE_COORDS']."</td>";
+	if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin']) {
+		echo "<td align="center" class="head">".$lang['WHOISONLINE_COORDS']."</td>";
+		echo "
+		<td align="left" class="head">".$lang['MAP']."</td>";
+	}
	echo "
-	<td align="left" class="head">".$lang['MAP']."</td>
</tr>
";
if ($result) {
@@ -70,12 +72,13 @@
					</td>
					<td align="center">$line[2]/$line[3]</td>
					";
-				if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
+				if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin']) {
					echo "<td align="center">$line[4],$line[5]</td>";
-				echo "
+					echo "
					<td align="left">$line[6]</td>
				</tr>
			";
+				}
	}
}
echo "</table>";

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

thx a lot

its work

Thx Brian & Jaypee

  • Upvote 1
Link to comment
Share on other sites

×
×
  • Create New...