本文整理汇总了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;
}
}