FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Members_Controller Class Reference
Inheritance diagram for Members_Controller:
Controller

Public Member Functions

 index ()
 Function redirects default member address to show_all function.
 show_all ($limit_results=40, $order_by= 'id', $order_by_direction= 'ASC', $page_word= 'page', $page=1, $regs=0)
 Function shows list of all members.
 applicants ($limit_results=40, $order_by= 'id', $order_by_direction= 'ASC', $page_word= 'page', $page=1, $regs=0)
 Function shows list of all registered applicants.
 approve_multiple_applicants ()
 Approves multiple applicants.
 approve_applicant ($member_id=NULL)
 Form for approving of member.
 delete_applicant ($member_id=NULL)
 Deletes registered applicants.
 show ($member_id=NULL, $limit_results=20, $order_by= 'ip_address', $order_by_direction= 'ASC', $page_word=null, $page=1)
 Shows details of member.
 add ()
 Function adds new member to database.
 edit ($member_id=NULL)
 Form for editing member.
 settings ($member_id=NULL)
 Enables to edid member settings (e.g.
 end_membership ($member_id=null)
 Function ends membership of member.
 restore_membership ($member_id=null)
 Function restores membership of member.
 registration_export ($member_id=NULL)
 Function to export member's registration to PDF or HTML format.
 valid_phone ($input=NULL)
 Checks validity of phone number.
 valid_unique_email ($input=NULL)
 Check if non empty email is unique.
 valid_leaving_date ($input=NULL)
 Leaving has to be after entrance.
 valid_member_type ($input=NULL)
 Function checks validity of member type.
 valid_docimile_street_number ($input=NULL)
 Callback function to validate docimile street number.
- Public Member Functions inherited from Controller
 __construct ()
 Contruct of controller, creates singleton or return it.
 is_user_in_group ($aro_group_id, $aro_id)
 Checks if user is in ARO group.
 acl_check_view ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE)
 Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may view all $axo_value object in $axo_section else return false.
 acl_check_edit ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE)
 Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may edit all $axo_value object in $axo_section else return false.
 acl_check_new ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE)
 Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may add all $axo_value object in $axo_section else return false.
 acl_check_delete ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE)
 Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may delete all $axo_value object in $axo_section else return false.
 build_menu ()
 Build menu.
 url ()
 Return URL for controller and method.
 redirect ($uri=NULL, $id=NULL, $glue= '/')
 Redirects to uri according to attribute noredirect.

Static Public Member Functions

static get_expiration_date ($account)
 Gets expiration date of member's payments.
static valid_username ($input=NULL)
 Checks if username already exists.
static valid_entrance_date ($input=NULL)
 Entrance has to be before current date.
static create_filter_form ()
 Static function for creating filter form due to this filter is used in multiple controllers.
static vtiger_sync ()
 Syncs contacts from FreenetIS to Vtiger CRM.
- Static Public Member Functions inherited from Controller
static & instance ()
 Singleton instance of Controller.
static error ($message_type, $content=NULL)
 Function shows error of given message number.
static warning ($message_type, $content=NULL)
 Function shows warning of given message number.

Static Protected Member Functions

static find_debt_payments (&$payments, $month, $year, $payment_left, $payment_rate)
 It stores debt payments into double-dimensional array (indexes year, month)

Protected Attributes

 $_member_id = false
- Protected Attributes inherited from Controller
 $member_id
 $user_id
 $member_account_id = 1
 $session

Additional Inherited Members

- Public Attributes inherited from Controller
const ICON_ERROR = 1
const ICON_GOOD = 2
const ICON_HELP = 3
const ICON_INFO = 4
const ICON_WARNING = 5
 $arr
 $settings = NULL
 $popup = 0
 $dialog = 0
 $noredirect = FALSE
 $user_has_voip = 0
 $ip_address_span = ''
 $unread_user_mails = 0
 $count_of_unclosed_logged_errors = 0
 $devices_down_count = 0
 $user_favourites_pages = NULL
 $axo_doc_access = FALSE
- Protected Member Functions inherited from Controller
 is_preprocesor_enabled ()
 This methods defines whether the preprocessor of MY_Controller is loaded or not.

