本文整理汇总了PHP中SMS::Send方法的典型用法代码示例。如果您正苦于以下问题:PHP SMS::Send方法的具体用法?PHP SMS::Send怎么用?PHP SMS::Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMS
的用法示例。
在下文中一共展示了SMS::Send方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// 메일
if ($config['cf_email_use'] && $_POST['od_send_mail']) {
include './ordermail.inc.php';
}
// 에스크로 배송
if ($_POST['send_escrow'] && $od['od_tno'] && $od['od_escrow']) {
$escrow_tno = $od['od_tno'];
$escrow_numb = $od_invoice;
$escrow_corp = $od_delivery_company;
include G5_SHOP_PATH . '/' . $od['od_pg'] . '/escrow.register.php';
}
}
}
// SMS
if ($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $sms_count) {
$SMS->Send();
}
$g5['title'] = '엑셀 배송일괄처리 결과';
include_once G5_PATH . '/head.sub.php';
?>
<div class="new_win">
<h1><?php
echo $g5['title'];
?>
</h1>
<div class="local_desc01 local_desc">
<p>배송일괄처리를 완료했습니다.</p>
</div>
示例2: envoyer_sms2
public static function envoyer_sms2($arr)
{
global $db;
$st = $db->prepare("select compte, user, user_pass, emetteur, indicatif, localisation_sms\r\n\t\tFROM sms_param \r\n\t\twhere permission=:permission LIMIT 1;");
$st->execute(array(':permission' => $_SESSION['login']));
$ma_var = $st->fetchAll(PDO::FETCH_ASSOC);
$st->closeCursor();
$sms_id = "erreur";
$pos = strpos($arr['tel'], '0');
if ($pos === false || $pos != 0) {
$sql = "INSERT INTO `sms_historique`(`id`, `date_envoi`, `emetteur`, `description`, `numero`, `sms_id`, `ptt`, `date`, `descriptionDlr`, `permission`)\r\n\t\t\tVALUES ('' , NOW(), :emetteur, 'Erreur format tel (0 deb)', :numero, 'erreur','', '', '', :permission)";
$sth = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$sth->execute(array(':permission' => $_SESSION['login'], ':emetteur' => $_SESSION['login2'], ':numero' => $arr['tel']));
$id = $db->lastInsertId();
$sth->closeCursor();
$id = $id - 200;
$st = $db->prepare("DELETE FROM `aerogard2`.`sms_historique` where id<'{$id}' and permission='" . $_SESSION['login'] . "'");
$st->execute();
} else {
// correction numero en fonction indicatif modem
$pos2 = strpos($arr['tel'], '0033');
if ($pos2 === false || $pos2 != 0) {
$numero_tel2 = $arr['tel'];
} else {
$numero_tel2 = substr_replace($arr['tel'], "0", 0, 4);
}
// correction indicatif international
$numero_tel = substr_replace($numero_tel2, $ma_var[0]['indicatif'], 0, 1);
$sms = new SMS($ma_var[0]['compte'], $ma_var[0]['user'], $ma_var[0]['user_pass'], $ma_var[0]['emetteur']);
if ($arr['cas'] == "localisation") {
$sms_id = $sms->Send($numero_tel, $ma_var[0]['localisation_sms']);
} else {
//$sms_id=$sms->Send($numero_tel, $arr['message']);
}
$sql = "INSERT INTO `sms_historique`(`id`, `date_envoi`, `emetteur`, `description`, `numero`, `sms_id`, `ptt`, `date`, `descriptionDlr`, `permission`)\r\n\t\t\tVALUES ('' , NOW(), :emetteur, :fonction, :numero, :sms_id,'', '', '', :permission)";
$sth = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$sth->execute(array(':permission' => $_SESSION['login'], ':emetteur' => $_SESSION['login2'], ':fonction' => $arr['cas'], ':sms_id' => $sms_id, ':numero' => $numero_tel));
$id = $db->lastInsertId();
$sth->closeCursor();
$id = $id - 200;
$st = $db->prepare("DELETE FROM `aerogard2`.`sms_historique` where id<'{$id}' and permission='" . $_SESSION['login'] . "'");
$st->execute();
$st->closeCursor();
if ($arr['cas'] == "rappel vaccin") {
$sql = "UPDATE rappel set envoye_sms=1 WHERE id=:rappel_id AND permission=:permission LIMIT 1";
$st2 = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$st2->execute(array(':rappel_id' => $arr['rappel_id'], ':permission' => $_SESSION['login']));
$st2->closeCursor();
}
}
return json_encode($sms_id);
}