\SMSZilla
Powerful SMS sending mechanics there
Synopsis
class SMSZilla
{
- // constants
- const URL_ME = '?module=smszilla';
- const URL_MACROHELP = 'http://wiki.ubilling.net.ua/doku.php?id=templating&#smszilla';
- const POOL_PATH = './exports/';
- const UPLOAD_PATH = './exports/';
- // members
- protected array $altCfg = ;
- protected array $allTariffs = ;
- protected array $allTariffPrices = ;
- protected array $allCities = ;
- protected array $allSwitches = ;
- protected array $allSwitchesUsers = ;
- protected array $allUserData = ;
- protected array $allTagTypes = ;
- protected array $templates = ;
- protected array $filters = ;
- protected $messages = '';
- protected array $filterTypes = ;
- protected array $filterNames = ;
- protected array $directionNames = ;
- protected strings $entitiesType = '';
- protected array $filteredEntities = ;
- protected array $filteredNumbers = ;
- protected $fundsFlow = '';
- protected array $inetTags = ;
- protected array $ukvTags = ;
- protected array $downUsers = ;
- protected bool $useCache = true;
- protected $sms = '';
- protected $branches = '';
- protected $districts = '';
- protected $ukv = '';
- protected bool $ukvDebtorsLoaded = false;
- protected array $ukvDebtors = ;
- protected array $employee = ;
- protected bool $useExtMobiles = false;
- protected $extMobiles = '';
- protected array $opCustomers = ;
- protected integer $extMobilesCount = 0;
- protected array $filterStats = ;
- protected integer $smsLenLimit = 160;
- protected string $countryCode = '380';
- protected integer $mobileLen = 12;
- protected bool $normalizerDebug = false;
- protected array $allNumListsNames = ;
- protected array $allNumListsNumbers = ;
- protected array $excludeNumbers = ;
- protected array $supportedMacro = ;
- protected $cache = '';
- // methods
- public void __construct()
- protected void loadAlter()
- protected void loadUsers()
- protected void loadOpCustomers()
- protected array getOpenPayzCustomers()
- protected void loadDownUsers()
- protected void initUKV()
- protected void loadTariffs()
- protected void loadCities()
- protected void loadSwitches()
- protected void loadTagTypes()
- protected void loadTemplates()
- protected void loadInetTags()
- protected void loadUkvTags()
- protected void loadEmployee()
- protected void initMessages()
- protected void initCache()
- protected void initSMS()
- protected void initBranches()
- protected void initDistricts()
- protected void initFundsFlow()
- protected int getUserOnlineLeftDayCount()
- protected string getUserOnlineToDate()
- protected void setOptions()
- public int createTemplate()
- public void/string deleteTemplate()
- public void/string saveTemplate()
- public string renderTemplateCreateForm()
- protected string renderMacroHelp()
- public string renderTemplateEditForm()
- public string renderTemplatesList()
- protected void loadNumLists()
- protected void loadExcludedNumbers()
- public void createExclude()
- public void deleteExlude()
- public string renderNumListCreateForm()
- public string renderNumListEditForm()
- public void saveNumList()
- public string renderNumListsList()
- public void/string createNumList()
- public void/string deleteNumList()
- public string createNumListNumberForm()
- public string uploadNumListNumbersForm()
- public void/string createNumlistSingleNumber()
- public void/string cleanupNumlist()
- public string renderCleanupNumlistForm()
- public string catchFileUpload()
- protected string preprocessNumList()
- public string renderNumsContainer()
- public void ajaxNumbersReply()
- public void deleteNumlistNumber()
- public string renderExcludeNumsList()
- public string renderExcludeCreateForm()
- public string panel()
- public string renderFilterCreateForm()
- public string catchAjRequest()
- public void/string createFilter()
- protected void loadFilters()
- protected string renderFilterPreview()
- public string renderFiltersList()
- public void/string deleteFilter()
- protected bool checkInetTagId()
- protected bool checkSwitchId()
- protected bool checkUkvTagId()
- public string renderSendingForm()
- protected string/void normalizePhoneFormat()
- protected void extractEntitiesNumbers()
- protected void saveFilterStats()
- protected string renderFilterStats()
- public string filtersPreprocessing()
- protected string renderSmsPoolPreviewContainer()
- public void ajaxPreviewReply()
- protected strings generateSmsText()
- protected int getSmsCount()
- protected void generateSmsPool()
- protected void filtercity()
- protected void filteraddress()
- protected void filterlogin()
- protected void filterip()
- protected void filtercashmonth()
- protected void filtercashdays()
- protected void filtercashgreater()
- protected void filtercashlesser()
- protected void filtercashlesszero()
- protected void filtercashzero()
- protected void filtercreditset()
- protected void filtertags()
- protected void filterao()
- protected void filterpassive()
- protected void filterswitch()
- protected void filternotpassive()
- protected void filteractive()
- protected void filterdown()
- protected void filtertariff()
- protected void filtertariffcontain()
- protected void filterbranch()
- protected void filternobranch()
- protected void filterdistrict()
- protected void filternotariff()
- protected void filterukvtariff()
- protected void filternumlist()
- protected void filternumcontain()
- protected void filternumnotcontain()
- protected void filternumnotouruser()
- protected void filterukvactive()
- protected void filteremployeeappointment()
- protected void filteremployeeactive()
- protected void filterukvdebtor()
- protected void filterextmobiles()
- protected void filterrealname()
Constants
Name | Value |
---|---|
URL_ME | '?module=smszilla' |
URL_MACROHELP | 'http://wiki.ubilling.net.ua/doku.php?id=templating&#smszilla' |
POOL_PATH | './exports/' |
UPLOAD_PATH | './exports/' |
Members
protected
- $allCities
—
array
Contains available cities as cityid=>data - $allNumListsNames
—
array
Contains all numbers lists names as id=>name - $allNumListsNumbers
—
array
Contains all numbers lists numbers records ad id=>numlistdata - $allSwitches
—
array
Contains available swithes as swithid=>data - $allSwitchesUsers
—
array
Contains all users swithes as login=>switchid - $allTagTypes
—
array
Contains available tag types as id=>name - $allTariffPrices
—
array
Contains available internet tariffs prices - $allTariffs
—
array
Contains all of available tariffs data as tariffname=>data - $allUserData
—
array
Contains data of all available Internet users as login=>data - $altCfg
—
array
System alter.ini config as key=>value - $branches
—
Branches object placeholder - $cache
—
System caching object placeholder - $countryCode
—
string
Contains country code for target country - $directionNames
—
array
Contains available direction names - $districts
—
Districts object placeholder - $downUsers
—
array
Contains all users and their down state as login=>state - $employee
—
array
Contains available employee list - $entitiesType
—
strings
Current run entities type - $excludeNumbers
—
array
Contains excludes numbers as mobile=>id - $extMobiles
—
Extended mobiles object placeholder - $extMobilesCount
—
int
Contains count of extended mobiles if they are extracted - $filterNames
—
array
Contains available filters names - $filterStats
—
array
Contains filters workflow stats as name=>count - $filterTypes
—
array
Available filter types - $filteredEntities
—
array
Contains entities that passed full filter set - $filteredNumbers
—
array
Contains filtered numbers extracted from filtered entities - $filters
—
array
Contains available filters - $fundsFlow
—
FundsFlow object placeholder - $inetTags
—
array
Contains tags for internet users - $messages
—
System message helper placeholder - $mobileLen
—
int
Contains full number length for some country without + - $normalizerDebug
—
bool
Phone normalizer debugging flag - $opCustomers
—
array
Contains available internet users paymentIDs - $sms
—
SMS abstraction layer placeholder - $smsLenLimit
—
int
Contains maximum chars limit for one SMS - $supportedMacro
—
array
Contains supported macro list for short help - $templates
—
array
Contains available templates as id=>data - $ukv
—
UKV object placeholder - $ukvDebtors
—
string
Available UKV debtors - $ukvDebtorsLoaded
—
bool
UKV debtors once loading flag - $ukvTags
—
array
Contains tags for UKV users - $useCache
—
bool
Caching flag - $useExtMobiles
—
bool
Extended mobiles phonebase usage flag
Methods
protected
- checkInetTagId() — Checks have user some tag assigned
- checkSwitchId() — Checks have user switchId
- checkUkvTagId() — Checks have UKV user some tag assigned
- extractEntitiesNumbers() — Extract mobile numbers from filtered entities array
- filteractive() — User activity filter
- filteraddress() — Address filter
- filterao() — AlwaysOnline filter
- filterbranch() — Branch filter
- filtercashdays() — Days less cash filter
- filtercashgreater() — Greater cash filter
- filtercashlesser() — Lesser cash filter
- filtercashlesszero() — Lesser zero cash filter
- filtercashmonth() — Month cash filter
- filtercashzero() — Zero cash filter
- filtercity() — City filter
- filtercreditset() — Credit filter
- filterdistrict() — Districts filter
- filterdown() — Down filter
- filteremployeeactive() — Employee activity filter
- filteremployeeappointment() — Employee appointment filter
- filterextmobiles() — Just sets ext mobiles extraction flag
- filterip() — IP substring filter
- filterlogin() — Login filter
- filternobranch() — Users without branch filter
- filternotariff() — No tariff users filter
- filternotpassive() — Not passive filter
- filternumcontain() — Numlist notes contains filter
- filternumlist() — Numlist ID filter
- filternumnotcontain() — Numlist notes not contains filter
- filternumnotouruser() — Numlist not our user filter by mobile number
- filterpassive() — Passive filter
- filterrealname()
- filterswitch() — Switch filter
- filtertariff() — Tariff filter
- filtertariffcontain() — Tariff filter
- filterukvactive() — UKV activity filter
- filterukvdebtor() — UKV debtors filter
- filterukvtariff() — UKV tariff users filter
- generateSmsPool() — Generates SMS pool for preview rendering or further sending
- generateSmsText() — Generates SMS text for sending/preview
- getOpenPayzCustomers() — Returns list of OpenPayz customers as login=>paymentid
- getSmsCount() — Returns nearest sending SMS count for multibyte encodings
- getUserOnlineLeftDayCount() — Returns user online left days without additional DB queries runDataLoaders() must be run once, before usage
- getUserOnlineToDate() — Returns user online to date
- initBranches() — Branches initalization
- initCache() — Inits system caching object into protected prop
- initDistricts() — Creates new districts instance
- initFundsFlow() — Inits funds flow object instance
- initMessages() — Inits system messages helper into protected prop
- initSMS() — Inits SMS queue abstraction layer
- initUKV() — Inits UKV object instance
- loadAlter() — Loads system alter config into private property for further usage
- loadCities() — Loads existing cities from database
- loadDownUsers() — Loads available users down states into separate property
- loadEmployee() — Loads available employee from database
- loadExcludedNumbers() — Loads existing excluded numbers from database
- loadFilters() — Loads existing filters from database
- loadInetTags() — Loads array of all tagtypes set to users
- loadNumLists() — Loads existing numberlists from database
- loadOpCustomers() — Sets up OpenPayz paymentIDs array for further usage
- loadSwitches() — Loads existing switches from database
- loadTagTypes() — Loads existing tag types from database
- loadTariffs() — Loads existing tariffs from database into protected property for further usage
- loadTemplates() — Loads all existing SMS templates from database
- loadUkvTags() — Loads array of all tagtypes set to users
- loadUsers() — Loads all existing Internet users from database
- normalizePhoneFormat() — Normalizes mobile number to E164 phone format.
- preprocessNumList() — Opens and inserts into database some numbers list data
- renderFilterPreview() — Renders existing filter preview
- renderFilterStats() — Renders some filtered processing stats and charts
- renderMacroHelp() — Renders supported templating macro short help
- renderSmsPoolPreviewContainer() — Renders SMS pool preview container
- saveFilterStats() — Saves each filter workflow stats
- setOptions() — Sets all necessary options
public
- __construct() — Creates new SMSZilla instance
- ajaxNumbersReply() — Renders numbers list ajax data tables reply
- ajaxPreviewReply() — Renders previously cached preview JSON data
- catchAjRequest() — Returns ajax inputs of required type
- catchFileUpload() — Catches file upload
- cleanupNumlist() — Cleanups numlist from existing users phones
- createExclude() — Creates new mobile exclude in database
- createFilter() — Creates new filter in database
- createNumList() — Creates new numbers list in database
- createNumListNumberForm() — Renders form for single number addition to number list
- createNumlistSingleNumber() — Creates new numlist phone record in database
- createTemplate() — Creates new SMS text template
- deleteExlude() — Deletes existing excluded number from database
- deleteFilter() — Deletes existing filter from database
- deleteNumList() — Creates new numbers list in database
- deleteNumlistNumber() — Delete some single numlist mobile number from database
- deleteTemplate() — Deletes existing template
- filtersPreprocessing() — Performs draft filter entities preprocessing
- panel() — Renders default module control panel
- renderCleanupNumlistForm() — Renders numlist cleanup form
- renderExcludeCreateForm() — Renders exclude number creation form
- renderExcludeNumsList() — Renders existing excludes list with some controls
- renderFilterCreateForm() — Renders filter creation form
- renderFiltersList() — Renders available filters list
- renderNumListCreateForm() — Renders numlist creation form
- renderNumListEditForm() — Renders numeric list editing form
- renderNumListsList() — Renders numlist list with some controls
- renderNumsContainer() — Renders numbers list mobiles container
- renderSendingForm() — Renders template and filters selection form
- renderTemplateCreateForm() — Renders new template creation form
- renderTemplateEditForm() — Renders existing template edit form
- renderTemplatesList() — Renders existing templates list with some controls
- saveNumList() — Saves numlist name changes into database
- saveTemplate() — Saves changes in existing template
- uploadNumListNumbersForm() — Renders upload form for some mobile data