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();
}
Esempio n. 2
0
$footer_info = Option::get('footer_info');
if ($res['hide'] == 'y' || !function_exists('displaySort') || !function_exists('displayRecord')) {
    emMsg('不存在的页面!');
}
emLoadJQuery();
include View::getView('header');
$log_content = '<h3><input type="radio" name="show_type" onclick="switchtype(this.value)" value="record" ';
if ($show_type != 'sort') {
    $log_content .= 'checked="checked" ';
}
$log_content .= '/>  <font color="#000000">按日期显示</font> <input type="radio" name="show_type" onclick="switchtype(this.value)" value="sort" ';
if ($show_type == 'sort') {
    $log_content .= 'checked="checked" ';
}
$log_content .= '/> <font color="#000000">按分类显示</font></h3>';
$show_type == 'sort' ? $log_content .= displaySort() : ($log_content .= displayRecord());
?>
<style type="text/css">
.archiver li {margin-left:1em;padding:2px;font-size:14px;color: #000000}
.archiver li span {font-size:12px;}
ol.archiver_item li {margin-left:1em;}
</style>
<script type="text/javascript">
function switchtype(type){
	window.location = '<?php 
echo BLOG_URL;
?>
?plugin=archiver&show_type=' + type;
}
jQuery(function($){
  if ($('ul.archiver').length) {
Esempio n. 3
0
            if ($studyId > 0) {
                writeHeader("Browse subject", "secure", $msg);
                echo "<h1>Browse subject:</h1>\n";
            } else {
                writeHeader("Browse study", "secure", $msg);
                echo "<h1>Browse study:</h1>\n";
            }
        }
    }
}
echo '<p><a href="' . selfURL() . '?studyId=' . $studyId . '&subjectId=' . $subjectId . '&sessionId=' . $sessionId . '&scanId=' . $scanId . '&displaySummary=1' . '">Summary (default)</a>' . "\n";
echo '&nbsp;&nbsp;&nbsp;<a href="' . selfURL() . '?studyId=' . $studyId . '&subjectId=' . $subjectId . '&sessionId=' . $sessionId . '&scanId=' . $scanId . '&displaySummary=0' . '">Full</a>' . "</p>\n";
/*echo "studyId=".$studyId."  subjectId=".$subjectId."  sessionId=".$sessionId."  scanId=".$scanId;*/
if ($scanId > 0) {
    $table = 'scans';
    $tableText = displayRecord($db, $table, "WHERE id=" . $scanId, $studyId, $subjectId, $sessionId, $scanId);
    if ($tableText != "") {
        echo $tableText;
    } else {
        echo "<p class=error>Entry not found.</p>\n";
    }
    echo '<p><a href="' . selfURL() . '?studyId=' . $studyId . '&subjectId=' . $subjectId . '&sessionId=' . $sessionId . '&displaySummary=' . $displaySummary . '">Back to scan list</a>' . "</p>\n";
} else {
    if ($sessionId > 0) {
        $table = 'scans';
        $idStr = '<a href="' . selfURL() . '?studyId=' . $studyId . '&subjectId=' . $subjectId . '&sessionId=' . $sessionId . '&displaySummary=' . $displaySummary . '&scanId=<ID>"><ID></a>';
        $sortbyStr = '<a href="' . selfURL() . '?studyId=' . $studyId . '&subjectId=' . $subjectId . '&sessionId=' . $sessionId . '&displaySummary=' . $displaySummary . '&sortDir=<DIR2>&sortBy=<ID>"><ID><DIR></a>';
        if ($sortBy == "") {
            // Default sort
            $sortBy = 'id';
        }
Esempio n. 4
0
  }
}else{
  $table = 'sessions';
  $idStr = '<a href="'.selfURL().'?sessionId=<ID>"><ID></a>';
  $tableText = displayTable($db, $table, $idStr);
  if($tableText!=""){
    echo $tableText;
  } else {
    echo "<p class=error>No entries found.</p>\n";
  }
}

echo '<p><a href="'.selfURL().'">Select new session</a>'."</p>\n";*/
if ($scanId > 0) {
    $table = 'scans';
    $tableText = displayRecord($db, $table, "WHERE id=" . $scanId);
    if ($tableText != "") {
        echo $tableText;
    } else {
        echo "<p class=error>Entry not found.</p>\n";
    }
    echo '<p><a href="' . selfURL() . '?sessionId=' . $sessionId . '">Back to scan list</a>' . "</p>\n";
} else {
    if ($sessionId > 0) {
        $table = 'scans';
        $idStr = '<a href="' . selfURL() . '?sessionId=' . $sessionId . '&scanId=<ID>"><ID></a>';
        $tableText = displayTable($db, $table, $idStr, "WHERE sessionID=" . $sessionId);
        if ($tableText != "") {
            echo $tableText;
        } else {
            echo "<p class=error>No entries found.</p>\n";