Advertisement
wandrake

Untitled

Mar 1st, 2012
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.59 KB | None | 0 0
  1. <?php
  2.     require_once("$prefix/utils/Div.php");
  3.     require_once("$prefix/utils/Dummy.php");
  4.     require_once("$prefix/utils/Image.php");
  5.     require_once("$prefix/utils/Link.php");
  6.     require_once("$prefix/utils/Paragraph.php");
  7.     require_once("$prefix/utils/Title.php");
  8.    
  9.     require_once("$prefix/include/Box.php");
  10.  
  11.     class Home {
  12.         private $_home;
  13.        
  14.         function Home($prefix) {
  15.             $mainbox = new Box();
  16.            
  17.             $page = new Div("page");
  18.            
  19.             $content = new Div("content");
  20.             $sidebar = new Div("sidebar");
  21.            
  22.             $page->add($content);
  23.             $page->add($sidebar);
  24.            
  25.             $this->_home = $page;
  26.            
  27.             $link_intervento = new Link("$prefix/intervento.php", "Prenota un intervento");
  28.            
  29.             $par_txt  = 'Nella sezione ' . $link_intervento->html() . ' รจ possibile ';
  30.             $par_txt .= 'inviare una richiesta per prenotare un intervento, inserendo accuratamente tutti ';
  31.             $par_txt .= 'i dati relativi all\'elettrodomestico non funzionante.<br/>';
  32.             $par_txt .= 'Si prega di inviare UNA richiesta per ogni elettrodomestico.';
  33.            
  34.             $mainpar = new Paragraph($par_txt);
  35.            
  36.             $box1 = new Box("content-box1");
  37.             $box2 = new Box("content-box2");
  38.            
  39.             $box1->add(new Title("Si riparano:", "3"));
  40.             $box1->add(new Dummy(
  41.                 '<ul class="section-list">' .
  42.                 '<li class="first central">' .
  43.                 '<img class="pic alignleft" src="images/frigorifero.png" width="70" height="70" alt="" />' .
  44.                 '<span>Frigoriferi</span>' .
  45.                 '</li>' .
  46.                 '<li class="central">' .
  47.                 '<img class="pic alignleft" src="images/lavatrice.png" width="70" height="70" alt="" />' .
  48.                 '<span>Lavatrici</span>' .
  49.                 '</li>' .
  50.                 '<li class="last central">' .
  51.                 '<img class="pic alignleft" src="images/lavastoviglie.png" width="70" height="70" alt="" />' .
  52.                 '<span>Lavastoviglie</span>' .
  53.                 '</li>' .
  54.                 '</ul>'));
  55.                
  56.             $box2->add(new Title("&nbsp;", "3"));
  57.             $box2->add(new Dummy(
  58.                 '<ul class="section-list">' .
  59.                 '<li class="first central">' .
  60.                 '<img class="pic alignleft" src="images/pianocottura.png" width="70" height="70" alt="" />' .
  61.                 '<span>Piani cottura</span>' .
  62.                 '</li>' .
  63.                 '<li class="central">' .
  64.                 '<img class="pic alignleft" src="images/forno.png" width="70" height="70" alt="" />' .
  65.                 '<span>Forni</span>' .
  66.                 '</li>' .
  67.                 '<li class="last central">' .
  68.                 '<span>E molto altro ancora...</span>' .
  69.                 '</li>' .
  70.                 '</ul>'));
  71.            
  72.             $mainbox->add(new Title("Benvenuto", "1"));
  73.             $mainbox->add(new Dummy("<br/>"));
  74.             $mainbox->add($mainpar);
  75.            
  76.             $content->add($mainbox);
  77.             $content->add($box1);
  78.             $content->add($box2);
  79.             $content->add(new Dummy("<br class=\"clearfix\" />"));
  80.            
  81.             $sidebar->add(new Dummy("<br class=\"clearfix\" />"));
  82.         }
  83.        
  84.         public function show() {
  85.             $this->_home->show();
  86.         }
  87.        
  88.         public function html() {
  89.             return $this->_home->html();
  90.         }
  91.     }
  92. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement