|
From: Benjamin C. <bc...@us...> - 2004-05-02 16:50:48
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17195 Modified Files: Tag: htmltemplates install.php Log Message: Various fixes Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.39.2.3 retrieving revision 1.39.2.4 diff -u -r1.39.2.3 -r1.39.2.4 --- install.php 5 Sep 2003 12:14:04 -0000 1.39.2.3 +++ install.php 2 May 2004 16:50:38 -0000 1.39.2.4 @@ -23,12 +23,15 @@ // ------------------------------------------------------------------------ // $Id$ +include_once('inc/functions.php'); +define('THEME', 'default'); + // Template class class template { var $vars; - function template() { - $this->vars = array(); + function template($vars = array()) { + $this->vars = $vars; } function render($content_template, $page_title, $wrap_file = '') { @@ -50,7 +53,8 @@ } } -$t = new template(); +$t = new template(array( + 'template_path' => 'templates/default')); $db_types = array( 'mysql' => 'MySQL', @@ -108,7 +112,7 @@ header("Location: index.php"); } -function build_select($selected = 0) { +function db_type_options($selected = 0) { global $db_types; foreach ($db_types as $val => $item) { @@ -118,13 +122,6 @@ } } -/// -/// Check the validity of an email address -/// (From zend.com user russIndr) -function bt_valid_email($email) { - return eregi('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$', $email); -} - function grab_config_file() { global $t, $_POST; @@ -249,17 +246,17 @@ function show_finished() { global $t, $_POST; - $t->assign('login', $_POST['admin_login']); - $t->render('install-complete.html'); + $login = $_POST['admin_login']; + include('templates/default/install-complete.html'); } function show_front($error = '') { global $t, $_POST, $select, $HTTP_SERVER_VARS; - $t->assign($_POST); - $t->assign('error', $error); - $t->assign('default_email', 'phpbt@'.$HTTP_SERVER_VARS['SERVER_NAME']); - $t->render('install.html'); + extract($_POST); + $error = $error; + $default_email = 'phpbt@'.$HTTP_SERVER_VARS['SERVER_NAME']; + include('templates/default/install.html'); } if (isset($_POST['op'])) { |