Alternc
3.2
Alternc logiel libre pour l'hébergement
|
This class manage awstats statistic sets. More...
Public Member Functions | |
m_aws () | |
Constructor. | |
hook_menu () | |
alternc_password_policy () | |
Password kind used in this class (hook for admin class) | |
alternc_module_description () | |
Name of the module function. | |
get_list () | |
Returns an array with all the statistics of a member. | |
get_stats_details ($id) | |
Return an array with the details for 1 statistic set. | |
host_list () | |
Return the list of domains / subdomains allowed for this member with the type (MX,URL,...) | |
prefix_list () | |
Returns the list of prefixes that can be used on current account. | |
select_prefix_list ($current) | |
Echoes <option> tags of all the domains hosted on the account + the login of the account They can be used as a root for the login that may have access to web statistics hosted on an account $current will be the selected value. | |
select_host_list ($current) | |
Draw options for a select html code with the list of allowed and availables domains for this member. | |
check_host_available ($current) | |
Check if hosts is already used by awstats of available for this member. | |
get_hostaliases ($id) | |
Return the hostaliases list with an id. | |
put_stats_details ($id, $users, $hostaliases, $public) | |
Edit a statistic set (change allowed user list) | |
delete_stats ($id) | |
Delete a statistic set. | |
add_stats ($hostname, $users="", $hostaliases, $public) | |
Create a new statistic set. | |
list_login () | |
list_allowed_login ($id) | |
get_view_public ($id) | |
login_exists ($login, $exists=1) | |
del_login ($login) | |
add_login ($login, $pass) | |
change_pass ($login, $pass) | |
allow_login ($login, $id, $noconf=0) | |
delete_allowed_login ($id, $noconf=0) | |
deny_login ($login, $id, $noconf=0) | |
alternc_del_member () | |
alternc_del_domain ($dom) | |
This function is called on each class when a domain name is uninstalled. | |
hook_quota_get () | |
This function is called when we are asked to compute the used quota for a service. | |
_check ($login) | |
_delconf ($hostname) | |
Delete the awstats configuration file for a statistic set. | |
_createconf ($id, $nochk=0) | |
Create a configuration file for a statistic set. | |
_createhtpasswd () | |
alternc_export () | |
Exports all the aws related information for an account. |
Data Fields | |
$CONFDIR = "/etc/awstats" | |
Where are the awstats configuration files : private. | |
$HTAFILE = "/etc/alternc/awstats.htpasswd" | |
$CACHEDIR = "/var/cache/awstats" | |
$TEMPLATEFILE = "/etc/alternc/templates/awstats/awstats.template.conf" | |
Where is the template for conf files : private. |
This class manage awstats statistic sets.
Copyleft AlternC Team
_check | ( | $login | ) |
Definition at line 650 of file m_aws.php.
References $c, $err, $mem, $r, and prefix_list().
Referenced by add_login(), allow_login(), change_pass(), and deny_login().
_createconf | ( | $id, | |
$nochk = 0 |
|||
) |
Create a configuration file for a statistic set.
if nochk==1, does not check the owner of the stat set (for admin only) private
Definition at line 693 of file m_aws.php.
References $cuid, $db, $err, $uid, and $username.
Referenced by add_stats(), allow_login(), delete_allowed_login(), deny_login(), and put_stats_details().
_createhtpasswd | ( | ) |
Definition at line 745 of file m_aws.php.
Referenced by add_login(), add_stats(), allow_login(), alternc_del_domain(), alternc_del_member(), change_pass(), del_login(), delete_allowed_login(), deny_login(), and put_stats_details().
_delconf | ( | $hostname | ) |
Delete the awstats configuration file for a statistic set.
private
Definition at line 678 of file m_aws.php.
References $err.
Referenced by alternc_del_domain(), alternc_del_member(), and delete_stats().
add_login | ( | $login, | |
$pass | |||
) |
Definition at line 468 of file m_aws.php.
References $cuid, $db, $err, _check(), _createhtpasswd(), _md5cr(), and login_exists().
add_stats | ( | $hostname, | |
$users = "" , |
|||
$hostaliases, | |||
$public | |||
) |
Create a new statistic set.
string | $hostname | The domain name |
$uers | array the array of users that will be allowed | |
$hostaliases | array an array of host aliases | |
$public | boolean Shall this statistic set be public ? |
Definition at line 347 of file m_aws.php.
References $cuid, $db, $err, $key, $mem, $r, $val, _createconf(), _createhtpasswd(), allow_login(), and host_list().
allow_login | ( | $login, | |
$id, | |||
$noconf = 0 |
|||
) |
Definition at line 507 of file m_aws.php.
References $cuid, $db, $err, _check(), _createconf(), _createhtpasswd(), and login_exists().
Referenced by add_stats(), and put_stats_details().
alternc_del_domain | ( | $dom | ) |
This function is called on each class when a domain name is uninstalled.
string | $dom | the domain to uninstall |
Definition at line 613 of file m_aws.php.
References $cuid, $db, $dom, $err, $i, $t, _createhtpasswd(), and _delconf().
alternc_del_member | ( | ) |
Definition at line 590 of file m_aws.php.
References $cuid, $db, $err, $i, $t, _createhtpasswd(), and _delconf().
alternc_export | ( | ) |
Exports all the aws related information for an account.
private EXPERIMENTAL 'sid' function ;)
Definition at line 768 of file m_aws.php.
References $cuid, $db, $err, $host, and $r.
alternc_module_description | ( | ) |
Name of the module function.
Definition at line 81 of file m_aws.php.
alternc_password_policy | ( | ) |
change_pass | ( | $login, | |
$pass | |||
) |
Definition at line 488 of file m_aws.php.
References $cuid, $db, $err, _check(), _createhtpasswd(), and login_exists().
check_host_available | ( | $current | ) |
Check if hosts is already used by awstats of available for this member.
Definition at line 255 of file m_aws.php.
References $err, $key, $r, $val, and get_list().
Referenced by select_host_list().
del_login | ( | $login | ) |
Definition at line 453 of file m_aws.php.
References $cuid, $db, $err, _createhtpasswd(), and login_exists().
delete_allowed_login | ( | $id, | |
$noconf = 0 |
|||
) |
Definition at line 539 of file m_aws.php.
References $cuid, $db, $err, _createconf(), and _createhtpasswd().
Referenced by delete_stats(), and put_stats_details().
delete_stats | ( | $id | ) |
Delete a statistic set.
integer | $id | The statistic set ID |
Definition at line 319 of file m_aws.php.
References $cuid, $db, $err, _delconf(), and delete_allowed_login().
deny_login | ( | $login, | |
$id, | |||
$noconf = 0 |
|||
) |
Definition at line 558 of file m_aws.php.
References $cuid, $db, $err, _check(), _createconf(), _createhtpasswd(), and login_exists().
get_hostaliases | ( | $id | ) |
get_list | ( | ) |
Returns an array with all the statistics of a member.
Definition at line 96 of file m_aws.php.
References $cuid, $db, $err, $r, and $t.
Referenced by check_host_available().
get_stats_details | ( | $id | ) |
Return an array with the details for 1 statistic set.
integer | $id | ID of the set we want. |
Definition at line 139 of file m_aws.php.
References $cuid, $db, $err, and $r.
Referenced by put_stats_details().
get_view_public | ( | $id | ) |
hook_menu | ( | ) |
hook_quota_get | ( | ) |
host_list | ( | ) |
Return the list of domains / subdomains allowed for this member with the type (MX,URL,...)
Definition at line 174 of file m_aws.php.
References $cuid, $db, $err, and $r.
Referenced by add_stats(), and select_host_list().
list_allowed_login | ( | $id | ) |
Definition at line 410 of file m_aws.php.
login_exists | ( | $login, | |
$exists = 1 |
|||
) |
Definition at line 440 of file m_aws.php.
References $cuid, $db, and $err.
Referenced by add_login(), allow_login(), change_pass(), del_login(), and deny_login().
prefix_list | ( | ) |
put_stats_details | ( | $id, | |
$users, | |||
$hostaliases, | |||
$public | |||
) |
Edit a statistic set (change allowed user list)
integer | $id | the stat number we change |
array | $users | the list of allowed users |
Definition at line 296 of file m_aws.php.
References $c, $cuid, $db, $err, _createconf(), _createhtpasswd(), allow_login(), delete_allowed_login(), and get_stats_details().
select_host_list | ( | $current | ) |
Draw options for a select html code with the list of allowed and availables domains for this member.
Definition at line 237 of file m_aws.php.
References $c, $key, $r, $val, check_host_available(), and host_list().
select_prefix_list | ( | $current | ) |
Echoes <option> tags of all the domains hosted on the account + the login of the account They can be used as a root for the login that may have access to web statistics hosted on an account $current will be the selected value.
string | $current | The default selected value |
Definition at line 221 of file m_aws.php.
References $c, $key, $r, $val, and prefix_list().
$CONFDIR = "/etc/awstats" |
$TEMPLATEFILE = "/etc/alternc/templates/awstats/awstats.template.conf" |