Example #1
0
function GetNotAPowerUserPage()
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("not_a_power_user.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    // print the output
    return $tpl->get();
}
Example #2
0
function GetNotAllowedPage($reason)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("not_allowed.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    $tpl->SetVariable("REASON", $reason);
    // print the output
    return $tpl->get();
}
function GetNoAccessToProjectPage($projectId)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("no_access_to_project.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    $projectInfos = GetProjectInfos($projectId);
    $tpl->setVariable("PROJECT_NAME", $projectInfos["Name"]);
    // print the output
    return $tpl->get();
}
Example #4
0
<?php

require_once "pear/HTML/Template/IT.php";
require_once "data_access.php";
require_once "security_utils.php";
require_once "page_blocks.php";
require_once "security.php";
require_once "not_a_power_user.php";
if (HasNoSpecificRights()) {
    die(GetNotAPowerUserPage());
}
$tpl = new HTML_Template_IT("./");
$tpl->loadTemplatefile("admin.tpl.html", true, true);
SetCommonLoginStatus($tpl);
SetAdminToolbar($tpl);
SetCommonFooter($tpl);
$projects = GetProjectsInfos();
$AtLeastOneSection = false;
// if user has rights to add files, then we show the section
if (CanUpload()) {
    $AtLeastOneSection = true;
    $tpl->setCurrentBlock("add_file_section");
    if (is_array($projects)) {
        $tpl->setCurrentBlock("add_file_project_list_section");
        foreach ($projects as $project) {
            // Assign data to the search option block
            $tpl->setCurrentBlock("add_file_project_name_section");
            $tpl->setVariable("PROJECT_ID", $project["Id"]);
            $tpl->setVariable("PROJECT_NAME", $project["Name"]);
            $tpl->parseCurrentBlock("add_file_project_name_section");
        }