Member Function Documentation

Members_Controller::add ( )

Function adds new member to database.

Creates user of type member assigned to this member.

Members_Controller::applicants (   $limit_results = 40,
  $order_by = 'id',
  $order_by_direction = 'ASC',
  $page_word = 'page',
  $page = 1,
  $regs = 0 
)

Function shows list of all registered applicants.

Author
Ondřej Fibich
Parameters
integer$limit_results
string$order_by
string$order_by_direction
integer$page_word
integer$page
Members_Controller::approve_applicant (   $member_id = NULL)

Form for approving of member.

Author
Ondřej Fibich
See Also
#369
Parameters
integer$member_id
Members_Controller::approve_multiple_applicants ( )

Approves multiple applicants.

Exceptions
Exception
static Members_Controller::create_filter_form ( )
static

Static function for creating filter form due to this filter is used in multiple controllers.

Returns
Members_Controller::delete_applicant (   $member_id = NULL)

Deletes registered applicants.

Author
Ondřej Fibich
Parameters
integer$member_id
Members_Controller::edit (   $member_id = NULL)

Form for editing member.

Parameters
integer$member_idid of member to edit
Members_Controller::end_membership (   $member_id = null)

Function ends membership of member.

Parameters
integer$member_id
static Members_Controller::find_debt_payments ( $payments,
  $month,
  $year,
  $payment_left,
  $payment_rate 
)
staticprotected

It stores debt payments into double-dimensional array (indexes year, month)

Author
Michal Kliment
Parameters
array$payments
int$month
int$year
float$payment_left
float$payment_rate
static Members_Controller::get_expiration_date (   $account)
static

Gets expiration date of member's payments.

Author
Michal Kliment, Ondrej Fibich
Parameters
object$account
Returns
string
Members_Controller::index ( )

Function redirects default member address to show_all function.

Returns
unknown_type
Members_Controller::registration_export (   $member_id = NULL)

Function to export member's registration to PDF or HTML format.

Author
Michal Kliment
Parameters
integer$member_id
Members_Controller::restore_membership (   $member_id = null)

Function restores membership of member.

Parameters
integer$member_id
Members_Controller::settings (   $member_id = NULL)

Enables to edid member settings (e.g.

notification settings).

Parameters
integer$member_idMember ID
Members_Controller::show (   $member_id = NULL,
  $limit_results = 20,
  $order_by = 'ip_address',
  $order_by_direction = 'ASC',
  $page_word = null,
  $page = 1 
)

Shows details of member.

Parameters
integer$member_idid of member to show
string$order_bysorting column
string$order_by_directionsorting direction
Members_Controller::show_all (   $limit_results = 40,
  $order_by = 'id',
  $order_by_direction = 'ASC',
  $page_word = 'page',
  $page = 1,
  $regs = 0 
)

Function shows list of all members.

Parameters
integer$limit_results
string$order_by
string$order_by_direction
integer$page_word
integer$page
Members_Controller::valid_docimile_street_number (   $input = NULL)

Callback function to validate docimile street number.

Author
Michal Kliment
Parameters
object$input
static Members_Controller::valid_entrance_date (   $input = NULL)
static

Entrance has to be before current date.

Parameters
object$input
Returns
unknown_type
Members_Controller::valid_leaving_date (   $input = NULL)

Leaving has to be after entrance.

Parameters
object$input
Returns
unknown_type
Members_Controller::valid_member_type (   $input = NULL)

Function checks validity of member type.

Parameters
object$input
Returns
unknown_type
Members_Controller::valid_phone (   $input = NULL)

Checks validity of phone number.

Parameters
$inputnew phone number
Members_Controller::valid_unique_email (   $input = NULL)

Check if non empty email is unique.

Parameters
object$input
static Members_Controller::valid_username (   $input = NULL)
static

Checks if username already exists.

Parameters
string$inputnew username
static Members_Controller::vtiger_sync ( )
static

Syncs contacts from FreenetIS to Vtiger CRM.

Author
Jan Dubina

The documentation for this class was generated from the following file: