Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("$prefix/include/dbconnect.php");
- require_once("$prefix/pages/Home2.php");
- require_once("$prefix/include/Utils.php");
- require_once("$prefix/include/Banner.php");
- require_once("$prefix/utils/Div.php");
- class Index {
- private static $_elements = array();
- private static $_idx = 0;
- private static $_prefix = ".";
- private static function add($element) {
- self::$_elements[self::$_idx] = $element;
- self::$_idx++;
- }
- public static function initialize() {
- $wrapper = new Div("wrapper");
- $wrapper->add(new Banner(self::$_prefix));
- $wrapper->add(new Home(self::$_prefix));
- self::add($wrapper);
- }
- static public function html() {
- $ret = "";
- for ($i = 0; $i < self::$_idx; $i++) {
- $ret .= self::$_elements[$i]->html();
- }
- return $ret;
- }
- static public function show() {
- echo self::html();
- }
- }
- Index::initialize();
- Index::show();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement