Location: PHPKode > scripts > WH Social > wh_social/framework/api/profile.ext.php
<?php

    error_reporting(E_ALL);

    define('INCLUDE_CHECK',1);
    define('MYSQL_CHECK',1);

    require('../config.php');
    require('../mysql.php');

	if($language == 'de') {
		require('../../language/de.php');

	}elseif($language == 'en') {
		require('../../language/en.php');
		}

    if((isset($_GET['id'])) && (is_numeric($_GET['id']))) {

	$id = mysql_real_escape_string($_GET['id']);
	$id = intval($_GET['id']);

		}else{

		echo '<p class="false">' . $lang['invalid_id'] . '</p>';
		exit();
		}

    $sql = "SELECT
                members.*,
                profiles.*
            FROM
                members
            LEFT JOIN
				profiles
			ON
				members.id = profiles.id
            WHERE
                members.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>' . mysql_error();

	}else{

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

        echo '<h1 class="p_space">' . htmlentities($row['name'], ENT_QUOTES) . '&#8217;s ' . $lang['profile'] . '</h1>';

        echo '<p><strong>' . $lang['re_name'] . ':</strong> ' . htmlentities($row['name'], ENT_QUOTES) . ' ';

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

        echo '</p>
        <p><strong>' . $lang['member_id'] . ':</strong> ' . (int)$row['id'] . '</p>
        <p><strong>' . $lang['last_signin'] . ':</strong> ';

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

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

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

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

        if($row['sex']=='male') { echo 'm&auml;nnlich'; }elseif ($row['sex']=='female') { echo 'weiblich'; }else{ echo $lang['no_informations']; }

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

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

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

        if($row['showmail'] == 1) { echo '<a href="mailto:' . htmlentities($row['email'], ENT_QUOTES) . '">' . htmlentities($row['email'], ENT_QUOTES) . '</a>'; }else{ echo $lang['no_informations']; }

        echo '</p>
        <p><strong>' . $lang['date_of_register'] . ':</strong> ' . date('d.m.Y', strtotime($row['date'])) . '</p>';

        echo '<div id="pr_line">&nbsp;</div>';

        echo '<p><strong>' . $lang['homepage'] . ':</strong> ';
            if(!empty($row['homepage'])) { echo htmlentities($row['homepage'], ENT_QUOTES); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['icq'] . ':</strong> ';
            if(!empty($row['icq'])) { echo htmlentities($row['icq'], ENT_QUOTES); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['live'] . ':</strong> ';
            if(!empty($row['live'])) { echo htmlentities($row['live'], ENT_QUOTES); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['skype'] . ':</strong> ';
            if(!empty($row['skype'])) { echo htmlentities($row['skype'], ENT_QUOTES); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['facebook'] . ':</strong> ';
            if(!empty($row['facebook'])) { echo htmlentities($row['facebook'], ENT_QUOTES); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['twitter'] . ':</strong> ';
            if(!empty($row['twitter'])) { echo htmlentities($row['twitter'], ENT_QUOTES); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['google'] . ':</strong> ';
            if(!empty($row['google'])) { echo htmlentities($row['google'], ENT_QUOTES); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['about_me'] . ':</strong> ';
            if(!empty($row['about'])) { echo stripslashes(nl2br($row['about'])); }else{ echo $lang['no_informations']; }
        echo '</p>';

        echo '<p><strong>' . $lang['signature'] . ':</strong> ';
            if(!empty($row['signature'])) { echo stripslashes(nl2br($row['signature'])); }else{ echo $lang['no_informations']; }
        echo '</p>';
        }
	}
	}

?>
Return current item: WH Social