diff --git a/build/libifm.php b/build/libifm.php
index 303daa5..6f717e6 100644
--- a/build/libifm.php
+++ b/build/libifm.php
@@ -19,7 +19,7 @@ class IFM {
private $defaultconfig = array(
// general config
- "auth" => 0,
+ "auth" => 1,
"auth_source" => 'inline;admin:$2y$10$0Bnm5L4wKFHRxJgNq.oZv.v7yXhkJZQvinJYR2p6X1zPvzyDRUVRC',
"root_dir" => "",
"tmp_dir" => "",
@@ -52,36 +52,400 @@ class IFM {
);
private $config = array();
+ private $templates = array();
public $mode = "";
public function __construct( $config=array() ) {
if( session_status() !== PHP_SESSION_ACTIVE )
session_start();
$this->config = array_merge( $this->defaultconfig, $config );
+
+ $templates = array();
+ $templates['app'] = <<<'f00bar'
+
+
+
+
+
+ Filename |
+ {{#config.download}}
+ |
+ {{/config.download}}
+ {{#config.showlastmodified}}
+ last modified |
+ {{/config.showlastmodified}}
+ {{#config.showfilesize}}
+ size |
+ {{/config.showfilesize}}
+ {{#config.showpermissions}}
+ permissions |
+ {{/config.showpermissions}}
+ {{#config.showowner}}
+ owner |
+ {{/config.showowner}}
+ {{#config.showgroup}}
+ group |
+ {{/config.showgroup}}
+ |
+
+
+
+
+
+
+
+
+
+
+f00bar;
+ $templates['login'] = <<<'f00bar'
+
+
+
+
+
+
+f00bar;
+ $templates['filetable'] = <<<'f00bar'
+
+{{#items}}
+
+
+
+
+ {{linkname}}
+
+ |
+ {{#config.download}}
+
+
+
+
+
+ |
+ {{/config.download}}
+ {{#config.showlastmodified}}
+ {{lastmodified}} |
+ {{/config.showlastmodified}}
+ {{#config.showfilesize}}
+ {{size}} |
+ {{/config.showfilesize}}
+ {{#config.showpermissions}}
+
+
+ |
+ {{/config.showpermissions}}
+ {{#config.showowner}}
+
+ {{owner}}
+ |
+ {{/config.showowner}}
+ {{#config.showgroup}}
+
+ {{group}}
+ |
+ {{/config.showgroup}}
+
+ {{#button}}
+
+
+
+ {{/button}}
+ |
+
+{{/items}}
+
+
+f00bar;
+ $templates['ajaxrequest'] = <<<'f00bar'
+
+
+f00bar;
+ $templates['createdir'] = <<<'f00bar'
+
+
+f00bar;
+ $templates['deletefile'] = <<<'f00bar'
+
+
+f00bar;
+ $templates['extractfile'] = <<<'f00bar'
+
+
+f00bar;
+ $templates['file'] = <<<'f00bar'
+
+
+f00bar;
+ $templates['multidelete'] = <<<'f00bar'
+
+
+f00bar;
+ $templates['remoteupload'] = <<<'f00bar'
+
+
+f00bar;
+ $templates['renamefile'] = <<<'f00bar'
+
+
+
+
+f00bar;
+ $templates['uploadfile'] = <<<'f00bar'
+
+
+f00bar;
+ $this->templates = $templates;
}
/**
* This function contains the client-side application
*/
public function getApplication() {
- print '
-
-
- IFM - improved file manager
-
-
- ';
- $this->getCSS();
- print '
-
-
- ';
+ $this->getHTMLHeader();
+ print '';
$this->getJS();
- print '
-
-
-
- ';
+ print '';
+ $this->getHTMLFooter();
}
public function getInlineApplication() {
@@ -100,16 +464,16 @@ class IFM {
/*# sourceMappingURL=bootstrap.min.css.map */
-
-
- IFM - Login
-
-
-