Absolut Engine PHP Cross Reference Web Portal Systems

Source: /admin/install.php - 129 lines - 8307 bytes - Summary - Text - Print

   1  <?
   2  @include ('settings.php');
   3  if (!isset($_POST["percent"])) $_POST["percent"]=0;
   4  else $_POST["percent"]=$_POST["percent"]+33;
   5  if ($_POST["percent"]==99) $_POST["percent"]=100;
   6  if ($_POST["percent"]==33)
   7     {
   8     @$connection=mysql_pconnect($_POST["dbserver"],$_POST["dbuser"],$_POST["dbpass"]);
   9     if (!$connection) exit('Something wrong with Database settings, please press BACK button and enter Database settings again.<br />'.mysql_errno().': '.mysql_error());
  10     @$success=mysql_select_db($_POST["dbname"]);
  11     if (!$success) exit('Something went wrong while trying to choose Database, please press BACK button and enter Database settings again.<br />'.mysql_errno().': '.mysql_error());
  12     @$sql=join('',file('system.sql'));
  13     $sql=explode(";",$sql);
  14     foreach ($sql as $value)
  15             {
  16             $value=trim($value);
  17             if ($value) @$success=mysql_query($value);
  18             if (!$success) exit('Something went wrong while creating tables. Please, delete all tables in database.<br />'.mysql_errno().': '.mysql_error());
  19             }
  20     }
  21  ?>
  22  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  23      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  24  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  25  
  26  <head>
  27  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  28  <meta name="author" content="XHTML + CSS + PHP: Daniel Duris, dusoft[at]staznosti[dot]sk" />
  29  <meta name="author" content="Design: Daniel Duris, dusoft[at]staznosti[dot]sk" />
  30  <meta name="author" content="Logo + graphics: Rudolf Hausleitner" />
  31  <meta name="copyright" content="Daniel Duris, 2001-<? echo date("Y"); ?>" />
  32  <meta name="licence" content="GNU General Public Licence" />
  33  <meta name="keywords" content="news publishing system, content management system, cms, news publishing engine, php, mysql, xhtml, css, absolut engine" />
  34  <meta name="description" content="Absolut Engine is a news publishing system developed in PHP and MySQL. Built with web standards in mind." />
  35  <meta name="robots" content="all" />
  36  <title>Absolut Engine news publishing system by Daniel Duris</title>
  37  <style type="text/css">@import "main.css";</style>
  38  <style type="text/css">@import "additional.css";</style>
  39  <style type="text/css">
  40  ol {
  41  margin: 0 5em;
  42  }
  43  </style>
  44  <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
  45  </head>
  46  <body>
  47  <div id="header">
  48  </div>
  49  
  50  
  51  <div id="installation">
  52  <?
  53  echo '<div id="process" style="width:',$_POST["percent"],'%;"></div>';
  54  ?>
  55  <br class="clear" />
  56  </div>
  57  <? if ($_POST["percent"]<100): ?>
  58  <form method="post" action="install.php">
  59  <? endif; ?>
  60  <? if ($_POST["percent"]==100): ?>
  61  <form method="post" action="index.php">
  62  <? endif; ?>
  63  <fieldset><legend>Installation - progress: <? echo $_POST["percent"],'%'; ?></legend>
  64  <? if ($_POST["percent"]==0): ?>
  65  <p class="warning"><span>!</span>Not for upgrade! Only for fresh installation. If you require upgrade from v1.71 or v1.72, <a href="upgrade.php">continue with upgrade script</a>. For upgrade from v1.70, see upgrade.txt file.<br class="clear" /></p>
  66  <label for="dbserver">Database server address:</label>
  67  <input type="text" name="dbserver" id="dbserver" size="30" value="localhost" /><br class="clear" />
  68  <label for="dbuser">Database username:</label>
  69  <input type="text" name="dbuser" id="dbuser" size="30" /><br class="clear" />
  70  <label for="dbpass">Database password:</label>
  71  <input type="text" name="dbpass" id="dbpass" size="30" /><br class="clear" />
  72  <label for="dbname">Database name:</label>
  73  <input type="text" name="dbname" id="dbname" size="30" /><br class="clear" />
  74  <? endif; ?>
  75  <? if ($_POST["percent"]==33): ?>
  76  <p class="warning"><span>!</span>You now need to edit settings.php file and change values to suit your settings. Open settings.php in your favourite plain text editor software (any basic program such as Notepad will do).<br class="clear" /></p>
  77  <ol>
  78  <li>Set the name of your server to your domain name.</li>
  79  <li>Set path from root to directory in which Absolut Engine will reside.</li>
  80  <li>Set path to directory where images and files used in articles will be uploaded. Images and files paths/directories are <strong>relative</strong> to admin directory.</li>
  81  <li>Set MySQL database settings to correct values. Change username and password, optionally also server address and database name.</li>
  82  <li>Supply your (admin's) email address to $emailwebmaster variable.</li>
  83  <li>Set $sizemaximages and $sizemaxfiles variables that limit size of images and files to be uploaded to desired number of bytes.</li>
  84  <li>Set $thumbwidth and $thumbheight variables to desired size in pixels. Engine will try to optimize dimensions of the thumbnails to as close to the desired dimensions as possible. Optionally change $jpegquality, too.</li>
  85  <li>Check and set up $uploadforbid variable to forbid uploading of certain filetypes. Change $dateformat to suit your country format.</li>
  86  <li>Check and set date format if required. Central-European date format is: DD.MM.YYYY (e.g. 02.07.1980), US date format is: MM/DD/YYYY (e.g. 07/02/1980)</li>
  87  <li>If you would like to use WYSIWYG editor for articles, leave WYSIWYG editor variable as is. If you want to use plain old textarea, set it to 0 (zero).</li>
  88  <li>If you are on Apache server and have mod_rewrite module enabled, you can set $cleanurls variable to 2, if clean and easy-to-remember URLs are required (such as /we-have-bought-car).</li>
  89  </ol>
  90  <p class="warning"><span>!</span>When you are done with the editing and all values are set correctly, save the settings.php file.<br class="clear" /></p>
  91  <? endif; ?>
  92  <? if ($_POST["percent"]==66): ?>
  93  <p class="warning"><span>!</span>You now need to set permissions for directories for uploading images and files. Launch your favourite FTP program and connect to your server.<br class="clear" /></p>
  94  <ol>
  95  <li>Upload edited settings.php file via FTP to [absolut]/admin/ directory.</li>
  96  <li>Set permissions for directories for uploading images and files to 777 (in Unix/Linux only) - CHMOD 777.</li>
  97  <li>If you are on Apache server and have mod_rewrite module enabled and you have set $cleanurls to 2, create empty .htaccess file in [absolut]/ root directory. Change permissions for .htaccess file in [absolut]/ root to 777 (CHMOD 777). Enter the following values in .htaccess file:<br />
  98  RewriteEngine on<br />
  99  Options +FollowSymLinks<br />
 100  RewriteCond %{HTTP_HOST} ^[yourdomain.com]<br />
 101  RewriteRule ^(.*)$ http:/www.[yourdomain.com]/$1 [R=301,L]<br />
 102  RewriteCond %{REQUEST_FILENAME} !-d<br />
 103  RewriteCond %{REQUEST_FILENAME} !-f<br />
 104  <br />Do not forget to change [yourdomain.com] to your domain name
 105  </li>
 106  </ol>
 107  <p class="warning"><span>!</span>When you are done with the FTP upload and permission changes, you can continue.<br class="clear" /></p>
 108  <? endif; ?>
 109  <? if ($_POST["percent"]==100): ?>
 110  <p class="warning"><span>!</span>Please, DELETE both install.php and upgrade.php files from your server. They reside in [absolut]/admin/ directory.<br class="clear" /></p>
 111  <p class="warning"><span>!</span>You have finished all steps necessary to make Absolut Engine work. If everything worked, you should see login screen with username/password fields after clicking on "Finish and login" button. Use "admin" (no quotes) as an user and "admin" (no quotes) as a password for the first time.<br class="clear" /></p>
 112  <? endif; ?>
 113  <label for="submit"></label>
 114  <? if ($_POST["percent"]<100): ?>
 115  <input type="submit" name="submit" id="submit" value="Next step" class="button" />
 116  <? endif; ?>
 117  <? if ($_POST["percent"]==100): ?>
 118  <input type="submit" name="submit" id="submit" value="Finish and login" class="button" />
 119  <? endif; ?>
 120  <input type="hidden" name="percent" value="<? echo $_POST["percent"]; ?>">
 121  </fieldset>
 122  </form>
 123  
 124  
 125  <div id="footer">
 126  <h1><a href="http://www.absolutengine.com" title="Absolut Engine - news publishing system in PHP/MySQL (www.absolutengine.com)">ABSOLUT ENGINE</a> </h1> <span class="small">v<? echo AE_VERSION; ?></span> developed by <a href="mailto: dusoft [at] staznosti [dot] sk" title="Daniel Duris - developer of Absolut Engine">Daniel Duris</a> <span class="small">&copy; 2001-<? echo date("Y"); ?></span>
 127  </div>
 128  </body>
 129  </html>

title

Description

title

Description

title

Description

title

title

Body