<? // 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 : ./KS2DAAAdd.php ( 05/24/2010 )
// Language : php
// Description : Formular, um die einem Dauerauftrag eine Kostenstelle zuzuordnen
// 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['mandant']
// _GET['prj']
//
// [[End of requests]]
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Functions]]
//
//
// function AddNewZuordnung($mandant,$bk,$prj)
// function CheckParameters()
// function jsPrepare()
//
// [[End of functions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Classes]]
//
//
// no classes were found
//
// [[End of classes]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Versions of file ./KS2DAAAdd.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=00064}
?><?php
/*********************************************************************************
* ZuordnungAdd.php
*
* Funktion :
* eine neue Zuordnung anlegen
* Parameter :
* mandant : Nummer des zugehörigen Mandanten
* bk : aktueller Buchungskreis
* prj : das zu verwendende Projekt
*
**********************************************************************************/
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 Datenbankfunktionen
?>
<script type="text/javascript" src="js/tabber.js"></script>
<link rel="stylesheet" href="js/tabber.css" TYPE="text/css" MEDIA="screen">
<link rel="stylesheet" href="js/tabber-print.css" TYPE="text/css" MEDIA="print">
<script type = "text/javascript">
<!-- hide me from older browsers
function validateForm ( ) {
var
error_string = "";
// check the text field
if ( window.document.ZuordnungAddForm.Kostenstellen.value == "NA" ) {
error_string += msgKeineKostenstelle;
}
if ( window.document.ZuordnungAddForm.Dauerauftraege.value == "NA" ) {
error_string += msgKeinDauerauftrag;
}
// -----------------------------
if ( error_string == "" ) {
return true;
} else {
error_string = msgErrors + error_string;
alert( error_string );
return false;
}
} // function validateForm
</script>
<?php
function jsPrepare() {
$msgErrors = html_entity_decode (id2msg( 8160 ));
$msgKeineKostenstelle= html_entity_decode (id2msg( 9651 ));
$msgKeinDauerauftrag = html_entity_decode (id2msg( 9652 ));
echo "<script type = 'text/javascript'>";
echo "var msgErrors='$msgErrors'; ";
echo "var msgKeineKostenstelle='$msgKeineKostenstelle'; ";
echo "var msgKeinDauerauftrag='$msgKeinDauerauftrag'; ";
echo "</script>";
} // function jsPrepare( )
// Zuordnung
function AddNewZuordnung( $mandant, $bk, $prj ) {
$msgReset = id2msg( 2754 );
$msgSaveData = id2msg( 9394 );
$msgID = id2msg( 2972 );
$msgZuordnung = id2msg( 9653 );
$msgKostenstelle = id2msg( 4027 );
$msgDauerauftrag = id2msg( 9633 );
$msgZugeordnet = id2msg( 9399 );
$msgZuDenZuordnungn = id2msg( 9395 );
$msgZuDenProjekten = id2msg( 8357 );
$msgZurProjektverwaltung = id2msg( 8358 );
// $prjTitel = hent ( ID2TitelProjekt( $mandant, $bk, $prj ) );
// $prjnr = hent ( ID2PROJNRProjekt( $mandant, $bk, $prj ) );
echo "<FORM
NAME=ZuordnungAddForm
ACTION=KS2DAAAddCheck.php
METHOD='post'
OnSubmit = 'var the_result = validateForm( ); return the_result;'
>";
echo "<div class='tabber'>";
echo "<div class='tabbertab' title='$msgZuordnung'>";
echo "<table>";
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgKostenstelle *";
echo "</TD>";
echo "<TD ALIGN='LEFT'>";
DisplaySelectKostenstelle ( $mandant, $bk, 0, "Kostenstellen");
echo "</TD>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgZugeordnet";
echo "</TD>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgDauerauftrag *";
echo "</TD>";
echo "<TD ALIGN='LEFT'>";
DisplaySelectDauerauftragUnused ( $mandant, $bk, 0, "Dauerauftraege", true);
echo "</TD>";
echo "</TR>";
echo "</table>";
echo "</div>";
echo "</div>";
echo "<INPUT TYPE='hidden' NAME='mandant' VALUE='$mandant'>";
echo "<INPUT TYPE='hidden' NAME='bk' VALUE='$bk'>";
echo "<INPUT TYPE='hidden' NAME='prj' VALUE='$prj'>";
echo "<p><INPUT TYPE='submit' VALUE='$msgSaveData'";
echo "<INPUT TYPE='reset' VALUE='$msgReset'>";
echo "<p><br><a href=KS2DAAList.php?mandant=$mandant&bk=$bk&prj=$prj>$msgZuDenZuordnungn </a> ";
echo "<a href=ProjektList.php?mandant=$mandant&bk=$bk>$msgZuDenProjekten </a> ";
echo " <a href=ProjektverwaltungStamm.php?mandant=$mandant&bk=$bk&prj=$prj> $msgZurProjektverwaltung </a> ";
// ===============================================================================
} // function AddNewZuordnung
# Mandantennummer muß Parameter sein
function CheckParameters() {
if (! isset($_GET['mandant']))
die(id2msg( 1103 ));
if (! isset($_GET['bk']))
die(id2msg( 1104 ));
if (! isset($_GET['prj']))
die(id2msg( 2562 ));
} // function CheckParameters()
jsPrepare( );
CheckParameters();
$mandant=$_GET['mandant'];
$bk=$_GET['bk'];
$prj=$_GET['prj'];
$MandName = hent( ID2NameMandant($mandant) );
$bkName = hent( ID2NameBuchungskreis($mandant,$bk) );
$prjNr = hent( ID2PROJNRProjekt( $mandant, $bk, $prj ) );
display_title( sprintf( id2msg( 9650 ), $prjNr, $bkName, $MandName ) ); // neue Zuordnung anlegen
DisplayHeader();
AddNewZuordnung( $mandant, $bk, $prj );
/* ================================================================-------------------------------- */
require_once("./functions/epilog.inc.php"); // Datei mit nachgestellten Routinen
?>