<? // 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 : ./AuftragDel.php ( 05/24/2010 )
// Language : php
// Description : Modul, um einen vorhandenen Auftrag zu löschen
// 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 ), 02/19/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]]
//
//
// _GET['auftr']
// _GET['bk']
// _GET['mandant']
// _GET['prj']
//
// [[End of requests]]
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Functions]]
//
//
// function CheckParameters()
// function DeletedAuftragCascading($mandant,$bk,$prj,$auftr)
//
// [[End of functions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Classes]]
//
//
// no classes were found
//
// [[End of classes]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Versions of file ./AuftragDel.php]]
//
// 19.02.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=00488}{OLLEN=00048}
?><?php
/*********************************************************************************
* AuftragDel.php
*
* Funktion :
* Löschung eines Auftrag
* Parameter :
* $mandant ID des akuellen Mandanten
* $bk ID vom aktuellen Buchungskreis
**********************************************************************************/
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
// Auftrag
function DeletedAuftragCascading( $mandant, $bk, $prj, $auftr ) { // TODO : später ausarbeiten
$mysqli=OpenTBVSDB();
/* Send a query to the server */
$query = "
DELETE FROM
AUFTRAG
WHERE
ID_MANDANT=$mandant AND
ID_BUCHKR=$bk AND
ID_AUFTRAG=$auftr AND
ID_PROJEKT = $prj
";
// echo "<br>$query<br>";
$ret = $mysqli->query( $query);
if ( ! $ret ) {
printf( id2msg( 4370 ) , "DeletedAuftragCascading( )", $mysqli->sqlstate, $mysqli->error);
}
/* Close the connection and free the memory used*/
$mysqli->close();
return $ret;
} // function DeletedResource
function CheckParameters() {
if (! isset($_GET['mandant']) )
die (id2msg( 1070 ));
if (! isset($_GET['bk']) )
die (id2msg( 1071 ));
if (! isset($_GET['auftr']) )
die ( id2msg( 9240 ) );
if (! isset($_GET['prj']) )
die ( id2msg( 8371 ) );
}
CheckParameters();
$mandant=$_GET['mandant'];
$bk=$_GET['bk'];
$auftr = $_GET['auftr'];
$prj = $_GET['prj'];
$msgSuccessful = sprintf( id2msg( 9241 ), $auftr );
$msgUnsuccessful = sprintf( id2msg( 9242 ), $auftr, $bk, $mandant );
$msgZurAuftragListe = id2msg( 9224 );
DisplayHeader();
display_title( sprintf( id2msg( 9243 ), $auftr, $bk, $mandant ) );
$result = DeletedAuftragCascading( $mandant, $bk, $prj, $auftr );
if ($result==TRUE)
echo "<br>$msgSuccessful";
else
echo "<br>$msgUnsuccessful";
echo "<p><br><a href=AuftragList.php?mandant=$mandant&bk=$bk&prj=$prj>$msgZurAuftragListe</a>";
require_once("./functions/epilog.inc.php"); // Datei mit nachgestellten Routinen
?>