コード例 #1
0
ファイル: index.php プロジェクト: jmoreno0118/Microv2
        $mensaje = 'Hubo un error al tratar de terminar la orden. Intentar nuevamente y avisar de este error a sistemas.';
        include $_SERVER['DOCUMENT_ROOT'] . '/reportes/includes/error.html.php';
        exit;
    }
    $_SESSION['ot'] = $_POST['ot'];
    header('Location: http://' . $_SERVER['HTTP_HOST'] . '/reportes/nom003/');
    exit;
}
/**************************************************************************************************/
/* Poner comentarios a una orden */
/**************************************************************************************************/
if (isset($_POST['accion']) and $_POST['accion'] == 'Comentar y Regresar Orden') {
    include $_SERVER['DOCUMENT_ROOT'] . '/reportes/includes/conectadb.inc.php';
    try {
        if (isset($_POST['comentario']) and $_POST['comentario'] !== '') {
            setObservacion($pdo, 'NOM 003', $_POST['ot'], $_POST['comentario']);
        }
        $sql = 'UPDATE estudiostbl SET
            fechafin = NULL,
            fecharevision  = NULL
            WHERE ordenidfk = :id AND nombre = "NOM 003"';
        $s = $pdo->prepare($sql);
        $s->bindValue(':id', $_POST['ot']);
        $s->execute();
    } catch (PDOException $e) {
        $mensaje = 'Hubo un error al tratar de terminar la orden. Intentar nuevamente y avisar de este error a sistemas.' . $e;
        include $_SERVER['DOCUMENT_ROOT'] . '/reportes/includes/error.html.php';
        exit;
    }
    $_SESSION['ot'] = $_POST['ot'];
    header('Location: http://' . $_SERVER['HTTP_HOST'] . '/reportes/nom003/');
コード例 #2
0
ファイル: index.php プロジェクト: jmoreno0118/Microv2
        $mensaje = 'Hubo un error al tratar de terminar la orden. Intentar nuevamente y avisar de este error a sistemas.';
        include $_SERVER['DOCUMENT_ROOT'] . '/reportes/includes/error.html.php';
        exit;
    }
    $_SESSION['ot'] = $_POST['ot'];
    header('Location: http://' . $_SERVER['HTTP_HOST'] . '/reportes/iluminacion/');
    exit;
}
/**************************************************************************************************/
/* Poner comentarios a una orden */
/**************************************************************************************************/
if (isset($_POST['accion']) and $_POST['accion'] == 'Comentar y Regresar Orden') {
    include $_SERVER['DOCUMENT_ROOT'] . '/reportes/includes/conectadb.inc.php';
    try {
        if (isset($_POST['comentario']) and $_POST['comentario'] !== '') {
            setObservacion($pdo, 'Iluminacion', $_POST['ot'], $_POST['comentario']);
        }
        $sql = 'UPDATE estudiostbl SET
            fechafin = NULL,
            fecharevision  = NULL
            WHERE ordenidfk = :id AND nombre = "Iluminacion"';
        $s = $pdo->prepare($sql);
        $s->bindValue(':id', $_POST['ot']);
        $s->execute();
    } catch (PDOException $e) {
        $mensaje = 'Hubo un error al tratar de terminar la orden. Intentar nuevamente y avisar de este error a sistemas.' . $e;
        include $_SERVER['DOCUMENT_ROOT'] . '/reportes/includes/error.html.php';
        exit;
    }
    $_SESSION['ot'] = $_POST['ot'];
    header('Location: http://' . $_SERVER['HTTP_HOST'] . '/reportes/iluminacion/');