-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from jbubik/master
Database handling improved for Alternate Gateways
- Loading branch information
Showing
16 changed files
with
2,355 additions
and
1,316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
/** | ||
* Kalkun | ||
* An open source web based SMS Management | ||
* | ||
* @package Kalkun | ||
* @author Kalkun Dev Team | ||
* @license http://kalkun.sourceforge.net/license.php | ||
* @link http://kalkun.sourceforge.net | ||
*/ | ||
|
||
// ------------------------------------------------------------------------ | ||
|
||
/** | ||
* Clickatell_model Class | ||
* | ||
* Handle all messages database activity | ||
* for Clickatell <http://clickatell.com> | ||
* | ||
* @package Kalkun | ||
* @subpackage Messages | ||
* @category Models | ||
*/ | ||
require_once('nongammu_model'.EXT); | ||
|
||
class Clickatell_model extends nongammu_model { | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @access public | ||
*/ | ||
function __construct() | ||
{ | ||
parent::__construct(); | ||
$this->gateway = $this->config->item('gateway'); | ||
|
||
if(empty($this->gateway['url'])) | ||
{ | ||
$this->gateway['url'] = 'http://api.clickatell.com'; | ||
} | ||
} | ||
|
||
// -------------------------------------------------------------------- | ||
|
||
/** | ||
* Send Messages (Still POC) | ||
* Using HTTP API <http://www.clickatell.com/apis-scripts/apis/http-s/> | ||
* | ||
* @return void | ||
*/ | ||
function really_send_messages($data) | ||
{ | ||
$gateway = $this->gateway; | ||
file_get_contents($gateway['url'].'/http/sendmsg?user='.$gateway['username']. | ||
'&password='.$gateway['password'].'&api_id='.$gateway['api_id'].'&to='.$data['dest'].'&text='.urlencode($data['message'])); | ||
} | ||
} | ||
|
||
/* End of file clikatell_model.php */ | ||
/* Location: ./application/models/gateway/clikatell_model.php */ |
Oops, something went wrong.