\

Classes

ADcomments Universal additional comments class which allows attach comments for any items on some scope
AdminAnnouncements Ubilling administrator announcements basic class
agentAssignReport Agent assigns report class
AndroidApp Android application implementation https://github.com/romaznova/ubilling
Announcements Ubilling user announcements basic class
ApiException Nothing to see here
AskoziaNum Askozia PBX incoming calls processing class
Asterisk Asterisk PBX basic integration class
AutoConfigurator Network devices automatic configuration
AutoCredit Automatic user credits setting class
AutoLogout Basic user-idle auto logout class
Avarice One of se7en deadly sins
BadKarma Basic MySQL user cash storage double precision fixing class
Banksta2 Bank statements processing class
BankstaMd XLS Bank statements processing class
BarcodeQR BarcodeQR - Code QR Barcode Image Generator (PNG)
BuildPassport Extended Build information base class
CallMeBack callback service implementation
CapabilitiesDirectory Capabilities directory base class
Cemetery Dead users burial implementation
ColorTagging Class for coloring users by tag color
ConnectionDetails Connection (signup) details base class
Corps Corporate aka enterprise users implementation
CrimeAndPunishment Penalty aka Crime and punishment implementation
CrontabEditor System crontab editor class
CumulativeDiscounts Cumulative discounts implementation
CustomMaps Custom users maps class
DarkVoid Notification area aka DarkVoid class
DbConnect Yet another manual database connection class
dbf_class DBF reader Class v0.04 by Faro K Rasyid (Orca) orca75_at_dotgeek_dot_org v0.05 by Nicholas Vrtis vrtis_at_vrtisworks_dot_com 1) changed to not read in complete file at creation.
DealWithIt Per-user task scheduler
Diff A class containing a diff implementation
Districts Coverage map districts absctraction
DOCXTemplate Replace {var} in MS Word 2007+ documents (*.docx)
DoomsDayTariffs Automatic user tariff migration aka Dooms Day Tariffs class
DreamKas DreamKas service interraction class
DreamKasNotifications DreamKas notification area
DynamicShaper User dynamic shaper with speeds self-changing depends on time of day
Envy Equipment configuration backup aka Envy implementation
ExistentialHorse System-wide previous periods statistics arhive aka Existential Horse
ExtNets Extended network pools implementation
FDBArchive Network equipment FDB tables archive implementation
FileStorage Allows to attach files to random items in some scope
ForWhomTheBellTolls Incoming calls notifications class
FriendshipIsMagic Referal like bonus program for users
FundsFlow Financial data preprocessing and rendering class
GenerateCard Generate print card management API
GlobalMenu Ubilling global menu rendering and customization class
GlobalSearch Ubilling user search implementation
HlsTV OmegaTV low-level API implementation
IpChange User IP changing/management implementation
ItSaTrap SNMP traps processing class
JunAcct JuniperMX NAS accounting data processing
JunCast JuniperMX NAS COA/POD casting implementation
JunGen Old-school Juniper MX NAS support
LoginForm Ubilling administrative interface login form
MapOn MapOn cars GPS location service API wrapper
MaponAPI Mapon cars GPS location service low-level api
MegogoApi Megogo OTT service low-level API
MegogoInterface Megogo OTT service implementation class
MessagesQueue System-wide outcoming messages queue for SMS/Telegram/Emails etc.
Metabolism User signup and payments extended stats
mikbill Mikbill migration class
MobilesExt Additional users mobile numbers
MRNN Most Retarded Neural Network ever. Yep, with single neuron.
MTsigmon MikroTik/UBNT signal monitoring class
MultiGen Most awesome FreeRADIUS support implementation ever
MySQLDB MySQL database old driver abstraction class. Used for PHP <7 legacy.
NasMon Network access servers management class
NyanORM Basic Ubilling database abstraction prototype
OeFails Electrical failures reporting class
OmaeUrl Basic remote URLs interaction class
OmegaTV OmegaTV OTT service implementation
OnePunch Allows you to be an Saitama!
OnuBase PON ONU management basic class
OnuConfigurator PON ONU configuration class
OnuDelete PON ONU deletion class
OnuDeregister PON ONU degegistering class
OnuDescribe PON ONU describe management class
OnuMaster Class for managing ONU/ONT.
OnuReboot PON ONU rebooting class
OnuRegister Class for registering ONU/ONT on ZTE OLTs.
OpDenied OpenPayz access management implementation
OpenPayz Basic OpenPayz implementation
PerCityAction Class for making some reports in range on one city
PhotoStorage PhotoStorage allows to attach images for any kind of items on some scope
PoliceDog Allows control apper of some MAC address in billing reality
Polls Polls/Votes management here
PollsReport Polls/votes report class
PollVoteAdmin Administrators Votes/Polls class
PONBoxes PON Boxes allows to place/render some boxes on map
PONIfDesc Allows to attach some description on PON OLT interfaces
PONizer PON devices management/monitoring support
PONizerLegacy PON devices management/monitoring support
PONONUMAP Performs rendering of exiting user-assigned PON ONU devices on coverage map
PonZte ZTE PON devices management
PowerTariffs Alternative tariffication model
PrintReceipt Receipts/Bills printing
ProfileDocuments DOCx profile documents base class
Realms VLAN management realms class
Reminder User SMS notification class
RouterOS Mikrotik API implementation
Salary Employee salary accounting implementation
SendDog SMS/Telegram/Email messages sending implementation
SendDogAdvanced Multi-service SendDog implementation
SignupConfig sigreq configuration class
SignupRequests Base signup requests handling class
simpleOverlay And again one more database interconnection abstraction class
SmartUP Basic SmartUP interconnection class
SMSDirections Flexible SMS routing implementation
SMSHistory I ain't happy, I'm feeling glad I got sunshine in a bag I'm useless, but not for long The future is coming on
SMSServiceApi Class SMSServiceApi to be inherited by real SMS services APIs implementations located in 'api/vendor/sms_service_APIs' to provide re-usability and common interaction interface for SendDogAdvanced class
SMSZilla Powerful SMS sending mechanics there
SNMPHelper Ubilling SNMP abstraction class
SormYahont SORM Yahont draft support
SphinxDB Sphinx database abstraction layer
SphinxSearch Sphinx user-search implementation
StickyNotes Administator reminders and notes implementation
SwitchCash Switches profitability implementation
SwitchesQinQ Switches QinQ management
SwitchGroups Allows to put some switches into groups
SwitchHistory Renders events which happens with some switch devices
SwitchLogin Siwtches auth data and management basic class
SwitchUplinks Siwtches uplink parameters management class
TagCloud User tags cloud rendering
TaskbarWidget Basic taskbar widgets class.
TaskFlow Extended tasks processing implementation based on task states
TaskStates Performs tasks processing states management in taskman
Telepathy Prophetic guessing login by the address/surname/realname
TrassirServer Basic low-level Trassir Server NVRs interraction class.
TrinityTv TrinityTV OTT service implementation
TrinityTvApi TrinityTV low-level API implementation
TSupportApi Looks like forgotten external applications interraction interface
UbillingBranches ISP branches implementation
UbillingCache System-wide caching abstraction engine
UbillingConfig Basic Ubilling configs abstraction class
UbillingDHCP ISC-DHCPD server management class
UbillingLDAPManager LDAP database management class
UbillingMail Emails sending basic class
UbillingMessageHelper System message helper class
UbillingPHPMail Ubilling email sending based on phpmail class
UbillingSMS SMS queue handling class
UbillingTaskbar Taskbar loading and rendering class
UbillingTelegram Telegram bot API implementation
UbillingUpdateManager Performs deploy of database and config files updates
UbillingUpdateStuff Ubilling updates deployment routines
UbillingVisor Surveillance accounting and management implementation
UbillingWhois Allows to receive some data about IPs and domains
UBMorph Morphological values converter
ubRouting Basic Ubilling GET/POST abstraction and filtering class
UHW Unknown Hardware Helper
UkvSystem UKV cable TV accounting implementation
UniversalQINQ Yet another QinQ implementation.
UserProfile User profile loading and rendering class
UserSideApi Userside integration API https://www.userside.eu
VlanGen VLAN gen - nothing to see here!
VlanMacHistory Vlan MAC history class
VlanManagement Like IPAM for VLAN
VlanTerminator VLAN terminator class
Warehouse Basic warehouse accounting implementation
WatchDog Flexible system monitoring aka WatchDog implementation
WatchDogInterface Watchdog tasks management and other interfaces
wf_JqDtHelper Jqeury Data tables JSON formatting class
WhiteBoard Just whiteboard. Helps to manage some non-urgent projets. Yep, without markers.
WhyDoYouCall Missed calls notification subsystem
WifiCPE Client side wireless equipment management subsystem
WolfDispatcher Universal Telegram bot hooks extendable class
ZabbixAPI Class ZabbixAPI

Constants

DEBUG

DEBUG

Debug on/off flag

IMG_CARD

IMG_CARD

Returns print card lister with some controls

IMG_CARD_TEMPLATE

IMG_CARD_TEMPLATE

PRINT_TEMPLATE

PRINT_TEMPLATE

Functions

__()

__(string  $str) : string

Dummy i18n function

Parameters

string $str

Returns

string

AddMacSeparator()

