Previous Topic

Next Topic

Book Contents

Reseller Management: resellers.php

Description

The function allows to get the following information about all resellers in SiteBuilder: reseller login, reseller name, domain, number of sites assigned to the reseller.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/resellers.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=get_resellers

Result

The result string has the following format:

<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>

Status string - a string containing information on the result of the function including description of an error if it has occurred during execution of the function. Status string always contains a value.

Name - the name of the returning value. If no errors have occurred during execution of the function, then Name = 'resellers', else Name is empty.

Status code - a 6-digits number containing code of the result of the function, i.e. error code or code of successful completion of the function. Status code always contains a value.


Result - the returning value. If some errors have occurred during execution of the function, then Result is empty, else if the function has been completed successfully Result contains an XML-format string, where each reseller is described with a tag:

<RESELLER LOGIN="reseller_login" DOMAIN="domain" NAME="reseller_name" SITES="sites_number" />

reseller_login - Reseller Login;
domain - Domain;
reseller_name - Reseller Name;
sites_number - Number of sites assigned to the reseller.

Example

Command

[SiteBuilderHost]/remote_admin/resellers.php?cmd=get_resellers

Result

<RESULT_ACTION><RESULT NAME="resellers"><RESELLER LOGIN="Petia" DOMAIN="ngs.ru" NAME="Petia" SITES="3" /><RESELLER LOGIN="Vasia" DOMAIN="ya.ru" NAME="Vasia" SITES="none" /></RESULT><STATUS CODE="070002">OK</STATUS></RESULT_ACTION>

Description

The function allows to get detailed information about the Reseller.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/resellers.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=get_reseller_details
sb_reseller=Reseller login

Result

The result string has the following format:

<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>

Status string - a string containing information on the result of the function including description of an error if it has occurred during execution of the function. Status string always contains a value.

Name - the name of the returning value. If no errors have occurred during execution of the function, then Name = 'reseller', else Name is empty.

Status code - a 6-digits number containing code of the result of the function, i.e. error code or code of successful completion of the function. Status code always contains a value.


Result - the returning value. If some errors have occurred during execution of the function, then Result is empty, else if the function has been completed successfully Result contains an XML-format string, where reseller is described with a tag:

<RESELLER
LOGIN="reseller_login"
DOMAIN="domain"
NAME="reseller_name"
EMAIL="reseller_email"
LANGUAGE="reseller_lang"
SKIN="reseller_skin" > <SITES>
<SITE
SITE_ALIAS="sb_siteid"
ACTIVE="sb_active"
TYPE="sb_site_type"
PUBLISH="sb_publish"
CREATION_DATE="cr_date"
CREATION_DATE_TIMESTAMP="cr_date_timestamp"
EXPIRATION_DATE="exp_date"
EXPIRATION_DATE_TIMESTAMP="exp_date_timestamp" />
...
<SITE ... />
<SITE ... />
</SITES> <HOSTS>
<HOST
HOST_NAME="host_name"
ACTIVE="host_active"
RANGE="host_range"
IP_ADDRESS="host_ip_adress" />
...
<HOST ... />
<HOST ... />
</HOSTS> <PLANS>
<PLAN
NAME="sb_plan_name"
ACTIVE="sb_active"
FOR_TRIAL_SITES="is_trial"
PAGES_NUMBER="sb_page_num"
DESCRIPTION="sb_plan_desc" />
...
<PLAN ... />
<PLAN ... />
</PLANS> </RESELLER>

reseller_login - Reseller login;
domain - Domain;
reseller_name - Reseller name;
reseller_email - Reseller E-mail;
reseller_lang - Language;
reseller_skin - Skin;
description of attributes of sites, hosts and plans you can see in the corresponding sections of this document.

Example

Command

[SiteBuilderHost]/remote_admin/resellers.php?cmd=get_reseller_details&sb_reseller=Petia

Result

<RESULT_ACTION> <RESULT NAME="reseller"> <RESELLER LOGIN="Petia" DOMAIN="ngs.ru" NAME="Petia" EMAIL="petia@ru.ru" LANGUAGE="en_US" SKIN="default"> <SITES> <SITE SITE_ALIAS="site1" ACTIVE="1" TYPE="Trial" PUBLISH="n/a" CREATION_DATE="May 16, 2005" CREATION_DATE_TIMESTAMP="1116215210" EXPIRATION_DATE="June 15, 2005" EXPIRATION_DATE_TIMESTAMP="1118807210" />
<SITE SITE_ALIAS="site2" ACTIVE="0" TYPE="Regular" PUBLISH="0" CREATION_DATE="May 16, 2005" CREATION_DATE_TIMESTAMP="1116215224" EXPIRATION_DATE="-" EXPIRATION_DATE_TIMESTAMP="-" />
<SITE SITE_ALIAS="www" ACTIVE="1" TYPE="Trial" PUBLISH="n/a" CREATION_DATE="May 16, 2005" CREATION_DATE_TIMESTAMP="1116215233" EXPIRATION_DATE="June 15, 2005" EXPIRATION_DATE_TIMESTAMP="1118807233" /></SITES>
<HOSTS> <HOST HOST_NAME="192.168.46.31" ACTIVE="1" RANGE="0" IP_ADDRESS="192.168.46.31" />
<HOST HOST_NAME="range(192.168.20.1-12)" ACTIVE="1" RANGE="1" IP_ADDRESS="192.168.20.1 - 192.168.20.12" />
<HOST HOST_NAME="range(192.168.40.20-25)" ACTIVE="1" RANGE="1" IP_ADDRESS="192.168.40.20 - 192.168.40.25" /></HOSTS>
<PLANS> <PLAN NAME="BasePlan_Petia" ACTIVE="1" FOR_TRIAL_SITES="yes" PAGES_NUMBER="10" DESCRIPTION="Base Plan for Petia (reseller)" /></PLANS> </RESELLER></RESULT>
<STATUS CODE="070002">OK</STATUS> </RESULT_ACTION>

