PHP Classes

File: contents/themes/simplecolor/index.php

Recommend this page to a friend!
  Packages of Minh Tien   Noblesse CMS   contents/themes/simplecolor/index.php   Download  
File: contents/themes/simplecolor/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Noblesse CMS
Content management system with custom plugins
Author: By
Last change: Improve system
Date: 11 years ago
Size: 1,165 bytes
 

 

Contents

Class file image Download
<?php

$pageData=array();

$pageName=System::getCurrentPage();

$pageName=($pageName=='')?'home':$pageName;

if($matches=Uri::match('^(\w+)\/?'))
{
    $pageName=$matches[1];
}

if($matches=Uri::match('^page\/(\d+)'))
{
    $pageName='home';
}

// Theme::view('head');
$codeHead=Plugins::load('site_header');

$codeHead=is_array($codeHead)?'':$codeHead;

$codeFooter=Plugins::load('site_footer');

$codeFooter=is_array($codeFooter)?'':$codeFooter;

// print_r($codeHead);die();

System::defineGlobalVar('site_header',$codeHead);

System::defineGlobalVar('site_footer',$codeFooter);

if($loadData=Cache::loadKey('dbcache/'.Database::getPrefix().'simplecolor',-1))
{
    $loadData=unserialize($loadData);

    System::defineGlobalVar('themeSetting',$loadData);

    System::defineGlobalVar('site_name',$loadData['site_name']);



}


$links=Links::get(array(
    'cache'=>'yes',
    'cacheTime'=>130,
    'orderby'=>'order by sort_order asc'
    ));

// if(!is_array($links))
// {
//     $links=unserialize($links);
// }

System::defineVar('linkList',$links,'head');

Controller::loadWithPath('theme'.ucfirst($pageName),'index',System::getThemePath().'controller/');

// Theme::view('footer');

?>