Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: PHP | Size: 3.37 KB | Hits: 79 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. <?php
  2.  
  3. // Check script entry  
  4.                
  5. if (!defined("SPUTCMS")) die("Script has not been initialised correctly! (SPUTCMS not defined)");
  6.  
  7.  
  8. class tpl_app extends tpl_lib
  9. {
  10.  
  11.         public $blocks = array(
  12.                         "header",
  13.                         "subnav",
  14.                         "__content__",
  15.                         "footer"
  16.                 );
  17.        
  18.         public $page_title = "croft goode | chartered architects in kirkham";
  19.        
  20.         public $body_class = "home";
  21.        
  22.         public $html_class = "cg";
  23.        
  24.         public $background_image = "";
  25.        
  26.         public $project_images = "";
  27.  
  28.         public $meta_description = "Croft Goode Ltd. Award winning Chartered Architects and urban planners in Kirkham, Lancashire.";
  29.        
  30.         public $meta_keywords = "architects, kirkham, preston, lancashire, blackpool, north west, lancashire, fylde, urban, croft goode";
  31.                        
  32.         public $file = '';     
  33.  
  34.         public function __constructor() {
  35.                 $file_array = array(
  36.                         'media/images/home_backgrounds/dochertyhouse.jpg',
  37.                         'media/images/home_backgrounds/carnforth.jpg',
  38.                         'media/images/home_backgrounds/carnforth.jpg');
  39.                
  40.                 $total = count($file_array);
  41.                 $random = (mt_rand()%$total);
  42.                 $this->background_image = "$file_array[$random]";
  43.         }
  44.  
  45.         public function block_header()
  46.         {
  47.  
  48.                 global $app, $CONFIG;
  49.                
  50.                 $return = <<<END
  51. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  52. <html xmlns="http://www.w3.org/1999/xhtml" class="{$this -> html_class}">
  53. <head>
  54.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  55.     <base href="{$CONFIG['root_url']}{$app -> app_url}" />
  56.     <title>{$this -> page_title}</title>
  57.     <meta name="description" content="{$this -> meta_description}" />
  58.         <meta name="keywords" content="{$this -> meta_keywords}" />
  59.        
  60.         <link rel="shortcut icon" type="image/x-icon" href="{$CONFIG['root_url']}{$app -> app_url}media/images/favicon.ico" />
  61.    
  62.         <link href="media/css/style.css" rel="stylesheet" type="text/css" />
  63.         <link href="media/css/fancybox.css" rel="stylesheet" type="text/css" />
  64.         <!--[if IE]><link href="media/css/ie.css" rel="stylesheet" type="text/css" /><![endif]-->
  65.         <!--[if lt IE 8]><link href="media/css/ltie8.css" rel="stylesheet" type="text/css" /><![endif]-->
  66.         <!--[if IE 6]><link href="media/css/ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
  67.    
  68.         <script src="media/js/jquerytools.js" type="text/javascript"></script>
  69.     <script src="media/js/fancybox.js" type="text/javascript"></script>
  70.     <!--[if IE 6]>
  71.         <script src="media/js/pngfix.js" type="text/javascript"></script>
  72.         <script type="text/javascript">
  73.                 DD_belatedPNG.fix('#sidebar img');
  74.         </script><![endif]-->
  75.     <script src="media/js/site.js" type="text/javascript"></script>
  76. </head>
  77.  
  78. <body class="{$this -> body_class}">
  79.         {$this -> background_image}  
  80.     {$this -> project_images}
  81.         <div id="wrapper">
  82.         <div id="masthead">
  83.             <h1 id="logo"><a href="home/" title="Croft Goode Chartered Architects">croft goode architects</a></h1>
  84.             <ul id="navigation">
  85.                 <li id="nav_work"><a href="our-work/" accesskey="1">our work</a></li>
  86.                 <li id="nav_how"><a href="how-we-do-it/" accesskey="2">how we do it</a></li>
  87.                 <li id="nav_who"><a href="who-we-are/" accesskey="3">who we are</a></li>
  88.                 <li id="nav_contact"><a href="contact/" accesskey="5">be in touch</a></li>
  89.             </ul>
  90.         </div>
  91. END;
  92.  
  93.                 return $return;
  94.  
  95.         }