Exemple #1
0
function baseUrl()
{
    if (isset($_SESSION['site'])) {
        $baseUrl = szUrl() . 'content/' . $_SESSION['site'] . '/files';
    } else {
        $baseUrl = szUrl() . 'content/0/files';
    }
    return $baseUrl;
}
Exemple #2
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;
    }
}
function replaceTemplateValues($string, $siteid, $page_title)
{
    $db = Database::obtain();
    $sql = "SELECT * FROM " . TABLE_WEBSITES . "\n\t\t\t\t\tWHERE `id` =" . $siteid . "";
    $websitedata = $db->query_first($sql);
    $website_template = $websitedata['website_template'];
    $website_protect_value = $websitedata['website_protect'];
    $website_name = $websitedata['website_name'];
    $meta_description = $websitedata['website_description'];
    $meta_keywords = $websitedata['website_keywords'];
    $creator_name = $websitedata['creator_name'];
    $creator_website = $websitedata['creator_website'];
    $website_template = $websitedata['website_template'];
    $default_file_extension = '.html';
    if (isUser($_SESSION['userid']) or isActive($_SESSION['userid']) == false) {
        $website_footer = MSG00010 . ' <a href ="' . szUrl() . '" >' . szName() . '</a> - ' . MSG00082 . ' ' . szYear() . ' ' . $website_name . '. ' . MSG00057 . ' ';
    } else {
        $website_footer = MSG00009 . ' <a href="http://' . $creator_website . '" target="_blank" alt="' . $creator_name . '" title="' . $creator_name . '">' . $creator_name . '</a> - ' . MSG00082 . ' ' . szYear() . ' ' . $website_name . '. ' . MSG00057 . ' ';
    }
    $meta_generator_name = szName();
    $meta_language = szLanguage();
    if ($website_protect_value == '1') {
        $website_protect = protectSite();
    } else {
        $website_protect = '';
    }
    $website_header = '
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>' . $page_title . ' - ' . $website_name . '</title>
		<meta name="description" content="' . $meta_description . '">
		<meta name="keywords" content="' . $meta_keywords . '">
		<meta http-equiv="Copyright" content="' . $website_name . '" />
		<meta name="generator" content="' . $meta_generator_name . '" />
		<meta http-equiv="content-language" content="' . $meta_language . '" />
		<meta name="robots" content="index, follow" />
		<link rel="shortcut icon" href="favicon.ico"/>
		<link href="sitezilla.css" rel="stylesheet" type="text/css">
		<link href="templates/' . $website_template . '/style.css" rel="stylesheet" type="text/css">
		' . ie6Css($website_template) . ie7Css($website_template) . $website_protect . '';
    $webauthor = getAuthor($website_template);
    if ($webauthor == MSG00007) {
        $author = '';
    } else {
        if (strlen(stristr($webauthor, szCompany())) > 0) {
            $author = '';
        } else {
            $author = '&nbsp;' . MSG00008 . ' ' . $webauthor;
        }
    }
    $placeholders = array('WEBSITE_HEADER', 'WEBSITE_NAME', 'WEBSITE_FOOTER', 'TEMPLATE_AUTHOR');
    $new_vals = array($website_header, '<a href="index' . $default_file_extension . '" alt="' . $website_name . '" title="' . $website_name . '">' . $website_name . '</a>', $website_footer, $author);
    $newString = str_replace($placeholders, $new_vals, $string);
    return $newString;
}
Exemple #4
0
<strong>WEBSITE_MENU</strong> is the placeholder in <strong>main.php</strong> for the page content. <?php 
echo sz_config('name');
?>
 will placed the content for generated pages in this placeholder. Here is an example:<br><br>

<strong>&lt;div id="content"&gt;</strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;WEBSITE_CONTENT<br>
<strong>&lt;/div&gt;</strong><br><br>

<strong>WEBSITE_FOOTER &amp; TEMPLATE_AUTHOR</strong><br><br>

Template designers can leave a link back to their website in the footer by using the TEMPLATE_AUTHOR placeholder but should provide space for the generated pages to place additional data to the footer. <?php 
echo sz_config('name');
?>
 will automatically replace <strong>WEBSITE_FOOTER</strong> with <code>Website created with <a href="<?php 
echo szUrl();
?>
" alt="<?php 
echo sz_config('name');
?>
" title="<?php 
echo sz_config('name');
?>
"><?php 
echo sz_config('name');
?>
</a> -  Copyright &copy <?php 
echo szYear();
?>
 Website Name</code>. Templates that do not provide the <strong>WEBSITE_FOOTER</strong> placeholder will be modified before being made available in <?php 
echo sz_config('name');