Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
I got a problem with my UberCMS server
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="HIGHEST" data-source="post: 131040" data-attributes="member: 14457"><p>Still not working on mine too,</p><p> </p><p><?php</p><p>/*=======================================================================</p><p>| UberCMS - Advanced Website and Content Management System for uberEmu</p><p>| #######################################################################</p><p>| Copyright (c) 2010, Roy 'Meth0d'</p><p>| <a href="http://www.meth0d.org" target="_blank">http://www.meth0d.org</a></p><p>| #######################################################################</p><p>| This program is free software: you can redistribute it and/or modify</p><p>| it under the terms of the GNU General Public License as published by</p><p>| the Free Software Foundation, either version 3 of the License, or</p><p>| (at your option) any later version.</p><p>| #######################################################################</p><p>| This program is distributed in the hope that it will be useful,</p><p>| but WITHOUT ANY WARRANTY; without even the implied warranty of</p><p>| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</p><p>| GNU General Public License for more details.</p><p>\======================================================================*/</p><p> </p><p>class uberTpl</p><p>{</p><p>private $outputData;</p><p>private $params = Array();</p><p>private $includeFiles = Array();</p><p> </p><p>public function Init()</p><p>{</p><p>global $core, $users, $cdn;</p><p> </p><p>$this->cdn = $cdn->AssignCDN();</p><p>$this->SetParam('cdn', $this->cdn);</p><p> </p><p>$this->SetParam('hotel', 'web_build');</p><p>$this->SetParam('web_build', '63_1dc60c6d6ea6e089c6893ab4e0541ee0/1194');</p><p> </p><p>// *************************************************************************************************</p><p>$this->SetParam('body_id', '');</p><p>$this->SetParam('page_title', ' ');</p><p>$this->SetParam('flash_build', '');</p><p>$this->SetParam('web_build_str', '');</p><p>$this->SetParam('req_path', WWW);</p><p>$this->SetParam('www', WWW);</p><p>$this->SetParam('hotel_status_fig', uberCore::GetSystemStatusString(true));</p><p>$this->SetParam('hotel_status', uberCore::GetSystemStatusString(false));</p><p> </p><p>if (LOGGED_IN)</p><p>{</p><p>$this->SetParam('habboLoggedIn', 'true');</p><p>$this->SetParam('habboName', USER_NAME);</p><p>$this->SetParam('vipbalance', '<b>' . $users->GetUserVar(USER_ID, 'vip_points') . ' <img src="' . WWW . '/images/vipcoin.gif" style="vertical-align: middle;"></b>');</p><p>}</p><p>else</p><p>{</p><p>$this->SetParam('habboLoggedIn', 'false');</p><p>$this->SetParam('habboName', 'null');</p><p>}</p><p>}</p><p> </p><p>public function AddIncludeSet($set)</p><p>{</p><p>switch (strtolower($set))</p><p>{</p><p>case "frontpage":</p><p> </p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/landing.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/frontpage.css', 'stylesheet'));</p><p>break;</p><p> </p><p>case "register":</p><p> </p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/embeddedregistration.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/simpleregistration.js'));</p><p>break;</p><p> </p><p>case "homes":</p><p> </p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/common.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/home.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '<a href="http://zaphotel.net/myhabbo/styles/assets/other.css" target="_blank">http://zaphotel.net/myhabbo/styles/assets/other.css</a>', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '<a href="http://zaphotel.net/myhabbo/styles/assets/backgrounds.css" target="_blank">http://zaphotel.net/myhabbo/styles/assets/backgrounds.css</a>', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '<a href="http://zaphotel.net/myhabbo/styles/assets/stickers.css" target="_blank">http://zaphotel.net/myhabbo/styles/assets/stickers.css</a>', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/homeview.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/lightwindow.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/homeauth.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/group.css', 'stylesheet'));</p><p> </p><p>break;</p><p> </p><p>case "process-template":</p><p> </p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/process.css', 'stylesheet'));</p><p>break;</p><p> </p><p>case 'myhabbo':</p><p> </p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/myhabbo.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/skins.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/dialogs.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/buttons.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/control.textarea.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/boxes.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/myhabbo/styles/assets.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/homeview.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/lightwindow.css', 'stylesheet'));</p><p>break;</p><p> </p><p>case 'default':</p><p>default:</p><p> </p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet'));</p><p>$this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet'));</p><p>break;</p><p>}</p><p>}</p><p> </p><p>public function AddGeneric($tplName)</p><p>{</p><p>$tpl = new Template($tplName);</p><p>$this->outputData .= $tpl->GetHtml();</p><p>}</p><p> </p><p>public function AddTemplate($tpl)</p><p>{</p><p>$this->outputData .= $tpl->GetHtml();</p><p>}</p><p> </p><p>public function SetParam($param, $value)</p><p>{</p><p>$this->params[$param] = is_object($value) ? $value->fetch() : $value;</p><p>}</p><p> </p><p>public function UnsetParam($param)</p><p>{</p><p>unset($this->params[$param]);</p><p>}</p><p> </p><p>public function AddIncludeFile($incFile)</p><p>{</p><p>$this->includeFiles[] = $incFile;</p><p>}</p><p> </p><p>public function WriteIncludeFiles()</p><p>{</p><p>foreach ($this->includeFiles as $f)</p><p>{</p><p>$this->Write($f->GetHtml() . LB);</p><p>}</p><p>}</p><p> </p><p>public function Write($str)</p><p>{</p><p>$this->outputData .= $str;</p><p>}</p><p> </p><p>public function FilterParams($str)</p><p>{</p><p>foreach ($this->params as $param => $value)</p><p>{</p><p>$str = str_ireplace('%' . $param . '%', $value, $str);</p><p>}</p><p> </p><p>return $str;</p><p>}</p><p> </p><p>public function Output()</p><p>{</p><p>global $core;</p><p> </p><p>$this->Write(LB . LB . LB . LB);</p><p> </p><p>echo $this->FilterParams($this->outputData);</p><p>}</p><p>}</p><p> </p><p>class Template</p><p>{</p><p>private $params = Array();</p><p>private $tplName = '';</p><p> </p><p>public function Template($tplName)</p><p>{</p><p>$this->tplName = $tplName;</p><p>}</p><p> </p><p>public function GetHtml()</p><p>{</p><p>global $users;</p><p> </p><p>extract($this->params);</p><p> </p><p>$file = CWD . 'includes/tpl/' . $this->tplName . '.tpl';</p><p> </p><p>if (!file_exists($file))</p><p>{</p><p>uberCore::SystemError('Template system error', 'Could not load template: ' . $this->tplName);</p><p>}</p><p> </p><p>ob_start();</p><p>include($file);</p><p>$data = ob_get_contents();</p><p>ob_end_clean();</p><p> </p><p>return $this->FilterParams($data);</p><p>}</p><p> </p><p>public function FilterParams($str)</p><p>{</p><p>foreach ($this->params as $param => $value)</p><p>{</p><p>if (is_object($value))</p><p>{</p><p>continue;</p><p>}</p><p> </p><p>$str = str_ireplace('%' . $param . '%', $value, $str);</p><p>}</p><p> </p><p>return $str;</p><p>}</p><p> </p><p>public function SetParam($param, $value)</p><p>{</p><p>$this->params[$param] = $value;</p><p>}</p><p> </p><p>public function UnsetParam($param)</p><p>{</p><p>unset($this->params[$param]);</p><p>}</p><p>}</p><p> </p><p>class IncludeFile</p><p>{</p><p>private $type;</p><p>private $src;</p><p>private $rel;</p><p>private $name;</p><p> </p><p>public function IncludeFile($type, $src, $rel = '', $name = '')</p><p>{</p><p>global $tpl;</p><p> </p><p>$this->type = $type;</p><p>$this->src = $src;</p><p>$this->rel = $rel;</p><p>$this->name = $name;</p><p>}</p><p> </p><p>public function GetHtml()</p><p>{</p><p>switch ($this->type)</p><p>{</p><p>case 'application/rss+xml':</p><p> </p><p>return '<link rel="' . $this->rel . '" type="' . $this->type . '" title="' . $this->name . '" href="' . $this->src . '" />';</p><p> </p><p>case 'text/javascript':</p><p> </p><p>return '<script src="' . $this->src . '" type="text/javascript"></script>';</p><p> </p><p>case 'text/css':</p><p>default:</p><p> </p><p>return '<link rel="' . $this->rel . '" href="' . $this->src . '" type="' . $this->type . '" />';</p><p>}</p><p>}</p><p>}</p><p> </p><p>?></p></blockquote><p></p>
[QUOTE="HIGHEST, post: 131040, member: 14457"] Still not working on mine too, <?php /*======================================================================= | UberCMS - Advanced Website and Content Management System for uberEmu | ####################################################################### | Copyright (c) 2010, Roy 'Meth0d' | [url]http://www.meth0d.org[/url] | ####################################################################### | This program is free software: you can redistribute it and/or modify | it under the terms of the GNU General Public License as published by | the Free Software Foundation, either version 3 of the License, or | (at your option) any later version. | ####################################################################### | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. \======================================================================*/ class uberTpl { private $outputData; private $params = Array(); private $includeFiles = Array(); public function Init() { global $core, $users, $cdn; $this->cdn = $cdn->AssignCDN(); $this->SetParam('cdn', $this->cdn); $this->SetParam('hotel', 'web_build'); $this->SetParam('web_build', '63_1dc60c6d6ea6e089c6893ab4e0541ee0/1194'); // ************************************************************************************************* $this->SetParam('body_id', ''); $this->SetParam('page_title', ' '); $this->SetParam('flash_build', ''); $this->SetParam('web_build_str', ''); $this->SetParam('req_path', WWW); $this->SetParam('www', WWW); $this->SetParam('hotel_status_fig', uberCore::GetSystemStatusString(true)); $this->SetParam('hotel_status', uberCore::GetSystemStatusString(false)); if (LOGGED_IN) { $this->SetParam('habboLoggedIn', 'true'); $this->SetParam('habboName', USER_NAME); $this->SetParam('vipbalance', '<b>' . $users->GetUserVar(USER_ID, 'vip_points') . ' <img src="' . WWW . '/images/vipcoin.gif" style="vertical-align: middle;"></b>'); } else { $this->SetParam('habboLoggedIn', 'false'); $this->SetParam('habboName', 'null'); } } public function AddIncludeSet($set) { switch (strtolower($set)) { case "frontpage": $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/landing.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/frontpage.css', 'stylesheet')); break; case "register": $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/embeddedregistration.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/simpleregistration.js')); break; case "homes": $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/common.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/home.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '[url]http://zaphotel.net/myhabbo/styles/assets/other.css[/url]', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '[url]http://zaphotel.net/myhabbo/styles/assets/backgrounds.css[/url]', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '[url]http://zaphotel.net/myhabbo/styles/assets/stickers.css[/url]', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/homeview.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/lightwindow.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/homeauth.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/static/styles/group.css', 'stylesheet')); break; case "process-template": $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/process.css', 'stylesheet')); break; case 'myhabbo': $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/myhabbo.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/skins.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/dialogs.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/buttons.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/control.textarea.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo/boxes.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/myhabbo.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/myhabbo/styles/assets.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/homeview.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/lightwindow.css', 'stylesheet')); break; case 'default': default: $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs2.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/visual.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/libs.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/common.js')); $this->AddIncludeFile(new IncludeFile('text/javascript', '%web_gallery%/static/js/fullcontent.js')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/style.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/buttons.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/boxes.css', 'stylesheet')); $this->AddIncludeFile(new IncludeFile('text/css', '%web_gallery%/styles/tooltips.css', 'stylesheet')); break; } } public function AddGeneric($tplName) { $tpl = new Template($tplName); $this->outputData .= $tpl->GetHtml(); } public function AddTemplate($tpl) { $this->outputData .= $tpl->GetHtml(); } public function SetParam($param, $value) { $this->params[$param] = is_object($value) ? $value->fetch() : $value; } public function UnsetParam($param) { unset($this->params[$param]); } public function AddIncludeFile($incFile) { $this->includeFiles[] = $incFile; } public function WriteIncludeFiles() { foreach ($this->includeFiles as $f) { $this->Write($f->GetHtml() . LB); } } public function Write($str) { $this->outputData .= $str; } public function FilterParams($str) { foreach ($this->params as $param => $value) { $str = str_ireplace('%' . $param . '%', $value, $str); } return $str; } public function Output() { global $core; $this->Write(LB . LB . LB . LB); echo $this->FilterParams($this->outputData); } } class Template { private $params = Array(); private $tplName = ''; public function Template($tplName) { $this->tplName = $tplName; } public function GetHtml() { global $users; extract($this->params); $file = CWD . 'includes/tpl/' . $this->tplName . '.tpl'; if (!file_exists($file)) { uberCore::SystemError('Template system error', 'Could not load template: ' . $this->tplName); } ob_start(); include($file); $data = ob_get_contents(); ob_end_clean(); return $this->FilterParams($data); } public function FilterParams($str) { foreach ($this->params as $param => $value) { if (is_object($value)) { continue; } $str = str_ireplace('%' . $param . '%', $value, $str); } return $str; } public function SetParam($param, $value) { $this->params[$param] = $value; } public function UnsetParam($param) { unset($this->params[$param]); } } class IncludeFile { private $type; private $src; private $rel; private $name; public function IncludeFile($type, $src, $rel = '', $name = '') { global $tpl; $this->type = $type; $this->src = $src; $this->rel = $rel; $this->name = $name; } public function GetHtml() { switch ($this->type) { case 'application/rss+xml': return '<link rel="' . $this->rel . '" type="' . $this->type . '" title="' . $this->name . '" href="' . $this->src . '" />'; case 'text/javascript': return '<script src="' . $this->src . '" type="text/javascript"></script>'; case 'text/css': default: return '<link rel="' . $this->rel . '" href="' . $this->src . '" type="' . $this->type . '" />'; } } } ?> [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
I got a problem with my UberCMS server
Top