<?php
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';

$SQL = "SELECT * from SETTINGS";
$result = mysql_query( $SQL ); while( $row = mysql_fetch_array( $result ) ) {
$host = $row["HOST"];
$rak = $row["RAK"];
$user = $row["USER"];
$erroremail = $row["RECEIVER_EMAIL"];
}

$accesshash = "$rak";

createacct ($host,$user,$accesshash,$usessl,$domain,$un,$pw,$package);


$viewaccounts = listaccts( $host , $user , $accesshash , 0);
$keys = array_keys( $viewaccounts );

$newUser="$un";

if( array_key_exists($newUser, $viewaccounts) )
{}else{
$error = 'There was a problem creating your account, please try again';
include '../adjust.php';
die();
}
//-------------------------------------------------------------------------------------

?>