AddMacSeparator(string  $mac, string  $separator = ':') : string

Adds some MAC separator into MAC

Parameters

string $mac
string $separator

Returns

string

ajax_AptCreationForm()

ajax_AptCreationForm() : string

Returns ajax apt creation form

Returns

string

ajax_BuildSelector()

ajax_BuildSelector(  $streetid) : string

Return Ajax build selection box

Parameters

$streetid
  • street id

Returns

string

ajax_IpEditForm()

ajax_IpEditForm(  $serviceid) : void

Returns ajax ip proposal and control

Parameters

$serviceid

ajax_StreetSelector()

ajax_StreetSelector(  $cityid) : string

Return Ajax street selection box

@param $cityid - city id

Parameters

$cityid

Returns

string

bs_AddressEdit()

bs_AddressEdit(  $id,   $address) 

Parameters

$id
$address

bs_AddressEditForm()

bs_AddressEditForm(  $id,   $address = '') 

Parameters

$id
$address

bs_CheckHash()

bs_CheckHash(  $hash) 

Parameters

$hash

bs_CheckProcessed()

bs_CheckProcessed(  $hash) 

Parameters

$hash

bs_cu_IsParent()

bs_cu_IsParent(  $login,   $allparentusers) 

Parameters

$login
$allparentusers

bs_DeleteBanksta()

bs_DeleteBanksta(  $hash) 

Parameters

$hash

bs_FilePush()

bs_FilePush(  $filename,   $rawdata) 

Parameters

$filename
$rawdata

bs_LockRow()

bs_LockRow(  $rowid) 

Parameters

$rowid

bs_LoginProposalForm()

bs_LoginProposalForm(  $id,   $login = '') 

Parameters

$id
$login

bs_NameEdit()

bs_NameEdit(  $id,   $name) 

Parameters

$id
$name

bs_NameEditForm()

bs_NameEditForm(  $id,   $name = '') 

Parameters

$id
$name

bs_ParseRaw()

bs_ParseRaw(  $rawid) 

Parameters

$rawid

bs_ProcessHash()

bs_ProcessHash(  $hash) 

Parameters

$hash

bs_ProcessingForm()

bs_ProcessingForm(  $hash) 

Parameters

$hash

bs_SearchCheckArr()

bs_SearchCheckArr(  $alluseraddress,   $allrealnames) 

Parameters

$alluseraddress
$allrealnames

bs_SearchLoginByAddresspart()

bs_SearchLoginByAddresspart(  $queryaddress,   $queryname,   $checkarr) 

Parameters

$queryaddress
$queryname
$checkarr

bs_ShowAllStatements()

bs_ShowAllStatements() 

bs_ShowHash()

bs_ShowHash(  $hash) 

Parameters

$hash

bs_UploadFile()

bs_UploadFile() 

bs_UploadFileForm()

bs_UploadFileForm() 

bs_UploadFormBody()

bs_UploadFormBody(  $action,   $method,   $inputs,   $class = '') 

Bank statements api

Parameters

$action
$method
$inputs
$class

catv_ActivityCheck()

catv_ActivityCheck(  $userid,   $allstates) 

Parameters

$userid
$allstates

catv_ActivityCreate()

catv_ActivityCreate(  $userid,   $state) 

Parameters

$userid
$state

catv_ActivityCreateCustomDate()

catv_ActivityCreateCustomDate(  $userid,   $state,   $customdate) 

Parameters

$userid
$state
$customdate

catv_ActivityGetAllByUser()

catv_ActivityGetAllByUser(  $userid) 

Parameters

$userid

catv_ActivityGetAllByUserAndYear()

catv_ActivityGetAllByUserAndYear(  $userid,   $year) 

Parameters

$userid
$year

catv_ActivityGetLastAll()

catv_ActivityGetLastAll() 

catv_ActivityGetLastByUser()

catv_ActivityGetLastByUser(  $userid) 

Parameters

$userid

catv_ActivityGetTimeLastByUser()

catv_ActivityGetTimeLastByUser(  $userid) 

Parameters

$userid

catv_ActivityShowAll()

catv_ActivityShowAll(  $userid) 

Parameters

$userid

catv_AjaxBuildSelector()

catv_AjaxBuildSelector(  $street) 

Parameters

$street

catv_AjaxOnlineDataSource()

catv_AjaxOnlineDataSource() 

catv_AjaxSubmit()

catv_AjaxSubmit() 

catv_CalendarBody()

catv_CalendarBody() 

catv_CalendarMonthColorizer()

catv_CalendarMonthColorizer(  $month,   $class) 

Parameters

$month
$class

catv_CalendarOnlineColorizer()

catv_CalendarOnlineColorizer(  $month,   $class) 

Parameters

$month
$class

catv_CalendarSetBad()

catv_CalendarSetBad(  $month) 

Parameters

$month

catv_CalendarSetGood()

catv_CalendarSetGood(  $month) 

Parameters

$month

catv_CalendarSetGoodLong()

catv_CalendarSetGoodLong(  $month) 

Parameters

$month

catv_CalendarSetOffline()

catv_CalendarSetOffline(  $month) 

Parameters

$month

catv_CalendarSetOnline()

catv_CalendarSetOnline(  $month) 

Parameters

$month

catv_CalendarWrite()

catv_CalendarWrite(  $month,   $text) 

Parameters

$month
$text

catv_CalendarWriteActivity()

catv_CalendarWriteActivity(  $month,   $text) 

Parameters

$month
$text

catv_CashAdd()

catv_CashAdd(  $userid,   $date,   $summ,   $from_month,   $from_year,   $to_month,   $to_year,   $notes) 

Parameters

$userid
$date
$summ
$from_month
$from_year
$to_month
$to_year
$notes

catv_CashAddForm()

catv_CashAddForm(  $userid) 

Parameters

$userid

catv_CashCorrect()

catv_CashCorrect(  $userid,   $date,   $summ,   $from_month,   $from_year,   $to_month,   $to_year,   $notes) 

Parameters

$userid
$date
$summ
$from_month
$from_year
$to_month
$to_year
$notes

catv_CashEdit()

catv_CashEdit(  $paymentid,   $date,   $summ,   $from_month,   $from_year,   $to_month,   $to_year,   $notes) 

Parameters

$paymentid
$date
$summ
$from_month
$from_year
$to_month
$to_year
$notes

catv_CashEditForm()

catv_CashEditForm(  $paymentid) 

Parameters

$paymentid

catv_CashMock()

catv_CashMock(  $userid,   $date,   $summ,   $from_month,   $from_year,   $to_month,   $to_year,   $notes) 

Parameters

$userid
$date
$summ
$from_month
$from_year
$to_month
$to_year
$notes

catv_CashPaymentDelete()

catv_CashPaymentDelete(  $paymentid) 

Parameters

$paymentid

catv_CashPaymentGetData()

catv_CashPaymentGetData(  $paymentid) 

Parameters

$paymentid

catv_CashSet()

catv_CashSet(  $userid,   $date,   $summ,   $from_month,   $from_year,   $to_month,   $to_year,   $notes) 

Parameters

$userid
$date
$summ
$from_month
$from_year
$to_month
$to_year
$notes

catv_DecoderChange()

catv_DecoderChange(  $userid,   $decoder) 

Parameters

$userid
$decoder

catv_DecoderGetAllByUser()

catv_DecoderGetAllByUser(  $userid) 

Parameters

$userid

catv_DecoderShowAllChanges()

catv_DecoderShowAllChanges(  $userid) 

Parameters

$userid

catv_ExportUserbaseCsv()

catv_ExportUserbaseCsv() 

catv_FeeChargeAllUsers()

catv_FeeChargeAllUsers(  $month,   $year) 

Parameters

$month
$year

catv_FeeChargeCheck()

catv_FeeChargeCheck(  $month,   $year) 

Parameters

$month
$year

catv_FinanceReport()

catv_FinanceReport() 

catv_GetAllContracts()

catv_GetAllContracts() 

catv_GetAllRealnames()

catv_GetAllRealnames() 

catv_GetFullAddressList()

catv_GetFullAddressList() 

catv_GlobalControlsShow()

catv_GlobalControlsShow() 

This shit is deprecated and will be removed soon

catv_LoadConfig()

catv_LoadConfig() 

catv_PaymentsGetAllByUser()

catv_PaymentsGetAllByUser(  $userid) 

Parameters

$userid

catv_PaymentsGetData()

catv_PaymentsGetData(  $paymentid) 

Parameters

$paymentid

catv_PaymentsGetMonthCount()

catv_PaymentsGetMonthCount(  $year,   $month) 

Parameters

$year
$month

catv_PaymentsGetMonthSumm()

catv_PaymentsGetMonthSumm(  $year,   $month) 

Parameters

$year
$month

catv_PaymentsGetYearSumm()

catv_PaymentsGetYearSumm(  $year) 

Parameters

$year

catv_PaymentsShow()

catv_PaymentsShow(  $query) 

Parameters

$query

catv_PaymentsShowGraph()

catv_PaymentsShowGraph(  $year) 

Parameters

$year

catv_ProfileBack()

catv_ProfileBack(  $userid) 

Parameters

$userid

catv_ProfileControls()

catv_ProfileControls(  $userid) 

Parameters

$userid

catv_ReportDebtors()

catv_ReportDebtors() 

