EASY

EASY is the name of tdbengines built-in scripting language.

A comprehensive overview of EASY can be found at link http://www.tdbengine.org .



Code Example
PROCEDURE PrintThread(d, n, indent, mode : INTEGER; b_no : STRING) // Schreibt einen kompletten Thread für b_no, ansonsten nur den Basiseintrag. VAR i, x : INTEGER VAR a_no, t, listall, l_openthread : STRING VAR tmarks : MARKS readrec(d,n); a_no:=str(AutoRecNo(d)) IF mode=0,getquerystring('b_no')=a_no THEN cgiwriteln('<a name="'+a_no+'">') END LoadForm('link_node.html','') subst('#the_time_s#',timestr(getrfield(d,'the_time'))) subst('#the_date_s#',getfield(d,'the_date')[1,5]) subst('#delete_date_s#',getfield(d,'delete_date')[1,5]) subst('#delete_time_s#',timestr(getrfield(d,'delete_time'))) subst('#the_time#',timestr(getrfield(d,'the_time'),0)) subst('#delete_time#',timestr(getrfield(d,'delete_time'),0)) nloop(i,maxlabel(d)-1,choice(sel(gettype(d,i+1) like "M"),0,subst('#'+label(d,i+1)+'#',d,i+1,1))) subst('#b_no#',b_no) subst('#width#',str(5+20*indent)) subst('#link#',l_openthread:=GenJavaScriptLink(a_no,b_no)) IF mode=0,getquerystring('b_no')=str(AutoRecNo(d)) THEN listall:=paramstr(0)+'?action=list_all' IF s_start THEN listall:=listall+'&start='+s_start END IF s_search THEN listall:=listall+'&search='+tohtml(s_search) END subst('#img#','<a href="'+listall+'"><img src="'+paramstr(0)+'?img=nfollow_r.gif" border="0"></a>') ELSIF mode=0,findrec(d,str(AutoRecNo(d)),'forum.in1',1) THEN subst('#img#','#l_openthread##arrow#</a>') subst('#l_openthread#',l_openthread) subst('#arrow#','<img src="'+paramstr(0)+'?img=nfollow.gif" border=0>') ELSE subst('#img#','<img src="'+paramstr(0)+'?img=n_leer.gif">') END IF GetField(d,"art")="News" THEN subst('#img_posting#','<img src="'+paramstr(0)+'?img='+choice(hits[n],'news_g.gif','news.gif')+'">') ELSIF GetField(d,"art")="Frage" THEN subst('#img_posting#','<img src="'+paramstr(0)+'?img=frage.gif">') ELSIF GetField(d,"art")="Antwort" THEN subst('#img_posting#','<img src="'+paramstr(0)+'?img=antwort.gif">') ELSIF GetField(d,"art")="Tipp" THEN subst('#img_posting#','<img src="'+paramstr(0)+'?img=tipp.gif">') ELSIF GetField(d,"art")="Kritik" THEN subst('#img_posting#','<img src="'+paramstr(0)+'?img=kritik.gif">') ELSE subst('#img_posting#','<img src="'+paramstr(0)+'?img=sonstiges.gif">') END subst('#img_found#',choice(hits[n],'<img src="'+paramstr(0)+'?img=found.gif">','')) cgiwritetemplate IF mode=0,getquerystring('b_no')<>str(AutoRecNo(d)) THEN RETURN END // ab hier aktiver Thread access(d,indname(d,2)) setfilter(d,t:=str(AutoRecNo(d)),t) getmarks(d,tmarks); delmarks(d); x:=firstrec(d) WHILE x DO setmark(d,x); x:=nextrec(d) END x:=firstmark(d) // Rekusrsion !! WHILE x DO PrintThread(d,x,indent+1,1,b_no); x:=nextmark(d,x) END delmarks(d); putmarks(d,tmarks) ENDPROC

easy, Rev. 8, Last changed on 2005-03-07 09:25, 16949 page hits
bmi      SourceForge.net Logo
PAGERANK SEO RSS-Feed || GeboGebo 1.1.3 || 00.016 seconds ||