5 * used to preview a button or item..
7 require_once 'Pman.php';
9 class Pman_Builder_App extends Pman
11 var $masterTemplate = "frame.html";
14 // getAuth - everyone allowed in...
19 function get($app, $opts = array()) {
24 die("Invalid Application");
28 $mod = DB_DataObject::factory('builder_modules');
29 if (!$mod->get('app', $app)) {
30 die("invalid module");
33 if (!empty($_REQUEST['no_parts'])) {
34 // used to do the previewer
36 $this->builderJs = array();
37 //should it try and load the core???
38 $o = HTML_FlexyFramework::get();
40 $o->enableArray = array('');
42 $this->disable_jstemplate = true;
46 $p = DB_DataObject::factory('builder_part');
47 $p->module_id = $mod->id;
49 $p->selectAdd('module');
51 die("Invalid Application (2)");
53 $this->builderJs = array();
55 $ff = HTML_FlexyFramework::get();
58 // file exists in file system - dont add it twice!
59 // this is a bit questionable.. - we may need to check if the
60 // db version is more recent.
61 $fl = $ff->rootDir.'/Pman/'. $app .'/'.$p->module.'.js';
62 //if (file_exists($fl) && filesize($fl)) {
65 $this->builderJs[] = $p->module;
67 $o = HTML_FlexyFramework::get();
68 //echo '<PRE>';print_r($o);exit;
70 $o->enableArray = array('Core');
71 //$o->options = 'Core,'.$o->options;
73 return parent::get('');