andre пре 10 месеци
родитељ
комит
f9d4aa78ca

+ 0 - 416
api/TDHosting/Admin.php

@@ -1,416 +0,0 @@
-<?php
-/**
- * cwp7_Admin
- *
- * @author André Genrich <andre.genrich@thurdata.ch>
- * @author Roland Käser <roland.keaser@thurdata.ch>
- * @version 0.9
- * @copyright Copyright (c) 2021, Thurdata
- * @example ../test.php
- */
-/**
- * cwp7_Admin class documentation
- */
-/**
- * cwp7_Admin is a class which allows to manage cwp7 accounts via web-api
- *
- * You may create, modify, migrate, delete and get the attributes of a cwp7 account using this class
- *
- * For the usage examples of all class methods check the source code of test.php
- */
-class cwp7_Admin {
-    private $constructorSuccess;
-    private $cwp7URL;
-    private $cwp7ConType;
-    private $cwp7Port;
-    private $cwp7Secure;
-    protected $cwp7Token;
-	/**
-	 * Constructor
-     * @param string $cwp7Host cwp7 hostname or IP (example: cwp7.my.lan)
-	 * @param string $token api token
-	 * @param string $secure optional false to force unsecure (default true)
-	 */
-    function __construct($cwp7Host, $token, $secure=true) {
-        if(!in_array('curl', get_loaded_extensions())) {
-            $this->constructorSuccess = false;
-            return array('error_msg' => 'Error: PHP curl extension not available');
-        }
-        if (empty($cwp7Host) || empty($token)) {
-            $this->constructorSuccess = false;
-            return array('error_msg' => 'Error: Server login info missing, check server configuration');
-        }
-        if($secure) {
-            $this->cwp7ConType = 'https://';
-            $this->cwp7Secure = true;
-        } else {
-            $this->cwp7ConType = 'http://';
-            $this->cwp7Secure = false;
-        }
-        $cwp7Hostname = explode(':', $cwp7Host);
-        if (gethostbyname($cwp7Hostname[0]) == $cwp7Hostname[0] && !filter_var($cwp7Hostname[0], FILTER_VALIDATE_IP)) {
-            $this->constructorSuccess = false;
-            return array('error_msg' => 'Error: Cannot resolve ' . $cwp7Hostname[0] . ', check server configuration');
-        }
-        $this->cwp7Port = (isset($cwp7Hostname[1])) ? $cwp7Hostname[1] :  '2304';
-        $this->cwp7URL = $this->cwp7ConType . $cwp7Hostname[0] . ':' . $this->cwp7Port;
-        $this->cwp7Token = $token;
-        $this->constructorSuccess = true;
-    }
-
-    public function constructorSuccess() {
-        return $this->constructorSuccess;
-    }
-	/**
-	 * getAllAccounts
-	 * 
-	 * @return array of cwp7 accounts array of informations or error message
-	 */
-    public function getAllAccounts() {
-        $data = array();
-        return $this->doRequest('account', 'list', $data);
-    }
-	/**
-	 * getAccount
-	 * 
-	 * @param string $user user
-	 * 
-	 * @return array of account informations or error message
-	 */
-    public function getAccount($user) {
-        $data = array(
-            "user" => $user
-        );
-        return $this->doRequest('accountdetail', 'list', $data);
-    }
-	/**
-	 * createAccount
-	 * 
-	 * @param array $params avvount informations, email required.
-     * 
-	 * @return array of account informations or error message
-	 */
-    public function createAccount($params) {
-        if(!isset($params['package'])) {
-            return array('error_msg' => 'Error: missing parameter package');
-        }
-        if(!isset($params['domain'])) {
-            return array('error_msg' => 'Error: missing parameter domain');
-        }
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['pass'])) {
-            return array('error_msg' => 'Error: missing parameter pass');
-        }
-        if(!isset($params['email'])) {
-            return array('error_msg' => 'Error: missing parameter email');
-        }
-        if(!isset($params['inode'])) {
-            return array('error_msg' => 'Error: missing parameter inode');
-        }
-        if(!isset($params['nofile'])) {
-            return array('error_msg' => 'Error: missing parameter nofile');
-        }
-        if(!isset($params['nproc'])) {
-            return array('error_msg' => 'Error: missing parameter nproc');
-        }
-        if(!isset($params['server_ips'])) {
-            return array('error_msg' => 'Error: missing parameter server_ips');
-        }
-        if(!isset($params['autossl'])) {
-            $params['autossl'] = 0;
-        }
-        $data = array(
-            'domain'        => $params['domain'],
-            'user'          => $params['user'],
-            'username'      => $params['user'],
-            'pass'          => base64_encode($params['pass']),
-            'email'         => $params['email'],
-            'package'       => $params['package'],
-            'autossl'       => $params['autossl'],
-            'encodepass'    => true,
-			'inode'         => $params['inode'],
-            'limit_nofile'  => $params['nofile'],
-            'limit_nproc'   => $params['nproc'],
-            'server_ips'    => $params['server_ips'],
-        );
-        return $this->doRequest('account', 'add', $data);
-	}
-	/**
-	 * modifyAccount
-	 * 
-	 * @param array $params account informations, user, e-mail & new package required.
-     * 
-	 * @return array status -> OK or error message
-	 */
-    public function modifyAccount($params) {
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['email'])) {
-            return array('error_msg' => 'Error: missing parameter email');
-        }
-        if(!isset($params['package'])) {
-            return array('error_msg' => 'Error: missing parameter package');
-        }
-        return $this->doRequest('account', 'udp', $params);
-	}
-	/**
-	 * deleteAccount
-	 * 
-	 * @param array user & e-mail required
-	 * 
-	 * @return array success => true or error message
-	 */
-    public function deleteAccount($params)
-	{
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['email'])) {
-            return array('error_msg' => 'Error: missing parameter email');
-        }
-        $data = array(
-            "user"          => $params['user'],
-            "email"         => $params['email'],
-        );
-        return $this->doRequest('account', 'del', $data);
-	}
-	/**
-	 * suspendAccount
-	 * 
-	 * @param string $user user
-	 * 
-	 * @return array success => true or error message
-	 */
-    public function suspendAccount($user)
-	{
-        $data = array(
-            "user" => $user,
-        );
-        return $this->doRequest('account', 'susp', $data);
-	}
-	/**
-	 * unsuspendAccount
-	 * 
-	 * @param string $user user
-	 * 
-	 * @return array success => true or error message
-	 */
-    public function unsuspendAccount($user)
-	{
-        $data = array(
-            'user' => $user,
-        );
-        return $this->doRequest('account', 'unsp', $data);
-	}
-	/**
-	 * getPackages
-	 * 
-	 * @return array packages
-	 */
-    public function getPackages()
-	{
-        $data = array();
-        return $this->doRequest('packages', 'list', $data);
-    }
-	/**
-	 * changePassword
-	 * 
-	 * @return array packages
-	 */
-    public function changePass($params)
-	{
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['password'])) {
-            return array('error_msg' => 'Error: missing parameter password');
-        }
-        $data = array(
-            'user' => $params['user'],
-            'password' => $params['password'],
-        );
-        return $this->doRequest('changepass', 'upd', $data);
-    }
-    /**
-	 * addDomain
-     * 
-     * @param array $user user, $name domainname, $type domain or subdomain
-	 * 
-	 * @return array details
-	 */
-    public function addDomain($params)
-	{
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['name'])) {
-            return array('error_msg' => 'Error: missing parameter name');
-        }
-        if(!isset($params['type'])) {
-            return array('error_msg' => 'Error: missing parameter type');
-        }
-        $data = array(
-            'user'      => $params['user'],
-            'type'      => $params['type'],
-            'name'      => $params['name'],
-            'path'      => '/domains/' . $params['name'],
-            'autossl'   => 0,
-        );
-        return $this->doRequest('admindomains', 'add', $data);
-    }
-    /**
-	 * deleteDomain
-     * 
-     * @param array $user user, $name domainname, $type domain or subdomain
-	 * 
-	 * @return array details
-	 */
-    public function deleteDomain($params)
-	{
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['name'])) {
-            return array('error_msg' => 'Error: missing parameter name');
-        }
-        if(!isset($params['type'])) {
-            return array('error_msg' => 'Error: missing parameter type');
-        }
-        $data = array(
-            'user'      => $params['user'],
-            'type'      => $params['type'],
-            'name'      => $params['name'],
-        );
-        return $this->doRequest('admindomains', 'del', $data);
-    }
-    /**
-	 * getQuota
-     * 
-     * @param string $user user
-	 * 
-	 * @return array quota details
-	 */
-    public function getQuota($user)
-	{
-        $data = array('user' => $user);
-        return $this->doRequest('accountquota', 'list', $data);
-    }
-	/**
-	 * getAutoSSL
-     * 
-     * @param string $user user
-	 * 
-	 * @return array certificate data or error
-	 */
-    public function getAutoSSL($user)
-	{
-        $data = array('user' => $user);
-        return $this->doRequest('autossl', 'list', $data);
-    }
-	/**
-	 * addAutoSSL
-     * 
-     * @param array $user user, $name domainname
-	 * 
-	 * @return array status or error
-	 */
-    public function addAutoSSL($params)
-	{
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['name'])) {
-            return array('error_msg' => 'Error: missing parameter name');
-        }
-        $data = array('user' => $params['user'], 'name' => $params['name']);
-        return $this->doRequest('autossl', 'add', $data);
-    }
-	/**
-	 * renewAutoSSL
-     * 
-     * @param array $user user, $name cert name
-	 * 
-	 * @return array status or error
-	 */
-    public function updateAutoSSL($params)
-	{
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['name'])) {
-            return array('error_msg' => 'Error: missing parameter name');
-        }
-        $data = array('user' => $params['user'], 'name' => $params['name']);
-        return $this->doRequest('autossl', 'renew', $data);
-    }
-	/**
-	 * delAutoSSL
-     * 
-     * @param array $user user, $name doaminname
-	 * 
-	 * @return array status or error
-	 */
-    public function delAutoSSL($params)
-	{
-        if(!isset($params['user'])) {
-            return array('error_msg' => 'Error: missing parameter user');
-        }
-        if(!isset($params['name'])) {
-            return array('error_msg' => 'Error: missing parameter name');
-        }
-        $data = array('user' => $params['user'], 'name' => $params['name']);
-        return $this->doRequest('autossl', 'del', $data);
-    }
-	/**
-	 * getServerType
-	 * 
-	 * @return array status or error
-	 */
-    public function getServerType()
-	{
-        $data = array();
-        return $this->doRequest('typeserver', 'list', $data);
-    }
-	/**
-	 * getLoginLink
-	 * 
-	 * @return array status or error
-	 */
-    public function getLoginLink($user, $timer=5)
-	{
-        $data = array('user' => $user, 'timer' => $timer);
-        return $this->doRequest('user_session', 'list', $data);
-    }
-    /**
-     * doRequest
-     * 
-     * @param string $endpoint API endpoint
-     * @param string $action endpoint action
-     * @param array $data POST data
-     * 
-     * @return string API response
-     */
-    protected function doRequest($endpoint, $action, $data) {
-        $data['key'] = $this->cwp7Token;
-        $data['action'] = $action;
-//        $data['debug'] = 1;
-        $ch = curl_init();
-        curl_setopt($ch, CURLOPT_URL, $this->cwp7URL . '/v1/' . $endpoint);
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
-        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
-        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
-        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
-        curl_setopt($ch, CURLOPT_POST, 1);
-        $response = curl_exec($ch);
-        if(curl_getinfo($ch, CURLINFO_RESPONSE_CODE) != 200) {
-            curl_close($ch);
-            return array('status' => 'Error', 'err_msg' => curl_error($ch));
-        };
-        curl_close($ch);
-        return json_decode($response, true);
-    }
-}

+ 2 - 2
api/config.php

@@ -3,7 +3,7 @@
 // Config //
 // Config //
 ////////////
 ////////////
 
 
-$TDHostingHost = '';
-$TDHostingToken = '';
+$siteBuilderHost = '';
+$siteBuilderToken = '';
 
 
 ?>
 ?>

+ 201 - 0
api/sitebuilder.php

@@ -0,0 +1,201 @@
+<?php
+  
+class ApiClient {
+    private $apiUrl;
+    private $apiKey;
+  
+    public function __construct($apiUrl, $apiKey) {
+        $this->apiUrl = rtrim($apiUrl, '/');
+        $this->apiKey = $apiKey;
+    }
+     
+    /**
+     * Initially deploy the development site for the customer
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     * @param adminName:       The Super-Admin User of the CRM System (usually the e-mail of the customer
+     * @param adminPassword:   A self randomly generated password
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
+     *                          or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
+     *
+     * Attention: The given parameters username, adminName and adminPassword must be
+     *            stored locally for the Single Sign on from whcms plugin
+     *
+     */
+    public function deployDev($username, $domain, $adminName, $adminPassword) {
+        $url = "$this->apiUrl/deploydev/$username/$domain";
+        $data = [
+            'admin_name' => $adminName,
+            'admin_password' => $adminPassword
+        ];
+        return $this->sendRequest('POST', $url, $data);
+    }
+  
+ 
+    /**
+     * Migrate dev site to prod site
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     * @param adminName:       The Super-Admin User of the CRM System (usually the e-mail of the customer
+     * @param adminPassword:   A self randomly generated password
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
+     *                          or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
+     *
+     * Attention: The given parameters adminName and adminPassword must be stored locally for the
+     *            Single Sign on from whcms plugin
+     */
+    public function migrateprod($username, $domain, $adminName, $adminPassword) {
+        $url = "$this->apiUrl/migrateprod/$username/$domain";
+        $data = [
+            'admin_name' => $adminName,
+            'admin_password' => $adminPassword
+        ];
+        return $this->sendRequest('POST', $url, $data);
+    }
+  
+     
+    /**
+     * Disables the prod webpage
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
+     *                          or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
+     */
+    public function disableprod($domain,$userName) {
+        $url = "$this->apiUrl/disableprod/$username/$domain";
+        return $this->sendRequest('GET', $url);
+    }
+  
+    /**
+     * Enables the prod webpage
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => ['isenabled' => 'YES']];
+     *                          or a json with ['status' => $httpCode,'response' => ['isenabled' => 'NO']];
+     */
+    public function enableprod($domain,$userName) {
+        $url = "$this->apiUrl/enableprod/$username/$domain";
+        return $this->sendRequest('GET', $url);
+    }
+  
+  
+    /**
+     * Disables the prod webpage
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
+     *                          or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
+     */
+    public function isprodenabled($domain,$userName) {
+        $url = "$this->apiUrl/isprodenabled/$username/$domain";
+        return $this->sendRequest('GET', $url);
+    }
+  
+    /**
+     * Disables the prod webpage
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => ['ssl_expiry' => 'Datum des Ablaufs des Zertifikats', 'ssl_remaining' => 'Anzahl der Tage bis zum Ablauf des Zertifikats']];
+     */
+    public function getSSLDays($domain,$userName) {
+        $url = "$this->apiUrl/getssldays/$username/$domain";
+        return $this->sendRequest('GET', $url);
+    }
+     
+    /**
+     * Lists the Prod Backups for the prod webpage
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => [
+     *                                          'backups' =>
+                                                [
+     *                                              ['backup_date' => 'ISO Backup Datum',
+     *                                              'swiss_date' => 'Datum im Schweizer Format',
+     *                                              'size_mb' => 'Grösse in Megabyte',
+     *                                              'filename' => 'Dateiname des tar.gz's'
+     *                                          ]
+     *                                      ];
+     *                                         
+     */
+    public function listbackups($domain,$userName) {
+        $url = "$this->apiUrl/listbackups/$username/$domain";
+        return $this->sendRequest('GET', $url);
+    }
+     
+     
+     
+    /**
+     * Restores a Backup with the given ISO Date
+     *
+     * @param username:        The username under which the domain is deployed
+     * @param domain:          The Domain to migrate
+     * @param backupDate:      The ISO-Date of the backup (backup_date from listBackups) to restore
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
+     *                          or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
+     */
+    public function restorebackup($domain,$userName,$backupDate) {
+        $url = "$this->apiUrl/restorebackup/$username/$domain";
+        $data = [
+            'backup_date' => $backupDate
+        ];     
+        return $this->sendRequest('POST', $url, $data);
+    }
+  
+  
+  
+  
+  
+    private function sendRequest($method, $url, $data = []) {
+        $ch = curl_init();
+          
+        $options = [
+            CURLOPT_URL => $url,
+            CURLOPT_RETURNTRANSFER => true,
+            CURLOPT_HTTPHEADER => [
+                "X-Api-Key: $this->apiKey",
+                "Content-Type: application/json"
+            ],
+            CURLOPT_CUSTOMREQUEST => $method,
+            CURLOPT_SSL_VERIFYPEER => false, // Deaktiviert die Überprüfung des SSL-Zertifikats
+            CURLOPT_SSL_VERIFYHOST => false  // Akzeptiert alle Hostnamen
+        ];
+  
+        if ($method === 'POST' && !empty($data)) {
+            $options[CURLOPT_POSTFIELDS] = json_encode($data);
+        }
+  
+        curl_setopt_array($ch, $options);
+        $response = curl_exec($ch);
+        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+        curl_close($ch);
+  
+        return [
+            'status' => $httpCode,
+            'response' => json_decode($response, true)
+        ];
+    }
+}
+ 
+ 
+ 
+  
+// Beispielnutzung mit HTTPS
+$apiClient = new ApiClient('https://vm-dc-builderhost-01.thurdata.local', 'your-secure-password');
+$response = $apiClient->getSSLDays('exampleuser','example.com');
+ 
+print_r($response);

