?php
include_once../CTA_dbase/vlib4/vlibTemplate.php;
tmpl = new vlibTemplate../CTA_dbase/templates/cta_template.htm;
tmpl-setVartitle, CTA for all your coolstorage needs;
tmpl-newLoopmyLoop;
require_oncedb_fns.php;
conn = db_connect; //function to connect
sql = select * from cta_pg where nav_name=nav_name;
result=mysql_querysql, conn;
While row=mysql_fetch_array result {
filename=rowinc_name; //name of the file
filename=./includetxt/.filename; //dir to the file
fp= fopenfilename, r; //read the file
While feoffp {
fileshow= fgetsfp,10000;
tmpl-setVar this_file,fileshow; //set template name
}//close second while
tmpl-addLoop; //add template vars
}//close first while
tmpl-pparse;
?
----------------------------
and the cut-down template:
----------------------------
tmpl_loop name=myLoop
img src=images/tmpl_var name=photo_name
div class=heads align=centertmpl_var name=head/div
p class=subheadtmpl_var name=section/p
tmpl_var name = this_file escape=none
Im not getting any errors - but Im not getting anything showing up in my template either.
There is a trick in the PHP/VLib that Im just not grasping.
I hope you can make sense of what Im trying to do -
simply show what is in the dbase, except for the HTML file (only the name is in the dbase) where I have had to read it and assign it to its own tmpl_var.
Can you help?