"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 = "
\n"; $form = "\n"; $fheader = ""; $fpgm = "\n"; DEFINE( "FORM_EXPORT", "\n" ); $fsave = "\n"; $fgrid = "\n"; // Datum/Uhrzeit $date = date( "d.m.y" ); $year = date( "Y" ); $month = date( "m.Y" ); $day = date( "d" ); $_DATE_Timestamp = date( "Y-m-d H:i:s" ); $dstamp = date( "Y-m-d" ); $dmonth = date( "Y-m" ); $dxstamp = date( "Ymd" ); $time = date( "H:i:s" ); $sec = date( "s" ); $hour = date( "H" ); $tstamp = date( "H:i:s" ); $txstamp = date( "His" ); $ustamp = mktime( date("H"), date("i"), date("s"), date("m"), date("d"), date("Y") ); $udstamp = mktime( 0,0,0, date("m"), date("d"), date("Y") ); // Directories define("PDF_FONT_DIR", "fonts/"); define("PDF_DEFAULT_FONT", "Helvetica"); define("IMAGE_DIR", "../images/"); // Sonstige Variablen initialisieren $checkfields = array(); // Debugger user if ( USER_INITIALS=="PR" ) define("PR", 1 ); else define("PR", 0 ); ?> "); define ("DEFAULT_MAILADRESSE_K", "peter@rueffer.com"); define ("DEFAULT_MAILADRESSE_IT", "peter@rueffer.com"); define ("DEFAULT_TELEFON", ""); define ("DEFAULT_FAX", ""); define ("MAIL_HOSTNAME", "mail.rueffer.com"); define ("MAIL_DOMAINNAME", "rueffer.com"); define ("MAIL_NO_REPLY", "no-reply@matrixpartners.de"); define ("GRUPPE_PM", "C,G"); define ("GRUPPE_INTERN", "A,S,C,G"); define ("CODE_INTERN", ".HUZ"); define ("WMS_FREIGABE", ""); define ("WMS_LOCALDRIVE", "G:"); // ":" Für alle Laufwerke! define ("WMS_ISBN", "http://www.amazon.de/exec/obidos/ASIN/"); define ("WMS_CD_EAN", "http://www.musicline.de/de/product/"); define ("SURVEY_MAX_ITEMS", 200); define ("ANZ_GRID_LEERZEILEN", 4); define ("ZEILEN_TEXTBOX", "6"); // Individuelle Funktionen und Felder in Screens define ("USER_INTERNAL1", ""); define ("USER_INTERNAL2", ""); define ("USER_INTERNAL3", ""); define ("USER_INTERNAL4", ""); define ("USER_INTERNAL5", ""); define ("CAD_FROM_GROUPWARE", "0"); define ("USE_R_CONTACTS", "1"); define ("USE_R_GBERICHT", "1"); $_LOCAL_RCO_Contacts = array("Hierarchie/Niveau", "Aktive Bearbeitung"); $_LOCAL_RCO_Requirements = array("Reaktionszeit"); // Druck define ("PRINT_EMPTY", 1); define ("AUTO_PRINT", 1); // Layout/Formatierung define ("NEW_WINDOW_SPACING", 10); define ("EDIT_SPACING", "3"); define ("EDIT_COLUMN1", "30%"); define ("EDIT_COLUMN2", "70%"); define ("EDIT_COLUMN2A", "35%"); define ("EDIT_COLUMN2B", "35%"); define ("EDIT_TEXTAREA", "100"); // Login and logo page define ("LOGIN_PAGE_TOP_MID", "
"); define ("LOGO_PAGE_HEIGHT", 61); define ("LOGO_PAGE_PADDING", 0); $strImage = "l_bild1.jpg"; if ( CUR_SEC>=20 and CUR_SEC<40 ) $strImage = "l_bild2.jpg"; if ( CUR_SEC>=40 and CUR_SEC<60 ) $strImage = "l_bild3.jpg"; define ("LOGO_PAGE_LEFT", "" ); //define ("LOGO_PAGE_TEXT", "".SP.SP.APPL_TITLE.$sysstatus." ".$_MAIN_Version."" ); define ("LOGO_PAGE_TEXT", "".SP.$sysstatus.SP ); $strImageRight = "l_logo1.gif"; $strImagePrint = "l_logo2.gif"; if ( $_SESSION["sus_logofile"]<>"" ) { $strImageRight = $_SESSION["sus_logofile"]; $strImagePrint = $_SESSION["sus_logofile"]; } define ("LOGO_PAGE_RIGHT", ""); define ("LOGO_PAGE_PRINT", ""); // SQL-Database define ("SQL_HOST", "localhost"); define ("SQL_DB", "matrix1"); define ("SQL_USER", "matrix1"); define ("SQL_PWD", "axu7gey"); // Datenablage if ( SYS_ONLINE ) { define ("FTP_SERVER", "config3.rp-pro.de"); define ("FTP_USER", "friendship26"); define ("FTP_PWD", "upa9xid"); define ("FTP_URL", "ftp://".FTP_USER.":".FTP_PWD."@".FTP_SERVER); define ("FTP_DIR", "/httpdocs/"); } else { define ("FTP_SERVER", ""); define ("FTP_USER", ""); define ("FTP_PWD", ""); define ("FTP_URL", "http://localhost"); define ("FTP_DIR", "/"); } define ("DATA_DOC", "data/doc/"); define ("DATA_OBJ", "data/objects/"); define ("DATA_TPL", "data/templates/"); define ("DATA_WMS", "data/wms/"); define ("DATA_IMG", "data/img/"); define ("DATA_SURVEY", "data/survey/"); define ("DATA_CONTACTS", "data/contacts/"); define ("DATA_RFP", "data/rfp/"); define ("DATA_EXPORT", "data/export/"); define ("DATA_PHP", "webobjects/"); define ("DATA_MAX", 10000000); define ("DATA_USE_FOLDER_DB", 1 ); define ("DATA_USE_FOLDER_ID", 0 ); // Workbench define ("WB_USE_FILES", 1); define ("WB_TEMPLATE_DIR", DATA_PHP."templates/"); // -------------------------------------------------------------------- // Special Functions within Authentification // -------------------------------------------------------------------- function localSetSpecialParms() { //global $_MAIN_Pgm; //global $_MAIN_SaveAllowed; //global $_BUTTON_New, $_BUTTON_DeleteEntry, $_BUTTON_Save, $_BUTTON_SaveAs, $_BUTTON_Delete, $_BUTTON_Print, $_BUTTON_PrintEntry, $_BUTTON_Export; } ?> 10 ) ) substr( $strBuffer, 0, 10 ); if ( $strBuffer=="" or $strBuffer=="0" or $strBuffer=="@" or $strBuffer=="0000-00-00" or $strBuffer=="2070-01-01" ) return ""; else if ( $strBuffer[4]!="-" || $strBuffer[7]!="-" ) return $strBuffer; else return substr($strBuffer,8,2).".".substr($strBuffer,5,2).".".substr($strBuffer,2,2); } function stringD2S ( $strBuffer, $strJJ="20" ) { return stringDate2SQL ( $strBuffer, $strJJ="20" ); } function stringDate2SQL ( $strBuffer, $strJJ="20" ) { // Prepare vars $strDateOld = $strBuffer; $strBuffer = trim(substr($strBuffer, 0, 10)); $strBuffer = str_replace(" ", ".", $strBuffer); $strBuffer = str_replace("/", ".", $strBuffer); $strResult = ""; $strSteps = ""; //if ( $strDateOld=="07.06.07") mainAlert( "1= $strDateOld -> $strBuffer -> $strSteps" ); // 0 Special entry if ( strtolower( $strBuffer )=="today" or strtolower( $strBuffer )=="heute" or strtolower( $strBuffer )=="*" ) { $strBuffer = date( "Y-m-d" ); $strSteps .= "0_"; } // 1 No entry if ( strlen( $strBuffer )<4 ) { $strResult = "0000-00-00"; $strSteps .= "1_"; } // 2 Date already tranformed YYYY-MM-DD (no action needed!) if ( !$strResult and strlen( $strBuffer )==10 and substr_count($strBuffer, '-')==2 and substr_count($strBuffer, '.')==0 ) { if ( $strBuffer[4]=="-" || $strBuffer[7]=="-" ) { $strResult = $strBuffer; $strSteps .= "2_"; } } // 3 Date is separated with . (transform in numeric 8 digits DDMMYYYY) if ( !$strResult and substr_count($strBuffer, '-')==0 and substr_count($strBuffer, '.')>0 ) { // No year = add current year if ( substr_count($strBuffer, '.')==1 ) $strBuffer .= ".".CUR_YEAR; // Split in digits and reformat as YYYYMMDD $arrayDate = explode( ".", $strBuffer ); $strBuffer = ""; if ( intval( $arrayDate[2] )<100 ) { if ( intval( $arrayDate[2] )==0 ) $strBuffer .= CUR_YEAR; else $strBuffer .= $strJJ.sprintf ("%02d", intval( $arrayDate[2] ) ); $strSteps .= "3a_"; } else { $strBuffer .= sprintf ("%04d", intval( $arrayDate[2] ) ); $strSteps .= "3b_"; } $strBuffer .= sprintf ("%02d", intval( $arrayDate[1] ) ); $strBuffer .= sprintf ("%02d", intval( $arrayDate[0] ) ); } // 4 Date is numeric and 6 digits DDMMYY without separator if ( !$strResult and strlen( $strBuffer )==6 and is_numeric( $strBuffer ) ) { $strResult = $strJJ.substr($strBuffer,4,2)."-".substr($strBuffer,2,2)."-".substr($strBuffer,0,2); $strSteps .= "4_"; } // 5 Date is numeric and 8 digits YYYYMMDD without separator if ( !$strResult and strlen( $strBuffer )==8 and is_numeric( $strBuffer ) ) { $strResult = substr($strBuffer,0,4)."-".substr($strBuffer,4,2)."-".substr($strBuffer,6,2); $strSteps .= "5_"; } // 6 No entry if ( !$strResult ) { $strResult = "0000-00-00"; $strSteps .= "6_"; } //if ( $strDateOld=="07.06.07") mainAlert( "1= $strDateOld -> $strBuffer -> $strResult -> $strSteps" ); return $strResult; } function stringDayOfWeek ( $strBuffer ) { $strBuffer = str_replace( "1,", lText("DayShortMon"), $strBuffer ); $strBuffer = str_replace( "2,", lText("DayShortTue"), $strBuffer ); $strBuffer = str_replace( "3,", lText("DayShortWed"), $strBuffer ); $strBuffer = str_replace( "4,", lText("DayShortThu"), $strBuffer ); $strBuffer = str_replace( "5,", lText("DayShortFri"), $strBuffer ); $strBuffer = str_replace( "6,", lText("DayShortSat"), $strBuffer ); $strBuffer = str_replace( "0,", lText("DayShortSun"), $strBuffer ); $strBuffer = str_replace( "Mon", lText("DayShortMon"), $strBuffer ); $strBuffer = str_replace( "Tue", lText("DayShortTue"), $strBuffer ); $strBuffer = str_replace( "Wed", lText("DayShortWed"), $strBuffer ); $strBuffer = str_replace( "Thu", lText("DayShortThu"), $strBuffer ); $strBuffer = str_replace( "Fri", lText("DayShortFri"), $strBuffer ); $strBuffer = str_replace( "Sat", lText("DayShortSat"), $strBuffer ); $strBuffer = str_replace( "Sun", lText("DayShortSun"), $strBuffer ); $strBuffer = str_replace( " Jan ", ".01.", $strBuffer ); $strBuffer = str_replace( " Feb ", ".02.", $strBuffer ); $strBuffer = str_replace( " Mar ", ".03.", $strBuffer ); $strBuffer = str_replace( " Apr ", ".04.", $strBuffer ); $strBuffer = str_replace( " May ", ".05.", $strBuffer ); $strBuffer = str_replace( " Jun ", ".06.", $strBuffer ); $strBuffer = str_replace( " Jul ", ".07.", $strBuffer ); $strBuffer = str_replace( " Aug ", ".08.", $strBuffer ); $strBuffer = str_replace( " Sep ", ".09.", $strBuffer ); $strBuffer = str_replace( " Oct ", ".10.", $strBuffer ); $strBuffer = str_replace( " Nov ", ".11.", $strBuffer ); $strBuffer = str_replace( " Dec ", ".12.", $strBuffer ); return ( $strBuffer ); } function stringDiffDate($strDateFrom, $strDateUntil) { return intval( floor( (strtotime(substr($strDateUntil,0,10)) - strtotime(substr($strDateFrom,0,10)) )/86400 ) ); } function stringValidDate( $strDate ) { if ( $strDate=="" or $strDate==NO_DATE ) return 0; if ( stringS2D( $strDate )=="" or stringD2S( $strDate )==NO_DATE ) return 0; return 1; } function ValidDate( $strDate ) { return stringValidDate( $strDate ); } function stringCalcDate($strDateFrom, $intDiff, $strDiffUnit="days" ) { // Prepare date field $strDateFrom = stringD2S( $strDateFrom ); if ( intval( $intDiff )==0 ) return $strDateFrom; // Prepare diff field if ( $intDiff<0 ) $strDiff = $intDiff." ".$strDiffUnit; else $strDiff = "+".$intDiff." ".$strDiffUnit; return date( "Y-m-d", strtotime( $strDiff, strtotime(substr($strDateFrom,0,10)) )) ; } function stringCalcTimestamp($strTimeFrom, $intDiff, $strDiffUnit="hours" ) { // Prepare date field //$strTimeFrom = stringD2S( $strTimeFrom ); if ( intval( $intDiff )==0 ) return $strTimeFrom; // Prepare diff field if ( $intDiff<0 ) $strDiff = $intDiff." ".$strDiffUnit; else $strDiff = "+".$intDiff." ".$strDiffUnit; return date( "Y-m-d H:i:s", strtotime( $strDiff, strtotime($strTimeFrom) )) ; } function stringMakeWeek( $strDate=CUR_YMD ) { // Convert Date to JJJJ-MM-DD? if ( !stringIn( $strDate, "-" ) or strlen( $strDate ) <> 10 ) $strDate = stringDate2SQL( $strDate ); // Build Week in JJJJ-WW $intWeek = intval(date("W", mktime(0,0,0, substr($strDate,5,2), substr($strDate,8,2), substr($strDate,0,4) ))); //if ( $intWeek<10 ) // return date("Y-0W", mktime(0,0,0, substr($strDate,5,2), substr($strDate,8,2), substr($strDate,0,4) )); //else return date("Y-W", mktime(0,0,0, substr($strDate,5,2), substr($strDate,8,2), substr($strDate,0,4) )); } function stringFirstDayOfWeek( $strDate=CUR_YMD ) { // Convert Date to JJJJ-MM-DD? if ( !stringIn( $strDate, "-" ) or strlen( $strDate ) <> 10 ) $strDate = stringDate2SQL( $strDate ); // Get monday $intDayOfWeek = intval(date("w", mktime(0,0,0, substr($strDate,5,2), substr($strDate,8,2), substr($strDate,0,4) ))); $strFirstDayOfWeek = $strDate; switch ( $intDayOfWeek ) { case 2: $strFirstDayOfWeek = stringCalcDate($strDate, -1); break; case 3: $strFirstDayOfWeek = stringCalcDate($strDate, -2); break; case 4: $strFirstDayOfWeek = stringCalcDate($strDate, -3); break; case 5: $strFirstDayOfWeek = stringCalcDate($strDate, -4); break; case 6: $strFirstDayOfWeek = stringCalcDate($strDate, -5); break; case 0: $strFirstDayOfWeek = stringCalcDate($strDate, -6); break; } return $strFirstDayOfWeek; } function stringWeeks1970( $strDate="" ) { // Current week? if ( $strDate=="" ) $strDate = stringMakeWeek(); // Calculate Weeks since 1970 (roughly) $intWeeks = (intval( substr($strDate, 0, 4) ) - 1970) * 52; $intWeeks += intval( substr($strDate, 5, 2) ); return $intWeeks; } // ---------------------------------------------------------------------------------------------- // String Operations ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------- function stringValidEntry( $strEntry ) { if ( $strEntry=="" or $strEntry=="@" or $strEntry==NO_DATE ) return 0; return 1; } function ValidEntry( $strEntry ) { return stringValidEntry( $strEntry ); } function isValid( $strEntry ) { return stringValidEntry( $strEntry ); } function stringLeft ( $strBuffer, $intLen ) { return substr( $strBuffer, 0, $intLen ); } function stringLeftC ( $strBuffer, $strNeedle ) { return substr( $strBuffer, 0, strpos($strBuffer, $strNeedle) ); } function stringRight ( $strBuffer, $intLen ) { return substr( $strBuffer, (strlen($strBuffer)-$intLen) ); } function stringRightC ( $strBuffer, $strNeedle ) { return substr( $strBuffer, strpos($strBuffer, $strNeedle)+1 ); } function stringSubstr ($strBuffer, $intLen) { if ( $intLen 0 ) return 1; else return 0; } function stringTrim ($strBuffer) { // Umlaute $strBuffer = str_replace("Ä", "Ae", $strBuffer); $strBuffer = str_replace("Ö", "Oe", $strBuffer); $strBuffer = str_replace("Ü", "Ue", $strBuffer); $strBuffer = str_replace("ä", "ae", $strBuffer); $strBuffer = str_replace("ö", "oe", $strBuffer); $strBuffer = str_replace("ü", "ue", $strBuffer); $strBuffer = str_replace("ß", "ss", $strBuffer); // Special Chars $strBuffer = str_replace(".", "", $strBuffer); $strBuffer = str_replace("/", " ", $strBuffer); $strBuffer = str_replace("\\", " ", $strBuffer); $strBuffer = str_replace("\"", "", $strBuffer); $strBuffer = str_replace("(", "", $strBuffer); $strBuffer = str_replace(")", "", $strBuffer); $strBuffer = str_replace("&", "", $strBuffer); $strBuffer = str_replace("´", "", $strBuffer); $strBuffer = str_replace("`", "", $strBuffer); $strBuffer = str_replace("\n", " ", $strBuffer); $strBuffer = str_replace("\r", " ", $strBuffer); // Blanks $strBuffer = trim($strBuffer); while ( strpos( "x".$strBuffer, " " ) ) { $strBuffer = str_replace(" ", " ", $strBuffer); } return( $strBuffer ); } function stringTrimRSSFeed ($strBuffer) { // Umlaute $strBuffer = str_replace("Ä", "Ae", $strBuffer); $strBuffer = str_replace("Ö", "Oe", $strBuffer); $strBuffer = str_replace("Ü", "Ue", $strBuffer); $strBuffer = str_replace("ä", "ae", $strBuffer); $strBuffer = str_replace("ö", "oe", $strBuffer); $strBuffer = str_replace("ü", "ue", $strBuffer); $strBuffer = str_replace("ß", "ss", $strBuffer); $strBuffer = str_replace("\"", "", $strBuffer); $strBuffer = str_replace("'", "", $strBuffer); $strBuffer = str_replace("´", "", $strBuffer); $strBuffer = str_replace("`", "", $strBuffer); $strBuffer = str_replace("„", "-", $strBuffer); $strBuffer = str_replace("“", "-", $strBuffer); $strBuffer = str_replace("¬", "", $strBuffer); return( trim($strBuffer) ); } function stringTrimICS ($strBuffer) { // Umlaute $strBuffer = str_replace("Ä", "_AE_", $strBuffer); $strBuffer = str_replace("Ö", "_OE_", $strBuffer); $strBuffer = str_replace("Ü", "_UE_", $strBuffer); $strBuffer = str_replace("ä", "_ae_", $strBuffer); $strBuffer = str_replace("ö", "_oe_", $strBuffer); $strBuffer = str_replace("ü", "_ue_", $strBuffer); $strBuffer = str_replace("ß", "_ss_", $strBuffer); // Special Chars $strBuffer = str_replace("/", " ", $strBuffer); $strBuffer = str_replace("\\", " ", $strBuffer); $strBuffer = str_replace("\"", "", $strBuffer); $strBuffer = str_replace("(", "", $strBuffer); $strBuffer = str_replace(")", "", $strBuffer); $strBuffer = str_replace("\n", "_NL_", $strBuffer); $strBuffer = str_replace("\r", " ", $strBuffer); // Blanks $strBuffer = trim($strBuffer); return( $strBuffer ); } function stringTrimQuotes ($strBuffer) { $strBuffer = str_replace("\"", "´", $strBuffer); $strBuffer = str_replace("'", "´", $strBuffer); // Blanks $strBuffer = trim($strBuffer); return( $strBuffer ); } function stringTrimSeparator ($strBuffer) { $strBuffer = str_replace(";", " ", $strBuffer); $strBuffer = str_replace(",", " ", $strBuffer); $strBuffer = str_replace("\n", " ", $strBuffer); $strBuffer = str_replace("\r", " ", $strBuffer); // Blanks $strBuffer = trim($strBuffer); return( $strBuffer ); } function stringTrimExport ($strBuffer, $strNL=" " ) { global $strExportType; if ( $strExportType=="xls" ) { // Special Chars $strBuffer = str_replace("\r", " ", $strBuffer); } else { // Special Chars $strBuffer = str_replace("\n", " ", $strBuffer); $strBuffer = str_replace("\r", "", $strBuffer); $strBuffer = str_replace("'", "`", $strBuffer); $strBuffer = str_replace("\"", "`", $strBuffer); $strBuffer = str_replace("\\", "", $strBuffer); // Blanks $strBuffer = trim($strBuffer); } return( $strBuffer ); } function stringTrimValue ($strBuffer) { // Blanks $strBuffer = trim($strBuffer); // Default werte $strBuffer = str_replace("@", "", $strBuffer); $strBuffer = str_replace("0000-00-00", "", $strBuffer); return( $strBuffer ); } function stringTrimNCE ( $strBuffer ) { if( $strBuffer=="" ) return($strBuffer); $strMask = ""; for( $intPos=0; $intPos < strlen($strBuffer); $intPos++) $strMask .= '&#'.ord( $strBuffer{$intPos} ).';'; return( $strMask ); } function stringTrimAnalysisKey ( $strBuffer ) { // Blanks $strBuffer = trim($strBuffer); $strBuffer = str_replace(".", "x", $strBuffer); $strBuffer = str_replace(" ", "x", $strBuffer); $strBuffer = str_replace("-", "x", $strBuffer); $strBuffer = str_replace("_", "x", $strBuffer); $strBuffer = str_replace("/", "x", $strBuffer); $strBuffer = str_replace("+", "x", $strBuffer); return( $strBuffer ); } function stringTrimAnalysisItem ( $strBuffer ) { // Blanks $strBuffer = trim($strBuffer); $strBuffer = str_replace("x", ".", $strBuffer); $strBuffer = str_replace(" ", ".", $strBuffer); $strBuffer = str_replace("-", ".", $strBuffer); $strBuffer = str_replace("_", ".", $strBuffer); $strBuffer = str_replace("/", ".", $strBuffer); $strBuffer = str_replace("+", ".", $strBuffer); return( $strBuffer ); } function stringText2SQL ($strBuffer) { // Special Chars $strBuffer = str_replace("'", "`", $strBuffer); $strBuffer = str_replace("\"", "`", $strBuffer); $strBuffer = str_replace("\\", "", $strBuffer); return( $strBuffer ); } function stringText2HTML ($strBuffer) { // Special Chars $strBuffer = str_replace("\"", "`", $strBuffer); $strBuffer = str_replace("'", "`", $strBuffer); $strBuffer = str_replace("&", CHAR_AMP, $strBuffer); $strBuffer = str_replace("<", CHAR_LT, $strBuffer); $strBuffer = str_replace(">", CHAR_GT, $strBuffer); $strBuffer = str_replace("\n", NL, $strBuffer); $strBuffer = str_replace("\r", "", $strBuffer); return( $strBuffer ); } function stringSearchItem ($strBuffer) { // Special Chars $strBuffer = str_replace("*", "", $strBuffer); $strBuffer = str_replace("_", "__", $strBuffer); $strBuffer = str_replace("?", "_", $strBuffer); $strBuffer = str_replace("%", "", $strBuffer); // Blanks $strBuffer = trim($strBuffer); while ( stringIn( $strBuffer, " " ) ) { $strBuffer = str_replace(" ", " ", $strBuffer); } return( $strBuffer ); } function stringRemoveCRLF ( $strBuffer ) { return( trim( str_replace( chr(13), "", str_replace( chr(10), " ", $strBuffer ))) ); } function stringMetaphone ($strBuffer) { return( metaphone( stringTrimPhonetic( $strBuffer ) ) ); } function stringTrimPhonetic ($strBuffer) { $strBuffer = stringTrim( strtolower( $strBuffer )); // Leerzeichen $strBuffer = str_replace(" ", "", $strBuffer); // Umlaute $strBuffer = str_replace("ae", "a", $strBuffer); $strBuffer = str_replace("ue", "u", $strBuffer); $strBuffer = str_replace("oe", "o", $strBuffer); // Sonderbehandlung $strBuffer = str_replace("ei", "y", $strBuffer); $strBuffer = str_replace("ey", "y", $strBuffer); $strBuffer = str_replace("ej", "y", $strBuffer); $strBuffer = str_replace("ai", "y", $strBuffer); $strBuffer = str_replace("ay", "y", $strBuffer); $strBuffer = str_replace("aj", "y", $strBuffer); $strBuffer = str_replace("ie", "i", $strBuffer); $strBuffer = str_replace("hr", "r", $strBuffer); $strBuffer = str_replace("ck", "k", $strBuffer); $strBuffer = str_replace("gk", "k", $strBuffer); $strBuffer = str_replace("ch", "k", $strBuffer); $strBuffer = str_replace("qu", "k", $strBuffer); $strBuffer = str_replace("kw", "k", $strBuffer); $strBuffer = str_replace("kv", "k", $strBuffer); $strBuffer = str_replace("c", "k", $strBuffer); $strBuffer = str_replace("g", "k", $strBuffer); $strBuffer = str_replace("sch", "s", $strBuffer); $strBuffer = str_replace("tsch","s", $strBuffer); $strBuffer = str_replace("scz", "s", $strBuffer); $strBuffer = str_replace("tch", "s", $strBuffer); $strBuffer = str_replace("sc", "s", $strBuffer); $strBuffer = str_replace("sz", "s", $strBuffer); $strBuffer = str_replace("cz", "s", $strBuffer); $strBuffer = str_replace("z", "s", $strBuffer); $strBuffer = str_replace("ts", "s", $strBuffer); $strBuffer = str_replace("tz", "s", $strBuffer); $strBuffer = str_replace("ss", "s", $strBuffer); $strBuffer = str_replace("ß", "s", $strBuffer); $strBuffer = str_replace("ks", "x", $strBuffer); $strBuffer = str_replace("gs", "x", $strBuffer); $strBuffer = str_replace("dt", "t", $strBuffer); $strBuffer = str_replace("td", "t", $strBuffer); $strBuffer = str_replace("d", "t", $strBuffer); $strBuffer = str_replace("h", "", $strBuffer); $strBuffer = str_replace("v", "w", $strBuffer); $strBuffer = str_replace("-", "", $strBuffer); $strBuffer = str_replace("+", "", $strBuffer); $strBuffer = str_replace("/", "", $strBuffer); $strBuffer = str_replace("'", "", $strBuffer); $strBuffer = str_replace("*", "", $strBuffer); $strBuffer = str_replace(",", "", $strBuffer); $strBuffer = str_replace(".", "", $strBuffer); $strBuffer = str_replace("_", "", $strBuffer); return( $strBuffer ); } function stringFile ($strBuffer) { $strBuffer = trim($strBuffer); // Umlaute $strBuffer = str_replace("Ä", "Ae", $strBuffer); $strBuffer = str_replace("Ö", "Oe", $strBuffer); $strBuffer = str_replace("Ü", "Ue", $strBuffer); $strBuffer = str_replace("ä", "ae", $strBuffer); $strBuffer = str_replace("ö", "oe", $strBuffer); $strBuffer = str_replace("ü", "ue", $strBuffer); $strBuffer = str_replace("ß", "ss", $strBuffer); // Blanks $strBuffer = str_replace(" ", "_", $strBuffer); return( $strBuffer ); } function stringHTML2JS ( $strBuffer ) { return stringRemoveCRLF( str_replace( "\n","",str_replace( "'","\'",str_replace( "\"","\\\"",$strBuffer)))); } function stringGetPartText( $strItem, $strBuffer, $intLength=0 ) { if ( $strItem=="" or $strBuffer=="" ) return ""; $arrayParts = stringSplitParts( $strBuffer ); // Find key in array and return data/text for ( $i=0; $i2 ) { $strKey = trim(substr( $arrayTemp1[$i], 0, strpos($arrayTemp1[$i], " ")) ); $strData = trim(substr( $arrayTemp1[$i], (strpos($arrayTemp1[$i], " ")+1)) ); $value[] = $strKey; if ( $intLength ) { $box[] = $strKey." ".stringSubstr( $strData, $intLength ); $arrayParts[] = array("Key"=>$strKey, "Data"=>stringSubstr( $strData, $intLength ), "Page"=>$intPage); } else { $box[] = $strKey." ".$strData; $arrayParts[] = array("Key"=>$strKey, "Data"=>$strData, "Page"=>$intPage); } } } // Return new array return $arrayParts; } function stringTrimRecipients( $strBuffer ) { // Prepare Buffer $strBuffer = trim($strBuffer); $strBuffer = str_replace(",", " ", $strBuffer); $strBuffer = str_replace(";", " ", $strBuffer); while ( strpos( "x".$strBuffer, " " ) ) { $strBuffer = str_replace(" ", " ", $strBuffer); } $strBuffer = trim($strBuffer); // Split array $arrayTemp1 = explode( " ", $strBuffer ); $strData = ""; $boolStart = 0; // Prepare new array for ( $i=0; $i3 ) { // Add delimiter if ( $boolStart ) $strData.= ","; // Define delimiter for mail client // Add recipient $strData .= $arrayTemp1[$i]; $boolStart = 1; } } // Return new array return $strData; } // ---------------------------------------------------------------------------------------------- // Numeric Operations ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------- define ("BLANK_WHEN_ZERO", "#bwz"); define ("NO_BLANK_WHEN_ZERO", "#nbwz"); function stringS2N ( $strBuffer, $strOptions=BLANK_WHEN_ZERO ) { return stringSQL2Num ( $strBuffer, $strOptions ); } function stringSQL2Num ( $strBuffer, $strOptions=BLANK_WHEN_ZERO ) { global $_MAIN_Language; // Field already translated? if ( $_MAIN_Language<>1 ) if ( stringIn( $strBuffer, "," ) ) return $strBuffer; // Format number for display if ( stringIn( $strBuffer, "." ) ) { $intDec = strlen($strBuffer) - strpos($strBuffer, ".") - 1; } else { $intDec = 0; } // Zero value found? if ( floatval($strBuffer)=="0" or $strBuffer=="" or !is_numeric( $strBuffer ) ) { if ( stringIn( $strOptions, NO_BLANK_WHEN_ZERO ) or NUM_BLANK_WHEN_ZERO==0 ) return "0"; else return ""; } //return stringNumFormat( $strBuffer, $intDec )." "; if ( $_MAIN_Language<>1 ) return str_replace( ".", ",", $strBuffer ); else return $strBuffer; } function stringN2S ( $strBuffer ) { return stringNum2SQL ( $strBuffer ); } function stringNum2SQL ( $strBuffer ) { global $_MAIN_Language; $strBuffer = str_replace( "%", "", str_replace( " ", "", trim($strBuffer) )); if ( $_MAIN_Language<>1 ) { $strBuffer = str_replace( ".", "", $strBuffer ); $strBuffer = str_replace( ",", ".", $strBuffer ); } else { $strBuffer = str_replace( ",", "", $strBuffer ); } if ( $strBuffer=="0" || $strBuffer=="" || !is_numeric( $strBuffer ) ) return "0"; else return $strBuffer; } function stringNumFormat ( $intValue, $intDec=0, $strOptions="" ) { global $_MAIN_Language; if ( doubleval($intValue)==0 and stringIn( $strOptions, BLANK_WHEN_ZERO) ) { return ""; } else { if ( $_MAIN_Language<>1 ) return number_format( str_replace(",", ".", $intValue), $intDec, ',', '.'); else return number_format( str_replace(",", ".", $intValue), $intDec, '.', ','); } } function stringTrimLeadingZeros ( $strValue ) { $strValue = trim( $strValue ); for ( $i=0; $i=strlen( $strValue ); $i++ ) { if ( stringLeft( $strValue, 1 )<>"0" ) { return $strValue; } else { $strValue = substr( $strValue, 1 ); } } return $strValue; } function stringTrimVirtualArray ( $strArray, $strDelimiter ) { $arrayTemp = explode( $strDelimiter, trim( $strArray) ); $arrayTemp = array_unique( $arrayTemp ); $strArray = ""; for ( $i=0; $i0 ) { $strArray .= $arrayTemp[$i].$strDelimiter; } } return $strArray; } ?>
Fatal error: Call to undefined function sqlopen() in /var/www/vhosts/friendship26.de/httpdocs/webobjects/capi/cmsbootloader.inc on line 14