|
From: Benjamin C. <bc...@us...> - 2002-09-27 19:24:43
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv2444/templates/default
Modified Files:
install.html
Added Files:
install-dbfailure.html install-dbsuccess.html
Log Message:
Added the ability to test the database connection before submitting the form.
--- NEW FILE: install-dbfailure.html ---
<html>
<head>
<title>DB Test Failure</title>
<link rel="StyleSheet" href="styles/default.css" type="text/css">
</head>
<body>
<br><br>
<div align="center">
The installation script could not connect to the database
<b><?php echo $params['db_database']?></b> on the host <b><?php echo $params['db_host']?></b>
using the specified username and password.
<br>
Please check these details are correct and that the database already exists then retry.
<br>
<br>
<?php
echo $db->message.'<br>'.$db->userinfo."\n";
if ($testonly) {
echo '<br><br><a href="javascript:window.close()">Close window</a>';
}
?>
</div>
</body>
</html>
--- NEW FILE: install-dbsuccess.html ---
<html>
<head>
<title>DB Test Success</title>
<link rel="StyleSheet" href="styles/default.css" type="text/css">
</head>
<body>
<br><br>
<div align="center">
The installation script successfully connected to the database
<b><?php echo $params['db_database']?></b> on the host <b><?php echo $params['db_host']?></b>
using the specified username and password.
<br>
Congratulations!
<br>
<br>
<a href="javascript:window.close()">Close window</a>
</div>
</body>
</html>
Index: install.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/install.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- install.html 24 May 2002 15:19:16 -0000 1.8
+++ install.html 27 Sep 2002 19:24:39 -0000 1.9
@@ -1,6 +1,15 @@
<html>
+<head>
<title>phpBugTracker Installation</title>
<link rel="StyleSheet" href="styles/default.css" type="text/css">
+ <script language="JavaScript">
+ function testDB(frm) {ldelim}
+ window.open('install.php?op=dbtest&db_type=' + frm.db_type.options[frm.db_type.selectedIndex].value +
+ '&db_host=' + frm.db_host.value + '&db_database=' + frm.db_database.value +
+ '&db_user=' + frm.db_user.value + '&db_pass=' + frm.db_pass.value,
+ 'iwin', 'dependent=yes,width=450,height=300,scrollbars=1');
+ {rdelim}
+ </script>
</head>
<body bgcolor="#ffffff" link="#006699" vlink="#006699" alink="#006699">
<form action="{$smarty.server.PHP_SELF}" method="post">
@@ -44,6 +53,9 @@
<td><input type="text" name="tbl_prefix" value="{$tbl_prefix|default:phpbt_}"></td>
</tr>
<tr>
+ <td colspan="2" align="center">
+ <input type="button" value="Test Database Connection" onClick="testDB(this.form)">
+ </td>
</tr>
<tr>
<th colspan="2">Configuration</th>
@@ -75,8 +87,8 @@
<tr>
<td width="150">Encrypt Passwords in DB:</td>
<td>
- <input type="radio" name="encrypt_pass" value="1"> Yes
- <input type="radio" name="encrypt_pass" value="0" checked> No
+ <input type="radio" name="encrypt_pass" value="1"> Yes
+ <input type="radio" name="encrypt_pass" value="0" checked> No
</td>
</tr>
<tr>
@@ -92,10 +104,10 @@
submit this form you will be prompted to save config.php. Copy
this file to the location of the bug tracker, and then you will
be able to <a href="index.php">login to the bug tracker</a>. From
- the home page you can go to the Admin Tools and customize your
- installation via the Configuration link. Once you have
- completed the configuration, you will be ready to add a project and
- start reporting bugs!
+ the home page you can go to the Admin Tools and customize your
+ installation via the Configuration link. Once you have
+ completed the configuration, you will be ready to add a project and
+ start reporting bugs!
<input type="hidden" name="op" value="dump_config_file">
{/if}
<br>
@@ -103,7 +115,7 @@
<input type="submit" value="Save Options">
</td>
</tr>
- </table>
+ </table>
</td>
</tr>
</table>
|