Example #1
0
 /**
  * @param String $config_file
  */
 public function __construct($config = array())
 {
     // make sure global statics are set up
     Config::init($config);
     Template::init();
     $this->ingester = new Ingester();
 }
Example #2
0
 private static function testTemplateType()
 {
     if (self::$clanData['premiumBis'] < time()) {
         if (!empty(self::$clanData['useStandartDesign'])) {
             echo "Eigenes Standart Design ";
         } else {
             Template::init("templates/standart_stylecheet.css");
             Template::replace("{header_height}", self::$clanData['designset_headerheight']);
             Template::set("Content-Type: text/css");
             echo Template::out();
         }
     } else {
         MySQL::query("SELECT * FROM `inhalte` WHERE `template`='1' AND `templateType`='5'");
         if (MySQL::count()) {
             MySQL::query("SELECT * FROM `inhalte` WHERE `template`='1' AND `templateType`='6'");
             if (MySQL::count()) {
                 $row = MySQL::fetchArray();
                 Template::init(NULL, true, $row['inhalt']);
                 Template::replace("{header_height}", self::$clanData['designset_headerheight']);
                 Template::set("Content-Type: text/css");
                 echo Template::out();
             }
         } else {
             echo "Premium Standart";
         }
     }
 }
Example #3
0
 private static function testTemplateType()
 {
     if (self::$clanData['data']['premiumBis'] < time()) {
         if (!empty(self::$clanData['data']['useStandartDesign'])) {
             echo "Eigenes Standart Design ";
         } else {
             Template::init("templates/standart.html");
             Template::replace("</head>", "\n" . Template::leerzeichen("<title>") . '<link rel="stylesheet" type="text/css" href="http://myclankonto.net/' . self::$routerData['clanid'] . '/stylecheet.css" />' . "\n" . Template::leerzeichen("<head>") . '</head>');
             Template::replaceContent("{seiteninhalt}", "pages/site/" . self::$routerData['site'] . ".php");
             Template::replace("{title}", self::$clanData['data']['pageTitle']);
             echo Template::out();
         }
     } else {
         MySQL::query("SELECT * FROM `inhalte` WHERE `clanid`='" . self::$routerData['clanid'] . "' AND `template`='1' AND `templateType`='5'");
         if (MySQL::count() == 1) {
             $row = MySQL::fetchArray();
             Template::init(NULL, true, $row['inhalt']);
             MySQL::query("SELECT * FROM `inhalte` WHERE `template`='1' AND `templateType`='6'");
             if (MySQL::count()) {
                 Template::replace("</head>", "\n" . Template::leerzeichen("<title>") . '<link rel="stylesheet" type="text/css" href="http://myclankonto.net/' . self::$routerData['clanid'] . '/stylecheet.css" />' . "\n" . Template::leerzeichen("<head>") . '</head>');
             }
             Template::replaceContent("{seiteninhalt}", "pages/site/" . self::$routerData['site'] . ".php");
             Template::replace("{title}", self::$clanData['data']['pageTitle']);
             echo Template::out();
         } else {
             echo "Premium Standart";
         }
     }
 }
Example #4
0
define('TEMPLATES_PATH', CORE_PATH . DS . 'templates');
define('MODULES_PATH', CORE_PATH . DS . 'modules');
define('CACHE_PATH', CORE_PATH . DS . 'cache');
define('COMMON_PATH', CORE_PATH . DS . 'common');
define('PAGES_PATH', CORE_PATH . DS . 'pages');
define('LIB_PATH', SITE_ROOT . DS . 'lib');
define('VENDORS_PATH', CORE_PATH . DS . 'vendors');
$version = phpversion();
if (intval($version[0]) < 5) {
    die('You are not running PHP 5+');
}
require CLASS_PATH . DS . 'autoload.php';
spl_autoload_register('codon_autoload');
Config::Set('MODULES_PATH', CORE_PATH . DS . 'modules');
Config::Set('MODULES_AUTOLOAD', true);
Template::init();
require CORE_PATH . DS . 'app.config.php';
@(include CORE_PATH . DS . 'local.config.php');
/* Set the language */
Lang::set_language(Config::Get('SITE_LANGUAGE'));
error_reporting(Config::Get('ERROR_LEVEL'));
Debug::$debug_enabled = Config::Get('DEBUG_MODE');
if (Debug::$debug_enabled == true) {
    ini_set('log_errors', 'On');
    ini_set('display_errors', 'Off');
    ini_set('error_log', LOGS_PATH . '/errors.txt');
}
/* Init caching engine */
CodonCache::init($cache_settings);
if (DBASE_NAME != '' && DBASE_SERVER != '' && DBASE_NAME != 'DBASE_NAME') {
    require CLASS_PATH . DS . 'ezdb/ezdb.class.php';
Example #5
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
$ini = parse_ini_file("./config.ini");
//-----------------------------------------------------------------------------
require_once './app/autoload.php';
//-----------------------------------------------------------------------------
Render::init();
$tmplData = Template::init();
$initedOK = Route::init();
if ($initedOK == false) {
    Render::antiTampering($tmplData);
}
//-----------------------------------------------------------------------------
if ($_GET['logoff']) {
    //echo "Logoff.";
    Session::logoff();
    Render::login($tmplData);
} elseif ($_POST['login'] && Session::login($tmplData) == false) {
    //echo "Login Failed.";
    Render::login($tmplData);
}
if (Session::isLoggedIn() === false) {
    //echo "Not logged in.";
Example #6
0
	/**
	 * 初始化配置数据
	 * @param  $config
	 */
	public static function init ($config) {
		SuiShiPHPConfig::setArray($config);
		// set php log
		$phpLogDir = SuiShiPHPConfig::getPhpLogDir();
		if ($phpLogDir) {
			if (is_dir ( $phpLogDir)) {
				if (! is_writable ( $phpLogDir )) {
					trigger_error ( "set php log path is not writable: " . $phpLogDir, E_USER_WARNING);
				} else {
					//设置php log 路径文件
					ini_set("error_log",$phpLogDir. date('Y-m-d') . ".log");
				}
			} else {
				if (! @mkdir ( $phpLogDir, 0777, true )) {
					trigger_error ( "create php log path error: " . $phpLogDir, E_USER_WARNING);
				} else {
					//设置php log 路径文件
					ini_set("error_log",$phpLogDir. date('Y-m-d') . ".log");
				}
			}
		}
		HttpRequest::init();
		Logger::init();
		Template::init();
	}