Esempio n. 1
0
function displaySettings()
{
    $tpl = new FastTemplate("templates/");
    $tpl->define(array("web_main" => "web_main.html", "web_header" => "web_header.html", "head_script" => "settings/head_script.html", "profile" => "settings/profile.html", "department" => "settings/department.html", "department_option" => "settings/department_option.html", "authority" => "settings/authority.html", "body" => "settings/body.html", "web_nav" => "web_nav.html", "web_footer" => "web_footer.html"));
    $userDAO = new UserDAO();
    $user = $userDAO->getUserByID($_SESSION["userID"]);
    //display profile
    displayProfile($user, $tpl);
    //display group
    displayGroup($user, $tpl);
    $role = $user->getRole();
    if ($role->getRoleID() == "1" || $role->getRoleID() == "2") {
        //display user
        displayUser($user, $tpl);
        desplayDepartment($user, $tpl);
        //display record
        displayRecord($user, $tpl);
        $tpl->parse("SETTINGS_AUTHORITY", "authority");
    } else {
        $tpl->assign("SETTINGS_DEPARTMENT", "");
        $tpl->assign("SETTINGS_USER", "");
        $tpl->assign("SETTINGS_RECORD", "");
        $tpl->assign("SETTINGS_AUTHORITY", "");
    }
    $tpl->assign("TITLE", "My Profile");
    $tpl->parse("WEB_HEADER", "web_header");
    $tpl->parse("HEAD_SCRIPT", "head_script");
    $tpl->parse("WEB_NAV", "web_nav");
    $tpl->parse("SETTINGS_PROFILE", "profile");
    $tpl->parse("BODY", ".body");
    $tpl->parse("WEB_FOOTER", "web_footer");
    $tpl->parse("MAIN", "web_main");
    $tpl->FastPrint();
}
require_once 'common_functions.php';
?>

<html>
<head>
    <link rel = "stylesheet" href = "./views/style.css" type="text/css">
    <link rel = "stylesheet" href = "style.css" type="text/css">
    <link rel ="shortcut icon" href="./views/Images/globe.ico">
    <title>Walk-a-blog | Profile</title>
</head>
<body>

<div id="container">

    <?php 
include 'header.php';
?>
    <div id="content">
        <div id="profile">
        <?php 
displayProfile($user, $adventures);
?>
        </div>
    </div>
    <?php 
include 'footer.php';
?>
</div>
</body>
</html>
Esempio n. 3
0
}
$docroot = $_SERVER['DOCUMENT_ROOT'];
require_once $docroot . "/config.php";
require_once $docroot . "/models/twextra_model.php";
require_once $docroot . "/controllers/twextra_controller.php";
require_once $docroot . "/banner.php";
require_once $docroot . "/header_html.php";
require_once $docroot . "/tw.lib.php";
//validate access;
validate_access_twetest();
if (isset($_REQUEST['screen_name'])) {
    $screen_name = $_REQUEST['screen_name'];
} else {
    $screen_name = $_SESSION['user'];
}
displayProfile($screen_name);
//.........................................................................................
function displayProfile($screen_name = '')
{
    //configuration parameters:
    $config_params = Config::getConfigParams();
    $css = $config_params['css'];
    $tweet_size_max = $config_params['tweet_size_max'];
    $tweet_size_max_google = $config_params['tweet_size_max_google'];
    $hostname = $config_params['hostname'];
    $doctype = $config_params['doctype'];
    $html_attribute = $config_params['html_attribute'];
    $banner = banner('', 'banner');
    //(user, banner_class)
    $footer = $config_params['footer'];
    //