?>
<div style="display:table; border-collapse:collapse; width:100%;">
<div style="display:table-row">
<section style="width:20%">







<!-- This is where the profile picture is loaded -->
<div>
	<?php 
$dbh = ConnectDB();
$photo_id = GetProfilePic($dbh, $_SESSION['username']);
if ($photo_id != 0) {
    $pic = GetPic($dbh, $photo_id);
    echo '<img src="' . $pic . '"
				 alt="Failed to load image"
				style="width:auto;height:auto;
				max-width:200px;max-height:200px;"/>
				<br />';
} else {
    echo '<img src="/~mclaug67/Images/johnfreeman.png"
				alt="Failed to load image"
				style="width:auto;height:auto;
					max-width:200px;max-height:200px;"/>
				<br />';
}
echo "<em>" . $_SESSION['username'] . "</em>";
Esempio n. 2
0
    }
    if (preg_match("/\\.png\$/i", $picture)) {
        $type = "png";
    } else {
        if (preg_match("/\\.gif\$/i", $picture)) {
            $type = "gif";
        } else {
            if (preg_match("/\\.jpg\$/i", $picture)) {
                $type = "jpg";
            } else {
                $fp = fopen("icons/Error.png", 'rb');
                fpassthru($fp);
                return 1;
            }
        }
    }
    header("Content-type: image/" . $type);
    $opts = array();
    $opts['.silent'] = 1;
    $opts['picture'] = $picture;
    nfsend_query("@get-anypicture", $opts, 1);
    nfsend_disconnect();
    unset($_SESSION['nfsend']);
    CloseLogFile();
}
// End of GetAnyPic
if (array_key_exists('profileswitch', $_GET)) {
    GetProfilePic();
} else {
    GetAnyPic();
}
                </td>
        </tr>
        <tr>
                <td>
        	        <div style="text-align:center">
	                <strong>Other Users</strong>
                	</div>
                	<br />
                </td>
        </tr>

	<?php 
$dbh = ConnectDB();
$userdata = GetUsers($dbh);
foreach ($userdata as $thisone) {
    $photo_id = GetProfilePic($dbh, $thisone->username);
    if ($photo_id != 0) {
        $pic = GetPic($dbh, $photo_id);
        echo '<tr><td><img src="' . $pic . '
			" alt="" style="width:auto;height:auto;
			max-width:20px;max-height:20px;"/>
			&nbsp;<a href="./show_pix.php?username='******'">' . $thisone->username . '</a></td></tr>';
    } else {
        echo '<tr><td><img src="/~mclaug67/Images/johnfreeman.png"
			alt="" style="width:auto;height:auto;
			max-width:20px;max-height:20px;"/>
			&nbsp;<a href="./show_pix.php?username='******'">' . $thisone->username . '</a></td></tr>';
    }
}
?>
</table>