EOF #-------------------------------------------------- var $uid=(split(/\//,$htx))[1]; $path=""; #-------------------------------------------------- sub sub DIR {####################################### ($filename,$cmd)=@_; #-------------------------------------- if($cmd eq "" or $cmd eq "dir") {$cmd="dir"; &dir(); } }####################################### sub DBF {####### ($filename,$cmd)=@_; }####### 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"; my $iadd="_files"; %hash=eval get "$htx$iadd.htx"; $hash{"/$USER{uid}/$dir$filename.htx"}=$_get{info}; del "$htx$iadd.htx"; put serial(%hash), "$htx$iadd.htx"; &page("/$USER{uid}/$dir$filename.htx"); } if($cmd eq "new") { my $date=datum("jetzt","lang"); put "\n", "/$USER{uid}/$dir$filename.htx"; &page("/$USER{uid}/$dir$filename.htx"); } }####### sub HTX_MENU {################### ($filename,$cmd)=@_; out ""; out ""; 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 "" 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 preview {########### my $mhtx="$_[0]"; my $prev=""; $prev.="
"; $prev.="
"; return($prev); }############ sub login {######## my $form=""; $form="
"; $form.=""; $form.=""; $form.=""; $form.=" Kennung: "; $form.=" Passwort: "; $form.="
"; return($form); }############ sub action {############## $filetype=$_[0]; $action=$_[1]; $value=$_[2]; my $style="color:#808080;" if($action eq "$cmd"); my $form=""; $form="
"; $form.=""; $form.=""; $form.=""; $form.=""; $form.=""; $form.="" ; $form.="" if($action eq "new"); $form.="
"; return($form); }############ sub logout {############################ my $form=""; $form="
"; $form.=""; $form.="
"; return($form); }############ sub optiondir {############ my $form=""; my $color=($_get{dir} eq "" ? "#d80000;font-weight:bold":"#000000"); $form="
"; $form.=""; $form.=""; $form.="
"; return($form); }############ sub page {########### $toget=$_[0]; my @PAGE=get "$toget"; my $iadd="_files"; my %hash=eval get "$htx$iadd.htx"; my $keywords=$hash{"$toget"}; out "
"; 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 "", "$htx$iadd.htx"; %hash=eval get "$htx$iadd.htx"; $in=$hash{"$toget"}; out "
"; my $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.=""; foreach(@HTX) { $templates.="
"; } $templates.="
"; my $datenbanken="
"; $datenbanken.=""; $datenbanken.=""; $datenbanken.=""; foreach(@DBF) { $datenbanken.="
"; } $datenbanken.="
"; my $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 "
"; }########## sub no_null_end {############### Leerzeichen am Ende entfernen my $field=$_[0]; $field =~ s/\s*\Z//; return($field); }############### #-------------------------------------------------- ende sub if($cmd eq "login") { if($_get{upw} eq $pw and $_get{use} eq $ke) { $USER{upw}=$pw; $USER{use}=$ke; $USER{uid}=$_get{uid}; $_session{user}= serial %USER; $cmd=$_get{cmd}="dir"; } } #------------------------------------------------- User %USER = eval $_session{user}; #------------------------------------------------- if($USER{uid} eq "") { $LOG=&login(); } else { #------------------------------------------------- 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ü $LOG=&logout(); $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(@_)}, ); }# ende ($USER{uid} eq "") #----------------------------------------------- html out< FileManager $uid ::: Alles aus baseportal herausholen bei123.de - © 2007 www.bei123.de
baseportal.de - genial einfache Web-Datenbank!
$OPT$LOG EOF #------------------------------------------------------------ MENU $datum=datum("jetzt","Tag0.Monat0.Jahr"); if($USER{uid} ne "") { &{$CMD_MENU{$filetype}}($filename,$cmd) ; $path="$USER{uid}/$dir$page$data"; } #-------- out< $datum
$path
EOF #----------------------------------------------------------- CONTENT if($USER{uid} ne "") { &{$CMD_CONTENT{$filetype}}($filename,$cmd); } #--- out "
"; out "bp-Version: $_version - Ausführungszeit: ".runtime; out "
"; out<