<?php

if (isset($_POST['action']) && $_POST['action'] == 'View And Assign Forms To Project') {
    $forms = getAllForms();
    $formInputs = getAllFormInputs();
    $dropdowns = getAllDropdowns();
    $projectForms = getAllProjectForms();
    $projects = getAllProjects();
    include 'view.html.php';
    exit;
}
if (isset($_POST['action']) && $_POST['action'] == 'Assign Form To Project') {
    $formId = $_POST['id'];
    $formName = $_POST['formName'];
    $projects = getAllProjects();
    $projectForms = getAllProjectForms();
    include 'assignForm.html.php';
    exit;
}
if (isset($_GET['assignForm'])) {
    include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php';
    if (isset($_POST['assignProjects'])) {
        assignFormToProjects();
    }
    if (isset($_POST['removeProjects'])) {
        removeFormFromProjects();
    }
    header('Location: .');
    exit;
}
예제 #2
0
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $view = isset($_POST["View"]);
    $priority = isset($_POST["Priority"]);
    $status = isset($_POST["Status"]);
    $iptgroup = isset($_POST["IPTGroup"]);
    $project = intval($_POST["Project"]);
}
$IPTGroupArray = array("all");
$LeadIPTGroup = getIPTGroup($loc);
if ($LeadIPTGroup != false) {
    array_push($IPTGroupArray, $LeadIPTGroup);
}
$IPTGroups = getIPTGroups($loc);
$IPTGroupArray = array_merge($IPTGroupArray, $IPTGroups);
$Projects = getAllProjects($loc);
/*
$param_list = array(
array("FieldName" => "View", "FieldType" => "Selection", "Selection" => array("Simple", "Full")),
array("FieldName" => "Priority", "FieldType" => "Selection", "Selection" => array("High", "Normal", "Low")),
array("FieldName" => "IPT Group", "FieldType" => "Selection", "Selection" => $IPTGroupArray),
array("FieldName" => "Status", "FieldType" => "Selection", "Selection" => array("Unapproved", "Unassigned", "Assigned", "Completed", "Closed")),
);
*/
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    goto GenerateHtml;
}
// Store settings away, so not lost if user leaves the page...
$t = array("View" => $view, "Priority" => $priority, "Status" => $status, "IPTGroup" => $iptgroup, "Project" => $project);
$_SESSION["ShowListParams"] = $t;
unset($output_lines);