catv_ReportDebtorsAddr()

catv_ReportDebtorsAddr() 

catv_ReportDebtorsAddrPrintable()

catv_ReportDebtorsAddrPrintable(  $street,   $build) 

Parameters

$street
$build

catv_ReportDebtorsStreet()

catv_ReportDebtorsStreet() 

catv_ReportDebtorsStreetPrintable()

catv_ReportDebtorsStreetPrintable(  $street) 

Parameters

$street

catv_ReportsShowList()

catv_ReportsShowList() 

catv_StreetSelector()

catv_StreetSelector(  $url = '') 

Parameters

$url

catv_TariffAdd()

catv_TariffAdd(  $name,   $price,   $chans = '') 

Parameters

$name
$price
$chans

catv_TariffAddForm()

catv_TariffAddForm() 

catv_TariffChangeAllPlanned()

catv_TariffChangeAllPlanned() 

catv_TariffDelete()

catv_TariffDelete(  $tariffid) 

Parameters

$tariffid

catv_TariffEditForm()

catv_TariffEditForm(  $tariffid) 

Parameters

$tariffid

catv_TariffGetAll()

catv_TariffGetAll() 

catv_TariffGetAllNames()

catv_TariffGetAllNames() 

catv_TariffGetAllPrices()

catv_TariffGetAllPrices() 

catv_TariffGetData()

catv_TariffGetData(  $tariffid) 

Parameters

$tariffid

catv_TariffModify()

catv_TariffModify(  $tariffid,   $name,   $price,   $chans) 

Parameters

$tariffid
$name
$price
$chans

catv_TariffProtected()

catv_TariffProtected(  $tariffid) 

Parameters

$tariffid

catv_TariffShowAll()

catv_TariffShowAll() 

catv_UserDelete()

catv_UserDelete(  $userid) 

Parameters

$userid

catv_UserEdit()

catv_UserEdit(  $userid,   $contract,   $realname,   $street,   $build,   $apt,   $phone,   $discount,   $decoder,   $inetlink,   $notes) 

Parameters

$userid
$contract
$realname
$street
$build
$apt
$phone
$discount
$decoder
$inetlink
$notes

catv_UserGetData()

catv_UserGetData(  $userid) 

Parameters

$userid

catv_UserProfileShow()

catv_UserProfileShow(  $userid) 

Parameters

$userid

catv_UserRegister()

catv_UserRegister(  $contract,   $realname,   $street,   $build,   $apt,   $phone,   $tariff,   $cash,   $decoder) 

Parameters

$contract
$realname
$street
$build
$apt
$phone
$tariff
$cash
$decoder

catv_UserRegisterForm()

catv_UserRegisterForm() 

catv_UserSetTariff()

catv_UserSetTariff(  $userid,   $tariffid) 

Parameters

$userid
$tariffid

catv_UserSetTariffNM()

catv_UserSetTariffNM(  $userid,   $tariffid) 

Parameters

$userid
$tariffid

catv_UsersGetAll()

catv_UsersGetAll() 

catv_UsersGetFullAddressList()

catv_UsersGetFullAddressList() 

catv_UserShowAllpayments()

catv_UserShowAllpayments(  $userid) 

Parameters

$userid

catv_UsersShowList()

catv_UsersShowList() 

catv_UsersShowList_hp()

catv_UsersShowList_hp() 

catv_UserStatsByYear()

catv_UserStatsByYear(  $userid,   $year) 

Parameters

$userid
$year

catv_UserStatsDrawPayments()

catv_UserStatsDrawPayments(  $userid,   $year) 

Parameters

$userid
$year

catvbs_AddressEdit()

catvbs_AddressEdit(  $id,   $address) 

Parameters

$id
$address

catvbs_AddressEditForm()

catvbs_AddressEditForm(  $id,   $address = '') 

Parameters

$id
$address

catvbs_CheckHash()

catvbs_CheckHash(  $hash) 

Parameters

$hash

catvbs_CheckProcessed()

catvbs_CheckProcessed(  $hash) 

Parameters

$hash

catvbs_cu_IsParent()

catvbs_cu_IsParent(  $login,   $allparentusers) 

Parameters

$login
$allparentusers

catvbs_DeleteBanksta()

catvbs_DeleteBanksta(  $hash) 

Parameters

$hash

catvbs_FilePush()

catvbs_FilePush(  $filename,   $rawdata) 

Parameters

$filename
$rawdata

catvbs_LockRow()

catvbs_LockRow(  $rowid) 

Parameters

$rowid

catvbs_LoginProposalForm()

catvbs_LoginProposalForm(  $id,   $login = '') 

Parameters

$id
$login

catvbs_MonthDetect()

catvbs_MonthDetect(  $string) 

Parameters

$string

catvbs_NameEdit()

catvbs_NameEdit(  $id,   $name) 

Parameters

$id
$name

catvbs_NameEditForm()

catvbs_NameEditForm(  $id,   $name = '') 

Parameters

$id
$name

catvbs_ParseRaw()

catvbs_ParseRaw(  $rawid) 

Parameters

$rawid

catvbs_ProcessHash()

catvbs_ProcessHash(  $hash) 

Parameters

$hash

catvbs_ProcessingForm()

catvbs_ProcessingForm(  $hash) 

Parameters

$hash

catvbs_SearchCheckArr()

catvbs_SearchCheckArr(  $alluseraddress,   $allrealnames) 

Parameters

$alluseraddress
$allrealnames

catvbs_SearchLoginByAddresspart()

catvbs_SearchLoginByAddresspart(  $queryaddress,   $queryname,   $checkarr) 

Parameters

$queryaddress
$queryname
$checkarr

catvbs_ShowAllStatements()

catvbs_ShowAllStatements() 

catvbs_ShowHash()

catvbs_ShowHash(  $hash) 

Parameters

$hash

catvbs_UploadFile()

catvbs_UploadFile() 

catvbs_UploadFileForm()

catvbs_UploadFileForm() 

catvbs_UploadFormBody()

catvbs_UploadFormBody(  $action,   $method,   $inputs,   $class = '') 

Parameters

$action
$method
$inputs
$class

cf_FieldDelete()

cf_FieldDelete(string  $login, integer  $typeid) : void

Deletes some CF content for user in database

Parameters

string $login

Existing Ubilling user login

integer $typeid

Existing CF type ID

cf_FieldDisplay()

cf_FieldDisplay(string  $type, string  $data) : string

Returns preformatted view of CF content preprocessed by its type

Parameters

string $type

Type of the data (VARCHAR, TRIGGER,TEXT)

string $data

Data of CF

Returns

string

cf_FieldEditor()

cf_FieldEditor(string  $login) : void

Shows CF editor controller for some login

Parameters

string $login

Existing user login

cf_FieldGet()

cf_FieldGet(string  $login, integer  $typeid) : string

Gets CF content assigned for user in database

Parameters

string $login

Existing Ubilling user login

integer $typeid

Existing CF type ID

Returns

string

cf_FieldSet()

cf_FieldSet(integer  $typeid, string  $login, string  $content) : void

Sets some CF content to user with override of old value

Parameters

integer $typeid

Existing CF type ID

string $login

Existing Ubilling user login

string $content

Content that will be set for user into CF

cf_FieldsGetAll()

cf_FieldsGetAll() : array

Gets all available CF fields content assigned with users from database

Returns

array

cf_FieldShower()

cf_FieldShower(string  $login) : string

Returns CFs listing for some login

Parameters

string $login

Existing user login

Returns

string

cf_FlushAllUserCF()

cf_FlushAllUserCF(string  $login) : void

Deletes all of CF intems in database associated with some login

Parameters

string $login

Existing user login

cf_TypeAdd()

cf_TypeAdd(string  $newtype, string  $newname) : void

Creates new CF type in database

Parameters

string $newtype

Type of the CF (VARCHAR, TRIGGER, TEXT)

string $newname

Name of the custom field for display

cf_TypeAddForm()

cf_TypeAddForm() : string

Returns Custom Field creation form

Returns

string

cf_TypeDelete()

cf_TypeDelete(integer  $cftypeid) : void

Deletes CF type from database by its ID and flushes assigned

Parameters

integer $cftypeid

Existing CF type database ID

cf_TypeEditForm()

cf_TypeEditForm(integer  $typeid) : void

Returns CF type edit form

Parameters

integer $typeid

Existing CF type ID

cf_TypeFlush()

cf_TypeFlush(integer  $cftypeid) : void

Flushes all of assigned to users CFs from database

Parameters

integer $cftypeid

Existing CF type database ID

cf_TypeGetAll()

cf_TypeGetAll() : array

Returns all available CF types from database

Returns

array

cf_TypeGetController()

cf_TypeGetController(string  $login, string  $type, integer  $typeid) : string

Returns editing controller for CF assigned to user

Parameters

string $login

Existing Ubilling user login

string $type

Type of CF to return control

integer $typeid

Type ID for change

Returns

string

cf_TypeGetData()

cf_TypeGetData(integer  $typeid) : array

Gets CF type data by typeID

Parameters

integer $typeid

Existing CF type database ID

Returns

array

cf_TypeGetSearchControl()

cf_TypeGetSearchControl(string  $type, integer  $typeid) : string

Returns search controller for CFs assigned to user

Parameters

string $type

