Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
FluxRP CMS - Report Feature
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Moon" data-source="post: 426652" data-attributes="member: 78959"><p>Hey, I recently added a Report Players feature to the FluxRP CMS, it's not the best but I was feeling that it would be better off to add it to the website then the already added CFH system in the EMU, I'm not the most experienced when it comes to coding, so I based it on the suggestions.php, as of which you have to check the reports via the suggestions in the ASE, however that's not a major issue, just a little less convenient.</p><p>Screenshots:</p><p>--</p><p>Report Players added to the SideNav</p><p><img src="https://devbest.com/attachments/screenshot_1-png.6744/?temp_hash=6aa8b0318af907558d7d6d098095d097" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p><p>The report.php</p><p><img src="https://devbest.com/attachments/screenshot_2-png.6745/?temp_hash=6aa8b0318af907558d7d6d098095d097" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p><p>ASE/HouseKeeping</p><p><img src="https://devbest.com/attachments/screenshot_3-png.6746/?temp_hash=6aa8b0318af907558d7d6d098095d097" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p><p></p><p><span style="font-size: 22px">How to Install:</span></p><p><span style="font-size: 15px">Make a report.php file in your FluxRP Skin (Reccomended to use the 'Theme' Skin, not 100% sure about others)</span></p><p><span style="font-size: 15px">Add this code to it:</span></p><p><span style="font-size: 15px">[PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></span></p><p><span style="font-size: 15px"><html xmlns="http://www.w3.org/1999/xhtml"></span></p><p><span style="font-size: 15px"><head></span></p><p><span style="font-size: 15px"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></span></p><p><span style="font-size: 15px"><title>{hotelName}: ReportPlayers</title></span></p><p><span style="font-size: 15px"><script src="{url}/static/js/jquery-2.1.0.js"></script></span></p><p><span style="font-size: 15px"><script type="text/javascript" src="{cdnurl}/fluxweb/static/js/libs2.js"></script></span></p><p><span style="font-size: 15px"> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/visual.js"></script></span></p><p><span style="font-size: 15px"> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/libs.js"></script></span></p><p><span style="font-size: 15px"> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/common.js"></script></span></p><p><span style="font-size: 15px"> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/fullcontent.js"></script></span></p><p><span style="font-size: 15px"><link href="{url}/static/css/global.css" rel="stylesheet" type="text/css" /></span></p><p><span style="font-size: 15px"><link href="{url}/static/css/jquery.qtip.css" rel="stylesheet" type="text/css" /></span></p><p><span style="font-size: 15px"><link href="{url}/static/css/jquery.fancybox.css" rel="stylesheet" type="text/css" /></span></p><p><span style="font-size: 15px"><link rel="stylesheet" href="{url}/app/tpl/skins/Theme/styles/lightweightmepage.css" type="text/css"></span></p><p><span style="font-size: 15px"><link rel="stylesheet" href="{cdnurl}/fluxweb/static/styles/extra.css?<?php echo time(); ?>" type="text/css"></span></p><p><span style="font-size: 15px"><script type="text/javascript" src="{cdnurl}/fluxweb/static/js/lightweightmepage.js"></script></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"></head></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><body class="blue"></span></p><p><span style="font-size: 15px"><div id="style"> </span></p><p><span style="font-size: 15px"> <?php</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> ?></span></p><p><span style="font-size: 15px"> <div id="header"></span></p><p><span style="font-size: 15px"> <div id="clouds"></div></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"> <?php</span></p><p><span style="font-size: 15px"> include_once '/includes/inner.php';</span></p><p><span style="font-size: 15px"> ?></span></p><p><span style="font-size: 15px"> </div></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><?php</span></p><p><span style="font-size: 15px">include_once 'includes/sidenav.php';</span></p><p><span style="font-size: 15px">?></span></p><p><span style="font-size: 15px"> <div id="wrapper"></span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> <?php</span></p><p><span style="font-size: 15px"> include_once '/includes/column1.php';</span></p><p><span style="font-size: 15px"> ?></span></p><p><span style="font-size: 15px"><div id="rcontent"></span></p><p><span style="font-size: 15px"> <div id="site-response"></div></span></p><p><span style="font-size: 15px"> <div id="ajax-content"></span></p><p><span style="font-size: 15px"> <!-- Player Box --></span></p><p><span style="font-size: 15px"> <?php</span></p><p><span style="font-size: 15px"> $playerInfo = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE username = '".$_SESSION['user']['username']."' LIMIT 1"));</span></p><p><span style="font-size: 15px"> function hashed($password)</span></p><p><span style="font-size: 15px"> {</span></p><p><span style="font-size: 15px"> return sha1(md5($password));</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> function pinhashed($pin)</span></p><p><span style="font-size: 15px"> {</span></p><p><span style="font-size: 15px"> return substr(md5($pin), 0, 6);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> function validEmail($email) </span></p><p><span style="font-size: 15px"> { </span></p><p><span style="font-size: 15px"> return preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $email); </span></p><p><span style="font-size: 15px"> } </span></p><p><span style="font-size: 15px"> ?></span></p><p><span style="font-size: 15px"> <div id="column1" style="width:49%;float:left;display:inline-block;"></span></p><p><span style="font-size: 15px"> <div class="box blue"></span></p><p><span style="font-size: 15px"> <h1 class="header">Report Player's</h1><br></span></p><p><span style="font-size: 15px"> <br></span></p><p><span style="font-size: 15px"> <h1 class="header"> Report less serious crime's to the Police </h1></span></p><p><span style="font-size: 15px"> <?php</span></p><p><span style="font-size: 15px"> if(isset($_POST['sendReportSub'])){</span></p><p><span style="font-size: 15px"> $errors = array();</span></p><p><span style="font-size: 15px"> $failed = 0;</span></p><p><span style="font-size: 15px"> $rStrength = -1;$rHealth = -1;$rIntel = -1;$rEnergy = -1;$rHunger = -1;$rArrests = -1;$rJob = NULL;</span></p><p><span style="font-size: 15px"> $suggType = filter($_POST['type']);</span></p><p><span style="font-size: 15px"> $suggDesc = filter($_POST['briefDesc']);</span></p><p><span style="font-size: 15px"> if(isset($_POST['Strength'])){</span></p><p><span style="font-size: 15px"> $rStrength = filter($_POST['requiresS']);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if(isset($_POST['Health'])){</span></p><p><span style="font-size: 15px"> $rHealth = filter($_POST['requiresH']);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if(isset($_POST['Energy'])){</span></p><p><span style="font-size: 15px"> $rEnergy = filter($_POST['requiresE']);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if(isset($_POST['Intelligence'])){</span></p><p><span style="font-size: 15px"> $rIntel = filter($_POST['requiresI']);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if(isset($_POST['Hunger'])){</span></p><p><span style="font-size: 15px"> $rHunger = filter($_POST['requiresHun']);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if(isset($_POST['Arrests'])){</span></p><p><span style="font-size: 15px"> $rArrests = filter($_POST['requiresA']);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if(isset($_POST['Job'])){</span></p><p><span style="font-size: 15px"> $rJob = filter($_POST['requiresJ']);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($rStrength != -1){</span></p><p><span style="font-size: 15px"> if(!is_numeric($rStrength) || strlen($rStrength) < 0 || strlen($rStrength) > 3 || $rStrength > 50 || $rStrength < 0){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Strength";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($rHealth != -1){</span></p><p><span style="font-size: 15px"> if(!is_numeric($rHealth) || strlen($rHealth) < 0 || strlen($rHealth) > 3 || $rHealth > 800 || $rHealth < 0){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Health";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($rEnergy != -1){</span></p><p><span style="font-size: 15px"> if(!is_numeric($rEnergy) || strlen($rEnergy) < 0 || strlen($rEnergy) > 3 || $rEnergy > 100 || $rEnergy < 0){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Energy";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($rIntel != -1){</span></p><p><span style="font-size: 15px"> if(!is_numeric($rIntel) || strlen($rIntel) < 0 || strlen($rIntel) > 2 || $rIntel > 50 || $rIntel < 0){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Intelligence";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($rHunger != -1){</span></p><p><span style="font-size: 15px"> if(!is_numeric($rHunger) || strlen($rHunger) < 0 || strlen($rHunger) > 3 || $rHunger > 100 || $rHunger < 0){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Hunger";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($rArrests != -1){</span></p><p><span style="font-size: 15px"> if(!is_numeric($rArrests) || strlen($rArrests) < 0 || strlen($rArrests) > 3 || $rArrests > 500 || $rArrests < 0){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Arrests";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($rJob != NULL){</span></p><p><span style="font-size: 15px"> if(strlen($rJob) < 3 || strlen($rJob) > 50 || is_numeric($rJob) || strpos($rJob, '<') || strpos($rJob, '>') || strpos($rJob, '"')){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Job Title";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if($suggType != "Uncategorized" && $suggType != "Corporation" && $suggType != "Bug" && $suggType != "Games" && $suggType != "Fighting" && $suggType != "Gangs" && $suggType != "Forums" && $suggType != "Other"){</span></p><p><span style="font-size: 15px"> $errors[] = "IP Logged for trying to exploit.";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> if(strlen($suggDesc) < 15 || strlen($suggDesc) > 500 || is_numeric($suggDesc) || strpos($suggDesc, '<') || strpos($suggDesc, '>') || strpos($suggDesc, '"')){</span></p><p><span style="font-size: 15px"> $errors[] = "Invalid Brief Description";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> if(isset($errors) && is_array($errors) && !empty($errors)){</span></p><p><span style="font-size: 15px"> echo "<center><p style='color:red;'>";</span></p><p><span style="font-size: 15px"> foreach($errors as $err){</span></p><p><span style="font-size: 15px"> echo $err;</span></p><p><span style="font-size: 15px"> echo "<br>";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> echo "</center></p>";</span></p><p><span style="font-size: 15px"> $failed = 1;</span></p><p><span style="font-size: 15px"> }else{</span></p><p><span style="font-size: 15px"> mysql_query("INSERT INTO `rp_suggestions` (type, rstrength, rintel, renergy, rhealth, rarrests, rhunger, rjob, description, user_id) VALUES ('".$suggType."','".$rStrength."','".$rIntel."','".$rEnergy."','".$rHealth."','".$rArrests."','".$rHunger."','".$rJob."','".$suggDesc."', '".$_SESSION['user']['id']."')") or die(mysql_error());</span></p><p><span style="font-size: 15px"> echo "<center><p style='color:green;'>Suggestion Sent!</center></p>";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> ?></span></p><p><span style="font-size: 15px"> <form method="post" name="sendReport"></span></p><p><span style="font-size: 15px"> <center><select name="type"></span></p><p><span style="font-size: 15px"> <option value="Uncategorized" selected>Uncategorized</option></span></p><p><span style="font-size: 15px"> <option value="Corporation">Corporation</option></span></p><p><span style="font-size: 15px"> <option value="Bug">Bug/Glitch</option></span></p><p><span style="font-size: 15px"> <option value="Fighting">Weapons/Fighting</option></span></p><p><span style="font-size: 15px"> <option value="Gangs">Gang Abuse</option></span></p><p><span style="font-size: 15px"> <option value="Forums">Forums</option></span></p><p><span style="font-size: 15px"> <option value="Other">Others</option></span></p><p><span style="font-size: 15px"> </select><br><h4>Put the user's name and the offence.:</h4></center></span></p><p><span style="font-size: 15px"> <textarea style="width:90%;height:120px;" name="briefDesc" placeholder="The rule the user broke, they're user-name & evidence."><?php if($failed == 1) echo $suggDesc; ?></textarea></span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> <center><input type="submit" value="Send In" name="sendReportSub"></center></span></p><p><span style="font-size: 15px"> </form></span></p><p><span style="font-size: 15px"> </div></span></p><p><span style="font-size: 15px"> </div></span></p><p><span style="font-size: 15px"><div id="column2" style="width:49%;float:right;display:inline-block;"></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"> <div class="box green"></span></p><p><span style="font-size: 15px"> <h1 class="header">Handled Requests</h1><br></span></p><p><span style="font-size: 15px"> <?php</span></p><p><span style="font-size: 15px"> $getHandled = mysql_query("SELECT * FROM rp_suggestions WHERE Answer IS NOT NULL AND user_id = '".$_SESSION['user']['id']."'");</span></p><p><span style="font-size: 15px"> if(mysql_num_rows($getHandled) > 0){</span></p><p><span style="font-size: 15px"> while($sugg = mysql_fetch_assoc($getHandled)){</span></p><p><span style="font-size: 15px"> echo "<b>Type: </b>";</span></p><p><span style="font-size: 15px"> echo $sugg['type'];</span></p><p><span style="font-size: 15px"> echo "<br><b>Description: </b>";</span></p><p><span style="font-size: 15px"> echo $sugg['description'];</span></p><p><span style="font-size: 15px"> echo "<br><b>Staff Reply: </b>";</span></p><p><span style="font-size: 15px"> echo $sugg['Answer'];</span></p><p><span style="font-size: 15px"> echo "<br><hr><br>";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }else{</span></p><p><span style="font-size: 15px"> echo "<center> You have no handled requests </center>";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> ?></span></p><p><span style="font-size: 15px"> </div> </span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> <div class="box green"></span></p><p><span style="font-size: 15px"> <h1 class="header">Current Requests</h1><br></span></p><p><span style="font-size: 15px"> <?php</span></p><p><span style="font-size: 15px"> $getHandled = mysql_query("SELECT * FROM rp_suggestions WHERE Answer IS NULL AND user_id = '".$_SESSION['user']['id']."'");</span></p><p><span style="font-size: 15px"> if(mysql_num_rows($getHandled) > 0){</span></p><p><span style="font-size: 15px"> while($sugg = mysql_fetch_assoc($getHandled)){</span></p><p><span style="font-size: 15px"> echo "<b>Type: </b>";</span></p><p><span style="font-size: 15px"> echo $sugg['type'];</span></p><p><span style="font-size: 15px"> echo "<br><b>Description: </b>";</span></p><p><span style="font-size: 15px"> echo $sugg['description'];</span></p><p><span style="font-size: 15px"> echo "<br><br> <i>Staff are working very hard and taking serious thought to get back to you on this.<br><hr><br>";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }else{</span></p><p><span style="font-size: 15px"> echo "<center> You have no pending requests </center>";</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> ?></span></p><p><span style="font-size: 15px"> </div> </span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"></div> </span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"><input type="hidden" id="page-title" value="Home"> </div></span></p><p><span style="font-size: 15px"> </div></span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> <div class="clear"></div></span></p><p><span style="font-size: 15px"> </div></span></p><p><span style="font-size: 15px"></div></span></p><p><span style="font-size: 15px"><?php include('includes/checktheban.php'); ?></span></p><p><span style="font-size: 15px"><?php include('includes/footer.php'); ?></span></p><p><span style="font-size: 15px"></body></span></p><p><span style="font-size: 15px"></html>[/PHP]</span></p><p><span style="font-size: 15px">And yes sorry about alot of the unneccessary code, it was from the suggestions.</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">Then save that and check (Your RP Domain)/report if it comes up with the screenshot I provided earlier that bit worked.</span></p><p><span style="font-size: 15px">Now go your sidenav.php and add this here:</span></p><p><span style="font-size: 15px"><img src="https://devbest.com/attachments/screenshot_4-png.6748/?temp_hash=6aa8b0318af907558d7d6d098095d097" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">And if your sidenav 'Report Players' goes to report.php when you click on it, it should be working!</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">Thanks, sorry I'm not the most experienced at coding but I thought I would add this!</span></p><p><span style="font-size: 15px">-MoonShots</span></p></blockquote><p></p>
[QUOTE="Moon, post: 426652, member: 78959"] Hey, I recently added a Report Players feature to the FluxRP CMS, it's not the best but I was feeling that it would be better off to add it to the website then the already added CFH system in the EMU, I'm not the most experienced when it comes to coding, so I based it on the suggestions.php, as of which you have to check the reports via the suggestions in the ASE, however that's not a major issue, just a little less convenient. Screenshots: -- Report Players added to the SideNav [IMG]https://devbest.com/attachments/screenshot_1-png.6744/?temp_hash=6aa8b0318af907558d7d6d098095d097[/IMG] The report.php [IMG]https://devbest.com/attachments/screenshot_2-png.6745/?temp_hash=6aa8b0318af907558d7d6d098095d097[/IMG] ASE/HouseKeeping [IMG]https://devbest.com/attachments/screenshot_3-png.6746/?temp_hash=6aa8b0318af907558d7d6d098095d097[/IMG] [SIZE=6]How to Install:[/SIZE] [SIZE=4]Make a report.php file in your FluxRP Skin (Reccomended to use the 'Theme' Skin, not 100% sure about others) Add this code to it: [PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>{hotelName}: ReportPlayers</title> <script src="{url}/static/js/jquery-2.1.0.js"></script> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/libs2.js"></script> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/visual.js"></script> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/libs.js"></script> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/common.js"></script> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/fullcontent.js"></script> <link href="{url}/static/css/global.css" rel="stylesheet" type="text/css" /> <link href="{url}/static/css/jquery.qtip.css" rel="stylesheet" type="text/css" /> <link href="{url}/static/css/jquery.fancybox.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="{url}/app/tpl/skins/Theme/styles/lightweightmepage.css" type="text/css"> <link rel="stylesheet" href="{cdnurl}/fluxweb/static/styles/extra.css?<?php echo time(); ?>" type="text/css"> <script type="text/javascript" src="{cdnurl}/fluxweb/static/js/lightweightmepage.js"></script> </head> <body class="blue"> <div id="style"> <?php ?> <div id="header"> <div id="clouds"></div> <?php include_once '/includes/inner.php'; ?> </div> <?php include_once 'includes/sidenav.php'; ?> <div id="wrapper"> <?php include_once '/includes/column1.php'; ?> <div id="rcontent"> <div id="site-response"></div> <div id="ajax-content"> <!-- Player Box --> <?php $playerInfo = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE username = '".$_SESSION['user']['username']."' LIMIT 1")); function hashed($password) { return sha1(md5($password)); } function pinhashed($pin) { return substr(md5($pin), 0, 6); } function validEmail($email) { return preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $email); } ?> <div id="column1" style="width:49%;float:left;display:inline-block;"> <div class="box blue"> <h1 class="header">Report Player's</h1><br> <br> <h1 class="header"> Report less serious crime's to the Police </h1> <?php if(isset($_POST['sendReportSub'])){ $errors = array(); $failed = 0; $rStrength = -1;$rHealth = -1;$rIntel = -1;$rEnergy = -1;$rHunger = -1;$rArrests = -1;$rJob = NULL; $suggType = filter($_POST['type']); $suggDesc = filter($_POST['briefDesc']); if(isset($_POST['Strength'])){ $rStrength = filter($_POST['requiresS']); } if(isset($_POST['Health'])){ $rHealth = filter($_POST['requiresH']); } if(isset($_POST['Energy'])){ $rEnergy = filter($_POST['requiresE']); } if(isset($_POST['Intelligence'])){ $rIntel = filter($_POST['requiresI']); } if(isset($_POST['Hunger'])){ $rHunger = filter($_POST['requiresHun']); } if(isset($_POST['Arrests'])){ $rArrests = filter($_POST['requiresA']); } if(isset($_POST['Job'])){ $rJob = filter($_POST['requiresJ']); } if($rStrength != -1){ if(!is_numeric($rStrength) || strlen($rStrength) < 0 || strlen($rStrength) > 3 || $rStrength > 50 || $rStrength < 0){ $errors[] = "Invalid Strength"; } } if($rHealth != -1){ if(!is_numeric($rHealth) || strlen($rHealth) < 0 || strlen($rHealth) > 3 || $rHealth > 800 || $rHealth < 0){ $errors[] = "Invalid Health"; } } if($rEnergy != -1){ if(!is_numeric($rEnergy) || strlen($rEnergy) < 0 || strlen($rEnergy) > 3 || $rEnergy > 100 || $rEnergy < 0){ $errors[] = "Invalid Energy"; } } if($rIntel != -1){ if(!is_numeric($rIntel) || strlen($rIntel) < 0 || strlen($rIntel) > 2 || $rIntel > 50 || $rIntel < 0){ $errors[] = "Invalid Intelligence"; } } if($rHunger != -1){ if(!is_numeric($rHunger) || strlen($rHunger) < 0 || strlen($rHunger) > 3 || $rHunger > 100 || $rHunger < 0){ $errors[] = "Invalid Hunger"; } } if($rArrests != -1){ if(!is_numeric($rArrests) || strlen($rArrests) < 0 || strlen($rArrests) > 3 || $rArrests > 500 || $rArrests < 0){ $errors[] = "Invalid Arrests"; } } if($rJob != NULL){ if(strlen($rJob) < 3 || strlen($rJob) > 50 || is_numeric($rJob) || strpos($rJob, '<') || strpos($rJob, '>') || strpos($rJob, '"')){ $errors[] = "Invalid Job Title"; } } if($suggType != "Uncategorized" && $suggType != "Corporation" && $suggType != "Bug" && $suggType != "Games" && $suggType != "Fighting" && $suggType != "Gangs" && $suggType != "Forums" && $suggType != "Other"){ $errors[] = "IP Logged for trying to exploit."; } if(strlen($suggDesc) < 15 || strlen($suggDesc) > 500 || is_numeric($suggDesc) || strpos($suggDesc, '<') || strpos($suggDesc, '>') || strpos($suggDesc, '"')){ $errors[] = "Invalid Brief Description"; } if(isset($errors) && is_array($errors) && !empty($errors)){ echo "<center><p style='color:red;'>"; foreach($errors as $err){ echo $err; echo "<br>"; } echo "</center></p>"; $failed = 1; }else{ mysql_query("INSERT INTO `rp_suggestions` (type, rstrength, rintel, renergy, rhealth, rarrests, rhunger, rjob, description, user_id) VALUES ('".$suggType."','".$rStrength."','".$rIntel."','".$rEnergy."','".$rHealth."','".$rArrests."','".$rHunger."','".$rJob."','".$suggDesc."', '".$_SESSION['user']['id']."')") or die(mysql_error()); echo "<center><p style='color:green;'>Suggestion Sent!</center></p>"; } } ?> <form method="post" name="sendReport"> <center><select name="type"> <option value="Uncategorized" selected>Uncategorized</option> <option value="Corporation">Corporation</option> <option value="Bug">Bug/Glitch</option> <option value="Fighting">Weapons/Fighting</option> <option value="Gangs">Gang Abuse</option> <option value="Forums">Forums</option> <option value="Other">Others</option> </select><br><h4>Put the user's name and the offence.:</h4></center> <textarea style="width:90%;height:120px;" name="briefDesc" placeholder="The rule the user broke, they're user-name & evidence."><?php if($failed == 1) echo $suggDesc; ?></textarea> <center><input type="submit" value="Send In" name="sendReportSub"></center> </form> </div> </div> <div id="column2" style="width:49%;float:right;display:inline-block;"> <div class="box green"> <h1 class="header">Handled Requests</h1><br> <?php $getHandled = mysql_query("SELECT * FROM rp_suggestions WHERE Answer IS NOT NULL AND user_id = '".$_SESSION['user']['id']."'"); if(mysql_num_rows($getHandled) > 0){ while($sugg = mysql_fetch_assoc($getHandled)){ echo "<b>Type: </b>"; echo $sugg['type']; echo "<br><b>Description: </b>"; echo $sugg['description']; echo "<br><b>Staff Reply: </b>"; echo $sugg['Answer']; echo "<br><hr><br>"; } }else{ echo "<center> You have no handled requests </center>"; } ?> </div> <div class="box green"> <h1 class="header">Current Requests</h1><br> <?php $getHandled = mysql_query("SELECT * FROM rp_suggestions WHERE Answer IS NULL AND user_id = '".$_SESSION['user']['id']."'"); if(mysql_num_rows($getHandled) > 0){ while($sugg = mysql_fetch_assoc($getHandled)){ echo "<b>Type: </b>"; echo $sugg['type']; echo "<br><b>Description: </b>"; echo $sugg['description']; echo "<br><br> <i>Staff are working very hard and taking serious thought to get back to you on this.<br><hr><br>"; } }else{ echo "<center> You have no pending requests </center>"; } ?> </div> </div> <input type="hidden" id="page-title" value="Home"> </div> </div> <div class="clear"></div> </div> </div> <?php include('includes/checktheban.php'); ?> <?php include('includes/footer.php'); ?> </body> </html>[/PHP] And yes sorry about alot of the unneccessary code, it was from the suggestions. Then save that and check (Your RP Domain)/report if it comes up with the screenshot I provided earlier that bit worked. Now go your sidenav.php and add this here: [IMG]https://devbest.com/attachments/screenshot_4-png.6748/?temp_hash=6aa8b0318af907558d7d6d098095d097[/IMG] And if your sidenav 'Report Players' goes to report.php when you click on it, it should be working! Thanks, sorry I'm not the most experienced at coding but I thought I would add this! -MoonShots[/SIZE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
FluxRP CMS - Report Feature
Top