Location: PHPKode > projects > tbvs > tbvs-1.1/MandEdit.php
<? // 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          : ./MandEdit.php ( 05/24/2010 )
//  Language      : php
//  Description   : Formular, um die Daten für einen vorhandenen Mandanten zu editieren 
//  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/03/2008
//  Copyright (c) : 2007 - 2008, 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['mandant']
//
//	[[End of requests]]
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  
//	[[Functions]]
//
//
//		function EditMandantForm($mandant)
//		function jsPrepare()
//
//	[[End of functions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  
//	[[Classes]]
//
//
//	no classes were found
//
//	[[End of classes]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  
//	[[Versions of file ./MandEdit.php]]
//
//	03.03.2008	Rainer Stötter (tbvs-0.93)
//			Module created
//	08.11.2008	Rainer Stötter (tbvs-1.01)
//	03.12.2008	Rainer Stötter (tbvs-1.02)
//	02.04.2009	Rainer Stötter (tbvs-1.031)
//	11.08.2009	Rainer Stötter (tbvs-1.043)
//	12.08.2009	Rainer Stötter (tbvs-1.044)
//	10.02.2010	Rainer Stötter (tbvs-1.052)
//			a
//
//	[[End of versions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  CVS
//
//  $Log:…$
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 
// here ends the section which is managed by php-mgr ver 1
//

//{TOOLVER=01,00000}{OLSTART=00486}{OLLEN=00069}
?><?php

/*********************************************************************************
* MandEdit.php
*
* Funktion :
*	&Auml;nderung der Daten eines Mandanten
* Parameter : GET
*	$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

?>

<script type = "text/javascript">
<!-- hide me from older browsers

function validateForm ( ) {
    var 
        error_string = "";

    // check the text field
    if ( window.document.MandEditForm.name.value == "" ) {
        error_string += msgKeinName;
    }

    if ( error_string == "" ) {
        return true;
    } else {
        error_string = msgErrors + error_string;
        alert( error_string );
        return false;
    }

}   // function validateForm
</script>

<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">

<?php

function jsPrepare() {

    $msgErrors = html_entity_decode  (id2msg( 8160 ));
    $msgKeinName = html_entity_decode  (id2msg( 8200 ));

    echo "<script type = 'text/javascript'>";

    echo "var msgErrors='$msgErrors'; ";
    echo "var msgKeinName='$msgKeinName'; ";

    echo "</script>";

}

function EditMandantForm($mandant) {

	$row=GetMandant($mandant);

// ==============================================================================

	$mandant=$row->ID_MANDANT;
	$name=$row->Name;
	$cmt=$row->Beschreibung;

        $msgNummer = id2msg( 1055 );
        $msgName = id2msg( 1022 );
        $msgBeschreibung = id2msg( 1023 );
        $msgStrasse = id2msg( 1024 );
        $msgPLZ = id2msg( 1025 );
        $msgOrt = id2msg( 1026 );
        $msgBankverbindung = id2msg( 1027 );
        $msgBLZ = id2msg( 1028 );       
        $msgKontonummer = id2msg( 1029 );
        $msgAenderungenUebernehmen = id2msg( 1056 );
        $msgZuruecksetzen = id2msg( 1031 );
        $msgAbbruch = id2msg( 1032 );
	
        $msgMandant = id2msg( 2200 );
        $msgAnschrift = id2msg( 8058 );


  
	    echo "<FORM Name=MandEditForm ACTION=MandEditCheck.php METHOD='get' OnSubmit='var the_result = validateForm( ); return the_result;' >";

    echo "<div class='tabber'>";
    echo "<div class='tabbertab' title='$msgMandant'>";
	
	    echo "<TABLE>";
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgNummer";
	    echo "<TD ALIGN='LEFT'>";
	    echo $mandant;
    #	echo "<INPUT TYPE='text' NAME='id_mandant' VALUE='$mandant' SIZE='20' MAXLENGTH='150'>";
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgName *";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='name' VALUE='$name' SIZE='30' MAXLENGTH='30'>";
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'> $msgBeschreibung";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='beschreibung' VALUE='$cmt' SIZE='50' MAXLENGTH='50'>";
        
//	    echo "<TR>";
	//    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>---------------";

        echo "</table>";
    echo "</div>";

    echo "<div class='tabbertab' title='$msgAnschrift'>";    

        echo "<table>";
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgStrasse";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='Strasse' VALUE='$row->Strasse' SIZE='40' MAXLENGTH='40'>";
    
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgPLZ";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='PLZ' VALUE='$row->PLZ' SIZE='7'  MAXLENGTH='7'>";
    
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgOrt";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='Ort' VALUE='$row->Ort' SIZE='35' MAXLENGTH='35'>";
        echo "</table>";
    echo "</div>";
    echo "<div class='tabbertab' title='$msgBankverbindung'>";     
        echo "<table>";
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgBankverbindung";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='Bankverbindung' VALUE='$row->Bankverbindung' SIZE='30' MAXLENGTH='30'>";
    
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgBLZ";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='BLZ' VALUE='$row->BLZ' SIZE='10' MAXLENGTH='10'>";
    
	    echo "<TR>";
	    echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgKontonummer";
	    echo "<TD ALIGN='LEFT'>";
	    echo "<INPUT TYPE='text' NAME='Kontonummer' VALUE='$row->Kontonummer' SIZE='20' MAXLENGTH='20'>";

	    echo "</TABLE>";
    echo "</div>";        

	    echo "<INPUT TYPE='hidden' NAME='mandant' VALUE='$mandant'>";
	    echo "<p><INPUT TYPE='submit' VALUE='&Auml;nderungen &uuml;bernehmen'>";
	    echo "<INPUT TYPE='reset'  VALUE=$msgZuruecksetzen>";
	    echo "<br><a href=MandList.php>$msgAbbruch </a>  ";

    echo "</div>";
    echo "</div>";

// ===============================================================================

}	// function EditMandantForm



# Mandantennummer mu&szlig; Parameter sein
if (! isset($_GET['mandant']) ) 
	die;


jsPrepare( );
# echo "post :",$_POST[‘mandant’];
$mandant=$_GET['mandant'];

$msgMandantEditieren = id2msg( 1067 );

display_title( $msgMandantEditieren );
DisplayHeader();
EditMandantForm($mandant);


require_once("./functions/epilog.inc.php");	//	Datei mit nachgestellten Routinen


?>
Return current item: tbvs