-
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.
- Loading branch information
1 parent
2216546
commit 79122e6
Showing
13 changed files
with
789 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
RewriteEngine Off | ||
RewriteRule ^(.*)\.htm index.php?site=$1&%{QUERY_STRING} | ||
RewriteRule ^(.*)\.php index.php?site=$1&%{QUERY_STRING} |
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,39 @@ | ||
<?php | ||
|
||
class MItem { | ||
|
||
protected $m_iId = 0; | ||
|
||
public static $m__sClassName; | ||
|
||
public function __constructItem() { | ||
|
||
//sets the registryId on a uniqueValue. | ||
//$this->m_sRegistryId = md5(uniqid(rand())); | ||
|
||
|
||
//$this->db = $__class_array['class_db']; | ||
//$this->right = $__class_array['class_right']; | ||
|
||
} | ||
|
||
|
||
|
||
public function setId($itemId) { | ||
$this->m_iId = $itemId; | ||
} | ||
|
||
public function getId() { | ||
return $this->m_iId; | ||
} | ||
|
||
|
||
/** | ||
* Returns the registry Id of the actual object. | ||
* @return registryId of object. | ||
public function getRegistryId() { | ||
return $this->m_sRegistryId; | ||
} */ | ||
|
||
} |
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,161 @@ | ||
<?php | ||
|
||
/** | ||
* ######################################################### | ||
* ######################### devPHP - develop your webapps | ||
* ######################################################### | ||
* ################## copyrights by simpleserv development | ||
* ######################################################### | ||
*/ | ||
|
||
/** | ||
* description | ||
* | ||
* @package de.simpleserv | ||
* @author simpleserv company <info@simpleserv.de> | ||
* @author Sebastian Monzel <s_monzel@simpleserv.de> | ||
* @copyright 2009-2012 simpleserv company | ||
* @link http://www.simpleserv.de/ | ||
*/ | ||
class MSite { | ||
|
||
|
||
private $title; | ||
|
||
private $content; | ||
private $header; | ||
|
||
private $template; | ||
|
||
private $bodyAttributeList; | ||
|
||
private $defaultDatastore; | ||
|
||
private $isBlank = false; | ||
|
||
private $isAuthorisationNeeded = false; | ||
|
||
private static $instance = null; | ||
|
||
public function __construct() { | ||
$this->bodyAttributeList = array(); | ||
|
||
} | ||
|
||
/** | ||
* | ||
* Enter description here ... | ||
* @return MSite | ||
*/ | ||
public static function getInstance() { | ||
if ( MSite::$instance == null ) { | ||
MSite::$instance = new MSite(); | ||
} | ||
return MSite::$instance; | ||
} | ||
|
||
|
||
public function setTitle($title) { | ||
$this->title = $title; | ||
} | ||
|
||
public function getTitle() { | ||
return $this->title; | ||
} | ||
|
||
public function addCssFile(MFile $file) { | ||
//if ( $file->exists() ) { | ||
$this->addHeader("<link rel=\"stylesheet\" href=\"" . $file->getName() . "\" type=\"text/css\" media=\"screen\" />"); | ||
//} | ||
} | ||
|
||
public function setTemplate(MTemplate $template) { | ||
$this->template = $template; | ||
} | ||
|
||
public function addHeader($header) { | ||
$this->header = $this->header . $header; | ||
} | ||
|
||
public function addBodyAttribute($attributeName, $attributeContent) { | ||
$this->bodyAttributeList[$attributeName] = $attributeContent; | ||
} | ||
|
||
public function setBlank($isBlank) { | ||
$this->isBlank = $isBlank; | ||
} | ||
|
||
public function addContent($content) { | ||
$this->content = $this->content . $content; | ||
} | ||
|
||
public function isAuthorisationNeeded() { | ||
return $this->isAuthorisationNeeded; | ||
} | ||
|
||
public function setAuthorisationNeeded($isAuthorisationNeeded) { | ||
$this->isAuthorisationNeeded = $isAuthorisationNeeded; | ||
} | ||
|
||
public function setDefaultDatastore(MAbstractDatastore $defaultDatastore) { | ||
$this->defaultDatastore = $defaultDatastore; | ||
} | ||
|
||
/** | ||
* | ||
* @return MAbstractDatastore | ||
*/ | ||
public function getDefaultDatastore() { | ||
if ( $this->defaultDatastore == null ) { | ||
$this->initDefaultDatastore(); | ||
} | ||
return $this->defaultDatastore; | ||
} | ||
|
||
private function initDefaultDatastore() { | ||
$this->defaultDatastore = MDatastoreFactory::createDatastore(new MDatabaseConnection()); | ||
} | ||
|
||
/** | ||
* Returns the code of the site. | ||
* @return MString: code. | ||
*/ | ||
public function getCode() { | ||
if ( ! $this->isBlank ) { | ||
|
||
$out = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> | ||
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"de-de\" lang=\"de-de\" >"; | ||
//$out .= "<html>"; | ||
$out .= "<head>"; | ||
$out .= "<title>" . $this->title . "</title>"; | ||
$out .= $this->header; | ||
$out .= "</head>"; | ||
$out .= "<body "; | ||
|
||
foreach ($this->bodyAttributeList as $key => $value) { | ||
$out .= $key . "=" . "\"" . $value . "\" "; | ||
} | ||
|
||
$out .= ">"; | ||
|
||
$dataset = array(); | ||
$dataset['content'] = $this->content; | ||
if ( isset($this->template) ) { | ||
$this->template->setDataset($dataset); | ||
$this->template->compileTemplate(); | ||
$out .= $this->template->getResult(); | ||
} else { | ||
$out .= $this->content; | ||
} | ||
|
||
$out .= "</body>"; | ||
$out .= "</html>"; | ||
|
||
return $out; | ||
} else { | ||
return ""; | ||
} | ||
} | ||
} | ||
|
||
?> |
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,51 @@ | ||
<?php | ||
|
||
/** | ||
* ######################################################### | ||
* ######################### devPHP - develop your webapps | ||
* ######################################################### | ||
* ################## copyrights by simpleserv development | ||
* ######################################################### | ||
*/ | ||
|
||
/** | ||
* description | ||
* | ||
* @package de.simpleserv | ||
* @author simpleserv company <info@simpleserv.de> | ||
* @author Sebastian Monzel <s_monzel@simpleserv.de> | ||
* @copyright 2009-2012 simpleserv company | ||
* @link http://www.simpleserv.de/ | ||
*/ | ||
class MSiteContent extends MSiteElement { | ||
|
||
public $m_sTitle; | ||
public $m_lContent; | ||
|
||
public static $m__sClassName = __CLASS__; | ||
|
||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
public function getTitle() { | ||
return $this->m_sTitle; | ||
} | ||
|
||
public function setTitle($p_sTitle) { | ||
$this->m_sTitle = $p_sTitle; | ||
} | ||
|
||
public function getContent() { | ||
return $this->m_lContent; | ||
} | ||
|
||
public function setContent($content) { | ||
$this->m_lContent = $content; | ||
} | ||
|
||
public function addContent($content) { | ||
$this->m_lContent .= $content; | ||
} | ||
|
||
} |
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,26 @@ | ||
<?php | ||
|
||
/** | ||
* ######################################################### | ||
* ######################### devPHP - develop your webapps | ||
* ######################################################### | ||
* ################## copyrights by simpleserv development | ||
* ######################################################### | ||
*/ | ||
|
||
/** | ||
* description | ||
* | ||
* @package de.simpleserv | ||
* @author simpleserv company <info@simpleserv.de> | ||
* @author Sebastian Monzel <s_monzel@simpleserv.de> | ||
* @copyright 2009-2012 simpleserv company | ||
* @link http://www.simpleserv.de/ | ||
*/ | ||
class MSiteElement extends MWebfile { | ||
|
||
|
||
public function __construct(){} | ||
|
||
|
||
} |
58 changes: 58 additions & 0 deletions
58
source/simpleserv/webfiles-framework/MWrappedSiteContent.php
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,58 @@ | ||
<?php | ||
|
||
/** | ||
* ######################################################### | ||
* ######################### devPHP - develop your webapps | ||
* ######################################################### | ||
* ################## copyrights by simpleserv development | ||
* ######################################################### | ||
*/ | ||
|
||
/** | ||
* description | ||
* | ||
* @package de.simpleserv | ||
* @author simpleserv company <info@simpleserv.de> | ||
* @author Sebastian Monzel <s_monzel@simpleserv.de> | ||
* @copyright 2009-2013 simpleserv company | ||
* @link http://www.simpleserv.de/ | ||
*/ | ||
class MWrappedSiteContent extends MSiteElement { | ||
|
||
public $m_sTitle; | ||
public $m_sIntroduction; | ||
public $m_sWrappedContentUrl; | ||
|
||
public static $m__sClassName = __CLASS__; | ||
|
||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
public function getTitle() { | ||
return $this->m_sTitle; | ||
} | ||
|
||
public function setTitle($p_sTitle) { | ||
$this->m_sTitle = $p_sTitle; | ||
} | ||
|
||
public function getIntroduction() { | ||
return $this->m_sIntroduction; | ||
} | ||
|
||
public function setIntroduction($introduction) { | ||
$this->m_sIntroduction = $introduction; | ||
} | ||
|
||
public function getWrappedContentUrl() { | ||
return $this->m_sWrappedContentUrl; | ||
} | ||
|
||
public function setWrappedContentUrl($wrappedContent) { | ||
$this->m_sWrappedContentUrl = $wrappedContent; | ||
} | ||
|
||
} | ||
|
||
?> |
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,30 @@ | ||
<?php | ||
|
||
/* | ||
* ######################################################### | ||
* ######################### webDEV - develop your webapps | ||
* ######################################################### | ||
* ########################### copyrights by simpleserv.de | ||
* ########################## ### ## (c) 2007 - 2013 | ||
* ######################################################### | ||
* | ||
* @author: Sebastian Monzel, | ||
* | ||
*/ | ||
|
||
$webdevPath = "webfiles_framework/source/php"; | ||
|
||
define('FOLDER_SEPERATOR','/'); | ||
|
||
//-- system folders | ||
define('ESSENTIAL_FUNCTIONS_FOLDER',$basePath . 'essential' . FOLDER_SEPERATOR . 'functions'); | ||
define('ESSENTIAL_CONFIGURATION_FOLDER',$basePath . 'essential' . FOLDER_SEPERATOR . 'configuration'); | ||
|
||
//-- custom folders | ||
define('CUSTOM_FOLDER','./custom'); | ||
define('CUSTOM_TEMPLATE_FOLDER',CUSTOM_FOLDER . FOLDER_SEPERATOR . 'template'); | ||
define('CUSTOM_SITE_FOLDER',CUSTOM_FOLDER . FOLDER_SEPERATOR . 'site'); | ||
define('CUSTOM_BATCHJOB_FOLDER',CUSTOM_FOLDER . FOLDER_SEPERATOR . 'batchjob'); | ||
|
||
define('CONTENT_VAR_PREFIX','_con__'); | ||
|
3 changes: 3 additions & 0 deletions
3
source/simpleserv/webfiles-framework/essential/configuration/configureCharset.php
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,3 @@ | ||
<?php | ||
|
||
header("Content-Type: text/html; charset=utf-8"); |
6 changes: 6 additions & 0 deletions
6
source/simpleserv/webfiles-framework/essential/configuration/configureErrorHandling.php
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,6 @@ | ||
<?php | ||
|
||
error_reporting(E_ALL); | ||
|
||
ini_set('display_errors', 'On'); | ||
ini_set('html_errors', 'On'); |
3 changes: 3 additions & 0 deletions
3
source/simpleserv/webfiles-framework/essential/configuration/configureTimezone.php
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,3 @@ | ||
<?php | ||
|
||
date_default_timezone_set("Europe/Berlin"); |
Oops, something went wrong.