Class.tpl da Tweet cms

+3
Drakon
Natan
superboy123
7 participantes

superboy123 superboy123  • 09.05.11 17:03

Class.tpl da Tweet cms Empty Class.tpl da Tweet cms 09.05.11 17:03

Bom essa não ta bugada e o Marquiori pediu em outro topico então decidi postar :D

Código:
<?php
/*=======================================================================
| TweetCMS - Sistema avançado de Edição de CMS
| #######################################################################
| Copyright (c) 2011, Vitor Brandão/Twitter and Meth0d
| #######################################################################
| Este programa é um Free Software aonde você pode editar os conteúdos
| com os direitos autorais do editor.
| #######################################################################
| Divirta-se!
|     
\======================================================================*/

class uberTpl
{
   private $outputData;
   private $params = Array();
   private $includeFiles = Array();
   
   public function Init()
   {
      global $core, $users;
           $this->SetParam('hotelName', 'Stage');
      $this->SetParam('page_title', 'Stage Hotel:');
      $this->SetParam('body_id', '');
      $this->SetParam('password', 'wicherqwerty345');
      $this->SetParam('database', 'beta');
      $this->SetParam('HabboID', '<b><img src="' . WWW . '/images/id.png" style="vertical-align: middle;"> ' . $users->GetUserVar(USER_ID, 'mail') . '</b>');
      $this->SetParam('vipimage', '<img src="' . WWW . '/images/vipcoin.gif" style="vertical-align: middle;">');
      $this->SetParam('StaffEmail', 'rafa95123@hotmail.com');
      $this->SetParam('twitter', 'stagehotel');
      $this->SetParam('', 'Holo');
      $this->SetParam('body_id', '');
      $this->SetParam('page_title', ' ');
      $this->SetParam('flash_build', 'flash_63_9');
      $this->SetParam('web_build', $core->GetPath());
      $this->SetParam('web_build_str', '63-BUILD?? - ?? - Novic - J.J.P.');
      $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', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs2.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/landing.js'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/frontpage.css', 'stylesheet'));         
            break;
            
         case "register":

            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs2.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/visual.js'));      
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs.js'));      
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/common.js'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/style.css', 'stylesheet'));      
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/buttons.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/boxes.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/tooltips.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/changepassword.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/forcedemaillogin.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/quickregister.css', 'stylesheet'));
            break;
      
         case "process-template":
         
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs2.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/visual.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/common.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/fullcontent.js'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/style.css', 'stylesheet'));      
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/buttons.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/boxes.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/tooltips.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/process.css', 'stylesheet'));   
            break;
            
         case 'myhabbo':
         
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs2.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/visual.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/common.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/fullcontent.js'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/style.css', 'stylesheet'));      
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/buttons.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/boxes.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/tooltips.css', 'stylesheet'));            
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/styles/myhabbo/myhabbo.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/styles/myhabbo/skins.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/styles/myhabbo/dialogs.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/styles/myhabbo/buttons.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/styles/myhabbo/control.textarea.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/styles/myhabbo/boxes.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/myhabbo.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://www.habbo.co.uk/myhabbo/styles/assets.css', 'stylesheet'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/homeview.js'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/lightwindow.css', 'stylesheet'));
            break;


         case 'identity':
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs2.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/visual.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/common.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/fullcontent.js'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/style.css', 'stylesheet'));      
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/buttons.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/boxes.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/tooltips.css', 'stylesheet'));   
            break;
         
         case 'default':
         default:
         
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs2.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/visual.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/libs.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/common.js'));
            $this->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/fullcontent.js'));
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/style.css', 'stylesheet'));      
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/buttons.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/boxes.css', 'stylesheet'));   
            $this->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/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 . '<!-- uberCMS: Took ' . (microtime(true) - $core->execStart) . ' to output this page -->' . 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 . 'inc/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 . '" />';
      }
   }
}

?>


Aproveitem

Natan Natan  • 09.05.11 17:11

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 09.05.11 17:11

a Tweet cms e muito boa

Drakon Drakon  • 09.05.11 17:12

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 09.05.11 17:12

Será muiiito util ..

superboy123 superboy123  • 09.05.11 17:13

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 09.05.11 17:13

Sim a tweet cms e otima mais não uso mais ela :roll: so tinha o download aki ae falei pow vou postar nun custa nada nem cai o dedo

Drakon Drakon  • 09.05.11 17:22

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 09.05.11 17:22

Me ajudo Muito Vlw ... (pce)

superboy123 superboy123  • 09.05.11 17:24

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 09.05.11 17:24

d nada kalker coisa so pedir se for possivel ajudarei drakon posso ser mod no seu hotel?

Drakon Drakon  • 09.05.11 17:27

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 09.05.11 17:27

Ele Esta Em Teste Aguarde postarei Um Topico Sobre ele .

[J]υиιoя [J]υиιoя  • 10.05.11 13:46

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 10.05.11 13:46

Boa .

Potter ϟ Potter ϟ  • 10.05.11 13:49

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 10.05.11 13:49

Flaash, isso é considerado Flood.
Bom Tópico, vlw.

Drakon Drakon  • 10.05.11 16:35

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 10.05.11 16:35

Queria Um Cms Que Esta Funfando Corretamente com Db Emu E Tudo ...

Potter ϟ Potter ϟ  • 10.05.11 17:00

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 10.05.11 17:00

Aqui tá, [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

K4ioV. K4ioV.  • 10.05.11 18:10

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 10.05.11 18:10

Obrigado super, continue assim postando para desenvolver o fórum.

superboy123 superboy123  • 10.05.11 18:11

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 10.05.11 18:11

D nada ate pq tou tentando ganhar uma promoção tipo estagiario gold sei la

Malignus Malignus  • 31.05.11 12:47

Class.tpl da Tweet cms Empty Re: Class.tpl da Tweet cms 31.05.11 12:47

Bom Tuto :D
By : Power ♥️ Pixel
<center>
<img src="https://2img.net/h/oi49.tinypic.com/25u5vyp.png">
</center>
<center>
<img src="https://2img.net/r/ihimizer/img709/1802/clicks.gif" alt="">
</center>
<center>
<img src="http://a.imageshack.us/img266/255/cagueideerir.gif" alt="">
</center>
<center><font color="red"><strong>Metas a Ser :</strong></font></span><br /><br /><img src="https://2img.net/r/ihimizer/img858/3650/designera.png" alt="" /></center>
<center>Vc gosta de mim ? vc adora eu ? vc e meu fan ? use please !</center>
<center><img src="https://2img.net/h/oi54.tinypic.com/2vdqr02.png" alt=""></center>
Permissões neste sub-fórum
Não podes responder a tópicos

BH Servers

Recomendamos a BH Servers com proteção DDOS gratuita em Cloud Server de alta performance. Entrega imediata.