######## allg. Variablen für js-Routinen $cline=qq(=)x65; ######## &cms_data(); sub cms_data { #------------------------------------------------------------- $sel=qq(Datei==!bp-Office); #------------------------------------------------------------- $db="/bei123/Demo/CMS_AJAX_Kopie"; #------------------------------------------------------------- @_FIELDS=("Data_name","Data_out","Data_content","Data_author"); %_DB=&bei123_DataHasher("$db","$sel","Inhalt","",""); #------------------------------------------ } sub un_esc {## my $un_e=$_[0]; $un_e =~ s#\$#\\\$#g; $un_e =~ s#\@#\\\@#g; return($un_e); }## #-------------------------------------------------------------- %ENTITIES sub entities {## #---------------- my $ent=$_[0]; $usp=" " x 50; #---------------- map{$ent =~ sÞ&bei123_$_;Þ$Entities{$_}Þgime}keys(%Entities); return("$ent"); }## $Entities{bp}=qq(baseportal); $Entities{bp18}=qq(baseportal); $Entities{datum}=${$_DB{Data_date}}[$_FID{$_ID}]; $Entities{heute}=datum("jetzt","Wochentag, Tag.Monatname.Jahr"); $Entities{page}=un_esc(${$_DB{Data_name}}[$_FID{$_ID}]); $Entities{author}="Author: ".convert_html(${$_DB{Data_author}}[$_FID{$_ID}])."(".${$_DB{Data_date}}[$_FID{$_ID}].")"; $Entities{url}=qq($pic_url); $Entities{code}=qq($pic_code); $Entities{home}=qq($pic_home); $Entities{sitemap4}=qq($pic_sitemap RELAOD); $Entities{search}=qq($pic_search); $Entities{chronik}=qq($pic_chronik); $Entities{navig}=qq($pic_chronik); $Entities{admin}=qq($pic_admin); $Entities{sitemap}=qq($pic_sitemap); $Entities{search4}=qq($pic_search4 Search); $Entities{ATT}=qq( title="DEMO Eintitie(Attribut) von bei123/onwork !" onClick=(alert(tagName)) ); $Entities{script}=qq( style="cursor:pointer;border-bottom:1px dashed #191970" onMouseOver=(RUN("MODUS=SRC&"+encodeURI(this.getAttribute("scr"))+"&"+encodeURI(document.getElementById(this.getAttribute("for")).getAttribute("var"))+"")) onClick=(eval(document.getElementById(this.getAttribute("for")).innerHTML))); #--------------------------------------------------------- ENDE %ENTITIES ##################################### zulässige CMD's /// NOCH verarbeiten %bei123_RUN_CMD_HASH=( SITEMAP => ["SiteMap/Übersicht",""], START => ["Willkommem/Start",""], SEARCH => ["Suchen/Search",""], CHRONIK => ["Verlauf/Chronik",""], CMS => ["",""], ADD => ["",""], DEL => ["",""], MOD => ["",""], DO_ADD => ["",""], DO_DEL => ["",""], DO_MOD => ["",""], DO_CMS => ["",""], CODE => ["Code-Informationen",""] ); ######################################################### SYSTEM ORDNEN !! #------------------------------------------------------------------------------- REGEX @bei123_regex=("link","dir","content","menu"); @bei123_regex_attribute=("value","title","param","page","type","class","style","item","size"); $bei123_regex=\@bei123_regex; $bei123_regex_attribute=\@bei123_regex_attribute; sub regex {## Auswertung eigener einfacher Tags $R_error=""; #------------------------------------------------------------------- $Regex_Return =""; #------------------------------------------------------------------- my $rtype = $_[0]; my $reg = $_[1]; #--------------------------------- $reg = &entities($reg); #--------------------------------- %reg = (); #------------------------------------------------------- $Reg_A = join("|",(map{$_."::"}@$bei123_regex_attribute)) ; $reg =~ s/($Reg_A)/₪$1₪/gim; $reg =~ s/::\₪/\₪/gim; my @reg = split(/\₪/,$reg); shift(@reg); %reg = map{lc(shift(@reg)) => "".&no_null_end(&no_null_begin(shift(@reg)))."" }@reg; #----------------------------------------------------------------------------------------------- #$reg{param}=~ s/ //gm; # Leerzeichen bei Parameter z.B.:(CMD =DO& _ID =15) entfernen $reg{class} =~ s/ //gm; # Leerzeichen bei Parameter z.B.:(CMD =DO& _ID =15) entfernen #----------------------------------------------------------------------------------------------- $reg{page} =~ s#\\\$#\$#g; $reg{page} =~ s#\\\@#\@#g; #------------------------- $pID = $_PAGE{"$reg{page}"}; $pPage = $reg{page}; $pType = lc($reg{type}); $pClass = $reg{class}; $pTitle = $reg{title}; $pParam = $reg{param}; $pStyle = $reg{style}; $pItem = lc($reg{item}); $pSize = $reg{size}; #-------------------------------------------------------------------------------------------# eigene tags #------------------------------------------------ link,content,dir,menu if($rtype eq "link") {&bei123_regex_link(); return($Regex_Return); } elsif($rtype eq "content") {$ct_value = $reg{value};$ct_value =~ s/ //gm;$ct_value="" if($ct_value =~ /\D/ ); #-------------------------------------- if($ct_value eq "") {my $ct_item=qq($reg{value});my $value_item="\$ct_value=$ct_item";eval($value_item); $ct_value="" if($ct_value =~ /\D/ );} #-------------------------------------- &bei123_regex_content(); #return($Regex_Return); } elsif($rtype eq "dir") {$mdir="";&bei123_regex_dir();$Regex_Return=$mdir; #return($Regex_Return); } elsif($rtype eq "menu") {$Regex_Return=&bei123_regex_menu($pItem); } else {#-------------------------------------# rtype existiert nicht $Regex_Return=qq(

Error

); return($Regex_Return); } ###################### ###################### }##----------------------------------------------------------------------------- END REGEX sub bei123_regex_menu {## $pItem=$_[0]; $Regex_Return=""; #-------------------- if($pItem eq "sitemap") {###################### SITEMAP if(keys(%{$_DB{SiteMap}})>0) {#-------------------------- falls SiteMap definiert if($pType eq "link") #-------- falls dir type link {############### $sitemap_dis=$sitemap_dis_link; #------------------------------------------------ if($pID eq "") # falls keine page:: angegeben { %SM=%{$_DB{SiteMap}}; @MDIR=&DirLinkArray(\%SM); $Regex_Return = join("
",@MDIR); } else {%SM=%SiteMap=(); $PID[0]=$pID; map{&bei123_mapping($_,$sm)}@PID; my %SM=%SiteMap; @MDIR=&DirLinkArray(\%SM); shift(@MDIR); @MDIR=map{$_ = substr($_,length($sitemap_dis))}@MDIR; $Regex_Return = join("
",@MDIR); } }############### if($pType eq "option") #--------------------------------------- falls dir type link {############### $dirPage=""; if($pID eq "") # falls keine page:: angegeben { $dirPage=""; %SM=%{$_DB{SiteMap}}; @MDIR=&DirOptionArray(\%SM); } else {%SM=%SiteMap=(); $PID[0]=$pID; $dirPage=$reg{page}; map{&bei123_mapping($_,$sm)}@PID; my %SM=%SiteMap; @MDIR=&DirOptionArray(\%SM); shift(@MDIR); } #------------------------------ ID's unterscheidbar machen, falls mehrfach vorhanden @zfz1=&random3value(0,9,10); @zfz2=&random3value(0,9,10); my $zfz="@zfz1@zfz2"; #------------------------------ my $opt1_name=$reg{value}||"Menü-Auswahl"; #------------------------------------------------------------------------------------------ $pSize=($pSize ne "" ? qq(size="$pSize"):""); $Regex_Return=qq(); #------------------------------ }############### } }#ENDE pItem=sitemap if($pItem eq "subdir") {###################### SUBDIR my @SUBDIR=(); $xID=$pID||$_ID; #-------------------------------------------------------------- @SUBDIR=@{$_DB{SubDir}{$xID}}if(@{$_DB{SubDir}{$xID}}>0); #-------------------------------------------------------------- if(@SUBDIR>0) { if($pType eq "option") #--------------------------------------- falls dir type link {############### } else { my @_SUBDIR=map{qq($_PAGE{$_} )}@SUBDIR; $Regex_Return=qq(@_SUBDIR); } } }###################### ENDE SUBDIR if($pItem eq "samedir") {###################### SAMEDIR my @SAMEDIR=(); $Regex_Return=""; $xID=$pID||$_ID; #-------------------------------------------------------------- if($_PAGE{$UpDir{$xID}} ne "") { @SAMEDIR=grep($_ ne $xID,@{$_DB{SubDir}{$UpDir{$xID}}}) if(@{$_DB{SubDir}{$UpDir{$xID}}}>1); } #-------------------------------------------------------------- if(@SAMEDIR>0) { if($pType eq "option") #--------------------------------------- falls dir type link {############### } else { my @_SAMEDIR=map{qq($_PAGE{$_} )}@SAMEDIR; $Regex_Return=qq(@_SAMEDIR); } } }###################### ENDE SAMEDIR if($pItem eq "updir") {###################### UPDIR $xID=$pID||$_ID; $Regex_Return=""; if($UpDir{$xID} ne "") { $Regex_Return=qq($_PAGE{$UpDir{$_ID}}); } }###################### ENDE UPDIR if($pItem eq "path") {###################### PATH $xID=$pID||$_ID; $Regex_Return=""; #------------------------------------ @bei123_path=&bei123_path($xID); $npp=@bei123_path; if(@bei123_path>0) {#----------------------------------- my @PATH=map{qq($_PAGE{$_})}@bei123_path; #----------------------------------------------------- push(@PATH,qq($_PAGE{$xID})); $Regex_Return=join(" » ",@PATH); #$Regex_Return="@PATH"; }#---------------------------------- } if($pItem eq "chronik") {###################### CHRONIK @CHRO=&text2split("$CHR",","); my @_CHRO=map{qq($_PAGE{$_})} reverse(@CHRO); $Regex_Return=join(" « ",@_CHRO); }## if($pItem eq "search") {####################### SEARCH my $opt1_name=$reg{value}||""; #----------------------------------- $Regex_Return=qq($pic_search4 $opt1_name); }####################### Ende SEARCH return($Regex_Return); }## sub DirLinkArray { %SM=%{$_[0]}; #------------- $OMO=qq(onMouseOver=(this.className="LinkOver") onMouseOut=(this.className="LinkOut")); #------------------------------------------------------------------------------------------------- @D_L_A=map{"$sitemap_dis" x ${$SM{$_}}[1].qq(${\un_esc($_PAGE{${$SM{$_}}[0]})})}(sort{$a <=> $b}(keys(%SM))); #---------------------------- return(@D_L_A); } sub DirOptionArray {## %SM=%{$_[0]}; $sitemap_dis="·" x 4; #--------------------------- $OMO1=qq( onMouseOver=(this.style.backgroundColor="#b0c0e0") onMouseOut=(this.style.backgroundColor="#ffffff") ); @D_O_A=map{qq(