Exemplo n.º 1
0
function replaceDriver($file)
{
    $driver = getDriver();
    $lines = file_get_contents($file);
    $lines = preg_replace('|([a-zA-Z]{1}:){0,1}/xampp/|', "{$driver}:/xampp/", $lines);
    file_put_contents($file, $lines);
}
Exemplo n.º 2
0
function driver2custInfo($drvID)
{
    $user = getDriver($drvID);
    $retArr = array("ID" => $user[drvID], "Name" => $user[drvName], "Gender" => $user[drvGender]);
    return $retArr;
}
Exemplo n.º 3
0
}
if ($functionname == 'delTruckType') {
    $truckTypeID = $_POST["truckTypeID"];
    delTruckType($truckTypeID, $mysqli);
}
/*Driver*/
if ($functionname == 'setDriver') {
    $driverID = $_POST["driverID"];
    $driverCode = $_POST["driverCode"];
    $driverFirstName = $_POST["driverFirstName"];
    $driverMiddleName = $_POST["driverMiddleName"];
    $driverLastName = $_POST["driverLastName"];
    setDriver($driverID, $driverCode, $driverFirstName, $driverMiddleName, $driverLastName, $mysqli);
}
if ($functionname == 'getDriver') {
    getDriver($mysqli);
}
if ($functionname == 'getDriverByID') {
    $driverID = $_POST["driverID"];
    getDriverByID($driverID, $mysqli);
}
if ($functionname == 'delDriver') {
    $driverID = $_POST["driverID"];
    delDriver($driverID, $mysqli);
}
/*Region*/
if ($functionname == 'setRegion') {
    $regionID = $_POST["regionID"];
    $regionName = $_POST["regionName"];
    setRegion($regionID, $regionName, $mysqli);
}