Type of CF to return control

integer $typeid

Type ID for change

Returns

string

cf_TypesShow()

cf_TypesShow() : string

Return displayable list of available CF types with some controls

Returns

string

cfr()

cfr(string  $right) : boolean

Check for right via module

Parameters

string $right

Returns

boolean

check_mac_format()

check_mac_format(string  $mac) : boolean

Check mac for valid format

Parameters

string $mac

Returns

boolean

checkBuildOnStreetExists()

checkBuildOnStreetExists(string  $BuildNumber, string  $StreetID, integer  $ExcludeEditedBuildID) : string

Searches for build number with such street ID in DB and returns it's ID if exists

Parameters

string $BuildNumber
string $StreetID
integer $ExcludeEditedBuildID
  • if we edit something and want to find same record but with other ID

Returns

string

checkCityExists()

checkCityExists(string  $CityName, integer  $ExcludeEditedCityID) : string

Searches for city name in DB and returns it's ID if exists

Parameters

string $CityName
integer $ExcludeEditedCityID
  • if we edit something and want to find same record but with other ID

Returns

string

checkStreetInCityExists()

checkStreetInCityExists(string  $StreetName, string  $CityID, integer  $ExcludeEditedStreetID) : string

Searches for street name with such city ID in DB and returns it's ID if exists

Parameters

string $StreetName
string $CityID
integer $ExcludeEditedStreetID
  • if we edit something and want to find same record but with other ID

Returns

string

crc16()

crc16(string  $string) : string

Returns CRC16 hash for the some string

Parameters

string $string

Returns

string

cu_GetAllChildUsers()

cu_GetAllChildUsers(string  $param) : array

Returns all child users

Parameters

string $param

Returns

array

cu_GetAllLinkedUsers()

cu_GetAllLinkedUsers() : array

Returns array of all linked users

Returns

array

cu_GetAllParentUsers()

cu_GetAllParentUsers() : array

Returns array of all parent users

Returns

array

cu_GetParentUserLogin()

cu_GetParentUserLogin(string  $param) : string

Returns parent user login by linking param

Parameters

string $param

Returns

string

cu_IsChild()

cu_IsChild(string  $login) : boolean

Checks is some user child of another?

Parameters

string $login

Returns

boolean

cu_IsParent()

cu_IsParent(string  $login) : boolean

Checks is some user parent for another one?

Parameters

string $login

Returns

boolean

curdate()

curdate() : string

Returns current date in mysql DATETIME view

Returns

string

curdatetime()

curdatetime() : string

Returns current date and time in mysql DATETIME view

Returns

string

curlang()

curlang() : string

return current locale in two letter format

Returns

string

curmonth()

curmonth() : string

Returns current year-month in mysql DATETIME view

Returns

string

curtime()

curtime() : string

returns current time in mysql DATETIME view

Returns

string

curyear()

curyear() : string

Returns current year as just Y

Returns

string

deb()

deb(string  $data) 

Fast debug text data output

Parameters

string $data

debarr()

debarr(string  $data) 

Fast debug output of array

Parameters

string $data

dhcp_get_data_by_netid()

dhcp_get_data_by_netid(integer  $netid) : array

Returns dhcp handler data by network ID

Parameters

integer $netid

Returns

array

em_EmployeeAdd()

em_EmployeeAdd(string  $name, string  $job, string  $mobile = '',   $telegram = '', string  $admlogin = '',   $tagid = '',   $amountLimit = '') : void

Creates new employee in database

Parameters

string $name
string $job
string $mobile
$telegram
string $admlogin
$tagid
$amountLimit

em_EmployeeDelete()

em_EmployeeDelete(integer  $id) : void

Deletes existing employee from database

Parameters

integer $id

em_EmployeeShowForm()

em_EmployeeShowForm() : void

Renders employee list with required controls and creation form

em_JobTypeForm()

em_JobTypeForm() : void

Renders jobtypes edit/creation/deletion form and list

em_TagSelector()

em_TagSelector(string  $name, string  $label = '',   $selected = '',   $br = false) : string

Returns tag id selector

Parameters

string $name
string $label
$selected
$br

Returns

string

explodeRows()

explodeRows(string  $data) : array

Returns exploded array of some multi-lined strings

Parameters

string $data

Returns

array

generic_MapAddCircle()

generic_MapAddCircle(string  $coords, integer  $radius, string  $content = '',   $hint = '') : string

Returns map circle

Parameters

string $coords
  • map coordinates
integer $radius
  • circle radius in meters
string $content
$hint

Returns

string

generic_MapAddCircle()

generic_MapAddCircle(  $coords,   $radius,   $content = '',   $hint = '') : string

Returns map circle

Parameters

$coords
  • map coordinates
$radius
  • circle radius in meters
$content
$hint

Returns

string

generic_MapAddCircle()

generic_MapAddCircle(string  $coords, integer  $radius, string  $content = '',   $hint = '') : string

Returns map circle

Parameters

string $coords
  • map coordinates
integer $radius
  • circle radius in meters
string $content
$hint

Returns

string

generic_MapAddLine()

generic_MapAddLine(string  $coord1, string  $coord2, string  $color = '', string  $hint = '', string  $width = '') : string

Returns JS code to draw line within two points

Parameters

string $coord1
string $coord2
string $color
string $hint
string $width

Returns

string

generic_MapAddLine()

generic_MapAddLine(string  $coord1, string  $coord2, string  $color = '', string  $hint = '', string  $width = '') : string

Returns JS code to draw line within two points

Parameters

string $coord1
string $coord2
string $color
string $hint
string $width

Returns

string

generic_MapAddLine()

generic_MapAddLine(string  $coord1, string  $coord2, string  $color = '', string  $hint = '', string  $width = '') : string

Returns JS code to draw line within two points

Parameters

string $coord1
string $coord2
string $color
string $hint
string $width

Returns

string

generic_MapAddMark()

generic_MapAddMark(string  $coords, string  $title = '', string  $content = '', string  $footer = '', string  $icon = 'twirl#lightblueIcon', string  $iconlabel = '', boolean  $canvas = false) : string

Returns placemark code

Parameters

string $coords
string $title
string $content
string $footer
string $icon
string $iconlabel
boolean $canvas

Returns

string

generic_MapAddMark()

generic_MapAddMark(string  $coords, string  $title = '', string  $content = '', string  $footer = '', string  $icon = 'twirl#lightblueIcon', string  $iconlabel = '', boolean  $canvas = false) : string

Returns placemark code

Parameters

string $coords
string $title
string $content
string $footer
string $icon
string $iconlabel
boolean $canvas

Returns

string

generic_mapAddMark()

generic_mapAddMark(string  $coords, string  $title = '', string  $content = '', string  $footer = '', string  $icon = 'twirl#lightblueIcon', string  $iconlabel = '', string  $canvas = '') : string

Returns map mark

Parameters

string $coords
  • map coordinates
string $title
  • ballon title
string $content
  • ballon content
string $footer
  • ballon footer content
string $icon
  • YM icon class
string $iconlabel
  • icon label string
string $canvas

Returns

string

generic_MapContainer()

generic_MapContainer(string  $width = '', string  $height = '', string  $id = '') : string

Returns leaflet maps empty container

Parameters

string $width
string $height
string $id

Returns

string

generic_MapContainer()

generic_MapContainer(string  $width = '', string  $height = '', string  $id = '') : string

Returns google maps empty container

Parameters

string $width
string $height
string $id

Returns

string

generic_MapContainer()

generic_MapContainer(  $width = '',   $height = '',   $id = '') : string

Returns maps empty container

Parameters

$width
$height
$id

Returns

string

generic_MapEditor()

generic_MapEditor(string  $name, string  $title = '', string  $data = '') : string

Return generic editor code

Parameters

string $name
string $title
string $data

Returns

string

generic_MapEditor()

generic_MapEditor(string  $name, string  $title = '', string  $data = '') : string

Return generic editor code

Parameters

string $name
string $title
string $data

Returns

string

generic_MapEditor()

generic_MapEditor(string  $name, string  $title = '', string  $data = '') : string

Return generic editor code

Parameters

string $name
string $title
string $data

Returns

string

generic_MapInit()

generic_MapInit(string  $center, integer  $zoom, string  $type, string  $placemarks = '', boolean  $editor = '', string  $lang = 'ru-RU', string  $container = 'ubmap') : string

Initalizes google maps API with some params

Parameters

string $center
integer $zoom
string $type
string $placemarks
boolean $editor
string $lang
string $container

Returns

string

generic_MapInit()

generic_MapInit(string  $center, integer  $zoom, string  $type, string  $placemarks = '', boolean  $editor = '', string  $lang = 'ru-RU', string  $container = 'ubmap') : string

Initalizes maps API with some params

Parameters

string $center
integer $zoom
string $type
string $placemarks
boolean $editor
string $lang
string $container

Returns

string

generic_MapInit()

generic_MapInit(string  $center, integer  $zoom, string  $type, string  $placemarks = '', boolean  $editor = '', string  $lang = 'ru-RU', string  $container = 'ubmap') : string

Initalizes google maps API with some params

Parameters

string $center
integer $zoom
string $type
string $placemarks
boolean $editor
string $lang
string $container

Returns

string

GetAllCreditedUsers()

GetAllCreditedUsers() 

