<? // 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 : ./ProfilPosEdit.php ( 05/24/2010 )
// Language : php
// Description : Formular, um die Daten der Zuordnung einer Leistung zu einem vorhandenen Profil 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/29/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['bk']
// _GET['mandant']
// _GET['pos']
// _GET['prof']
//
// [[End of requests]]
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Functions]]
//
//
// function CheckParameters()
// function EditProfilForm($mandant,$bk,$prof,$pos)
// function ID2Profil2Pos($mandant,$bk,$prof,$pos)
//
// [[End of functions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Classes]]
//
//
// no classes were found
//
// [[End of classes]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// [[Versions of file ./ProfilPosEdit.php]]
//
// 29.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)
// 22.07.2009 Rainer Stötter (tbvs-1.035)
// 25.07.2009 Rainer Stötter (tbvs-1.036)
// 03.03.2010 Rainer Stötter (tbvs-1.08006)
// a
//
// [[End of versions]]
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// CVS
//
// $Log:â¦$
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// here ends the section which is managed by php-mgr ver 1
//
//{TOOLVER=01,00000}{OLSTART=00491}{OLLEN=00093}
?><?php
/*********************************************************************************
* ProfilResEdit.php
*
* Funktion :
* Änderung der Daten einer einem Profil zugeordneten Resource
* Parameter : GET
* $mandant ID des akuellen Mandanten
* $bk ID vom 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
function ID2Profil2Pos($mandant, $bk, $prof, $pos) {
/* Connect to a MySQL server */
$mysqli = OpenTBVSDB();
$query = "
SELECT
*
FROM
HR_PROFIL2POS
WHERE
ID_MANDANT='$mandant' AND
ID_BUCHKR='$bk' AND
ID_PROFIL='$prof' AND ID_LEISTUNG=$pos
";
// echo "<br>$query<br>";
$posult = $mysqli->query( $query );
if (!$posult) {
printf( id2msg( 4370 ) , "ID2Profil2Pos()", $mysqli->sqlstate, $mysqli->error);
}
if ( $posult->num_rows == 0) {
die ( sprintf( id2msg( 4510 ), $mandant, $bk, $prof ) );
};
$row = $posult->fetch_object();
$posult->close();
$mysqli->close();
return $row;
} // function ID2Profil
function EditProfilForm($mandant, $bk, $prof, $pos) {
$row = GetProfil2Pos( $mandant,$bk, $prof, $pos );
$profname=ID2BezeichnerProfil( $mandant, $bk, $prof );
$schlagwort= ID2SchlagwortLeistung( $mandant, $bk, $pos );
$posnr = ID2POSNRLeistung($mandant, $bk, $pos );
$msgZuordnung = sprintf( id2msg( 4511 ), $posnr, $schlagwort, $profname );
$msgMandant = id2msg( 2590 );
$msgBuchungskreis = id2msg( 2591 );
$msgLevel = id2msg( 2661 );
$msgArbeitswert = id2msg( 4512 );
$msgVorbereitung = id2msg( 4351 );
$msgNachbereitung = id2msg( 4352 );
$msgMindestzeit = id2msg( 4353 );
$msgMaximalzeit = id2msg( 4354 );
$msgReset = id2msg( 2527 );
$msgSave = id2msg( 4513 );
$msgZuProfil = id2msg( 4514 );
echo "<h2>$msgZuordnung</h2>";
echo "<FORM
Name=ProfilEditForm
ACTION=ProfilPosEditCheck.php METHOD='post'
>";
echo "<TABLE>";
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgMandant";
echo "<TD ALIGN='LEFT'>";
echo hent( ID2NameMandant($mandant) );
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'>$msgBuchungskreis";
echo "<TD ALIGN='LEFT'>";
echo hent( ID2NameBuchungskreis($mandant, $bk) );
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'> $msgLevel";
echo "<TD ALIGN='LEFT'>";
echo "<INPUT TYPE='text' NAME='HR_LEVEL' VALUE='$row->HR_LEVEL' SIZE='9' MAXLENGTH='9'>";
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'> $msgArbeitswert";
echo "<TD ALIGN='LEFT'>";
$awStd = $row->AW_MIN / 60;
echo "<INPUT TYPE='text' NAME='AW_STD' VALUE='$awStd' SIZE='5' MAXLENGTH='5'>";
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'> $msgVorbereitung";
echo "<TD ALIGN='LEFT'>";
$stdPrep = $row->MinPrep / 60;
echo "<INPUT TYPE='text' NAME='STD_PREP' VALUE='$stdPrep' SIZE='5' MAXLENGTH='5'>";
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'> $msgNachbereitung";
echo "<TD ALIGN='LEFT'>";
$stdPost = $row->MinPost / 60;
echo "<INPUT TYPE='text' NAME='STD_POST' VALUE='$stdPost' SIZE='5' MAXLENGTH='5'>";
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'> $msgMindestzeit";
echo "<TD ALIGN='LEFT'>";
$stdMin = $row->MinMin / 60;
echo "<INPUT TYPE='text' NAME='STD_MIN' VALUE='$stdMin' SIZE='5' MAXLENGTH='5'>";
echo "<TR>";
echo "<TD ALIGN='RIGHT' VALIGN='MIDDLE'> $msgMaximalzeit";
echo "<TD ALIGN='LEFT'>";
$stdMax = $row->MinMax / 60;
echo "<INPUT TYPE='text' NAME='STD_MAX' VALUE='$stdMax' SIZE='5' MAXLENGTH='5'>";
echo "</TABLE>";
// Mandant und Buchungskreis werden zum Speichern benötigt
echo "<INPUT TYPE='hidden' NAME='mandant' VALUE='$mandant'>";
echo "<INPUT TYPE='hidden' NAME='bk' VALUE='$bk'>";
echo "<INPUT TYPE='hidden' NAME='prof' VALUE='$prof'>";
echo "<INPUT TYPE='hidden' NAME='pos' VALUE='$pos'>";
echo "<p><INPUT TYPE='submit' VALUE='$msgSave'";
echo "<INPUT TYPE='reset' VALUE='$msgReset'>";
echo "<p><br><a href=ProfilPosList.php?mandant=$mandant&bk=$bk&prof=$prof>$msgZuProfil</a>";
// ===============================================================================
} // function EditProfilForm
function CheckParameters() {
if (! isset($_GET['mandant']) )
die (id2msg( 1070 ));
if (! isset($_GET['bk']) )
die (id2msg( 1071 ));
if ( (! isset($_GET['prof'])) || (($_GET['prof'])=="") )
die (id2msg( 4371 ) );
if ( (! isset($_GET['pos'])) )
die (id2msg( 4000 ));
}
CheckParameters();
// ShowAllParameters();
$mandant=$_GET['mandant'];
$bk=$_GET['bk'];
$prof=$_GET['prof'];
$pos=$_GET['pos'];
$profname = hent( ID2BezeichnerProfil( $mandant, $bk, $prof ));
display_title( sprintf( id2msg(4515), $profname ) );
DisplayHeader();
EditProfilForm( $mandant, $bk, $prof, $pos);
require_once("./functions/epilog.inc.php"); // Datei mit nachgestellten Routinen
?>