File/plugins/vadmin/includes/dba_functions.inc

Description

dba_functions.inc ------------------ This include file implements Vadmin 2.0 storage API.

Licensed under GNU GPL v2. Please see COPYING for full terms.

$Id: dba_functions.inc,v 1.6 2003/07/09 22:01:39 graf25 Exp $

  • author: Konstantin Riabitsev ($Author: graf25 $)
  • version: $Date: 2003/07/09 22:01:39 $
Functions
dbastor_check_db (line 432)
void dbastor_check_db ( $dbname, [ $quick = false])
  • $dbname
  • $quick
dbastor_create_db (line 466)
void dbastor_create_db ( $dbname)
  • $dbname
dbastor_delete (line 582)
void dbastor_delete ( $dbname,  $key)
  • $dbname
  • $key
dbastor_get (line 509)
void dbastor_get ( $dbname,  $key, [ $crypto = true])
  • $dbname
  • $key
  • $crypto
dbastor_get_crosses (line 641)
void dbastor_get_crosses ()
dbastor_get_dbfile (line 423)
void dbastor_get_dbfile ( $dbname)
  • $dbname
dbastor_get_limits (line 666)
void dbastor_get_limits ( $domain)
  • $domain
dbastor_get_lowly (line 653)
void dbastor_get_lowly ( $domain)
  • $domain
dbastor_get_prefs (line 609)

This function parses the prefs file into an array and returns it. It also uses the session for caching, so if the prefs are already in session, it loads them from there.

  • return: nested array with all domain prefs.
a dbastor_get_prefs ( $domain)
  • $domain
dbastor_get_templates_ary (line 624)
void dbastor_get_templates_ary ()
dbastor_list_all (line 489)
void dbastor_list_all ()
dbastor_put (line 541)
void dbastor_put ( $dbname,  $key,  $data, [ $crypto = true])
  • $dbname
  • $key
  • $data
  • $crypto
dbastor_put_crosses (line 647)
void dbastor_put_crosses ( $cross_ary)
  • $cross_ary
dbastor_put_limits (line 673)
void dbastor_put_limits ( $domain,  $lim_ary)
  • $domain
  • $lim_ary
dbastor_put_lowly (line 660)
void dbastor_put_lowly ( $domain,  $lowly_ary)
  • $domain
  • $lowly_ary
dbastor_put_prefs (line 595)

This function saves the domain preferences into the "prefs" file located in the domain directory specified by the $VADMIN_DIR global var.

void. dbastor_put_prefs ($prefs $domain,  $prefs_ary)
  • $prefs $domain: An associative array with the preferences data for this domain.
  • $prefs_ary
dbastor_put_templates_ary (line 635)
void dbastor_put_templates_ary ( $tmpl_ary)
  • $tmpl_ary
recursive_delete (line 837)
void recursive_delete ( $dir)
  • $dir
vadmin_add_cross (line 306)
void vadmin_add_cross ( $domain,  $cross)
  • $domain
  • $cross
vadmin_delete_cross (line 320)
void vadmin_delete_cross ( $domain,  $cross)
  • $domain
  • $cross
vadmin_delete_template (line 167)
void vadmin_delete_template ( $tmplname)
  • $tmplname
vadmin_del_pic (line 128)
void vadmin_del_pic ( $domain)
  • $domain
vadmin_domain_exists (line 20)

Functions starting with vadmin_* implement the storage API.

Functions starting with dbastor_* are internal to this implementation.

void vadmin_domain_exists ( $domain)
  • $domain
vadmin_domain_passwd_issaved (line 56)
void vadmin_domain_passwd_issaved ( $domain)
  • $domain
vadmin_enable_domain (line 68)
void vadmin_enable_domain ( $domain)
  • $domain
vadmin_get_cross_array (line 272)

This function returns an array with all CROSS admins for the domain in question.

  • return: array with the usernames.
an vadmin_get_cross_array ($domain $domain)
  • $domain $domain: the name of the domain to look for.
vadmin_get_domain_passwd (line 82)

This function will return a stored domain password or false if there isn't one.

  • return: domain password stored in $domain/passwd, or false if that file is empty.
the vadmin_get_domain_passwd ($domain $domain)
  • $domain $domain: a vadmin domain.
vadmin_get_limit (line 381)
void vadmin_get_limit ( $domain,  $level,  $def)
  • $domain
  • $level
  • $def
vadmin_get_lowly_array (line 253)
void vadmin_get_lowly_array ( $domain)
  • $domain
vadmin_get_pic (line 105)
void vadmin_get_pic ( $domain)
  • $domain
vadmin_get_pref (line 352)

This function returns the stored preference.

  • return: with the value of the preference
string vadmin_get_pref ($domain $domain, $prefname $prefname)
  • $domain $domain: the name of the domain to look up the preference for.
  • $prefname $prefname: the preference name to return.
vadmin_get_template (line 148)
void vadmin_get_template ( $tmplname)
  • $tmplname
vadmin_get_template_list (line 137)
void vadmin_get_template_list ()
vadmin_get_user_designation (line 189)

This function finds out the designation of a given user -- see if the user is just a user, a lowly administrator, a cross, or an elvis.

  • return: string with one of the following: 'NONER' if this is just a user. 'LOWLY' if this is a lowly admin 'CROSS' if this is a cross-admin 'ELVIS' if this is elvis!
a vadmin_get_user_designation ($domain $domain, $username $username)
  • $domain $domain: a domain name to look up designation for.
  • $username $username: a username to look up designation for.
vadmin_get_xdomain_array (line 290)
void vadmin_get_xdomain_array ( $username)
  • $username
vadmin_list_enabled_domains (line 39)
void vadmin_list_enabled_domains ()
vadmin_put_domain_passwd (line 100)
void vadmin_put_domain_passwd ( $domain,  $clearpass)
  • $domain
  • $clearpass
vadmin_put_limit (line 400)
void vadmin_put_limit ( $domain,  $level,  $def,  $value)
  • $domain
  • $level
  • $def
  • $value
vadmin_put_lowly_array (line 261)
void vadmin_put_lowly_array ( $domain,  $lowly_ary)
  • $domain
  • $lowly_ary
vadmin_put_pic (line 118)
void vadmin_put_pic ( $domain,  $contents)
  • $domain
  • $contents
vadmin_put_pref (line 373)

This function stores the preference.

void. vadmin_put_pref ($domain $domain, $prefname $prefname, $prefval $prefval)
  • $domain $domain: the name of the domain to store the pref for.
  • $prefname $prefname: the name of the preference to store.
  • $prefval $prefval: the value of the preference.
vadmin_put_template (line 159)
void vadmin_put_template ( $tmplname,  $contents)
  • $tmplname
  • $contents
vadmin_upgrade_v1 (line 683)
void vadmin_upgrade_v1 ( $domain)
  • $domain

Documentation generated on Sun, 22 Nov 2009 17:36:25 +0200 by phpDocumentor 1.4.3