Advertisement
Guest User

class_lib.php

a guest
Sep 6th, 2011
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.56 KB | None | 0 0
  1. <?php
  2. class Page
  3. {
  4. public $meta = array('title' => '',
  5.              'description' => ''
  6.             );
  7.    
  8. public $content = "";
  9.  
  10. public $extra = "";
  11.    
  12. public function Display()
  13. {
  14. echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
  15.     \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
  16. <html xmlns=\"http://www.w3.org/1999/xhtml\">
  17. <head>
  18. <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />
  19. <meta name=\"title\" content=\"".$this->meta['title']."\" />
  20. <meta name=\"description\" content=\"".$this->meta['description']."\" />
  21. <title>".$this->meta['title']."</title>
  22. <link rel=\"stylesheet\" type=\"text/css\" href=\"/main.css\" />
  23. <link href=\"http://fonts.googleapis.com/css?family=Istok+Web\" rel=\"stylesheet\" type=\"text/css\" />
  24. </head>
  25.    
  26. <body>
  27. <!--[if lte IE 8]>
  28. <div id=\"ie-message\">
  29.     You're using an oudated version of Internet Explorer. Update it to IE9 or download another browser.
  30. </div>
  31. <![endif]-->
  32.    
  33. <div id=\"container\">
  34. <div id=\"menu\">
  35. <ul>
  36.     <li><a href=\"/\">Home</a></li>
  37.     <li><a href=\"/projects\">Projects</a></li>
  38.     <li style=\"border-bottom:1px dotted #BFBFBF \"><a href=\"/contact\">Contact</a></li>
  39.     <li><a href=\"\">Stuff</a></li>
  40.     <li><a href=\"\">Stuff</a></li>
  41. </ul>
  42. </div>
  43. <div id=\"content\">"
  44. .$this->content;
  45. if (isset($this->extra)) {
  46.     echo "<table id=\"tab\">";
  47.     while (list($counter) = each($this->$extra)) {
  48.         for ($i=0;$i<3;$i++) {
  49.         echo "<tr class=\"tl\">";
  50.         echo "<td>$counter[$i]</td>";
  51.         echo "</tr>";
  52.         }
  53.     }
  54. }
  55. echo "
  56. <br /><br />
  57. </div>
  58. </div>
  59. </body>
  60. </html>";
  61. }
  62. }
  63. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement