SMS
Views:
Hi Tom, hint hint ;-)
To Text Tom get out your phone and use 07123123123.
Contents |
Data Sources
Uses the unixODBC system set up for Course Info database to access LMS. - Settings are in /libs/sms/smsSettings.php Uses its own MysqlDatabase to track messages, and log messages - Settings are in /libs/sms/smsSettings.php
MySql Database
NOTE USES TRIGGERS. These are NOT shown in the show create table or define table output. to create the triggers login using Command Line client and do the following:
DELMITER |
CREATE TRIGGER <table name here>LastUpdated BEFORE UPDATE
ON <table name here> FOR EACH ROW
BEGIN
SET NEW.lastUpdated = CURRENT_TIMESTAMP();
END;|
DELIMTER ;
you will need super privaleges to do this.
Stucture
- / pages which the users see
- /libs/
- /libs/sms/ - libs for the sms side of things
- /libs/standard/ - KJW's database and other fuctions should be identical to STS.
- /scripts/ - scripts that are called to handle data from the user pages.
Function
Atually the site is pretty simple.
Nav and front page
- index.php
The navigation is pretty much universal. All the links you'll be ableto use are in the left hand menu. Thefront page acts as the primary interface, since ONLY data from LMS is accepted as a sourse of info to message students, you just have three options (there is a fouth option still part coded in for whole courses). Either select a Tuto Group,a class or search for a student.
Student selection pages
- findStudent.php
- tutor.php
- teach.php
These select which student(s) the system will message, and shows whether they have a valid number or not. Whole groups can be broken down using the checkboxes. All three of these submit data to one compose page. simple.php. For saftey / data base reasons they all submit databse ID's NOT telpehone numbers
Composition
- simple.php
This recieves data from the selection pages, and submits it thats about it. The force send now button is for over riding to time checks.
Script Pages
- scripts/sender.php
- scripts/worker.php
When a message is sent, its submitted to sender.php, which checks the vailidity, ques it up etc. and enters all the sender, recipient and message data ito OUR database (not LMS). This is then processed checked. If the message "force send now" is used sender.php calls worker.php to actully deliver the message. other wise it assumes worker.php will deliver it automatically at the correct time. When its done worker diverts to avoid people reloading it or anything. worker.php is the core of the app, it runs off a cron job every 5 minutes. Taking care of the bread and butter work of delivering messages to the gateway and retrieving their status off the gateway.
status pages
- sent.php
- failed.php
- status.php
- statDetailed.php
The first 2 are just to provide confirmation of thesending system working or not. Themain page is status.php wich retrieves the inforbackout of the databse for the logged in users messages. There is also a detail page, statsDetail.php. This incudes info on individual recipinets of the message, for multiuser messages.
Settings
the provider settigns are in /libs/smsSettigns.php