Description

The function allows to delete one or several resellers.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/resellers.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=delete
ids=reseller_login[,reseller_login]

Result

The result string has the following format:

<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>

In the case of the Delete function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/resellers.php?cmd=delete&ids=Vasia

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="070005">Reseller(s) have been deleted successfully.</STATUS></RESULT_ACTION>

Description

The function allows to create a reseller.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/resellers.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

Parameter

Parameter Name in Admin Panel

Value

Description

*cmd

 

create_reseller

Required parameter. Command

*sb_domain

Domain

domain name

Required parameter. Reseller's domain

*sb_email

E-mail

e-mail

Required parameter. Reseller's E-mail

*sb_name

Name

Name

Required parameter. Reseller name

*sb_login

Login

valid identifier

Required parameter. Reseller's login

*sb_pswd

Password

Password

Required parameter. Password

*sb_pswd_conf

Password confirmation

Password

Required parameter. Password confirmation

*sb_skin

Skin

skin ID

Required parameter. Skin of Sitebuilder Interface for this Reseller and his sites.

*sb_language

Language

language ID

Required parameter. Language of Sitebuilder Interface for this Reseller and his sites.

sb_limit_sites

Regular sites limit

number

Regular sites limit for the reseller. If the parameter is equal to -1 then regular sites number is not limited.

sb_limit_hosts

Hosts limit

number

Hosts limit for the reseller. If the parameter is equal to -1 then hosts number is not limited.

Hosts

Reseller hosts

host_name[,host_name]
where host_name - host name (DNS name, IP address or host's range name)

List of hosts names. Optional.

Sites

List of sites

site_id[,site_id]
where site_id - Site Alias or Site Identity (Work Directory)

List of sites. Optional.

Result

The result string has the following format:

<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>


In the case of the Create reseller function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/resellers.php?cmd=create_reseller&sb_domain=mail.ru& sb_email=sdgs@dsf.sf&sb_name=new&sb_login=new&sb_pswd=123456&sb_pswd_conf=123456& sb_skin=default&sb_language=en_US&Hosts=192.168.01.01&Sites=my_site

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="070013">Reseller(s) have been added successfully.</STATUS></RESULT_ACTION>

Description

The function allows to edit the following reseller's parameters: reseller login, reseller's domain, reseller's e-mail, reseller's name, reseller's password, skin of SiteBuilder Interface for this reseller and his/her sites, language of SiteBuilder Interface for this reseller and his/her sites, list of hosts names, list of site names.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/resellers.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

All parameters are optional except cmd and sb_reseller. You should specify only those parameters that you are going to change; previous values will be saved for all other parameters.

Parameter

Parameter Name in Admin Panel

Value

Description

*cmd

 

update_reseller

Required parameter. Command

*sb_reseller

 

Reseller login

Required parameter. Reseller login. This parameter is used to determine what reseller to work with.

*sb_domain

Domain

domain name

Required parameter. Reseller's domain

*sb_email

E-mail

e-mail

Required parameter. Reseller's E-mail

*sb_name

Name

Name

Required parameter. Reseller's name

*sb_login

Login

valid identifier

Required parameter. Reseller's login

*sb_pswd

Password

Password

Required parameter. Password

*sb_pswd_conf

Password confirmation

Password

Required parameter. Password confirmation

*sb_skin

Skin

skin ID

Required parameter. Skin of Sitebuilder Interface for this Reseller and his sites.

*sb_language

Language

language ID

Required parameter. Language of Sitebuilder Interface for this Reseller and his sites.

sb_limit_sites

 

Regular sites limit

 

number

 

Regular sites limit for the reseller. If the parameter is equal to -1 then regular sites number is not limited.

sb_limit_hosts

 

Hosts limit

 

number

 

Hosts limit for the reseller. If the parameter is equal to -1 then hosts number is not limited.

Hosts

Reseller hosts

host_name[,host_name]
where host_name - host name (DNS name, IP address or host's range name)

List of hosts names. If parameter is set, then previous hosts information will be replaced with new one.

Sites

List of sites

site_id[,site_id]
where site_id - Site Alias or Site Identity (Work Directory)

List of sites names. If parameter is set, then previous sites information will be replaced with new one.

Result

The result string has the following format:

<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>

In the case of the Edit reseller information function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/resellers.php?cmd=update_reseller&sb_reseller=new&sb_skin=green

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="070014">Reseller(s) have been updated successfully.</STATUS></RESULT_ACTION>