示例#1
0
<?php

require_once dirname(__FILE__) . '/../function/func_transport.php';
echo '<pre>';
print_r($_POST);
echo '</pre>';
$idtransport = $_GET['idtransport'];
$code_transport = $_POST['code_transport'];
$name_transport = $_POST['name_transport'];
$tel_transport = $_POST['tel_transport'];
$address_transport = $_POST['address_transport'];
//if (!checkDuplicateTranport($name_transport, $code_transport)) {
$checkEditTransport = editTransport($code_transport, $name_transport, $tel_transport, $address_transport, $idtransport);
if ($checkEditTransport) {
    header("location: ../transport.php?action=editTransportCompleted");
} else {
    header("location: ../transport.php?action=editTransportError");
}
//}
//else {
//    header("location: ../transport.php?action=editTransportDuplicateError");
//}
示例#2
0
文件: transport.php 项目: bdf2ch/auto
if (!$con1) {
    $err = oci_error($con1);
    var_dump($con1);
    print "Error code = " . $err[code];
    print "Error message = " . $err[message];
    print "Error position = " . $err[offset];
    print "SQL Statement = " . $err[sqltext];
    oci_close($con1);
    die('Не удалось подключиться к БД');
}
switch ($action) {
    case "add":
        addTransport();
        break;
    case "edit":
        editTransport();
        break;
}
function addTransport()
{
    global $con1;
    global $id;
    global $departmentId;
    global $transportTypeId;
    global $transportSubtypeId;
    global $model;
    global $gid;
    $query = "SELECT sq_request_all.nextval FROM DUAL";
    $statement = oci_parse($con1, $query);
    if (oci_execute($statement, OCI_DEFAULT)) {
        $res = oci_fetch_assoc($statement);