<?  

//
//  cP Account Creator Version 0.4 Beta Build 01
//  MODS
//    Password Protected Directory and User Creation MOD
//    Scripts Mod
//  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
//
//




//  This email function was added because of the current database password bug.
//  This will send the site admin the user name and unencrypted password needed
//  to re-add the database user.  The variables in lines 107-127 may be added
// the message area, if additional information is desired.

//  Add Mods below this line.

if($pphlogger==1){


//$pphusr="http://$pphlogger_url/admin/newaccount_admin.php?N_username=$email&pw=$password&N_your_url=$sub_domain&email=$alt_email&N_gmt=-7&N_lang=en";
$pphusr="http://$pphlogger_url/newaccount_self.php?N_username=$email&pw=$password&N_your_url=$sub_domain&email=$alt_email&N_gmt=-7&N_lang=en&";

($fp = fopen($pphusr, "r")) or die("Could not open file $pphlogger_url!");

if(!$fp){
    echo "Error:  PPHLogger Not created";
}else{

$pphlogger_info_disp="<br>PPHLogger user created:<br>username=$email&pw=$password<br>Login automatically to your PPHLogger from the control panel";
$pphlogger_info_email="PPHLogger user created, username: $email and password: $password To login automatically go to your PPHLogger from the control panel \nGo here for help setting up your code:\n
http://$pphlogger_url/doc/doc.html \n Once login into pphlogger you need to go to settings/than to middle of page,html code block area,look for...\n If you have lost your pphlogger.js-file, download it here: pphlogger.js\nDownload the pphlogger.js\n Than upload it to your pages you want to log.
\nRemember there is a 2 megs per file limit, no cgi,exe or mp3 files are allowed. This is strictly enforced..\nThanks \n\n";
echo $pphlogger_info_disp;
}
}
//  Include creation of password protected directory.  Uncomment to activate.
//include("mods/addpwpromod.php");
//  End.

//  End of Mods

if($add_ftp==1){
$ftp_info_disp= "Please copy this for your reference.<br>Your FTP user name is $email@$domain and your FTP server is ftp.$domain<br><br>";
$ftp_info_email= "Please copy this for your reference.\nYour FTP user name is $email@$domain and your FTP server is ftp.$domain\n\n";
}

$web_info_disp= "You may access your website at <a href=http://$sub_domain target=blank>http://$sub_domain</a> .<br><br>";
$web_info_email= "You may access your website at http://$sub_domain .\n\n";

if($add_sql==1){
$sql_info_disp= "Please copy this for your reference.<br>Your database name and username is $db_user1$db_user2$db_user3.<br><br>";
$sql_info_email= "Please copy this for your reference.\nYour database name and username is $db_user1$db_user2$db_user3.\n\n";
}

if($inst_forum==1){
$forum_info_disp= "Forum installed.  Please visit the control panel <a href=http://$domain$script_directory$client_acc target=_blank>Here</a><br> and select the forum link, your default username/password is $email/admin. <br><b> Please change your password immediately</b><br>Note:  If you change your password to your control panel username/password you will be able to login automatically to your forum from the control panel icon.<br>";
$forum_info_email="Forum installed.  Please visit the control panel http://$domain$script_directory$client_acc \n and select the forum link, your default username/password is $email/admin. \n Please change your password immediately\nNote:  If you change your password to your control panel username/password you will be able to login automatically to your forum from the control panel icon.\n\n";
}

if($inst_siteframe==1){
$siteframe_info_disp="Siteframe installed.  Please visit the control panel <a href=http://$domain$script_directory$client_acc target=_blank>Here</a><br> and select the siteframe link, your default username/password is $email@$domain/admin.<br><b>  Please change your password immediately</b><br>Note:  If you change your password to your control panel password you will be able to login automatically to your forum from the control panel icon.<br>";
$siteframe_info_email= "Siteframe installed.  Please visit the control panel http://$domain$script_directory$client_acc\n and select the siteframe link, your default username/password is $email@$domain/admin.\n  Please change your password immediately\nNote:  If you change your password to your control panel password you will be able to login automatically to your forum from the control panel icon.\n\n";
}
if($inst_guestbook==1){
$guestbook_info_disp="Guestbook installed.  Please visit the control panel <a href=http://$domain$script_directory$client_acc target=_blank>Here</a><br> and select the Guestbook link, your default username/password is administrator/password.<br>";
$guestbook_info_email= "Guestbook installed.  Please visit the control panel http://$domain$script_directory$client_acc\n and select the Guestbook link, your default username/password is administrator/password.\n\n";
}
$panel_info_disp="You may access your control panel at <a href=http://$domain$script_directory$client_acc target=blank>Here</a><br>The control panel allows for access to FTP, Email, Database editing and much more.<br><br>";
$panel_info_email="You may access your control panel at http://$domain$script_directory$client_acc\nThe control panel allows for access to FTP, Email, Database editing and much more.\n\n";

$msg_user_disp= "Email Account Created.   Your email and login name is $cp_email <a href=http://$domain target=blank>Go to our main site</a><br>You may access your control panel at <a href=http://$domain$script_directory$client_acc target=blank>Here</a><br><br>";

$mail_info_disp="Email Account Created. Your email and login name is $cp_email\pw=$password<br>Outlook setup: smtp/pop3=mail.$domain<br>Be sure to enable SMTP Authentication in your E-mail client or you may not be able to send mail.<br><br>";
$mail_info_email="Email Account Created. Your email and login name is $cp_email\pw=$password\nOutlook setup: smtp/pop3=mail.$domain\nBe sure to enable SMTP Authentication in your E-mail client or you may not be able to send mail.\n\n";

$msg_admin_email="This is the user basic info\n
Their site url $web_info_email \n
MySQL database username $email has been created with password of $password\n-------\nHello $first_name $last_name\n\n Your $domain account has been created with username: $email and password: $password\n\nYour FTP user name is $email@$domain and your FTP server is ftp.$domain\npassword=$password\n\nYour database name and username is $db_user1$db_user2$db_user3.password=$password\n\n PPHLogger user created:username: $email and password: $password login from control panel \n\nAdmin control panel: http://$domain$script_directory/admin/admin.php?view=1\n\n
";
$msg_user_email="Hello $first_name $last_name\n\n Your $domain account has been created with username: $email and  password: $password\n\n$panel_info_email\n\n$mail_info_email\n\n$web_info_email\n\n$pphlogger_info_email $ftp_info_email $sql_info_email $forum_info_email $siteframe_info_email $guestbook_info";

$msg_admin_email_lostpw="$cp_username has requested a password recovery from $user_ip/ $user_host.  The users password is $cp_password";
$msg_user_email_lostpw="Hello $cp_first_name $cp_last_name\n\n A password recovery request has been initiated.  If this request was not made you YOU please access your control panel and change your password immediately!!!\n\nRecovered password: $cp_password";


?>