예제 #1
0
    $primary = $_POST["MainPic"];
    $picid = 0;
    if (isset($_FILES["PicFile"])) {
        $fileinfo = $_FILES["PicFile"];
        if (CheckFileInput($fileinfo)) {
            $picid = PicFileUpload($_FILES["PicFile"]);
            if (!$picid) {
                $error_msg = "Uploaded File does not seem to be a picture.";
                goto GenerateHtml;
            }
        }
    }
    if ($_POST["IncRevision"]) {
        $userinfo = GetUserInfo($userid);
        $username = MakeFullName($userinfo);
        //MakeAbbrivatedName($userinfo);
        IncrementRevision($wid, $username);
    }
    AppendWorkOrderData($wid, $userid, $textinfo, $picid, $primary);
    $success_msg = "Data Added!";
    $wo = GetWO($wid);
    $doform = false;
    goto GenerateHtml;
}
GenerateHtml:
$stylesheet = array("../css/global.css", "../css/nav.css", "../css/wo_head.css", "../css/wo_add_data.css");
include "forms/header.php";
include "forms/nav_form.php";
include "forms/wo_display_menubar.php";
include "forms/wo_add_data_form.php";
include "forms/footer.php";
예제 #2
0
        $dgood = $d4;
    }
    if (empty($dgood)) {
        $error_msg = "Bad Date input.  Use yyyy-mm-dd or mm/dd/yy.";
        goto GenerateHtml;
    }
    $dtt = sprintf("%04d-%02d-%02d", $dgood["year"], $dgood["month"], $dgood["day"]);
    $data = ExtractValuesFromParamList($param_list);
    $date["DateNeededBy"] = $dtt;
    $error_msg = UpdateWorkOrder($wid, $data);
    if ($error_msg) {
        $doform = true;
        goto GenerateHtml;
    }
    $userinfo = GetUserInfo($userid);
    $username = MakeFullName($userinfo);
    AttachSystemNote($wid, "Workorder edited by " . $username);
    IncrementRevision($wid);
    $success_msg = "Workorder updated! The revision has been increased.";
    $wo = GetWO($wid);
    $doform = false;
    goto GenerateHtml;
}
GenerateHtml:
$stylesheet = array("../css/global.css", "../css/nav.css", "../css/wo_head.css", "../css/wo_new.css");
include "forms/header.php";
include "forms/nav_form.php";
include "forms/wo_display_menubar.php";
include "forms/wo_edit_form.php";
// !!! Change this when feature is ready.
include "forms/footer.php";