'; $output .= "
callHook('permalink', $permalink, $date, $url, $section); return $permalink; } function archive() { if(JLOG_CLEAN_URL === true) return JLOG_PATH."/archive"; else return JLOG_PATH."/archive.php"; } // get year links class Year_Links { function Year_Links($get, $start, $page, $l, $cat="") { $date = getdate(); $this->_now = $date['year']; $this->_start = $start; $this->_page = $page; $this->_l = $l; if(JLOG_CLEAN_URL === true) { if($cat != "") { list($tmp, $cat) = explode("=", $cat); $this->cat = "/cat/".$cat; } } elseif($cat !== "") $this->cat = $cat."&"; if($get >= $this->_start OR $get <= $this->_now AND preg_match("[0-9]", $get)) $this->year = $get; else $this->year = $this->_now; } function get_linklist() { for($y = $this->_start; $y <= $this->_now; $y++) { if($y != $this->_start) $years_links .= " | "; if($y == $this->year) $years_links .= " ".$y.""; else { if(JLOG_CLEAN_URL === true) $years_links .= " ".$y."\n"; else $years_links .= " cat."y=".$y."'>".$y."\n"; } } return $this->_l['content_choose_year'].$years_links; } function get_admin_linklist() { for($y = $this->_start; $y <= $this->_now; $y++) { if($y != $this->_start) $years_links .= " | "; if($y == $this->year) $years_links .= " ".$y.""; else $years_links .= " ".$y."\n"; } return $this->_l['content_choose_year'].$years_links; } // get selected year function get_selected_year() { return $this->year; } } // kill Magic Quotes function strip($_data) { if (!get_magic_quotes_gpc()) return $_data; else { if (is_array($_data)) foreach($_data as $key => $val) $_data[$key] = strip($val); else $_data = stripslashes($_data); return $_data; } } // escape input for mysql function escape_for_mysql($_data) { if (is_array($_data)) foreach($_data as $key => $val) $_data[$key] = escape_for_mysql($val); else $_data = mysql_escape_string($_data); return $_data; } // htmlspecialchars a whole array function array_htmlspecialchars($_data) { if (is_array($_data)) foreach($_data as $key => $val) $_data[$key] = array_htmlspecialchars($val); else $_data = htmlspecialchars($_data, ENT_QUOTES); return $_data; } // Fehler ausgeben function error_output($errors, $id = "", $headline = false) { global $l; $error = ""; if($headline === false) $headline = $l["error"]; if(isset($errors)) { if(strlen($headline) > 0) $error = "\n
\n"; echo $trash->getError(); echo "\n"; die(); } return true; } // output a teaser function do_teaser($data, $cc, $pre = '
\n"; echo $comments->getError(); echo "\n"; die(); } // -- Anzahl der jeweiligen Kommentare $com = array(); while($c = $comments->fetch()) $com[$c['reference']] = $c['count']; ### Plugin Hook global $plugins; $com = $plugins->callHook('countComments', $com); return $com; } if (!function_exists('is_a')) { function is_a($object, $class) { if (!is_object($object)) { return false; } if (get_class($object) == strtolower($class)) { return true; } else { return is_subclass_of($object, $class); } } } if (!function_exists("stripos")) { function stripos($str,$needle,$offset=0) { return strpos( strtolower($str), strtolower($needle), $offset ); } } if(!function_exists('str_ireplace')){ function str_ireplace($search, $replace, $subject){ if(is_array($search)){ array_walk($search, create_function('&$pat, $key', '"/".preg_quote($pat, "/")."/i"')); } else{ $search = '/'.preg_quote($search, '/').'/i'; } return preg_replace($search, $replace, $subject); } } if ( !function_exists('file_put_contents') && !defined('FILE_APPEND') ) { define('FILE_APPEND', 1); function file_put_contents($n, $d, $flag = false) { $mode = ($flag == FILE_APPEND || strtoupper($flag) == 'FILE_APPEND') ? 'a' : 'w'; $f = @fopen($n, $mode); if ($f === false) { return 0; } else { if (is_array($d)) $d = implode($d); $bytes_written = fwrite($f, $d); fclose($f); return $bytes_written; } } } function my_serialize_cfg($arg) { if(is_string($arg)) return "'".preg_replace("/'/","\\'",$arg)."'"; elseif(is_integer($arg)) return (string)$arg; elseif(is_float($arg)) return (string)$arg; elseif(is_null($arg)) return 'NULL'; elseif(is_bool($arg)) { if($arg) return 'true'; else return 'false'; } elseif(is_array($arg)) { $retval = 'Array('; foreach($arg as $key => $value) { $retval .= my_serialize_cfg($key).' => '.my_serialize_cfg($value).','; } $retval .= ')'; return $retval; } else die("unsupported type! ".gettype($arg)); } class JLOG_Tags { var $tree = array(); function JLOG_Tags($body) { preg_match_all('/