A Qcodo based CMS/ecommerce framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
3.8 KiB

12 years ago
  1. <?php
  2. $strProtocol = Quasi::$IsSsl ? 'https://' : 'http://';
  3. if($this->objPage)
  4. {
  5. $doctype = $this->objPage->DocType . "\n";
  6. $htmlopen = '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>' . "\n";
  7. ///@todo pull in other METATAGS from Page object ..
  8. //Note: except for the expires, these seem to have little effect .. and i'm not sure about expires ..
  9. $metatags = '<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" />' . "\n";
  10. $metatags .= '<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />' . "\n";
  11. //alt: $metatags .= '<META HTTP-EQUIV="EXPIRES" CONTENT="' . gmdate('D, d M Y H:i:s', time()) . ' GMT" />' . "\n";
  12. $metatags .= '<META HTTP-EQUIV="EXPIRES" CONTENT="0" />' . "\n";
  13. if(Quasi::$EncodingType )
  14. $metatags .= '<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; CHARSET=' . Quasi::$EncodingType . '" />' . "\n";
  15. print $doctype . $htmlopen . $metatags ;
  16. if (isset($this->objPage))
  17. print '<title>' . $this->objPage->Title . '</title>' . "\n";
  18. if( !empty($this->aryStyleSheets) )
  19. foreach($this->aryStyleSheets as $stylesheet)
  20. {
  21. if (file_exists(__WWWROOT__ . $stylesheet) )
  22. print '<link rel="stylesheet" type="text/css" href="' . $strProtocol . Quasi::$ServerName . $stylesheet . '">' . "\n";
  23. }
  24. else
  25. print "HEY - The stylesheet is missing!! Flying naked...<br />\n";
  26. if( !empty($this->aryJavaScripts) )
  27. foreach($this->aryJavaScripts as $javascript)
  28. {
  29. if (file_exists(__WWWROOT__ . $javascript) )
  30. print '<script type="text/javascript" src="' . $strProtocol . Quasi::$ServerName . $javascript . '"></script>' . "\n";
  31. }
  32. print '</head><body><div id="PageContainer">' . "\n";
  33. //Disabled javascript will really mess things up so ..
  34. $strNoJsMsg = Quasi::Translate('We are sorry, your browser does not support JavaScript! '
  35. . ' This site is unlikely to work correctly.'
  36. . ' Please enable JavaScript or visit using a different browser.');
  37. print '<noscript> <div class="warning"> ' . $strNoJsMsg . ' </div></noscript>';
  38. $this->RenderBegin();
  39. $this->objDefaultWaitIcon->Render('Position=absolute','Top=160','Left=200');
  40. $this->objPageView->Render();
  41. $this->RenderEnd();
  42. /* Make sure PageContainer extends to the entire layout. */
  43. print '<div class="spacer"></div>' . "\n";
  44. ?>
  45. <!-- Google Analytics -->
  46. <script type="text/javascript">
  47. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  48. document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  49. </script>
  50. <script type="text/javascript">
  51. /*
  52. try {
  53. var pageTracker = _gat._getTracker("your google id here");
  54. pageTracker._trackPageview();
  55. } catch(err) {}
  56. */
  57. </script>
  58. <?php
  59. print '</div><!-- end PageContainer --></body></html>';
  60. }
  61. else
  62. {
  63. $this->RenderBegin();
  64. print <<<HTML
  65. <html>
  66. <head><title>QuasiCMS - It Works!</title></head>
  67. <body>
  68. <h1>QuasiCMS - It Works!</h1>
  69. <p>So, now you need to add some pages and stuff...</p>
  70. </body>
  71. </html>
  72. HTML;
  73. $this->RenderEnd();
  74. }
  75. ?>