EOF #-------------------------------------filemanager.txt $mhtx=($page ne "" ? "$page.htx":""); $path="$dir$mhtx$data"; sub DIR {($filename,$cmd)=@_; if($cmd eq "" or $cmd eq "dir") {$cmd="dir"; &dir();} } sub DBF { ($filename,$cmd)=@_; if($cmd eq "" or $cmd eq "show") { &data("/$USER{uid}/$dir$filename"); } if($cmd eq "dump") { &data_dump("/$USER{uid}/$dir$filename",".fields"); } } sub HTX {($filename,$cmd)=@_; if($cmd eq "" or $cmd eq "show") {&page("/$USER{uid}/$dir$filename.htx");} if($cmd eq "edit") {&editpage("/$USER{uid}/$dir$filename.htx",$filename,$dir);} if($cmd eq "mod") {my $mText=$_get{Text}; $mText=&no_null_end($mText); mod $mText, "/$USER{uid}/$dir$filename.htx"; %hash=eval get "/$USER{uid}/.htx"; $hash{keywords}{"/$USER{uid}/$dir$filename.htx"}=$_get{info}; del "/$USER{uid}/.htx"; put serial(%hash), "/$USER{uid}/.htx"; &page("/$USER{uid}/$dir$filename.htx");} if($cmd eq "new") {my $date=datum("jetzt","lang"); $_error=""; $_error=&check_filename($filename); if($_error eq "") {put "\n", "/$USER{uid}/$dir$filename.htx"; &page("/$USER{uid}/$dir$filename.htx");} else {$filename="";} } } sub HTX_MENU {($filename,$cmd)=@_; out ""; out ""; $_error=""; $_error=&check_filename($filename); if($_error eq "") { out ""; out ""; #out "" if($cmd ne "delete"); #out ""; out ""; } out "
".&action("dir","dir","$dir")."".&action("page","show",$filename)."".&action("page","edit",$filename)."".&action("page","delete",$filename)."".&action("page","move",$filename)."".&preview("/$USER{uid}/$dir$filename")."
";} sub DIR_MENU {($filename,$cmd)=@_; out ""; out ""; #out ""; #out ""; #out "" if($dir ne ""); #out ""; out "
".&action("dir","dir",$filename)."".&action("dir","show",$filename)."".&action("dir","edit",$filename)."".&action("dir","delete",$filename)."".&action("dir","move",$filename)."
";} sub DBF_MENU {($filename,$cmd)=@_; out ""; out ""; out ""; #out ""; out ""; #out ""; #out ""; out ""; out "
".&action("dir","dir",$dir)."".&action("data","show",$filename)."".&action("data","edit",$filename)."".&action("data","dump",$filename)."".&action("data","delete",$filename)."".&action("data","move",$filename)."".&preview_dbf("/$USER{uid}/$dir$filename")."
";} sub preview {my $mhtx="$_[0]"; my $prev=""; $prev.="
"; $prev.="
"; return($prev);} sub preview_dbf { my $file="$_[0]"; my $_add="_temp"; my $mhtx="$htx$_add"; put "","$mhtx.htx"; mod "Preview ::: $file - Alles aus baseportal herausholen bei123.de - © 2007 www.bei123.de","$mhtx.htx","force" ; my $prev=""; $prev.="
"; #$prev.=""; $prev.="
"; return($prev); } sub optiondir {my $form=""; my $color=($_get{dir} eq "" ? "#d80000;font-weight:bold":"#000000"); $form="
"; $form.=""; $form.=""; $form.=""; $form.="
"; return($form);} sub data {my $toget=$_[0]; my $_add=".fields"; put "", "/$USER{uid}/.htx"; my %hash=eval get "/$USER{uid}/.htx"; my $keywords=$hash{keywords}{"$toget"}; out "
Keywords: $keywords
"; out "
"; get "Id==*","$toget"; out "

$toget

"; out "

Datensätze: $_amount

Felder:

