示例#1
0
    $f_count = '';
}
// section active friends menu
echo '<div id="menu_friend">
		<button class="friend_button selected_element sub_button button_left" value="active_friend">' . $friend_act . '</button>
		<button class="friend_button sub_button button_right" value="pending_friend">' . $friend_pend . ' ' . $f_count . '</button>
		<div class="clear"></div>
	</div>';
echo '<div id="friend_container">';
if ($factive->num_rows > 0) {
    while ($friend = $factive->fetch_assoc()) {
        $lf = $friend['user_name'];
        $tumb = $friend['user_tumb'];
        if ($friend['user_status'] == 1) {
            $status = "online";
            $fonline .= friends($lf, $status, $icon_path, $tumb, $usinfo, $usprivate, $remv_friend, $user['user_rank'], $setting['allow_private']);
        }
        if ($friend['user_status'] == 2) {
            $status = "away";
            $faway .= friends($lf, $status, $icon_path, $tumb, $usinfo, $usprivate, $remv_friend, $user['user_rank'], $setting['allow_private']);
        }
        if ($friend['user_status'] == 3) {
            $status = "gone";
            $fgone .= friends($lf, $status, $icon_path, $tumb, $usinfo, $usprivate, $remv_friend, $user['user_rank'], $setting['allow_private']);
        }
    }
    echo '<ul>' . $fonline . $faway . $fgone . '</ul>';
} else {
    echo '<p class="centered_element">' . $lang_friend_list_empty . '</p>';
}
echo '</div>';
示例#2
0
<?php

include 'include.php';
isAllowed();
$id = $_SESSION['profil']['id'];
$pages = friendPages($id);
if ($pages > 0) {
    if (isset($_GET['page'])) {
        $content = friends($id, $_GET['page']);
    } else {
        $content = friends($id);
    }
    $content = $content->friends;
}
getHeader();
?>


<section id="liste">
	<br/><h2>Liste des amis</h2><br/>
	<ul id="listerelation">
		<?php 
if ($pages > 0) {
    ?>
			<?php 
    foreach ($content as $k => $v) {
        ?>
				<li>
					<a href="profil.php?id=<?php 
        echo $v->id;
        ?>
示例#3
0
if (isset($_POST['send'])) {
    if (!empty($_POST['subject']) && !empty($_POST['message'])) {
        $id = $_SESSION["id"];
        sendMessage($id, $_POST['friend'], $_POST['subject'], $_POST['message']);
    } else {
        echo "<script language=\"javascript\" type=\"text/javascript\">";
        echo "alert('subject and body cannot be empty!Try again.Thank you')";
        echo "</script>";
    }
}
?>

<div class='form' style='text-align:center;' >
            <form method="POST" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" enctype="multipart/form-data">
            	<?php 
friends();
?>
<br/>
                <br/>Subject:
                <input type='text' class="tb" name='subject' maxlength='50'/><br/>
                <br/>Message:<br/>
                <textarea name='message' class="cb" rows='5' cols='60'></textarea><br/>
                <br/>
                <sbutton>
                <input type="submit" class="button" name="send" value="Send"/>
        		</sbutton>
            </form>
示例#4
0
$fgone = "";
if ($factive->num_rows > 0) {
    while ($friend = $factive->fetch_assoc()) {
        if ($friend['hunter'] == $user['user_name']) {
            $lf = $friend['target'];
        } else {
            $lf = $friend['hunter'];
        }
        $fs = $mysqli->query("SELECT user_status FROM users WHERE user_name = '{$lf}'");
        if ($fs->num_rows > 0) {
            $fstat = $fs->fetch_array(MYSQLI_BOTH);
            if ($fstat['user_status'] == 1) {
                $status = "online";
                $fonline .= friends($lf, $status, $icon_path);
            }
            if ($fstat['user_status'] == 2) {
                $status = "away";
                $faway .= friends($lf, $status, $icon_path);
            }
            if ($fstat['user_status'] == 3) {
                $status = "gone";
                $fgone .= friends($lf, $status, $icon_path);
            }
        }
    }
    echo $fonline;
    echo $faway;
    echo $fgone;
} else {
    echo "{$lang_friend_list_empty}";
}