+ 1 - 1
clientarea.tpl

@@ -2,7 +2,7 @@
  **********************************************************
  **********************************************************
  * Developed by: Team Theme Metro
  * Developed by: Team Theme Metro
  * Website: http://www.thememetro.com
  * Website: http://www.thememetro.com
- * Customized ny thurdata
+ * Customized by thurdata
  **********************************************************
  **********************************************************
 *}
 *}
 {if $modulechangepwresult}
 {if $modulechangepwresult}

+ 2 - 2
composer.json

@@ -1,6 +1,6 @@
 {
 {
-    "name": "Thurdata/cwp7",
-    "description": "cwp7 Provisioing Module",
+    "name": "thurdata/sitebuilder",
+    "description": "sitebuilder Provisioing Module",
     "version": "2.0.0",
     "version": "2.0.0",
     "type": "project",
     "type": "project",
     "license": "EULA",
     "license": "EULA",

+ 151 - 151
TDHosting.php → siteBuilder.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 /**
 /**
- * WHMCS cwp7 Provisioning Module
+ * WHMCS siteBuilder Provisioning Module
  *
  *
- * Provisioning for User Account on the cwp7 Server
+ * Provisioning for User Account on the siteBuilder Server
  *
  *
  * @see https://centos-webpanel.com/
  * @see https://centos-webpanel.com/
  * @copyright Copyright (c) Thurdata GmbH 2022
  * @copyright Copyright (c) Thurdata GmbH 2022
@@ -11,33 +11,33 @@
 use WHMCS\Database\Capsule;
 use WHMCS\Database\Capsule;
 
 
 require_once 'Net/DNS2.php';
 require_once 'Net/DNS2.php';
-require_once(__DIR__ . '/api/cwp7/Admin.php');
+require_once(__DIR__ . '/api/sitebuilder.php');
 
 
 if (!defined('WHMCS')) {
 if (!defined('WHMCS')) {
 	die('This file cannot be accessed directly');
 	die('This file cannot be accessed directly');
 }
 }
 
 
 /**
 /**
- * Define CWP7 product metadata parameters. 
+ * Define siteBuilder product metadata parameters. 
  *
  *
  * @see https://developers.whmcs.com/provisioning-modules/meta-data-params/
  * @see https://developers.whmcs.com/provisioning-modules/meta-data-params/
  *
  *
  * @return array
  * @return array
  */
  */
-function cwp7_MetaData() {
+function siteBuilder_MetaData() {
     return array(
     return array(
-        'DisplayName' => 'CentOS Web Panel Provisioning',
+        'DisplayName' => 'ThurData SiteBuilder Provisioning',
         'APIVersion' => '1.2',
         'APIVersion' => '1.2',
-        'DefaultNonSSLPort' => '2031',
-        'DefaultSSLPort' => '2031',
+        'DefaultNonSSLPort' => '80',
+        'DefaultSSLPort' => '443',
         'RequiresServer' => true,
         'RequiresServer' => true,
-        'ServiceSingleSignOnLabel' => 'Login to CWP7',
-        'AdminSingleSignOnLabel' => 'Login to CWP7 Admin'
+        'ServiceSingleSignOnLabel' => 'Login to siteBuilder',
+        'AdminSingleSignOnLabel' => 'Login to siteBuilder Admin'
     );
     );
 }
 }
 
 
 /**
 /**
- * Test connection to a CWP7 server with the given server parameters.
+ * Test connection to a siteBuilder server with the given server parameters.
  *
  *
  * Allows an admin user to verify that an API connection can be
  * Allows an admin user to verify that an API connection can be
  * successfully made with the given configuration parameters for a
  * successfully made with the given configuration parameters for a
@@ -53,9 +53,9 @@ function cwp7_MetaData() {
  *
  *
  * @return array
  * @return array
  */
  */
-function cwp7_Testconnection($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->getServerType();
+function siteBuilder_Testconnection($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->getServerType();
 	if($response['status'] == 'OK') {
 	if($response['status'] == 'OK') {
 		return array(
 		return array(
 			'success' => true,
 			'success' => true,
@@ -63,7 +63,7 @@ function cwp7_Testconnection($params) {
 		);
 		);
 	}
 	}
 	logModuleCall(
 	logModuleCall(
-		'cwp7',
+		'siteBuilder',
 		__FUNCTION__,
 		__FUNCTION__,
 		$params,
 		$params,
 		'debug',
 		'debug',
@@ -76,13 +76,13 @@ function cwp7_Testconnection($params) {
 }
 }
 
 
 /**
 /**
- * Define CWP7 product configuration options. 
+ * Define siteBuilder product configuration options. 
  *
  *
  * @see https://developers.whmcs.com/provisioning-modules/config-options/
  * @see https://developers.whmcs.com/provisioning-modules/config-options/
  *
  *
  * @return array
  * @return array
  */
  */
-function cwp7_ConfigOptions() {
+function siteBuilder_ConfigOptions() {
     $whmcs = App::self();
     $whmcs = App::self();
     $serverGroupID = $whmcs->get_req_var('servergroup');
     $serverGroupID = $whmcs->get_req_var('servergroup');
     $serverIDObj = Capsule::table('tblservergroupsrel')
     $serverIDObj = Capsule::table('tblservergroupsrel')
@@ -98,28 +98,28 @@ function cwp7_ConfigOptions() {
         ->where('id', $serverIDs)
         ->where('id', $serverIDs)
         ->where('active', '=', 1)
         ->where('active', '=', 1)
 		->first();
 		->first();
-	$cwp7 = new cwp7_Admin($server->hostname, $server->accesshash);
-	$cwp7Packages = $cwp7->getPackages();
-	if($cwp7Packages['status'] != 'OK') {
+	$siteBuilder = new siteBuilder_Admin($server->hostname, $server->accesshash);
+	$siteBuilderPackages = $siteBuilder->getPackages();
+	if($siteBuilderPackages['status'] != 'OK') {
 		logModuleCall(
 		logModuleCall(
-			'cwp7',
+			'siteBuilder',
 			__FUNCTION__,
 			__FUNCTION__,
-			$cwp7Packages['status'],
+			$siteBuilderPackages['status'],
 			'Could not fetch packages',
 			'Could not fetch packages',
-			$cwp7Packages['error_msg']
+			$siteBuilderPackages['error_msg']
 		);
 		);
 		return false;
 		return false;
 	}
 	}
-	$cwp7PackageNames = array();
-	foreach($cwp7Packages['msj'] as $cwp7Package) {
-		array_push($cwp7PackageNames, $cwp7Package['package_name']);
+	$siteBuilderPackageNames = array();
+	foreach($siteBuilderPackages['msj'] as $siteBuilderPackage) {
+		array_push($siteBuilderPackageNames, $siteBuilderPackage['package_name']);
 	}
 	}
 	$configOptions = array();
 	$configOptions = array();
     $configOptions['package'] = array(
     $configOptions['package'] = array(
-        'FriendlyName' => 'CWP7 Package',
+        'FriendlyName' => 'siteBuilder Package',
         'Type' => 'dropdown',
         'Type' => 'dropdown',
-        'Options' => implode(',', $cwp7PackageNames),
-		'Description' => 'Select CWP7 Package',
+        'Options' => implode(',', $siteBuilderPackageNames),
+		'Description' => 'Select siteBuilder Package',
 	);
 	);
 	$configOptions['inode'] = array( "Type" => "text" , "Description" => "Max of inode", "Default" => "0",);
 	$configOptions['inode'] = array( "Type" => "text" , "Description" => "Max of inode", "Default" => "0",);
 	$configOptions['nofile'] = array( "Type" => "text", "Description" => "Max of nofile", "Default" => "100",);
 	$configOptions['nofile'] = array( "Type" => "text", "Description" => "Max of nofile", "Default" => "100",);
@@ -129,9 +129,9 @@ function cwp7_ConfigOptions() {
 }
 }
 
 
 /**
 /**
- * Provision a new account of a CWP7 server.
+ * Provision a new account of a siteBuilder server.
  *
  *
- * Attempt to provision a new CWP7 account. This is
+ * Attempt to provision a new siteBuilder account. This is
  * called any time provisioning is requested inside of WHMCS. Depending upon the
  * called any time provisioning is requested inside of WHMCS. Depending upon the
  * configuration, this can be any of:
  * configuration, this can be any of:
  * * When a new order is placed
  * * When a new order is placed
@@ -144,7 +144,7 @@ function cwp7_ConfigOptions() {
  * 
  * 
  * @return string 'success' or an error message
  * @return string 'success' or an error message
  */
  */
-function cwp7_CreateAccount($params) {
+function siteBuilder_CreateAccount($params) {
 	$username = strtolower(substr($params['clientsdetails']['firstname'],0,2) . substr($params['clientsdetails']['lastname'],0,3)) . $params['serviceid'];
 	$username = strtolower(substr($params['clientsdetails']['firstname'],0,2) . substr($params['clientsdetails']['lastname'],0,3)) . $params['serviceid'];
 	$userdomain = $username . '.local';
 	$userdomain = $username . '.local';
 	try {
 	try {
@@ -158,7 +158,7 @@ function cwp7_CreateAccount($params) {
 		);
 		);
 	} catch (\Exception $e) {
 	} catch (\Exception $e) {
 		logModuleCall(
 		logModuleCall(
-			'cwp7',
+			'siteBuilder',
 			__FUNCTION__,
 			__FUNCTION__,
 			$params,
 			$params,
 			'Error: could save username & domain in database',
 			'Error: could save username & domain in database',
@@ -178,8 +178,8 @@ function cwp7_CreateAccount($params) {
             'nproc' => (int) $params["configoption4"],
             'nproc' => (int) $params["configoption4"],
             'server_ips'=>$params["serverip"],
             'server_ips'=>$params["serverip"],
 		);
 		);
-		$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-		$response = $cwp7->createAccount($data);
+		$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+		$response = $siteBuilder->createAccount($data);
 	}
 	}
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
@@ -188,7 +188,7 @@ function cwp7_CreateAccount($params) {
 }
 }
 
 
 /**
 /**
- * Removes a CWP7 account.
+ * Removes a siteBuilder account.
  *
  *
  * Called when a termination is requested. This can be invoked automatically for
  * Called when a termination is requested. This can be invoked automatically for
  * overdue products if enabled, or requested manually by an admin user.
  * overdue products if enabled, or requested manually by an admin user.
@@ -199,9 +199,9 @@ function cwp7_CreateAccount($params) {
  *
  *
  * @return string 'success' or an error message
  * @return string 'success' or an error message
  */
  */
-function cwp7_TerminateAccount($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->deleteAccount(array('user' => $params['username'], 'email' => $params['clientsdetails']['email']));
+function siteBuilder_TerminateAccount($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->deleteAccount(array('user' => $params['username'], 'email' => $params['clientsdetails']['email']));
 	if($response['status'] == 'Error') {
 	if($response['status'] == 'Error') {
 		return 'Error: ' . $response['msj'];
 		return 'Error: ' . $response['msj'];
 	}
 	}
@@ -209,7 +209,7 @@ function cwp7_TerminateAccount($params) {
 }
 }
 
 
 /**
 /**
- * Set a CWP7 account to status inactive.
+ * Set a siteBuilder account to status inactive.
  *
  *
  * Called when a suspension is requested. This is invoked automatically by WHMCS
  * Called when a suspension is requested. This is invoked automatically by WHMCS
  * when a product becomes overdue on payment or can be called manually by admin
  * when a product becomes overdue on payment or can be called manually by admin
@@ -221,9 +221,9 @@ function cwp7_TerminateAccount($params) {
  *
  *
  * @return string 'success' or an error message
  * @return string 'success' or an error message
  */
  */
-function cwp7_SuspendAccount($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->suspendAccount($params['username']);
+function siteBuilder_SuspendAccount($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->suspendAccount($params['username']);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -231,7 +231,7 @@ function cwp7_SuspendAccount($params) {
 }
 }
 
 
 /**
 /**
- * Set a CWP7 account to status active.
+ * Set a siteBuilder account to status active.
  *
  *
  * Called when an un-suspension is requested. This is invoked
  * Called when an un-suspension is requested. This is invoked
  * automatically upon payment of an overdue invoice for a product, or
  * automatically upon payment of an overdue invoice for a product, or
@@ -243,9 +243,9 @@ function cwp7_SuspendAccount($params) {
  *
  *
  * @return string 'success' or an error message
  * @return string 'success' or an error message
  */
  */
-function cwp7_UnsuspendAccount($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->unsuspendAccount($params['username']);
+function siteBuilder_UnsuspendAccount($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->unsuspendAccount($params['username']);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -265,10 +265,10 @@ function cwp7_UnsuspendAccount($params) {
  *
  *
  * @return array
  * @return array
  */
  */
-function cwp7_ClientArea($params) {
+function siteBuilder_ClientArea($params) {
 	$clientInfo = array('moduleclientarea' => '1');
 	$clientInfo = array('moduleclientarea' => '1');
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->getAutoSSL($params['username']);
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->getAutoSSL($params['username']);
 	if($response['status'] == 'OK') {
 	if($response['status'] == 'OK') {
 		$sslSites = array();
 		$sslSites = array();
 		foreach($response['msj'] as $sslSite) {
 		foreach($response['msj'] as $sslSite) {
@@ -278,22 +278,22 @@ function cwp7_ClientArea($params) {
 			);
 			);
 		}
 		}
 	}
 	}
-	$response = $cwp7->getAccount($params['username']);
+	$response = $siteBuilder->getAccount($params['username']);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		logModuleCall(
 		logModuleCall(
-			'cwp7',
+			'siteBuilder',
 			__FUNCTION__,
 			__FUNCTION__,
 			$params,
 			$params,
 			'debug',
 			'debug',
 			$response
 			$response
 		);
 		);
 	}
 	}
-	if(cwp7CheckLimit($params,'domains')){
+	if(siteBuilderCheckLimit($params,'domains')){
 		$clientInfo['domainlimit'] = 1;
 		$clientInfo['domainlimit'] = 1;
 	} else {
 	} else {
 		$clientInfo['domainlimit'] = 0;
 		$clientInfo['domainlimit'] = 0;
 	};
 	};
-	if(cwp7CheckLimit($params,'subdomins')){
+	if(siteBuilderCheckLimit($params,'subdomins')){
 		$clientInfo['subdomainlimit'] = 1;
 		$clientInfo['subdomainlimit'] = 1;
 	} else {
 	} else {
 		$clientInfo['subdomainlimit'] = 0;
 		$clientInfo['subdomainlimit'] = 0;
@@ -324,10 +324,10 @@ function cwp7_ClientArea($params) {
 				$domain['sslexpire'] = $sslSites[$domain['domain']]['expire'];
 				$domain['sslexpire'] = $sslSites[$domain['domain']]['expire'];
 				$domain['autossl'] = $sslSites[$domain['domain']]['auotssl'];
 				$domain['autossl'] = $sslSites[$domain['domain']]['auotssl'];
 			}
 			}
-			if(cwp7CheckA($domain['domain'],$params['serverip'],$params['configoption5']) == 1) {
+			if(siteBuilderCheckA($domain['domain'],$params['serverip'],$params['configoption5']) == 1) {
 				$domain['DNS'] = 1;
 				$domain['DNS'] = 1;
 			}
 			}
-			$domain['domainNS'] = cwp7CheckSOA($domain['domain'],$params['configoption5']);
+			$domain['domainNS'] = siteBuilderCheckSOA($domain['domain'],$params['configoption5']);
 			$domain['subdomains'] = array();
 			$domain['subdomains'] = array();
 			foreach($subDomains as $subDomain) {
 			foreach($subDomains as $subDomain) {
 				if($subDomain['domain'] == $domain['domain']) {
 				if($subDomain['domain'] == $domain['domain']) {
@@ -342,7 +342,7 @@ function cwp7_ClientArea($params) {
 						unset($subDomain['sslexpire']);
 						unset($subDomain['sslexpire']);
 						unset($subDomain['autossl']);
 						unset($subDomain['autossl']);
 					}
 					}
-					if(cwp7CheckA($subFQDN,$params['serverip'],$params['configoption5']) == 1) {
+					if(siteBuilderCheckA($subFQDN,$params['serverip'],$params['configoption5']) == 1) {
 						$subDomain['DNS'] = 1;
 						$subDomain['DNS'] = 1;
 					} else {
 					} else {
 						unset($subDomain['DNS']);
 						unset($subDomain['DNS']);
@@ -360,7 +360,7 @@ function cwp7_ClientArea($params) {
 }
 }
 
 
 /**
 /**
- * Perform single sign-on for a CWP7 account.
+ * Perform single sign-on for a siteBuilder account.
  *
  *
  * When successful, returns a URL to which the user should be redirected.
  * When successful, returns a URL to which the user should be redirected.
  *
  *
@@ -370,9 +370,9 @@ function cwp7_ClientArea($params) {
  *
  *
  * @return array
  * @return array
  */
  */
-function cwp7_ServiceSingleSignOn($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->getLoginLink($params['username']);
+function siteBuilder_ServiceSingleSignOn($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->getLoginLink($params['username']);
 	if($response['status'] == 'OK') {
 	if($response['status'] == 'OK') {
 		$link = $response['msj']['details'];
 		$link = $response['msj']['details'];
 		$linkautologin = $link[0]['url'];
 		$linkautologin = $link[0]['url'];
@@ -389,7 +389,7 @@ function cwp7_ServiceSingleSignOn($params) {
 }
 }
 
 
 /**
 /**
- * Change the password for a CWP7 account.
+ * Change the password for a siteBuilder account.
  *
  *
  * Called when a password change is requested. This can occur either due to a
  * Called when a password change is requested. This can occur either due to a
  * client requesting it via the client area or an admin requesting it from the
  * client requesting it via the client area or an admin requesting it from the
@@ -404,9 +404,9 @@ function cwp7_ServiceSingleSignOn($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_ChangePassword($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->changePass(array('user' => $params['username'], 'password' => $params['password']));
+function siteBuilder_ChangePassword($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->changePass(array('user' => $params['username'], 'password' => $params['password']));
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -414,7 +414,7 @@ function cwp7_ChangePassword($params) {
 }
 }
 
 
 /**
 /**
- * Upgrade or downgrade a CWP7 account by package.
+ * Upgrade or downgrade a siteBuilder account by package.
  *
  *
  * Called to apply any change in product assignment or parameters. It
  * Called to apply any change in product assignment or parameters. It
  * is called to provision upgrade or downgrade orders, as well as being
  * is called to provision upgrade or downgrade orders, as well as being
@@ -429,8 +429,8 @@ function cwp7_ChangePassword($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_ChangePackage($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
+function siteBuilder_ChangePackage($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
 	$data = array(
 	$data = array(
 		'user' => $params['username'],
 		'user' => $params['username'],
 		'email' => $params['clientsdetails']['email'],
 		'email' => $params['clientsdetails']['email'],
@@ -440,7 +440,7 @@ function cwp7_ChangePackage($params) {
 		'processes' => (int) $params["configoption4"],
 		'processes' => (int) $params["configoption4"],
 		'server_ips'=> $params["serverip"],
 		'server_ips'=> $params["serverip"],
 	);
 	);
-	$response = $cwp7->modifyAccount($data);
+	$response = $siteBuilder->modifyAccount($data);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -456,9 +456,9 @@ function cwp7_ChangePackage($params) {
  * 
  * 
  * @see https://developers.whmcs.com/provisioning-modules/usage-update/
  * @see https://developers.whmcs.com/provisioning-modules/usage-update/
  */
  */
-function cwp7_UsageUpdate($params) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->getAllAccounts();
+function siteBuilder_UsageUpdate($params) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->getAllAccounts();
 	if($response['status'] == 'OK'){
 	if($response['status'] == 'OK'){
 		$results = $response['msj'];
 		$results = $response['msj'];
 		for($i = 0; $i < count($results); $i++){
 		for($i = 0; $i < count($results); $i++){
@@ -512,8 +512,8 @@ function cwp7_UsageUpdate($params) {
  *
  *
  * @return array
  * @return array
  */
  */
-function cwp7_ClientAreaCustomButtonArray ($params) {
-	if(cwp7CheckLimit($params, 'domains')) {
+function siteBuilder_ClientAreaCustomButtonArray ($params) {
+	if(siteBuilderCheckLimit($params, 'domains')) {
 		return array();
 		return array();
 	}
 	}
 	return array(
 	return array(
@@ -531,7 +531,7 @@ function cwp7_ClientAreaCustomButtonArray ($params) {
  * 
  * 
  * @return array
  * @return array
  */
  */
-function cwp7_ClientAreaAllowedFunctions() {
+function siteBuilder_ClientAreaAllowedFunctions() {
 	return array(
 	return array(
 		"Enable SSL" => "enableSSL",
 		"Enable SSL" => "enableSSL",
 		"Renew SSL" => "renewSSL",
 		"Renew SSL" => "renewSSL",
@@ -563,17 +563,17 @@ function cwp7_ClientAreaAllowedFunctions() {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_newDomain($params) {
+function siteBuilder_newDomain($params) {
 	return array(
 	return array(
         'breadcrumb' => array(
         'breadcrumb' => array(
             'clientarea.php?action=productdetails&id=' . $params['serviceid'] . '&modop=custom&a=newDomain' => 'Neue Domain',
             'clientarea.php?action=productdetails&id=' . $params['serviceid'] . '&modop=custom&a=newDomain' => 'Neue Domain',
         ),
         ),
-        'templatefile' => 'cwp7_add_domain',
+        'templatefile' => 'siteBuilder_add_domain',
     );
     );
 }
 }
 
 
 /**
 /**
- * Adds a new domain to a CWP7 account.
+ * Adds a new domain to a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -581,18 +581,18 @@ function cwp7_newDomain($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_addDomain($params) {
+function siteBuilder_addDomain($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
-	if(cwp7CheckLimit($params, 'domains')) {
+	if(siteBuilderCheckLimit($params, 'domains')) {
 		return 'Error: domain limit exceeded';
 		return 'Error: domain limit exceeded';
 	}
 	}
 	$vars['user'] = $params['username'];
 	$vars['user'] = $params['username'];
 	$vars['name'] = $_POST['d'];
 	$vars['name'] = $_POST['d'];
 	$vars['type'] = 'domain';
 	$vars['type'] = 'domain';
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->addDomain($vars);
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->addDomain($vars);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -608,7 +608,7 @@ function cwp7_addDomain($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_newSubdomain($params) {
+function siteBuilder_newSubdomain($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
@@ -616,7 +616,7 @@ function cwp7_newSubdomain($params) {
         'breadcrumb' => array(
         'breadcrumb' => array(
             'clientarea.php?action=productdetails&id=' . $params['serviceid'] . '&modop=custom&a=newSubdomain' => 'Neue Subdomain',
             'clientarea.php?action=productdetails&id=' . $params['serviceid'] . '&modop=custom&a=newSubdomain' => 'Neue Subdomain',
         ),
         ),
-		'templatefile' => 'cwp7_add_subdomain',
+		'templatefile' => 'siteBuilder_add_subdomain',
 		'vars' => array(
 		'vars' => array(
             'domainselected' => $_POST['d'],
             'domainselected' => $_POST['d'],
         ),
         ),
@@ -624,7 +624,7 @@ function cwp7_newSubdomain($params) {
 }
 }
 
 
 /**
 /**
- * Adds a new subdomain to domain of a CWP7 account.
+ * Adds a new subdomain to domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -632,7 +632,7 @@ function cwp7_newSubdomain($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_addSubdomain($params) {
+function siteBuilder_addSubdomain($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
@@ -642,14 +642,14 @@ function cwp7_addSubdomain($params) {
 	if($_POST['s'] == 'www') {
 	if($_POST['s'] == 'www') {
 		return 'Error: default Subdomain www wurde bereits automatisch erstellt' ;
 		return 'Error: default Subdomain www wurde bereits automatisch erstellt' ;
 	}
 	}
-	if(cwp7CheckLimit($params, 'subdomins')) {
+	if(siteBuilderCheckLimit($params, 'subdomins')) {
 		return 'Error: subdomain limit exceeded';
 		return 'Error: subdomain limit exceeded';
 	}
 	}
 	$vars['user'] = $params['username'];
 	$vars['user'] = $params['username'];
 	$vars['name'] = $_POST['s'] . '.' . $_POST['d'];
 	$vars['name'] = $_POST['s'] . '.' . $_POST['d'];
 	$vars['type'] = 'subdomain';
 	$vars['type'] = 'subdomain';
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->addDomain($vars);
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->addDomain($vars);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -657,7 +657,7 @@ function cwp7_addSubdomain($params) {
 }
 }
 
 
 /**
 /**
- * Opens a form to delete a domain from a CWP7 account.
+ * Opens a form to delete a domain from a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -665,9 +665,9 @@ function cwp7_addSubdomain($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_delDomainConfirm($params) {
+function siteBuilder_delDomainConfirm($params) {
 	return array(
 	return array(
-		'templatefile' => 'cwp7_del_domain_confirm',
+		'templatefile' => 'siteBuilder_del_domain_confirm',
 		'vars' => array(
 		'vars' => array(
 			'deldomain' => $_POST['d'],
 			'deldomain' => $_POST['d'],
 		),
 		),
@@ -675,7 +675,7 @@ function cwp7_delDomainConfirm($params) {
 }
 }
 
 
 /**
 /**
- * Removes a domain from a CWP7 account.
+ * Removes a domain from a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -683,15 +683,15 @@ function cwp7_delDomainConfirm($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_delDomain($params) {
+function siteBuilder_delDomain($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->getAccount($params['username']);
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->getAccount($params['username']);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		logModuleCall(
 		logModuleCall(
-			'cwp7',
+			'siteBuilder',
 			__FUNCTION__,
 			__FUNCTION__,
 			$params,
 			$params,
 			'debug',
 			'debug',
@@ -707,7 +707,7 @@ function cwp7_delDomain($params) {
 	}
 	}
 	if(!in_array($_POST['d'], $clientdomains)) {
 	if(!in_array($_POST['d'], $clientdomains)) {
 		logModuleCall(
 		logModuleCall(
-			'cwp7',
+			'siteBuilder',
 			__FUNCTION__,
 			__FUNCTION__,
 			$_POST,
 			$_POST,
 			'POST DATA VIOLATION',
 			'POST DATA VIOLATION',
@@ -719,7 +719,7 @@ function cwp7_delDomain($params) {
 	$vars['user'] = $params['username'];
 	$vars['user'] = $params['username'];
 	$vars['name'] = $_POST['d'];
 	$vars['name'] = $_POST['d'];
 	$vars['type'] = 'domain';
 	$vars['type'] = 'domain';
-	$response = $cwp7->deleteDomain($vars);
+	$response = $siteBuilder->deleteDomain($vars);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -727,7 +727,7 @@ function cwp7_delDomain($params) {
 }
 }
 
 
 /**
 /**
- * Opens a form to delete a subdomain from domain of a CWP7 account.
+ * Opens a form to delete a subdomain from domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -735,9 +735,9 @@ function cwp7_delDomain($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_delSubdomainConfirm($params) {
+function siteBuilder_delSubdomainConfirm($params) {
 	return array(
 	return array(
-		'templatefile' => 'cwp7_del_subdomain_confirm',
+		'templatefile' => 'siteBuilder_del_subdomain_confirm',
 		'vars' => array(
 		'vars' => array(
 			'delsubdomain' => $_POST['d'],
 			'delsubdomain' => $_POST['d'],
 		),
 		),
@@ -745,7 +745,7 @@ function cwp7_delSubdomainConfirm($params) {
 }
 }
 
 
 /**
 /**
- * Removes a subdomain from a domain of a CWP7 account.
+ * Removes a subdomain from a domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -753,15 +753,15 @@ function cwp7_delSubdomainConfirm($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_delSubdomain($params) {
+function siteBuilder_delSubdomain($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->getAccount($params['username']);
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->getAccount($params['username']);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		logModuleCall(
 		logModuleCall(
-			'cwp7',
+			'siteBuilder',
 			__FUNCTION__,
 			__FUNCTION__,
 			$params,
 			$params,
 			'debug',
 			'debug',
@@ -777,7 +777,7 @@ function cwp7_delSubdomain($params) {
 	}
 	}
 	if(!in_array($_POST['d'], $clientsubdomains)) {
 	if(!in_array($_POST['d'], $clientsubdomains)) {
 		logModuleCall(
 		logModuleCall(
-			'cwp7',
+			'siteBuilder',
 			__FUNCTION__,
 			__FUNCTION__,
 			$_POST,
 			$_POST,
 			'POST DATA VIOLATION',
 			'POST DATA VIOLATION',
@@ -789,7 +789,7 @@ function cwp7_delSubdomain($params) {
 	$vars['user'] = $params['username'];
 	$vars['user'] = $params['username'];
 	$vars['name'] = $_POST['d'];
 	$vars['name'] = $_POST['d'];
 	$vars['type'] = 'subdomain';
 	$vars['type'] = 'subdomain';
-	$response = $cwp7->deleteDomain($vars);
+	$response = $siteBuilder->deleteDomain($vars);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -797,7 +797,7 @@ function cwp7_delSubdomain($params) {
 }
 }
 
 
 /**
 /**
- * Opens a form to enable SSL for a subdomain or domain of a CWP7 account.
+ * Opens a form to enable SSL for a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -805,9 +805,9 @@ function cwp7_delSubdomain($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_enableSSLConfirm($params) {
+function siteBuilder_enableSSLConfirm($params) {
 	return array(
 	return array(
-		'templatefile' => 'cwp7_enable_SSL_confirm',
+		'templatefile' => 'siteBuilder_enable_SSL_confirm',
 		'vars' => array(
 		'vars' => array(
 			'SSLdomain' => $_POST['d'],
 			'SSLdomain' => $_POST['d'],
 		),
 		),
@@ -815,7 +815,7 @@ function cwp7_enableSSLConfirm($params) {
 }
 }
 
 
 /**
 /**
- * Aktivate CWP7 AutoSSL for a subdomain or domain of a CWP7 account.
+ * Aktivate siteBuilder AutoSSL for a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -823,14 +823,14 @@ function cwp7_enableSSLConfirm($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_enableSSL($params) {
+function siteBuilder_enableSSL($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
 	$vars['user'] = $params['username'];
 	$vars['user'] = $params['username'];
 	$vars['name'] = $_POST['d'];
 	$vars['name'] = $_POST['d'];
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->addAutoSSL($vars);
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->addAutoSSL($vars);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -838,7 +838,7 @@ function cwp7_enableSSL($params) {
 }
 }
 
 
 /**
 /**
- * Opens a form to renew a SSL certificate for a subdomain or domain of a CWP7 account.
+ * Opens a form to renew a SSL certificate for a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -846,9 +846,9 @@ function cwp7_enableSSL($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_renewSSLConfirm($params) {
+function siteBuilder_renewSSLConfirm($params) {
 	return array(
 	return array(
-		'templatefile' => 'cwp7_renew_SSL_confirm',
+		'templatefile' => 'siteBuilder_renew_SSL_confirm',
 		'vars' => array(
 		'vars' => array(
 			'SSLdomain' => $_POST['d'],
 			'SSLdomain' => $_POST['d'],
 		),
 		),
@@ -856,7 +856,7 @@ function cwp7_renewSSLConfirm($params) {
 }
 }
 
 
 /**
 /**
- * Renews a SSL certificate for a subdomain or domain of a CWP7 account.
+ * Renews a SSL certificate for a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -864,14 +864,14 @@ function cwp7_renewSSLConfirm($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_renewSSL($params) {
+function siteBuilder_renewSSL($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
 	$vars['user'] = $params['username'];
 	$vars['user'] = $params['username'];
 	$vars['name'] = $_POST['d'];
 	$vars['name'] = $_POST['d'];
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->updateAutoSSL($vars);
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->updateAutoSSL($vars);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['error_msg'];
 		return 'Error: ' . $response['error_msg'];
 	}
 	}
@@ -879,7 +879,7 @@ function cwp7_renewSSL($params) {
 }
 }
 
 
 /**
 /**
- * Opens a form to set a DNS record for a subdomain or domain of a CWP7 account.
+ * Opens a form to set a DNS record for a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -887,10 +887,10 @@ function cwp7_renewSSL($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_setDNSConfirm($params) {
+function siteBuilder_setDNSConfirm($params) {
 	if(isset($_POST['s'])){
 	if(isset($_POST['s'])){
 		return array(
 		return array(
-			'templatefile' => 'cwp7_set_DNS_confirm',
+			'templatefile' => 'siteBuilder_set_DNS_confirm',
 			'vars' => array(
 			'vars' => array(
 				'DNSdomain' => $_POST['d'],
 				'DNSdomain' => $_POST['d'],
 				'DNSsubdomain' => $_POST['s'],
 				'DNSsubdomain' => $_POST['s'],
@@ -898,7 +898,7 @@ function cwp7_setDNSConfirm($params) {
 		);
 		);
 	}
 	}
 	return array(
 	return array(
-		'templatefile' => 'cwp7_set_DNS_confirm',
+		'templatefile' => 'siteBuilder_set_DNS_confirm',
 		'vars' => array(
 		'vars' => array(
 			'DNSdomain' => $_POST['d'],
 			'DNSdomain' => $_POST['d'],
 		),
 		),
@@ -906,7 +906,7 @@ function cwp7_setDNSConfirm($params) {
 }
 }
 
 
 /**
 /**
- * Opens a form to unsset a DNS record for a subdomain or domain of a CWP7 account.
+ * Opens a form to unsset a DNS record for a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -914,10 +914,10 @@ function cwp7_setDNSConfirm($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_unsetDNSConfirm($params) {
+function siteBuilder_unsetDNSConfirm($params) {
 	if(isset($_POST['s'])){
 	if(isset($_POST['s'])){
 		return array(
 		return array(
-			'templatefile' => 'cwp7_unset_DNS_confirm',
+			'templatefile' => 'siteBuilder_unset_DNS_confirm',
 			'vars' => array(
 			'vars' => array(
 				'DNSdomain' => $_POST['d'],
 				'DNSdomain' => $_POST['d'],
 				'DNSsubdomain' => $_POST['s'],
 				'DNSsubdomain' => $_POST['s'],
@@ -925,7 +925,7 @@ function cwp7_unsetDNSConfirm($params) {
 		);
 		);
 	}
 	}
 	return array(
 	return array(
-		'templatefile' => 'cwp7_unset_DNS_confirm',
+		'templatefile' => 'siteBuilder_unset_DNS_confirm',
 		'vars' => array(
 		'vars' => array(
 			'DNSdomain' => $_POST['d'],
 			'DNSdomain' => $_POST['d'],
 		),
 		),
@@ -933,7 +933,7 @@ function cwp7_unsetDNSConfirm($params) {
 }
 }
 
 
 /**
 /**
- * Update a DNS zone for a domain setting a new record for a domain or subdomain of a CWP7 account.
+ * Update a DNS zone for a domain setting a new record for a domain or subdomain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -941,7 +941,7 @@ function cwp7_unsetDNSConfirm($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_setDNS($params) {
+function siteBuilder_setDNS($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
@@ -1015,7 +1015,7 @@ function cwp7_setDNS($params) {
 }
 }
 
 
 /**
 /**
- * Removing a DNS record for a domain or subdomain of a CWP7 account.
+ * Removing a DNS record for a domain or subdomain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -1023,7 +1023,7 @@ function cwp7_setDNS($params) {
  *
  *
  * @return string "success" or an error message
  * @return string "success" or an error message
  */
  */
-function cwp7_unsetDNS($params) {
+function siteBuilder_unsetDNS($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
@@ -1067,7 +1067,7 @@ function cwp7_unsetDNS($params) {
 }
 }
 
 
 /**
 /**
- * Opens a form to inform about the DNS status of a subdomain or domain of a CWP7 account.
+ * Opens a form to inform about the DNS status of a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -1075,22 +1075,22 @@ function cwp7_unsetDNS($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_infoDNS($params) {
+function siteBuilder_infoDNS($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
-	$cwp7nameserver = cwp7CheckSOA($_POST['d'],$params['configoption5']);
+	$siteBuildernameserver = siteBuilderCheckSOA($_POST['d'],$params['configoption5']);
 	return array(
 	return array(
-        'templatefile' => 'cwp7_help_dns',
+        'templatefile' => 'siteBuilder_help_dns',
         'vars' => array(
         'vars' => array(
             'infodomain' => $_POST['d'],
             'infodomain' => $_POST['d'],
-            'cwp7nameserver' => $cwp7nameserver,
+            'siteBuildernameserver' => $siteBuildernameserver,
         ),
         ),
     );
     );
 }
 }
 
 
 /**
 /**
- * Opens a form to inform about the SSL status of a subdomain or domain of a CWP7 account.
+ * Opens a form to inform about the SSL status of a subdomain or domain of a siteBuilder account.
  *
  *
  * @param array $params common module parameters
  * @param array $params common module parameters
  *
  *
@@ -1098,12 +1098,12 @@ function cwp7_infoDNS($params) {
  *
  *
  * @return array template information
  * @return array template information
  */
  */
-function cwp7_infoSSL($params) {
+function siteBuilder_infoSSL($params) {
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
 	return array(
 	return array(
-        'templatefile' => 'cwp7_help_ssl',
+        'templatefile' => 'siteBuilder_help_ssl',
         'vars' => array(
         'vars' => array(
             'infodomain' => $_POST['d'],
             'infodomain' => $_POST['d'],
         ),
         ),
@@ -1114,7 +1114,7 @@ function cwp7_infoSSL($params) {
  * Ask nameservers for a IP adress of a given host.
  * Ask nameservers for a IP adress of a given host.
  *
  *
  * @param string $host hostname
  * @param string $host hostname
- * @param string $serverIP CWP7 server IP
+ * @param string $serverIP siteBuilder server IP
  * @param string $nameserverIP polled name server IP
  * @param string $nameserverIP polled name server IP
  * @param int $recurse optional -> used to follow CNAME responses
  * @param int $recurse optional -> used to follow CNAME responses
  *
  *
@@ -1122,7 +1122,7 @@ function cwp7_infoSSL($params) {
  *
  *
  * @return bool
  * @return bool
  */
  */
-function cwp7CheckA($host, $serverIP, $nameserverIP, $recurse = 0) {
+function siteBuilderCheckA($host, $serverIP, $nameserverIP, $recurse = 0) {
 	if($recurse > 3) {
 	if($recurse > 3) {
 		return false;
 		return false;
 	}
 	}
@@ -1138,7 +1138,7 @@ function cwp7CheckA($host, $serverIP, $nameserverIP, $recurse = 0) {
             $result = $resolver->query($host, 'A');
             $result = $resolver->query($host, 'A');
         } catch(Net_DNS2_Exception $e) {
         } catch(Net_DNS2_Exception $e) {
 			logModuleCall(
 			logModuleCall(
-				'cwp7',
+				'siteBuilder',
 				__FUNCTION__,
 				__FUNCTION__,
 				$e,
 				$e,
 				'DNS lookup exception',
 				'DNS lookup exception',
@@ -1149,7 +1149,7 @@ function cwp7CheckA($host, $serverIP, $nameserverIP, $recurse = 0) {
     }
     }
 	$hostA = $result->answer;
 	$hostA = $result->answer;
 	if($hostA[0]->type == 'CNAME') {
 	if($hostA[0]->type == 'CNAME') {
-		if(cwp7CheckA($hostA[0]->cname, $serverIP, $nameserverIP, $recurse++)) {
+		if(siteBuilderCheckA($hostA[0]->cname, $serverIP, $nameserverIP, $recurse++)) {
 			return true;
 			return true;
 		}
 		}
 	}
 	}
@@ -1172,7 +1172,7 @@ function cwp7CheckA($host, $serverIP, $nameserverIP, $recurse = 0) {
  *
  *
  * @return string 'none' -> not registered, 'self' -> registered at own or the name of an other responsible nameserver
  * @return string 'none' -> not registered, 'self' -> registered at own or the name of an other responsible nameserver
  */
  */
-function cwp7CheckSOA($domain, $nameserverIP) {
+function siteBuilderCheckSOA($domain, $nameserverIP) {
 	$nameserver = array($nameserverIP);
 	$nameserver = array($nameserverIP);
     # try NS1
     # try NS1
 	$resolver = new Net_DNS2_Resolver(array('nameservers' => $nameserver));
 	$resolver = new Net_DNS2_Resolver(array('nameservers' => $nameserver));
@@ -1201,9 +1201,9 @@ function cwp7CheckSOA($domain, $nameserverIP) {
  *
  *
  * @return bool true -> limit reached, false -> limit not reached
  * @return bool true -> limit reached, false -> limit not reached
  */
  */
-function cwp7CheckLimit($params, $type) {
-	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
-	$response = $cwp7->getQuota($params['username']);
+function siteBuilderCheckLimit($params, $type) {
+	$siteBuilder = new siteBuilder_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $siteBuilder->getQuota($params['username']);
 	if($response[$type]['sw'] < 1) {
 	if($response[$type]['sw'] < 1) {
 		return true;
 		return true;
 	}
 	}

+ 0 - 0
TDHosting_add_domain.tpl → siteBuilder_add_domain.tpl


+ 0 - 0
TDHosting_add_subdomain.tpl → siteBuilder_add_subdomain.tpl


+ 0 - 0
TDHosting_del_domain_confirm.tpl → siteBuilder_del_domain_confirm.tpl


+ 0 - 0
TDHosting_del_subdomain_confirm.tpl → siteBuilder_del_subdomain_confirm.tpl


+ 0 - 0
TDHosting_enable_SSL_confirm.tpl → siteBuilder_enable_SSL_confirm.tpl


+ 0 - 0
TDHosting_help_dns.tpl → siteBuilder_help_dns.tpl


+ 0 - 0
TDHosting_help_ssl.tpl → siteBuilder_help_ssl.tpl


+ 0 - 0
TDHosting_renew_SSL_confirm.tpl → siteBuilder_renew_SSL_confirm.tpl


+ 0 - 0
TDHosting_set_DNS_confirm.tpl → siteBuilder_set_DNS_confirm.tpl


+ 0 - 0
TDHosting_unset_DNS_confirm.tpl → siteBuilder_unset_DNS_confirm.tpl


+ 4 - 4
whmcs.json

@@ -1,14 +1,14 @@
 {
 {
   "schema": "1.0",
   "schema": "1.0",
   "type": "whmcs-provisioning",
   "type": "whmcs-provisioning",
-  "name": "TDHosting",
+  "name": "siteBuilder",
   "license": "GPL",
   "license": "GPL",
   "category": "provisioning",
   "category": "provisioning",
   "description": {
   "description": {
-    "name": "TDHosting",
+    "name": "siteBuilder",
     "tagline": "Webhosting Provisioning Module for WHMCS.",
     "tagline": "Webhosting Provisioning Module for WHMCS.",
-    "short": "TDHosting users can be easily provoked with this module. The customer can also reset his password.",
-    "long": "The module allows single-user provisioning of TDHosting accounts. It implements a simple hosting."
+    "short": "siteBuilder users can be easily provoked with this module. The customer can also reset his password.",
+    "long": "The module allows single-user provisioning of siteBuilder accounts. It implements a simple hosting."
   },
   },
   "logo": {
   "logo": {
     "filename": "logo.png"
     "filename": "logo.png"