include_once '../config/symbini.php'; include_once $serverRoot . '/classes/InventoryProjectManager.php'; header("Content-Type: text/html; charset=" . $charset); $proj = array_key_exists("proj", $_REQUEST) ? $_REQUEST["proj"] : ""; $pid = array_key_exists("pid", $_REQUEST) ? $_REQUEST["pid"] : ""; $editMode = array_key_exists("emode", $_REQUEST) ? $_REQUEST["emode"] : 0; $newProj = array_key_exists("newproj", $_REQUEST) ? 1 : 0; $projSubmit = array_key_exists("projsubmit", $_REQUEST) ? $_REQUEST["projsubmit"] : ""; $tabIndex = array_key_exists("tabindex", $_REQUEST) ? $_REQUEST["tabindex"] : 0; $statusStr = ''; $projManager = new InventoryProjectManager(); if ($pid) { $projManager->setPid($pid); } elseif ($proj) { $projManager->setProj($proj); $pid = $projManager->getPid(); } $isEditable = 0; if ($isAdmin || array_key_exists("ProjAdmin", $userRights) && in_array($pid, $userRights["ProjAdmin"])) { $isEditable = 1; } if ($isEditable && $projSubmit) { if ($projSubmit == 'Add New Project') { $pid = $projManager->addNewProject($_POST); if ($pid) { $statusStr = 'Success: Inventory Project created! To add checklists to the project, open the editing pane by ' . 'clicking on editing symbol to the far right of project name and then select the Checklist Management tab.'; } } elseif ($projSubmit == 'Submit Edits') { $projManager->submitProjEdits($_POST); } elseif ($projSubmit == 'deluid') {