\UserProfile
User profile loading and rendering class
Synopsis
class UserProfile
{
- // constants
- const EX_EMPTY_LOGIN = 'EMPTY_USERNAME_RECEIVED';
- const EX_EMPTY_USERDATA = 'EMPTY_DATABASE_USERDATA';
- const MAIN_ROW_HEADER_WIDTH = '30%';
- const MAIN_CONTROLS_SIZE = '90px';
- const MAIN_PLUGINS_SIZE = '64';
- const MAIN_OVERLAY_DISTANCE = '150px';
- const MAIN_TABLE_STYLE = 'style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2"';
- const URL_PROFILE = '?module=userprofile&username=';
- // members
- protected array $alterCfg = ;
- protected $ubConfig = NULL;
- protected array $userdata = ;
- protected array $phonedata = ;
- protected array $aptdata = ;
- protected string $AllUserData = '';
- protected string $highlightStart = '';
- protected string $highlightEnd = '';
- protected string $plugins = '';
- protected string $login = '';
- protected string $useraddress = '';
- protected string $realname = '';
- protected string $phone = '';
- protected string $mobile = '';
- protected string $contract = '';
- protected string $mail = '';
- protected string $speedoverride = '';
- protected string $mac = '';
- protected string $buildgeo = '';
- protected string $paymentid = '';
- protected array $mobilesExt = ;
- protected $customFields = '';
- protected string $esmsTemplatePath = 'content/documents/easy_sms_template/easy_sms.tpl';
- // methods
- public void __construct()
- protected void loadAlter()
- protected void loadHighlight()
- protected void loadUserdata()
- protected void loadUserAlldata()
- protected array extractUserAllData()
- protected void loadAptdata()
- protected void loadSpeedoverride()
- protected string getSearchmacControl()
- protected string getProfileFdbSearchControl()
- protected string getVisorBacklinks()
- protected string getCatvBacklinks()
- protected string getAdcommentsIndicator()
- protected array loadPluginsRaw()
- protected string loadPluginsOverlay()
- protected void loadPlugins()
- protected void loadPaymentID()
- protected void loadMobilesExt()
- protected void loadCustomFields()
- public array extractUserData()
- public array extractUserAddress()
- public array extractUserRealName()
- public array extractUserContract()
- protected string addRow()
- protected string getControl()
- protected string getMainControls()
- protected string getUserPassword()
- protected string getUserLinking()
- protected string getTaskCreateControl()
- protected string getBuildLocatorExt()
- protected string getBuildControls()
- protected string getPassportDataControl()
- protected string getUserCash()
- protected void getUserCreditExpire()
- protected string getUserConnectionDetails()
- protected string getUserDealWithItNotification()
- protected string getUserLat()
- protected string getContractDate()
- protected string getSwitchAssignControls()
- protected string getZabbixProblemControls()
- protected string getVlanAssignControls()
- protected void getQinqPairControls()
- protected string getVlanOnline()
- protected string getPonSignalControl()
- protected string getUserOnlineDN()
- protected string getUserKarma()
- protected string getCorporateControls()
- protected string getMobileControls()
- protected string getAgentsControls()
- protected string getSignupPricing()
- protected string getDiscountController()
- protected getEasyCreditController()
- protected string getEasyFreezeController()
- protected string getExtNetsControls()
- protected string getPhotostorageControls()
- protected string getUserBranchName()
- protected string getCemeteryControls()
- protected string getTariffInfoContrainer()
- protected string getTariffInfoControls()
- protected string getUserCpeControls()
- protected string getMobilesExtControl()
- protected string getDistrictControls()
- protected string getContractControls()
- protected string getFreeMbControls()
- protected string getSMSHistoryControls()
- protected string getSMSserviceSelectorControls()
- protected string getROSPPPoESessionData()
- protected string getDataExportPermissionTrigger()
- protected string getEasyChargeController()
- protected string getDeferredSaleController()
- protected string getReceiptControls()
- protected string getNasInfoControls()
- protected string getNasInfoContrainer()
- protected string getAddressExtenControls()
- public string render()
Constants
Name | Value |
---|---|
EX_EMPTY_LOGIN | 'EMPTY_USERNAME_RECEIVED' |
EX_EMPTY_USERDATA | 'EMPTY_DATABASE_USERDATA' |
MAIN_ROW_HEADER_WIDTH | '30%' |
MAIN_CONTROLS_SIZE | '90px' |
MAIN_PLUGINS_SIZE | '64' |
MAIN_OVERLAY_DISTANCE | '150px' |
MAIN_TABLE_STYLE | 'style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2"' |
URL_PROFILE | '?module=userprofile&username=' |
Members
protected
- $AllUserData
—
array
Array of all available non cached login=>data - $alterCfg
—
array
System config alter.ini content as array key=>value - $aptdata
—
array
Current user apartment data array - $buildgeo
—
string
Build geo location - $contract
—
string
Current user contract number - $customFields
—
Contains custom profile fields instance for current user - $esmsTemplatePath
—
string
Path to SMS template for user quick credentials sending - $highlightEnd
—
string
Important profile fields highlighting end - $highlightStart
—
string
Important profile fields highlighting start - $login
—
string
Current user login. Must be set in constructor - $mac
—
string
MAC address associated with network host record, via current user IP - $mail
—
string
Current user e-mail address - $mobile
—
string
Current user mobile phone - $mobilesExt
—
array
Contains preloaded additional mobiles numbers - $paymentid
—
string
Payment ID of current user - $phone
—
string
Current user phone - $phonedata
—
array
Current user phone data as 'phone' and 'mobile' keys array - $plugins
—
string
Available preloaded profile plugins - $realname
—
string
Current user real name - $speedoverride
—
string
Current user tariff speed override value - $ubConfig
—
null
UbillingConfig object placeholder - $useraddress
—
string
Current user full address - $userdata
—
array
Current login stargazer user data
Methods
protected
- addRow() — returns prepared main profile body row with two data cells
- extractUserAllData() — returns private all userdata property to external scope
- getAdcommentsIndicator() — Returns ADcomments indicator
- getAddressExtenControls() — Returns cached user extended address info rows
- getAgentsControls() — Checks agent assing and return controls if needed
- getBuildControls() — gets build location control and neighbors cache lister
- getBuildLocatorExt() — Returns extended build locator modal window
- getCatvBacklinks() — returns catv backlinks if enabled
- getCemeteryControls() — Cemetery controls
- getContractControls() — Returns user contracts row
- getContractDate() — Returns Optional contract date row
- getControl() — returns task control for getMainControls
- getCorporateControls() — gets corporate users handling controls
- getDataExportPermissionTrigger() — Returns users data export allowance trigger if appropriate alter.ini option is set
- getDeferredSaleController() — Renders deferred sales controller and form
- getDiscountController() — Returns discount controller
- getDistrictControls() — Returns cached user districts list row
- getEasyChargeController() — Returns easy charge form and controller
- getEasyCreditController() — returns easy credit controller if feature is enabled
- getEasyFreezeController() — Returns EasyFreeze controller if feature is enabled
- getExtNetsControls() — extended network pools controller
- getFreeMbControls() — Returns FreeMb profile row
- getMainControls() — Returns primary prifile controls with most used actions
- getMobileControls() — Returns mobile controls if required
- getMobilesExtControl() — Renders additional user mobile numbers
- getNasInfoContrainer() — Returns user NAS info container for data display
- getNasInfoControls() — Returns user NAS info ajax controls
- getPassportDataControl() — returns passport data controls
- getPhotostorageControls() — Photostorage controls
- getPonSignalControl() — Renders PON signal from cache
- getProfileFdbSearchControl() — Returns FDB cache search control if FDB_SEARCH_IN_PROFILE option enabled
- getQinqPairControls()
- getROSPPPoESessionData() — Returns spoiler block with user's active PPPoE session data
- getReceiptControls() — Returns receipt controls (BOBER GDE COMMENT????)
- getSMSHistoryControls() — Returns SMS history button if appropriate alter.ini options are set
- getSMSserviceSelectorControls() — Returns SMS services selector if appropriate alter.ini option is set
- getSearchmacControl() — returns vendor by MAC search control if this enabled in config
- getSignupPricing() — signup prices controller
- getSwitchAssignControls() — gets switch assing profile controls
- getTariffInfoContrainer() — Returns tariff info container for data display
- getTariffInfoControls() — Returns tariff info ajax controls
- getTaskCreateControl() — Processing of task creation in profile feature
- getUserBranchName() — If branches enabled - returns user current branch name
- getUserCash() — returns user cash data with round and colorize if needed
- getUserConnectionDetails() — Returns user connection details with optional controls inside if enabled
- getUserCpeControls() — Returns WiFi CPE user controls
- getUserCreditExpire() — gets and formats credit expiration date
- getUserDealWithItNotification() — Renders users available deal with it tasks notification
- getUserKarma() — Returns user karma state notification
- getUserLat() — gets and preformats last activity time
- getUserLinking() — processing of old user linking with redirects to parent user
- getUserOnlineDN() — returns DN online detect aka "star"
- getUserPassword() — returns user password and masks it if needed
- getVisorBacklinks() — Returns backlink to surveilance user primary profile
- getVlanAssignControls() — Returns user Vlan assign controls
- getVlanOnline() — Returns Vlan online detection form
- getZabbixProblemControls() — gets zabbix profile controls
- loadAlter() — loads current alter.ini config into private prop, once at start
- loadAptdata() — loads user apartment data like floor or entrance from database
- loadCustomFields() — Preloads custom profile fields instance
- loadHighlight() — loads highlight properties if needed
- loadMobilesExt() — Preloads extended mobile numbers from database
- loadPaymentID() — calculates PaymentID or extract from database as is
- loadPlugins() — loads pofile plugins if enabled into private plugins property
- loadPluginsOverlay() — load plugins overlay data
- loadPluginsRaw() — Returns raw plugins data. Plugins initialization files must be stored in CONFIG_PATH
- loadSpeedoverride() — loads user speed override from database
- loadUserAlldata() — loads All user data from database in pricate data property
- loadUserdata() — loads stargazer user data from database in pricate data property
public
- __construct() — Creates an user profile object instance and sets/preloads all of required data
- extractUserAddress() — returns private useraddress property to external scope
- extractUserContract() — returns private contract property to external scope
- extractUserData() — returns private userdata property to external scope
- extractUserRealName() — returns private realname property to external scope
- render() — Renders user profile with all loaded data