Location: PHPKode > scripts > WH Board > wh_board/profile.php
<?php require('style/layout/header.php'); ?>

    <div class="content_left">
        <ul id="breadcrumbs">
            <li><a href="index.php"><?php echo $lang['main_page']; ?></a></li>
            <li><a href="profile.php?user_id=<?php echo intval($_GET['user_id']); ?>" class="actual"><?php echo $lang['user_profile']; ?></a></li>
        </ul>
    </div>
    <div class="content_right"><form method="post" id="search" action="search.php?search">
        <input type="text" name="search" placeholder="<?php echo $lang['enter_search_term']; ?>..." class="searchfield">
        <input type="hidden" name="submit" value="<?php echo $lang['search']; ?>" alt="<?php echo $lang['search']; ?>">
        </form>
    </div>

    <div class="clear"></div>

    <div id="headline">&nbsp;</div>

    <?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>' . $lang['invalid_id'] . '!</p>';
			exit();
			}

        echo '<h1>User Profil</h1>';

        $sql = "SELECT
                    *
                FROM
                    users
                WHERE
                    user_id = " . $id;

        $result = mysql_query($sql) OR die(mysql_error());

		if(!$result) {

    	echo '<p class="false">' . $lang['user_not_exists'] . '</p>' . mysql_error();

    		}else{

    		if(intval(mysql_num_rows($result)) == 0) {

    		echo '<p class="false">' . $lang['user_not_exists'] . '</p>';

    	}else{

        echo '<img src="style/images/profiles/user_profile.png" alt="User Profil" border="0">';

    	include_once('functions/bbcode.php');
		include_once('functions/badwords.php');

        while($row = mysql_fetch_assoc($result)) {

            echo '<p class="green_headline">' . htmlentities($row['user_name'], ENT_QUOTES) . ' ';

            if($row['user_sex']=='male') { echo '&#9794;'; }elseif ($row['user_sex']=='female') { echo '&#9792;'; }

            echo '</p>
            <p><strong>User ID:</strong> ' . (int)$row['user_id'] . '</p>
            <p><strong>' . $lang['last_signin'] . ':</strong> ';

            if($row['user_status'] > 0) { echo date('d.m.Y', strtotime($row['user_status'])); }else{ echo $lang['no_signin']; }

            echo '</p>
            <p><strong>' . $lang['nummer_signin'] . ':</strong> ';

            if($row['user_visits'] > 0) { echo (int)$row['user_visits']; }else{ echo $lang['no_signin']; }

            echo '</p>
            <p><strong>' . $lang['sex'] . ':</strong> ';

            if($row['user_sex']=='male') { echo $lang['male']; }elseif ($row['user_sex']=='female') { echo $lang['female']; }else{ echo $lang['no_informations']; }

            echo '</p>
            <p><strong>' . $lang['birthday'] . ':</strong> ';

            if($row['user_bday'] > 0) { echo date('d.m.Y', strtotime($row['user_bday'])); }else{ echo $lang['no_informations']; }

            echo '</p>
            <p><strong>' . $lang['rank'] . ':</strong> ';

            if($row['user_level'] == 0) { echo 'User'; }elseif ($row['user_level'] == 1) { echo 'Administrator'; }

            echo '</p>
            <p><strong>' . $lang['email_adress']. ':</strong> ';
            
            if($row['user_showmail'] == 1) { echo '<a href="mailto:' . htmlentities($row['user_email'], ENT_QUOTES) . '">' . htmlentities($row['user_email'], ENT_QUOTES) . '</a>'; }else{ echo $lang['no_informations']; }
            
            echo '</p>
            <p><strong>' . $lang['date_of_register'] . ':</strong> ' . date('d.m.Y', strtotime($row['user_date'])) . '</p>
            <p><strong>Homepage:</strong> <a href="' . htmlentities($row['user_homepage'], ENT_QUOTES) . '" target="_blank">' . htmlentities($row['user_homepage'], ENT_QUOTES) . '</a></p>
            <p><strong>ICQ ID:</strong> ' . htmlentities($row['user_icq'], ENT_QUOTES) . '</p>
            <p><strong>Live ID:</strong> ' . htmlentities($row['user_live'], ENT_QUOTES) . '</p>
            <p><strong>Skype Name:</strong> ' . htmlentities($row['user_skype'], ENT_QUOTES) . '</p>
            <p><strong>Facebook:</strong> <a href="' . htmlentities($row['user_facebook'], ENT_QUOTES) . '" target="_blank">' . htmlentities($row['user_facebook'], ENT_QUOTES) . '</a></p>
            <p><strong>Twitter:</strong> <a href="' . htmlentities($row['user_twitter'], ENT_QUOTES) . '" target="_blank">' . htmlentities($row['user_twitter'], ENT_QUOTES) . '</a></p>
            <br>
            <p><strong><u>' . $lang['about_me'] . ':</u></strong></p>
            <p>' . bbcode(badwords(stripslashes(nl2br($row['user_about'])))) . '</p>';
            }
    	}
    	}

	?>

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