本文整理匯總了PHP中Sms::smsAPI方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sms::smsAPI方法的具體用法?PHP Sms::smsAPI怎麽用?PHP Sms::smsAPI使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sms
的用法示例。
在下文中一共展示了Sms::smsAPI方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: resend
public function resend()
{
$this->load->model('Sms_model');
$this->load->model('Member_model');
$this->load->model('Content_model');
$smid = $_POST['smid'];
$sid = $_POST['sid'];
$member = $this->Member_model->getMemberFromSchedule($smid);
foreach ($member as $mem) {
}
$content = $this->Content_model->getContentFromSchedule($sid);
foreach ($content as $ct) {
}
$message = $ct->content;
$mid = $mem->member_id;
$phno = $mem->phone_no;
$code = $mem->country_code;
$phno = $code . $phno;
$membercount = $this->Member_model->getTotalMemberStatusFromMemSchedule($sid);
foreach ($membercount as $mc) {
}
$msum = $mc->msum;
$mcount = $mc->mcount;
$apiusername = 'schoolmgmt';
$apipassword = '45440e42bc';
$tonos = $phno;
$smstext = $message;
$sms = new Sms();
$res = $sms->smsAPI($apiusername, $apipassword, $tonos, $smstext);
if ($res == true) {
$data = array("delivery_status" => '1');
$this->Sms_model->updateDeliveryStatus($data, $mid);
if ($msum == $mcount) {
$sdata = array("schedule_status" => '1');
$this->Sms_model->updateScheduleStatus($sdata, $sid);
}
echo true;
} else {
echo false;
}
}