예제 #1
0
<?php

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);
예제 #2
0
<?php

include_once '../config/symbini.php';
include_once $serverRoot . '/classes/InventoryProjectManager.php';
header("Content-Type: text/html; charset=" . $charset);
$pid = $_REQUEST["pid"];
$projManager = new InventoryProjectManager();
$projManager->setPid($pid);
$isEditable = 0;
if ($isAdmin || array_key_exists("ProjAdmin", $userRights) && in_array($pid, $userRights["ProjAdmin"])) {
    $isEditable = 1;
}
?>
<div id="cltab">
	<div style="margin:10px;">
		<form name='claddform' action='index.php' method='post' onsubmit="return validateChecklistForm(this)">
			<fieldset style="padding:15px;background-color:#FFF380;">
				<legend><b>Add a Checklist</b></legend>
				<select name="clid" style="width:450px;">
					<option value="">Select Checklist to Add</option>
					<option value="">-----------------------------------------</option>
					<?php 
$addArr = $projManager->getClAddArr();
foreach ($addArr as $clid => $clName) {
    echo "<option value='" . $clid . "'>" . $clName . "</option>\n";
}
?>
				</select><br/>
				<input type="hidden" name="proj" value="<?php 
echo $pid;
?>
예제 #3
0
<?php

include_once '../config/symbini.php';
include_once $serverRoot . '/classes/InventoryProjectManager.php';
header("Content-Type: text/html; charset=" . $charset);
$pid = $_REQUEST["pid"];
$projManager = new InventoryProjectManager();
$projManager->setPid($pid);
$isEditable = 0;
if ($isAdmin || array_key_exists("ProjAdmin", $userRights) && in_array($pid, $userRights["ProjAdmin"])) {
    $isEditable = 1;
}
?>
<div id="managertab">
	<div style="font-weight:bold;margin:10px 0px">Inventory Project Managers</div>
	<ul style="margin:10px">
	<?php 
$managerArr = $projManager->getManagers();
if ($managerArr) {
    foreach ($managerArr as $uid => $userName) {
        echo '<li title="' . $uid . '">';
        echo $userName . ' <a href="index.php?tabindex=1&emode=1&projsubmit=deluid&pid=' . $pid . '&uid=' . $uid . '" title="Remove manager"><img src="../images/del.png" style="width:13px;" /></a>';
        echo '</li>';
    }
} else {
    echo '<div style="margin:15px">No managers have been assigned to this project</div>';
}
?>
	</ul>
	<fieldset style="margin-top:40px;padding:20px;">
		<legend><b>Add a New Manager</b></legend>