diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/install.css | 14 | ||||
-rw-r--r-- | templates/show_install.inc.php | 2 | ||||
-rw-r--r-- | templates/show_install_check.inc.php | 112 | ||||
-rw-r--r-- | templates/show_install_config.inc.php | 12 | ||||
-rw-r--r-- | templates/show_install_lang.inc.php | 114 | ||||
-rw-r--r-- | templates/show_test.inc.php | 64 |
6 files changed, 159 insertions, 159 deletions
diff --git a/templates/install.css b/templates/install.css index 10eb86eb..f5d8a8a4 100644 --- a/templates/install.css +++ b/templates/install.css @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2001 - 2007 Ampache.org + * Copyright (c) Ampache.org * All rights reserved. * * This program is free software; you can redistribute it and/or @@ -118,15 +118,15 @@ textarea:focus{ /* Extras */ .ok { -font-weight:bold; -color:#009900; -margin:10px 10px 10px 10px; + font-weight:bold; + color:#009900; + margin:10px 10px 10px 10px; } .notok { -font-weight:bold; -color:#FF3300; -margin:10px 10px 10px 10px; + font-weight:bold; + color:#FF3300; + margin:3px 3px 3px 3px; } /* Bottom */ diff --git a/templates/show_install.inc.php b/templates/show_install.inc.php index 799ba65b..7c2bce79 100644 --- a/templates/show_install.inc.php +++ b/templates/show_install.inc.php @@ -36,7 +36,7 @@ if (INSTALL != '1') { exit; } <div id="text-box"> <div class="notify"> - <strong><?php echo _('Requirements'); ?></strong> + <h3><?php echo _('Requirements'); ?></h3> <p> <?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> </p> diff --git a/templates/show_install_check.inc.php b/templates/show_install_check.inc.php new file mode 100644 index 00000000..896a3cbd --- /dev/null +++ b/templates/show_install_check.inc.php @@ -0,0 +1,112 @@ +<?php +/* + + Copyright (c) Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +?> +<?php if (INSTALL != '1') { exit; } ?> +<h4><?php echo _('Required'); ?></h4> +<p><?php echo _('PHP Version'); ?>: +<?php + if(!check_php_ver()) { + $string = phpversion() . " " . _('Hash Function Exists') . " " . print_boolean(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_boolean(in_array('sha256',$algos)); + echo debug_result($string,false); + Error::add_error('install',_('PHP Version')); + } + else { + echo debug_result(phpversion(),true); + } +?> +</p> +<p><?php echo _('Mysql for PHP'); ?>: +<?php + if (!check_php_mysql()) { + echo debug_result('',false); + Error::add_error('install',_('Mysql for PHP')); + } + else { + echo debug_result(mysql_get_client_info(),true); + } +?> +</p> +<p><?php echo _('PHP Session Support'); ?>: +<?php + if (!check_php_session()) { + echo debug_result('',false); + Error::add_error('install',_('PHP Session Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('PHP ICONV Support'); ?>: +<?php + if (!check_php_iconv()) { + echo debug_result('',false); + Error::add_error('install',_('PHP ICONV Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('PHP PCRE Support'); ?>: +<?php + if (!check_php_pcre()) { + echo debug_result('',false); + Error::add_error('install',_('PHP PCRE Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('PHP PutENV Support'); ?>: +<?php + if (!check_putenv()) { + echo debug_result('',false); + Error::add_error('install',_('PHP PutENV Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<hr /> +<h4><?php echo _('Optional'); ?></h4> +<p><?php echo _('Gettext Support'); ?>: +<?php + if (!check_gettext()) { + echo debug_result(_('Gettext Emulator will be used'),false); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('Mbstring Support'); ?>: +<?php + if (!check_mbstring()) { + echo debug_result(_('Multibyte Chracter may not detect correct'),false); + } + else { + echo debug_result('',true); + } +?> +</p> diff --git a/templates/show_install_config.inc.php b/templates/show_install_config.inc.php index 7586cf9b..080ee358 100644 --- a/templates/show_install_config.inc.php +++ b/templates/show_install_config.inc.php @@ -92,12 +92,10 @@ if (INSTALL != '1') { exit; } <td>[ <?php if (!is_readable($configfile)) { - $status['read_config'] = 'false'; - echo " <span class=\"notok\">ERROR</span> "; + echo debug_result('',false); } else { - $status['read_config'] = 'true'; - echo " <span class=\"ok\">OK</span> "; + echo debug_result('',true); } ?> ] @@ -111,12 +109,10 @@ if (INSTALL != '1') { exit; } <?php $results = @parse_ini_file($configfile); if (!check_config_values($results)) { - $status['parse_config'] = 'false'; - echo " <span class=\"notok\">ERROR</span> "; + echo debug_result('',false); } else { - $status['parse_config'] = 'true'; - echo " <span class=\"ok\">OK</span> "; + echo debug_result('',true); } ?> ] diff --git a/templates/show_install_lang.inc.php b/templates/show_install_lang.inc.php index a079708c..f2bc46a1 100644 --- a/templates/show_install_lang.inc.php +++ b/templates/show_install_lang.inc.php @@ -36,7 +36,7 @@ </div> <div id="text-box"> <div class="notify"> - <strong><?php echo _('Requirements'); ?></strong> + <h3><?php echo _('Requirements'); ?></h3> <p> <?php echo _('This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites'); ?> </p> @@ -47,103 +47,19 @@ <p> <?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"); ?> </p> - </div> +<?php require_once 'templates/show_install_check.inc.php'; ?> +</div> +<?php if (Error::occurred()) { ?> <div class="content"> - <h3><?php echo _('System Checks'); ?></h3> - <h4><?php echo _('Requirements'); ?></h4> - <p><?php echo _('PHP Version'); ?>: - <?php - if(!check_php_ver()) { - echo " <font color=\"red\">ERROR</font> " . phpversion() . " " . _('Hash Function Exists') . " " - . print_boolean(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_boolean(in_array('sha256',$algos)); - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font><i>" . phpversion() . "</i>"; - } - ?> - </p> - <p><?php echo _('Mysql for PHP'); ?>: - <?php - if (!check_php_mysql()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - if(strcmp('5.0.0',mysql_get_client_info()) > 0) { - echo " <font color=\"#FF6600\"> WARNING </font> " . mysql_get_client_info() . "<strong>We recommend MySQL version more than 5.0.0</strong>"; - } else { - echo " <font color=\"green\"> OK </font>"; - echo "<i>" . mysql_get_client_info() . "</i>"; - } - } - ?> - </p> - <p><?php echo _('PHP Session Support'); ?>: - <?php - if (!check_php_session()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('PHP ICONV Support'); ?>: - <?php - if (!check_php_iconv()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('PHP PCRE Support'); ?>: - <?php - if (!check_php_pcre()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('PHP PutENV Support'); ?>: - <?php - if (!check_putenv()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <hr /> - <h4><?php echo _('Optional'); ?></h4> - <p><?php echo _('Gettext Support'); ?>: - <?php - if (!function_exists('gettext')) { - echo " <font color=\"#FF6600\">" . _('WARNING: This server will use gettext emulator.') . "</font> "; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('Mbstring Support'); ?>: - <?php - if (!function_exists('mb_check_encoding')) { - echo " <font color=\"#FF6600\">WARNING</font> "; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> + <span class="fatalerror"><?php echo _('Minimum Requirements not met. Unable to Install Ampache.'); ?></span> </div> - <?php if($results == 0) { ?> - <div class="content"> - <strong><?php echo _('Choose installation language.'); ?></strong> - <p> - <?php Error::display('general'); ?> - </p> +<?php } ?> + +<div class="content"> + <strong><?php echo _('Choose installation language.'); ?></strong> + <p> + <?php Error::display('general'); ?> + </p> <form method="post" action="<?php echo WEB_PATH . "?action=init"; ?>" enctype="multipart/form-data" > <?php @@ -165,12 +81,6 @@ echo "</select>\n"; </form> </div> - <?php } else { /* if results */ ?> - <div class="content"> - <?php echo _('Ampache does not <strong>run</strong> correctly by this server.'); ?><br /> - <?php echo _('Please contact your server administrator, and fix them.'); ?> - </div> - <?php } /* if results */ ?> <div id="bottom"> <p><strong>Ampache Installation.</strong><br /> For the love of Music.</p> diff --git a/templates/show_test.inc.php b/templates/show_test.inc.php index 5c193f98..c8f569be 100644 --- a/templates/show_test.inc.php +++ b/templates/show_test.inc.php @@ -46,12 +46,10 @@ <td valign="top">[ <?php if (!check_php_ver()) { - $status['php_ver'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['php_ver'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -65,12 +63,10 @@ <td valign="top">[ <?php if (!check_php_mysql()) { - $status['mysql_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['mysql_php'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -84,12 +80,10 @@ <td valign="top">[ <?php if (!check_php_session()) { - $status['session_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['session_php'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -103,12 +97,10 @@ <td valign="top">[ <?php if (!check_php_iconv()) { - $status['iconv_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['iconv_php'] = 'true'; - echo "<font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?>] </td> @@ -121,11 +113,10 @@ <td valign="top">[ <?php if (!check_php_pcre()) { - $status['pcre_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - echo "<font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?>] </td> @@ -138,11 +129,10 @@ <td valign="top">[ <?php if (!check_putenv()) { - $status['putevn_php'] = false; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - echo "<font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?>] </td> @@ -155,10 +145,10 @@ <td valign="top">[ <?php if (!is_readable($configfile)) { - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - echo " <font color=\"green\"> OK   </font> "; + echo debug_result('',true); } ?> ] @@ -177,11 +167,10 @@ $results = @parse_ini_file($configfile); Config::set_by_array($results); if (!check_config_values($results)) { - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['parse_config'] = true; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -196,12 +185,10 @@ <?php $db = check_database($results['database_hostname'], $results['database_username'], $results['database_password'],$results['database_name']); if (!$db) { - $status['check_db'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['check_db'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -216,19 +203,16 @@ <?php $db_inserted = check_database_inserted($db,$results['local_db']); if (!$db_inserted) { - $status['check_db_insert'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['check_db_insert'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] </td> <td> - This checks a few key tables to make sure that you have successfully inserted the ampache database and - that the user has access to the database + <?php echo _('This checks a few key tables to make sure that you have successfully inserted the ampache database and that the user has access to the database'); ?> </td> </tr> <tr> @@ -250,16 +234,14 @@ echo " <img src=\"" . $results['web_path'] ."/images/icon_enable.png\" /> "; } else { - $status['check_webpath'] = false; - echo "<font color=\"red\">ERROR</font>"; + echo debug_result('',false); } ?> ] </td> <td> - This test makes sure that your web_path variable is set correctly and that we are able to get to the index page. If you do not see a check mark - here then your web_path is not set correctly. + <?php echo _('This test makes sure that your web_path variable is set correctly and that we are able to get to the index page. If you do not see a check mark here then your web_path is not set correctly.'); ?> </td> </tr> </table> |