Example #1
0
<?
require('header.php');
require('db.php');
require('utils.php');
$result = updateJob($_POST['jobid'],$_POST['customer'],$_POST['address'],$_POST['city'],$_POST['state'],$_POST['zip'],$_POST['product'],$_POST['producturl'],$_POST['comments'],$_POST['status']);
print("result is $result<br><br>");
if ($result == "SUCCESS")
{
	print("Job Updated.");
	print("<br><a href=showjobs.php?id=".$_POST['identifier'].">View Jobs</a>");
}
else
{
	print("Failed to Update Job.");
}
require('footer.php');
?>


Example #2
0
$job_start = "";
$job_end = "";
$job_start2 = "";
$job_end2 = "";
$job_hours = "";
$btn_text = "";
//save edit
if (isset($_POST["submitBtn"]) && $_POST["submitBtn"] == "Edit") {
    if ($_POST["split"] == "y") {
        $start_time2 = $_POST["start_time2"];
        $end_time2 = $_POST["end_time2"];
    } else {
        $start_time2 = "";
        $end_time2 = "";
    }
    updateJob($_POST["jobid"], $_POST["job_name"], $_POST["start_time"], $_POST["end_time"], $start_time2, $end_time2, $_POST["job_hours"]);
}
//edit job
if (isset($_POST["procedure"]) && $_POST["procedure"] == "Edit") {
    $jobid = $_POST["jobs"];
    $job_name;
    loadJob($jobid);
    $btn_text = "Edit";
}
//save job
if (isset($_POST["submitBtn"]) && $_POST["submitBtn"] == "Add") {
    if ($_POST["split"] == "y") {
        $start_time2 = $_POST["start_time2"];
        $end_time2 = $_POST["end_time2"];
    } else {
        $start_time2 = "";
Example #3
0
$jobShifts = loadJobShifts();
//save edit
if ($_POST["submitBtn"] == "Edit") {
    if ($_POST["split"] == "y") {
        $start_time2 = $_POST["start_time2"];
        $end_time2 = $_POST["end_time2"];
    } else {
        $start_time2 = "";
        $end_time2 = "";
    }
    if ($_POST["jobGroup"] != "") {
        $group = $_POST["jobGroup"];
    } else {
        $group = $_POST["dep_id"];
    }
    updateJob($_POST["jobid"], $_POST["job_name"], $_POST["job_short"], $_POST["start_time"], $_POST["end_time"], $start_time2, $end_time2, $_POST["job_hours"], $group);
    //update availability needed
    deleteJobAvailability($_POST["jobid"]);
    for ($i = 0; $i < count($jobShifts); $i++) {
        if (isset($_POST["shift" . $jobShifts[$i]->name])) {
            saveJobAvailable($_POST["jobid"], $jobShifts[$i]->name);
        }
    }
}
//edit job
if ($_POST["procedure"] == "Edit" && (!isset($_POST["tabID"]) || $_POST["tabID"] <= "1")) {
    $jobid = $_POST["jobs"];
    $job_name;
    loadJob($jobid);
    $btn_text = "Edit";
}
Example #4
0
include "inc/sorting.inc.php";
// Sorting functions
include "inc/jobs.inc.php";
include "inc/departments.inc.php";
include "inc/employees.inc.php";
include "inc/locations.inc.php";
$db_conn = databaseConnect();
// Connect to DB
// Functions that do NOT generate content to browser
// This is necessary to escape the 'warning headers already
switch (getCurrentAction()) {
    case "insertJob":
        addJob();
        break;
    case "updateJob":
        updateJob();
        break;
    case "deleteJob":
        deleteJob();
        break;
    case "insertDepartment":
        addDepartment();
        break;
    case "updateDepartment":
        updateDepartment();
        break;
    case "deleteDepartment":
        deleteDepartment();
        break;
    case "insertEmployee":
        addEmployee();