About Installation Automation - Installation Automation package blog

Recommend this page to a friend!
  All package blogs All package blogs   Installation Automation Installation Automation   Blog Installation Automation package blog   RSS 1.0 feed RSS 2.0 feed   Blog About Installation Au...  
  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Viewers: 2

Last month viewers: 1

Package: Installation Automation

A little bit about installation automation class. Some current features, planned features...




Current Features

1) Built-In stages
2) JavaScript and PHP Header redirection
3) Automatically runs SQL
     A) On/Off Capabilities
     B) Easy to use
4) Automatically creates the global variable file (For database connections)
5) Automatically redirects to the next stage when form is done
6) Really easy use of class... the only thing you worry about is the HTML form and the form validation (The class already has a built-in function to validate SQL). The class does everything else.
7) Can create an XML global file or a PHP global file
8) you can easily create more global file types by yourself (if you code PHP... if you don't, the documentation file will help you out).
9) Besides the documentation file, the class is extensively commented making it much easier to understand and read the class
10) Added security on includes... nothing a user can do that will effect any part of the class
11) Debug capabilities
12) Error handling
13) Fairly small class, easy to read, well formatted
14) Checks for the existence of the global file before creating another one (If a global file exists... the application/system is already installed).

Planned Features

1) Possible fusion with my database access wrapper (If this is to happen, it will when I get my database class to work with PDO, MySQL and MySQL(i)

That's as far as I can go with planned features... nothing I can add really. The class is simple and complete. No need to complicate it with garbage (not only that, but I don't have enough imagination to figure out what else I can add).

The following is how you use this class
<?php
// Requiring the installation class
require 'install.php';

// Setting the installation object to $inst
$inst = new install();

// Initiating the setup function (The one that includes the form).
$inst->setup();

// Checking if 'submit' is set
if(isset($_POST['submit']))
{
    
// Advancing on to the next stage
    
$inst->cont();
}
?>


That is all you do... after that, the only worry you got is creating the forms in the forms/ directory and the form validation in the same file (The form file).


As how to setup the forms:


<p>Stage 3</p>
<form action="
<?=$_SERVER['REQUEST_URI'];?>" method="post">
DB Name: <input type="text" name="db" /><br />
<input type="submit" name="fsubmit" value="submit" /></form>
<p>You are about to create tables in the Database and insert some data into them...</p>
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post">
<p>Continue <input type="submit" name="submit" value="submit" /></p>
</form>


(Please note, that form example is example only and doesn't serve any purpose except as an example).

As you can see, there are two submit buttons there
... the one that has the name of "fsubmit" won't make the installation automation go to the next stage, it is for you to check in the same PHP form page to make validation to the form submittion. Then the second on has the name of "submit" and this one makes the installation automation class to go forward to the next stage. Easy as that.



You need to be a registered user or login to post a comment

1,562,090 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.



  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  
  All package blogs All package blogs   Installation Automation Installation Automation   Blog Installation Automation package blog   RSS 1.0 feed RSS 2.0 feed   Blog About Installation Au...  

For more information send a message to info at phpclasses dot org.