Esempio n. 1
0
    $title = $langfile['projectadministration'];
    $template->assign("title", $title);
    $template->assign("classes", $classes);
    $opros = $project->getProjects(1, 10000);
    $clopros = $project->getProjects(0, 10000);
    $i = 0;
    $users = $user->getAllUsers(1000000);
    if (!empty($opros)) {
        foreach ($opros as $opro) {
            $membs = $project->getProjectMembers($opro["ID"], 1000);
            $opros[$i]['members'] = $membs;
            $i = $i + 1;
        }
        $template->assign("opros", $opros);
    }
    $customers = $companyObj->getAllCompanies();
    $template->assign("customers", $customers);
    $template->assign("users", $users);
    $template->assign("clopros", $clopros);
    $template->display("adminprojects.tpl");
} elseif ($action == "addpro") {
    if (!$userpermissions["projects"]["add"]) {
        $errtxt = $langfile["nopermission"];
        $noperm = $langfile["accessdenied"];
        $template->assign("errortext", "{$errtxt}<br>{$noperm}");
        $template->display("error.tpl");
        die;
    }
    if (!$end) {
        $end = 0;
    }
Esempio n. 2
0
            array_push($messages, $msgs);
        }
        if (!empty($task)) {
            array_push($tasks, $task);
        }
        $cou = $cou + 1;
    }
}
$myClosedProjects = $project->getMyProjects($userid, 0);
// If the user is allowed to add projects, also get all users to assign to those projects
if ($userpermissions["projects"]["add"]) {
    $user = new user();
    $users = $user->getAllUsers(1000000);
    $template->assign("users", $users);
    $company = new company();
    $companies = $company->getAllCompanies();
    $template->assign("customers", $companies);
}
// by default the arrays have a level for each project, whcih contains arrays for each message/task . reduce array flattens this to have all messages/tasks of all projects in one structure
if (!empty($messages)) {
    $messages = reduceArray($messages);
}
$etasks = reduceArray($tasks);
// Create sort array for multisort by adding the daysleft value to a sort array
$sort = array();
foreach ($etasks as $etask) {
    array_push($sort, $etask["daysleft"]);
}
// Sort using array_multisort
array_multisort($sort, SORT_NUMERIC, SORT_ASC, $etasks);
// On Admin Login check for updates
Esempio n. 3
0
    }
} elseif ($action == "openpro") {
    if ($project->open($id)) {
        header("Location: admin.php?action=projects&mode=opened");
    }
} elseif ($action == "deletepro") {
    if ($project->del($id)) {
        // header("Location: admin.php?action=projects&mode=deleted");
        echo "ok";
    }
} elseif ($action == "customers") {
    $classes = array("overview" => "overview", "customer" => "active", "system" => "system", "users" => "users");
    $title = $langfile['customeradministration'];
    $template->assign("title", $title);
    $template->assign("classes", $classes);
    $allcust = $companyObj->getAllCompanies();
    // $clopros = $project->getProjects(0, 10000);
    /* $i = 0;
       $users = $user->getAllUsers(1000000);
       if (!empty($opros)) {
           foreach($opros as $opro) {
               $membs = $project->getProjectMembers($opro["ID"], 1000);
               $opros[$i]['members'] = $membs;
               $i = $i + 1;
           }
           $template->assign("opros", $opros);
       }*/
    $template->assign("allcust", $allcust);
    $template->display("admincustomers.tpl");
} elseif ($action == "addcust") {
    if (!$userpermissions["admin"]["add"]) {