<? // 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 : ./KS2DAADel.php ( 05/24/2010 )
// Language : php
// Description : Modul, um eine vorhandene Verknüpfung von Dauerauftrag und Kostenstelle 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/27/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['bk']
// _GET['daa']
// _GET['ks']
// _GET['mandant']
// _GET['prj']
//
// [[End of requests]]
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Functions]]
//
//
// function CheckParameters()
// function DeletedZuweisungCascading($mandant,$bk,$ks,$daa)
//
// [[End of functions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Classes]]
//
//
// no classes were found
//
// [[End of classes]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Versions of file ./KS2DAADel.php]]
//
// 27.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=00487}{OLLEN=00085}
?><?php
/*********************************************************************************
* AuftragsartDel.php
*
* Funktion :
* Löschung eines Auftragsart
* 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
// Auftragsart
function DeletedZuweisungCascading( $mandant, $bk, $ks, $daa ) { // TODO : später ausarbeiten
$mysqli=OpenTBVSDB();
/* Send a query to the server */
$query = "
DELETE FROM
KOSTENSTELLE2DAUERAUFTRAG
WHERE
ID_MANDANT=$mandant AND
ID_BUCHKR=$bk AND
ID_KOSTENSTELLE = $ks AND
ID_DAUERAUFTRAG = $daa
";
// echo "<br>$query<br>";
$ret = $mysqli->query( $query);
if (!$ret) {
printf( id2msg( 4370 ) , "DeletedZuweisungCascading()", $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['ks']) )
die ( id2msg( 3731 ) );
if (! isset($_GET['daa']) )
die ( id2msg( 9641 ) );
}
CheckParameters();
$mandant=$_GET['mandant'];
$bk=$_GET['bk'];
$daa = $_GET['daa'];
$ks = $_GET['ks'];
$prj = $_GET['prj'];
$msgSuccessful = sprintf( id2msg( 9656 ) );
$msgUnsuccessful = sprintf( id2msg( 9657 ) );
$msgZurUebersicht = id2msg( 9395 );
$msgZurProjektverwaltung = id2msg( 8358 );
DisplayHeader();
display_title( sprintf( id2msg( 9658 ) ) );
$result = DeletedZuweisungCascading( $mandant, $bk, $ks, $daa );
if ($result==TRUE)
echo "<br>$msgSuccessful";
else
echo "<br>$msgUnsuccessful";
echo "<p><br><a href=KS2DAAList.php?mandant=$mandant&bk=$bk&prj=$prj>$msgZurUebersicht</a>";
if ($prj) echo " <a href=ProjektverwaltungStamm.php?mandant=$mandant&bk=$bk&prj=$prj> $msgZurProjektverwaltung </a> ";
require_once("./functions/epilog.inc.php"); // Datei mit nachgestellten Routinen
?>