$strLength) { $_ende = false; for($i = 0; $i < ($strLength+1000); $i++) { if($i >= $strLength && $_ende == false) { if(in_array($str[$i], $_zeichen)) { $str = substr($str, 0, ($i+1)) . "..."; $_ende = true; } } } } return $str; } function AuthCheck($str) { if(empty($str) or !$str) { return false; } else { $_query = "SELECT MemberID, MemberMail FROM Members WHERE MemberHash = '" . $str . "' AND MemberAktivierung = 1 AND MemberSperrung = 0"; $_sql = mysqli_query($GLOBALS['dbConnect'], $_query); $_dz = mysqli_fetch_object($_sql); $_AuthCheckMemberID = $_dz->MemberID; $_AuthCheckMemberMail = $_dz->MemberMail; if(empty($_AuthCheckMemberID)) { return false; } else { $_query = "SELECT AdminID, AdminRechte FROM Administratoren WHERE MemberID = " . $_AuthCheckMemberID; $_sql = mysqli_query($GLOBALS['dbConnect'], $_query); $_dz = mysqli_fetch_object($_sql); $_AuthCheckAdminID = $_dz->AdminID; if(empty($_AuthCheckAdminID)) { return false; } else { $_SESSION['AdminInfo']['Rechte'] = $_dz->AdminRechte; $_SESSION['AdminInfo']['MemberID'] = $_AuthCheckMemberID; $_SESSION['AdminInfo']['MemberMail'] = $_AuthCheckMemberMail; $_SESSION['AdminInfo']['MemberHash'] = $str; return true; } } } } function MemberInfo($str) { if($str == 0 or empty($str)) { $str = ""; $str = array(); } else { $qy = "SELECT MemberName, MemberMail FROM Members WHERE MemberID = " . $str; $sl = mysqli_query($GLOBALS['dbConnect'], $qy); $dr = mysqli_fetch_object($sl); $str = array(); $str['MemberName'] = dbAusgabe($dr->MemberName); $str['MemberMail'] = $dr->MemberMail; } return $str; } function AdminInfo($str) { if($str == 0 or empty($str)) { $str = ""; $str = array(); } else { $qy = "SELECT AdminRechte FROM Administratoren WHERE MemberID = " . $str; $sl = mysqli_query($GLOBALS['dbConnect'], $qy); $dr = mysqli_fetch_object($sl); $strRechte = dbAusgabe($dr->AdminRechte); if(!empty($strRechte)) { $str = array(); $str = explode(",", $strRechte); } else { return false; } } return $str; } function Rubrik($str) { if($str == 0) { $str = "(keine Rubrik zugewiesen)"; } else { $qy = "SELECT RubrikName FROM " . $_SESSION['dbInfo']['dbPrefix'] . "Rubriken WHERE RubrikID = " . $str; $sl = mysqli_query($GLOBALS['dbConnect'], $qy); $dr = mysqli_fetch_object($sl); $str = $dr->RubrikName; } return $str; } function Rechte($str) { if($str == "Administrator") { $str = "Administrator"; } else { if($str == 0 or empty($str)) { $str = "(keine Rechte zugewiesen)"; } elseif(is_numeric($str)) { $qy = "SELECT ModulName FROM Module WHERE ModulID = " . $str; $sl = mysqli_query($GLOBALS['dbConnect'], $qy); $dr = mysqli_fetch_object($sl); $str = dbAusgabe($dr->ModulName); } else { $str = $str; } } return $str; } function uploadImage($strBildTmpName, $strBildName, $strPfadZiel, $strMaxWidth, $strMaxHeight, $strAlt) { if(!empty($strBildTmpName) && !empty($strBildName)) { $tmpDateiInfo = pathinfo($strBildName); $tmpDateiFormat = $tmpDateiInfo['extension']; $tmpDateiZS = date('YmdHis'); $tmpDateiName = $tmpDateiZS . "_" . prettyFileName($tmpDateiInfo['filename'], "-") . "." . $tmpDateiFormat; $tmpDateiSize = getimagesize($strBildTmpName); $tmpFormate = array("jpg", "png", "bmp", "jpeg", "gif", "svg"); chmod($strBildTmpName, 0777); $OrdnerPics = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['_DIR_SITE'] . $GLOBALS['_DIR_MEDIA'] . "pics/"; $OrdnerZiel = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['_DIR_SITE'] . $GLOBALS['_DIR_MEDIA'] . $strPfadZiel; $tmpDateiZielPfad = $OrdnerZiel . "/" . $tmpDateiName; if(!is_dir($OrdnerPics)) { mkdir($OrdnerPics, 0777); } if(!is_dir($OrdnerZiel)) { mkdir($OrdnerZiel, 0777); } if(!in_array(strtolower($tmpDateiFormat), $tmpFormate)) { $_SESSION['FehlerUploadBild'] .= "- Das Bild weist ein unerlaubtes Format auf.
"; } if($strMaxWidth && !empty($strMaxWidth)) { if($tmpDateiSize[0] > $strMaxWidth) { $_SESSION['FehlerUploadBild'] .= "- Das Bild ist zu breit.
"; } } if($strMaxHeight && !empty($strMaxHeight)) { if($tmpDateiSize[1] > $strMaxHeight) { $_SESSION['FehlerUploadBild'] .= "- Das Bild ist zu hoch.
"; } } if(empty($_SESSION['FehlerUploadBild'])) { move_uploaded_file($strBildTmpName, $tmpDateiZielPfad); chmod($tmpDateiZielPfad, 0777); $str = $strPfadZiel . $tmpDateiName; if($strAlt && !empty($strAlt)) { $strAlt = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['_DIR_SITE'] . $GLOBALS['_DIR_MEDIA'] . $strAlt; unlink($strAlt); } } } else { if($strAlt && !empty($strAlt)) { $str = $strAlt; } else { $str = ""; } } return $str; } function uploadFile($strDateiTmpName, $strDateiName, $strPfadZiel, $strMaxSize, $strAlt) { if(!empty($strDateiTmpName) && !empty($strDateiName)) { $tmpDateiInfo = pathinfo($strDateiName); $tmpDateiSize = filesize($strDateiTmpName); $tmpDateiFormat = $tmpDateiInfo['extension']; $tmpDateiZS = date('YmdHis'); $tmpDateiName = $tmpDateiZS . "_" . prettyFileName($tmpDateiInfo['filename'], "-") . "." . $tmpDateiFormat; chmod($strDateiTmpName, 0777); $OrdnerPics = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['_DIR_SITE'] . $GLOBALS['_DIR_MEDIA'] . "pics/"; $OrdnerZiel = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['_DIR_SITE'] . $GLOBALS['_DIR_MEDIA'] . $strPfadZiel; $tmpDateiZielPfad = $OrdnerZiel . "/" . $tmpDateiName; if(!is_dir($OrdnerPics)) { mkdir($OrdnerPics, 0777); } if(!is_dir($OrdnerZiel)) { mkdir($OrdnerZiel, 0777); } if($strMaxSize && !empty($strMaxSize)) { if($tmpDateiSize > $strMaxSize) { $_SESSION['FehlerUploadDatei'] .= "- Die Datei ist zu groß
"; } } if(empty($_SESSION['FehlerUploadDatei'])) { move_uploaded_file($strDateiTmpName, $tmpDateiZielPfad); chmod($tmpDateiZielPfad, 0777); $str = $strPfadZiel . $tmpDateiName; if($strAlt && !empty($strAlt)) { $strAlt = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['_DIR_SITE'] . $GLOBALS['_DIR_MEDIA'] . $strAlt; unlink($strAlt); } } } else { if($strAlt && !empty($strAlt)) { $str = $strAlt; } else { $str = ""; } } return $str; } function CheckMail($str) { return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i", $str)); } function alertDanger($a, $b) { $str = "
"; $str .= ""; $str .= "

" . $a . "

" . $b; $str .= "
"; return $str; } function alertSuccess($a, $b) { $str = "
"; $str .= ""; $str .= "

" . $a . "

" . $b; $str .= "
"; return $str; } function alertWarning($a, $b) { $str = "
"; $str .= ""; $str .= "

" . $a . "

" . $b; $str .= "
"; return $str; } function calloutDanger($a, $b) { $str = "
"; $str .= "

" . $a . "

" . $b . "

"; $str .= "
"; return $str; } function calloutInfo($a, $b) { $str = "
"; $str .= "

" . $a . "

" . $b . "

"; $str .= "
"; return $str; } function calloutWarning($a, $b) { $str = "
"; $str .= "

" . $a . "

" . $b . "

"; $str .= "
"; return $str; } function resizeImage($filepath_old, $filepath_new, $image_dimension, $scale_mode = 0) { if(!(file_exists($filepath_old)) || file_exists($filepath_new)) return false; $image_attributes = getimagesize($filepath_old); $image_width_old = $image_attributes[0]; $image_height_old = $image_attributes[1]; $image_filetype = $image_attributes[2]; if($image_width_old <= 0 || $image_height_old <= 0) return false; $image_aspectratio = $image_width_old / $image_height_old; if($scale_mode == 0) { $scale_mode = ($image_aspectratio > 1 ? -1 : -2); } elseif ($scale_mode == 1) { $scale_mode = ($image_aspectratio > 1 ? -2 : -1); } if($scale_mode == -1) { $image_width_new = $image_dimension; $image_height_new = round($image_dimension / $image_aspectratio); } elseif ($scale_mode == -2) { $image_height_new = $image_dimension; $image_width_new = round($image_dimension * $image_aspectratio); } else { return false; } switch ($image_filetype) { case 1: $image_old = imagecreatefromgif($filepath_old); $image_new = imagecreate($image_width_new, $image_height_new); imagecopyresampled($image_new, $image_old, 0, 0, 0, 0, $image_width_new, $image_height_new, $image_width_old, $image_height_old); imagegif($image_new, $filepath_new); break; case 2: $image_old = imagecreatefromjpeg($filepath_old); $image_new = imagecreatetruecolor($image_width_new, $image_height_new); imagecopyresampled($image_new, $image_old, 0, 0, 0, 0, $image_width_new, $image_height_new, $image_width_old, $image_height_old); imagejpeg($image_new, $filepath_new); break; case 3: $image_old = imagecreatefrompng($filepath_old); $image_colordepth = imagecolorstotal($image_old); if($image_colordepth == 0 || $image_colordepth > 255) { $image_new = imagecreatetruecolor($image_width_new, $image_height_new); } else { $image_new = imagecreate($image_width_new, $image_height_new); } imagealphablending($image_new, false); imagecopyresampled($image_new, $image_old, 0, 0, 0, 0, $image_width_new, $image_height_new, $image_width_old, $image_height_old); imagesavealpha($image_new, true); imagepng($image_new, $filepath_new); break; default: return false; } return true; } function showRubrikenCMS($subcat, $level) { $result = mysqli_query($GLOBALS['dbConnect'], "SELECT * FROM " . $_SESSION['dbInfo']['dbPrefix'] . "Rubriken WHERE RubrikParentID = " . $subcat . " ORDER BY RubrikRG ASC"); while($row = mysqli_fetch_assoc($result)) { echo "
"; echo "
"; if ($level == 0) { echo "
" . dbAusgabe($row['RubrikName']) . "
"; } else { $trenner = ""; for($i = 0; $i < $level; $i++) { $trenner .= "»     "; } echo str_repeat('',$level) . "
" . $trenner . dbAusgabe($row['RubrikName']) . "
"; } echo "
"; echo "
"; if($row['RubrikNavigation'] == 1) { echo "Navigation"; } echo "
"; echo "
"; echo "#" . $row['RubrikID'] . ""; echo "
"; echo "
"; echo " Bearbeiten     "; echo " Löschen"; echo "
"; echo "
"; showRubrikenCMS($row['RubrikID'], $level+1); } } function showRubrikenInputOptions($subcat, $level, $selected = NULL) { $result = mysqli_query($GLOBALS['dbConnect'], "SELECT * FROM " . $_SESSION['dbInfo']['dbPrefix'] . "Rubriken WHERE RubrikParentID = $subcat ORDER BY RubrikRG ASC"); while($row = mysqli_fetch_assoc($result)) { if ($level == 0) { if($selected != NULL && $row['RubrikID'] == $selected) { $sel = " selected=\"selected\""; } else { $sel = ""; } echo ""; } else { if($selected != NULL && $row['RubrikID'] == $selected) { $sel = " selected=\"selected\""; } else { $sel = ""; } $trenner = ""; for($i = 0; $i < $level; $i++) { $trenner .= " - "; } echo ""; } showRubrikenInputOptions($row['RubrikID'], $level+1, $selected); } } function sendMailCMS($strBetreff, $strEmpfaengerMail, $strText, $strServer) { if(!empty($strBetreff) && !empty($strEmpfaengerMail) && !empty($strText) && !empty($strServer)) { if(CheckMail($strEmpfaengerMail) == true) { $mailHeader = 'Mime-Version: 1.0' . "\r\n"; $mailHeader .= 'X-Mailer: PHP/' . phpversion() . "\r\n"; $mailHeader .= 'Content-Type: text/html; charset=utf-8' . "\r\n"; $mailHeader .= 'From: noreply@' . $strServer . ' ' . "\r\n"; $mailHeader .= 'Bcc: tenge&spangenberg ' . "\r\n"; $mailText = ' Content-Management-System

Content-Management-System

' . $strServer . ' | Login
' . $strText . '
Impressum | Datenschutz | AGB | Facebook | Website
'; mail($strEmpfaengerMail, $strBetreff, $mailText, $mailHeader); return true; } else { return false; } } else { return false; } } function generateZS($strTag, $strMonat, $strJahr, $strStunde, $strMinute, $strTyp) { // $strTyp = 2 - ZS statt '00000000000000' zurückgeben // $strTyp = 3 - '00000000000000' zurückgeben if(!empty($strTag)) { if(strlen($strTag) == 1) { $strTag = "0" . $strTag; } } else { $strTag = "00"; } if(!empty($strMonat)) { if(strlen($strMonat) == 1) { $strMonat = "0" . $strMonat; } } else { $strMonat = "00"; } if(!empty($strStunde)) { if(strlen($strStunde) == 1) { $strStunde = "0" . $strStunde; } } else { $strStunde = "00"; } if(!empty($strMinute)) { if(strlen($strMinute) == 1) { $strMinute = "0" . $strMinute; } } else { $strMinute = "00"; } if(empty($strJahr)) { $strJahr = "0000"; } $strDatum = $strJahr . $strMonat . $strTag . $strStunde . $strMinute . "00"; if($strDatum == "00000000000000" && $strTyp == 2) { $strDatum = date("YmdHis"); } return $strDatum; } function tofloat($num) { $dotPos = strrpos($num, '.'); $commaPos = strrpos($num, ','); $sep = (($dotPos > $commaPos) && $dotPos) ? $dotPos : ((($commaPos > $dotPos) && $commaPos) ? $commaPos : false); if (!$sep) { return floatval(preg_replace("/[^0-9]/", "", $num)); } return floatval( preg_replace("/[^0-9]/", "", substr($num, 0, $sep)) . '.' . preg_replace("/[^0-9]/", "", substr($num, $sep+1, strlen($num))) ); } ?>auto_convert_to_utf8==true) $text=$this->convert_to_utf8($text); if ($this->auto_strip_html_tags==true) $text=$this->strip_html_tags($text); if ($this->auto_html_entity_decode==true) $text=$this->html_entity_decode($text); if ($this->auto_strip_punctuation==true) $text=$this->strip_punctuation($text); if ($this->auto_strip_symbols==true) $text=$this->strip_symbols($text); if ($this->auto_strip_numbers==true) $text=$this->strip_numbers($text); if ($this->auto_tolower==true) $text=$this->tolower($text); return $text; } public function tolower($text) { return mb_strtolower( $text, "utf-8" ); } public function convert_to_utf8($text) { return mb_convert_encoding( $text, "utf-8"); } public function html_entity_decode($text) { return html_entity_decode($text, ENT_QUOTES, "utf-8" ); } /** * Remove HTML tags, including invisible text such as style and * script code, and embedded objects. Add line breaks around * block-level tags to prevent word joining after tag removal. */ public function strip_html_tags( $text ) { $text = preg_replace( array( // Remove invisible content '@]*?>.*?@siu', '@]*?>.*?@siu', '@]*?.*?@siu', '@]*?.*?@siu', '@]*?.*?@siu', '@]*?.*?@siu', '@]*?.*?@siu', '@]*?.*?@siu', '@]*?.*?@siu', // Add line breaks before and after blocks '@'; $fullstop = '\x{002E}\x{FE52}\x{FF0E}'; $comma = '\x{002C}\x{FE50}\x{FF0C}'; $arabsep = '\x{066B}\x{066C}'; $numseparators = $fullstop . $comma . $arabsep; $numbersign = '\x{0023}\x{FE5F}\x{FF03}'; $percent = '\x{066A}\x{0025}\x{066A}\x{FE6A}\x{FF05}\x{2030}\x{2031}'; $prime = '\x{2032}\x{2033}\x{2034}\x{2057}'; $nummodifiers = $numbersign . $percent . $prime; return preg_replace( array( // Remove separator, control, formatting, surrogate, // open/close quotes. '/[\p{Z}\p{Cc}\p{Cf}\p{Cs}\p{Pi}\p{Pf}]/u', // Remove other punctuation except special cases '/\p{Po}(?
Fatal error: Call to undefined function dbAbfrage() in /var/www/vhosts/messe-niederrhein.de/httpdocs/site/index.php on line 109