<?php /** * The construtcor for the scripts mod class * @param string $page * @param object &$tpl this is a reference because it is used in the index page * @param object &$db this is a reference because it is used in the index page * @param object &$ubb this is a reference because it is used in the index page * @return void * @acces public */ public function __construct($page, &$tpl, &$db, &$ubb) { // set the db, tpl and ubb classes (reference) $this->_db = &$db; $this->_tpl = &$tpl; $this->_ubb = &$ubb; // check the page if (($page == 'scripts') || ($page == 'default')) { // create the template $this->_tpl->set_handle('page', 'scripts/default.tpl'); // start the default function $this->_default(); } elseif ($page == 'showcat') { // create the template $this->_tpl->set_handle('page', 'scripts/showcat.tpl'); // start the showcat function $this->_showcat(); } elseif ($page == 'showsubcat') { // create the template $this->_tpl->set_handle('page', 'scripts/showsubcat.tpl'); // start the showsubcat function $this->_showsubcat(); } elseif ($page == 'showscript') { // create the template $this->_tpl->set_handle('page', 'scripts/showscript.tpl'); // start the showscript function $this->_showscript(); } elseif ($page == 'newscript') { // create the template $this->_tpl->set_handle('page', 'scripts/newscript.tpl'); // start the newscript function $this->_newscript(); } else { // create the template $this->_tpl->set_handle('page', 'scripts/default.tpl'); // start the default function $this->_default(); } }?>