本文整理汇总了PHP中sms::get_in_sms方法的典型用法代码示例。如果您正苦于以下问题:PHP sms::get_in_sms方法的具体用法?PHP sms::get_in_sms怎么用?PHP sms::get_in_sms使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sms
的用法示例。
在下文中一共展示了sms::get_in_sms方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($out['data'] as $value) {
if ($value['is_delivered'] == 1) {
$query = "UPDATE `sended_sms` SET delivered='1' WHERE id_sms={$value['id']}";
$db->query($query);
} else {
if ($value['is_error'] == 1) {
$query = "UPDATE `sended_sms` SET is_error='1' WHERE id_sms={$value['id']}";
$db->query($query);
}
}
}
}
} else {
session_start();
$sms = new sms($_SESSION['devices'], $_SESSION['token']);
$in = $sms->get_in_sms();
if ($in['code'] == 0) {
foreach ($in['data'] as $value) {
$phone = str_replace("+7", "8", $value['phone']);
$date_time = explode(" ", $value['date']);
$query = "UPDATE `users` SET phone_ver='1', date_ver='" . $date_time[0] . "' WHERE phone='{$phone}' AND phone_ver='0'";
$db->query($query);
}
}
$query = "SELECT id_sms, delivered FROM `sended_sms` WHERE delivered='0' AND is_error='0'";
$res = $db->super_query($query)->get_res();
$ids = array();
foreach ($res as $value) {
foreach ($value as $key => $value1) {
if ($key == 'id_sms') {
$ids[] = $value1;