4
I do notice that in other modules, admin functions are included from one dir back (include ../functions.php). This seems to have solved the permissions problem but I'm still working on getting forms to work. I can't find a module with Smarty templates/forms in admin modules to compare code from. I'm doing Smarty easily in admin modules now but would like to automate some menu/template stuff by putting the form code in functions with callable parameters. The explanation below really doesn't matter. I just need to get smarty/forms to work in a PHP function. I'll keep hammerng at it but I'm just not having any luck.
I put my menu button (URL) text, ops, etc in the DB and have a general routine to display anything in the DB table as a menu. To change the menu text or operation called when the link is pressed, you change the DB rather than the code. I.E.
CREATE TABLE bdr_buttons (
id int(10) unsigned NOT NULL auto_increment,
grp int(10) unsigned NOT NULL default '0',
label varchar(255) NOT NULL default '',
op varchar(255) NOT NULL default '',
file varchar(255) NOT NULL default '',
template varchar(255) NOT NULL default '',
title varchar(255) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT INTO bdr_buttons VALUES (1,1,'Publish','publish','index.php','bdr_menu.html','Bechtel Daily Report Admin Functions');
INSERT INTO bdr_buttons VALUES (2,1,'Issues','issues','index.php','bdr_menu.html','Bechtel Daily Report Admin Functions');
INSERT INTO bdr_buttons VALUES (3,1,'Readyness','readyness','index.php','bdr_menu.html','Bechtel Daily Report Admin Functions');
INSERT INTO bdr_buttons VALUES (4,1,'Site Stats','stats','index.php','bdr_menu.html','Bechtel Daily Report Admin Functions');
INSERT INTO bdr_buttons VALUES (5,1,'Site Participation','participate','index.php','bdr_menu.html','Bechtel Daily Report Admin Functions');
INSERT INTO bdr_buttons VALUES (6,1,'Site Admin','admin','index.php','bdr_menu.html','Bechtel Daily Report Admin Functions');
INSERT INTO bdr_buttons VALUES (7,2,'Manage Sites','mansites','index.php','bdr_menu.html','Misc Admin Functions');
INSERT INTO bdr_buttons VALUES (8,2,'Manage Colors','mancolors','index.php','bdr_menu.html','Misc Admin Functions');
INSERT INTO bdr_buttons VALUES (9,2,'Manage issues','manissues','index.php','bdr_menu.html','Misc Admin Functions');
INSERT INTO bdr_buttons VALUES (10,2,'Return to Main Menu','datechanged','index.php','bdr_menu.html','Misc Admin Functions');
INSERT INTO bdr_buttons VALUES (11,3,'Add a site','addsite','index.php','bdr_menu.html','Site Admin Functions');
INSERT INTO bdr_buttons VALUES (12,3,'Edit a site','editsite','index.php','bdr_menu.html','Site Admin Functions');
INSERT INTO bdr_buttons VALUES (13,3,'Delete a site','deletesite','index.php','bdr_menu.html','Site Admin Functions');
Doug P