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 "
".&action("dir","dir","$dir")."
";
out "
".&action("page","show",$filename)."
";
out "
".&action("page","edit",$filename)."
";
out "
".&action("page","delete",$filename)."
" if($cmd ne "delete");
out "
".&action("page","move",$filename)."
";
out "
".&preview("/$USER{uid}/$dir$filename")."
";
out "
";
}###################
sub DIR_MENU
{###################
($filename,$cmd)=@_;
out "
";
out "
".&action("dir","dir",$filename)."
";
out "
".&action("dir","show",$filename)."
";
out "
".&action("dir","edit",$filename)."
";
out "
".&action("dir","delete",$filename)."
" if($dir ne "");
out "
".&action("dir","move",$filename)."
";
out "
";
}###################
sub DBF_MENU
{###################
($filename,$cmd)=@_;
out "
";
out "
".&action("dir","dir",$filename)."
";
out "
".&action("dir","show",$filename)."
";
out "
".&action("dir","edit",$filename)."
";
out "
".&action("dir","delete",$filename)."
" if($dir ne "");
out "
".&action("dir","move",$filename)."
";
out "
";
}###################
sub preview
{###########
my $mhtx="$_[0]";
my $prev="";
$prev.="";
return($prev);
}############
sub login
{########
my $form="";
$form="";
return($form);
}############
sub action
{##############
$filetype=$_[0];
$action=$_[1];
$value=$_[2];
my $style="color:#808080;" if($action eq "$cmd");
my $form="";
$form="";
return($form);
}############
sub logout
{############################
my $form="";
$form="";
return($form);
}############
sub optiondir
{############
my $form="";
my $color=($_get{dir} eq "" ? "#d80000;font-weight:bold":"#000000");
$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="";
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="";
my $datenbanken="";
my $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