本文整理汇总了PHP中sms::setPass方法的典型用法代码示例。如果您正苦于以下问题:PHP sms::setPass方法的具体用法?PHP sms::setPass怎么用?PHP sms::setPass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sms
的用法示例。
在下文中一共展示了sms::setPass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$sql = "SELECT count(id) FROM orderd WHERE YEAR(data_create)='" . date('Y') . "' AND MONTH(data_create)='" . date('m') . "' AND DAY(data_create)='" . date('d') . "'";
$db->query($sql);
$val = $db->getValue();
if ($val + 1 < 10) {
$dopol = '00';
} else {
if ($val + 1 >= 10 and $val + 1 < 100) {
$dopol = '0';
} else {
$dopol = '';
}
}
$uid = date('ymd') . $dopol . $val + 1;
$sms = new sms();
$sms->setLogin('lyufari');
$sms->setPass('zayaccool');
$text_sms_manger = 'Бронь ';
$text_sms_manger .= $_POST['roomtype'] == "delux" ? '"номер де люкс" ' : '"номер апартаменты" ';
$text_sms_manger .= 'на сумму ' . $itogo . ' грн';
if ($sms->auth()) {
$phone_who = $_POST['phonecode'] . $_POST['phone'];
$sms->sendsms('lyufari', $phone_who, "Спасибо. Бронь #" . $uid . "\nМы свяжемся с вами в ближайшее время.");
$sms->sendsms('lyufari', '+380505870147', $text_sms_manger);
$sms->sendsms('lyufari', '+380951727272', $text_sms_manger);
// $sms->sendsms('lyufari','+380951727272',"Бронь с сайта #".$uid." на сумму ".$itogo);
$smsid = $sms->smsresultbynumb(1);
//id
}
$sql = "INSERT INTO orderd (uid,smsid,data_create,date,name,phone,nameevent,peoplecount,comment,address,zakaz,type) VALUES('%s','%s','" . date('Y-m-d H:i:s') . "','','%s','" . $_POST['phonecode'] . $_POST['phone'] . "','','','','','','notrest')";
$query = sprintf($sql, $uid, $smsid, $name);
$db->query($query);
示例2: compositionoforder
$new_idorder_more = $db->getValue() + 1;
} else {
$new_idorder_more = 1;
}
$sql_put_to_ids = "UPDATE ids SET idorder_more=" . $new_idorder_more;
$db->query($sql_put_to_ids);
$sum = $price * $factor_user * $val['k'];
$sql = "INSERT INTO compositionoforder (id,idorder,idgoods,count,factor,price,sum,id_ed_iz,`updated`) VALUES ('w" . $new_idorder_more . "','w" . $new_or_id . "','" . $val['id'] . "'," . $val['k'] * $factor_user . "," . $factor . "," . $price . "," . $sum . ",'" . $user_iz . "',1)";
$db->query($sql);
}
$_SESSION['client']['new'] = 0;
}
}
$sms = new sms();
$sms->setLogin('vsort');
$sms->setPass('43176');
if ($sms->auth()) {
$sms->sendsms('VsortComUa', $phone, 'Ваш заказ № ' . $uid . ' принят. Ожидайте звонка менеджера');
$sms->sendsms('VsortComUa', '+380992264778', 'Новый заказ с сайта. № ' . $uid . '.');
}
$arrayname = array();
$arrayorder = array();
for ($i = 1; $i <= 20; $i++) {
array_push($arrayname, "покупатель(" . $i . ")");
array_push($arrayorder, array());
}
$_SESSION['active'] = 0;
$active = 0;
$_SESSION['arrayname'] = $arrayname;
$_SESSION['arrayorder'] = $arrayorder;
$arr = array_merge($arr, array('order' => $_SESSION['arrayorder']), array('names' => $_SESSION['arrayname']), array('ord' => $order), array('real_ord' => $real_order), array('fff' => $fff));