Ejemplo n.º 1
0
        $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";
}
//save job
if ($_POST["submitBtn"] == "Add") {
    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"];
Ejemplo n.º 2
0
<?php

session_start();
require "../database/connect.php";
require "../database/jobs.php";
$job_id = $HTTP_GET_VARS["job_id"];
loadJob($job_id);
echo "<job>";
echo "<name>" . $job_name . "</name>";
echo "<short>" . $job_short . "</short>";
echo "<start>" . $job_start . "</start>";
echo "<end>" . $job_end . "</end>";
echo "<start2>" . $job_start2 . "</start2>";
echo "<end2>" . $job_end2 . "</end2>";
echo "<hours>" . $job_hours . "</hours>";
echo "<dep_id>" . $job_parent . "</dep_id>";
echo "</job>";
require "../database/disconnect.php";
Ejemplo n.º 3
0
?>
<table width="540" bgcolor="#CDDEEE" cellpadding="0" cellspacing="1" align="center">
<?php 
for ($i = $start_time; $i <= $end_time; $i++) {
    $hour = $i;
    if ($hour > 12) {
        $hour = $hour - 12;
    }
    $minute = "00";
    if ($i == 12) {
        $minute = "pm";
    }
    echo "<tr><td width='50' align='center'><span class='hour'>" . $hour . "</span><span class='minute'>" . $minute . "</span></td>";
    for ($j = 1; $j <= 7; $j++) {
        if ($jobs[$j] > "0") {
            loadJob($jobs[$j]);
            $job_start = $job_start / 100;
            $job_end = $job_end / 100;
            $job_start2 = $job_start2 / 100;
            $job_end2 = $job_end2 / 100;
            if ($job_start == $i) {
                echo "<td width='70' class='time_cell' style='background-color:#CDEEEE;' rowspan='" . ($job_end - $job_start) . "'>";
                echo "<b>" . $job_name . "</b> " . formatTime($job_start) . " - " . formatTime($job_end);
                echo "</td>";
            }
            if ($job_start2 == $i) {
                echo "<td width='70' class='time_cell' style='background-color:#CDEEEE;' rowspan='" . ($job_end2 - $job_start2) . "'>";
                echo "<b>" . $job_name . "</b> " . formatTime($job_start2) . " - " . formatTime($job_end2);
                echo "</td>";
            }
            if ($job_start2 > $job_start) {