GetAllNotes()

GetAllNotes() : void

Get all data from tables `notes` and `adcomments` and place it into $this->allNotes

GetAllOnu()

GetAllOnu() : void

Get all users pon Data (mac onu, oltid) and load into $this->allOnu

GetAllUserIp()

GetAllUserIp() 

GetAllUserOnu()

GetAllUserOnu() 

GetAllUserVlan()

GetAllUserVlan() : \type

Returns

\type

getCachedZabbixNASGraphIDs()

getCachedZabbixNASGraphIDs() : string

Gets Zabbix graphs data for NASes from cache

Returns

string

GetNetidByIP()

GetNetidByIP(string  $ip) : integer

Get network id by ip

Parameters

string $ip

Returns

integer

GetTermRemoteByNetid()

GetTermRemoteByNetid(integer  $netid) : string

Get vlan terminators remote id by network id

Parameters

integer $netid

Returns

string

getTicketEvents()

getTicketEvents(integer  $TicketID, boolean  $ReturnHTML = false) : \array/string

Returns previous ticket events parsed from log.

Parameters

integer $TicketID
boolean $ReturnHTML

Returns

\array/string

getZabbixNASGraphIDs()

getZabbixNASGraphIDs() : array

Gets Zabbix graphs data for NASes

Returns

array

getZabbixProblems()

getZabbixProblems(  $switchIP) : array

Gets Zabbix problems and actions by problems

Parameters

$switchIP

Returns

array

getZabbixUserGraphLinks()

getZabbixUserGraphLinks(  $userIP,   $fieldToSearch,   $dataToSearch, array  $zbxAllGraphs = array(),   $zbxExtended = false) : array

Generates array with links to user's traffic graphs

Parameters

$userIP
$fieldToSearch
$dataToSearch
array $zbxAllGraphs
$zbxExtended

Returns

array

gm_GetIconUrl()

gm_GetIconUrl(string  $icon) : string

Translates yandex to google icon code

Parameters

string $icon

Returns

string

gravatar_GetAvatar()

gravatar_GetAvatar(string  $email, integer  $size = '') : string

Function that shows avatar by user email

Parameters

string $email

user email

integer $size

user avatar size

Returns

string

gravatar_GetUrl()

gravatar_GetUrl(string  $email) : string

Get gravatar url by some email

Parameters

string $email

user email

Returns

string

gravatar_GetUserEmail()

gravatar_GetUserEmail(string  $username) : string

Get framework user email

Parameters

string $username

rcms user login

Returns

string

gravatar_ShowAdminAvatar()

gravatar_ShowAdminAvatar(string  $username, integer  $size = '') : string

Shows avatar for some framework user - use only this in production!

Parameters

string $username

rcms user login

integer $size
  • size of returning avatar

Returns

string

handle_dhcp_rebuild_option82()

handle_dhcp_rebuild_option82(integer  $netid, string  $confname) : void

Rebuilds dhcp subnet config with option82 hosts

Parameters

integer $netid
string $confname

handle_dhcp_rebuild_option82_bdcom()

handle_dhcp_rebuild_option82_bdcom(integer  $netid, string  $confname) : void

Rebuilds dhcp subnet config with option82 bdcom hosts

Parameters

integer $netid
string $confname

handle_dhcp_rebuild_option82_vpu()

handle_dhcp_rebuild_option82_vpu(integer  $netid, string  $confname) : void

Rebuilds dhcp subnet config with option82 VPU hosts

Parameters

integer $netid
string $confname

handle_dhcp_rebuild_option82_zte()

handle_dhcp_rebuild_option82_zte(integer  $netid, string  $confname) : void

Rebuilds dhcp subnet config with option82 zte hosts

Parameters

integer $netid
string $confname

handle_dhcp_rebuild_static()

handle_dhcp_rebuild_static(integer  $netid, string  $confname) : void

Rebuilds dhcp subnet config with some static hosts

Parameters

integer $netid
string $confname

handle_ppp_rebuild_dynamic()

handle_ppp_rebuild_dynamic(integer  $netid) : void

Generates dynamic ppp secrets file

Parameters

integer $netid

handle_ppp_rebuild_static()

handle_ppp_rebuild_static(integer  $netid) : void

Generates some static ppp secrets file

Parameters

integer $netid

im_AvatarControlForm()

im_AvatarControlForm() : string

Shows avatar control form

Returns

string

im_CheckForUnreadMessages()

im_CheckForUnreadMessages() : string

Checks how many unread messages we have?

Returns

string

im_CheckForUnreadMessagesByUser()

im_CheckForUnreadMessagesByUser(string  $username) : string

Return unread messages count for each contact

Parameters

string $username

framework admin username

Returns

string

im_ContactList()

im_ContactList() : string

Return contact list

Returns

string

im_ConversationForm()

im_ConversationForm(string  $to) : string

Return conversation form for some thread

Parameters

string $to
  • thread username

Returns

string

im_CreateMessage()

im_CreateMessage(string  $to, string  $text) : void

Creates message for some admin user

Parameters

string $to

admin login

string $text

message text

im_DeleteMessage()

im_DeleteMessage(integer  $msgid) : void

Deletes message by its id

Parameters

integer $msgid

message id from ub_im

im_GetActiveAdmins()

im_GetActiveAdmins() : array

Returns array of "active" administrators

Returns

array

im_GetAllMyUnreadMessagesUsers()

im_GetAllMyUnreadMessagesUsers() : array

Returns array of users from which we have some unread messages as login=>count

Returns

array

im_IsMineMessage()

im_IsMineMessage(integer  $msgid) : boolean

Check is message created by me?

Parameters

integer $msgid

message id from ub_im

Returns

boolean

im_linkify()

im_linkify(string  $value, array  $protocols = array('http', 'mail'), array  $attributes = array(), string  $mode = 'normal') : string

Turn all URLs in clickable links.

Parameters

string $value
array $protocols

http/https, ftp, mail, twitter

array $attributes
string $mode

normal or all

Returns

string

im_MainWindow()

im_MainWindow() : string

Return UB im main window grid

Returns

string

im_RefreshContainer()

im_RefreshContainer(  $timeout) : void

Draw update container and refresh into in some code

Parameters

$timeout

im_ThreadLoad()

im_ThreadLoad(string  $threadUser) : string

Loads some thread after message posted into standard grid

Parameters

string $threadUser

thread username

Returns

string

im_ThreadMarkAsRead()

im_ThreadMarkAsRead(string  $sender) : void

mark thread as read by sender

Parameters

string $sender

sender login

im_ThreadShow()

im_ThreadShow(string  $threadUser) : string

Shows thread for me with some user

Parameters

string $threadUser

user to show thread

Returns

string

int2ip()

int2ip(integer  $src) : string

Converts integer into IP

Parameters

integer $src

Returns

string

ip2int()

ip2int(string  $src) : integer

Converts IP to integer value

Parameters

string $src

Returns

integer

IsMacAddressValid()

IsMacAddressValid(string  $mac) : boolean

And Another MAC format validator. I rly dont know what for. Use check_mac_format() in real life.

Parameters

string $mac

Returns

boolean

IsMacValid()

IsMacValid(string  $mac) : boolean

Yet another MAC format validator. Use check_mac_format() in real life.

Parameters

string $mac

Returns

boolean

ispos()

ispos(string  $string, string  $search) : boolean

Checks for substring in string

Parameters

string $string
string $search

Returns

boolean

js_CashCheck()

js_CashCheck(float  $suspect) : string

Returns suspect cash JS alert

Parameters

float $suspect

Returns

string

lm_GetIconUrl()

lm_GetIconUrl(string  $icon) : string

Translates yandex to google icon code

Parameters

string $icon

Returns

string

loadOltDevices()

loadOltDevices() 

loadOltSnmpTemplates()

loadOltSnmpTemplates() 

log_register()

log_register(string  $event) 

Just system logging subroutine

Parameters

string $event

loginDB_real_escape_string()

loginDB_real_escape_string(string  $parametr) : string

Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection

Parameters

string $parametr

data to filter

Returns

string

months_array()

months_array(string  $number = null) : \array/string

Returns all months with names in two digit notation

Parameters

string $number

Returns

\array/string

months_array_localized()

months_array_localized() : array

Returns all months with names in two digit notation

Returns

array

months_array_wz()

months_array_wz() : array

Retuns all months with names without begin zeros

Returns

array

multinet_add_host()

multinet_add_host(integer  $netid, string  $ip, string  $mac = 'NULL', string  $option = 'NULL') : void

Creates new network host in database

Parameters

integer $netid
string $ip
string $mac
string $option

multinet_add_network()

multinet_add_network(string  $desc, string  $firstip, string  $lastip, string  $nettype, integer  $use_radius) : void

Creates new multinet network in database

Parameters

string $desc
string $firstip
string $lastip
string $nettype
integer $use_radius

multinet_add_service()

multinet_add_service(integer  $net, string  $desc) : void

Creates new network service in database

Parameters

integer $net
string $desc

multinet_change_mac()

multinet_change_mac(string  $ip, string  $newmac) : void

Changes existing network host MAC address by host IP

Parameters

string $ip
string $newmac

multinet_checkIP()

multinet_checkIP(string  $user_ip, string  $ip_begin, string  $ip_end) : boolean

Checks is some IP between another two

