App.php
[Pman.Builder] / App.php
1 <?php
2
3 require_once 'Pman.php';
4
5 class Pman_Builder_App extends Pman
6 {
7     var $template = "frame.html";
8     // getAuth - everyone allowed in...
9     function getAuth() {
10         return true;
11     }
12   
13     function get($app) {
14         if (empty($app)) {
15             die("Invalid Application");
16         }
17         $p = DB_DataObject::factory('builder_app');
18         $p->app = $app;
19         $p->selectAdd();
20         $p->selectAdd('module');
21         if (!$p->find()) {
22             die("Invalid Application (2)");
23         }
24         $this->builderJs = array();
25         
26         $ff = HTML_FlexyFramework::get();
27         
28         while ($p->fetch()) {
29             // file exists in file system - dont add it twice!
30             // this is a bit questionable..  - we may need to check if the
31             // db version is more recent.
32             $fl = $ff->rootDir.'/Pman/'. $app .'/'.$p->module.'.js';
33             //if (file_exists($fl) && filesize($fl)) {
34             //    continue;
35             //}
36             $this->builderJs[] = $p->module;
37         }
38         $o  = HTML_FlexyFramework::get();
39         //echo '<PRE>';print_r($o);exit;
40         $o->enable = 'Core';
41         $o->enableArray = array('Core');
42         //$o->options = 'Core,'.$o->options;
43              
44         return parent::get('');
45         
46         
47     }
48     
49 }