Location: PHPKode > projects > phpBible > phpbible/install.php

###    Copyright 2004, Danny Carlton. Permission is hereby granted to distribute 
###  copies of this software package as long as you do not charge for it, and the 
###  copyright notices remain intact. Permission is also granted to use the concepts 
###  in these scripts for other similar scripts, but you may not simply copy the scripts and claim them as your own.

  reset ($HTTP_POST_VARS);
  while (list ($key, $val) = each ($HTTP_POST_VARS)) 
  reset ($HTTP_GET_VARS);
  while (list ($key, $val) = each ($HTTP_GET_VARS)) 



$fp = fopen("./config.php", "w");
fwrite ($fp, $out_data);
fclose ($fp);


$fp = fopen("./admin/admin_data.php", "w");
fwrite ($fp, $admin_password_out);
fclose ($fp);

  header("Location: install/populate_db.php"); /* Redirect browser */

$path=str_replace('/install.php', '', $GLOBALS[REDIRECT_URL]);
$path=str_replace('/', '', $path);

echo "<html>

<link rel=\"stylesheet\" type=\"text/css\" href=\"phpBible.css\">

<body leftmargin=\"5\" bgcolor=\"$page_light\">

<p align=\"center\"><b><font color=\"$page_dark\" size=\"7\" face=\"Georgia\">phpBible.org<br>
</font><font color=\"$page_dark\" face=\"Georgia\" size=\"4\">Online Study Bible</font></b></p>
<div align=\"center\">
  <table border=\"0\" width=\"400\" cellpadding=\"3\" style=\"background-color: #FFFFFF; border: 2 solid $page_dark\">
      <td><font color=\"$page_dark\"><b><font face=\"Verdana\" size=\"3\">Installation: Step 1</font></b><br>
        <span class=\"small\"><font face=\"Georgia\" size=\"2\">Welcome to the phpBible.org Installation Script.<br>
        Please enter the information requested below :</font></span></font>
        <form method=\"POST\" id=\"setup\" name=\"setup\">
          <p><b><font face=\"Verdana\" size=\"1\" color=\"$page_dark\">Site Name:<br>
          </font></b><font face=\"Verdana\" size=\"1\" color=\"$page_dark\">The name that will be displayed in the line just below the header (which
          should contain your logo. This can be changed later in the administration section.)<br>
          <input type=\"text\" name=\"site_name_in\" size=\"30\" class=\"custom_input\"><br>
<b><font face=\"Verdana\" size=\"1\" color=\"$page_dark\">Admin Password:<br>
          </font></b><font face=\"Verdana\" size=\"1\" color=\"$page_dark\">This will be the password you use to access the admin.php script.<br>
          <input type=\"text\" name=\"admin_password\" size=\"30\" class=\"custom_input\"><br>
          </b>The URL of the top page on your site, this is where the Site Name will be linked to. (this can also be changed in the administration section)<br>
          <input type=\"text\" name=\"url_in\" size=\"30\" class=\"custom_input\" value=\"http://$server/\"><br>
          <b>MySQL DataBase Name:</b><br>
          The script will look for the name you enter, and if not found, will attempt to create this database. If this is your server, then
          you could use phpBible as the database name. If you are on a shared server, then you will most likely have been assigned a
          database that already exists. You can use the Table prefix to distinguish the phpBible data from other data in your database.<br>
          <input type=\"text\" name=\"db_name_in\" size=\"30\" class=\"custom_input\"><br>
          <b>Table Prefix:</b><br>
          (Example: phpBible_)<br>
          <input type=\"text\" name=\"table_prefix_in\" size=\"30\" class=\"custom_input\"><br>
          <b>MySQL Host:</b><br>
          This is almost always 'localhost'<br>
          <input type=\"text\" name=\"host_in\" size=\"30\" class=\"custom_input\" value=\"localhost\"><br>
          <b>MySQL User:</b><br>
          <input type=\"text\" name=\"user_in\" size=\"30\" class=\"custom_input\"><br>
          <b>MySQL Password:</b><br>
          <input type=\"text\" name=\"password_in\" size=\"30\" class=\"custom_input\"><br>
          </b>The domain the script will be accessed from. Be sure to include the beginning 'http://'.<br>
          <input type=\"text\" name=\"domain_in\" size=\"30\" class=\"custom_input\" value=\"http://$server\"><br>
          What's between the Domain and the Script Name in the complete URL of the main script. The trailing slash is needed.<br>
          <input type=\"text\" name=\"path_in\" size=\"30\" class=\"custom_input\" value=\"$path\"><br>
          <input type=\"submit\" value=\"Submit\" name=\"B1\" class=\"custom_button\"></font></p>



Return current item: phpBible