Parameters

string $user_ip
string $ip_begin
string $ip_end

Returns

boolean

multinet_cidr2mask()

multinet_cidr2mask(integer  $mask_bits) : string

Converts CIDR mask into decimal like 24 => 255.255.255.0

Parameters

integer $mask_bits

Returns

string

multinet_delete_host()

multinet_delete_host(string  $ip) : void

Deletes some host from nethosts by its IP

Parameters

string $ip

multinet_delete_network()

multinet_delete_network(\type  $network_id) : void

Deletes some multinet network from database

Parameters

\type $network_id

multinet_delete_service()

multinet_delete_service(integer  $service_id) : void

Deletes existing network service from database

Parameters

integer $service_id

multinet_expand_network()

multinet_expand_network(string  $first_ip, string  $last_ip) : array

Extracts all IPs between another two.

Preserving broadcasts, net address and first IP for NAS.

Parameters

string $first_ip
string $last_ip

Returns

array

multinet_get_all_free_ip()

multinet_get_all_free_ip(\type  $table, \type  $field, \type  $network_id) : array

Returns all free and unused IP addresses for some network ID

Parameters

\type $table
\type $field
\type $network_id

Returns

array

multinet_get_all_networks()

multinet_get_all_networks() : array

Returns unprocessed array of available networks with their data

Returns

array

multinet_get_dhcp_networks()

multinet_get_dhcp_networks() : array

Returns list of all existing dhcp-oriented networks

Returns

array

multinet_get_free_count()

multinet_get_free_count(integer  $network_id) : integer

Counts free IPs fast for certain network

Parameters

integer $network_id

Returns

integer

multinet_get_network_params()

multinet_get_network_params(integer  $network_id) : array

Returns array of existing network parameters

Parameters

integer $network_id

Returns

array

multinet_get_next_freeip()

multinet_get_next_freeip(string  $table, string  $field, integer  $network_id) : string

Returns first free and unused IP for some network ID

Parameters

string $table
string $field
integer $network_id

Returns

string

multinet_get_service_networkid()

multinet_get_service_networkid(integer  $service_id) : integer

Returns network ID by associated service ID

Parameters

integer $service_id

Returns

integer

multinet_get_service_params()

multinet_get_service_params(integer  $serviceid) : array

Returns array of existing service parameters

Parameters

integer $serviceid

Returns

array

multinet_get_services()

multinet_get_services() : array

Returns array of available services

Returns

array

multinet_getFreeIpStats()

multinet_getFreeIpStats() : array

Returns IP usage stats for available networks

Returns

array

multinet_mac_free()

multinet_mac_free(string  $mac) : boolean

Checks is MAC unused by someone?

Parameters

string $mac

Returns

boolean

multinet_nettype_selector()

multinet_nettype_selector(string  $curnettype = '') : string

Returns selector of available networks types

Parameters

string $curnettype

Returns

string

multinet_network_is_used()

multinet_network_is_used(integer  $network_id) : boolean

Checks is network used by some network hosts or not

Parameters

integer $network_id

Returns

boolean

multinet_network_selector()

multinet_network_selector(integer  $currentnetid = '') : string

Returns networks selector control

Parameters

integer $currentnetid

Returns

string

multinet_ParseTemplate()

multinet_ParseTemplate(string  $templatebody, array  $templatedata) : string

Returns template with replaced macro

Parameters

string $templatebody
array $templatedata

Returns

string

multinet_rebuild_all_handlers()

multinet_rebuild_all_handlers() 

multinet_rebuild_globalconf()

multinet_rebuild_globalconf() : void

Rebuilds dhcp global config file

multinet_RestartDhcp()

multinet_RestartDhcp() : void

Restarts ISC-DHCPD server

multinet_service_selector()

multinet_service_selector() : string

Returns services selector control

Returns

string

multinet_show_available_networks()

multinet_show_available_networks() : void

Renders list of available networks

multinet_show_available_services()

multinet_show_available_services() : void

Renders available services list with some controls

multinet_show_neteditform()

multinet_show_neteditform(integer  $netid) : void

Renders network editing form

Parameters

integer $netid

multinet_show_networks_create_form()

multinet_show_networks_create_form() : void

Renders network creation form

multinet_show_service_add_form()

multinet_show_service_add_form() : void

Renders network service creation form

multinet_show_serviceeditform()

multinet_show_serviceeditform(integer  $serviceid) : void

Renders service editing form

Parameters

integer $serviceid

multinet_totalips_count()

multinet_totalips_count(string  $first_ip, string  $last_ip) : integer

Fast count of possible pool size for some IPs range

Parameters

string $first_ip
string $last_ip

Returns

integer

mysql_real_escape_string()

mysql_real_escape_string(string  $data) : string

Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection

Parameters

string $data

Returns

string

nr_query()

nr_query(string  $query) : mixed

Just executing single query

Parameters

string $query

Returns

mixed

prevmonth()

prevmonth() : string

Returns previous year-month in mysql DATETIME view

Returns

string

ra_NasAddTemplate()

ra_NasAddTemplate(  $nasid,   $template) 

Parameters

$nasid
$template

ra_NasDeteleTemplate()

ra_NasDeteleTemplate(  $id) 

Parameters

$id

ra_NasGetTemplate()

ra_NasGetTemplate(  $nasid) 

Parameters

$nasid

ra_NasRebuildAll()

ra_NasRebuildAll() 

ra_UserRebuild()

ra_UserRebuild(  $login,   $verbose = false) 

Parameters

$login
$verbose

ra_UserRebuildAttributes()

ra_UserRebuildAttributes(  $login,   $attrtemplate,   $verbose = false) 

Parameters

$login
$attrtemplate
$verbose

rcms_redirect()

rcms_redirect(string  $url, boolean  $header = false) 

Shows redirection javascript.

Parameters

string $url
boolean $header

RemoveMacAddressSeparator()

RemoveMacAddressSeparator(string  $mac, string  $separator = array(':', '-', '.')) : string

Removes some separator from MAC address

Parameters

string $mac
string $separator

Returns

string

removeRmdir()

removeRmdir(  $dir) 

Parameters

$dir

renderBuildsEditJSON()

renderBuildsEditJSON() 

Renders JSON for builds JQDT

renderBuildsLiserJSON()

renderBuildsLiserJSON(integer  $streetid, integer  $AutoEditBuildID) 

Renders JSON for builds lister JQDT

Parameters

integer $streetid
integer $AutoEditBuildID

renderCityJSON()

renderCityJSON() 

Renders JSON for cities JQDT

renderStreetJSON()

renderStreetJSON(integer  $FilterByCityId) 

Renders JSON for streets JQDT

Parameters

integer $FilterByCityId

show_error()

show_error(string  $data) 

Shows default error notice

Parameters

string $data

show_window()

show_window(string  $title, string  $data, string  $align = "left") 

Replace for system content output

Parameters

string $title
string $data
string $align

simple_get_lastid()

simple_get_lastid(string  $tablename) : integer

Returns last used `id` field available in some table

Parameters

string $tablename

Returns

integer

simple_query()

simple_query(string  $query) : array

Executing query and returns array of first result

Parameters

string $query

Returns

array

simple_queryall()

simple_queryall(string  $query) : array

Executing query and returns result as array

Parameters

string $query

Returns

array

simple_update_field()

simple_update_field(string  $tablename, string  $field, string  $value, string  $where = '', boolean  $NoQuotesAroundValue = false) : void

Updates single field in table with where expression

Parameters

string $tablename
string $field
string $value
string $where
boolean $NoQuotesAroundValue

sm_CheckLoop()

sm_CheckLoop(array  $alllinks, integer  $switchId, integer  $setParent) : boolean

Checks is loop possible after setting for switchId something as parent device

Parameters

array $alllinks
integer $switchId
integer $setParent

Returns

boolean

sm_MapAddCircle()

sm_MapAddCircle(string  $coords, integer  $radius, string  $content = '', string  $hint = '') : string

Returns map circle

Parameters

string $coords
integer $radius
string $content
string $hint

Returns

string

sm_MapAddLine()

sm_MapAddLine(string  $coord1, string  $coord2, string  $color = '', string  $hint = '',   $width = '') : string

Returns JS code to draw line within two points

Parameters

string $coord1
string $coord2
string $color
string $hint
$width

Returns

string

sm_MapAddMark()

sm_MapAddMark(  $coords,   $title = '',   $content = '',   $footer = '',   $icon = 'twirl#lightblueIcon',   $iconlabel = '',   $canvas = false) : string

Returns map mark

Parameters

$coords
  • map coordinates
$title
  • ballon title
$content
  • ballon content
$footer
  • ballon footer content
$icon
  • YM icon class
$iconlabel
  • icon label string
$canvas
  • is canvas rendering enabled?

Returns

string

sm_MapBadIcon()

sm_MapBadIcon(boolean  $stretchy = true) : string

Returns bad icon class

Parameters

boolean $stretchy
  • icon resizable by content?

Returns

string

sm_MapDrawSwitches()

sm_MapDrawSwitches() : string

Returns full map marks for switches with filled GEO field

Returns

string

sm_MapDrawSwitchesCoverage()

sm_MapDrawSwitchesCoverage() : string

Returns indications point to nuclear strikes :)

Returns

string

