PHP - Delete GM's in the rankings!

Status
Not open for further replies.
Junior Spellweaver
Joined
Feb 3, 2007
Messages
167
Reaction score
0
Hi!
I need to delete the GM's in the ranking. Cause it's annyoing to just have GM's in Top5 ranking and all that.
Please send me a php code to delete it!

I'm Using RoseOnlineCMS Lite (the first version)
 
ok, but I just wanted the code, not 3.4...
Do you know that yor CMS doesn't work with Internet Explorer, people can't login with IE...
 
what? delete? or you mean exclude..?

here:
PHP:
"SELECT * FROM `characters` left Join `accounts` ON `characters`.`account_name` = `accounts`.`username` WHERE 		`accounts`.`accesslevel` <> '300'  ORDER BY
		`characters`.`level`"

-elem: you might need that. :D
 
Like this:

Code:
<?php
echo "<p class='b01'>";
?>
<div align="center" class="b01"><?php echo $config['site']['title']; ?> Top 50 Characters <br />
  <br />
  <?php
$c = mysql_connect($config['db']['host'], $config['db']['user'],$config['db']['pass']);
mysql_select_db($config['db']['name'], $c);


$result = mysql_query("SELECT * FROM `characters` left Join `accounts` ON `characters`.`account_name` = `accounts`.`username` WHERE `accounts`.`accesslevel` <> '300'  ORDER BY `characters`.`level`") 
or die(mysql_error());  


echo "<table border='0' class='b01'>";
echo "<tr> <th>Level      </th> <th>Character  Name       </th> <th>Zuly        </th> <th>Job Class      </th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {

	// Print out the contents of each row into a table
	echo "<tr><td bgcolor=''>"; 
	echo $row['level'];
	echo "</td><td bgcolor=''>"; 
	echo $row['char_name'];
	echo "</td><td bgcolor=''>"; 
	echo $row['zuly'];
	echo "</td><td bgcolor=''>";
	include ('class.php');
	echo "</td></tr>"; 
} 

echo "</table>";
?>
  <?php
echo "</p>";
?>
</div>

Enjoy!
 
I have this where to add that piece?

<?php
echo "<p class='b01'>";
?>
<div align="center" class="b01"><?php echo $cms['site']['title']; ?> Rankings<br />
<br />
<strong>[ <a href="?op=rankings&rank=10">Top 10</a> ] [ <a href="?op=rankings&rank=50">Top 50</a> ] [ <a href="?op=rankings&rank=100">Top 100</a> ] [ <a href="?op=rankings&rank=200">Top 200</a> ]</strong><br />
<br />
<br />
<?php

$c = mysql_connect($cms['db']['host'], $cms['db']['user'],$cms['db']['pass']);
mysql_select_db($cms['db']['name'], $c);

if($_GET['rank'] == '') {
$rank = '10';
}
if($_GET['rank'] == '50') {
$rank = '50';
}
if($_GET['rank'] == '100') {
$rank = '100';
}
if($_GET['rank'] == '200') {
$rank = '200';
}
if($_GET['rank'] == '10') {
$rank = '10';
}

$result = mysql_query("SELECT level, char_name, zuly, classid FROM characters ORDER BY level DESC LIMIT 50")
or die(mysql_error());



echo "<table border='0' class='b01'>";
echo "<tr> <th>Level         </th> <th>Character Name         </th> <th>Zuly           </th> <th>Job Class         </th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {

// Print out the contents of each row into a table
echo "<tr><td bgcolor=''>";
echo $row['level'];
echo "</td><td bgcolor=''>";
echo $row['char_name'];
echo "</td><td bgcolor=''>";
echo $row['zuly'];
echo "</td><td bgcolor=''>";
include ('class.php');
echo "</td></tr>";
}

echo "</table>";
?>
<?php
echo "</p>";
?>
</div>
 
$blah = mysql_query("SELECT * FROM `characters` left Join `accounts` ON `characters`.`account_name` = `accounts`.`username` WHERE `accounts`.`accesslevel` <> '300' ORDER BY
`characters`.`level`")

got it?
 
Here's mine. Replace your rankings.php with this one.

Code:
<?php
echo "<p class='b01'>";
?>
<div align="center" class="b01"><?php echo $config['site']['title']; ?> Top 50 Characters <br />
  <br />
  <?php
$c = mysql_connect($config['db']['host'], $config['db']['user'],$config['db']['pass']);
mysql_select_db($config['db']['name'], $c);


$result = mysql_query("SELECT * FROM `characters` left Join `accounts` ON `characters`.`account_name` = `accounts`.`username` WHERE `accounts`.`accesslevel` <> '300'  ORDER BY `characters`.`level`") 
or die(mysql_error());  


echo "<table border='0' class='b01'>";
echo "<tr> <th>Level      </th> <th>Character  Name       </th> <th>Zuly        </th> <th>Job Class      </th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {

	// Print out the contents of each row into a table
	echo "<tr><td bgcolor=''>"; 
	echo $row['level'];
	echo "</td><td bgcolor=''>"; 
	echo $row['char_name'];
	echo "</td><td bgcolor=''>"; 
	echo $row['zuly'];
	echo "</td><td bgcolor=''>";
	include ('class.php');
	echo "</td></tr>"; 
} 

echo "</table>";
?>
  <?php
echo "</p>";
?>
</div>

Use this only if your using RoseOnlineCMS
 
Status
Not open for further replies.
Back