// --------------------------------------------------------------------
// Globale Systemwerte
//
// Diese Datei nicht ändern bei Anpassung für verschiedene Anwendungen!!
//
// Author: Peter Rüffer
// Date : 10.05.2006
// (c) 2006 by Rüffer IT/Assistenz Service, Düsseldorf
//
// --------------------------------------------------------------------
// Set PHP Systemvars
error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_time_limit(45);
// Get global vars
define ("REGISTER_GLOBALS", ini_get("register_globals") );
if ( REGISTER_GLOBALS<>"1" ) {
// Form vars
import_request_variables ( "gpc" );
// Upload file vars
foreach ($_FILES as $strUploadItem => $strUploadFile) {
if ($strUploadFile['size']>0) {
${ $strUploadItem } = $strUploadFile['tmp_name'];
${ $strUploadItem."_name" } = $strUploadFile['name'];
${ $strUploadItem."_tmp_name" } = $strUploadFile['tmp_name'];
${ $strUploadItem."_size" } = $strUploadFile['size'];
${ $strUploadItem."_type" } = $strUploadFile['type'];
${ $strUploadItem."_error" } = $strUploadFile['error'];
}
}
}
// System values
define ("PGM_INFO", "Programm: $_MAIN_Pgm $_MAIN_PgmVersion - Kernel: $_MAIN_Version (Build $_MAIN_VersionBuild Date $_MAIN_VersionDate)");
define ("FRAMEWORK", "Enterprise Framework®");
define ("NO_CHECK_ROLES", "lms lmv lmc lml lma lmr mpb mpd mpi mpm qnr rta rjo rob rdi sti sus ser xxx xaa ser zts ztk zck zvo qnr svt xpr era erq erm pip pic pir psu psc");
define ("PHP_SELF", $_SERVER["PHP_SELF"] );
// User values
define("USER_ID", $_SESSION["sus_id"] );
define("USER_FULLNAME", $_SESSION["sus_vname"]." ".$_SESSION["sus_name"] );
define("USER_CAT", $_SESSION["sus_cat"] );
define("USER_INITIALS", $_SESSION["sus_initials"] );
define("USER_CLASS", $_SESSION["sus_rights"] );
define("USER_RIGHTS", $_SESSION["sus_rights"] );
define("USER_PROFILE", $_SESSION["sus_profil"] );
// Programm klassifizieren
if ( strpos( $_MAIN_Pgm, "_edit" ) or strpos( $_MAIN_Pgm, "_load" ) or ( strpos( $_MAIN_Pgm, "_exp" ) and substr($parm, 0, 3)<>"png") )
define ("PGM_CLASS_EDIT", 1);
if ( strpos( $_MAIN_Pgm, "_edtf" ) )
define ("PGM_CLASS_EDTF", 1);
if ( strpos( $_MAIN_Pgm, "_dset" ) )
define ("PGM_CLASS_DATASET", 1);
if ( strpos( $_MAIN_Pgm, "_form" ) or strpos( $_MAIN_Pgm, "report" ) )
define ("PGM_CLASS_REPORT", 1);
if ( !defined( "PGM_CLASS_EDIT") and
!defined( "PGM_CLASS_EDTF") and
!defined( "PGM_CLASS_DATASET") and
!defined( "PGM_CLASS_REPORT") )
define ("PGM_CLASS_SPECIAL", 1);
if ( !defined( "PGM_CLASS_SPECIAL") )
define ("PGM_CLASS_SPECIAL", 0);
if ( !defined( "PGM_CLASS_EDIT") )
define ("PGM_CLASS_EDIT", 0);
if ( !defined( "PGM_CLASS_EDTF") )
define ("PGM_CLASS_EDTF", 0);
if ( !defined( "PGM_CLASS_DATASET") )
define ("PGM_CLASS_DATASET", 0);
if ( !defined( "PGM_CLASS_REPORT") )
define ("PGM_CLASS_REPORT", 0);
if ( !$_MAIN_DB and $maindb )
$_MAIN_DB = $maindb;
// Logfile
define ("INFO", 0);
define ("LOGS", 1);
define ("JOBS", 2);
define ("WARN", 3);
define ("ERROR", 5);
// Database and listbox values
define ("ALLE", "Alle");
define ("LEER", "");
define ("LEER_WERT", "X");
define ("LEER_ID", "0");
define ("LEER_ID2", "00");
define ("LEER_ID3", "000");
// Formatting
define ("LEERSPALTE", "
| \n");
define ("BOLD", "");
define ("XBOLD", "");
define ("ITALIC", "");
define ("XITALIC", "");
define ("HR", "
");
define ("NL", "
");
define ("_NL_", "_NL_");
define ("SP", " ");
define ("SP3", " ");
define ("SP4", " ");
define ("TAB", " ");
define ("CRLF", "\n");
define ("NP", "\n
\n");
define ("NEW_PAGE", "\n
\n");
define ("SL", " / ");
define ("SM", ";");
define ("CM", ",");
define ("BACKSLASH", "\\");
define ("LOW_VALUE", "!");
define ("HIGH_VALUE", "ÿ");
define ("CENTER", "");
define ("LEFT", "");
define ("RIGHT", "
");
// Colors
define ("WHITE", "
");
define ("YELLOW", "");
define ("GREEN", "");
define ("ORANGE", "");
define ("RED", "");
define ("BLUE", "");
define ("DARK_BLUE", "");
define ("DARK_GREY", "");
define ("XFONT", "");
define ("BG_WHITE", " style=\"background-color: #FFFFFF;\" ");
define ("BG_YELLOW", " style=\"background-color: #FCF7A3;\" ");
define ("BG_GREEN", " style=\"background-color: #CCFFCC;\" ");
define ("BG_GREEN2", " style=\"background-color: #3CF23C;\" ");
define ("BG_ORANGE", " style=\"background-color: #FFCC00;\" ");
define ("BG_RED", " style=\"background-color: #F23C3C\" ");
define ("BG_BLUE", " style=\"background-color: #99CCFF;\" ");
define ("BG_DARK_BLUE", " style=\"background-color: #6780B8;\" ");
define ("BG_LIGHT_GREY", " style=\"background-color: #F9F8F7;\" ");
define ("BG_MIDDLE_GREY", " style=\"background-color: #EAE8E4;\" ");
define ("BG_GREY", " style=\"background-color: #D6CEC6;\" ");
define ("BG_DARK_GREY", " style=\"background-color: #4A526B;\" ");
// Characters
define ("CURRENCY", "€" );
define ("CUR_EUR", "€" );
define ("REQ", " * ");
define ("CHAR_AMP", "&" ); // &
define ("CHAR_SUM", "Σ" ); // Summenzeichen
define ("CHAR_DELTA", "Δ" ); // Differenz
define ("CHAR_PFEIL_L", "←" );
define ("CHAR_PFEIL_R", "→" );
define ("CHAR_DPFEIL_L", "⇐" );
define ("CHAR_DPFEIL_R", "⇒" );
define ("CHAR_C", "©" ); // Copyright
define ("CHAR_TM", "™" ); // Trademark
define ("CHAR_R", "®" ); // Registered
define ("CHAR_LT", "<" ); // <
define ("CHAR_LE", "≤" ); // <=
define ("CHAR_GT", ">" ); // >
define ("CHAR_GE", "≥" ); // >=
define ("CHAR_NE", "≠" ); // Ungleich
define ("CHAR_AVG", "Ø" ); // Durchschnitt
define ("ARROW_L", "←" );
define ("ARROW_O", "↑" );
define ("ARROW_R", "→" );
define ("ARROW_U", "↓" );
define ("ARROW_LR", "↔" );
define ("ARROW_UL", "↵" );
define ("ARROW_DL", "⇐" );
define ("ARROW_DO", "⇑" );
define ("ARROW_DR", "⇒" );
define ("ARROW_DU", "⇓" );
define ("ARROW_DLR", "⇔" );
// Time constants
define ("TAG", 86400);
define ("DAY", 86400);
define ("WOCHE", 604800);
define ("WEEK", 604800);
define ("NO_DATE", "0000-00-00");
// Screen settings
define ("POPUP_WIDTH", 650);
define ("POPUP_HEIGHT", 600);
// Option values
define ("AUTO", "#aut");
define ("IGNORE", "#ign");
define ("SILENT", "#sil");
define ("INSERT", "#ins");
define ("UPDATE", "#upd");
define ("NO_TRANSLATION", "#notrans");
define ("SQL_NO_DELETE", "#nodelete");
define ("SQL_NO_AUTO_NUM", "#noautonum");
define ("SQL_NO_AUTO_DATE", "#noautodate");
define ("SQL_KEEP_ID", "#keepid");
// Sync values
define ("SYNC_SERVER_ENTRY", "Server entry/locked");
// Date/Time
define ("CUR_DATETIME", date( "d.m.Y H:i:s" ) );
define ("CUR_DATE", date( "d.m.y" ) );
define ("CUR_YEAR", date( "Y" ) );
define ("CUR_YYYY", date( "Y" ) );
define ("CUR_YY", date( "y" ) );
define ("CUR_JJ", date( "y" ) );
define ("CUR_MONTH", date( "m" ) );
define ("CUR_MM", date( "m" ) );
define ("CUR_DAY", date( "d" ) );
define ("CUR_DD", date( "d" ) );
define ("CUR_TT", date( "d" ) );
define ("CUR_MM_YYYY", date( "m.Y" ) );
define ("CUR_TIME", date( "H:i:s" ) );
define ("CUR_HMS_S", date( "His" ) );
define ("CUR_HOUR", date( "H" ) );
define ("CUR_MIN", date( "i" ) );
define ("CUR_SEC", date( "s" ) );
define ("CUR_STAMP", date( "Y-m-d H:i:s" ) );
define ("CUR_DATESTAMP", date( "Y-m-d" ) );
define ("CUR_YMD", date( "Y-m-d" ) );
define ("CUR_YMD_S", date( "Ymd" ) );
define ("CUR_YM", date( "Y-m" ) );
define ("CUR_USTAMP", mktime( date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")) );
define ("CUR_USTAMP_DATE", mktime( 0,0,0, date("m"), date("d"), date("Y")) );
switch ( date("w") ) {
case 0:
define ("CUR_DOW", "SON" );
break;
case 1:
define ("CUR_DOW", "MON" );
break;
case 2:
define ("CUR_DOW", "TUE" );
break;
case 3:
define ("CUR_DOW", "WED" );
break;
case 4:
define ("CUR_DOW", "THU" );
break;
case 5:
define ("CUR_DOW", "FRI" );
break;
case 6:
define ("CUR_DOW", "SAT" );
break;
default:
define ("CUR_DOW", "???" );
break;
}
// Programmsteuerung/Java
define ("START_JS", "\n\n" );
// Steuerungsparameter für interne Funktionen
if ( PGM_CLASS_DATASET )
define ("AUTO_RELOAD", " ONCHANGE='parent.content.UpdateDataset(\"seek\");' ");
else
define ("AUTO_RELOAD", " ONCHANGE='parent.content.jsReloadTab();' ");
//?? define ("AUTO_RELOAD", " ONCHANGE='parent.content.ReloadSelf();' ");
define ("CHECK_NUMERIC_VALUE", " ONCHANGE='jsCheckNumericValue(\"_FIELD_\");' ");
// Define Exportype if special from _export
define ("DEFAULT_EXPORT_TYPE", "SEM");
if ( $exporttype<>"" )
$_SESSION["LoginDefaultExportType"] = $exporttype;
else
$_SESSION["LoginDefaultExportType"] = DEFAULT_EXPORT_TYPE;
define( "EXPORT_TYPE", $_SESSION["LoginDefaultExportType"] );
define ("CSV_DIVIDER", ";");
define ("EXPORT_DIVIDER", ";");
define ("DB_DIVIDER", "#");
define ("NL_DIVIDER", "|");
define ("SC", ";");
define ("MULTI_DELIMITER", "_#_");
// Frame-control
define ("DATASET_FRAME_HEIGHT", 192 );
define ("DATAEDT_FRAME_HEIGHT", 157 );
define ("DATAEDF_FRAME_HEIGHT", 184 );
define ("DATALOD_FRAME_HEIGHT", 97 );
define ("FOOTER_FRAME_HEIGHT", 25 );
define ("DEBUG_FRAME_HEIGHT", 120 );
define ("SITE_SPACING", 0); // 5
define ("LEFT_SPACING", 10);
define ("TAB_SPACING", 4);
define ("ROW_HEIGHT", 10);
define ("FRAME_SYNC_LOOPS", 100);
define ("FRAME_SYNC_RETRY", 60);
define ("FRAME_SYNC_TIMEOUT", 50);
define ("DB_PREFIX_LENGTH", 3 );
// Dataset configuration
define ("DATASET_MULTI", 1);
if ( !defined("DATASET_ROWS_PER_PAGE_DEFAULT") )
define ("DATASET_ROWS_PER_PAGE_DEFAULT", 100);
define ("DATASET_ROWS_PER_PAGE_MAX", 200);
define ("MAIL_ZEILEN_DEFAULT", 100);
// Color and field definitions
define ("DATASET_COLOR1", "#F9F8F7"); //#F7F7E7
define ("DATASET_COLOR2", "#EAE8E4"); //#E7E7D6
define ("DATASET_COLORA", "#FCF7A3"); //SAP-Neues Gelb!
define ("DATASET_COLOR3", "#D6CEC6"); //#E7E7D6
define ("DATASET_COLOR_GREEN", "#CCFFCC"); //#E7E7D6
define ("BACK_COLOR1", "#4A526B"); //#4A526B
//define ("DATASET_COLORA", "#99CCFF"); //#FFCC33
define ("EDIT_FIELD_BORDER_COLOR", "#C6C6B7"); //#D4D0C8
define ("EDIT_BACKGROUND_COLOR", "#EAE8E4");
define ("EDIT_FIELD_STYLE", "STYLE='border-style:solid; border-width:1px; border-color=".EDIT_FIELD_BORDER_COLOR."; background-color=#FFFFFF;' ");
//define ("EDIT_FIELD_STYLE", " "); // Leer=Standard
//define ("EDIT_FIELD_STYLE", "STYLE='border-style:solid; border-width:1px;' ");
//define ("EDIT_FIELD_STYLE", "STYLE='border-style:solid; border-width:1px; border-color=#FFFFFF; background-color=#F7F7F7;' "); // wie displayfeld
//define ("EDIT_FIELD_STYLE", "STYLE='border-style:solid; border-width:1px; border-color=#FFFFFF; background-color=#FAFAFA;' "); // Vorversion wie SAP
define ("GRID_FIELD_STYLE", "STYLE='border-style:solid; border-width:1px;' "); // Leer=Standard
// Language Control
define ("LANGUAGE_MAX_FOREIGN", 3 );
// General Formatierung
$nl = NL;
$br = NL;
$sp = SP;
$anfst = "\"";
$visible = " STYLE='visibility:visible' ";
$objectstyle = "";
// Formulare
$fself = "