<? // this section is managed by php-mgr : you may change / enhance the part with the program versions
//
// This php section is being managed by php-mgr ver 1,
// If you make changes in this section then your changes will be overwritten in later releases of this file !
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// File : ./AuflageEditCheck.php ( 05/24/2010 )
// Language : php
// Description : Modul, um die im Formular 'AuflageEdit.php' ermittelten Daten nach Validierung in der Datenbank abzuspeichern
// Project : tbvs - Das Tiefbauverwaltungssystem
// Project Site : http://tbvs.sourceforge.net/
// Project wiki : http://scratchpad.wikia.com/wiki/Tbvs
// Created by : Rainer Stötter ( hide@address.com ), 03/02/2010
// Copyright (c) : 2007 - 2010, Rainer Stötter, All rights reserved
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// License
//
// This file has been released under GNU GENERAL PUBLIC LICENSE
// (see http://www.gnu.org/licenses/gpl.html)
//
//
// * GNU General Public License (Version 3, June 2009 )
// *
// * This program is free software; you can redistribute
// * it and/or modify it under the terms of the GNU
// * General Public License as published by the Free
// * Software Foundation; either version 3 of the License,
// * or (at your option) any later version.
// *
// * This program is distributed in the hope that it will
// * be useful, but WITHOUT ANY WARRANTY; without even the
// * implied warranty of MERCHANTABILITY or FITNESS FOR A
// * PARTICULAR PURPOSE. See the GNU General Public License
// * for more details.
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Requests]]
//
//
// _POST['Auflage']
// _POST['Beachten']
// _POST['Begruendung']
// _POST['Ort']
// _POST['PLZ']
// _POST['Strasse']
// _POST['Telefax']
// _POST['Telefon']
// _POST['Veranlasser']
// _POST['Vorname']
// _POST['auflage']
// _POST['bk']
// _POST['mandant']
// _POST['prj']
//
// [[End of requests]]
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Functions]]
//
//
// function GoodParameters()
// function SaveAuflage($mandant,$bk,$prj,$auflage)
//
// [[End of functions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Classes]]
//
//
// no classes were found
//
// [[End of classes]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Versions of file ./AuflageEditCheck.php]]
//
// 02.03.2010 Rainer Stötter (tbvs-1.08006)
// Module created
// a
//
// [[End of versions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// CVS
//
// $Log:â¦$
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// here ends the section which is managed by php-mgr ver 1
//
//{TOOLVER=01,00000}{OLSTART=00494}{OLLEN=00109}
?><?php
# require_once("./functions/debug.inc.php");
/*********************************************************************************
* BuchungskreisEditCheck.php
*
* Funktion :
* Daten eines Auflages prüfen und abspeichern
* Parameter : POST
* $mandant ID des akuellen Mandanten
*
**********************************************************************************/
require_once("./functions/checkuser.inc.php"); // Login ist erforderlich
require_once("./functions/prolog.inc.php"); // Datei mit vorgestellten Routinen
require_once("./functions/debug.inc.php"); // Debugging-Funktionen
require_once("./functions/tbvs.inc.php"); // systemweite Konstanten und Funktionen
require_once("./functions/tbvs-db.inc.php"); // systemweite Datenbankfunktionen
require_once("./functions/tbvs-inout.inc.php"); // systemweite Ein- Ausgaberoutinen
function SaveAuflage( $mandant, $bk, $prj, $auflage ) {
// $auflage=NewAuflageID($mandant,$bk);
display_title( sprintf( id2msg( 8394 ), $auflage, $bk, $mandant ) );
/* Connect to a MySQL server */
$mysqli = OpenTBVSDB();
/* Send a query to the server
* mysqli::query returns an object of class mysqli_result */
$Auflage=$_POST['Auflage'];
$Begruendung=$_POST['Begruendung'];
$Beachten=$_POST['Beachten'];
$Veranlasser=$_POST['Veranlasser'];
$Vorname=$_POST['Vorname'];
$Telefon=$_POST['Telefon'];
$Telefax=$_POST['Telefax'];
$Strasse=$_POST['Strasse'];
$PLZ=$_POST['PLZ'];
$Ort=$_POST['Ort'];
$usr = activeUserName( );
$msgBuchungskreis = id2msg( 2540 );
$msgAuflage = id2msg( 8584 );
$msgRecord = id2msg( 2572 );
TransactionBegin( $mysqli );
$query = "UPDATE AUFLAGE
SET
ID_AUFLAGE = $auflage,
Auflage='$Auflage',
Begruendung='$Begruendung',
Beachten='$Beachten',
Veranlasser='$Veranlasser',
VA_Vorname='$Vorname',
VA_Telefon='$Telefon',
VA_Fax='$Telefax',
VA_Strasse='$Strasse',
VA_PLZ='$PLZ',
VA_Ort='$Ort',
REVDATE=NOW(),
REVNAME='$usr'
WHERE ID_MANDANT=$mandant AND ID_BUCHKR=$bk AND ID_Auflage=$auflage AND ID_PROJEKT=$prj
;";
// echo "<br>$query<br>";
$result = $mysqli->query( $query );
if (!$result) {
printf( id2msg( 4370 ) , "SaveAuflage() : ", $mysqli->sqlstate, $mysqli->error);
TransactionRollback( $mysqli );
} else {
echo id2msg( 2641 );
TransactionCommit( $mysqli );
}
/* Close the connection and free the memory used*/
$mysqli->close();
echo "<p><a href=AuflageShow.php?mandant=$mandant&bk=$bk&prj=$prj&auflage=$auflage>$msgRecord </a>";
echo "<a href=AuflageList.php?mandant=$mandant&bk=$bk&prj=$prj> $msgAuflage </a>";
echo "<a href=BuchungskreisList.php?mandant=$mandant> $msgBuchungskreis </a>";
} // function SaveAuflage
function GoodParameters() {
if ( (! isset($_POST['bk'])) )
die (id2msg(2560));
if ( (! isset($_POST['mandant'])) )
die (id2msg(2561));
if ( (! isset($_POST['prj'])) )
die ( id2msg( 2562 ) );
if ( (! isset($_POST['auflage'])) )
die ( id2msg( 8390 ) );
}
// ==================================================================================
// ShowAllParameters();
DisplayHeader();
GoodParameters();
$mandant=$_POST['mandant'];
$bk=$_POST['bk'];
$auflage = $_POST['auflage'];
$prj = $_POST['prj'];
SaveAuflage( $mandant, $bk, $prj, $auflage );
require_once("./functions/epilog.inc.php"); // Datei mit nachgestellten Routinen
/* ================================================================-------------------------------- */
?>