Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:gsoc_2008_msg_sms_login [2008/06/10 12:46] ajay_kumar |
dev:gsoc_2008_msg_sms_login [2009/07/06 20:36] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
Current login architecture takes into consideration only Sahana Core users, i.e. users who are registered as users in the Sahana system and their record exists in the DB.\\ | Current login architecture takes into consideration only Sahana Core users, i.e. users who are registered as users in the Sahana system and their record exists in the DB.\\ | ||
Public usage for potential news alert broadcasts, or public information IVR via SMS can be implemented following the similar approach. The module is being written keeping this in mind. | Public usage for potential news alert broadcasts, or public information IVR via SMS can be implemented following the similar approach. The module is being written keeping this in mind. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 13: | Line 18: | ||
===== Files to be added: ===== | ===== Files to be added: ===== | ||
- | - **/inc/ | + | - **/ |
- __Purpose of File:__ Main include file for the SMS System calls other files and performs functions | - __Purpose of File:__ Main include file for the SMS System calls other files and performs functions | ||
- | - **/ | + | - **/ |
- __Purpose of File:__ Handles all communication as a result of SMS input. Parse SMS, Check keywords, Trigger corresponding functions as per SMS input | - __Purpose of File:__ Handles all communication as a result of SMS input. Parse SMS, Check keywords, Trigger corresponding functions as per SMS input | ||
- **/ | - **/ | ||
- __Purpose of File:__ Provide SMS Based Session management based on caller ID/mobile number | - __Purpose of File:__ Provide SMS Based Session management based on caller ID/mobile number | ||
- | - **/ | + | - **/ |
+ | - {{dev: | ||
- __Purpose of File:__ Provide SMS Based Authorisation as per Sahana Framework draws from lib_auth.inc | - __Purpose of File:__ Provide SMS Based Authorisation as per Sahana Framework draws from lib_auth.inc | ||
- **/ | - **/ | ||
- __Purpose of File:__ Provide SMS Based Authentication and assigns role to User as per Sahana Framework draws from lib_acl.inc | - __Purpose of File:__ Provide SMS Based Authentication and assigns role to User as per Sahana Framework draws from lib_acl.inc | ||
- | - **/ | + | - **/ |
- __Purpose of File:__ Errors sent to users as output via SMS on receiving SMS input. | - __Purpose of File:__ Errors sent to users as output via SMS on receiving SMS input. | ||
- **/ | - **/ | ||
Line 69: | Line 75: | ||
<code php> | <code php> | ||
- | function _shn_msg_parse_short_message($message){\\ | + | function _shn_msg_parse_short_message($message){ |
- | | + | |
- | | + | |
- | | + | |
} | } | ||
</ | </ | ||
Line 80: | Line 86: | ||
<code php> | <code php> | ||
- | <?\\ | + | <? |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | }\\ | + | } |
- | | + | |
- | | + | |
- | echo "Count = $count <br \>"; | + | echo "Count = $count <br \>"; |
- | | + | |
- | echo "< | + | echo "< |
- | | + | |
- | {\\ | + | { |
- | $user = $output[1];\\ | + | $user = $output[1]; |
- | echo "User name: " | + | echo "User name: " |
- | echo "< | + | echo "< |
- | | + | |
- | | + | |
- | | + | |
- | }\\ | + | } |
- | }\\ | + | } |
- | echo " | + | echo " |
- | $pass = $password;\\ | + | $pass = $password; |
- | // | + | // |
- | | + | |
- | | + | |
- | // | + | // |
- | $q = " | + | $q = " |
- | WHERE user_name = ' | + | WHERE user_name = ' |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | }\\ | + | } |
- | | + | |
- | | + | } |
- | | + | |
- | // Create a digest of the password collected from the challenge | + | // Create a digest of the password collected from the challenge |
- | | + | |
- | echo " | + | echo " |
- | // Formulate the SQL to find the user \\ | + | // Formulate the SQL to find the user |
$q = " | $q = " | ||
- | WHERE user_name = ' | + | WHERE user_name = ' |
- | AND password = ' | + | AND password = ' |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | }\\ | + | } |
?> | ?> | ||
</ | </ | ||
* --- // | * --- // |