Location: PHPKode > projects > WH Community > wh_community/moderator/users_report.php
<?php include('files/header.php'); ?>
<div id="content-outer">
<div id="content">

	<div id="page-heading">
		<h1><?php echo $lang_moderator['report_user']; ?></h1>
	</div>
	
	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="files/shared/side_shadowleft.jpg" width="20" height="300" alt="shadow_l"></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="files/shared/side_shadowright.jpg" width="20" height="300" alt="shadow_r"></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td><div id="content-table-inner">
			<div id="table-content">
			<p><img src="files/icons/report.png"></p>
			<p>&nbsp;</p>
			<p><?php
			
			if(is_numeric($_GET['user_id'])) {
			$user_id = mysql_real_escape_string($_GET['user_id']);
			 
			$query = "SELECT * FROM users WHERE user_id = '" . $user_id . "'";
			$result = mysql_query($query);
				
			while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
			
			$datenow = date('d.m.Y H:i');
			$senderip = $_SERVER["REMOTE_ADDR"];
			$mailto = $webmaster;
			$mailfrom = 'phpBoard Moderator';
			$subject = '' . $lang_moderator['made_a_bad'] . '';
			$message = '' . $lang_moderator['sent_on'] . ': ' . $datenow . ' | IP: ' . $senderip . '
----------------------------------------------------------------------

' . $lang_moderator['moderators_report'] . ':

User Id: ' . $row['user_id'] . '
User Name: ' . $row['user_name'] . '
User E-Mail ' . $row['user_email'] . '

----------------------------------------------------------------------
' . $lang_moderator['sendet_by'] . '
';
			
			$headers = 'From:' . $mailfrom . '';
			mail($mailto, $subject, $message, $headers);
			
			echo '<p>' . $lang_moderator['success_report'] . ' [ <a href="users.php">' . $lang_moderator['go_on'] . '</a> ]</p>';
			}
			
				}else{
				echo '<p>' . $lang_moderator['couldnot_report'] . '</p>';
				}
		
			?></p>
			</div>
		</div></td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
			
	<div class="clear"></div>
		 
	</div>

	<div class="clear">&nbsp;</div>

</div>
<div class="clear">&nbsp;</div>
</div>
<?php include('files/footer.php'); ?>
Return current item: WH Community