Laughland.biz AdManager 1.0
Installation:
Step 1: Setting Up The
Database
First
create a new MySql database on your server. Call it say, “admanager”.
Then run
the file admanager.sql through phpMyAdmin or suchlike to set up the tables.
Your
database should now be set up.
If your
host limits the number of mysql databases you can have, simply create the
tables in any existing database. Their names begin with “adman_” so hopefully
this will distinguish them from other tables in the database.
Step 2: Installing The Script
Open the
file config.php in any text or html editor. The first four lines look something
like this:
$user = "";
$pass = "";
$host = "localhost";
$database = "admanager";
Change the
contents of the qutotation marks to the access details required for your MySql server.
Save and close then file.
Upload all
the .php and .htm files to the directory on your server, where the script is to
reside. Make sure they are all in their correct sub- directories. Create an
empty directory called “images” in the same location.
The file
admin.php can be put in a separate directory if you wish to password protect
it. If you do so, you MUST put a copy of the templates directory (and its
contents) in the same location.
Your script
should now be ready to run.
Step 3: Using The Script
To add,
edit or delete ads, or view statistics run the admin.php file in your browser.
To add
advertisements to the database click on “Add”. This will display the Add form.
Simply fill in the details for the advertisement and click submit.
To edit or
delete exisiting ads click on “edit” in the main menu. This will display the
images of all ads in the database. Use the update or delete options for the ad
to be changed to carry out these functions. The stats option will display
current statistics or the relevent ad.
On the
add/update screens:
Clicking on
Stats on the main menu will display overall stats for all active
advertisements.
To display
ads on your site you simply add a call to the adman.php file on your page,
where you want the add to appear. For .php pages use:
include(“pathto/adman.php”);
Where pathto is the full path to the adman.php file.
For non PHP
pages you will need to use an <iframe> tag to display advertisements,
like this:
<iframe
align="middle" frameborder="0" height="80"
hspace="0" src="pathto/adman.php" vspace="0"
width="460"></iframe>
If you use
this option make sure your ads are all the same height and width as you will
need to preset the height and width attributes , if
the iframe tag, accordingly. Note: iframe is not supported by all browsers and
versions thereof.