<?php
// PHP Script: index.asp
// Description: *.com index page
// DATE: 26-11-2009
// AUTHOR: 'Eugene Kerner' <ekerner@ekerner.com>
// REVISION: 1.0

require_once('config/SetEnv.php');
require_once('EKerner/WebApp.php');

class webpage extends EKerner_WebApp
{

  public function render()
  {
    // html meta data ...
    $this->siteDetails->metaTitle       = 'Terms &amp; Conditions &middot; ' . $this->siteDetails->company . ' &middot; ' . $this->siteDetails->caption;
    $this->siteDetails->metaDescription = $this->siteDetails->company . ' Terms &amp; Conditions. This document describes the terms and conditions of use for this website.';
    $this->siteDetails->metaKeywords    = $this->siteDetails->company . ', application developer, application, developer, app, software, Australia, AU, AUS, OZ, AUD, information technology, ' .
                                          'terms and conditions, terms, conditions, coopertation, inappropriate, offensive, spam, abuse, computer, software, crashes, breaks';
    $this->panes->head->append('content',
      '<link rel="stylesheet" type="text/css" href="/css/accordion.css" />' . "\n    " .
      '<script type="text/javascript" src="/js/accordion.jq"></script>'
    );
    $this->panes->onload->append('content', 
      "menu.init('mainMenu', ['eKerner', 'Terms']);\n"
    );
    
    // page content ...
    $this->panes->banner->append('widget', 'ContactLinks');
    $this->panes->left->append('widget', 'GenreMenu');
    $this->panes->heading->append('content', '
                      <img class="floatRight headingImage" src="/images/content/cat_and_dog.png" alt="Cat and Dog" title="Lets all get along!" style="cursor:help;" width="118px" height="100px" />
                      <h2><img src="/images/icons/gavel.png" alt="Gavel" width="25" height="25" />Terms &amp; Conditions</h2>
                      <p>This document describes the terms and conditions of use for this website.</p>
                      <p>It is basically a disclosure to say if it breaks dont blame us ;) But we are happy to help fix it :)
                          and also a warning against posting inappropriate content.</p>
                      <p class="alignRight"><a href="/">return home &raquo;</a></p>
    ');
    
    // parse and render the sitemap.xml file ...
    $counter = 1;
    $xml     = simplexml_load_file($this->siteDetails->link . '/sitemap.xml');
    $urlset  = array(); // we need to remap the $xml for usort() ...
    foreach ($xml as $url) array_push($urlset, $url);
    usort($urlset, create_function('$a, $b', 'if ((float)$a->priority == (float)$b->priority) return strcmp($a->loc, $b->loc); return ((float)$a->priority > (float)$b->priority) ? -1 : 1;'));
    $this->panes->main->append('content', '
                      <div class="p">
                        <h4>Terms of website use: -</h4>
                        If your computer or software crashes, stops working, or breaks while using this website then please acknowledge
                         that information technology is a deeply complex thing with many levels and many things can go wrong.<br />
                         The chance that any given error was definitively caused by our software is real but small.<br />
                        We thoroughly test our software and do everything in our power to prevent software and system failure,
                         however if you experience problems while using our website then please send us your
                         <a href="/contact/?action=feedback" title="Send us Feedback">Feedback</a> and we will do what is our onus to help.<br />
                        Please also note that we are IT professionals so if you need a solution then please dont hesitate to
                         <a href="/contact/?action=enquiry" title="Make an Enquiry">Contact Us</a>.
                      </div>
                      <div class="p">
                        <h4>Conditions of website use: -</h4>
                        If you post or publish any content that we consider inappropriate, offensive, spam, or abuse
                         then the said content may be removed, and additionally your membership may be revoked
                         and your IP address and/or email address(es) may be banned and/or black-listed.<br />
                        If you abuse and distress one of our staff members or clients
                         then you will almost certainly be held responsible in a court of law.
                      </div>
                      <div class="p">
                        <h4>Shop returns policy: -</h4>
			We do not offer returns on downloadable/non-returnable products such as software.
                      </div>
                      <div class="p">
                        <b><br />Basically, lets all get along and respect one and other.<br /> </b>
                      </div>
                      <p class="alignRight"><a href="/">return home &raquo;</a></p>
    ');
    $this->panes->right->append('widget', 'BlockLinks');
    $this->panes->bottom->append('widget', 'Footer');
    $this->write();
  }
  
}


try {
  $webpage = new webpage();
  $webpage->render();
} catch (Exception $e) {
  die($e->getMessage());
}

?>
