REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help
#1
Can anyone check this code if it's secure just in case Wink
PHP Code:
<?php
/**
* Author: *****
* Copyright: Ã‚© 2010 *******
* Website: ****************
* License: *******************
**/
define("IN_MYBB"1);
require_once 
"./global.php";
add_breadcrumb("Warned List");
$lang->error "Warned List";
$title "Warned List";
if(
$mybb->user['uid']=='' || $mybb->user['usergroup']=='1')
{
error_no_permission();
}
$message '<table border="0" cellspacing="1" cellpadding="3" class="tborder">';
$message .= '<tr>
<td class="tcat"><span class="smalltext"><strong>Warned User</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>Warning Note/Points</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>Issued By</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>Issued For</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>Issued On</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>Expired</strong></span></td>
</tr>'
;
$warnlist $db->query("SELECT * FROM `".TABLE_PREFIX."warnings` ORDER BY `dateline` DESC");
  while(
$warn $db->fetch_array($warnlist)){

$uid $warn['uid'];
$usern get_user($uid);
$username format_name($usern['username'],$usern['usergroup'],$usern['displaygroup']);
$warnuser "<a href=member.php?action=profile&uid=".$uid.">{$username}</a>";

$warning $warn['notes'];

$points $warn['points'];

$isby1 $warn['issuedby'];
$warnuid get_user($isby1);
$isby format_name($warnuid['username'],$warnuid['usergroup'],$warnuid['displaygroup']);

$isfor1 $warn['pid'];
$isfor2 $warn['tid'];
$isfor3 $warn['title'];
$isfor "<a href='showthread.php?tid=".$isfor2."&pid=".$isfor1."'>".$isfor3."</a>";

$ison1 my_date($mybb->settings['dateformat'],$warn['dateline']);
$ison2 my_date($mybb->settings['timeformat'],$warn['dateline']);
$ison "(".$ison1.", ".$ison2.")";

$exp1 my_date($mybb->settings['dateformat'],$warn['expires']);
$exp2 my_date($mybb->settings['timeformat'],$warn['expires']);
$exp "(".$exp1.", ".$exp2.")";

    
$message .= '<tr>
<td class="trow1">'
.$warnuser.'</td>
<td class="trow2">'
.$warning.'<br/><font size="1"><div align="center" >(+'.$points.'&nbsp;Points)</div></font></td>
<td class="trow1">'
.$isby.'</td>
<td class="trow2">'
.$isfor.'</td>
<td class="trow1">'
.$ison.'</td>
<td class="trow2">'
.$exp.'</td>
</tr>'
;
  }
$message .= "</table>";
error($message,$title);
?>
[Image: userbar.png]
Reply
#2
Why did you bump this thread with useless information, its been inactive for over 3 months :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)