Ejemplo n.º 1
0
function addUser($user)
{
    if (is_array($user)) {
        $db = Database::obtain();
        if ($user['id'] == NULL) {
            if ($user['group'] == '2') {
                $group = 'User';
                $user['maxwebsites'] = 1;
            } elseif ($user['group'] == '3') {
                $group = 'Developer';
                $user['maxwebsites'] = 25;
            }
            $user['joined'] = "NOW()";
            $user['account_active'] = 0;
            $userid = $db->insert("users", $user);
            newWebsite($userid);
            $newpass = resetPassword($userid);
            $subject = 'Your account details for ' . szName();
            $message = '
Thank you for registering on ' . szName() . '
Below are the details for your user account on ' . szUrl() . '
Please keep this information in a save place.

User ID: U53R' . $userid . '
Username: '******'username'] . '
Password: '******'
Full Names: ' . $user['fullnames'] . '
Account Type: ' . $group . '
Phone Number: ' . $user['phone'] . '
Website: ' . $user['user_website'] . '
Email Address: ' . $user['email'] . '

Thank you for signing up with us. While we try to automate almost everything on our servers it does not mean that we do not care about our clients. By automating the functions online we are able to provide our clients with faster response times. If you feel the need to contact us directly please do not hesitate to do so. We are always happy to hear from our clients. Compliments motivate us and complaints improves our service whilst suggestions make what we do better every day.

' . szName() . ' is a new product created from scratch; should you find any problems or have suggestions, we would be glad to hear from you. Our first priority is to fix any errors as they get reported. We upload new templates weekly and you can watch the total number of templates increase in the ' . szName() . ' Stats box on the home page of the ' . szName() . ' website. If you have a theme that you would like included, please let us know and we will add it to the collection. We are also planning a lot of new and exciting features in the near future and we will update the news pages as we make changes, fix errors and add additional functions.

For billing and invoice related queries please email us directly at ' . szEmail() . '. Any other support questions should be directed to the Support Forums. For the best experience please use Firefox. It is a free web browser and can be downloaded online from http://www.mozilla.org/en-US/firefox/new/

By default Developers can only create 25 websites. This is only implemented to prevent abuse. If you are registered as a Developer and need 50 or 100 extra websites just contact us and we will be happy to set this number to whatever you need it to be. We look forward to doing business with you for many years to come.

Kind Regards
The ' . szName() . ' Team
';
            $headers = 'From: ' . szEmail() . "\r\n" . 'Bcc: ' . szCronEmail() . "\r\n";
            if (sendEmail($user['email'], $subject, $message, $headers)) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    } else {
        return false;
    }
}
Ejemplo n.º 2
0
$userid = checkSession();
$siteid = checkSiteId();
include_once 'admin_template/header.php';
if (isset($_GET['download'])) {
    if ($siteid != 0) {
        if (isActive($userid)) {
            getWebsiteZip($siteid);
        } else {
            demoMsg();
            showClientWebsites($userid);
        }
    }
} elseif ($siteid == 0 && isset($_GET['add'])) {
    if (isActive($userid)) {
        if (maxUserSites($userid) == false) {
            $_SESSION['website'] = newWebsite($userid);
            $siteid = $_SESSION['website'];
            showTemplates($siteid, 0, 0, 'select');
        } else {
            if (isUser($userid)) {
                addStaticWebsite($userid);
            } elseif (isDeveloper($userid)) {
                sysMsg(MSG00093);
                if (isDeveloper($userid)) {
                    reportError('User (U53R' . $userid . ') reached the maximum number of allowed websites.');
                }
            } else {
                sysMsg(MSG00094);
            }
            showClientWebsites($userid);
        }