vorhanden ist !!'); if (file_exists($ufile) && !is_dir($ufile)){ if ($lfile = fopen($ufile, 'r')){ errorlog('File gefunden.'); while (!feof ($lfile)){ $line = trim(fgets ($lfile, 4096)); if (substr($line,0,2) != '//'){ //Kommentar an den erste zwei Positionen herausfiltern $zeile_nr++; // a Anker oder b Both $k = 0; // Durchlesen aller oder Tags while (++$k<=$uanz_ueberschriften){ SetActTag('h'.$k.'a'); // Aktives Tag setzten while (strpos($line,$act_htmltag) !== false ) { $param_block = GetParamBlock($line); // Inhalt des Tags holen list($anker['menuetextk'][$j],$anker['menuetextl'][$j],$anker['menuelink'][$j]) = split(',',$param_block); $j++; $line = GetNewTag($param_block,'',$line); } } } } fclose($lfile); } } return $anker; } // Aktuellen Tag setzten function SetActTag($tag){ global $act_nr; $act_nr = 0; global $act_tag; $act_tag = $tag; global $act_htmltag; $act_htmltag = ''; } // Aktuellen Tag ersetzten function ResetActTag($tag){ global $act_tag; $act_tag = $tag; global $act_htmltag; $act_htmltag = '',$param_start_pos); // kompletten block bis abschliessendem '>' ausschneiden return(substr($line, $param_start_pos, $param_ende_pos - $param_start_pos)); } // Ersetzt das alte Tag mit dem neuen Wert function GetNewTag($param_block,$html_code,$line){ global $act_tag; global $act_max; global $act_htmltag; global $act_nr; global $act_endtag; global $zeile_nr; if ($act_nr++ > $act_max){ errorlog( "######################################################\n"); errorlog( "######################################################\n"); errorlog( "ACHTUNG TAGFEHLER STELLE '.$act_tag.' Zeile ".$zeile_nr."\n"); errorlog( "Zeilentext:".$line."\n"); errorlog( "######################################################\n"); errorlog( "######################################################\n"); exit; // Notaustieg bei falschem tag } return(str_replace($act_htmltag.$param_block.$act_endtag,$html_code,$line)); } // Gibt Linkbutton für indexe.php zurück (einhängen con files und links) function GetEditButton($typ,$file,$alttext,$button,$err_button,$efile,$sys_admin){ global $act_nr; global $act_tag; global $zeile_nr; $lanker = GetHtmlAnker(); if ($sys_admin){ $htmlfunktion = 'onclick=Aktionsbutton("'.$typ.'",'. // Kennung IMG (Achtung kein Blank lassen !!!! '"'.$act_tag.'",'. '"'.$file.'",'. // htmlFile to edit '"'.$efile.'",'. // File das angezeigt wird $zeile_nr.','. // Zeilennummer $act_nr.','. // Tagnummer '"'.$lanker.'"'. // Anker ')'; $htmltext['ok'] = ''. ''.$alttext.''; $htmltext['err'] = ''. ''.$alttext.''; }else{ $htmltext['ok'] = ''; $htmltext['err'] = ''; } return $htmltext; } function scramble($u_tab){ $r_tab = array(); while(count($u_tab) > 0){ $i = rand(0,count($u_tab)-1); array_push($r_tab,$u_tab[$i]); $u_tab[$i] = chr(255); sort($u_tab); array_pop($u_tab); } return $r_tab; } function GetHtmlAnker() { global $act_tag; global $act_nr; global $zeile_nr; return($act_tag.'anker-z'.$zeile_nr.'-n'.$act_nr); } ?>