//
//  cP Account Creator Version 0.4 Beta Build 01
//  Copyright (C) 2004 Brian Freeman
//  All Rights Reserved.
//
//  This script set is distributed as is with absolutely no warranty.
//  Users of this script set agree to use at their own risk.
//  Questions or comments?  Contact webmaster@freemans-web.com
//
//
cP POP ADMIN, will allow users to create email accounts via a web interface
on servers with cPanel/WHM. It includes an administration area to delete
accounts and update user information. The information is contained within a
MySQL database.

To Upgrade:
   The new release is a major rewrite and all files have, at the very least, been
   modified and many have been moved.  The new version has several cascading style sheets to allow
   for customization and these would replace any formatting you currently have.  For this reason
   upgrading would be at best cumbersome and would likely result in many hours of debugging.
   For these reasons upgrades of the files are not supported.
   
   Database upgrades from version 2.03b are possible by using the script in the /inst_sql
   directory.  Database upgrades for versions prior to 2.03b, may be possible, but only to the
   extent of creating a backup of your current email_users table and importing the data
   (without the stucture) into the new database.  In some cases, fields such as sub_domain may
   contain incorrect information.  In these cases, manually editing the backup prior to importing it's
   data will be necessary.

To install:
1.  Download and unzip the latest release from
             http://scripts.freemans-web.com/scripts/pafiledb.php?action=category&id=1.
2.  Create a MySQL database and user (with all permissions).
3.  Upload the unzipped files, folders intact, to a web accessible directory
    of your choice on your server.
4.  Edit the /script_directory/initial_config.php, /script_directory/config.php and /script_directory/dbconfig.php 
    files with the appropriate information (view the /script_directory/admin/readme file for explanation of enhanced
    features) and extract the appropriate directories using cPanel.
5.  CHMOD to 777 /script_directory/skel/forum/config.php, /script_directory/skel/index.php.
6.  Create an .htaccess file in the scripts root directory and the admin directory with the following:
    <Files config.php>
	Order deny,allow
	Deny from all
    </Files>
    <Files dbconfig.php>
   	Order deny,allow
    Deny from all
    </Files>
    <Files initial_conf.php>
   	Order deny,allow
    Deny from all
    </Files>
    Options -Indexes

7.  Populate the database by running http://yourdomain.tld/directory/admin/sql_install.php.



IMPORTANT:  At this point password protect the admin directory to avoid unauthorized access.

8.  Access your admin area at http://yoursite.tld/directory/admin/index.php.
9.  Email accounts can be deleted  and information can be
    updated by the ID link.
10. Create a test account by going to http://yoursite.tld/directory/addpop.php.
11. Verify the account was created in your cPanel, then delete via the admin
    area if you like.
    
Notes:
1.  If the account was not created ensure that the server is localhost.  If
    this is a cPanel on a remote server, ensure that port 2082 is open for
    outbound traffic on the server that runs the script.
2.  FTP user passwords must be changed via cPanel.
3.  If you have ideas for the script or have added functionality, please share
    and I'll attempt to add it to future releases.
4.  See the changelog.txt for current bugs.  Or visit  http://www.scripts.freemans-web.com/forum/

Troubleshooting:
1.  I cannot access the subdomain.
	A.Is it creating the subdomain in cPanel? If yes, maybe the problem is DNS?
	B.  Does the main subdomain as stored in the setting area exist in cPanel
                   If it doesn't, cpanel will create the user as the second level subdomain i.e. user.domain.com
