Previous Topic

Next Topic

Book Contents

Plan Management: plans.php

Description

The function allows to get information about all plans in SiteBuilder. This information includes the following:

plan name, plan status (activated/deactivated), whether it can be applied to Trial sites (Y = it can be applied, N = it can not be applied), short description, owner of the plan login, and maximum number of pages this site may contain.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=get_plans

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 = 'plans', 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 plan is described with a tag:

<PLAN NAME="sb_plan_name" ALIAS="sb_plan_alias" ACTIVE="sb_active" FOR_TRIAL_SITES="is_trial" PAGES_NUMBER="sb_page_num" DESCRIPTION="sb_plan_desc" OWNER="sb_owner_login" BASE_PLAN="is_base_plan" />

where sb_plan_name - plan name,
sb_plan_alias - plan alias,
sb_active - can be 0 or 1 (0 - plan is deactivated;
1 - plan is activated),
is_trial - can be "yes" or "no" ("yes" - this is a plan for TRIAL sites, "no" - this plan is not for TRIAL sites),
sb_page_num - limitation of total pages number in a Site,
sb_plan_desc - plan description,
sb_owner_login - login of the owner of this plan,
is_base_plan - yes | no (yes - this plan is Base Plan for the administrator running the command).

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=get_plans

Result

<RESULT_ACTION><RESULT NAME="plans"><PLAN NAME="BasePlan" ALIAS="BasePlan_alias" ACTIVE="1" FOR_TRIAL_SITES="yes" PAGES_NUMBER="11" DESCRIPTION="Base Plan" OWNER="root" BASE_PLAN="yes"/><PLAN NAME="qwer" ALIAS="qwer_alias" ACTIVE="1" FOR_TRIAL_SITES="no" PAGES_NUMBER="10" DESCRIPTION="" OWNER="root" BASE_PLAN="no"/></RESULT><STATUS CODE="050010">OK</STATUS></RESULT_ACTION>

Description

