set_level(CLOG_NOTICE); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add a debug log * @access public * @return void **/ function debug($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_DEBUG); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add a warning log * @access public * @return void **/ function warning($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_WARNING); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add an error log * @access public * @return void **/ function error($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_ERROR); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add a fatal error and stops the program/script * @access public * @return void **/ function fatal($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_FATAL); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); die(); } /**************************************************************************************** * Main functions *****************************************************************************************/ /** * Main logging function * @access public * @return void **/ function log($in_errstr) { $this->m_lastErrorString = $in_errstr; if ($this->m_level >= CLOG_LVL_DISPLAY_LEVEL) { $this->display_error(); } if ($this->m_level >= CLOG_LVL_WRITE_TO_FILE) { $this->log_to_file(); } if (CLOG_ALLOW_SENDING_EMAIL && $this->m_level >= CLOG_LVL_EMAIL) { $this->email_error(); } } /** * Displays this error/log to screen * @access private * @return void * @author Rolf Wessels rolfdw[at]gmail.com **/ function display_error() { echo '
'."\n".$this->get_levelName().'
'; echo ($this->m_lastErrorString); if (!empty($this->m_fileName) ) echo "
File: ".$this->m_fileName; if (!empty($this->m_lineNumber) ) echo "   (#$this->m_lineNumber)"; echo '
'."\n"; echo '
'."\n"; } /** * Write the error to file * @access private * @return void * @author Rolf Wessels rolfdw[at]gmail.com **/ function log_to_file() { $line = date(CLOG_DEFAULT_DATETIME_FORMAT)." : *** ".str_pad($this->get_levelName(),8); $line .= $this->m_lastErrorString; if (!empty($this->m_fileName) ) $line .= " (F-$this->m_fileName)"; if (!empty($this->m_lineNumber) ) $line .= " (#-$this->m_lineNumber)"; $line .= "\n"; $this->writeLineToFile($this->get_levelFileName(), $line); } /** * get the full file name for a level * @access private * @return string * @author Rolf Wessels rolfdw[at]gmail.com **/ function get_levelFileName() { $fileName= ""; switch ($this->m_level) { case CLOG_DEBUG: $fileName .= CLOG_LOG_FILE_DEBUG; break; case CLOG_NOTICE: $fileName .= CLOG_LOG_FILE_NOTICE; break; case CLOG_WARNING: $fileName .= CLOG_LOG_FILE_WARNING; break; case CLOG_ERROR: $fileName .= CLOG_LOG_FILE_ERROR; break; default: $fileName .= CLOG_LOG_FILE_ERROR; } return CLOG_LOG_FILE_PATH.$fileName; } /** * Writes a line to a file also makes sure that the file does not exceed 1 Meg in size * @param $inFileName * @param $inLine * @access private * @return void * @author Rolf Wessels rolfdw[at]gmail.com **/ function writeLineToFile($inFileName,$inLine) { $handle = fopen($inFileName, "a"); fputs($handle,$inLine); fclose($handle); ////////////////////// // check the file size > if it is over a meg leave only a last 2000 lines if (filesize($inFileName) > (1*1024*1024)) { $file = file($inFileName); $handle = fopen($inFileName, "w"); for ($k = (count($file)-2000) ; $k < count($file) ; $k++) { fputs($handle,$file[$k]); } fputs($handle,$in_line); fclose($handle); } } /** * This function will email the error to set recipients * @access private * @return void * @author Rolf Wessels rolfdw[at]gmail.com **/ function email_error() { $line = date(CLOG_DEFAULT_DATETIME_FORMAT)." : *** ".str_pad($this->get_levelName(),8); $line .= $this->m_lastErrorString; if (!empty($this->m_fileName) ) $line .= " (F-$this->m_fileName)"; if (!empty($this->m_lineNumber) ) $line .= " (#-$this->m_lineNumber)"; $line .= "\n"; //////////////////// // This is just an example. I would suggest you overite this function // and use the nice class provided by Brent R. Matzelle http://www.phpclasses.org/browse/package/264.html $domain = str_replace("www.", "", $_SERVER['SERVER_NAME']); $botmail = "error-bot@".$domain; $receivermail = CLOG_SEND_EMAIL_TO; $subject = CLOG_SEND_EMAIL_SUBJECT; $priorities = array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' ); $priority = $priorities[2]; $message = "The following error has occured:\n\n $line"; $headers = "From: $botmail\n"; // Who the email was sent from $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/plain; charset=ISO-8859-1\n"; // $headers .= "Content-Type: text/html; charset=ISO-8859-1\n"; $headers .= "X-Priority: $priority\n"; // The priority of the mail // $headers .= "CC: $toCC\n"; // If you want to CC: someone the same mail mail($receivermail, $subject, $message, $headers); } /**************************************************************************************** * Get Set Functions *****************************************************************************************/ /** * get the level name * @access public * @return string * @author Rolf Wessels rolfdw[at]gmail.com **/ function get_levelName() { $type= ""; switch ($this->m_level) { case CLOG_DEBUG: $type .= "DEBUG"; break; case CLOG_NOTICE: $type .= "NOTICE"; break; case CLOG_WARNING: $type .= "WARNING"; break; case CLOG_ERROR: $type .= "ERROR"; break; default: $type .= "OTHER"; } return $type; } /** * Get the variable m_lastErrorString * @return string m_lastErrorString **/ function get_lastErrorString() { return $this->m_lastErrorString; } /** * Set variable m_lastErrorString * @param string in_lastErrorString **/ function set_lastErrorString($in_lastErrorString) { $this->m_lastErrorString = $in_lastErrorString; } /** * Get the variable m_lineNumber * @return int m_lineNumber **/ function get_lineNumber() { return $this->m_lineNumber; } /** * Set variable m_lineNumber * @param int in_lineNumber **/ function set_lineNumber($in_lineNumber) { $this->m_lineNumber = $in_lineNumber; } /** * Get the variable m_fileName * @return string m_fileName **/ function get_fileName() { return $this->m_fileName; } /** * Set variable m_fileName * @param string in_fileName **/ function set_fileName($in_fileName) { $this->m_fileName = $in_fileName; } /** * Get the variables m_level * @return int m_level **/ function get_level() { return $this->m_level; } /** * Set variable m_level * @param int in_level **/ function set_level($in_level) { $this->m_level = $in_level; } } // end of class definition Clog if (defined('CLOG_OVERRIDE_ERROR_HANDLER') && CLOG_OVERRIDE_ERROR_HANDLER) { set_error_handler("ClogErrorHandler"); } function ClogErrorHandler($errno, $errstr, $errfile, $errline) { $errortype = array ( E_ERROR => "Error", E_WARNING => "Warning", E_PARSE => "Parsing Error", E_NOTICE => "Notice", E_CORE_ERROR => "Core Error", E_CORE_WARNING => "Core Warning", E_COMPILE_ERROR => "Compile Error", E_COMPILE_WARNING => "Compile Warning", E_USER_ERROR => "User Error", E_USER_WARNING => "User Warning", E_USER_NOTICE => "User Notice" ); switch ($errno) { case E_ERROR: Clog::error( $errstr, $errfile, $errline); break; case E_NOTICE: Clog::notice( $errstr, $errfile, $errline); break; case E_WARNING: Clog::warning( $errstr, $errfile, $errline); break; default: Clog::error( $errortype[$errno]." ".$errstr, $errfile, $errline); } } ?> Firmenlauf Neunkirchen

Sponsorenpakete

Nutzen Sie die Chance auf positive Aufmerksamkeit für Ihr Unternehmen.

Sponsorenpaket Classic

  • Werbebanner (bis zu 4x1m) im Bereich des Veranstaltungsareals oder der Laufstrecke
  • Platzierung des Logos auf www.firmenlauf-neunkirchen.at
  • Gutschein & Logo im Gutscheinheft* (wird an jede/n angemeldete/n Teilnehmer/in ausgegeben, ca. 2000 Personen)
  • Platzierung des Logos auf der Sponsorenwand der Hauptbühne
  • Tischreservierung im Sponsorenbereich (Anmeldung erforderlich)
  • 10 % Rabatt auf alle Teamanmeldungen

Sponsorenpaket Classic: € 350,- exkl. USt

* 1 Seite frei gestaltbar. Auf Wunsch und Anfrage Gestaltung auch durch unsere Grafikabteilung um € 150,00 exkl. USt möglich.

Melden Sie sich gleich an:

Die mit * gekennzeichneten Felder sind Pflichtfelder.