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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/usr/local/softaculous/sdk/
Upload File :
Current File : //usr/local/softaculous/sdk/webuzo_sdk.php
<?php

// --------------------------------------------------------------------------------
// Webuzo - Softaculous Development Kit
// --------------------------------------------------------------------------------
// // http://www.webuzo.com
// --------------------------------------------------------------------------------
//
// Description :
//   Webuzo_API is a Class of Webuzo that allows users to perform action on all of the features 
//   provided by Webuzo like managing FTP, Certificates, Domains, MX records, Email accounts,
//   Forwarders, Zoner files, SSH, IP Block, Installing Tomcat/Rockmongo/AWStats in addition to
//   installing, upgrading, removing, backing up & restoring the installations made on the
//   server.
//
////////////////////////////////////////////////////////////////////////////////////
	
if(!defined('SOFTACULOUS')){	
	define('SOFTACULOUS', 1);
}

	
if(!defined('WEBUZO')){	
	define('WEBUZO', 1);
}

include_once(dirname(__FILE__).'/sdk.php');

///////////////////////////////
///////// Webuzo API //////////
///////////////////////////////	

class Webuzo_API extends Softaculous_API{	

	// The Login URL
	var $login = '';
	
	var $debug = 0;
	
	var $error = array();

	// THE POST DATA
	var $data = array();
	
	var $apps = array(); // List of Apps
	
	var $installed_apps = array(); // List of Installed Apps
	
	/**
	 * Initalize API login
	 *
	 * @category	 Login  
	 * @param        string $user The username to LOGIN
	 * @param        string $pass The password
	 * @param        string $host The host to perform actions
	 * @return       void
	 */
	function __construct($user = '', $pass = '', $host = ''){
		
		$this->login = 'https://'.$user.':'.$pass.'@'.$host.':2003/index.php';
	
	}
	
	
	/**
	 * Configure webuzo
	 *
	 * @category	 Configure 
	 * @param        string $ip The IP Address on configure webuzo
	 * @param        string $user The username for webuzo
	 * @param        string $email The email for webuzo
	 * @param        string $pass The password
	 * @param        string $host The Primary domain
	 * @param        string $ns1 The nameserver
	 * @param        string $ns2 The nameserver
     * @param        string $license The License Key
	 * @return       void
	 */
	function webuzo_configure($ip, $user, $email, $pass, $host, $ns1 = '', $ns2 ='', $license = '', $data = array()){		

		$data['uname'] = $user;
		$data['email'] = $email;
		$data['pass'] = $pass;
		$data['rpass'] = $pass;
		$data['domain'] = $host;
		$data['ns1'] = $ns1;
		$data['ns2'] = $ns2;
		$data['lic'] = $license;
		$data['submit'] = 1;
		$data['api'] = 1;
		
		$this->login = 'http://'.$ip.':2004/install.php?';
		$return = $this->curl($this->login, $data);
		$this->chk_error();
		return $return;
		
	}
	
	/**
	 * A Function that will INSTALL apps. If the DATA is empty script information is retured
	 *
	 * @package		API 
	 * @author		Jigar Dhulla
	 * @param		int $sid Script ID
	 * @param		array $data DATA to POST
	 * @return		string $resp Response of Action. Default: Serialize
	 * @since		4.1.3
	 */	
	function install_app($appid){
	
		// Get the Scripts List
		$this->list_apps();
		
		// Script present ?
		if(empty($this->apps[$appid])){
			$this->error[] = 'App Not Found';
			return false;
		}
		
		$act = 'act=apps&app='.$appid.'&install=1';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
		
	/**
	 * List Services
	 *
	 * @category	 Database
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function list_services(){
		
		$act = 'act=services';
		
		$resp = trim($this->curl_call($act));
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * A Function that will REMOVE apps. If the DATA is empty script information is retured
	 *
	 * @package		API 
	 * @author		Jigar Dhulla
	 * @param		int $sid Script ID
	 * @param		array $data DATA to POST
	 * @return		string $resp Response of Action. Default: Serialize
	 * @since		4.1.3
	 */	
	function remove_app($appid){
	
		// Get the Scripts List
		$iapps = $this->list_installed_apps();
		
		// Script present ?
		if(empty($iapps[$appid])){
			$this->error[] = 'App Not Found';
			return false;
		}
		
		$act = 'act=apps&app='.$appid.'&remove=1';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * A Function that will list scripts
	 *
	 * @package		API 
	 * @author		Jigar Dhulla
	 * @return		array $scripts List of Softaculous Scripts
	 * @since		4.1.3
	 */	
	function list_apps(){
		
		if(!empty($this->apps)){
			return true;
		}
		
		// Get response from the server.
		$data = $this->curl_unserialize('');
		
		$this->apps = $data['apps'];
		
		if(empty($this->apps)){
			$this->error[] = 'Apps were not loaded.';
			return false;
		}else{
			return true;
		}
		
	}
	
	/**
	 * A Function that will list installed scripts
	 *
	 * @package		API 
	 * @author		Jigar Dhulla
	 * @return		array $scripts List of Installed Softaculous Scripts
	 * @since		4.1.3
	 */	
	function list_installed_apps(){
		
		if(!empty($this->installed_apps)){
			return $this->installed_apps;
		}
		
		// Get response from the server.
		$resp = $this->curl_unserialize('act=apps_installations');
		
		$this->installed_apps = $resp['apps_ins'];
		
		return $resp['apps_ins'];
		
	}
	
	///////////////////////////////////////////////////////////////////////////////
	//							CATEGORY : FEATURES								 //
	///////////////////////////////////////////////////////////////////////////////
	
	/**
	 * Check login error
	 *
	 * @category	 error
	 * @return       array
	 */
	function chk_error(){
		if(!empty($this->error)){
			return $this->r_print($this->error[0]);
		}		
	}
	
	/**
	 * List Domains
	 *
	 * @category	 Domain
	 * @return		string $resp Response of Action. Default: Serialize
	 */
	function list_domains(){
		$act = 'act=domainmanage';
		$resp = $this->curl_call($act);
		$this->chk_error();		
		return trim($resp);
	}
	
	/**
	 * Add Domain
	 *
	 * @category	 Domain
	 * @param        string $domain The domain to add
	 * @param		 (Optional) string $domainpath The path for an ADD-ON domain
	 * @param		 (Optional) string $ip Different IP Address for domain
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function add_domain($domain, $domainpath = '', $ip = ''){
		
		// The act
		$act = 'act=domainadd';

		$data['domain'] = $domain;
		$data['domainpath'] = $domainpath;
		$data['isaddon'] = !empty($domainpath);
		$data['ip'] = !empty($ip);

		$data['submitdomain'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
	}
	
	/**
	 * Delete Domain
	 *
	 * @category	 Domain
	 * @param        string $domain The domain to delete
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function delete_domain($domain){
		
		// The act
		$act = 'act=domainmanage';	
		
		$data['delete_domain_name'] = $domain;

		$data['delete_domain_id'] = 1;
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
	}
	
	/**
	 * Change ROOT/Endusers's Password
	 *
	 * @category	 Password
	 * @param        string $pass The NEW password for the USER
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function change_password($pass, $user = ''){
		
		// The act
		$act = 'act=changepassword';
		if(!empty($user)){
			$data['user'] = $user;
		}
		$data['newpass'] = $data['conf'] = $pass;
		$data['changepass'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
	}
	
	/**
	 * Change File Manager Password
	 *
	 * @category	 Password
	 * @param        string $pass The NEW password for the File manager
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function change_fileman_pwd($pass){
		
		// The act
		$act = 'act=changepassword';	
		$data['filepass'] = $pass;
		$data['changefilepass'] = 1;
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
	}
	
	/**
	 * Change Apache Tomcat Manager's Password
	 *
	 * @category	 Password
	 * @param        string $pass The NEW password for the Apache Tomcat
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function change_tomcat_pwd($pass){
		
		// The act
		$act = 'act=changepassword';
		$data['tomcatpass'] = $pass;
		$data['changetomcatpass'] = 1;
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
	}
	
	/**
	 * List FTP users
	 *
	 * @category	 FTP
	 * @return       array
	 */
	function list_ftpuser(){
		$act = 'act=ftp';
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;		
	}
	
	/**
	 * Add FTP user
	 *
	 * @category	 FTP
	 * @param        string $user The FTP username
	 * @param        string $pass The password for the FTP user
	 * @param        string $directory The Directory path for the FTP users relative to /HOME/USER
	 * @param        string $quota_limit (Optional) Define a quota for the user
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function add_ftpuser($user, $pass, $directory, $quota_limit = ''){
		
		$act = 'act=ftp_account';
		
		$data['login'] = $user;
		$data['newpass'] = $data['conf'] = $pass;
		$data['dir'] = $directory;
		if(!empty($quota_limit)){
			$data['quota'] = 'limited';
			$data['quota_limit'] = $quota_limit;
		}else{
			$data['quota'] = 'unlimited';
		}
		$data['create_acc'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Edit FTP user
	 *
	 * @category	 FTP
	 * @param        string $user FTP user to EDIT data
	 * @param        string $quota_limit (Optional) Specify quota limit to the user
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function edit_ftpuser($user, $quota_limit = ''){
		
		$act = 'act=ftp';
		
		$data['edit_ftp_user'] = $user;
		if(!empty($quota_limit)){
			$data['quota'] = 'limited';
			$data['quota_limit'] = $quota_limit;
		}else{
			$data['quota'] = 'unlimited';
		}
		$data['edit_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Change FTP User's Password
	 *
	 * @category	 FTP
	 * @param        string $user FTP user to change Password
	 * @param        string $pass New password for the FTP user
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function change_ftpuser_pass($user, $pass){
		
		$act = 'act=editftp';
		
		$data['edit_ftp_user_pass'] = $user;
		$data['newpass'] = $data['conf'] = $pass;
		$data['changepass'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete FTP user
	 *
	 * @category	 FTP
	 * @param        string $user FTP user to delete
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function delete_ftpuser($user){
		
		$act = 'act=ftp';
		
		$data['delete_ftp_user'] = $user;
		$data['delete_fuser_id'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List FTP Connections
	 *
	 * @category	 FTP
	 * @return       array
	 */
	function list_ftp_connections(){
		
		$act = 'act=ftp_connections';
		
		$resp = $this->curl_call($act);
		
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete FTP Connection
	 *
	 * @category	 FTP
	 * @param        string		$ftp_connection_id	FTP Connection Process ID
	 * @return		 string		$resp				Response of Action. Default: Serialize
	 */
	function delete_ftp_connection($ftp_connection_id){
		
		$act = 'act=ftp_connections';
		
		$data['ftp_connection_pid'] = $ftp_connection_id;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	///////////////////////////////////////////////////////////////////////////////
	//							CATEGORY : DATABASE								 //
	///////////////////////////////////////////////////////////////////////////////
		
	/**
	 * List Database with its size and users
	 *
	 * @category	 Database
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function list_database(){
		
		$act = 'act=dbmanage';
		
		$resp = trim($this->curl_call($act));
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Add Database
	 *
	 * @category	 database
	 * @param        string $db_name Database name to create
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function add_database($db_name){
		
		$act = 'act=dbmanage';
		
		$data['db'] = $db_name;
		$data['submitdb'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	/**
	 * Delete Database
	 *
	 * @category	 database
	 * @param        string $db_name Database name to delete
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function delete_database($db_name){
		
		$act = 'act=dbmanage';
		
		$data['delete_db'] = $data['db'] = $db_name;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List Database Users
	 *
	 * @category	 Database
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function list_db_user(){
		
		$act = 'act=dbmanage';
		
		$resp = trim($this->curl_call($act));
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Add Database User
	 *
	 * @category	 database
	 * @param        string $db_user Database username to ADD
	 * @param        string $pass Password for the database user
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function add_db_user($db_user, $pass){
		
		$act = 'act=dbmanage';
		
		$data['dbuser'] = $db_user;
		$data['dbpassword'] = $pass;
		$data['submituserdb'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	/**
	 * Delete Database user
	 *
	 * @category	 database
	 * @param        string $db_user Database user to delete
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function delete_db_user($db_user){
		
		$act = 'act=dbmanage';
		
		$data['delete_dbuser'] = $db_user;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	/**
	 * Set Privileges for a User to a specific database
	 *
	 * @category	 database
	 * @param        string $database Database name to ADD privileges
	 * @param        string $db_user Database users name to ADD privileges
	 * @param        string $host Database host
	 * @param        string $prilist Set of privileges to be given to the User
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function set_privileges($database, $db_user, $host, $prilist){
		
		$act = 'act=dbmanage';
		
		$data['dbname'] = $database;
		$data['dbuser'] = $db_user;
		$data['host'] = $host;
		$data['prilist'] = $prilist;
		$data['submitpri'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	//////////////////////////////////////////////////////////////////////////////
	//					   CATEGORY : Advance Settings							//
	//////////////////////////////////////////////////////////////////////////////
	
	/**
	 * Edit settings
	 *
	 * @category	 Advance settings
	 * @param        string $email Specify email address to SET
	 * @param        int $ins_email (Optional) Set 1 to receive installation emails, otherwise 0
	 * @param        int $rem_email (Optional) Set 1 to receive installations removal email,
	 				 otherwise 0
	 * @param        int $edit_email (Optional) Set 1 to receive installations editting email,
	 				 otherwise 0
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function edit_settings($email, $ins_email = '', $rem_email = '', $edit_email = '' ){
		
		$act = 'act=email';
		
		$data['email'] = $email;
		$data['ins_email'] = empty($ins_email);
		$data['rem_email'] = empty($rem_email);
		$data['editdetail_email'] = empty($edit_email);
		$data['editemailsettings'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Manage Services
	 *
	 * @category	 Advanced Settings
	 * @param        string $service_name Specify the service to restart
	 				 E.g exim, dovecot, tomcat, httpd, named, pure-ftpd, mysqld
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function manage_service($service_name, $action = 'restart'){
		
		$act = 'act=services';
		
		$data['service_name'] = $service_name;
		$data['action'] = $action;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Enable/Disable suPHP
	 *
	 * @category	 Security
	 * @param        string $action Specify on/off to START/STOP suPHP respectively
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function manage_suphp($action){
		
		$act = 'act=apache_settings';
		
		if($action != 'off'){
			$data['suphpon'] = 1;
		}else{
			$data['suphpon'] = NULL;
		}
		$data['editapachesettings'] = 1;
		
		$resp = $this->curl_call($act, $data);		
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Enable NGINX Proxy
	 *
	 * @category	 SystemApps
	 * @param        Integer $port Port for Proxy Server
	 * @param        Integer $htaccess  - 0 to enable .htaccess
	 *									- 1 to disable .htaccess
	 * @param        String $proxy_server - Either "httpd" or "httpd2"
	 * @return		 array $resp 
	 */
	function enable_proxy($port, $htaccess, $proxy_server){
		
		$act = 'act=apache_settings';
		
		$data['port'] = $port;
		$data['ht_check'] = $htaccess;
		$data['webserver'] = $proxy_server;
		$data['enable_proxy'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Disable NGINX Proxy
	 *
	 * @category	 SystemApps
	 * @param        String $proxy_server - Default Webserver to be set - "httpd,httpd2,nginx,lighttpd"
	 * @return		 array $resp 
	 */
	function disable_proxy($set_default_webserver){
		
		$act = 'act=apache_settings';
		
		$data['webserver'] = $set_default_webserver;
		$data['disable_proxy'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	//////////////////////////////////////////////////////////////////////////////
	//					   CATEGORY : Server Settings							//
	//////////////////////////////////////////////////////////////////////////////		
	
	/**
	 * List DNS Record
	 *
	 * @category	 Server Settings
	 * @param        string $domain Specify domain to list DNS records
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function list_dns_record($domain){
		
		$act = 'act=advancedns';
		
		$data['domain'] = $domain;

		$resp =$this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Add DNS Record
	 *
	 * @category	 Server Settings
	 * @param        string $domain Specify domain to ADD DNS record
	 * @param        string $name Specify record name
	 * @param        string $ttl Specify TTL
	 * @param        string $type Specify TYPE of record
	 * @param        string $address Specify destination address
	 * @return		 string $resp Response of Action. Default: Serialize
	 */
	function add_dns_record($domain, $name, $ttl, $type, $address){
		
		$act = 'act=advancedns';
				
		$data['selectdomain'] = $domain;
		$data['name'] = $name;
		$data['ttl'] =  $ttl;
		$data['selecttype'] = $type;
		$data['address'] = $address;
		$data['create_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Edit DNS Record
	 *
	 * @category	 Server Settings
	 * @param        string $id Specify ID of record to EDIT
	 * @param        string $domain Specify domain to ADD DNS record
	 * @param        string $name Specify record name
	 * @param        string $ttl Specify TTL
	 * @param        string $type Specify TYPE of record
	 * @param        string $address Specify destination address
	 * @return		 string $resp Response of Action. Default: Serialize
	 * @return       array
	 */
	function edit_dns_record($id, $domain, $name, $ttl, $type, $address){
		
		$act = 'act=advancedns';
		
		$data['edit_record'] = $id;
		$data['domain_name'] = $domain;
		$data['name'] = $name;
		$data['ttl'] = $ttl;
		$data['type'] = $type;
		$data['record'] = $address;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete DNS Record
	 *
	 * @category	 Server Settings
	 * @param        string $id ID of Dns record for delete
	 * @param        string $domain Domain for the DNS record for delete
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_dns_record($id, $domain){
		
		$act = 'act=advancedns';
		
		$data['delete_record'] = $id;	// Specify record to be DELETED
		$data['domain_name'] = $domain;	// Specify the DOMAIN
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List CRON
	 *
	 * @category	 Server Settings
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function list_cron(){
		
		$act = 'act=cronjob';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Add a CRON
	 *
	 * @category	 Server Settings
     * @param        string $minute Minute of the cron part
     * @param        string $hour Hour of the cron part
     * @param        string $day Day of the cron part
	 * @param        string $month Month of the cron part
	 * @param        string $weekday Weekend of the cron part
	 * @param        string $cmd Command of the cron part
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function add_cron($minute, $hour, $day, $month, $weekday, $cmd){
		
		$act = 'act=cronjob';
		
		$data['minute'] = $minute;	// Specify minutes
		$data['hour'] = $hour;		// Specify hour
		$data['day'] = $day;		// Specify day
		$data['month'] = $month;	// Specify month
		$data['weekday'] = $weekday;// Specify weekday
		$data['cmd'] = $cmd;		// Specify command
		$data['create_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Edit CRON
	 *
	 * @category	 Server Settings
	 * @param        string $id ID of the cron record. Get from the list of cron
     * @param        string $minute Minute of the cron part
     * @param        string $hour Hour of the cron part
     * @param        string $day Day of the cron part
	 * @param        string $month Month of the cron part
	 * @param        string $weekday Weekend of the cron part
	 * @param        string $cmd Command of the cron part
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function edit_cron($id, $minute, $hour, $day, $month, $weekday, $cmd){
		
		$act = 'act=cronjob';
		
		$data['minute'] = $minute;	// Specify minutes
		$data['hour'] = $hour;		// Specify hour
		$data['day'] = $day;		// Specify day
		$data['month'] = $month;	// Specify month
		$data['weekday'] = $weekday;// Specify weekday
		$data['cmd'] = $cmd;		// Specify command
		$data['edit_record'] = 'c'. $id;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	/**
	 * Delete CRON
	 *
	 * @category	 Server Settings
	 * @param        string $id ID of the cron record. Get from the list of cron
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_cron($id){
		
		$act = 'act=cronjob';
		
		$data['delete_record'] = 'c'. $id;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	//////////////////////////////////////////////////////////////////////////
	//					   		CATEGORY : Security							//
	//////////////////////////////////////////////////////////////////////////
	
	/**
	 * List SSL Key
	 *
	 * @category	 Security
	  * @return		string $resp Response of Actions. Default: Serialize
	 */
	function list_ssl_key(){
		
		$act = 'act=sslkey';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Create SSL Key
	 *
	 * @category	 Security
	 * @param        string $description Domain name or any name for the SSL Key
	 * @param        string $keysize Size of the SSl Key
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function create_ssl_key($description, $keysize = ''){
		
		$act = 'act=sslkey';
		
		$data['selectdom'] = $description;	// Specify DOMAIN
		$data['keysize'] = (empty($keysize) ? '1024' : $keysize);	// Specify Key size
		$data['create_key'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Upload SSL Key
	 *
	 * @category	 Security
	 * @param        string $description Domain name or any name for the SSL Key
	 * @param        string $keypaste Entire SSL Key
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function upload_ssl_key($description, $keypaste){
		
		$act = 'act=sslkey';
		
		$data['selectdom'] = $description;	// Specify DOMAIN
		$data['kpaste'] = $keypaste;		// Specify KEY contents
		$data['install_key'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Detail SSL Key
	 *
	 * @category	 Security
	 * @param        string $domain Specify domain name to detail view of SSL Key
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function detail_ssl_key($domain){
		
		$act = 'act=sslkey';
		
		$data['detail_record'] = $domain;		// Specify DOMAIN
		
	    $resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete SSL Key
	 *
	 * @category	 Security
	 * @param        string $domain Specify domain name to delete SSL Key
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_ssl_key($domain){
		
		$act = 'act=sslkey';
		
		$data['delete_record'] = $domain;		// Specify DOMAIN
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List SSL CSR
	 *
	 * @category	 Security	 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function list_ssl_csr(){
		
		$act = 'act=sslcsr';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Create SSL CSR
	 *
	 * @category	 Security
	 * @param        string $domain Domain name for the CSR
	 * @param        string $country_code Two latter Country Code
	 * @param        string $state Name of the State
	 * @param        string $locality Name of the Location
	 * @param        string $org Name of the Organitaion
	 * @param        string $org_unit Name of the Organitaion unit
	 * @param        string $passphrase Password prase
	 * @param        string $email Email address
	 * @param        string $key KEY use for creating new csr. if you want to generate new key then pass "newkey" as argument. 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function create_ssl_csr($domain, $country_code, $state, $locality, $org, $org_unit,  $passphrase, $email, $key){
		
		$act = 'act=sslcsr';
		
		$data['domain'] = $domain;	// Specify DOMAIN - Note : Domain should have a Private KEY
		$data['country'] = $country_code;	// Specify Country Code
		$data['state'] = $state;			// Specify State
		$data['locality'] = $locality;		// Specify Locality
		$data['organisation'] = $org;		// Specify Organization
		$data['orgunit'] = $org_unit;		// Specify Organization Unit
		$data['pass'] = $passphrase;		// Specify PASSPHRASE
		$data['email'] = $email;			// Specify Email
		$data['selectkey'] = $key;		    // Specify key. if you want to generate new key then pass "newkey" as argument.
		$data['createcsr'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Detail SSL CSR
	 *
	 * @category	 Security
	 * @param        string $domain Specify domain name to detail view of SSL CSR
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function detail_ssl_csr($domain){
		
		$act = 'act=sslcsr';
		
		$data['detail_record'] = $domain;	// Specify DOMAIN
		
	    $resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete SSL CSR
	 *
	 * @category	 Security
	 * @param        string $domain Specify domain name to delete SSL CSR
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_ssl_csr($domain){
		
		$act = 'act=sslcsr';
		
		$data['delete_record'] = $domain;	// Specify DOMAIN
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List SSL Certificate
	 *
	 * @category	 Security
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function list_ssl_crt(){
		
		$act = 'act=sslcrt';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Create SSL Certificate
	 *
	 * @category	 Security
	 * @param        string $domain Domain for the Certificate
	 * @param        string $country_code Two latter Country Code
	 * @param        string $state Name of the State
	 * @param        string $locality Name of the Location
	 * @param        string $org Name of the Organitaion
	 * @param        string $org_unit Name of the Organitaion unit
	 * @param        string $email Email address
	 * @param        string $key KEY use for creating new csr. if you want to generate new key then pass "newkey" as argument.	 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function create_ssl_crt($domain, $country_code, $state, $locality, $org, $org_unit, $email, $key){
		
		$act = 'act=sslcrt';
		
		$data['domain'] = $domain;			// Specify DOMAIN - Note : Domain should have a KEY
		$data['country'] = $country_code;	// Specify Country Code
		$data['state'] = $state;			// Specify State
		$data['locality'] = $locality;		// Specify Locality
		$data['organisation'] = $org;		// Specify Organization
		$data['orgunit'] = $org_unit;		// Specify Organization Unit
		$data['email'] = $email;			// Specify Email
		$data['selectkey'] = $key;		    // Specify key. if you want to generate new key then pass "newkey" as argument.
		$data['create_crt'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Upload SSL Certificate
	 *
	 * @category	 Security
	 * @param        string $keypaste Entire certificate.
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function upload_ssl_crt($keypaste){
		
		$act = 'act=sslcrt';
		
		$data['kpaste'] = $keypaste;			// Specify Certificatae Contents
		$data['install_crt'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Detail SSL Certificate
	 *
	 * @category	 Security
	 * @param        string $domain Specify domain name to detail view of SSL Certificat
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function detail_ssl_crt($domain){
		
		$act = 'act=sslcrt';
		
		$data['detail_record'] = $domain;	// Specify DOMAIN
		
	    $resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete SSL Certificate
	 *
	 * @category	 Security
	 * @param        string $domain Specify domain name to delete SSL Certificat
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_ssl_crt($domain){
		
		$act = 'act=sslcrt';
		
		$data['delete_record'] = $domain;	// Specify DOMAIN
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List Blocked IP.
	 * @return		string $resp Response of Actions. Default: Serialize
	 */
	function list_ipblock(){
		
		$act = 'act=ipblock';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Block IP
	 *
	 * @category	 Security
	 * @param        string $ip IP Address for block
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function add_ipblock($ip){
		
		$act = 'act=ipblock';
		
		$data['dip'] = $ip;		// Specify IP to block
		$data['add_ip'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete Blocked IP
	 *
	 * @category	 Security
	 * @param        string $ip IP Address for unblock
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_ipblock($ip){
		
		$act = 'act=ipblock';
		
		$data['delete_ip'] = $ip;	// Specify IP to unblock
		$data['delete_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Enable/Disable SSH Access
	 *
	 * @category	 Security
	 * @param        string $action Action should be on or off
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function ssh_access($action){
		
		$act = 'act=ssh_access';
		
		// Specify on/off to enable/disable SSH access respectively.
		if($action == 'off'){
			$data['sshon'] = NULL;
		}else{
			$data['sshon'] = 1;
		}
		$data['editsshsettings'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	//////////////////////////////////////////////////////////////////////////////
	//					   		CATEGORY : Email Server							//
	//////////////////////////////////////////////////////////////////////////////	
		
	/**
	 * List Email Users
	 *
	 * @category	 Email
	 * @param        string $domain Specify domain name for the Email User Account list
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function list_emailuser($domain){
		
		$act = 'act=email_account';
		
		$data['domain'] = $domain;		// Specify Domain
		
		$resp = trim($this->curl_call($act, $data));
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Add Email User
	 *
	 * @category	 Email
	 * @param        string $domain Domain for the Email User Account to add
	 * @param        string $emailuser Email user name for add
	 * @param        string $password Password for user	 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function add_emailuser($domain, $emailuser, $password){
		
		$act = 'act=email_account';
		
		$data['selectdomain'] = $domain;	// Specify DOMAIN
		$data['login'] = $emailuser;		// Specify email user to create
		$data['newpass'] = $data['conf'] = $password;		// Specfy PASSWORD
		$data['create_acc'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Change Email Users' Password
	 *
	 * @category	 Email
	 * @param        string $domain Domain for the Email User Account for change passsword
	 * @param        string $emailuser Email user name for change passsword
	 * @param        string $password New password for user 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function change_email_user_pass($domain, $emailuser, $password){
		
		$act = 'act=email_account';
		
		$data['domain_name'] = $domain;		// Specify DOMAIN
		$data['edit_record'] = $emailuser;	// Specify record to be EDITTED
		$data['cpass'] = $password;			// Specify PASSWORD
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete Email Users
	 *
	 * @category	 Email
	 * @param        string $domain Domain for the Email User Account for delete
	 * @param        string $emailuser Email user name for delete
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_email_user($domain, $emailuser){
		
		$act = 'act=email_account';
		
		$data['domain_name'] = $domain;		// Specify DOMAIN
		$data['delete_record'] = $emailuser;// Specify record to be DELETED
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List Email Forwarder
	 *
	 * @category	 Email
	 * @param        string $domain Domain for the Email Forwarder list	
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function list_emailforward($domain){
		
		$act = 'act=email_forward';
		
		$data['domain'] = $domain;		// Specify DOMAIN
		
		$resp = trim($this->curl_call($act, $data));
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Add Email Forwarder
	 *
	 * @category	 Email
	 * @param        string $domain Domain for the Email Forwarder add
	 * @param        string $forward_address Forwarder name to add
	 * @param        string $forward_to To whome it is forwarded
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function add_emailforward($domain, $forward_address, $forward_to){
		
		$act = 'act=email_forward';
		
		$data['selectdomain'] = $domain;		// Specify DOMAIN
		$data['addemail'] = $forward_address;	// Specify Senders Email Address
		$data['sendemail'] = $forward_to;		// Specify Email Address to be Forwarded TO
		$data['create_acc'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete Email Forwarder
	 *
	 * @category	 Email
	 * @param        string $domain Domain for the Email Forwarder delete
	 * @param        string $forward_address Forwarder name 
	 * @param        string $forward_to To whome it is forwarded
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_email_forward($domain, $forward_address, $forward_to){
		
		$act = 'act=email_forward';
		
		$data['domain_name'] = $domain;		// Specify DOMAIN
		$data['forward_name'] = $forward_address;	// Specify Forwarders Name
		$data['to_name'] = $forward_to;		// Specify Recepients Name
		$data['delete_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List MX record
	 *
	 * @category	 Email Server
	 * @param        string $domain Domain for the MX Record list
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function list_mx_entry($domain){
		
		$act = 'act=mxentry';
		
		$data['domain'] = $domain;		// Specify DOMAIN
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Add MX record
	 *
	 * @category	 Email Server
	 * @param        string $domain Domain for the MX Record add
	 * @param        string $priority Priority for the MX Record Entry
	 * @param        string $destination Destination address	 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function add_mx_entry($domain, $priority, $destination){
		
		$act = 'act=mxentry';
		
		$data['selectdomain'] = $domain;	// Specify the DOMAIN
		$data['priority'] = $priority;		// Specify the PRIORITY
		$data['destination'] = $destination;// Specify the Destination
		$data['create_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Edit MX record
	 *
	 * @category	 Email Server
	 * @param        string $domain Domain for the MX Record edit
	 * @param        string $record Record no of the Entry	 
	 * @param        string $priority Priority for the MX Record Entry
	 * @param        string $destination Destination address	 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function edit_mx_entry($domain, $record, $priority, $destination){
		
		$act = 'act=mxentry';
		
		$data['domain_name'] = $domain;		// Specify the DOMAIN
		$data['edit_record'] = $record;		// Specify the record to be EDITTED
		$data['editpriority'] = $priority;	// Specify the PRIORITY
		$data['editdestination'] = $destination;	// Specify DESTINATION
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete MX record
	 *
	 * @category	 Email Server
	 * @param        string $domain Domain for the MX Record delete
	 * @param        string $record Record no of the Entry	 
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_mx_entry($domain, $record){
		
		$act = 'act=mxentry';
		
		$data['domain_name'] = $domain;
		$data['delete_record'] = $record;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Set Default
	 *
	 * @category	 Server
	 * @param        string $service Set the Default Service - php53/php54/nginx/httpd
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function set_defaults($service){
		
		$act = 'act=service_manager';
		
		$php = array('php53', 'php54', 'php55');
		$server = array('httpd', 'nginx', 'lighttpd');
		
		if(in_array($service, $php)){
			$data['default_php'] = $service;
		}
		
		if(in_array($service, $server)){
			$data['webserver'] = $service;
		}
		
		$data['service_manager'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	//////////////////////////////////////////////////////////////////////////
	//					   CATEGORY : Server Info							//
	//////////////////////////////////////////////////////////////////////////
	
	/**
	 * Show Error Log
	 *
	 * @category	 Server Info
	 * @param        string $domain Domain for the error log (Opional)
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function show_error_log($domain = ''){
		
		$act = 'act=errorlog';
		
		if(empty($domain)){
			$data['domain_log'] = 'error_log';
		}else{
			$data['domain_log'] = $domain .'.err';
		}
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Enable / Disable PHP Extensions
	 *
	 * @category	 Configuration
	 * @param        string (Optional) $extensions Extensions to enable 
	 						(Empty results in list of Extensions and their status)
	 * @return		 array	$resp Response of Action. Default: Serialize
	 */
	function handle_php_ext($extensions = ''){
		
		$act = 'act=php_ext';
		
		if(!empty($extensions)){
			$data['extensions'] = $extensions;
			$data['save_ext'] = 1;
		}
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	/**
	 * Networking Tools
	 *
	 * @category	 DNS
	 * @param        string (Optional) $action Lookup by default
	 						(Available options are 'lookup' & 'traceroute')
	 * @return		 array	$resp Response of Action. Default: Serialize
	 */
	function dns_lookup($domain, $action = 'lookup'){
		
		$act = 'act=network_tools';
		
		$data['action'] = $action;
		$data['domain_name'] = $domain;
		$data['domain_lookup'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	/**
	 * Prints result
	 *
	 * @category	 Debug
	 * @param        Array $data
	 * @return       array
	 */
	function r_print($data){
		echo '<pre>';
		print_r($data);
		echo '</pre>';
	}
	
	/**
	 * Set Bandwidth Limit
	 *
	 * @category	 Bandwidth
	 * @param        string $total_bandwidth Set your total available bandwidth in GB(Set 0 for unlimited)
	 * @param        string $bandwiwdth_email_alert Email alert limit value in GB
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function set_bandwidth($total_bandwidth = '', $bandwidth_email_alert = ''){
		
		$act = 'act=bandwidth';
		
		$data['bandwidth_up_limit'] = $total_bandwidth;	    // Specify the total bandwidth in GB
		$data['bandwidth_limit'] = $bandwidth_email_alert;	// Specify the email alert limit in GB
		$data['bandwidth_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Reset Bandwidth Limit
	 *
	 * @category	 Bandwidth
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function reset_bandwidth(){
		
		$act = 'act=bandwidth';
		
		$data['bandwidth_reset'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List Login Logs
	 *
	 * @category	 Login
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function list_login_logs(){
		
		$act = 'act=login_logs';
				
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * Delete all Login Logs
	 *
	 * @category	 Login
	 * @return		 string $resp Response of Actions. Default: Serialize
	 */
	function delete_login_logs(){
		
		$act = 'act=login_logs&delete_all=1';
				
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/**
	 * List Protected Users
	 *
	 * @category	 Apache
	 * @return		 Array	$resp	Response of Actions. Default: Serialize
	 */
	function list_protected_users(){
		
		$act = 'act=pass_protect_dir';
		
		$resp = $this->curl_call($act);
		$this->chk_error();
		return $resp;
		
	}
	
	/*
	 *	----------------------------------
	 *	Password Protect Directory
	 *	----------------------------------
	 * 
	 *	@category	Apache
	 *	@param		String	$path - Path to the directory to be password protected
	 *	@param		String	$uname - User to be added for the directory
	 *	@param		String	$pass - Password to the user for the directory
	 *	@param		String	[OPTIONAL] $name - Alias Name for the directory.
	 *	@return     Boolean
	 *	@version    2.2.0
	 *
	 */	
	function add_pass_protect_dir($path, $uname, $pass, $name = ''){
		
		$act = 'act=pass_protect_dir';
		
		$data['dir_path'] = $path;	// Path to password protect (No leading slashes)
		$data['username'] = $uname;	// Alphanumeric Username
		$data['password'] = $data['re_password'] = $pass;	// Password should not be less than 5 characters
		
		if(!empty($name)){ // Alias name
			$data['dir_name'] = $name;
		}
		$data['add_pass_protect'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/*
	 *	-------------------------------------------
	 *	Delete Password Protected Directory User
	 *	-------------------------------------------
	 * 
	 *	@category	Apache
	 *	@param		String	$uname - User to be deleted
	 *	@param		String	$path - Path to the password protected directory
	 *	@return		Boolean
	 *	@version    2.2.0
	 *
	 */
	function delete_pass_protected_user($uname, $path){
		
		$act = 'act=pass_protect_dir';
		
		$data['delete_record'] = $uname;
		$data['path'] = $path;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return trim($resp);
		
	}
	
	/*
	 *	-------------------------------------------
	 *	Read extra configuration file path
	 *	-------------------------------------------
	 * 
	 *	@category	Configuration
	 *	@param		String	$domain Domain for the extra path	 
	 *	@return		array
	 *	@version    2.2.6
	 *
	 */
	function read_extra_conf($domain){
		
		$act = 'act=extra_conf';
		
		$data['domain'] = $domain;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/*
	 *	-------------------------------------------
	 *	Add extra configuration file path
	 *	-------------------------------------------
	 * 
	 *	@category	Configuration
	 *	@param		String	$domain Domain for the extra path
	 *	@param		String	$path Path of your extra conf
   	 *	@param		String	$webserver Webserver ID for whic you want to add, you will get it from w_list array key	 
	 *	@return		string $resp Response of Actions. Default: Serialize
	 *	@version    2.2.6
	 *
	 */
	
	function add_extra_conf($domain, $path, $webserver){
		
		$act = 'act=extra_conf';
		
		$data['selectdomain'] = $domain;
		$data['selectweb'] = $webserver;
		$data['destination'] = $path;
		$data['create_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/*
	 *	-------------------------------------------
	 *	Delete extra configuration file path
	 *	-------------------------------------------
	 * 
	 *	@category	Configuration
	 *	@param		String	$domain Domain for the extra path
	 *	@param		String	$path Path of your extra conf
	 *	@param		String	$webserver Webserver ID for whic you want to delete, you will get it from w_list array key	 
	 *	@return		string $resp Response of Actions. Default: Serialize
	 *	@version    2.2.6
	 *
	 */
	
	function delete_extra_conf($domain, $path, $webserver){
		
		$act = 'act=extra_conf';
		
		$data['domain_name'] = $domain;
		$data['editwebserver'] = $webserver;
		$data['editdestination'] = $path;
		$data['delete_record'] = 1;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
	
	/*
	 *	-------------------------------------------
	 *	Edit extra configuration file path
	 *	-------------------------------------------
	 * 
	 *	@category	Configuration
	 *	@param		String	$domain Domain for the extra path
	 *	@param		String	$path Path of your extra conf
     *	@param		String	$webserver Webserver ID for whic you want to delete, you will get it from w_list array key	
	 *  @param      String  $id $id ID of the cron record. Get from the list of extra conf
	 *	@return		string $resp Response of Actions. Default: Serialize
	 *	@version    2.2.6
	 *
	 */
	
	function edit_extra_conf($domain, $path, $webserver, $id){
		
		$act = 'act=extra_conf';
		
		$data['domain_name'] = $domain;
		$data['editwebserver'] = $webserver;
		$data['editdestination'] = $path;
		$data['edit_record'] = 'c'.$id;
		
		$resp = $this->curl_call($act, $data);
		$this->chk_error();
		return $resp;
		
	}
}

//////////////////////////////////////////////////////////////////////
//							EXAMPLES								//
//////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
//							CATEGORY : FEATURES								 //
///////////////////////////////////////////////////////////////////////////////


////////////////////////////
//		List Domain       //
////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of domains
$res = unserialize($test->list_domains());

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing domain<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////
//		Add Domain       //
///////////////////////////
/*$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);
$res = $test->add_domain($domain, $domainpath, $ip);
$res = unserialize($res);

$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Domain added';
}else{
	echo 'Error while adding domain<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////
//		Delete Domain       //
//////////////////////////////
/*$test = new Webuzo_API($webuzo_user, $webuzo_password, $host );

$res = $test->delete_domain($domain);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Domain Deleted';
}else{
	echo 'Error while deleting Domain<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		Change Password       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->change_password($webuzo_password, $webuzo_user);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Password changed';
}else{
	echo 'Error while changing Password<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////////////
//		Change File Manager's        //
//			 Password				 //
///////////////////////////////////////
/*$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->change_fileman_pwd($pass);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Password changed for File Manager';
}else{
	echo 'Error while changing password for File Manager<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////////////////////
//		Change Apache Tomcat Manager's        //
//			 		Password				  //
////////////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);
$res = $test->change_tomcat_pwd($pass);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Password changed for Apache Tomcat Manager';
}else{
	echo 'Error while changing Password for Apache Tomcat Manager<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////
//		List FTP User       //
//////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of FTP users
$res = unserialize($test->list_ftpuser());
//$test->r_print($res);

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing FTP User<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

/////////////////////////////
//		Add FTP User       //
/////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_ftpuser($user, $pass, $directory, $quota_limit);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'FTP user added';
}else{
	echo 'Error while adding FTP user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////
//		Edit FTP User       //
//////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of FTP users
// $res = $test->list_ftpuser();
$res = $test->edit_ftpuser($user, $quota_limit);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'FTP user\' quota edited';
}else{
	echo 'Error while editing FTP user\'s quota<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		Delete FTP User       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of FTP users
// $res = $test->list_ftpuser();

$res = $test->delete_ftpuser($ftp_user);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'FTP user Deleted';
}else{
	echo 'Error while deleting FTP user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

/*
/////////////////////////////////////
//		List FTP Connections       //
/////////////////////////////////////

$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of FTP users
$res = unserialize($test->list_ftp_connections());
//$test->r_print($res);

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing FTP Connections<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

///////////////////////////////////////
//		Delete FTP Connections       //
///////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of FTP Connections and their Process IDs
// $res = $test->list_ftp_connections();

$res = $test->delete_ftp_connection($ftp_connection_id);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'FTP connection disconnected';
}else{
	echo 'Error while disconnecting FTP connection<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////////
//		Change FTP Users'        //
//			 Password			 //
///////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of FTP users
// $res = $test->list_ftpuser();
$res = $test->change_ftpuser_pass($ftpuser, $pass);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'FTP user\'s password changed';
}else{
	echo 'Error while changing FTP user\'s password<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////////////////////////////////////////////////////
//							CATEGORY : MYSQL								 //
///////////////////////////////////////////////////////////////////////////////
	
//////////////////////////////
//		List Database       //
//////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of Databases
$res = unserialize($test->list_database());

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Databases<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////
//		Add Database       //
/////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_database($db_name);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Database created';
}else{
	echo 'Error while creating database<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		Delete Database       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of Databases
// $res = $test->list_database();

$res = trim($test->delete_database($db_name));
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Database Deleted';
}else{
	echo 'Error while deleting Database<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////////
//		 List Database Users       //
/////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of Database Users
$res = $test->list_db_user();
//$test->r_print($res);
$res = unserialize($res);

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Database User<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////////
//		 Add Database Users       //
////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Specify Database username
// Note : Database username cannot exceed more than 16 characters inclusive of Webuzo username
// E.g soft_abcdefghijh is allowed

$res = $test->add_db_user($db_user, $pass);
$res = unserialize($res);
//$res = unserialize(trim($res));
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Database user created';
}else{
	echo 'Error while creating database user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////////////
//		 Delete Database Users       //
///////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of Database Users
// $res = $test->list_db_user();

// Specify Database user to DELETE in the following format:
// FORMAT : webuzo-username_databaseuser
// E.g : soft_test

$res = $test->delete_db_user($db_user);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Database user Deleted';
}else{
	echo 'Error while deleting Database user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////////////
//		 Set Database Privileges       //
/////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Specify Database name in the following format:
// FORMAT : webuzo-username_databasename
// E.g : soft_test
// Specify Database user in the following format:
// FORMAT : webuzo-username_databaseuser
// E.g : soft_test


// Specify the Databas HOST
// Set $data['host'] = 'localhost'; for localhost
// Set $data['host'] = 'any host'; for Remote Host
// Set $data['host'] = 'example.com'; for your HOST(example.com)
// Set the privileges. Leave blank to restrict privileges
// 'SELECT,CREATE,INSERT,UPDATE,ALTER,DELETE,INDEX,CREATE_TEMPORARY_TABLES,EXECUTE,DROP,LOCK_TABLES,REFERENCES,CREATE_ROUTINE,CREATE_VIEW,SHOW_VIEW' 


$res = $test->set_privileges($database, $db_user, $host, $prilist);
$res = unserialize($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Privileges set successfully';
}else{
	echo 'Error while setting privileges<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////////////////////////////////////////////
//					   CATEGORY : Advance Settings							//
//////////////////////////////////////////////////////////////////////////////


///////////////////////////////
//		Email Settings       //
///////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->edit_settings($email, $ins_email, $rem_email, $edit_email);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Email settings editted successfully';
}else{
	echo 'Error while editing Email settings<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		Manage Services       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Specify the services to be restarted
$service_name = 'mysqld';
$action = 'restart';

$res = $test->manage_service($service_name, $action);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Service '.$service_name.' '.$action.'ed successfully';
}else{
	echo 'Error while '.$action.'ing '.$service_name.' service<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

/////////////////////////////////////
//		Enable/Disable suPHP       //
/////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Set on and off to enable and disable suPHP respectively
$res = $test->manage_suphp($status);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Settings saved successfully';
}else{
	echo 'Error while saving settings<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

/*
///////////////////////////////////
//		Enable NGINX Proxy       //
///////////////////////////////////
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Set on and off to enable and disable suPHP respectively
$res = $test->enable_proxy($port, $htaccess, $proxy_server);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Settings saved successfully';
}else{
	echo 'Error while saving settings<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}*/

/*
///////////////////////////////////
//		Disable NGINX Proxy       //
///////////////////////////////////
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Set on and off to enable and disable suPHP respectively
$res = $test->disable_proxy($set_default_webserver);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Settings saved successfully';
}else{
	echo 'Error while saving settings<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

//////////////////////////////////////////////////////////////////////////////
//					   CATEGORY : Server Settings							//
//////////////////////////////////////////////////////////////////////////////
	
///////////////////////////////
//		List DNS Record      //
///////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->list_dns_record($domain);
$res = unserialize($res);
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing DNS Record<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////
//		Add DNS Record      //
//////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_dns_record($domain, $name, $ttl, $type, $address);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'DNS record added successfully';
}else{
	echo 'Error while adding DNS record<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		Edit DNS Record       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the $data['edit_record'] from LIST of DNS Records
//$res = $test->list_dns_record($domain.com);

$res = $test->edit_dns_record($id, $domain, $name, $ttl, $type, $address);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'DNS Record record editted successfully';
}else{
	echo 'Error while editing DNS Record<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////
//		Delete DNS Record      //
/////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the $data['delete_record'] from LIST of DNS Records
// $res = $test->list_dns_record($data);

$res = $test->delete_dns_record($id, $domain);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'DNS Record deleted';
}else{
	echo 'Error while deleting DNS Record<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////
//		List CRON       //
//////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of CRONs Set
$res = $test->list_cron();
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing cron<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////
//		Add CRON      //
////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_cron($minute, $hour, $day, $month, $weekday, $cmd);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'CRON added successfully';
}else{
	echo 'Error while adding CRON<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////
//		Edit CRON       //
//////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get $data['edit_record'] from the LIST of CRON
// $res = $test->list_cron();

$res = $test->edit_cron($id, $minute, $hour, $day, $month, $weekday, $cmd);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'CRON editted successfully';
}else{
	echo 'Error while editing CRON<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////
//		Delete CRON       //
////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get $data['delete_record'] from the LIST of CRON
// $res = $test->list_cron();

$res = $test->delete_cron($id);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'CRON Deleted';
}else{
	echo 'Error while deleting CRON<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////////////////////////////////////////
//					   		CATEGORY : Security							//
//////////////////////////////////////////////////////////////////////////

//////////////////////////////
//		 List SSL Key       //
//////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of SSL keys available
$res = $test->list_ssl_key();
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing SSL key<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		 Create SSL Key       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->create_ssl_key($description, $keysize);

// $keysize
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL key created';
}else{
	echo 'Error while creating ssl key<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		 Upload SSL Key       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->upload_ssl_key($description, $keypaste);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL key uploaded';
}else{
	echo 'Error while uploading SSL key<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		 Detail SSL Key       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->detail_ssl_key($domain);
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while showing details for SSL key<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		 Delete SSL Key       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of SSL KEY
$res = $test->list_ssl_key();

// Pass the key of the KEY to delete
$res = $test->delete_ssl_key($domain_key);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL key deleted';
}else{
	echo 'Error while deleting SSL key<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////
//		 List SSL CSR        //
///////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of SSL CSR
$res = $test->list_ssl_csr();
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing SSL CSR<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////
//		 Create SSL CSR        //
/////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->create_ssl_csr($domain, $country_code, $state, $locality, $org, $org_unit, $passphrase, $email, $key);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL CSR created';
}else{
	echo 'Error while creating SSL CSR<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////
//		 Detail SSL CSR        //
/////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->detail_ssl_csr($domain);
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while showing details for SSL CSR<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////
//		 Delete SSL CSR        //
/////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of SSL CSR
$res = $test->list_ssl_csr();

// Pass the key of the CSR to delete
$res = $test->delete_ssl_csr($domain_key);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL CSR deleted';
}else{
	echo 'Error while deleting SSL CSR<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////
//		List SSL Certificate		//
//////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of SSL Certificates
$res = $test->list_ssl_crt();
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing SSL Certificate<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////////
//		 Create SSL Certificate			//
//////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->create_ssl_crt($domain, $country_code, $state, $locality, $org, $org_unit, $email, $key);

$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL Certificate created';
}else{
	echo 'Error while creating SSL Certificate<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////
//	    Upload SSL Certificate		//
//////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->upload_ssl_crt($keypaste);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL certificate uploaded';
}else{
	echo 'Error while uploading SSL certificate<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////////
//		 Detail SSL Certificate			//
//////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->detail_ssl_crt($domain);
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while showing details for SSL Certificate<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////////////
//		 Delete SSL Certificate        //
/////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of SSL Certificates
$res = $test->list_ssl_crt();

// Pass the key of the Certificate to delete
$res = $test->delete_ssl_crt($domain_key);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'SSL Certificate deleted';
}else{
	echo 'Error while deleting SSL Certificate<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////
//		List Blocked IP       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of Blocked IPs
$res = $test->list_ipblock();
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Blocked IPs<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////
//		Block IP       //
/////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_ipblock($ip);
$res = unserialize($res);

// Done/Error
if(!empty($res['done'])){
	echo 'IP Blocked';
}else{
	echo 'Error while Blocking IP<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////
//		Unblock IP       //
///////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->delete_ipblock($ip);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'IP Unblocked successfully';
}else{
	echo 'Error while Unblocking IP<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////////
//		Enable/Disable SSH       //
///////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->ssh_access($action);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Settings saved successfully';
}else{
	echo 'Error while saving settings<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////////////////////////////////////////////
//					   		CATEGORY : Email Server							//
//////////////////////////////////////////////////////////////////////////////
	
////////////////////////////////
//		List Email User       //
////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of email users
$res = $test->list_emailuser($domain);
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Email User<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////
//		Add Email User       //
///////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_emailuser($domain, $emailuser, $password);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Email user added';
}else{
	echo 'Error while adding Email user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////////////
//		Change Email Users'        //
//			 Password			   //
/////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the $data['edit_record'] from LIST of Email users
// $res = $test->list_emailuser($domain);
$res = $test->change_email_user_pass($domain, $emailuser, $password);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Email user\'s password changed';
}else{
	echo 'Error while changing Email user\'s password<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////
//		Delete Email User       //
//////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the $data['delete_record'] from LIST of Email users
//$res = $test->list_emailuser($domain);

$res = $test->delete_email_user($domain, $emailuser);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Email user Deleted';
}else{
	echo 'Error while deleting Email user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////
//		List Email Forwarders       //
//////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of Email Forwarders
$res = $test->list_emailforward($domain);
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Email Forwarders<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////////
//		Add Email Forwarder       //
////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_emailforward($domain, $forward_address, $forward_to);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Email Forwarder added';
}else{
	echo 'Error while adding Email Forwarder<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////////////
//		Delete Email Forwarder       //
///////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the $data['forward_name'] from LIST of Email Forwarders
// $res = $test->list_emailforward($domain);
$res = $test->delete_email_forward($domain, $forward_address, $forward_to);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Email Forwarder Deleted';
}else{
	echo 'Error while deleting Email Forwarder<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////
//		List MX Record       //
///////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the LIST of MXRecords
$res = $test->list_mx_entry($domain);
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing MX Records<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////
//		Add MX Record       //
//////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->add_mx_entry($domain, $priority, $destination);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'MX record added successfully';
}else{
	echo 'Error while adding MX record<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


/////////////////////////////
//		Edit MX Entry      //
/////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get $data['edit_record'] from the LIST of MX Records
// $res = $test->list_mx_entry();

$res = $test->edit_mx_entry($domain, $record, $priority, $destination);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'MX Entry record editted successfully';
}else{
	echo 'Error while editing MX Entry<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


///////////////////////////////
//		Delete MX Entry      //
///////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get $data['delete_record'] from the LIST of MX Records
// $res = $test->list_mx_entry();

$res = $test->delete_mx_entry($domain, $record);
$res = unserialize($res);
// $test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'MX Record deleted';
}else{
	echo 'Error while deleting MX Record<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////
//		Set Defaults      //
////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->set_defaults('php53');
$res = unserialize($res);
//$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Default Set';
}else{
	echo 'Error while setting defaults<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


//////////////////////////////////////////////////////////////////////////
//					   CATEGORY : Server Info							//
//////////////////////////////////////////////////////////////////////////

///////////////////////////////
//		Show Error Log       //
///////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->show_error_log();
$res = unserialize($res);

if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while showing Error Log<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

///////////////////////////////
//		Configure Webuzo     //
///////////////////////////////
/*
$test = new Webuzo_API();

$res = $test->webuzo_configure($ip, $user, $email, $pass, $host, $ns1 = '', $ns2 ='', $license = '' );
$res = unserialize($res);
$test->r_print($res);
*/

///////////////////////////////////////////
//		Install System Application       //
///////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$appid = 30; // ID of the Application to install.

$res = $test->install_app($appid);
//$res = unserialize($res);

$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

///////////////////////////////////////////
//		Remove System Application       //
///////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$appid = 30; // ID of the Application to install.

$res = $test->remove_app($appid);
//$res = unserialize($res);

$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

//////////////////////////////////
//		List Services			//
//////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->list_services();
$res = unserialize($res);

$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

///////////////////////////////////////
//	Enable / Disable PHP Extensions  //
///////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$extensions = 'curl.so,calendar.so'; // Extensions to Enable.

$res = $test->handle_php_ext($extensions);
$res = unserialize($res);
//$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

/////////////////////
//	Network Tools  //
/////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->dns_lookup($domain_name);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

///////////////////////////
//	Set BAndwidth Limit  //
//////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->set_bandwidth($total_bandwidth, $bandwiwdth_email_alert);
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/
/////////////////////////////
//	Reset BAndwidth Limit  //
////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->reset_bandwidth();
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}

*/

/////////////////////////////
//	  List Login Logs     //
////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->list_login_logs();
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

/////////////////////////////
//	  Delete Login Logs    //
////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

$res = $test->delete_login_logs();
$res = unserialize($res);
$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'Done';
}else{
	echo 'Failed<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

//////////////////////////////////////
// List Password Protected Dir List //
//////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);

// Get the list of domains
$res = unserialize($test->list_protected_users());

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing password protected directories<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/


////////////////////////////////////////////
//		Add Password Protected User       //
////////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);
$res = $test->add_pass_protect_dir('public_html/test', 'testuser', 'testuser', 'Test Account');

$res = unserialize($res);

$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'User added successfully';
}else{
	echo 'Error while adding user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

///////////////////////////////////////////////
//		Delete Password Protected User       //
///////////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);
$res = $test->delete_pass_protected_user('testuser', '/home/soft/public_html/test');

$res = unserialize($res);

$test->r_print($res);

// Done/Error
if(!empty($res['done'])){
	echo 'User deleted successfully';
}else{
	echo 'Error while deleting user<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/

///////////////////////////////////////////////
//		Read Extra conf file path            //
///////////////////////////////////////////////
/*


$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);
$res = $test->read_extra_conf($host);

$res = unserialize($res);

$test->r_print($res);

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Conf file<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/
///////////////////////////////////////////////
//		 Add Extra conf file path            //
///////////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);;

//GEt the webserver from w_list key of your webser 3 for apache 18 for nginx 60 for lighttpd
// You will get the w_list from  read_extra_conf(Domain name)
$res = $test->add_extra_conf($domain, $path, $webserver);

$res = unserialize($res);


// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Conf file<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/
///////////////////////////////////////////////
//		 Delete Extra conf file path         //
///////////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);;

//GEt the webserver from w_list key of your webser 3 for apache 18 for nginx 60 for lighttpd
// You will get the w_list from  read_extra_conf(Domain name)
$res = $test->delete_extra_conf($domain, $path, $webserver);

$res = unserialize($res);

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Conf file<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}
*/
///////////////////////////////////////////////
//		 	dit Extra conf file path         //
///////////////////////////////////////////////
/*
$test = new Webuzo_API($webuzo_user, $webuzo_password, $host);;


// Get the $webserver from w_list key of your webser 3 for apache 18 for nginx 60 for lighttpd
// You will get the w_list from  read_extra_conf(Domain name)
// Get the $id from the list of extra conf
$res = $test->edit_extra_conf($domain, $path, $webserver, $id);

$res = unserialize($res);

// Done/Error
if(empty($res['error'])){
	$test->r_print($res);
}else{
	echo 'Error while listing Conf file<br/>';
	if(!empty($res['error'])){
		print_r($res['error']);
	}
}*/


// **************************************************************************************
// 											END OF FILE
// **************************************************************************************
		

?>