The function allows to get detailed information about a Plan. This information contains the following: plan name, plan status (activated/deactivated), whether it can be applied to Trial sites (Y = it can be applied, N = it can not be applied), short description, owner of the plan login, maximum number of pages this site may contain, plan revision number, date of the last plan revision, host name (DNS name, IP address or host's range name), module name, template name.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=get_plan_details
plans=sb_plan
(or alias=plan_alias)
sb_plan - plan name, plan_alias - plan alias.

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 = 'plan', 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 plan is described with a tag:

<PLAN
NAME="sb_plan_name"
ALIAS="sb_plan_alias"

ACTIVE="sb_active"
FOR_TRIAL_SITES="is_trial"
PAGES_NUMBER="sb_page_num"
DESCRIPTION="sb_plan_desc"
OWNER="sb_owner_login"

BASE_PLAN="is_base_plan"
REVISION="revision_number"
LAST_REVISION_DATE="last_revision_date" >

<HOSTS>

<HOST HOST_NAME="host_name" />
...
<HOST HOST_NAME="host_name" />
</HOSTS>
<MODULES>

<MODULE NAME="module_name" />
...
<MODULE NAME="module_name" />
</MODULES>
<TEMPLATES>

<TEMPLATE ID="template_name" />
...
<TEMPLATE ID="template_name" />
</TEMPLATES>
</PLAN>

sb_plan_name
- plan name,

sb_plan_alias - plan alias,

sb_active - can be 0 or 1 (0 - plan is deactivated; 1 - plan is activated),
is_trial - can be "yes" or "no" ("yes" - this is a plan for TRIAL sites, "no" - this plan is not for TRIAL sites),
sb_page_num - limitation of total pages number in a Site,
sb_plan_desc - plan description,
sb_owner_login - login of the owner of this plan,

is_base_plan - yes | no (yes - this plan is Base Plan for the administrator running the command)
revision_number - plan revision number,
last_revision_date - date of the last plan revision,
host_name - host name (DNS name, IP address or host's range name),
module_name - module name,
template_name - template name.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=get_plan_details&plans=BasePlan

Result

<RESULT_ACTION>

<RESULT NAME="plan">

<PLAN
NAME="BasePlan"

ALIAS="a12s3edf45ghy6"

ACTIVE="1"
FOR_TRIAL_SITES="yes"
PAGES_NUMBER="11"
DESCRIPTION="Base Plan"
OWNER="root"

BASE_PLAN="yes"
REVISION="1.x"
LAST_REVISION_DATE="2005-05-30" >

<HOSTS>

<HOST HOST_NAME="192.168.47.31" />
<HOST HOST_NAME="range(192.168.47.40-60)" />
</HOSTS>
<MODULES>

<MODULE NAME="blogger" />
<MODULE NAME="counter" />
<MODULE NAME="feedback" />
<MODULE NAME="forum" />
</MODULES>
<TEMPLATES>

<TEMPLATE ID="vap-45" />
</TEMPLATES>
</PLAN>
</RESULT>
<STATUS CODE="050010">OK</STATUS>
</RESULT_ACTION>

Description

The function allows to create Plan.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

Parameter

Parameter name in admin section

Value

Description

*cmd

 

create_plan

Required parameter. Command

*sb_plan_name

(or alias)

Name

valid identity

Required parameter. Plan name (or alias).

sb_active

Active

1 | (0 | unset)

1 - the Plan is active, 0 | unset - the Plan is not active.

sb_plan_desc

Description

Text

Plan description

*sb_page_num

Pages Number

Number

Required parameter. Maximum number of web pages the Site may contain.

PlanHost

Hosts

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

List of hosts names. Optional.

PlanTempl

Templates

template_name[,template_name]
template_name - template name

List of templates names. Optional.

PlanMod

Modules

module_name[,module_name]
module_name - module name

List of modules names. 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 Add plan function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=update_plan& plans=newraplan&sb_plan_name=NewName

[SiteBuilderHost]/remote_admin/plans.php?cmd=update_plan&alias=a23sdfr456gdfggfgd&sb_plan_name=NewName


Result

<RESULT_ACTION><RESULT NAME=""><PLAN NAME="newraplan" ALIAS="a95e188372b9c689cc4aab00b2eb6c79" ACTIVE="1" PAGES_NUMBER="34" DESCRIPTION="bla bla bla"/></RESULT><<STATUS CODE="050008">Plan has been created.</STATUS></RESULT_ACTION>

Description

The function allows to edit the following plan parameters: plan name, new plan name, plan status (activated/deactivated), plan description, limit of web pages per web site, list of this web site hosts, list of templates, list of modules and option of applying Apply changes to all inherited plans.

Synopsis:

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

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

Parameter

Parameter name in admin section

Value

Description

*cmd

 

update_plan

Required parameter. Command

*plans

 

Valid identity

Required parameter. Plan name.

sb_plan_name

Name

Valid identity

New plan name.

sb_active

Active

1 | 0

1 - the Plan is active, 0 - the Plan is not active.

sb_plan_desc

Description

Text

Plan description

sb_page_num

Pages Number

Number

Limitation of total number of web pages a Site

PlanHost

Hosts

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

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

PlanTempl

Templates

template_name[,template_name]
where template_name - template name

List of templates names. If parameter is set, then previous templates information is replaced with the new one.

PlanMod

Modules

module_name[,module_name]
where module_name - module name

List of modules names. If parameter is set, then previous modules information is replaced with the new one.

sb_apply_to_all

Apply changes to all inherited plans

1 | (0 | unset)

If the parameter is equal to 1 then after plan properties update the update is applied to all inherited plans.

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 plan parameters function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=update_plan& plans=newraplan&sb_plan_name=NewName

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="050009">Plan has been updated</STATUS></RESULT_ACTION>

Description

The function allows to delete one or several plans.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=delete
plans=sb_plan[,sb_plan]


sb_plan - plan name

or

alias=sb_alias[,sb_alias]
sb_alias - plan alias.

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 plan function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=delete&plans=NewName,qwer
[SiteBuilderHost]/remote_admin/plans.php?cmd=delete&alias=1q2w3e4r5t6y7u8i,o1q29wi83ue47ry5t

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="050030">Plan(s) have been deleted.</STATUS></RESULT_ACTION>

Description

The function allows to activate one or several plans.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=activate
plans=sb_plan[,sb_plan]


sb_plan - plan name.

or

alias=sb_alias[,sb_alias]
sb_alias - plan alias.

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 Activate plan function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=activate&plans=NewName,qwer
[SiteBuilderHost]/remote_admin/plans.php?cmd=activate&alias=1q2w3e4r5t6y7u8i,o1q29wi83ue47ry5t

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="050022">Plan(s) have been activated.</STATUS></RESULT_ACTION>

Description

The function allows to deactivate one or several plans.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=deactivate
plans=sb_plan[,sb_plan]


sb_plan - plan name.

or

alias=sb_alias[,sb_alias]
sb_alias - plan alias.

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 Deactivate plan function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=deactivate&plans=NewName,qwer
[SiteBuilderHost]/remote_admin/plans.php?cmd=deactivate&alias=1q2w3e4r5t6y7u8i,o1q29wi83ue47ry5t

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="050023">Plan(s) have been deactivated.</STATUS></RESULT_ACTION>

Description

The function allows to set the plan for TRIAL sites. A trial web site is a site with limited functionality. Trial sites cannot be published. They are created by users who use SiteBuilder for the first time.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=set_for_trial_sites

plans=sb_plan;
sb_plan - plan name.

or

alias=sb_alias[,sb_alias]
sb_alias - plan alias.

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 Set the plan for TRIAL sites function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=set_for_trial_sites&plans=NewName
[SiteBuilderHost]/remote_admin/plans.php?cmd=set_for_trial_sites&aliass=1q2w3e4r5t6y7u8i9o

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="050027">Plan for Trial Sites has been set succesfully</STATUS></RESULT_ACTION>

Description

The function allows to unset a plan for TRIAL sites.

Synopsis

Name of the script to call

[SiteBuilderHost]/remote_admin/plans.php

Login:password for accessing the directory

Login: Root

Password: Reseller

Parameters

cmd=unset_for_trial_sites

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 Unset the plan for TRIAL sites function, the result string doesn't contain any values. It returns only status message.

Example

Command

[SiteBuilderHost]/remote_admin/plans.php?cmd=unset_for_trial_sites

Result

<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="050029">Plan for Trial Sites has been unset successfully. The Access for Trial Sites is forbidden.</STATUS></RESULT_ACTION>