Changeset - f66d93bb8748
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2010-09-30 20:40:56
ohnobinki@ohnopublishing.net
Make Page->xhtml a private var for normaldotcom.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -2,25 +2,25 @@
 

	
 
/* Class for general page generation */
 
class page {
 

	
 
  private $base_title = 'SlatePermutate';
 
  private $doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"';
 
  private $htmlargs = 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"';
 
  private $bodyargs = '';
 
  public $lastJobTable = '';
 
  private $pageGenTime = 0;
 
  private $indexpath = 'http://protofusion.org/SlatePermutate/'; // full url to index for php header redirection
 
  /* whether or not to output valid XHTML */
 
  public $xhtml = FALSE;
 
  private $xhtml = FALSE;
 

	
 
  // Scripts and styles
 
  private $headCode = array();
 

	
 
  /* the inclusion of ga.js is augmented in __construct(). */
 
  private $trackingcode = '
 
			  <script type="text/javascript">
 
				var nathangPageTracker = _gat._getTracker("UA-17441156-1");
 
				nathangPageTracker._trackPageview();
 
				
 
				var ethanzPageTracker = _gat._getTracker("UA-2800455-1");
 
				ethanzPageTracker._trackPageview();
 
@@ -45,25 +45,25 @@ class page {
 
   /* compliant browsers which care, such as gecko, explicitly request xhtml: */
 
   if(!empty($_SERVER['HTTP_ACCEPT'])
 
      && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== FALSE
 
      || !strlen($_SERVER['HTTP_ACCEPT']) /* then the browser doesn't care :-) */)
 
     {
 
       $this->xhtml = TRUE;
 
       header('Content-type: application/xhtml+xml');
 
     }
 

	
 
   $ga_www = 'http://www.';
 
   if ($_SERVER['SERVER_PORT'] != 80)
 
     $ga_www = 'https://ssl.';
 
   $this->trackingcode = '<script type="text/javascript" src="' . $ga_www . 'google-analytics.com/ga.js"' . ($this->xhtml ? '/' : '') . ">\n"
 
   $this->trackingcode = '<script type="text/javascript" src="' . $ga_www . 'google-analytics.com/ga.js" />' . "\n"
 
     . $this->trackingcode;
 

	
 
    session_start();
 
    if($immediate
 
       && $ntitle != "NOHEAD")
 
      $this->head();
 
 }
 

	
 
  /**
 
   * \brief
 
   *   Adds some headcode to this page.
 
   *
 
@@ -95,25 +95,25 @@ class page {
 
// Public functions/vars
 

	
 
  public function head(){
 
    $this->pageGenTime = round(microtime(), 3);
 

	
 
    if ($this->xhtml)
 
       echo '<?xml version="1.0" encoding="utf-8" ?>' . "\n";
 

	
 
    echo '<!DOCTYPE ' . $this->doctype . '>
 
	  <html ' . $this->htmlargs . '>
 
	  <head>
 
	    <title>' . $this->pagetitle . ' :: ' . $this->base_title . '</title>
 
           <link rel="stylesheet" href="styles/general.css" type="text/css" media="screen" charset="utf-8"' . ($this->xhtml ? '/' : '') . '>';
 
           <link rel="stylesheet" href="styles/general.css" type="text/css" media="screen" charset="utf-8" />';
 

	
 
    // Write out all passed scripts
 
    foreach ($this->scripts as $i){
 
    	echo $this->headCode["$i"];
 
    }
 

	
 
    echo '</head>
 
	  <body '.$this->bodyargs.' ><div id="page">';
 
    echo $this->top(); // Write out top
 
  }
 

	
 
  public function foot(){
0 comments (0 inline, 0 general)