upload the new locale file.
And use this special_ranks.php
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Name: Special Ranks
| Filename: special_ranks.php
| Author: Fangree Productions
| Developers: Fangree_Craig
| Site: www.fangree.co.uk
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."user_fields/user_srank.php";
if (!defined("IN_FUSION"
) { die("Access Denied"
; }
$result = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_srank'"
;
if (dbrows($result) > 0) {
if (isset($_GET['rowstart']) && isnum($_GET['rowstart'])) {
$rowstart = $_GET['rowstart'];
} else {
$rowstart = 0;
}
$users_per_page = "10";
$user_count = (dbcount("(user_id)", DB_USERS, "user_status = '0' && user_srank !=''"
);
opentable($locale['spr001']);
echo $locale['spr002'];
closetable();
opentable($locale['spr006']);
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_srank !='' AND user_status = '0' ORDER BY user_level DESC, user_name LIMIT $rowstart,$users_per_page"
;
if (dbrows($result)) {
$i = 0;
echo "<table cellpadding='5' cellspacing='1' align='center'width='80%' class='tbl-border'>\n";
echo " <tr>\n";
echo " <td style='width: 60px;' class='tbl1'><b>".$locale['spr011']."</b></td>\n";
echo " <td class='tbl1'><b>".$locale['spr012']."</b></td>\n";
echo " <td class='tbl1'><b>".$locale['uf_srank']."</b></td>\n";
$result2 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_web'"
;
if (dbrows($result2) > 0) {
echo " <td class='tbl1'><b>".$locale['spr003']."</b></td>\n";
}
$result3 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_country'"
;
if (dbrows($result3) > 0) {
echo " <td class='tbl1'><b>".$locale['spr004']."</b></td>\n";
}
$result3 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_location'"
;
if (dbrows($result3) > 0) {
echo " <td class='tbl1'><b>".$locale['spr004b']."</b></td>\n";
}
echo " </tr>\n";
while($data = dbarray($result)){
//Get Table row colours
$row_color = ($i % 2 == 0 ? "tbl1" : "tbl2"
;
echo " <tr>\n";
echo " <td style='text-align:center;' class='".$row_color."'>\n";
if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
echo " <img src='".IMAGES."avatars/".$data['user_avatar']."' style='vertical-align: middle; opacity:0.6;filter:alpha(opacity=60)' onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100' onmouseout='this.style.opacity=0.6;this.filters.alpha.opacity=60' border='0' width='50' height='50' title='".$locale['spr011']."' alt='".$locale['spr011']."' />\n";
}else{
echo " <img src='".IMAGES."avatars/noav.gif' title='".$locale['spr010']."' alt='".$locale['spr010']."' style='float: middle; opacity:0.6;filter:alpha(opacity=60)' onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100' onmouseout='this.style.opacity=0.6;this.filters.alpha.opacity=60' border='0' width='50' height='50' />\n";
}
echo " </td>\n";
/*Uncomment for V7.01.0x Compatibility
echo " <td style='width: 150px;' class='".$row_color."'>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>\n";
echo " <td class='".$row_color."'><span style='color:#339900;'>".$data['user_srank']."</span></td>\n"; */
//////
echo " <td style='width: 150px;' class='".$row_color."'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' title='".$data['user_name']."'>".trimlink($data['user_name'],12)."</a>";
echo " <td class='".$row_color."'><img src='".$data['user_srank']." width='100px' height='100px' alt='' ></td>\n";
$result2 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_web'"
;
if (dbrows($result2) > 0) {
echo " <td style='text-align:center; width: 60px;' class='".$row_color."'>";
// User Web User Field
if (array_key_exists("user_web", $data) && $data['user_web']) {
if (!strstr($data['user_web'], "http://"
) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo " <a title='".$urlprefix."".$data['user_web']."' href='".$urlprefix."".$data['user_web']."' target='_blank'>".$locale['spr005']."</a>\n";
}else{
echo $locale['spr014'];
}
echo " </td>\n";
}
//User Country User Field
$result3 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_country'"
;
if (dbrows($result3) > 0) {
if (isset($data['user_country'])) {
echo "<td style='text-align:center; width: 60px;' class='".$row_color."'>\n";
$c = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."nations WHERE nat_id='".$data['user_country']."'"
);
echo "<img style='vertical-align:middle;border:none' src='".BASEDIR."".($data['user_country'] != 0 ? $c['nat_pic'] : "".IMAGES."/flags/f-00.gif"
."' alt='".$c['nat_name']."' title='".$c['nat_name']."' />\n";
echo"</td>\n";
}
}
//User Location User Field
$result4 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_location'"
;
if (dbrows($result4) > 0) {
if ($data['user_location'] !=""
{
echo " <td style='text-align:center; width: 60px;' class='".$row_color."'>\n";
echo " ".$data['user_location']."\n";
echo " </td>\n";
}else{
echo " <td style='text-align:center; width: 60px;' class='".$row_color."'>\n";
echo " ".$locale['spr014']."\n";
echo " </td>\n";
}
}
echo " </tr>\n";
$i++;
}
echo "</table>\n";
if ($user_count > $users_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($rowstart,$users_per_page,$user_count,3,FUSION_SELF."?"
."\n</div>\n";
}else{
echo $locale['spr008'];
}
closetable();
} else {
opentable($locale['spr009']);
if (iADMIN && checkrights("C"
){
echo "<div class='admin-message' style='text-align:center;'>".$locale['spr007']." <a href='".BASEDIR."administration/user_fields.php".$aidlink."'>".$locale['spr007b']."</div>";
}else{
echo $locale['spr015'];
}
closetable();
}
require_once THEMES."templates/footer.php";
?>[/syntaxhighlighter]