install/index.php
changeset 151 b8adc3cf28c7
parent 150 59c42a716f95
child 152 16cdb7844fce
equal deleted inserted replaced
150:59c42a716f95 151:b8adc3cf28c7
     1 <?php
     1 <?php
     2 
     2 
       
     3 $language = $_POST['language'];
       
     4 setlocale(LC_ALL, $language);
       
     5 $gettext_domain = 'messages';
       
     6 bindtextdomain($gettext_domain, "./../locale");
       
     7 textdomain($gettext_domain);
       
     8 @putenv('LANG='.$language);
       
     9 @putenv('LANGUAGE='.$language);
       
    10 
     3 $local_config_file = "../inc/config.inc.php";
    11 $local_config_file = "../inc/config.inc.php";
       
    12 
       
    13 function error($msg) {
       
    14 	if ($msg) {
       
    15 		echo "     <div class=\"error\">Error: " . $msg . "</div>\n";
       
    16 	} else {
       
    17 		echo "     <div class=\"error\">" . _('An unknown error has occurred.') . "</div>\n";
       
    18 	}
       
    19 }
     4 
    20 
     5 echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
    21 echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
     6 echo "<html>\n";
    22 echo "<html>\n";
     7 echo " <head>\n";
    23 echo " <head>\n";
     8 echo "  <title>Poweradmin</title>\n";
    24 echo "  <title>Poweradmin</title>\n";
    15 } else {
    31 } else {
    16 	$step = $_POST['step'];
    32 	$step = $_POST['step'];
    17 }
    33 }
    18 
    34 
    19 echo "  <h1>Poweradmin</h1>";
    35 echo "  <h1>Poweradmin</h1>";
    20 echo "  <h2>Installation step " . $step . "</h2>";
    36 echo "  <h2>" . _('Installation step') . " " . $step . "</h2>";
    21 
    37 
    22 switch($step) {
    38 switch($step) {
       
    39 
    23 	case 1:
    40 	case 1:
    24 		$step++;
    41 		$step++;
    25 		echo "<p>This installer expects you to have a PowerDNS database accessable from this server. This installer also expects you to have never ran Poweradmin before, or that you want to overwrite the Poweradmin part of the database. If you have had Poweradmin running before, any data in the following tables will be destroyed:</p>\n";
    42 
    26 		echo "<ul><li>perm_items</li><li>perm_templ</li><li>perm_templ_items</li><li>users</li><li>zones</li></ul>\n";
    43 		echo "<p>\n";
    27 		echo "<p>This installer will, of course, not touch the data in the PowerDNS tables of the database. However, it is, of course, recommended you create a backup of your database before proceeding.</p>";
    44 		echo " <form method=\"post\">\n";
    28 		echo "<p>Finally, if you see any errors during the installation process, a problem report would be. You can report problems (and ask for help) on the <a href=\"https://www.poweradmin.org/trac/wiki/Mailinglists\">poweradmin-users</a> mailinglist or you can create <a href=\"https://www.poweradmin.org/trac/newticket\">a ticket</a> in the ticketsystem.</p>";
    45 		echo "  <input type=\"radio\" name=\"language\" value=\"en_EN\"> I prefer to proceed in english.<br>\n";
    29 		echo "<p>Do you want to proceed now?</p>\n";
    46 		echo "  <input type=\"radio\" name=\"language\" value=\"nl_NL\"> Ik ga graag verder in het Nederlands.<br><br>\n";
    30 		echo "<form method=\"post\">";
    47 		echo "  <input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
    31 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
    48 		echo "  <input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
    32 		echo "<input type=\"submit\" name=\"submit\" value=\"Go to step " . $step . "\">";
    49 		echo " </form>\n";
    33 		echo "</form>";
    50 		echo "</p>\n";
    34 		break;
    51 		break;
    35 
    52 
    36 	case 2:	
    53 	case 2:
    37 		$step++;
    54 		$step++;
    38 		echo "<p>To prepare the database for using Poweradmin, the installer needs to modify the PowerDNS database. It'll add a number of tables and it'll fill these tables with some data. If the tables are already present, the installer will drop them first.</p>";
    55 
    39 		echo "<p>To do all of this, the installer needs to access the database with an account which has sufficient rights. If you trust the installer, you may give it the username and password of the database user root. Otherwise, make sure the user has enough rights, before actually proceeding.</p>";
    56 		echo "<p>" . _('This installer expects you to have a PowerDNS database accessable from this server. This installer also expects you to have never ran Poweradmin before, or that you want to overwrite the Poweradmin part of the database. If you have had Poweradmin running before, any data in the following tables will be destroyed: perm_items, perm_templ, perm_templ_items, users and zones. This installer will, of course, not touch the data in the PowerDNS tables of the database. However, it is recommended that you create a backup of your database before proceeding.') . "</p>\n";
    40 		echo "<form method=\"post\">";
    57 
    41 		echo "<table>\n";
    58 		echo "<p>" . _('The alternative for this installer is a manual installation. Refer to the poweradmin.org website if you want to go down that road.') . "</p>\n";
    42 		echo "<tr><td>Username</td><td><input type=\"text\" name=\"user\" value=\"\"></td><td>The username to use to connect to the database, make sure the username has sufficient rights to perform administrative task to the PowerDNS database (e.g. \"root\").</td></tr>\n";
    59 
    43 		echo "<tr><td>Password</td><td><input type=\"password\" name=\"pass\" value=\"\"></td><td>The password for this username.</td></tr>\n";
    60 		echo "<p>" . _('Finally, if you see any errors during the installation process, a problem report would be appreciated. You can report problems (and ask for help) on the poweradmin-users mailinglist.') . "</p>";
    44 		echo "<tr><td>Hostname</td><td><input type=\"text\" name=\"host\" value=\"\"></td><td>The hostname on which the PowerDNS database resides. Frequently, this will be \"localhost\".</td></tr>\n";
    61 
    45 		echo "<tr><td>Database</td><td><input type=\"text\" name=\"name\" value=\"\"></td><td>The name of the PowerDNS database.</td></tr>\n";
    62 		echo "<p>" . _('Do you want to proceed now?') . "</p>\n";
    46 		echo "<tr><td>Database type</td><td><select name=\"type\"><option value=\"mysql\">MySQL</option><option value=\"pgsql\">PostgreSQL</option></td><td>The type PowerDNS database.</td></tr>\n";
    63 
       
    64 		echo "<form method=\"post\">";
       
    65 		echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
       
    66 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
       
    67 		echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
       
    68 		echo "</form>";
       
    69 		break;
       
    70 
       
    71 	case 3:	
       
    72 		$step++;
       
    73 		echo "<p>" . _('To prepare the database for using Poweradmin, the installer needs to modify the PowerDNS database. It will add a number of tables and it will fill these tables with some data. If the tables are already present, the installer will drop them first.') . "</p>";
       
    74 
       
    75 		echo "<p>" . _('To do all of this, the installer needs to access the database with an account which has sufficient rights. If you trust the installer, you may give it the username and password of the database user root. Otherwise, make sure the user has enough rights, before actually proceeding.') . "</p>";
       
    76 
       
    77 		echo "<form method=\"post\">";
       
    78 		echo " <table>\n";
       
    79 		echo "  <tr>\n";
       
    80 		echo "   <td>" . _('Username') . "</td>\n";
       
    81 		echo "   <td><input type=\"text\" name=\"user\" value=\"\"></td>\n";
       
    82 		echo "   <td>" . _('The username to use to connect to the database, make sure the username has sufficient rights to perform administrative task to the PowerDNS database (the installer wants to drop, create and fill tables to the database).') . "</td>\n";
       
    83 		echo "  </tr>\n";
       
    84 		echo " <tr>\n";
       
    85 		echo "  <td>" . _('Password') . "</td>\n";
       
    86 		echo "  <td><input type=\"password\" name=\"pass\" value=\"\"></td>\n";
       
    87 		echo "  <td>" . _('The password for this username.') . "</td>\n";
       
    88 		echo " </tr>\n";
       
    89 		echo " <tr>\n";
       
    90 		echo "  <td>" . _('Hostname') . "</td>\n";
       
    91 		echo "  <td><input type=\"text\" name=\"host\" value=\"\"></td>\n";
       
    92 		echo "  <td>" . _('The hostname on which the PowerDNS database resides. Frequently, this will be "localhost".') . "</td>\n";
       
    93 		echo " </tr>\n";
       
    94 		echo " <tr>\n";
       
    95 		echo "  <td>" . _('Database') . "</td>\n";
       
    96 		echo "  <td><input type=\"text\" name=\"name\" value=\"\"></td>\n";
       
    97 		echo "  <td>" . _('The name of the PowerDNS database.') . "</td>\n";
       
    98 		echo " </tr>\n";
       
    99 		echo " <tr>\n";
       
   100 		echo "  <td>" . _('Database type') . "</td>\n";
       
   101 		echo "  <td>" .
       
   102 			"<select name=\"type\">" . 
       
   103 			"<option value=\"mysql\">MySQL</option>" . 
       
   104 			"<option value=\"pgsql\">PostgreSQL</option>" . 
       
   105 			"</td>\n";
       
   106 		echo "  <td>" . _('The type of the PowerDNS database.') . "</td>\n";
       
   107 		echo " </tr>\n";
    47 		echo "</table>\n";
   108 		echo "</table>\n";
    48 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
   109 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
    49 		echo "<input type=\"submit\" name=\"submit\" value=\"Go to step " . $step . "\">";
   110 		echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
    50 		echo "</form>";
   111 		echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
    51 		break;
   112 		echo "</form>";
    52 
   113 		break;
    53 	case 3:
   114 
    54 		$step++;
   115 	case 4:
    55 		echo "<p>Updating database... ";
   116 		$step++;
       
   117 		echo "<p>" . _('Updating database...') . " ";
    56 		include_once("../inc/config-me.inc.php");
   118 		include_once("../inc/config-me.inc.php");
    57 		include_once("database-structure.inc.php");
   119 		include_once("database-structure.inc.php");
    58 		$db_user = $_POST['user'];
   120 		$db_user = $_POST['user'];
    59 		$db_pass = $_POST['pass'];
   121 		$db_pass = $_POST['pass'];
    60 		$db_host = $_POST['host'];
   122 		$db_host = $_POST['host'];
    62 		$db_type = $_POST['type'];
   124 		$db_type = $_POST['type'];
    63 		require_once("../inc/database.inc.php");
   125 		require_once("../inc/database.inc.php");
    64 		$db = dbConnect();
   126 		$db = dbConnect();
    65 		$db->loadModule('Manager');
   127 		$db->loadModule('Manager');
    66 		$db->loadModule('Extended');
   128 		$db->loadModule('Extended');
    67 
       
    68 		$current_tables = $db->listTables();
   129 		$current_tables = $db->listTables();
    69 
       
    70 		foreach ($def_tables as $table) {
   130 		foreach ($def_tables as $table) {
    71 			if (in_array($table['table_name'], $current_tables)) $db->dropTable($table['table_name']);
   131 			if (in_array($table['table_name'], $current_tables)) $db->dropTable($table['table_name']);
    72 			$db->createTable($table['table_name'], $table['fields']);
   132 			$db->createTable($table['table_name'], $table['fields']);
    73 		}
   133 		}
    74 
       
    75 		$fill_perm_items = $db->prepare('INSERT INTO perm_items VALUES (?, ?, ?)');
   134 		$fill_perm_items = $db->prepare('INSERT INTO perm_items VALUES (?, ?, ?)');
    76 		$db->extended->executeMultiple($fill_perm_items, $def_permissions);
   135 		$db->extended->executeMultiple($fill_perm_items, $def_permissions);
    77 		$fill_perm_items->free();
   136 		$fill_perm_items->free();
    78 
       
    79 		foreach ($def_remaining_queries as $query) {
   137 		foreach ($def_remaining_queries as $query) {
    80 			$db->query($query);
   138 			$db->query($query);
    81 		}
   139 		}
    82 
   140 		echo _('done!') . "</p>";
    83 		echo "done!</p>";
   141 
    84 
   142 		echo "<p>" . _('We have now updated the PowerDNS database to work with Poweradmin. You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database.') . " ";
    85 		echo "<p>We have now updated the PowerDNS database to work with Poweradmin. You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database. ";
       
    86 		if ($db_type=='mysql') {
   143 		if ($db_type=='mysql') {
    87 			echo "In MySQL should now perform the following command:</p>";
   144 			echo _('In MySQL you should now perform the following command:') . "</p>";
    88 			echo "<p><tt>GRANT SELECT, INSERT, UPDATE, DELETE<BR>ON powerdns-database.*<br>TO 'poweradmin-user'@'localhost'<br>IDENTIFIED BY 'poweradmin-password';</tt></p>";
   145 			echo "<p><tt>GRANT SELECT, INSERT, UPDATE, DELETE<BR>ON powerdns-database.*<br>TO 'poweradmin-user'@'localhost'<br>IDENTIFIED BY 'poweradmin-password';</tt></p>";
    89 		} elseif ($db_type == 'pgsql') {
   146 		} elseif ($db_type == 'pgsql') {
    90 			echo "<p>On PgSQL you would use:</p>";
   147 			echo _('On PgSQL you would use:') . "</p>";
    91 			echo "<p><tt>$ createuser poweradmin-user<br>Shall the new role be a superuser? (y/n) n<br>Shall the new user be allowed to create databases? (y/n) n<br>Shall the new user be allowed to create more new users? (y/n) n<br>CREATE USER<br>$ psql powerdns-database<br>psql> GRANT  SELECT, INSERT, DELETE, UPDATE<br>ON powerdns-database<br>TO poweradmin-user;</tt></p>";
   148 			echo "<p><tt>$ createuser poweradmin-user<br>" .
       
   149 				"Shall the new role be a superuser? (y/n) n<br>" . 
       
   150 				"Shall the new user be allowed to create databases? (y/n) n<br>" . 
       
   151 				"Shall the new user be allowed to create more new users? (y/n) n<br>" . 
       
   152 				"CREATE USER<br>" . 
       
   153 				"$ psql powerdns-database<br>" .
       
   154 				"psql> GRANT  SELECT, INSERT, DELETE, UPDATE<br>" . 
       
   155 				"ON powerdns-database<br>" .
       
   156 				"TO poweradmin-user;</tt></p>\n";
    92 		}
   157 		}
    93 		echo "<p>After you have added the new user, proceed with this installation procedure.</p>\n";
   158 		echo "<p>" . _('After you have added the new user, proceed with this installation procedure.') . "</p>\n";
    94 		echo "<form method=\"post\">";
   159 		echo "<form method=\"post\">";
    95 		echo "<input type=\"hidden\" name=\"host\" value=\"" . $db_host . "\">";
   160 		echo "<input type=\"hidden\" name=\"host\" value=\"" . $db_host . "\">";
    96 		echo "<input type=\"hidden\" name=\"name\" value=\"" . $db_name . "\">";
   161 		echo "<input type=\"hidden\" name=\"name\" value=\"" . $db_name . "\">";
    97 		echo "<input type=\"hidden\" name=\"type\" value=\"" . $db_type . "\">";
   162 		echo "<input type=\"hidden\" name=\"type\" value=\"" . $db_type . "\">";
    98 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
   163 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
    99 		echo "<input type=\"submit\" name=\"submit\" value=\"Go to step " . $step . "\">";
   164 		echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
       
   165 		echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
   100 		echo "</form>";
   166 		echo "</form>";
   101 		break;
   167 		break;
   102 	
   168 	
   103 	case 4:
   169 	case 5:
   104 		$step++;
   170 		$step++;
   105 		$db_host = $_POST['host'];
   171 		$db_host = $_POST['host'];
   106 		$db_name = $_POST['name'];
   172 		$db_name = $_POST['name'];
   107 		$db_type = $_POST['type'];
   173 		$db_type = $_POST['type'];
   108 		echo "<p>Now we will put together the configuration. To do so, I need some details:</p>";
   174 		echo "<p>" . _('Now we will put together the configuration. To do so, the installer needs some details:') . "</p>\n";
   109 		echo "<form method=\"post\">";
   175 		echo "<form method=\"post\">";
   110 		echo "<table>";
   176 		echo " <table>";
   111 		echo "<tr><td>Username</td><td><input type=\"text\" name=\"db_user\" value=\"\"></td><td>The username as created in the previous step.</td></tr>";
   177 		echo "  <tr>";
   112 		echo "<tr><td>Password</td><td><input type=\"text\" name=\"db_pass\" value=\"\"></td><td>The password for this username.</td></tr>";
   178 		echo "   <td>" . _('Username') . "</td>\n";
   113 		echo "<tr><td>Hostmaster</td><td><input type=\"text\" name=\"dns_hostmaster\" value=\"\"></td><td>When creating SOA records and no hostmaster is provided, this value here will be used. Should be in the form \"hostmaster.example.net\".</td></tr>";
   179 		echo "   <td><input type=\"text\" name=\"db_user\" value=\"\"></td>\n";
   114 		echo "<tr><td>Primary nameserver</td><td><input type=\"text\" name=\"dns_ns1\" value=\"\"></td><td>When creating new zones using the template, this value will be used as primary nameserver. Should be like \"ns1.example.net\".</td></tr>";
   180 		echo "   <td>" . _('The username as created in the previous step.') . "</td>\n";
   115 		echo "<tr><td>Secondary nameserver</td><td><input type=\"text\" name=\"dns_ns2\" value=\"\"></td><td>When creating new zones using the template, this value will be used as secondary nameserver. Should be like \"ns2.example.net\".</td></tr>";
   181 		echo "  </tr>\n";
       
   182 		echo "  <tr>\n";
       
   183 		echo "   <td>" . _('Password') . "</td>\n";
       
   184 		echo "   <td><input type=\"text\" name=\"db_pass\" value=\"\"></td>\n";
       
   185 		echo "   <td>" . _('The password for this username.') . "</td>\n";
       
   186 		echo "  </tr>\n";
       
   187 		echo "  <tr>\n";
       
   188 		echo "   <td>" . _('Hostmaster') . "</td>\n";
       
   189 		echo "   <td><input type=\"text\" name=\"dns_hostmaster\" value=\"\"></td>\n";
       
   190 		echo "   <td>" . _('When creating SOA records and no hostmaster is provided, this value here will be used. Should be in the form "hostmaster.example.net".') . "</td>\n";
       
   191 		echo "  </tr>\n";
       
   192 		echo "  <tr>\n";
       
   193 		echo "   <td>" . _('Primary nameserver') . "</td>\n";
       
   194 		echo "   <td><input type=\"text\" name=\"dns_ns1\" value=\"\"></td>\n";
       
   195 		echo "   <td>" . _('When creating new zones using the template, this value will be used as primary nameserver. Should be like "ns1.example.net".') . "</td>\n";
       
   196 		echo "  </tr>\n";
       
   197 		echo "  <tr>\n";
       
   198 		echo "   <td>" . _('Secondary nameserver') . "</td>\n";;
       
   199 		echo "   <td><input type=\"text\" name=\"dns_ns2\" value=\"\"></td>\n";
       
   200 		echo "   <td>" . _('When creating new zones using the template, this value will be used as secondary nameserver. Should be like "ns2.example.net".') . "</td>\n";
       
   201 		echo "  </tr>\n";
   116 		echo "</table>";
   202 		echo "</table>";
   117 		echo "<input type=\"hidden\" name=\"db_host\" value=\"" . $db_host . "\">";
   203 		echo "<input type=\"hidden\" name=\"db_host\" value=\"" . $db_host . "\">";
   118 		echo "<input type=\"hidden\" name=\"db_name\" value=\"" . $db_name . "\">";
   204 		echo "<input type=\"hidden\" name=\"db_name\" value=\"" . $db_name . "\">";
   119 		echo "<input type=\"hidden\" name=\"db_type\" value=\"" . $db_type . "\">";
   205 		echo "<input type=\"hidden\" name=\"db_type\" value=\"" . $db_type . "\">";
   120 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
   206 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
   121 		echo "<input type=\"submit\" name=\"submit\" value=\"Go to step " . $step . "\">";
   207 		echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
   122 		echo "</form>";
   208 		echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
   123 		break;
   209 		echo "</form>";
   124 
   210 		break;
   125 	case 5:
   211 
       
   212 	case 6:
   126 		$step++;
   213 		$step++;
   127 		$config = "<?\n\n" .
   214 		$config = "<?\n\n" .
   128 			"\$db_host\t\t= \"" . $_POST['db_host'] . "\";\n" .
   215 			"\$db_host\t\t= \"" . $_POST['db_host'] . "\";\n" .
   129 			"\$db_user\t\t= \"" . $_POST['db_user'] . "\";\n" .
   216 			"\$db_user\t\t= \"" . $_POST['db_user'] . "\";\n" .
   130 			"\$db_pass\t\t= \"" . $_POST['db_pass'] . "\";\n" .
   217 			"\$db_pass\t\t= \"" . $_POST['db_pass'] . "\";\n" .
   131 			"\$db_name\t\t= \"" . $_POST['db_name'] . "\";\n" .
   218 			"\$db_name\t\t= \"" . $_POST['db_name'] . "\";\n" .
   132 			"\$db_type\t\t= \"" . $_POST['db_type'] . "\";\n" .
   219 			"\$db_type\t\t= \"" . $_POST['db_type'] . "\";\n" .
   133 			"\n" .
   220 			"\n" .
       
   221 			"\$iface_lang\t\t= \"" . $_POST['language'] . "\";\n" .
       
   222 			"\n" .
   134 			"\$dns_hostmaster\t\t= \"" . $_POST['dns_hostmaster'] . "\";\n" .
   223 			"\$dns_hostmaster\t\t= \"" . $_POST['dns_hostmaster'] . "\";\n" .
   135 			"\$dns_ns1\t\t= \"" . $_POST['dns_ns1'] . "\";\n" .
   224 			"\$dns_ns1\t\t= \"" . $_POST['dns_ns1'] . "\";\n" .
   136 			"\$dns_ns2\t\t= \"" . $_POST['dns_ns2'] . "\";\n" .
   225 			"\$dns_ns2\t\t= \"" . $_POST['dns_ns2'] . "\";\n" .
   137 			"\n?>\n";
   226 			"\n?>\n";
   138 
   227 
   139 		if (is_writeable($local_config_file)) {
   228 		if (is_writeable($local_config_file)) {
   140 			$h_config = fopen($local_config_file, "w");
   229 			$h_config = fopen($local_config_file, "w");
   141 			fwrite($h_config, $config);
   230 			fwrite($h_config, $config);
   142 			fclose($h_config);
   231 			fclose($h_config);
   143 			echo "<p>The installer was able to write to the file \"" . $local_config_file . "\". A basic configuration, based on the details you have given, has been created.</p>\n";
   232 			echo "<p>" . _('The installer was able to write to the file "') . $local_config_file . _('". A basic configuration, based on the details you have given, has been created.') . "</p>\n";
   144 		} else {
   233 		} else {
   145 			echo "<p>The installer is unable to write to the file \"" . $local_config_file . "\" (which is in itself good). The configuration is printed here. You should now create the file " . $local_config_file . " in the Poweradmin root directory yourself. It should contain the following few lines:</p>\n";
   234 			echo "<p>" . _('The installer is unable to write to the file "') . $local_config_file . _('" (which is in itself good). The configuration is printed here. You should now create the file "') . $local_config_file . _('" in the Poweradmin root directory yourself. It should contain the following few lines:') . "</p>\n";
   146 			echo "<pre>";
   235 			echo "<pre>";
   147 			echo $config;
   236 			echo $config;
   148 			echo "</pre>";
   237 			echo "</pre>";
   149 		};
   238 		};
   150 		echo "<form method=\"post\">";
   239 		echo "<form method=\"post\">";
   151 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
   240 		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
   152 		echo "<input type=\"submit\" name=\"submit\" value=\"Go to step " . $step . "\">";
   241 		echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
   153 		echo "</form>";
   242 		echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
   154 		break;
   243 		echo "</form>";
   155 
   244 		break;
   156 	case 6:
   245 
   157 		$step++;
   246 	case 7:
   158 		echo "<p>Now we have finished the configuration, you should (must!) remove the directory \"install/\" from the Poweradmin root directory. You will not be able to use the file if it exists. Do it now.</p>";
   247 		$step++;
   159 		echo "<p>After you have removed the file, you can login to <a href=\"index.php\">Poweradmin</a> with username \"admin\" and password \"admin\". You are highly encouraged to change these as soon as you are logged in.</p>";
   248 		echo "<p>" . _('Now we have finished the configuration, you should (must!) remove the directory "install/" from the Poweradmin root directory. You will not be able to use Poweradmin if it exists. Do it now.') . "</p>";
       
   249 		echo "<p>" . _('After you have removed the directory, you can login to <a href="index.php">Poweradmin</a> with username "admin" and password "admin". You are highly encouraged to change these as soon as you are logged in.') . "</p>";
   160 		break;
   250 		break;
   161 
   251 
   162 	default:
   252 	default:
   163 		break;
   253 		break;
   164 }
   254 }