Location: PHPKode > projects > WH Community > wh_community/read_msg.php
<?php require('layout/header.php'); ?>

<div id="content_wrapper">
    <div class="content"><?php
		
		if((isset($_GET['user_id'])) && (is_numeric($_GET['user_id']))) {
		
		$id = mysql_real_escape_string($_GET['user_id']);
		$id = intval($_GET['user_id']);
	
			}else{
			
			echo '<p align="center" class="false">' . $lang['invalid_id'] . '!</p>';
			exit();
			}
		
		include('functions/bbcode.php');
		include('functions/badwords.php');
		
		echo '<table width="100%" cellpadding="5" class="maintable">
		      <tr>
		      <td><h1>' . $lang['user_messagebox'] . '</h1></td>
		      </tr>';
				
		echo '<tr><td>';
		
		include_once('functions/messagebox.php');
		
		$tweet_sql = mysql_query("SELECT * FROM messagebox WHERE msg_id2 = '" . $id . "' ORDER BY msg_id DESC LIMIT 15") OR die(mysql_error());
		$timeline='';
		
		if(intval(mysql_num_rows($tweet_sql)) == 0) {
				
		echo '<p class="false">' . $lang['no_msg_entries'] . '.</p>';
		
    		}else{
    		
    		while($row=mysql_fetch_assoc($tweet_sql)) {
    		
                $timeline.=formatTweet($row['message'],$row['date']);
    			}
    		
    		$lastTweet = '';
    		list($lastTweet) = mysql_fetch_array(mysql_query("SELECT message FROM messagebox WHERE msg_id2 = '" . $id . "' ORDER BY msg_id DESC LIMIT 1"));
    			
    		if(!$lastTweet) $lastTweet = '<p class="false">' . $lang['no_msg_entries'] . '.</p>';
    		
    		echo '<div id="twitter-container">
    		      <ul class="statuses">' . $timeline . '</ul>
    		      </div>';
    		      }
		
		echo '</td></tr>
		      </table>';
		
		echo '<div class="spacer_div">&nbsp;</div>';

		?>
    </div>
</div>

<div id="infobox_wrapper">
    <div class="infobox">
        <?php include('layout/infobox.php'); ?>
    </div>
</div>

<?php require('layout/footer.php'); ?>
Return current item: WH Community