This file contains hidden or 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
<?php | |
require 'vendor/autoload.php'; | |
use AfricasTalking\SDK\AfricasTalking; | |
include_once 'util.php'; | |
class Sms { | |
protected $AT; | |
function __construct() | |
{ | |
$this->AT = new AfricasTalking(Util::$API_USERNAME, Util::$API_KEY); | |
} |
This file contains hidden or 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
<?php | |
include_once 'util.php'; | |
include_once 'db.php'; | |
class User { | |
protected $phoneNumber; | |
protected $name; | |
public function allPhoneNumbers($pdo){ | |
//returns an array of phone numbers | |
try{ | |
$stmt = $pdo->prepare("SELECT phone_number FROM user"); |
This file contains hidden or 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
<?php | |
include_once 'util.php'; | |
include_once 'db.php'; | |
include_once 'user.php'; | |
include_once 'sms.php'; | |
class Survey { | |
protected $title; | |
protected $description; | |
public function addUserToSurvey ($pdo, $users, $surveyId, $level,$invitationsStatus){ | |
//$users is an indexed array of phone numbers. |
OlderNewer