This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added own class to loop through apps
Added App-Support for aliases, domains and own CSS (Documentation coming soon)
- Loading branch information
Showing
13 changed files
with
190 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
$_CONF['mod_name'] = 'Appname'; | ||
$_CONF['mod_desc'] = 'Appbeschreibung'; | ||
//$_CONF['base_url'] = 'demoapp/'; | ||
|
||
$_CONF['base_file'] = 'test.php'; | ||
$_CONF['alias'] = ['test' => 'test.php', 'watr-andres' => 'test.php']; | ||
|
||
$_CONF['domain'] = 'sub.mowie'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$page->setResponseCode(200); | ||
$page->setContent('Hallo Welr'); | ||
$page->setTitle('tset'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
{$menu} | ||
<div class="seite"> | ||
{$sidebar} | ||
{$inhalt} | ||
{$content} | ||
{$test} | ||
{$test2} | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
/* | ||
* Find all apps and put them in an array. | ||
* Has it's own class because of performance reasons - you would need to include Smarty every time you want the apps | ||
*/ | ||
|
||
class apps | ||
{ | ||
private $apps; | ||
|
||
public function __construct() | ||
{ | ||
//Find the app directory | ||
$appdir = 'apps/'; | ||
$rel = explode('/', str_replace($GLOBALS['MCONF']['home_uri'], '', $_SERVER['SCRIPT_NAME'])); | ||
$count = count($rel); | ||
//if (strpos($_SERVER['REQUEST_URI'], '/apps/') !== false && $count !== 1) $count = $count - 1; $appdir = ''; | ||
|
||
$i = 1; | ||
while ($i < $count) | ||
{ | ||
$appdir = '../'.$appdir; | ||
$i++; | ||
} | ||
|
||
//Loop through the apps | ||
if ($handle = opendir($appdir)) | ||
{ | ||
while (false !== ($app = readdir($handle))) | ||
{ | ||
if ($app != "." && $app != ".." && !is_file($appdir . $app)) | ||
{ | ||
$appUri = $appdir.$app; | ||
if (file_exists($appUri.'/config.php')) | ||
{ | ||
require $appUri.'/config.php'; | ||
$this->apps[$app] = $_CONF; | ||
//print_r($_CONF); | ||
$_CONF = []; | ||
} | ||
} | ||
} | ||
closedir($handle); | ||
} | ||
} | ||
|
||
public function getApps() | ||
{ | ||
return $this->apps; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.