예제 #1
0
파일: user.php 프로젝트: highfidelity/love
//  Copyright (c) 2010, LoveMachine Inc.
//  All Rights Reserved.
//  http://www.lovemachineinc.com
require_once "class/frontend.class.php";
require_once "class/UserInfo.php";
$front = Frontend::getInstance();
if (!$front->isUserLoggedIn()) {
    $front->getUser()->askUserToAuthenticate();
}
if (isset($_GET['user'])) {
    $user = urldecode($_GET['user']);
    $userInfo = new UserInfo();
    if (strpos($user, '@')) {
        $userInfo->loadUserByUsername($user, $front->getCompany()->getid());
    } else {
        $userInfo->loadUserByNickname($user, $front->getCompany()->getid());
    }
    if (!$userInfo->getId()) {
        header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
        die("Object Not Found. Error 404");
    }
} else {
    die('No user data provided');
}
/*********************************** HTML layout begins here  *************************************/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US" >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>SendLove | User info</title>