0) { $ret = $stunden." Stunden ".$minuten." Minuten ".$sekunden." Sekunden"; } return $ret; } function addWYSIWYG($val,$w=650,$h=400) { if($val === true) { $wysiwyg_width = $w; $wysiwyg_height = $h; ob_start(); require_once(KS_LIB_DIR."wysiwyg.js.php"); $wysiwyg_value = ob_get_contents(); ob_end_clean(); } else { $wysiwyg_value = ""; } return $wysiwyg_value; } function convert_value($wert,$typ) { if($typ == 1) { $neuer_wert = utf8_decode($wert); } else { $neuer_wert = htmlentities(utf8_encode($wert),ENT_QUOTES,"UTF-8"); } return $neuer_wert; } function cont_decode($var) { $search_arr = array("ä","Ä","ö","Ö","ü","Ü","&","ß","
","strong>","","","em>","§","•"); $replace_arr = array("","","","","","","&","","\n","b>","","","i>","","-"); for($i=0;$i\n"; if($leer === true) { $ret .= "\n"; } for($a=1;$a<32;$a++) { $a_sel = ($d == $a ? "selected" : ""); $ret .= "\n"; } $ret .= "\n"; $ret .= "\n"; $ret .= "\n"; if($showTime === true) { $ret .= "  /  "; $ret .= "\n"; $ret .= "\n"; } return $ret; } function checkIfSSL() { $serverPort = $_SERVER["SERVER_PORT"]; $url = parse_url($_SERVER["SCRIPT_URI"]); $imgProtocol = $url["scheme"]; if($serverPort == "443" || $imgProtocol == "https") { return true; } else { return false; } } function FE_getSettings($db_conn) { $sql = "select * from ".TBL_SETT." where id = 1"; $getdata = db_query($sql,$db_conn); $data = db_fetch_array($getdata); return $data; } function str2date($str,$mode=1,$tag=false) { $tstamp = strtotime($str); $ret = ""; if($tag === true) { $ret .= get_day(date("w",$tstamp)).", "; } $ret .= date("d",$tstamp).". "; $ret .= get_month(date("m",$tstamp))." ".date("Y",$tstamp); if($mode == 1) { $ret .= " / ".date("H:i",$tstamp)." Uhr"; } return $ret; } function cmp($a,$b) { if($a == $b) { return 0; } return ($a < $b) ? -1 : 1; } function getKatListe($id,$db_conn) { $ret = array(); $ret[] = $id; $sql1 = "select id, linktitel from ".TBL_KAT." where parentid = ".$id.""; $getdata1 = db_query($sql1,$db_conn); $numdata1 = db_num_rows($getdata1); for($a=0;$a<$numdata1;$a++) { $a_id = db_result($getdata1,$a,"id"); $a_name = db_result($getdata1,$a,"linktitel"); $ret[] = $a_id; $sql2 = "select id, linktitel from ".TBL_KAT." where parentid = ".$a_id.""; $getdata2 = db_query($sql2,$db_conn); $numdata2 = db_num_rows($getdata2); for($b=0;$b<$numdata2;$b++) { $b_id = db_result($getdata2,$b,"id"); $b_name = db_result($getdata2,$b,"linktitel"); $ret[] = $b_id; } } return $ret; } function Kat2Liste($db_conn) { $ret = array(); $sql1 = "select id, linktitel, parentid, bezeichnung, seo_titel from ".TBL_KAT." where parentid = 0 and kstatus = 1 order by sortierung"; $getdata1 = db_query($sql1,$db_conn); $numdata1 = db_num_rows($getdata1); for($a=0;$a<$numdata1;$a++) { $a_id = db_result($getdata1,$a,"id"); $a_titel = db_result($getdata1,$a,"linktitel"); $a_pid = db_result($getdata1,$a,"parentid"); $a_name = db_result($getdata1,$a,"bezeichnung"); $a_seo = db_result($getdata1,$a,"seo_titel"); $ret[$a]['id'] = $a_id; $ret[$a]['titel'] = $a_titel; $ret[$a]['name'] = $a_name; $ret[$a]['level'] = 1; $ret[$a]['parentid'] = $a_pid; $ret[$a]['seotitel'] = $a_seo; $sql2 = "select id, linktitel, parentid, bezeichnung from ".TBL_KAT." where parentid = ".$a_id." and kstatus = 1 order by sortierung"; $getdata2 = db_query($sql2,$db_conn); $numdata2 = db_num_rows($getdata2); for($b=0;$b<$numdata2;$b++) { $b_id = db_result($getdata2,$b,"id"); $b_titel = db_result($getdata2,$b,"linktitel"); $b_pid = db_result($getdata2,$b,"parentid"); $b_name = db_result($getdata2,$b,"bezeichnung"); $ret[$a]['sub'][$b]['id'] = $b_id; $ret[$a]['sub'][$b]['titel'] = $b_titel; $ret[$a]['sub'][$b]['name'] = $b_name; $ret[$a]['sub'][$b]['level'] = 2; $ret[$a]['sub'][$b]['parentid'] = $b_pid; $sql3 = "select id, linktitel, parentid, bezeichnung from ".TBL_KAT." where parentid = ".$b_id." and kstatus = 1 order by sortierung"; $getdata3 = db_query($sql3,$db_conn); $numdata3 = db_num_rows($getdata3); for($c=0;$c<$numdata3;$c++) { $c_id = db_result($getdata3,$c,"id"); $c_titel = db_result($getdata3,$c,"linktitel"); $c_pid = db_result($getdata3,$c,"parentid"); $c_name = db_result($getdata3,$c,"bezeichnung"); $ret[$a]['sub'][$b]['sub'][$c]['id'] = $c_id; $ret[$a]['sub'][$b]['sub'][$c]['titel'] = $c_titel; $ret[$a]['sub'][$b]['sub'][$c]['name'] = $c_name; $ret[$a]['sub'][$b]['sub'][$c]['level'] = 3; $ret[$a]['sub'][$b]['sub'][$c]['parentid'] = $c_pid; } } } return $ret; } function getWgrListe($nr,$db_conn) { $wgr = array(); if($nr == "0") { $sql1 = "select id from ".TBL_WGR." where wstatus = 1"; $getdata1 = db_query($sql1,$db_conn); $numdata1 = db_num_rows($getdata1); for($a=0;$a<$numdata1;$a++) { $a_id = db_result($getdata1,$a,"id"); $sql2 = "select t1.wgnr as wgnr, t2.id as id from ".TBL_WG2HS." t1, ".TBL_WGR_LIST." t2 where t1.wgnr = t2.wgnr and t2.wstatus = 1 and hsid = ".$a_id.""; $getdata2 = db_query($sql2,$db_conn); $numdata2 = db_num_rows($getdata2); for($b=0;$b<$numdata2;$b++) { $b_nr = db_result($getdata2,$b,"wgnr"); $b_id = db_result($getdata2,$b,"id"); $wgr[] = $b_nr; } } } else { if(unidata(TBL_WGR,'wstatus','id = '.$nr.'',$db_conn) == 1) { $sql2 = "select t1.wgnr as wgnr, t2.id as id from ".TBL_WG2HS." t1, ".TBL_WGR_LIST." t2 where t1.wgnr = t2.wgnr and t2.wstatus = 1 and hsid = ".$nr.""; $getdata2 = db_query($sql2,$db_conn); $numdata2 = db_num_rows($getdata2); for($b=0;$b<$numdata2;$b++) { $b_nr = db_result($getdata2,$b,"wgnr"); $b_id = db_result($getdata2,$b,"id"); $wgr[] = $b_nr; } } } return $wgr; } function WgrListe2SQL($arr) { $ret = ""; if(sizeof($arr) > 0) { $ret = "("; for($k=0;$kdocument.location.href='content.php".$cmd."'"; } function return_2_popup($cmd) { echo ""; } function return_2_login() { echo ""; } function refresh_opener($page) { echo ""; } function close_window() { echo ""; } function alert_msg($msg) { echo ""; } function return_2_fe($page,$ssl = 0) { if($page != '') { $cmd = "?aktion=".$page; } else { $cmd = ""; } if($ssl == 1) { $retpath = DATEISSLPFAD; } else { $retpath = DATEIPFAD; } echo ""; } function write_msg($msg,$title = "Es ist ein Fehler aufgetreten ...") { $cont = "
"; $cont .= "
"; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= ""; $cont .= "
".$title."
 
"; $cont .= ""; $cont .= $msg."
 
\"\"
"; $cont .= "
"; return $cont; } ?>