5 * used to preview a button or item..
7 require_once 'Pman.php';
9 class Pman_Builder_App extends Pman
11 var $template = "frame.html";
12 // getAuth - everyone allowed in...
22 die("Invalid Application");
26 $mod = DB_DataObject::factory('builder_modules');
27 if (!$mod->get('app', $app)) {
28 die("invalid module");
31 if (!empty($_REQUEST['no_parts'])) {
32 // used to do the previewer
34 $this->builderJs = array();
35 //should it try and load the core???
36 $o = HTML_FlexyFramework::get();
38 $o->enableArray = array('Core');
42 $p = DB_DataObject::factory('builder_part');
43 $p->module_id = $mod->id;
45 $p->selectAdd('module');
47 die("Invalid Application (2)");
49 $this->builderJs = array();
51 $ff = HTML_FlexyFramework::get();
54 // file exists in file system - dont add it twice!
55 // this is a bit questionable.. - we may need to check if the
56 // db version is more recent.
57 $fl = $ff->rootDir.'/Pman/'. $app .'/'.$p->module.'.js';
58 //if (file_exists($fl) && filesize($fl)) {
61 $this->builderJs[] = $p->module;
63 $o = HTML_FlexyFramework::get();
64 //echo '<PRE>';print_r($o);exit;
66 $o->enableArray = array('Core');
67 //$o->options = 'Core,'.$o->options;
69 return parent::get('');