summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-13 21:37:49 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-13 21:37:49 +0000
commit779f4bf4e560d7f415ea51a96ed547831745a8dc (patch)
treec99f06687da016d975b3e131ff2d57a8b68da0dd /templates
parent1a6ae62569dbc5603a361a488641950cc317ac3d (diff)
downloadampache-779f4bf4e560d7f415ea51a96ed547831745a8dc.tar.gz
ampache-779f4bf4e560d7f415ea51a96ed547831745a8dc.tar.bz2
ampache-779f4bf4e560d7f415ea51a96ed547831745a8dc.zip
updated sql file, and the install process now works
Diffstat (limited to 'templates')
-rw-r--r--templates/install.css5
-rw-r--r--templates/show_install.inc11
-rw-r--r--templates/show_install_account.inc.php21
-rw-r--r--templates/show_install_config.inc40
4 files changed, 38 insertions, 39 deletions
diff --git a/templates/install.css b/templates/install.css
index 5faade68..e42f1c1b 100644
--- a/templates/install.css
+++ b/templates/install.css
@@ -44,7 +44,10 @@ body {
text-align: left;
font-size: smaller;
}
-
+.error {
+ color: #ff0033;
+ font-weight: bold;
+}
.notify {
border: 1px solid #cccccc;
background-color: #f4f4f4;
diff --git a/templates/show_install.inc b/templates/show_install.inc
index e0307e18..5a477e74 100644
--- a/templates/show_install.inc
+++ b/templates/show_install.inc
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+if (INSTALL != '1') { exit; }
?>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
<head>
@@ -55,9 +55,10 @@
</dl>
<?php echo _("Step 2 - Creating the Ampache.cfg.php file"); ?><br />
<?php echo _("Step 3 - Setup Initial Account"); ?><br />
- <br /><br />
- <span class="header2">Insert Ampache Database</span>
+ <br />
<?php Error::display('general'); ?>
+ <br />
+ <span class="header2">Insert Ampache Database</span>
<form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?action=create_db&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data" >
<table>
<tr>
@@ -89,6 +90,10 @@
<td><input type="password" id="db_password" name="db_password" value="" disabled="disabled" /></td>
</tr>
<tr>
+ <td class="align"><?php echo _('Overwrite Existing'); ?></td>
+ <td><input type="checkbox" name="overwrite_db" value="1" /></td>
+</tr>
+<tr>
<td>&nbsp;</td>
<td><input type="submit" value="<?php echo _("Insert Database"); ?>" /></td>
</tr>
diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php
index 30a63247..90141263 100644
--- a/templates/show_install_account.inc.php
+++ b/templates/show_install_account.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2006 Ampache.org
+ Copyright (c) 2001 - 2007 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -19,17 +19,13 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*!
- @header Show Install Config File
-
-*/
-
+if (INSTALL != '1') { exit; }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
<head>
<title>Ampache :: For The Love Of Music - Install</title>
-<?php require_once(conf('prefix') . "/templates/install.css"); ?>
+<link rel="stylesheet" href="templates/install.css" type="text/css" media="screen" />
</head>
<body>
<div id="header">
@@ -48,7 +44,6 @@
</ul>
<?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?>
</div>
-
<div class="content">
<?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?><br />
<?php echo _("Step 2 - Creating the ampache.cfg.php file"); ?><br />
@@ -56,22 +51,22 @@
<dl>
<dd><?php echo _("This step creates your initial Ampache admin account. Once your admin account has been created you will be directed to the login page"); ?></dd>
</dl>
- <br /><br />
+ <?php Error::display('general'); ?>
+ <br />
<span class="header2"><?php echo _('Create Admin Account'); ?></span>
- <?php echo $GLOBALS['error']->print_error('general'); ?>
<form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=create_account"; ?>" enctype="multipart/form-data" >
<table>
<tr>
- <td class="align"><?php echo _("Username"); ?></td>
+ <td class="align"><?php echo _('Username'); ?></td>
<td><input type="text" name="local_username" value="admin" /></td>
</tr>
<tr>
- <td class="align"><?php echo _("Password"); ?></td>
+ <td class="align"><?php echo _('Password'); ?></td>
<td><input type="password" name="local_pass" value="" /></td>
</tr>
<tr>
<td>&nbsp;</td>
- <td><input type="submit" value="<?php echo _("Create Account"); ?>" /></td>
+ <td><input type="submit" value="<?php echo _('Create Account'); ?>" /></td>
</tr>
</table>
</form>
diff --git a/templates/show_install_config.inc b/templates/show_install_config.inc
index e39c92f9..9b5c477b 100644
--- a/templates/show_install_config.inc
+++ b/templates/show_install_config.inc
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2005 Ampache.org
+ Copyright (c) 2001 - 2007 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -19,21 +19,17 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*!
- @header Show Install Config File
-
-*/
-
+if (INSTALL != '1') { exit; }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
<head>
<title>Ampache :: For The Love Of Music - Install</title>
-<?php require_once(conf('prefix') . "/templates/install.css"); ?>
+<link rel="stylesheet" href="templates/install.css" type="text/css" media="screen" />
</head>
<body>
<div id="header">
-<h1><?php echo _("Ampache Installation"); ?></h1>
+<h1><?php echo _('Ampache Installation'); ?></h1>
<p>For the love of Music</p>
</div>
<div id="text-box">
@@ -55,44 +51,44 @@
<dd><?php echo _("This steps takes the basic config values, and first attempts to write them out directly to your webserver. If access is denied it will prompt you to download the config file. Please put the downloaded config file in /config"); ?></dd>
</dl>
<?php echo _("Step 3 - Setup Initial Account"); ?><br />
- <br /><br />
- <span class="header2">Generate Config File</span>
- <?php echo $GLOBALS['error']->print_error('general'); ?>
+ <?php Error::display('general'); ?>
+ <br />
+ <span class="header2"><?php echo _('Generate Config File'); ?></span>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'] . "?action=create_config"; ?>" enctype="multipart/form-data" >
<table>
<tr>
- <td class="align"><?php echo _("Web Path"); ?></td>
+ <td class="align"><?php echo _('Web Path'); ?></td>
<td class="align"><input type="text" name="web_path" value="<?php echo $web_path; ?>" /></td>
</tr>
<tr>
- <td class="align"><?php echo _("Desired Database Name"); ?></td>
+ <td class="align"><?php echo _('Desired Database Name'); ?></td>
<td class="align"><input type="text" name="local_db" value="<?php echo scrub_out($_REQUEST['local_db']); ?>" /></td>
</tr>
<tr>
- <td class="align"><?php echo _("MySQL Hostname"); ?></td>
+ <td class="align"><?php echo _('MySQL Hostname'); ?></td>
<td class="align"><input type="text" name="local_host" value="<?php echo scrub_out($_REQUEST['local_host']); ?>" /></td>
</tr>
<tr>
- <td class="align"><?php echo _("MySQL Username"); ?></td>
+ <td class="align"><?php echo _('MySQL Username'); ?></td>
<td class="align"><input type="text" name="local_username" value="<?php echo scrub_out($_REQUEST['local_username']); ?>" /></td>
</tr>
<tr>
- <td class="align"><?php echo _("MySQL Password"); ?></td>
+ <td class="align"><?php echo _('MySQL Password'); ?></td>
<td class="align"><input type="password" name="local_pass" value="" /></td>
</tr>
<tr>
<td>&nbsp;</td>
- <td><input type="submit" value="<?php echo _("Write Config"); ?>" /></td>
+ <td><input type="submit" value="<?php echo _('Write Config'); ?>" /></td>
</tr>
</table>
</form>
<br />
<table>
<tr>
- <td class="align"><?php echo _("Ampache.cfg.php Exists"); ?></td>
+ <td class="align"><?php echo _('Ampache.cfg.php Exists'); ?></td>
<td>[
<?php
- if (!read_config_file($configfile)) {
+ if (!is_readable($configfile)) {
$status['read_config'] = 'false';
echo " <span class=\"notok\">ERROR</span> ";
}
@@ -106,11 +102,11 @@
</tr>
<tr>
<td class="align">
- <?php echo _("Ampache.cfg.php Configured?"); ?>
+ <?php echo _('Ampache.cfg.php Configured?'); ?>
</td>
<td>[
<?php
- $results = read_config($configfile, 0, 0);
+ $results = @parse_ini_file($configfile);
if (!check_config_values($results)) {
$status['parse_config'] = 'false';
echo " <span class=\"notok\">ERROR</span> ";
@@ -133,7 +129,7 @@
</table>
<br />
<form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=show_create_account&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data">
- <input type="submit" value="Continue to Step 3" />
+ <input type="submit" value="<?php echo _('Continue to Step 3'); ?>" />
</form>
</div>
<div id="bottom">