本文整理汇总了PHP中SMS::send_broadcast方法的典型用法代码示例。如果您正苦于以下问题:PHP SMS::send_broadcast方法的具体用法?PHP SMS::send_broadcast怎么用?PHP SMS::send_broadcast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMS
的用法示例。
在下文中一共展示了SMS::send_broadcast方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
} elseif (isset($_POST['send_sms']) && $error_txt == "") {
$sub = new Subscriber();
$ret = 0;
try {
$sub->get($_POST['number']);
} catch (SubscriberException $e) {
echo "<img src='img/false.png' width='200' height='170' /><br/><br/>";
echo "<span style='font-size: 20px; color: red;'>" . _("ERROR SENDING SMS!") . "</br>" . $e->getMessage() . " </span><br/><br/><br/><br/>";
echo "<a href='send_sms.php'><button class='b1'>" . _("Go Back") . "</button></a>";
$ret = 1;
}
if ($ret == 0) {
if (isset($_POST['bulk_send'])) {
try {
$sms = new SMS();
$sms->send_broadcast($_POST['message'], $_POST['bulk_send']);
echo "<img src='img/true.png' width='150' height='150' /><br/><br/>";
echo "<span style='font-size: 20px;'>" . _("BROADCAST MESSAGE IS BEING SENT!") . "</span><br/><br/><br/><br/>";
echo "<a href='send_sms.php'><button class='b1'>" . _("Go Back") . "</button></a>";
} catch (SMSException $e) {
echo "<img src='img/false.png' width='200' height='170' /><br/><br/>";
echo "<span style='font-size: 20px; color: red;'>" . _("ERROR SENDING MASS SMS!") . "<br/>" . $e->getMessage() . " </span><br/><br/><br/><br/>";
echo "<a href='send_sms.php'><button class='b1'>" . _("Go Back") . "</button></a>";
}
} else {
try {
$sms = new SMS();
$sms->send('10000', $_POST['number'], $_POST['message']);
echo "<img src='img/true.png' width='150' height='150' /><br/><br/>";
echo "<span style='font-size: 20px;'>" . _("MESSAGE SENT!") . "</span><br/><br/><br/><br/>";
echo "<a href='send_sms.php'><button class='b1'>" . _("Go Back") . "</button></a>";