Add staff class and users class
example global
PHP Code:
//--------------------------------- //---- Search Highlight v0.1 by xam //--------------------------------- define ('UC_USER', 0); define ('UC_POWER_USER', 16); define ('UC_COMSTAFF', 28); define ('UC_VIP', 32); define ('UC_UPLOADER', 48); define ('UC_FORUMSBOT', 50); define ('UC_SYSTEMBOT', 56); define ('UC_MODERATOR', 64); define ('UC_ADMINISTRATOR', 70); define ('UC_SYSOP', 75); define ('UC_TEAMLEADER', 85); define ('UC_OWNER', 96);
function get_user_class() { global $CURUSER; return $CURUSER["class"]; }
function get_user_class_name($class) { switch ($class) { case UC_USER: return "User";
case UC_POWER_USER: return "Power User";
case UC_COMSTAFF: return "Com Staff";
case UC_VIP: return "VIP";
case UC_UPLOADER: return "Uploader";
case UC_FORUMSBOT: return "ForumsBOT";
case UC_SYSTEMBOT: return "SystemBOT";
case UC_MODERATOR: return "Moderator";
case UC_ADMINISTRATOR: return "Administrator";
case UC_SYSOP: return "Sysop";
case UC_TEAMLEADER: return "Teamleader";
case UC_OWNER: return "Owner"; } return ""; }
example controlpanel
PHP Code:
<? /////////////////////////////////////////////////////////////////// ////// ////// ////// New Control Panel By Madsurfer ////// ////// For Torrent Strike Source ////// ////// Based on the existant control panel, ////// ////// And on the control panel for ////// ////// Sys.Administrators, Administrators and Moderators. ////// ////// made by Nazaret2005. All credits go to Nazaret2005 ////// ////// ////// /////////////////////////////////////////////////////////////////// require "include/bittorrent.php"; dbconn(); loggedinorreturn();
///////////////////// Add new options \\\\\\\\\\\\\\\\\\\\\\\\\\\\ if (get_user_class() >= UC_OWNER) { $add = $_GET['add']; if($add == 'true') { $mod_name = $_GET['mod_name']; $mod_url = $_GET['mod_url']; $mod_info = $_GET['mod_info']; $cppanel = $_GET['cppanel']; $query = "INSERT INTO $cppanel SET name = '$mod_name', url = '$mod_url', info = '$mod_info'"; $sql = mysql_query($query); if($sql) { $success = TRUE; } else { $success = FALSE; } } if($success == TRUE) { header("Location: " . $_SERVER['PHP_SELF'] . ""); } }
stdhead("Staff");
if (get_user_class() < UC_MODERATOR) { stdmsg("Excuse...", "Access is not present!!!"); stdfoot(); exit; }
// ----------------------- Quick Search ----------------
if (isset($_GET['act'])) $act=htmlspecialchars(stripslashes($_GET['act']));
// ------------------------------------------------
if ($act == "last") { begin_frame("Latest users");
echo '<table width="640" border="0" align="center" cellpadding="2" cellspacing="0">'; echo "<tr><td class=colhead align=left>User</td><td class=colhead>Ratio</td><td class=colhead>IP</td><td class=colhead>Date Joined</td><td class=colhead>Last Access</td><td class=colhead>Download</td><td class=colhead>Upload</td></tr>";
$result = mysql_query ("SELECT * FROM users WHERE enabled = 'yes' AND status = 'confirmed' ORDER BY added DESC limit 100"); if ($row = mysql_fetch_array($result)) { do { if ($row["uploaded"] == "0") { $ratio = "inf"; } 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>".$row["username"]."</b></a></td><td><strong>".$ratio."</strong></td><td>".$row["ip"]."</td><td>".$row["added"]."</td><td>".$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>Sorry, no records were found!</td></tr>";} echo "</table>"; end_frame(); stdfoot(); die(); }
// ------------------------------------------------
if ($act == "forum") {
// SHOW FORUMS WITH FORUM MANAGMENT TOOLS begin_frame("Forums"); ?> <script language="JavaScript"> <!-- function confirm_delete(id) { if(confirm('Are you sure you want to delete this forum?')) { self.location.href='<? $PHP_SELF; ?>?action=del&id='+id; } } //--> </script> <? echo '<table width="700" border="0" align="center" cellpadding="2" cellspacing="0">'; echo "<tr><td class=colhead align=left>Name</td><td class=colhead>Topics</td><td class=colhead>Posts</td><td class=colhead>Read</td><td class=colhead>Write</td><td class=colhead>Create topic</td><td class=colhead>Modify</td></tr>"; $result = mysql_query ("SELECT * FROM forums ORDER BY sort ASC"); if ($row = mysql_fetch_array($result)) { do { //if ($row["uploaded"] == "0" || $row["downloaded"] == "0") { $ratio = "inf"; } else { //$ratio = $row["uploaded"] / $row["downloaded"]; //$ratio = number_format($ratio, 2); //} echo "<tr><td><a href=forums.php?action=viewforum&forumid=".$row["id"]."><b>".$row["name"]."</b></a><br/>".$row["description"]."</td>"; echo "<td>".$row["topiccount"]."</td><td>".$row["postcount"]."</td><td>minimal " . get_user_class_name($row["minclassread"]) . "</td><td>minimal " . get_user_class_name($row["minclasswrite"]) . "</td><td>minimal " . get_user_class_name($row["minclasscreate"]) . "</td><td align=center nowrap><b><a href=\"".$PHP_SELF."?act=editforum&id=".$row["id"]."\">EDIT</a> | <a href=\"javascript:confirm_delete('".$row["id"]."');\"><font color=red>DELETE</font></a></b></td></tr>";
} while($row = mysql_fetch_array($result)); } else {print "<tr><td>Sorry, no records were found!</td></tr>";} echo "</table>"; ?> <br/><br/> <form method=post action="<?=$PHP_SELF;?>"> <table width="600" border="0" cellspacing="0" cellpadding="3" align="center"> <tr align="center"> <td colspan="2" class=colhead>Make new forum</td> </tr> <tr> <td><b>Forum name</td> <td><input name="name" type="text" size="20" maxlength="60"/></td> </tr> <tr> <td><b>Forum description </td> <td><input name="desc" type="text" size="30" maxlength="200"/></td> </tr> <tr> <td><b>Minimun read permission </td> <td> <select name=readclass>\n <? $maxclass = get_user_class(); for ($i = 0; $i <= $maxclass; ++$i) { $currentclass = get_user_class_name($i); if ($currentclass) print("<option value=$i" . ($user["class"] == $i ? " selected" : "") . ">$prefix" . $currentclass . "\n"); } ?> </select> </td> </tr> <tr> <td><b>Minimun write permission </td> <td><select name=writeclass>\n <? $maxclass = get_user_class(); for ($i = 0; $i <= $maxclass; ++$i) { $currentclass = get_user_class_name($i); if ($currentclass) print("<option value=$i" . ($user["class"] == $i ? " selected" : "") . ">$prefix" . $currentclass . "\n"); } ?> </select></td> </tr> <tr> <td><b>Minimun create topic permission </td> <td><select name=createclass>\n <? $maxclass = get_user_class(); for ($i = 0; $i <= $maxclass; ++$i) { $currentclass = get_user_class_name($i); if ($currentclass) print("<option value=$i" . ($user["class"] == $i ? " selected" : "") . ">$prefix" . $currentclass . "\n"); } ?> </select></td> </tr> <tr> <td><b>Forum rank </td> <td> <select name=sort>\n <? $res = mysql_query ("SELECT sort FROM forums"); $nr = mysql_num_rows($res); $maxclass = $nr + 1; for ($i = 0; $i <= $maxclass; ++$i) print("<option value=$i>$i \n"); ?> </select>
</td> </tr>
<tr align="center"> <td colspan="2"><input type="hidden" name="action" value="addforum"/><input type="submit" name="Submit" value="Make forum"/></td> </tr> </table>
<?end_frame(); stdfoot(); die(); }?>
<? // ------------------------------------------------
if ($act == "editforum") {
//EDIT PAGE FOR THE FORUMS $id = $_GET["id"]; begin_frame("Edit Forum"); $result = mysql_query ("SELECT * FROM forums where id = '$id'"); if ($row = mysql_fetch_array($result)) { do { ?>
<form method=post action="<?=$PHP_SELF;?>"> <table width="600" border="0" cellspacing="0" cellpadding="3" align="center"> <tr align="center"> <td colspan="2" class=colhead>edit forum: <?=$row["name"];?></td> </tr> <tr> <td><b>Forum name</td> <td><input name="name" type="text" size="20" maxlength="60" value="<?=$row["name"];?>"/></td> </tr> <tr> <td><b>Forum description </td> <td><input name="desc" type="text" size="30" maxlength="200" value="<?=$row["description"];?>"/></td> </tr> <tr> <td><b>Minimun read permission </td> <td> <select name=readclass>\n <? $maxclass = get_user_class(); for ($i = 0; $i <= $maxclass; ++$i) { $currentclass = get_user_class_name($i); if ($currentclass) print("<option value=$i" . ($row["minclassread"] == $i ? " selected" : "") . ">$prefix" . $currentclass . "\n"); } ?> </select> </td> </tr> <tr> <td><b>Minimun write permission </td> <td><select name=writeclass>\n <? $maxclass = get_user_class(); for ($i = 0; $i <= $maxclass; ++$i) { $currentclass = get_user_class_name($i); if ($currentclass) print("<option value=$i" . ($row["minclasswrite"] == $i ? " selected" : "") . ">$prefix" . $currentclass . "\n"); } ?> </select></td> </tr> <tr> <td><b>Minimun create topic permission </td> <td><select name=createclass>\n <? $maxclass = get_user_class(); for ($i = 0; $i <= $maxclass; ++$i) { $currentclass = get_user_class_name($i); if ($currentclass) print("<option value=$i" . ($row["minclasscreate"] == $i ? " selected" : "") . ">$prefix" . $currentclass . "\n"); } ?> </select></td> </tr> <tr> <td><b>Forum rank </td> <td> <select name=sort>\n <? $res = mysql_query ("SELECT sort FROM forums"); $nr = mysql_num_rows($res); $maxclass = $nr + 1; for ($i = 0; $i <= $maxclass; ++$i) print("<option value=$i" . ($row["sort"] == $i ? " selected" : "") . ">$i \n"); ?> </select>
</td> </tr>
<tr align="center"> <td colspan="2"><input type="hidden" name="action" value="editforum"/><input type="hidden" name="id" value="<?=$id;?>"/><input type="submit" name="Submit" value="Edit forum"/></td> </tr> </table>
<? } while($row = mysql_fetch_array($result)); } else {print "Sorry, no records were found!";} end_frame(); stdfoot(); die(); }?> </script> <script LANGUAGE="Javascript"><!-- function mySubmit() { setTimeout('document.shbox.reset()',30); } function winop1() { windop1 = window.open("smilies2.php?form=<?=$form?>&text=<?=$text?>","mywin","height=400,width=400,resizable=yes,scrollbars=yes"); } <script type="text/javascript"> <!-- function bbshout(repdeb, repfin) { var input = document.forms['shbox'].elements['shbox_text']; input.focus();
if(typeof document.selection != 'undefined') {
var range = document.selection.createRange(); var insText = range.text; range.text = repdeb + insText + repfin;
range = document.selection.createRange(); if (insText.length == 0) { range.move('character', -repfin.length); } else { range.moveStart('character', repdeb.length + insText.length + repfin.length); } range.select(); }
else if(typeof input.selectionStart != 'undefined') {
var start = input.selectionStart; var end = input.selectionEnd; var insText = input.value.substring(start, end); input.value = input.value.substr(0, start) + repdeb + insText + repfin + input.value.substr(end);
var pos; if (insText.length == 0) { pos = start + repdeb.length; } else { pos = start + repdeb.length + insText.length + repfin.length; } input.selectionStart = pos; input.selectionEnd = pos; }
else {
var pos; var re = new RegExp('^[0-9]{0,3}$'); while(!re.test(pos)) { pos = prompt("Insertion à la position (0.." + input.value.length + "):", "0"); } if(pos > input.value.length) { pos = input.value.length; }
var insText = prompt("Veuillez entrer le texte à formater:"); input.value = input.value.substr(0, pos) + repdeb + insText + repfin + input.value.substr(pos); } }
function bbcolor() { var colorvalue = document.forms['shbox'].elements['color'].value; bbshout("[color="+colorvalue+"]", "[/color]"); }
function bbfont() { var fontvalue = document.forms['shbox'].elements['font'].value; bbshout("[font="+fontvalue+"]", "[/font]"); } function bbsize() { var sizevalue = document.forms['shbox'].elements['size'].value; bbshout("[size="+sizevalue+"]", "[/size]"); } function bbimg() { var imgvalue = document.forms['shbox'].elements['img'].value; bbshout("[img="+sizevalue+"]", "[/img]"); } //--> </script> <script language=javascript> function SmileIT(smile,form,text){ document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" "; document.forms[form].elements[text].focus(); } </script> <script LANGUAGE="JavaScript"><!-- function mySubmit() { setTimeout('document.shbox.reset()',100); } function winop1() { windop1 = window.open("smilies2.php?form=<?=$form?>&text=<?=$text?>","mywin","height=400,width=400,resizable=yes,scrollbars=yes"); } //--></SCRIPT> <? function quickbbshout(){ echo "<center><table border=0 cellpadding=0 cellspacing=2><tr>"; echo "<tr>"; echo "<td width=22><a href=\"javascript:bbshout('[b]', '[/b]')\"><img src=./pic/bold.png border=0 alt='Bold'></a></td>"; echo "<td width=22><a href=\"javascript:bbshout('[i]', '[/i]')\"><img src=./pic/italic.png border=0 alt='Italic'></a></td>"; echo "<td width=22><a href=\"javascript:bbshout('[u]', '[/u]')\"><img src=./pic/underline.png border=0 alt='Underline'></a></td>"; echo "<td width=22><a href=\"javascript:bbshout('[url]', '[/url]')\"><img src=./pic/url.png border=0 alt='Url'></a></td>"; echo "<td width=22><a href=\"javascript:bbshout('[img]', '[/img]')\"><img src=./pic/image.png border=0 alt='Img'></a></td>"; echo "<td> <select name='color' size='0.5' onChange=\"javascript:bbcolor()\"> <option selected='selected'>COLOR</option> <option value=skyblue style=color:skyblue>sky blue</option> <option value=royalblue style=color:royalblue>royal blue</option> <option value=blue style=color:blue>blue</option> <option value=darkblue style=color:darkblue>dark-blue</option> <option value=orange style=color:orange>orange</option> <option value=orangered style=color:orangered>orange-red</option> <option value=crimson style=color:crimson>crimson</option> <option value=red style=color:red>red</option> <option value=firebrick style=color:firebrick>firebrick</option> <option value=darkred style=color:darkred>dark red</option> <option value=green style=color:green>green</option> <option value=limegreen style=color:limegreen>limegreen</option> <option value=seagreen style=color:seagreen>sea-green</option> <option value=deeppink style=color:deeppink>deeppink</option> <option value=tomato style=color:tomato>tomato</option> <option value=coral style=color:coral>coral</option> <option value=purple style=color:purple>purple</option> <option value=indigo style=color:indigo>indigo</option> <option value=burlywood style=color:burlywood>burlywood</option> <option value=sandybrown style=color:sandybrown>sandy brown</option> <option value=sienna style=color:sienna>sienna</option> <option value=chocolate style=color:chocolate>chocolate</option> <option value=teal style=color:teal>teal</option> <option value=silver style=color:silver>silver</option> </select></td>"; echo "<td> <select name='font' size='0.5' onChange=\"javascript:bbfont()\"> <option selected='selected'>FONT</option> <option value=arial>Arial</option> <option value=comic sans ms>Comic</option> <option value=courier new>Courier New</option> <option value=tahoma>Tahoma</option> <option value=times new roman>Times New Roman</option> <option value=verdana>Verdana</option> </select></td>"; echo "<td> <select name='size' size='0.5' onChange=\"javascript:bbsize()\"> <option selected='selected'>Size</option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> <option value=4>4</option> <option value=5>5</option> <option value=6>6</option> <option value=7>7</option> </select></td>"; echo "</tr></table></center>"; } ?> <?begin_frame("<center><font color=lime green><b>STAFF SHOUT</center></font></b>",true,5);?> <iframe src='./staffshoutbox.php' width='100%' height='350' align='center' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe><br><br> <form action='./staffshoutbox.php' method='get' target='sbox' name='shbox' onSubmit="mySubmit()"> <p align="center"><font color=LIME GREEN><b>SHOUT HERE!!</font></b><input type='text' name='shbox_text' size='80'> <input type='submit' class='btn' value=' SHOUT '> <input type='hidden' name='sent' value='yes'> <? if (get_user_class() >= UC_MODERATOR) { ?> <input type="button" value="RESET SHOUT" onclick="window.open('resetstaffshoutbox.php','Clean SB','width=10000,height=10000,top=10000,left=10000,status=no,scrollbars=no,resizable=no')"> <? } ?> <center><font size="1"><a href='./staffshoutbox.php' target='sbox'type="button" class='btn'><b><font color=LIME GREEN>REFRESH</font></b></a><span class="smallfont"> <a href='staffshoutbox.php?history=1' target='_blank'type="button" class='btn'><b><font color=LIME GREEN>HISTORY</font></b></a></center> <br> <? quickbbshout(); ?> <br> <center><a href="javascript: SmileIT(':-)','shbox','shbox_text')"><img border=0 src=pic/smilies/smile1.gif></a> <a href="javascript: SmileIT(':smile:','shbox','shbox_text')"><img border=0 src=pic/smilies/smile2.gif></a> <a href="javascript: SmileIT(':-D','shbox','shbox_text')"><img border=0 src=pic/smilies/grin.gif></a> <a href="javascript: SmileIT(':evo:','shbox','shbox_text')"><img src=pic/smilies/evo.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':-|','shbox','shbox_text')"><img border=0 src=pic/smilies/noexpression.gif></a> <a href="javascript: SmileIT(':-/','shbox','shbox_text')"><img border=0 src=pic/smilies/confused.gif></a> <a href="javascript: SmileIT(':-(','shbox','shbox_text')"><img border=0 src=pic/smilies/sad.gif></a> <a href="javascript: SmileIT(':weep:','shbox','shbox_text')"><img src=pic/smilies/weep.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':-O','shbox','shbox_text')"><img src=pic/smilies/ohmy.gif border=0></a> <a href="javascript: SmileIT('8-)','shbox','shbox_text')"><img src=pic/smilies/cool1.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':yawn:','shbox','shbox_text')"><img src=pic/smilies/yawn.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':sly:','shbox','shbox_text')"><img src=pic/smilies/sly.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':greedy:','shbox','shbox_text')"><img src=pic/smilies/greedy.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':weirdo:','shbox','shbox_text')"><img src=pic/smilies/weirdo.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':sneaky:','shbox','shbox_text')"><img src=pic/smilies/sneaky.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':kiss:','shbox','shbox_text')"><img src=pic/smilies/kiss.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':geek:','shbox','shbox_text')"><img src=pic/smilies/geek.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':evil:','shbox','shbox_text')"><img src=pic/smilies/evil.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':yucky:','shbox','shbox_text')"><img src=pic/smilies/yucky.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':shit:','shbox','shbox_text')"><img src=pic/smilies/shit.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':?:','shbox','shbox_text')"><img src=pic/smilies/question.gif width="18" height="18" border=0></a> <a href="javascript: SmileIT(':!:','shbox','shbox_text')"><img src=pic/smilies/idea.gif width="18" height="18" border=0></a></center> </td></form> <?end_frame();?>
<? //--------------------------- // LIST OF THE MOD TOOLS (ONLY VISIBLE WHEN YOU ARE MOD, ELSE YOU ONLY SEE LIST OF MODS begin_frame("..:: Administration ::..",true,10,false);
print("<br/>");
///////////////////// Remove And Edit Options Sys.Owner \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$sure = $_GET['sure']; if($sure == "yes") { $delOwneradminid = $_GET['delOwneradminid']; $query = "DELETE FROM Ownerpanel WHERE id=" .sqlesc($delOwneradminid) . " LIMIT 1"; $sql = mysql_query($query); echo("The option is successfully removed!<br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]"); end_frame(); stdfoot(); die(); } $delOwneradminid = $_GET['delOwneradminid']; $name = $_GET['mod']; if($delOwneradminid > 0) { echo("Only Sys.Owner is able to do it"); if (get_user_class() >= UC_OWNER) { echo("<p>You and in the truth wish to remove an option? ($name)</p> ( <strong><a href='". $_SERVER['PHP_SELF'] . "?delOwneradminid=$delOwneradminid&mod=$name&sure=yes'>Yes!</a></strong> / <strong><a href='". $_SERVER['PHP_SELF'] . "'>No!</a></strong> )"); } end_frame(); stdfoot(); die(); }
$editOwneradmin = $_GET['editOwneradmin']; if($editOwneradmin == 1) { $id = $_GET['id']; $mod_name = $_GET['mod_name']; $mod_url = $_GET['mod_url']; $mod_info = $_GET['mod_info']; $query = "UPDATE Ownerpanel SET name = '$mod_name', url = '$mod_url', info = '$mod_info' WHERE id=".sqlesc($id); $sql = mysql_query($query); if($sql) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td><div align='center'><strong>It is successfully changed</strong><br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]</div></tr>"); echo("</table>"); } end_frame(); stdfoot(); die(); } } $editOwneradminid = $_GET['editOwneradminid']; $name = $_GET['name']; $url = $_GET['url']; $info = $_GET['info']; if($editOwneradminid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<form name='form1' method='get' action='" . $_SERVER['PHP_SELF'] . "'>"); echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<div align='center'><input type='hidden' name='editsosadmin' value='1'/>At present you change an option <strong>"$name"</strong></div>"); echo("<br/>"); echo("<input type='hidden' name='id' value='$editOwneradminid'/><table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td>Option: </td><td align='right'><input type='text' size='50' name='mod_name' value='$name'/></td></tr>"); echo("<tr><td>URL-file: </td><td align='right'><input type='text' size='50' name='mod_url' value='$url'/></td></tr>"); echo("<tr><td>Info: </td><td align='right'><input type='text' size='50' name='mod_info' value='$info'/></td></tr>"); echo("<tr><td></td><td><div align='right'><input type='submit' value='Change'/></div></td></tr>"); echo("</table></form>"); } end_frame(); stdfoot(); die(); } ///////////////////// Remove And Edit Options Teamleader \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$suree = $_GET['suree']; if($suree == "yes") { $delTeamleaderid = $_GET['delTeamleaderid']; $query = "DELETE FROM Teampanel WHERE id=" .sqlesc($delTeamleaderid) . " LIMIT 1"; $sql = mysql_query($query); echo("The option is successfully removed!<br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]"); end_frame(); stdfoot(); die(); } $delTeamleaderid = $_GET['delTeamleaderid']; $nameTeamleader = $_GET['Teamleader']; if($delTeamleaderid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("You and in the truth wish to remove an option? ($nameTeamleader) ( <strong><a href='". $_SERVER['PHP_SELF'] . "?delTeamleaderid=$delTeamleaderid&Teamleader=$nameTeamleader&suree=yes'>Yes!</a></strong> / <strong><a href='". $_SERVER['PHP_SELF'] . "'>No!</a></strong> )"); } end_frame(); stdfoot(); die(); }
$editTeamleader = $_GET['editTeamleader']; if($editTeamleader == 1) { $id = $_GET['id']; $mod_name = $_GET['mod_name']; $mod_url = $_GET['mod_url']; $mod_info = $_GET['mod_info']; $query = "UPDATE adminpanel SET name = '$mod_name', url = '$mod_url', info = '$mod_info' WHERE id=".sqlesc($id); $sql = mysql_query($query); if($sql) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td><div align='center'><strong>It is successfully changed</strong><br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]</div></tr>"); echo("</table>"); } end_frame(); stdfoot(); die(); } }
$editTeamleaderid = $_GET['editTeamleaderid']; $name = $_GET['name']; $url = $_GET['url']; $info = $_GET['info']; if($editTeamleaderid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<form name='form1' method='get' action='" . $_SERVER['PHP_SELF'] . "'>"); echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<div align='center'><input type='hidden' name='editadmin' value='1'/>At present you change an option <strong>"$name"</strong></div>"); echo("<br/>"); echo("<input type='hidden' name='id' value='$editTeamleaderid'/><table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td>Option: </td><td align='right'><input type='text' size='50' name='mod_name' value='$name'/></td></tr>"); echo("<tr><td>URL-file: </td><td align='right'><input type='text' size='50' name='mod_url' value='$url'/></td></tr>"); echo("<tr><td>Info: </td><td align='right'><input type='text' size='50' name='mod_info' value='$info'/></td></tr>"); echo("<tr><td></td><td><div align='right'><input type='submit' value='Change'/></div></td></tr>"); echo("</table></form>"); } end_frame(); stdfoot(); die(); } ///////////////////// Remove And Edit Options Sysop \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$suree = $_GET['suree']; if($suree == "yes") { $delSysopid = $_GET['delSysopid']; $query = "DELETE FROM Sysoppanel WHERE id=" .sqlesc($delSysopid) . " LIMIT 1"; $sql = mysql_query($query); echo("The option is successfully removed!<br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]"); end_frame(); stdfoot(); die(); } $delSysopid = $_GET['delSysopid']; $nameSysop = $_GET['Sysop']; if($delSysopid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("You and in the truth wish to remove an option? ($nameSysop) ( <strong><a href='". $_SERVER['PHP_SELF'] . "?delSysopid=$delSysopid&admin=$nameSysop&suree=yes'>Yes!</a></strong> / <strong><a href='". $_SERVER['PHP_SELF'] . "'>No!</a></strong> )"); } end_frame(); stdfoot(); die(); }
$editSysop = $_GET['editSysop']; if($editSysop == 1) { $id = $_GET['id']; $mod_name = $_GET['mod_name']; $mod_url = $_GET['mod_url']; $mod_info = $_GET['mod_info']; $query = "UPDATE Sysoppanel SET name = '$mod_name', url = '$mod_url', info = '$mod_info' WHERE id=".sqlesc($id); $sql = mysql_query($query); if($sql) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td><div align='center'><strong>It is successfully changed</strong><br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]</div></tr>"); echo("</table>"); } end_frame(); stdfoot(); die(); } }
$editSysopid = $_GET['editSysopid']; $name = $_GET['name']; $url = $_GET['url']; $info = $_GET['info']; if($editadminid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<form name='form1' method='get' action='" . $_SERVER['PHP_SELF'] . "'>"); echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<div align='center'><input type='hidden' name='editadmin' value='1'/>At present you change an option <strong>"$name"</strong></div>"); echo("<br/>"); echo("<input type='hidden' name='id' value='$editSysopid'/><table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td>Option: </td><td align='right'><input type='text' size='50' name='mod_name' value='$name'/></td></tr>"); echo("<tr><td>URL-file: </td><td align='right'><input type='text' size='50' name='mod_url' value='$url'/></td></tr>"); echo("<tr><td>Info: </td><td align='right'><input type='text' size='50' name='mod_info' value='$info'/></td></tr>"); echo("<tr><td></td><td><div align='right'><input type='submit' value='Change'/></div></td></tr>"); echo("</table></form>"); } end_frame(); stdfoot(); die(); } ///////////////////// Remove And Edit Options Admin \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$suree = $_GET['suree']; if($suree == "yes") { $deladminid = $_GET['deladminid']; $query = "DELETE FROM adminpanel WHERE id=" .sqlesc($deladminid) . " LIMIT 1"; $sql = mysql_query($query); echo("The option is successfully removed!<br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]"); end_frame(); stdfoot(); die(); } $deladminid = $_GET['deladminid']; $nameadmin = $_GET['admin']; if($deladminid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("You and in the truth wish to remove an option? ($nameadmin) ( <strong><a href='". $_SERVER['PHP_SELF'] . "?deladminid=$deladminid&admin=$nameadmin&suree=yes'>Yes!</a></strong> / <strong><a href='". $_SERVER['PHP_SELF'] . "'>No!</a></strong> )"); } end_frame(); stdfoot(); die(); }
$editadmin = $_GET['editadmin']; if($editadmin == 1) { $id = $_GET['id']; $mod_name = $_GET['mod_name']; $mod_url = $_GET['mod_url']; $mod_info = $_GET['mod_info']; $query = "UPDATE adminpanel SET name = '$mod_name', url = '$mod_url', info = '$mod_info' WHERE id=".sqlesc($id); $sql = mysql_query($query); if($sql) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td><div align='center'><strong>It is successfully changed</strong><br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]</div></tr>"); echo("</table>"); } end_frame(); stdfoot(); die(); } }
$editadminid = $_GET['editadminid']; $name = $_GET['name']; $url = $_GET['url']; $info = $_GET['info']; if($editadminid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<form name='form1' method='get' action='" . $_SERVER['PHP_SELF'] . "'>"); echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<div align='center'><input type='hidden' name='editadmin' value='1'/>At present you change an option <strong>"$name"</strong></div>"); echo("<br/>"); echo("<input type='hidden' name='id' value='$editadminid'/><table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td>Option: </td><td align='right'><input type='text' size='50' name='mod_name' value='$name'/></td></tr>"); echo("<tr><td>URL-file: </td><td align='right'><input type='text' size='50' name='mod_url' value='$url'/></td></tr>"); echo("<tr><td>Info: </td><td align='right'><input type='text' size='50' name='mod_info' value='$info'/></td></tr>"); echo("<tr><td></td><td><div align='right'><input type='submit' value='Change'/></div></td></tr>"); echo("</table></form>"); } end_frame(); stdfoot(); die(); } ///////////////////// Remove And Edit Options Moderator \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$sureee = $_GET['sureee']; if($sureee == "yes") { $delmodid = $_GET['delmodid']; $query = "DELETE FROM modpanel WHERE id=" .sqlesc($delmodid) . " LIMIT 1"; $sql = mysql_query($query); echo("The option is successfully removed!<br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]"); end_frame(); stdfoot(); die(); } $delmodid = $_GET['delmodid']; $namemod = $_GET['mod']; if($delmodid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("You and in the truth wish to remove an option? ($namemod) ( <strong><a href='". $_SERVER['PHP_SELF'] . "?delmodid=$delmodid&mod=$namemod&sureee=yes'>Yes!</a></strong> / <strong><a href='". $_SERVER['PHP_SELF'] . "'>No!</a></strong> )"); } end_frame(); stdfoot(); die(); }
$editmod = $_GET['editmod']; if($editmod == 1) { $id = $_GET['id']; $mod_name = $_GET['mod_name']; $mod_url = $_GET['mod_url']; $mod_info = $_GET['mod_info']; $query = "UPDATE modpanel SET name = '$mod_name', url = '$mod_url', info = '$mod_info' WHERE id=".sqlesc($id); $sql = mysql_query($query); if($sql) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td><div align='center'><strong>It is successfully changed</strong><br/>[ <a href='". $_SERVER['PHP_SELF'] . "'>Back</a> ]</div></tr>"); echo("</table>"); } end_frame(); stdfoot(); die(); } }
$editmodid = $_GET['editmodid']; $name = $_GET['name']; $url = $_GET['url']; $info = $_GET['info']; if($editmodid > 0) { echo("Only Sys.Owner is able to do it<p>"); if (get_user_class() >= UC_OWNER) { echo("<form name='form1' method='get' action='" . $_SERVER['PHP_SELF'] . "'>"); echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<div align='center'><input type='hidden' name='editmod' value='1'/>At present you change an option <strong>"$name"</strong></div>"); echo("<br/>"); echo("<input type='hidden' name='id' value='$editmodid'/><table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td>Option: </td><td align='right'><input type='text' size='50' name='mod_name' value='$name'/></td></tr>"); echo("<tr><td>URL-file: </td><td align='right'><input type='text' size='50' name='mod_url' value='$url'/></td></tr>"); echo("<tr><td>Info: </td><td align='right'><input type='text' size='50' name='mod_info' value='$info'/></td></tr>"); echo("<tr><td></td><td><div align='right'><input type='submit' value='Change'/></div></td></tr>"); echo("</table></form>"); } end_frame(); stdfoot(); die(); } ///////////////////// Add new options \\\\\\\\\\\\\\\\\\\\\\\\\\\\ if (get_user_class() >= UC_OWNER) { print("<strong>Add new option:</strong>"); print("<br />"); print("<br />");
echo("<form name='form1' method='get' action='" . $_SERVER['PHP_SELF'] . "'>"); echo("<table class=\"main\" cellspacing=\"0\" cellpadding=\"5\" width=\"50%\">"); echo("<tr><td>Name: </td><td align='left'><input type='text' size='50' name='mod_name'/></td></tr>"); echo("<tr><td>URL-file: </td><td align='left'><input type='text' size='50' name='mod_url'/></td></tr>"); echo("<tr><td>Info: </td><td align='left'><input type='text' size='50' name='mod_info'/></td></tr>"); echo("<tr><td>Option for: </td><td align='left'><select name='cppanel'><option value='Ownerpanel'>Sys.Owner</option><option value='Teampanel'>Teamleaders</option><option value='Sysoppanel'>Sysop</option><option value='Adminpanel'>Admins</option><option value='modpanel'>Moderators</option></select></select><input type='hidden' name='add' value='true'/></td></tr>"); echo("<tr><td></td><td><div align='left'><input value='Add' type='submit'/></div></td></tr>"); echo("</table>"); echo("</form>"); }
///////////////////// Sys.Owner Only \\\\\\\\\\\\\\\\\\\\\\\\\\\\ if (get_user_class() >= UC_OWNER) { print("<br />"); //print("<table border=\"1\" class=\"row2\" cellspacing=\"0\" cellpadding=\"5\">"); begin_frame("..:: For Sys.Owner Only ::..",true,10,false); begin_table(); echo("<tr><td class=\"row2\">The name an option and URL:</td><td class=\"row2\">Info:</td><td class=\"row2\">Change:</td><td class=\"row2\">Remove:</td></tr>"); $query = "SELECT * FROM Ownerpanel WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $id = $row['id']; $name = $row['name']; $url = $row['url']; $info = $row['info'];
echo("<tr><td class=\"row2\"><strong><a class=\"altlink\" href=\"$url\">$name</a></strong></td> <td class=\"row2\">$info</td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?editOwnerdminid=$id&name=$name&url=$url&info=$info'><img src='$BASEURL/pic/multipage.gif' alt='Change' border='0' align='middle' /></a></div></td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?delOwneradminid=$id&mod=$name'><img src='$BASEURL/pic/warned2.gif' alt='Remove' border='0' align='middle' /></a></div></td></tr>"); } end_table(); end_frame(); }
///////////////////// Teamleader Only \\\\\\\\\\\\\\\\\\\\\\\\\\\\ if (get_user_class() >= UC_TEAMLEADER) { print("<br />"); //print("<table border=\"1\" class=\"row2\" cellspacing=\"0\" cellpadding=\"5\">"); begin_frame("..:: For Teamleader Only :..",true,10,false); begin_table(); echo("<tr><td class=\"row2\">The name an option and URL:</td><td class=\"row2\">Info:</td><td class=\"row2\">Change:</td><td class=\"row2\">Remove:</td></tr>"); $query = "SELECT * FROM Teampanel WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $id = $row['id']; $name = $row['name']; $url = $row['url']; $info = $row['info'];
echo("<tr><td class=\"row2\"><strong><a class=\"altlink\" href=\"$url\">$name</a></strong></td> <td class=\"row2\">$info</td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?editTeamleaderid=$id&name=$name&url=$url&info=$info'><img src='$BASEURL/pic/multipage.gif' alt='Change' border='0' align='middle' /></a></div></td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?delTeamleaderid=$id&Teamleader=$name'><img src='$BASEURL/pic/warned2.gif' alt='Remove' border='0' align='middle' /></a></div></td></tr>");
} end_table(); end_frame(); }
///////////////////// Sysop Only \\\\\\\\\\\\\\\\\\\\\\\\\\\\ if (get_user_class() >= UC_SYSOP) { print("<br />"); //print("<table border=\"1\" class=\"row2\" cellspacing=\"0\" cellpadding=\"5\">"); begin_frame("..:: For Sysop Only :..",true,10,false); begin_table(); echo("<tr><td class=\"row2\">The name an option and URL:</td><td class=\"row2\">Info:</td><td class=\"row2\">Change:</td><td class=\"row2\">Remove:</td></tr>"); $query = "SELECT * FROM sysoppanel WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $id = $row['id']; $name = $row['name']; $url = $row['url']; $info = $row['info'];
echo("<tr><td class=\"row2\"><strong><a class=\"altlink\" href=\"$url\">$name</a></strong></td> <td class=\"row2\">$info</td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?editSysopid=$id&name=$name&url=$url&info=$info'><img src='$BASEURL/pic/multipage.gif' alt='Change' border='0' align='middle' /></a></div></td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?delSysopid=$id&Sysop=$name'><img src='$BASEURL/pic/warned2.gif' alt='Remove' border='0' align='middle' /></a></div></td></tr>");
} end_table(); end_frame(); }
///////////////////// Admin Only \\\\\\\\\\\\\\\\\\\\\\\\\\\\ if (get_user_class() >= UC_ADMINISTRATOR) { print("<br />"); //print("<table border=\"1\" class=\"row2\" cellspacing=\"0\" cellpadding=\"5\">"); begin_frame("..:: For Admin Only :..",true,10,false); begin_table(); echo("<tr><td class=\"row2\">The name an option and URL:</td><td class=\"row2\">Info:</td><td class=\"row2\">Change:</td><td class=\"row2\">Remove:</td></tr>"); $query = "SELECT * FROM adminpanel WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $id = $row['id']; $name = $row['name']; $url = $row['url']; $info = $row['info'];
echo("<tr><td class=\"row2\"><strong><a class=\"altlink\" href=\"$url\">$name</a></strong></td> <td class=\"row2\">$info</td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?editadminid=$id&name=$name&url=$url&info=$info'><img src='$BASEURL/pic/multipage.gif' alt='Change' border='0' align='middle' /></a></div></td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?deladminid=$id&admin=$name'><img src='$BASEURL/pic/warned2.gif' alt='Remove' border='0' align='middle' /></a></div></td></tr>");
} end_table(); end_frame(); }
///////////////////// Moderator Only \\\\\\\\\\\\\\\\\\\\\\\\\\\\
print("<br />"); //print("<table border=\"1\" class=\"row2\" cellspacing=\"0\" cellpadding=\"5\">"); begin_frame("..:: For Moderator Only ::..",true,10,false); begin_table(); echo("<tr><td class=\"row2\">The name an option and URL:</td><td class=\"row2\">Info:</td><td class=\"row2\">Change:</td><td class=\"row2\">Remove:</td></tr>"); $query = "SELECT * FROM modpanel WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $id = $row['id']; $name = $row['name']; $url = $row['url']; $info = $row['info'];
echo("<tr><td class=\"row2\"><a class=\"altlink\" href=\"$url\">$name</a></td> <td class=\"row2\">$info</td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?editmodid=$id&name=$name&url=$url&info=$info'><img src='$BASEURL/pic/multipage.gif' alt='Change' border='0' align='middle'/></a></div></td> <td class=\"row2\"><div align='center'><a href='". $_SERVER['PHP_SELF'] . "?delmodid=$id&mod=$name'><img src='$BASEURL/pic/warned2.gif' alt='Remove' border='0' align='middle' /></a></div></td></tr>"); } end_table(); end_frame(); print("<br />");
end_frame(); echo "<br/>";
// -------------- stdfoot(); ?>
example edit this line add staff
PHP Code:
echo("<tr><td>Option for: </td><td align='left'><select name='cppanel'><option value='Ownerpanel'>Sys.Owner</option><option value='Teampanel'>Teamleaders</option><option value='Sysoppanel'>Sysop</option><option value='Adminpanel'>Admins</option><option value='modpanel'>Moderators</option></select></select><input type='hidden' name='add' value='true'/></td></tr>");
example shoutbox.php
PHP Code:
{ print("<table border=0 cellspacing=0 cellpadding=2 width='100%' align='left' class='small'>\n");
while ($arr = mysql_fetch_array($res)) { $res2 = mysql_query("SELECT username,class,donor, title,enabled,warned FROM users WHERE id=$arr[userid]") or sqlerr(__FILE__, __LINE__); $arr2 = mysql_fetch_array($res2); $resowner = mysql_query("SELECT id, username, class FROM users WHERE id=$arr[userid]") or print(mysql_error()); $rowowner = mysql_fetch_array($resowner); if ($rowowner["class"] == "96") $usercolor= "<font color=#FF0000>" .htmlspecialchars($rowowner["username"]). "</font>"; // OWNER ID96 elseif ($rowowner["class"] == "85") $usercolor= "<font color=#F5085F>" .htmlspecialchars($rowowner["username"]). "</font>"; // TEAMLEADER ID85 elseif ($rowowner["class"] == "75") $usercolor= "<font color=#0000FF>" .htmlspecialchars($rowowner["username"]). "</font>"; // SYSOP ID75 elseif ($rowowner["class"] == "70") $usercolor= "<font color=#F88017>" .htmlspecialchars($rowowner["username"]). "</font>"; // ADMINISTRATOR ID70 elseif ($rowowner["class"] == "64") $usercolor= "<font color=#FFFF00>" .htmlspecialchars($rowowner["username"]). "</font>"; // MODERATOR ID64 elseif ($rowowner["class"] == "56") $usercolor= "<font color=#778899>" .htmlspecialchars($rowowner["username"]). "</font>"; // SYSTEMBOT ID56 elseif ($rowowner["class"] == "50") $usercolor= "<font color=#778899>" .htmlspecialchars($rowowner["username"]). "</font>"; // FORUMSBOT ID50 elseif ($rowowner["class"] == "48") $usercolor= "<font color=#696969>" .htmlspecialchars($rowowner["username"]). "</font>"; // UPLOADER ID48 elseif ($rowowner["class"] == "32") $usercolor= "<font color=#B29800>" .htmlspecialchars($rowowner["username"]). "</font>"; // VIP ID32 elseif ($rowowner["class"] == "28") $usercolor= "<font color=#8E35EF>" .htmlspecialchars($rowowner["username"]). "</font>"; // COMSTAFF ID28 elseif ($rowowner["class"] == "16") $usercolor= "<font color=#00FFFF>" .htmlspecialchars($rowowner["username"]). "</font>"; // POWER_USER ID16 elseif ($rowowner["class"] == "0") $usercolor= "<font color=#ffffff>" .htmlspecialchars($rowowner["username"]). "</font>"; // USER ID0
if (get_user_class() >= UC_MODERATOR) { $del="<span class='date'><a href=shoutbox.php?del=".$arr[id]."><img src=".$pic_base_url."button_delete.png border=0></a></span>\n"; $edit="<span class='date'><a href=shoutbox.php?edit=".$arr[id]."><img src=".$pic_base_url."button_edit.png border=0></a></span>\n"; }
$pm = "<span class='date'><a target=_blank href=sendmessage.php?receiver=$arr[userid]><img src=".$pic_base_url."mail.png border=0></a></span>\n"; print("<tr><td>\n<span class='date'>[".strftime("%d.%m %H:%M",$arr["date"])."]</span>\$del $edit $pm <a target=_blank href='userdetails.php?id=".$arr["userid"]."' target='_blank'>$usercolor</a>\n" . ($arr2["donor"] == "yes" ? "<img src=pic/star.gif alt='DONOR'>\n" : "") . ($arr2["warned"] == "yes" ? "<img src="."pic/warned.gif alt='Warned'>\n" : "") . ($arr2["class"] == "96" ? "<img src="."pic/class/owner.gif alt='OWNER'>" : "") . ($arr2["class"] == "85" ? "<img src="."pic/class/leader.gif alt='TEAMLEADER'>" : "") . ($arr2["class"] == "75" ? "<img src="."pic/class/sysop.gif alt='SYSOP'>" : "") . ($arr2["class"] == "70" ? "<img src="."pic/class/admin.gif alt='ADMIN'>" : "") . ($arr2["class"] == "64" ? "<img src="."pic/class/mod.gif alt='MODERATOR'>" : "") . ($arr2["class"] == "56" ? "<img src="."pic/class/coder.gif alt='SYSTEMBOT'>" : "") . ($arr2["class"] == "50" ? "<img src="."pic/class/coder.gif alt='FORUMSBOT'>" : "") . ($arr2["class"] == "48" ? "<img src="."pic/class/uploader.gif alt='UPLOADER'>" : "") . ($arr2["class"] == "32" ? "<img src="."pic/class/vip.gif alt='VIP'>" : "") . ($arr2["class"] == "28" ? "<img src="."pic/class/user.gif alt='COMSTAFF'>" : "") . ($arr2["class"] == "16" ? "<img src="."pic/class/power.gif alt='POWER_USER'>" : "") . ($arr2["class"] == "0" ? "<img src="."pic/class/user.gif alt='USER'>" : "") . " ".format_comment($arr["text"])."\n</td></tr>\n"); } print("</table>"); }
example staffmass.php
PHP Code:
<?php require "include/bittorrent.php"; dbconn(false); loggedinorreturn();
stdhead("Mass Message", false); ?> <table class=main width=750 border=0 cellspacing=0 cellpadding=0><tr><td class=embedded> <div align=center> <h1>Mass Message to all Staff members and users:</a></h1> <form method=post action=takestaffmess.php> <?
if ($_GET["returnto"] || $_SERVER["HTTP_REFERER"]) { ?> <input type=hidden name=returnto value=<?=$_GET["returnto"] ? $_GET["returnto"] : $_SERVER["HTTP_REFERER"]?>> <? } ?> <table cellspacing=0 cellpadding=5> <tr> <td>Send to:<br> <table style="border: 0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="0"> </td> <td style="border: 0">User</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="1"> </td> <td style="border: 0">ForumsBOT</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="2"> </td> <td style="border: 0">SystemBOT</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="3"> </td> <td style="border: 0">Power User</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="4"> </td> <td style="border: 0">Com Staff</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="5"> </td> <td style="border: 0">VIP</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="6"> </td> <td style="border: 0">Uploader</td> </tr> <tr> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="7"> </td> <td style="border: 0">Moderator</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="8"> </td> <td style="border: 0">Administrator</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="9"> </td> <td style="border: 0">sysop</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="10"> </td> <td style="border: 0">Teamleade</td> <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="11"> </td> <td style="border: 0">Owner</td> <td style="border: 0"> </td> <td style="border: 0"> </td> </tr> </table> </td> </tr> <TD colspan="2">Subject: <INPUT name="subject" type="text" size="76"></TD> </TR> <tr><td><textarea name=msg cols=80 rows=15><?=$body?></textarea></td></tr> <tr> <td colspan=2><div align="center"><b>Sender: </b> <?=$CURUSER['username']?> <input name="sender" type="radio" value="self" checked> System <input name="sender" type="radio" value="system"> </div></td></tr> <tr><td colspan=2 align=center><input type=submit value="Send!" class=btn></td></tr> </table> <input type=hidden name=receiver value=<?=$receiver?>> </form>
</div></td></tr></table> <br/> NOTA: Do not use BB codes. (NO HTML) <? stdfoot(); ?>
example index.php
PHP Code:
?>
<center> <font class="small" color="#FF0000">OWNER</font> <FONT COLOR=YELLOW><B>|</B></FONT>
<font class="small" color="#F5085F">TEAMLEADER</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#0000FF">SYSOP</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#F88017">ADMINISTRATOR</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#FFFF00">MODERATOR</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#696969">UPLOADER</font> <FONT COLOR=YELLOW><B>|</B></FONT>
<font class="small" color="#778899">FORUMSBOT</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#778899">SYSTEMBOT</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#B29800">VIP</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#8E35EF">COMSTAFF</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#00FFFF">POWER USER</font> <FONT COLOR=YELLOW><B>|</B></FONT> <font class="small" color="#ffffff">USER</font>
<? echo "<br/><font class=\"small\">Welcome to our newest member <b>$latestuser</b>!</font></center>\n"; // -------------------------------
?> <?
// ---- online users if($CURUSER) { $f_sql = 'SELECT friendid FROM friends WHERE userid='.$CURUSER['id']; $f_res = mysql_query($f_sql); while($farr = mysql_fetch_object($f_res)) { $friends[] = $farr->friendid; } } $dt = gmtime() - 300; $dt = sqlesc(get_date_time($dt)); $numberactive = number_format(get_row_count("users", "WHERE last_access >=$dt")); $res = mysql_query("SELECT id, username, class, warned, donor FROM users WHERE last_access >=$dt ORDER BY class DESC") or print(mysql_error()); while ($arr = mysql_fetch_assoc($res)) { if ($activeusers) $activeusers .= ",\n"; switch ($arr["class"]) { case UC_OWNER: $arr["username"] = "<font color=#FF0000>" . $arr["username"] . "</font>" ; // OWNER ID96 break; case UC_TEAMLEADER: $arr["username"] = "<font color=#F5085F>" . $arr["username"] . "</font>" ; // TEAMLEADER ID85 break; case UC_SYSOP: $arr["username"] = "<font color=#0000FF>" . $arr["username"] . "</font>" ; // SYSOP ID75 break; case UC_ADMINISTRATOR: $arr["username"] = "<font color=#F88017>" . $arr["username"] . "</font>" ; // ADMINISTRATOR ID70 break; case UC_MODERATOR: $arr["username"] = "<font color=#FFFF00>" . $arr["username"] . "</font>" ; // MODERATOR ID64 break; case UC_SYSTEMBOT: $arr["username"] = "<font color=#778899>" . $arr["username"] . "</font>" ; // SYSTEMBOT ID56 break; case UC_FORUMSBOT: $arr["username"] = "<font color=#778899>" . $arr["username"] . "</font>" ; // FORUMSBOT ID50 break; case UC_UPLOADER: $arr["username"] = "<font color=#696969>" . $arr["username"] . "</font>" ; // UPLOADER ID48 break; case UC_VIP: $arr["username"] = "<font color=#B29800>" . $arr["username"] . "</font>" ; // VIP ID32 break; case UC_COMSTAFF: $arr["username"] = "<font color=#8E35EF>" . $arr["username"] . "</font>" ; // COMSTAFF ID28 break; case UC_POWER_USER: $arr["username"] = "<font color=#00FFFF>" . $arr["username"] . "</font>" ; // POWER_USER ID16 break; case UC_USER: $arr["username"] = "<font color=#ffffff" . $arr["username"] . "</font>" ; // USER ID0 break; }
if(@in_array($arr['id'],$friends)) $arr["username"] = "<font color=#4040CO>" . $arr["username"] . "<img src=shoutbox/images/friend.jpg alt='Friend'>" . "</font>";
if ($arr["donor"] == "yes") $star = "<img src=\"shoutbox/images/star.gif\" alt=\"Donated\"/>"; else $star = "";
if ($arr["warned"] == "yes") $warn = "<img src=\"shoutbox/images/warned.gif\" alt=\"Warned\"/>"; else $warn = "";
$donator = $arr["donated"] > 0;
if ($donator) $activeusers .= ""; $activeusers .= "" . $arr["username"] . $star . $warn . ""; if ($donator) $activeusers .= "";
} if (!$activeusers) $activeusers = "There have been no active users in the last 15 minutes.";
?> <? begin_frame("<font color=lime >Users Online (".$numberactive.")",false,5) ?>
<? begin_table(true); echo "<tr><td class=\"colhead\">"; echo $activeusers; echo "</td></tr>"; end_table(); ?> <? end_frame (); // ------------------------------- ?>
<? // // - Theme And Language Updated 11.Nov.2007 //
$resew = mysql_query("SELECT id, username, class, donor, warned FROM users WHERE UNIX_TIMESTAMP(" . get_dt_num() . ") - UNIX_TIMESTAMP(last_access) < 86400 ORDER BY username"); while ($arr = mysql_fetch_assoc($resew)) { if ($todayactive) $todayactive .= ", "; switch ($arr["class"]) { case UC_OWNER: $arr["username"] = "<font color=#FF0000>" . $arr["username"] . "</font>" ; // OWNER ID96 break; case UC_TEAMLEADER: $arr["username"] = "<font color=#F5085F>" . $arr["username"] . "</font>" ; // TEAMLEADER ID85 break; case UC_SYSOP: $arr["username"] = "<font color=#0000FF>" . $arr["username"] . "</font>" ; // SYSOP ID75 break; case UC_ADMINISTRATOR: $arr["username"] = "<font color=#F88017>" . $arr["username"] . "</font>" ; // ADMINISTRATOR ID70 break; case UC_MODERATOR: $arr["username"] = "<font color=#FFFF00>" . $arr["username"] . "</font>" ; // MODERATOR ID64 break; case UC_SYSTEMBOT: $arr["username"] = "<font color=#778899>" . $arr["username"] . "</font>" ; // SYSTEMBOT ID56 break; case UC_FORUMSBOT: $arr["username"] = "<font color=#778899>" . $arr["username"] . "</font>" ; // FORUMSBOT ID50 break; case UC_UPLOADER: $arr["username"] = "<font color=#696969>" . $arr["username"] . "</font>" ; // UPLOADER ID48 break; case UC_VIP: $arr["username"] = "<font color=#B29800>" . $arr["username"] . "</font>" ; // VIP ID32 break; case UC_COMSTAFF: $arr["username"] = "<font color=#8E35EF>" . $arr["username"] . "</font>" ; // COMSTAFF ID28 break; case UC_POWER_USER: $arr["username"] = "<font color=#00FFFF>" . $arr["username"] . "</font>" ; // POWER_USER ID16 break; case UC_USER: $arr["username"] = "<font color=#ffffff" . $arr["username"] . "</font>" ; // USER ID0 break; } if ($CURUSER) { $todayactive .= "<a href=userdetails.php?id=" . $arr["id"] . ">" . $arr["username"] . "</a></a>"; } else { $todayactive .= "<a href=userdetails.php?id=" . $arr["id"] . ">" . $arr["username"] . "</a></a>"; } $donator = $arr["donor"] == "yes"; if ($donator) { $todayactive .= "<img src=\"shoutbox/images/star.gif\">";
$warned = $arr["warned"] == "yes"; if ($warned) { $todayactive .= "<img src=\"shoutbox/images/warned.gif\">"; }
$usersactivetoday++; } //end visited today
begin_frame("<font color=lime >Visitors in last 24 hours", center);
if ($CURUSER)
{
echo "<center><div align='left'>" . $todayactive . "</div></center>";
end_frame(); }
Last edited by wMan; 19th June 2011 at 16:05.
|