Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Yuna Scatari Edition (YSE) (http://www.bvlist.com/forumdisplay.php?f=22)
-   -   New Staff Page (http://www.bvlist.com/showthread.php?t=5019)

blargh 30th May 2010 00:37

New Staff Page
 
I cleaned up the staff page and aligned the buttons. i also edited the lag file for some grammar mistakes. Enjoy :)

staff.php
PHP Code:

<?

// +-------------BEGIN Language Hack By ANDiTKO ------------------------------+

require "include/bittorrent.php";
global 
$defaultlanguage$tracker_lang$rootpath;
    if (
file_exists($rootpath 'languages/' $lang '/lang_staff.php'))
        require_once(
$rootpath 'languages/' $lang '/lang_staff.php');
    else
        require_once(
$rootpath 'languages/' $defaultlanguage '/lang_staff.php');
// +-------------END Language Hack By ANDiTKO --------------------------------+
// Connect to DB & check login
dbconn();
loggedinorreturn();
stdhead($staff_lang['stdhead']);
begin_main_frame();
begin_frame("");
?>


<?
$act 
$_GET["act"];
if (!
$act) {
// Get current datetime
$dt TIMENOW 300;
// Search User Database for Moderators and above and display in alphabetical order
$res sql_query("SELECT * FROM users WHERE class>=".UC_UPLOADER." AND status = 1 ORDER BY username" ) or sqlerr(__FILE____LINE__);

while (
$arr mysql_fetch_assoc($res))
{

$staff_table[$arr['class']]=$staff_table[$arr['class']].
"<td class=embedded><a class=altlink href=userdetails.php?id=".$arr['id']."><b>".
get_user_class_color($arr['class'],$arr['username'])."</b></a></td><td class=embedded> ".($arr['last_access']>$dt?"<img src=".$pic_base_url."button_online.gif border=0 alt=\"online\">":"<img src=".$pic_base_url."button_offline.gif border=0 alt=\"offline\">" )."</td>".
"<td class=embedded><a href=message.php?action=sendmessage&receiver=".$arr['id'].">".
"<img src=".$pic_base_url."button_pm.gif border=0></a></td>".
" ";



// Show 3 staff per row, separated by an empty column
++ $col[$arr['class']];
if (
$col[$arr['class']]<=2)
$staff_table[$arr['class']]=$staff_table[$arr['class']]."<td class=embedded>&nbsp;</td>";
else
{
$staff_table[$arr['class']]=$staff_table[$arr['class']]."</tr><tr height=15>";
$col[$arr['class']]=0;
}
}
begin_frame($staff_lang['administration']);
?>

<table width=100% cellspacing=0>
<tr>
<tr><td class=embedded colspan=11><?=$staff_lang['answerinfaq'];?></td></tr>
<!-- Define table column widths -->
<td class=embedded width="125">&nbsp;</td>
<td class=embedded width="25">&nbsp;</td>
<td class=embedded width="35">&nbsp;</td>
<td class=embedded width="85">&nbsp;</td>
<td class=embedded width="125">&nbsp;</td>
<td class=embedded width="25">&nbsp;</td>
<td class=embedded width="35">&nbsp;</td>
<td class=embedded width="85">&nbsp;</td>
<td class=embedded width="125">&nbsp;</td>
<td class=embedded width="25">&nbsp;</td>
<td class=embedded width="35">&nbsp;</td>
</tr>
<tr><td class=embedded colspan=11><b><?=$staff_lang['directorateofthetracker']?></b></td></tr>
<tr><td class=embedded colspan=11><hr color="#4040c0" size=1></td></tr>
<tr height=15>
<?=$staff_table[UC_SYSOP]?>
</tr>
<tr><td class=embedded colspan=11>&nbsp;</td></tr>
<tr><td class=embedded colspan=11><b><?=$staff_lang['administrators']?></b></td></tr>
<tr><td class=embedded colspan=11><hr color="#4040c0" size=1></td></tr>
<tr height=15>
<?=$staff_table[UC_ADMINISTRATOR]?>
</tr>
<tr><td class=embedded colspan=11>&nbsp;</td></tr>
<tr><td class=embedded colspan=11><b><?=$staff_lang['moderators']?></b></td></tr>
<tr><td class=embedded colspan=11><hr color="#4040c0" size=1></td></tr>
<tr height=15>
<?=$staff_table[UC_MODERATOR]?>
</tr>
<tr><td class=embedded colspan=11>&nbsp;</td></tr>
<tr><td class=embedded colspan=11><b><?=$staff_lang['uploaders']?></b></td></tr>
<tr><td class=embedded colspan=11><hr color="#4040c0" size=1></td></tr>
<tr height=15>
<?=$staff_table[UC_UPLOADER]?>
</tr>
</table>
<?
end_frame
();
}
?>

<? if (get_user_class() >= UC_SYSOP) { ?>
<? begin_frame
("<font color=#FF0000> ".$staff_lang['viewablebysysop']. "</font>"); ?>
<table width=100% cellspacing=10 align=center>
<tr align=center>
<td class=embedded><form method=get action=category.php><input type=submit value="<?=$staff_lang['category']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=bans.php><input type=submit value="<?=$staff_lang['bans']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=status.php><input type=submit value="<?=$staff_lang['status']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=log.php><input type=submit value="<?=$staff_lang['sitelogshort']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=adduser.php><input type=submit value="<?=$staff_lang['adduser'?>" style='height: 20px; width: 100px'></form></td>
</tr>
</table>
<? end_frame();
}

if (
get_user_class() >= UC_ADMINISTRATOR) { ?>
<? begin_frame
("<font color=#009900> ".$staff_lang['viewablebyadmin']. "</font>"); ?>
<table width=100% cellspacing=10 align=center>
<tr align=center>
<td class=embedded><form method=get action=staffmess.php><input type=submit value="<?=$staff_lang['masspm']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=editforums.php><input type=submit value="<?=$staff_lang['editforums']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=delacctadmin.php><input type=submit value="<?=$staff_lang['delacc']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=topten.php><input type=submit value="<?=$staff_lang['topten']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=findnotconnectable.php><input type=submit value="<?=$staff_lang['notconnectable']?>" style='height: 20px; width: 100px'></form></td>
</tr>
<tr align=center>
<td class=embedded><form method=get action=makepoll.php><input type=submit value="<?=$staff_lang['makepoll'?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=recover.php><input type=submit value="<?=$staff_lang['recover'?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=uploaders.php><input type=submit value="<?=$staff_lang['uploaders'?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=stats.php><input type=submit value="<?=$staff_lang['stats'?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=staff.php?act=banned><input type=submit value="<?=$staff_lang['bannedusersshort']?>" style='height: 20px; width: 100px'></form></td>
</tr>
</table>
<? end_frame();
}

if (
get_user_class() >= UC_MODERATOR) { ?>
<? begin_frame
("<font color=#004E98> ".$staff_lang['viewablebymods']."</font>"); ?>
<table width=100% cellspacing=10 align=center>
<tr align=center>
<td class=embedded><form method=get action=warned.php><input type=submit value="<?=$staff_lang['warned'?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=polloverview.php><input type=submit value="<?=$staff_lang['polloverview'?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=users.php><input type=submit value="<?=$staff_lang['users'?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=testip.php><input type=submit value="<?=$staff_lang['testip']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=reports.php><input type=submit value="<?=$staff_lang['reports']?>" style='height: 20px; width: 100px'></form></td>
</tr>
<tr align=center>
<td class=embedded><form method=get action=ipcheck.php><input type=submit value="<?=$staff_lang['ipcheck']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=staff.php?act=users><input type=submit value="<?=$staff_lang['ratiounder02short']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=staff.php?act=last><input type=submit value="<?=$staff_lang['newestusersshort']?>" style='height: 20px; width: 100px'></form></td>
<td class=embedded><form method=get action=usersearch.php><input type=submit value="<?=$staff_lang['advanceusersearch']?>" style='height: 20px; width: 100px'></form></td>
</tr>
</table>
<? end_frame(); ?>

<? if ($act == "users") {
begin_frame($staff_lang['ratiounder02']);

echo 
'<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">';
echo 
"<tr><td class=colhead align=left>".$staff_lang['user']."</td><td class=colhead>".$staff_lang['ratio']."</td><td class=colhead>".$staff_lang['ip']."</td><td class=colhead>".$staff_lang['datejoined']."</td><td class=colhead>".$staff_lang['lastaccess']."</td><td class=colhead>".$staff_lang['downoadet']."</td><td class=colhead>".$staff_lang['uploadet']."</td></tr>";


$result sql_query ("SELECT * FROM users WHERE uploaded / downloaded <= 0.20 AND enabled = 'yes' ORDER BY downloaded DESC ");
if (
$row mysql_fetch_array($result)) {
do {
if (
$row["uploaded"] == "0") { $ratio "---"; }
elseif (
$row["downloaded"] == "0") { $ratio "Inf."; }
$ratio "<font color=" get_ratio_color($ratio) . ">$ratio</font>";
echo 
"<tr><td><a href=userdetails.php?id=".$row["id"]."><b>".get_user_class_color($row["class"], $row["username"])."</b></a></td><td><strong>".$ratio."</strong></td><td>".$row["ip"]."</td><td>".get_date($row["added"])."</td><td>".get_date($row["last_access"])."</td><td>".mksize($row["downloaded"])."</td><td>".mksize($row["uploaded"])."</td></tr>";


} while(
$row mysql_fetch_array($result));
} else {print 
"<tr><td colspan=7>".$staff_lang['norecords']."</td></tr>";}
echo 
"</table>";
end_frame(); }?>

<? if ($act == "last") {
begin_frame($staff_lang['newestusers']);

echo 
'<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">';
echo 
"<tr><td class=colhead align=left>".$staff_lang['user']."</td><td class=colhead>".$staff_lang['ratio']."</td><td class=colhead>".$staff_lang['ip']."</td><td class=colhead>".$staff_lang['datejoined']."</td><td class=colhead>".$staff_lang['lastaccess']."</td><td class=colhead>".$staff_lang['downoadet']."</td><td class=colhead>".$staff_lang['uploadet']."</td></tr>";

$result sql_query ("SELECT * FROM users WHERE enabled = 'yes' AND status = 1 ORDER BY added DESC limit 100");
if (
$row mysql_fetch_array($result)) {
do {
if (
$row["uploaded"] == "0") { $ratio "---"; }
elseif (
$row["downloaded"] == "0") { $ratio "Inf."; }
else {
$ratio number_format($row["uploaded"] / $row["downloaded"], 3);
$ratio "<font color=" get_ratio_color($ratio) . ">$ratio</font>";
}
echo 
"<tr><td><a href=userdetails.php?id=".$row["id"]."><b>".get_user_class_color($row["class"], $row["username"])."</b></a></td><td><strong>".$ratio."</strong></td><td>".$row["ip"]."</td><td>".get_date($row["added"])."</td><td>".get_date($row["last_access"])."</td><td>".mksize($row["downloaded"])."</td><td>".mksize($row["uploaded"])."</td></tr>";


} while(
$row mysql_fetch_array($result));
} else {print 
"<tr><td>".$staff_lang['norecords']."</td></tr>";}
echo 
"</table>";
end_frame(); }?>


<? if ($act == "banned") {
begin_frame($staff_lang['bannedusers']);

echo 
'<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">';
echo 
"<tr><td class=colhead align=left>".$staff_lang['user']."</td><td class=colhead>".$staff_lang['ratio']."</td><td class=colhead>".$staff_lang['ip']."</td><td class=colhead>".$staff_lang['datejoined']."</td><td class=colhead>".$staff_lang['lastaccess']."</td><td class=colhead>".$staff_lang['downoadet']."</td><td class=colhead>".$staff_lang['uploadet']."</td></tr>";
$result sql_query ("SELECT * FROM users WHERE enabled = 'no' ORDER BY last_access DESC ");
if (
$row mysql_fetch_array($result)) {
do {
if (
$row["uploaded"] == "0") { $ratio "---"; }
elseif (
$row["downloaded"] == "0") { $ratio "Inf."; }
else {
$ratio number_format($row["uploaded"] / $row["downloaded"], 3);
$ratio "<font color=" get_ratio_color($ratio) . ">$ratio</font>";
}
echo 
"<tr><td><a href=userdetails.php?id=".$row["id"]."><b>".get_user_class_color($row["class"], $row["username"])."</b></a></td><td><strong>".$ratio."</strong></td><td>".$row["ip"]."</td><td>".get_date($row["added"])."</td><td>".get_date($row["last_access"])."</td><td>".mksize($row["downloaded"])."</td><td>".mksize($row["uploaded"])."</td></tr>";


} while(
$row mysql_fetch_array($result));
} else {print 
"<tr><td colspan=7>".$staff_lang['norecords']."</td></tr>";}
echo 
"</table>";
end_frame(); }



}
if (
get_user_class() >= UC_USER) {

if (!
$act) {
$dt TIMENOW 300;
// LIST ALL FIRSTLINE SUPPORTERS
// Search User Database for Firstline Support and display in alphabetical order
$res sql_query("SELECT * FROM users WHERE support='yes' AND status = 1 ORDER BY username LIMIT 10") or sqlerr(__FILE____LINE__);
while (
$arr mysql_fetch_assoc($res))
{
$land sql_query("SELECT name,flagpic FROM countries WHERE id=$arr[country]") or sqlerr(__FILE____LINE__);
$arr2 mysql_fetch_assoc($land);
$firstline .= "<tr height=15><td class=embedded><a class=altlink href=userdetails.php?id=".$arr['id'].">".$arr['username']."</a></td>
<td class=embedded> "
.($arr['last_access']>$dt?"<img src=".$pic_base_url."button_online.gif border=0 alt=\"online\">":"<img src=".$pic_base_url."button_offline.gif border=0 alt=\"offline\">" )."</td>".
"<td class=embedded><a href=message.php?action=sendmessage&receiver=".$arr['id'].">"."<img src=".$pic_base_url."button_pm.gif border=0></a></td>".
"<td class=embedded><img src=".$pic_base_url."/flag/$arr2[flagpic] title=$arr2[name] border=0 width=38 height=28></td>".
"<td class=embedded>".$arr['supportfor']."</td></tr>\n";
}

begin_frame($staff_lang['firstlinesupport']);
?>

<table width=100% cellspacing=0>
<tr>
<td class=embedded colspan=11><?=$staff_lang['firstlinesupportsmalltalk']?></td></tr>
<!-- Define table column widths -->
<tr>
<td class=embedded width="30"><b><?=$staff_lang['user']?>&nbsp;</b></td>
<td class=embedded width="5"><b><?=$staff_lang['online']?>&nbsp;</b></td>
<td class=embedded width="5"><b><?=$staff_lang['contact']?>&nbsp;</b></td>
<td class=embedded width="85"><b><?=$staff_lang['language']?>&nbsp;</b></td>
<td class=embedded width="200"><b><?=$staff_lang['support']?>&nbsp;</b></td>
</tr>


<tr>
<tr><td class=embedded colspan=11><hr color="#4040c0" size=1></td></tr>

<?=$firstline?>

</tr>
</table>
<?
end_frame
();
}

?>
<?
end_frame
();
end_main_frame();
stdfoot();
}
?>

lang_staff.php

PHP Code:

<?php

if ($multilang == "yes")

//--misc---------------------------------------------------
$staff_lang['stdhead'] = 'Administration';
$staff_lang['directorateofthetracker'] = 'System Administrators';
$staff_lang['administration'] = 'Administrators';
$staff_lang['answerinfaq'] = 'Questions Which Are Already Answered In The Rules Or FAQ Will Be Ignored!';
$staff_lang['administrators'] = 'Administrators';
$staff_lang['moderators'] = 'Moderators';
$staff_lang['uploaders'] = 'Uploaders';
$staff_lang['siteownertools'] = 'Site Owner Tools';
$staff_lang['stafftools'] = 'Staff Tools';
$staff_lang['viewablebysysop'] = 'Viewable By SysOp.';
$staff_lang['viewablebyadmin'] = 'Viewable By Administrators.';
$staff_lang['viewablebymods'] = 'Viewable By Moderators.';
$staff_lang['usersearch'] = 'Search For User';
$staff_lang['search'] = 'Search:';
$staff_lang['send'] = 'Send!';
$staff_lang['advanceusersearch'] = 'User Search';
$staff_lang['user'] = 'Username';
$staff_lang['ratio'] = 'Ratio';
$staff_lang['ip'] = 'IP';
$staff_lang['datejoined'] = 'Date Joined';
$staff_lang['lastaccess'] = 'Last Access';
$staff_lang['downoadet'] = 'Downloaded';
$staff_lang['uploadet'] = 'Uploaded';
$staff_lang['norecords'] = 'Sorry No Records Found!'
$staff_lang['online'] = 'Online'
$staff_lang['contact'] = 'Contact'
$staff_lang['language'] = 'Language'
$staff_lang['support'] = 'Support for:'
//--end misc-----------------------------------------------

//--buttons------------------------------------------------
$staff_lang['masspm'] = 'Mass PM';
$staff_lang['category'] = 'Modify Categories';
$staff_lang['editforums'] = 'Edit Forums';
$staff_lang['delacct'] = 'Delete Accounts';
$staff_lang['bans'] = 'Ban';
$staff_lang['status'] = 'Status';
$staff_lang['unco'] = 'Unconfirmed Users';
$staff_lang['delacc'] = 'Delete Account';
$staff_lang['topten'] = 'TOP 10';
$staff_lang['notconnectable'] = 'Not Connectable';
$staff_lang['warned'] = 'Users Warned';
$staff_lang['adduser'] = 'Add User';
$staff_lang['makepoll'] = 'Create Poll';
$staff_lang['recover'] = 'Recover Account';
$staff_lang['uploaders'] = 'Uploaders';
$staff_lang['polloverview'] = 'Poll Overview';
$staff_lang['users'] = 'User List';
$staff_lang['tags'] = 'Forum Tags';
$staff_lang['smilies'] = 'Smilies';
$staff_lang['stats'] = 'Tracker Stats';
$staff_lang['testip'] = 'Test IP';
$staff_lang['reports'] = 'Reports';
$staff_lang['ipcheck'] = 'Duplicate IP\'s';
//--buttons end---------------------------------------------

//--Other staff tools---------------------------------------
$staff_lang['ratiounder02short'] = 'Low Ratio Users';
$staff_lang['ratiounder02long'] = 'Lists all the users that have a share ratio below 0.20';
$staff_lang['ratiounder02'] = 'Users with ratio below 0.20';
$staff_lang['bannedusersshort'] = 'List Banned Users ';
$staff_lang['banneduserslong'] = 'Lists all the users that have been banned from the site';
$staff_lang['bannedusers'] = 'Banned Users';
$staff_lang['newestusersshort'] = 'Newest Users';
$staff_lang['newestuserslong'] = '100 Newest User Accounts';
$staff_lang['newestusers'] = 'Latest Users';
$staff_lang['sitelogshort'] = 'Site Log';    
$staff_lang['siteloglong'] = 'See whats been upped/deleted/etc'
$staff_lang['sitelog'] = 'Site Log'
//--End Other staff tools-----------------------------------

//--Search userlist-----------------------------------------
$staff_lang['val-']='(any class)';
$staff_lang['val0']='User';
$staff_lang['val1']='Power User';
$staff_lang['val2']='VIP';
$staff_lang['val3']='Uploader';
$staff_lang['val4']='Moderator';
$staff_lang['val5']='Administrator';
$staff_lang['val6']='Owner';
//--End Search userlist-------------------------------------

//--Firstline support---------------------------------------
$staff_lang['firstlinesupport']='Firstline Support';
$staff_lang['firstlinesupportsmalltalk']='General support questions should preferably be directed to the first line supporters. Note that we are all volunteers, giving away our time and effort to help you.';

//--End Firstline support-----------------------------------
?>


joeroberts 30th May 2010 01:30

You should change all your
HTML Code:


to be
HTML Code:


makes it more compliant.
and You got a
HTML Code:

?>

thats not needed

blargh 30th May 2010 07:25

whoops missed that ty. will fix it and update post. :drink:


All times are GMT +2. The time now is 08:53.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.