function insertIntoEdit($table, $columnValuePair, $exceptions, $primary_key, &$database, &$json_return)
{
    insertDriver($table, $columnValuePair, $exceptions, $primary_key, $database, $json_return, 'edit');
}
Beispiel #2
0
function initRoutes()
{
    $time_pre = microtime(true);
    // Populate the routes DB
    populateRoutes();
    // Select Driver
    insertDriver(0, 0);
    $time_post = microtime(true);
    $exec_time = $time_post - $time_pre;
    echo "New Schedules as Been Created: " . format_period($exec_time) . "</br>";
}
                $weekNumber = $weekNumber + 1;
            } else {
                if ($d == 0) {
                    $weekNumber = $weekNumber + 1;
                }
                $d = $d + 1;
            }
            $dx = 60 * 60 * 24 * 1;
            $dDay = getTodaysDay($d);
        }
    }
    //echo "$weekNumber $dDay $dx</br>";
    getDeliverys($weekNumber, $dDay, $dx);
}
if ($_POST['action'] == "genNew") {
    initRoutes();
}
if ($_POST['action'] == "genToday") {
    $driverArray = $_POST['driverArray'];
    insertDriver(1, $driverArray);
}
if ($_POST['action'] == "genCopy") {
    copyLastWeek();
}
if ($_POST['action'] == "changeDriver") {
    $dID = $_POST['dID'];
    $rID = $_POST['rID'];
    $query = "UPDATE routes SET \n\t\t\t\tdID ='{$dID}'\n\t\t\t\tWHERE rID='{$rID}'";
    $db->query($query);
    echo "Driver Changed!";
}