sm_MapDrawSwitchUplinks()

sm_MapDrawSwitchUplinks(integer  $traceid = '') : string

Returns full map of switch links

Parameters

integer $traceid

switch ID to trace uplinks

Returns

string

sm_MapGoodIcon()

sm_MapGoodIcon(boolean  $stretchy = true) : string

Returns good icon class

Parameters

boolean $stretchy
  • icon resizable by content?

Returns

string

sm_MapInit()

sm_MapInit(  $center,   $zoom,   $type,   $placemarks = '',   $editor = '',   $lang = 'ru-RU') : void

Initialize map container with some settings

Parameters

$center
  • map center lat,long
$zoom
  • default map zoom
$type
  • map type, may be: map, satellite, hybrid
$placemarks
  • already filled map placemarks
$editor
  • field for visual editor or geolocator
$lang
  • map language in format ru-RU

sm_MapInitBasic()

sm_MapInitBasic(  $center,   $zoom,   $type,   $placemarks = '',   $editor = '',   $lang = 'ru-RU') : void

Initialize map container with some settings

Parameters

$center
  • map center lat,long
$zoom
  • default map zoom
$type
  • map type, may be: map, satellite, hybrid
$placemarks
  • already filled map placemarks
$editor
  • field for visual editor or geolocator
$lang
  • map language in format ru-RU

sm_MapInitQuiet()

sm_MapInitQuiet(  $center,   $zoom,   $type,   $placemarks = '',   $editor = '',   $lang = 'ru-RU') : void

Initialize map container with some settings

Parameters

$center
  • map center lat,long
$zoom
  • default map zoom
$type
  • map type, may be: map, satellite, hybrid
$placemarks
  • already filled map placemarks
$editor
  • field for visual editor or geolocator
$lang
  • map language in format ru-RU

sm_MapIsLinked()

sm_MapIsLinked(array  $alllinks, integer  $traceid, integer  $checkid) : boolean

Checks is some switch id linked with

Parameters

array $alllinks

Array of id=>parentid

integer $traceid

Switch ID wich will be traced

integer $checkid

Switch ID to check

Returns

boolean

sm_MapLocationFinder()

sm_MapLocationFinder() : string

Returns geo coordinates locator

Returns

string

sm_MapLocationSwitchForm()

sm_MapLocationSwitchForm() : string

Returns form for placing switch to selected coordinates

Returns

string

sm_ShowMapContainer()

sm_ShowMapContainer() : void

Shows map container

sn_FDBFilterCheckMac()

sn_FDBFilterCheckMac(string  $mac, array  $allfilters) : boolean

Check MAC address for filter

Parameters

string $mac
array $allfilters

Returns

boolean

sn_SnmpParseDeviceMAC()

sn_SnmpParseDeviceMAC(  $data) : string

Extracts MAC of device

Parameters

$data

Returns

string

sn_SnmpParseFdbCacheArray()

sn_SnmpParseFdbCacheArray(  $fdbData_raw) : array

function that returns array data for existing FDB cache

Parameters

$fdbData_raw
  • array of existing cache _fdb files

Returns

array

sn_SnmpParseFdbCacheJson()

sn_SnmpParseFdbCacheJson(array  $fdbData_raw, string  $macFilter) : void

Renders JSON data for display FDB cache

Parameters

array $fdbData_raw
string $macFilter

sn_SnmpParseFdbExtract()

sn_SnmpParseFdbExtract(array  $data) : string

Extracts array data for some mac from sn_SnmpParseFdbCacheArray results

Parameters

array $data

Returns

string

sp_parse_cable_tester()

sp_parse_cable_tester(  $ip,   $community,   $currentTemplate) : string

D-Link Cable diagnostic data parser

Parameters

$ip
$community
$currentTemplate

Returns

string

sp_parse_ciscocpu()

sp_parse_ciscocpu(  $data) : string

Cisco memory usage data parser

Parameters

$data

Returns

string

sp_parse_ciscomemory()

sp_parse_ciscomemory(  $data) : string

Cisco memory usage data parser

Parameters

$data

Returns

string

sp_parse_eltex_acpower()

sp_parse_eltex_acpower(string  $data) : string

Eltex AC Power States

Parameters

string $data

Returns

string

sp_parse_eltex_battery()

sp_parse_eltex_battery(string  $data) : string

Eltex Battery charge state

Parameters

string $data

Returns

string

sp_parse_eltex_dcpower()

sp_parse_eltex_dcpower(string  $data) : string

Eltex DC Power States

Parameters

string $data

Returns

string

sp_parse_fxportbytes()

sp_parse_fxportbytes(  $data) : string

Foxgate 60xx port byte counters data parser

Parameters

$data

Returns

string

sp_parse_fxportstates()

sp_parse_fxportstates(  $data) : string

Some Foxgate 60xx port state data parser

Parameters

$data

Returns

string

sp_parse_raw()

sp_parse_raw(  $data) : string

Raw SNMP data parser

Parameters

$data

Returns

string

sp_parse_zyportbytes()

sp_parse_zyportbytes(  $data) : string

Zyxel Port byte counters data parser

Parameters

$data

Returns

string

sp_parse_zyportdesc()

sp_parse_zyportdesc(  $data) : string

Zyxel Port description data parser

Parameters

$data

Returns

string

sp_parse_zyportstates()

sp_parse_zyportstates(  $data) : string

Zyxel Port state data parser

Parameters

$data

Returns

string

sp_SnmpGetAllDevices()

sp_SnmpGetAllDevices() : array

Returns list of all monitored devices

Returns

array

sp_SnmpGetAllModelTemplates()

sp_SnmpGetAllModelTemplates() : array

Returns list of all available SNMP device templates

Returns

array

sp_SnmpGetModelTemplatesAssoc()

sp_SnmpGetModelTemplatesAssoc() : array

Gets associated list of SNMP templates and switch models

Returns

array

sp_SnmpParseFdb()

sp_SnmpParseFdb(  $portTable) : array

Parsing of FDB port table SNMP raw data

Parameters

$portTable

raw SNMP data

Returns

array

sp_SnmpParseFdbDl()

sp_SnmpParseFdbDl(  $portTable) : array

Parsing of FDB port table SNMP raw data for some exotic Dlink switches

Parameters

$portTable

raw SNMP data

Returns

array

sp_SnmpParseFdbFlp()

sp_SnmpParseFdbFlp(  $portTable,   $oid) : array

Parsing of FDB port table SNMP raw data for some strange foxgate switches

Parameters

$portTable

raw SNMP data

$oid

Returns

array

sp_SnmpParseFdbTlp()

sp_SnmpParseFdbTlp(  $portTable,   $oid) : array

Parsing of FDB port table SNMP raw data for some exotic Tplink switches

Parameters

$portTable

raw SNMP data

$oid

Returns

array

sp_SnmpPollData()

sp_SnmpPollData(  $ip,   $community,   $oid,   $cache = true) : string

Returns raw SNMP data from device with caching

Parameters

$ip

device IP

$community

SNMP community

$oid

OID which will be polled

$cache

cache results

Returns

string

sp_SnmpPollDevice()

sp_SnmpPollDevice(string  $ip, string  $community, array  $alltemplates, string  $deviceTemplate, array  $allusermacs, array  $alladdress, string  $communitywrite = '', boolean  $quiet = false, array  $allswitchmacs = array()) : void

Poll/Show data for some device

Parameters

string $ip
string $community
array $alltemplates
string $deviceTemplate
array $allusermacs
array $alladdress
string $communitywrite
boolean $quiet
array $allswitchmacs

stg_add_jobtype()

stg_add_jobtype(string  $jobtype, string  $jobcolor) : void

Creates new jobtype in database

Parameters

string $jobtype
string $jobcolor

stg_add_new_job()

stg_add_new_job(string  $login, string  $date, integer  $worker_id, integer  $jobtype_id, string  $job_notes) : void

Creates new job in database

Parameters

string $login
string $date
integer $worker_id
integer $jobtype_id
string $job_notes

stg_add_tagtype()

stg_add_tagtype() : void

Creates new tag type in database

stg_add_user_tag()

stg_add_user_tag(string  $login, integer  $tagid) : void

Assosicates some tag with existing user login

Parameters

string $login
integer $tagid

stg_convert_size()

stg_convert_size(integer  $fs) : string

Converts bytes into human-readable values like Kb, Mb, Gb.

..

Parameters

integer $fs

Returns

string

stg_del_user_tag()

stg_del_user_tag(integer  $tagid) : void

Deletes user tag by its ID

Parameters

integer $tagid

stg_del_user_tagid()

stg_del_user_tagid(string  $login, integer  $tagid) : void

Deletes user tag by tagid

Parameters

string $login
integer $tagid

stg_delete_job()

stg_delete_job(integer  $jobid) : void

Deletes some job from database by its ID

Parameters

integer $jobid

stg_delete_jobtype()

stg_delete_jobtype(integer  $id) : void

Deletes existing job type from database

Parameters

integer $id

stg_delete_tagtype()

stg_delete_tagtype(integer  $tagid) 

Deletes tag type from database

Parameters

integer $tagid

stg_get_alltagnames()

stg_get_alltagnames() : array

Returns array of available tagtypes as id=>name

Returns

array

stg_get_employee_data()

stg_get_employee_data(integer  $id) : array