"; get "Id=*", "$toget$_add", "felder"; push @fieldset, $Field while (get_next("felder")); out ""; out "
";} sub keywords {my $toget=$_[0]; put "", "/$USER{uid}/.htx"; my %hash=eval get "/$USER{uid}/.htx"; my $keywords=$hash{keywords}{"$toget"}; out "
Keywords: $keywords
"; } sub data_dump {my $toget=$_[0]; my $_add=""; %dbf_file=""; $_add=$_[1]; &keywords($toget); out "
"; get "$toget$_add","dbf_file"; out "

$toget$_add

"; outl dump(%dbf_file); out ""; out "
";} sub page {$toget=$_[0]; my @PAGE=get "$toget"; put "", "/$USER{uid}/.htx"; my %hash=eval get "/$USER{uid}/.htx"; my $keywords=$hash{keywords}{"$toget"}; out "
Keywords: $keywords
"; out "
"; out ""; foreach(@PAGE) { outl convert_html($_); } out ""; out "
";} sub editpage {$toget=$_[0]; $filename=$_[1]; $dir=$_[2]; my @PAGE=get "$toget","raw"; #my $iadd="_files"; put "", "/$USER{uid}/.htx" ; %hash=eval get "/$USER{uid}/.htx"; $in=$hash{keywords}{"$toget"}; out "
"; my $form=""; $form="
"; $form.=""; $form.=""; $form.=""; $form.=""; $form.=""; $form.=""; $form.="" ; $form.="Keywords für $toget
"; $form.="" ; $form.="
Inhalt von $toget
"; $form.=""; $form.="
"; out $form; out "
";} sub dir {@DIR=get "/$USER{uid}/$dir","dir,join" ; $anzDIR=@DIR; @HTX=get "/$USER{uid}/$dir", "join,htx,cut"; #$anzHTX=@HTX; @DBF=get "/$USER{uid}/$dir", "db,join"; $anzDBF=@DBF; my $templates="
"; $templates.=""; $templates.=""; $templates.=""; $templates.=""; $templates.=""; $templates.=""; $anzHTX=0; foreach(@HTX) { $templates.="
" if($_ ne ""); $anzHTX++ if($_ ne ""); } $templates.="
"; my $datenbanken="
"; $datenbanken.=""; $datenbanken.=""; $datenbanken.=""; $datenbanken.=""; $datenbanken.=""; $datenbanken.=""; foreach(@DBF) { $datenbanken.="
"; } $datenbanken.="
"; my $verzeichnisse="
"; $verzeichnisse.=""; $verzeichnisse.=""; $verzeichnisse.=""; $verzeichnisse.=""; $verzeichnisse.=""; $verzeichnisse.=""; if($dir ne "") { my @mdir=split(/\//,$dir); pop(@mdir); $mdir=(@mdir>=1 ? join("/",@mdir)."/" : ""); $verzeichnisse.=" «
"; } foreach(@DIR) { $verzeichnisse.="
"; } $verzeichnisse.="
"; out "
$anzHTX Templates"; out &action("page","new"); out "$templates
"; out "
$anzDBF Datenbanken"; #out &action("data","new"); out "

$datenbanken
"; out "
$anzDIR Verzeichnisse"; #out &action("dir","new"); out "

$verzeichnisse
"; out "
"; } #---------------------------- ende sub #----------------------------- file if($_get{filetype} eq"") {###################### $filetype="dir"; $filename="$_get{dir}"; #---------------------- if($_get{data}) { $filetype="data"; $filename="$_get{data}"; } elsif($_get{page}) { $filetype="page"; $filename="$_get{page}"; } else { $filetype="dir"; $filename="$_get{dir}"; } }###################### else { $filename=$_get{$_get{filetype}}; } #---------------------------- menü $OPT=&optiondir(); %CMD_CONTENT = ( 'page' => sub {&HTX(@_)}, 'data' => sub {&DBF(@_)}, 'dir' => sub {&DIR(@_)}, ); %CMD_MENU = ( 'page' => sub {&HTX_MENU(@_)}, 'data' => sub {&DBF_MENU(@_)}, 'dir' => sub {&DIR_MENU(@_)}, ); #--------------------------- html out<