Bontiv-Sourceer source code viewer
Root | Help
./bontiv-cms/themes/bluewater/mod_theme.php
<?php
class mod_theme extends core_modbase {
    public function
__construct()
    {
       
core_signal::SetHandle('display', array($this, 'display'));
    }
   
    static public function
UrlCatcher($url)
    {
        return
preg_match('`^(|.*/)doc.xml$`', $url) == 1;
    }
   
    public function
start($url)
    {
        if (!
self::UrlCatcher($url))
            throw new
Error404();
       
header('Content-Type: text/xml');
        echo
'<url>
    <url1>
        <slogan1>Site de Bontiv</slogan1>
        <yoururl>http://remi.bonnetchangai.free.fr</yoururl>
        <slogan12>Plein de choses dans la tĂȘte d\'un dev</slogan12>
        <slogan2>Blog</slogan2>
        <slogan22>Des aticles sur la programmation et du geek !</slogan22>
        <slogan3>Outils</slogan3>
        <slogan32>Des outils pour les dĂ©veloppeurs</slogan32>
    </url1>
</url>'
;
    }
   
    public function
display($template)
    {
       
$user = new user();
       
$access = new access();
       
$template->assign('isRegistred', $user->isRegistred() ? 1 : 0);
       
$template->assign('isAdmin', $access->right('/admin'));
    }
}
Presented with Bontiv-Sourceer