Returns employee data array by its ID

Parameters

integer $id

Returns

array

stg_get_employee_name()

stg_get_employee_name(integer  $id) : string

Returns employee name from database by its ID

Parameters

integer $id

Returns

string

stg_get_jobtype_color()

stg_get_jobtype_color(integer  $id) : string

Returns jobtype color by its ID

Parameters

integer $id

Returns

string

stg_get_jobtype_name()

stg_get_jobtype_name(integer  $id) : string

Returns jobtype name by its ID

Parameters

integer $id

Returns

string

stg_get_tag_body_deleter()

stg_get_tag_body_deleter(integer  $id, string  $login, integer  $tagid) : string

Returns user tag deletion HTML control

Parameters

integer $id
string $login
integer $tagid

Returns

string

stg_get_tag_data()

stg_get_tag_data(integer  $tagid) : array

Returns tag data by its ID

Parameters

integer $tagid

Returns

array

stg_get_tagtype_data()

stg_get_tagtype_data(integer  $tagtypeid) : array

Returns array of some tag type data

Parameters

integer $tagtypeid

Returns

array

stg_putlogevent()

stg_putlogevent(string  $event) 

stg_putlogevent dummy wrapper for log_register() - only for backward compat

Parameters

string $event

stg_show_tagtypes()

stg_show_tagtypes() : string

Render available tag types list with all needed controls

Returns

string

stg_show_user_tags()

stg_show_user_tags(string  $login) : string

Returns user applied tags as browsable html

Parameters

string $login

Returns

string

stg_tagadd_selector()

stg_tagadd_selector() : void

Shows tag addition dialogue

stg_tagdel_selector()

stg_tagdel_selector(string  $login) : void

shows tag deletion controls

Parameters

string $login

stg_tagid_selector()

stg_tagid_selector() : string

Returns tag id selector

Returns

string

strtolower_utf8()

strtolower_utf8(string  $string) : string

Safely transliterates UTF-8 string

Parameters

string $string

Returns

string

translit_string()

translit_string(string  $var) : string

Translits cyryllic string into latin chars

Parameters

string $var

Returns

string

ts_AdvFiltersControls()

ts_AdvFiltersControls(  $extraTrailingSpace = true) 

Parameters

$extraTrailingSpace

ts_AdvFiltersQuery()

ts_AdvFiltersQuery() 

ts_CheckDailyDuplicates()

ts_CheckDailyDuplicates(array  $taskData) : void

Checks some task for today duplicates by login/address fields

Parameters

array $taskData

ts_CreateTask()

ts_CreateTask(string  $startdate, string  $starttime, string  $address, string  $login, string  $phone, integer  $jobtypeid, integer  $employeeid, string  $jobnote) : void

Creates new task in database

Parameters

string $startdate
string $starttime
string $address
string $login
string $phone
integer $jobtypeid
integer $employeeid
string $jobnote

ts_DeleteTask()

ts_DeleteTask(integer  $taskid) : void

Deletes existing task from database

Parameters

integer $taskid

ts_DetectUserByAddress()

ts_DetectUserByAddress(string  $address) : string

Returns login detected by address

Parameters

string $address

Returns

string

ts_FlushSMSData()

ts_FlushSMSData(integer  $taskid) : void

Flushes sms data for some task

Parameters

integer $taskid

ts_GetActiveEmployee()

ts_GetActiveEmployee() : array

Returns array of active employees as id=>name

Returns

array

ts_GetAllEmployee()

ts_GetAllEmployee() : array

Returns array of all existing employees as id=>name

Returns

array

ts_GetAllEmployeeLogins()

ts_GetAllEmployeeLogins() : string

Returns all available admin_login=>employee name pairs

Returns

string —

serialized array

ts_GetAllEmployeeLoginsCached()

ts_GetAllEmployeeLoginsCached() : string

Returns all available admin_login=>employee name pairs from cache if available

Returns

string —

serialized array

ts_GetAllJobColors()

ts_GetAllJobColors() : array

Returns array of available jobtype colors as id=>color

Returns

array

ts_GetAllJobtypes()

ts_GetAllJobtypes() : array

Returns array of available jobtypes as id=>name

Returns

array

ts_GetAllJobtypesColorStyles()

ts_GetAllJobtypesColorStyles() : string

Returns all jobtypes custom stylesheets for jq fullcalendar listing

Returns

string

ts_GetAllJobtypesData()

ts_GetAllJobtypesData() : array

Returns array of all jobtypes data as id=>jobtype data

Returns

array

ts_GetAllTasks()

ts_GetAllTasks() : array

Returns all of available tasks as id=>data

Returns

array

ts_GetAllTasksAddress()

ts_GetAllTasksAddress() : array

Returns array of all tasks address as taskId=>address

Returns

array

ts_GetAllTasksQuickData()

ts_GetAllTasksQuickData() : array

Returns all tasks short data as taskid=>data

Returns

array

ts_GetEmployeeByLogin()

ts_GetEmployeeByLogin(\sting  $login) : mixed

Gets employee by administrator login

Parameters

\sting $login

logged in administrators login

Returns

mixed

ts_GetLogTask()

ts_GetLogTask(integer  $taskid) : void

Find all log for task

Parameters

integer $taskid

ts_GetTaskData()

ts_GetTaskData(integer  $taskid) : array

Returns array of task data by its ID

Parameters

integer $taskid

Returns

array

ts_GetUndoneCountersAll()

ts_GetUndoneCountersAll() : integer

Returns count of undone tasks - used by DarkVoid

Returns

integer

ts_GetUndoneCountersMy()

ts_GetUndoneCountersMy() : integer

Returns count of undone tasks only for current admin login - used by DarkVoid

Returns

integer

ts_GetUndoneTasksArray()

ts_GetUndoneTasksArray(boolean  $allTime = false) : array

Returns array of undone tasks - used by Warehouse and another weird things as id=>taskdata

Parameters

boolean $allTime

get undone tasks not only before current date

Returns

array

ts_isMeBranchCursed()

ts_isMeBranchCursed() : boolean

Checks is current administrator cursed by some branch?

Returns

boolean

ts_JGetAllTasks()

ts_JGetAllTasks() : string

Returns data for jq fullcalendar widget with all tasks

Returns

string

ts_JGetDoneTasks()

ts_JGetDoneTasks() : string

Returns data for jq fullcalendar widget with done tasks

Returns

string

ts_JGetJobsReport()

ts_JGetJobsReport() : string

Returns jq fullcalendar data for jobreport module

Returns

string

ts_JGetUndoneTasks()

ts_JGetUndoneTasks() : string

Returns data for jq fullcalendar widget with undone tasks

Returns

string

ts_ModifyTask()

ts_ModifyTask(integer  $taskid, string  $startdate, string  $starttime, string  $address, string  $login, string  $phone, integer  $jobtypeid, integer  $employeeid, string  $jobnote) : void

Updates task params in database

Parameters

integer $taskid
string $startdate
string $starttime
string $address
string $login
string $phone
integer $jobtypeid
integer $employeeid
string $jobnote

ts_PreviousUserTasksRender()

ts_PreviousUserTasksRender(string  $login,   $address = '',   $noFixedWidth = false) : string

Renders list of all previous user tasks by all time

Parameters

string $login
$address
$noFixedWidth

Returns

string

ts_PrintDialogue()

ts_PrintDialogue() : string

Returns tasks by date printing dialogue

Returns

string

ts_PrintTasks()

ts_PrintTasks(string  $datefrom, string  $dateto) : void

Renders printable tasks filtered by dates

Parameters

string $datefrom
string $dateto

ts_PrintTasksTable()

ts_PrintTasksTable(string  $datefrom, string  $dateto,   $nopagebreaks = false) : void

Renders printable tasks filtered by dates

Parameters

string $datefrom
string $dateto
$nopagebreaks

ts_renderLogsDataAjax()

ts_renderLogsDataAjax(integer  $taskid = '') : void

Find all log for task

Parameters

integer $taskid

ts_renderLogsListAjax()

ts_renderLogsListAjax(integer  $taskid = '') : void

Render panel for tas logs

Parameters

integer $taskid

ts_SendSMS()

ts_SendSMS(integer  $employeeid, string  $message) : array

Stores SMS for some employee for further sending with senddog run

Parameters

integer $employeeid
string $message

Throws

\Exception

Returns

array

ts_SendTelegram()

ts_SendTelegram(integer  $employeeid, string  $message, array  $taskdata = array()) : array

Stores Telegram message for some employee

Parameters

integer $employeeid
string $message
array $taskdata

Returns

array

ts_SendTelegramVenue()

ts_SendTelegramVenue(string  $chatId, string  $title, string  $address, string  $geo) : void

Sends task location to some chatid

Parameters

string $chatId
string $title
string $address
string $geo

ts_ShowLate()

ts_ShowLate() : string

Returns list of expired undone tasks

Returns

string

ts_ShowPanel()

ts_ShowPanel() : string

Returns taskman controls

Returns

string

ts_TaskChangeForm()

ts_TaskChangeForm(integer  $taskid) : void

Shows task editing/management form aka task profile

Parameters

integer $taskid

ts_TaskCreateForm()

ts_TaskCreateForm() : string

Returns task creation form

Returns

string

ts_TaskCreateFormProfile()