本文整理汇总了PHP中alertInfo函数的典型用法代码示例。如果您正苦于以下问题:PHP alertInfo函数的具体用法?PHP alertInfo怎么用?PHP alertInfo使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了alertInfo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sqlReplace
}
break;
case 'type':
$id = sqlReplace(trim($_GET['id']));
$id = checkData($id, "ID", 0);
$sql = "select * from qiyu_comment where comment_id=" . $id;
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if (!$row) {
alertInfo('您要审核的数据不存在', '', 1);
} else {
$sql2 = "update qiyu_comment set comment_type='1' where comment_id=" . $id;
if (mysql_query($sql2)) {
alertInfo('审核成功', '', 1);
} else {
alertInfo('审核失败,原因SQL出现异常', '', 1);
}
}
break;
case "savetime":
$i = trim($_POST['i']);
for ($x = 1; $x <= $i; $x++) {
$id = $_POST['id' . $x];
$id = checkData($id, 'ID', 0);
$time = $_POST['time' . $x];
$sql = "update " . WIIDBPRE . "_comment set comment_addtime='" . $time . "' where comment_id=" . $id;
mysql_query($sql);
}
alertInfo('保存成功!', "", 1);
break;
}
示例2: sqlReplace
$print = sqlReplace(trim($_POST['yunprint']));
$num = sqlReplace(trim($_POST['yunprintnum']));
$sql = "update qiyu_site set site_yunprint='" . $print . "',site_yunprintnum='" . $num . "'";
if (mysql_query($sql)) {
alertInfo('操作成功', '', 1);
} else {
alertInfo('出错', '', 1);
}
break;
case "other":
$onlinechat = sqlReplace(trim($_POST['onlinechat']));
$iscartfoodtag = sqlReplace(trim($_POST['iscartfoodtag']));
$cartfoodtag = sqlReplace(trim($_POST['cartfoodtag']));
$stat = sqlReplace(trim($_POST['stat']));
$sql = "update qiyu_site set site_onlinechat='" . $onlinechat . "',site_stat='" . $stat . "',site_iscartfoodtag='" . $iscartfoodtag . "',site_cartfoodtag='" . $cartfoodtag . "'";
if (mysql_query($sql)) {
alertInfo('操作成功', '', 1);
} else {
alertInfo('出错', '', 1);
}
break;
case "print":
$print = sqlReplace(trim($_POST['yunprint']));
$sql = "update qiyu_site set site_yunprint='" . $print . "'";
if (mysql_query($sql)) {
alertInfo('操作成功', '', 1);
} else {
alertInfo('出错', '', 1);
}
break;
}
示例3: sqlReplace
<?php
require_once "usercheck.php";
$shopID = sqlReplace(trim($_GET['shopID']));
$sql = "select * from qiyu_shop where shop_id=" . $shopID . " and shop_status='1'";
$rs = mysql_query($sql);
$rows = mysql_fetch_assoc($rs);
if (!$rows) {
alertInfo("错误", "index.php", 0);
}
if (!empty($QIYU_ID_USER)) {
$sqlStr = "select * from qiyu_user where user_id=" . $QIYU_ID_USER;
$result = mysql_query($sqlStr);
$row = mysql_fetch_assoc($result);
if ($row) {
$user_phone = $row['user_phone'];
}
} else {
$user_phone = $_SESSION['user_phone'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" type="text/css"/>
<script src="js/jquery-1.3.1.js" type="text/javascript"></script>
<title> 验证手机号 - <?php
echo $SHOP_NAME;
?>
- <?php
示例4: AppException
$o = new AppException();
//require_once('user_sendsms_page.php');
if (!(empty($site_wiiyunsalt) || empty($site_wiiyunaccount) || $site_sms != '1')) {
// 检测微云码与账号是否正确
$result = $o->checkWiiyunSalt($site_wiiyunsalt, $site_wiiyunaccount);
$r_status = $result[0]->status;
if ($r_status != 'no') {
$userID2 = $result[0]->id2;
//用户ID2
$sms = $o->getSMS($userID2);
$s_status = $sms[0]->status;
$smsCount = $sms[0]->count_m;
}
}
if (empty($userID2)) {
alertInfo('短信未配置,请配置', "site_sms.php", 0);
}
$tags = sqlReplace(trim($_POST['receiver']));
//收件人
$tags = str_replace(';', ';', $tags);
$tags = str_replace('#', '', $tags);
$tags = str_replace('$', '', $tags);
//$total=sqlReplace(trim($_GET['total']));//此次发送的数量
$emailstr = sqlReplace(trim($_POST['receiver']));
//收件人
$emailstr = str_replace(';', ';', $emailstr);
$content = sqlReplace(trim($_POST['fbContent']));
//短信内容
checkData($emailstr, '收件人', 1);
checkData($content, '短信内容', 1);
//对收件人$emailstr进行处理
示例5: checkEmail
function checkEmail($email, $name)
{
if (empty($email)) {
alertInfo($name . '不能为空', '', 1);
} else {
if (!eregi("^[a-zA-Z0-9]([a-zA-Z0-9]*[-_.]?[a-zA-Z0-9]+)+@([a-zA-Z0-9]+\\.)+[a-zA-Z]{2,}\$", $email)) {
alertInfo($name . '输入格式不正确', '', 1);
}
}
}
示例6: checkData
checkData($address, '详细地址', 1);
checkData($pw, '密码', 1);
$ip = $_SERVER['REMOTE_ADDR'];
$logincount = 1;
$vercode = getRndCode(6);
$vercodePhone = getRndCode_r(6);
$content = "验证码是" . $vercodePhone;
$_SESSION['Phone'] = $phone;
$pw = md5(md5($pw . $vercode));
//检查手机的存在
$sqlStr = "select user_id from qiyu_user where user_phone='" . $phone . "'";
$rs = mysql_query($sqlStr);
$row = mysql_fetch_assoc($rs);
if ($row) {
alertInfo("手机号已注册", "", 1);
}
$sql = "insert into qiyu_user(user_account,user_password,user_logintime,user_loginip,user_logincount,user_mail,user_phone,user_time,user_name,user_salt,user_status,user_vcode,user_sinauid,user_sinanick,user_regtype) values('" . $phone . "','" . $pw . "',now(),'" . $ip . "','" . $logincount . "','','" . $phone . "',now(),'" . $name . "','" . $vercode . "','0','" . $vercodePhone . "','" . $sinaUid . "','" . $sinaNick . "','0')";
if (mysql_query($sql)) {
$id = mysql_insert_id();
$address_sql = "insert into qiyu_useraddr(useraddr_user,useraddr_phone,useraddr_address,useraddr_name) values (" . $id . ",'" . $phone . "','" . $address . "','" . $name . "')";
mysql_query($address_sql);
//发送验证码
//sendCode($phone,$content);
//Header("Location: uservali.php");
$_SESSION['qiyu_uid'] = $id;
$_SESSION['reginfo1'] = '';
$_SESSION['reginfo2'] = '';
Header("Location: userregfinish.php?p=" . $p . "&shopID=" . $shopID . "&shopSpot=" . $shopSpot . "&spotID=" . $spot . "&circleID=" . $circle . "&shopCircle=" . $shopCircle);
} else {
alertInfo("注册失败", "", 1);
}
示例7: sqlReplace
<?php
/**
* userintro.php
*/
require_once "usercheck2.php";
$id = sqlReplace(trim($_GET['id']));
$tel = empty($_GET['tel']) ? '' : sqlReplace(trim($_GET['tel']));
$page = empty($_GET['page']) ? '' : sqlReplace(trim($_GET['page']));
$id = checkData($id, "ID", 0);
$sql = "select * from " . WIIDBPRE . "_user where user_id=" . $id;
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if (!$row) {
alertInfo('该用户已经不存在', '', 1);
} else {
$account = $row['user_account'];
$name = $row['user_name'];
$mail = $row['user_mail'];
$type = $row['user_type'];
$logintime = $row['user_logintime'];
$loginip = $row['user_loginip'];
$logincount = $row['user_logincount'];
$phone = $row['user_phone'];
$time = $row['user_time'];
$score = $row['user_score'];
$experience = $row['user_experience'];
}
//原版
//$url="&start=".$start."&end=".$end."&name=".$name."&phone=".$phone."&order=".$order."&uid=".$id;
$url = "&name=" . $name . "&phone=" . $phone . "&uid=" . $id;
示例8: sqlReplace
$shopID = sqlReplace($_GET['shopID']);
$phone = sqlReplace($_POST['phone']);
$code = sqlReplace($_POST['code']);
$sql = "select * from qiyu_user where user_phone='" . $phone . "'";
$rs = mysql_query($sql);
$rows = mysql_fetch_assoc($rs);
if ($rows) {
if ($code == $rows['user_vcode']) {
$sqlStr = "update qiyu_user set user_vcode='',user_status='1' where user_phone='" . $phone . "'";
mysql_query($sqlStr);
Header("Location: userorder.php?shopID=" . $shopID);
} else {
alertInfo("验证码错误", "", 1);
}
} else {
alertInfo("手机号不存在", "", 1);
}
break;
case "checkCodeTime":
$sendTime = $_SESSION['sms_sendTime'];
$time = date('Y-m-d H:i:s');
if (!empty($sendTime)) {
if (round((strtotime($time) - strtotime($sendTime)) / 60) > 20) {
$_SESSION['sms_sendTime'] = '';
$_SESSION['sms_code'] = '';
echo '<label> </label><img src="images/button/getcode.gif" alt="获取" onclick="sendcode()" />';
} else {
echo '<label> </label><img src="images/button/getcode_r.gif" alt="" style="cursor:auto;"/>';
}
} else {
echo '<label> </label><img src="images/button/getcode.gif" alt="获取" onclick="sendcode()" />';
示例9: Header
$QIYU_ID_USER = "";
}
} else {
$QIYU_ID_USER = "";
}
}
if (!empty($shopID)) {
if (empty($QIYU_ID_USER)) {
Header("Location: userquickreg.php?shopID=" . $shopID);
} else {
if (empty($QIYU_ID_USER)) {
alertInfo("请先登录或注册", "userlogin.php", 0);
}
}
}
//$sqlStr="select * from qiyu_user where user_id=".$QIYU_ID_USER." and user_status='1'";
$sqlStr = "select * from qiyu_user where user_id=" . $QIYU_ID_USER . "";
$result = mysql_query($sqlStr);
$row = mysql_fetch_assoc($result);
if ($row) {
$USER_SCORE = $row['user_score'];
$USER_PHONE = $row['user_phone'];
$USER_SALT = $row['user_salt'];
} else {
setcookie("QIYUUSER", "", time() - 1);
setcookie("QIYUVERD", "", time() - 1);
session_unset();
session_destroy();
alertInfo("出错", "", 1);
//Header("Location: index.php");
}
示例10: sqlReplace
/**
* userpw2.php
*/
require_once "usercheck.php";
$phone = sqlReplace($_POST['phone']);
if ($phone == '') {
alertInfo("非法操作", "", 1);
}
if ($site_sms == '1') {
$code = sqlReplace($_POST['code']);
$s_code = $_SESSION['sms_code'];
if ($code == '') {
alertInfo("非法操作", "", 1);
}
if ($s_code != $code) {
alertInfo("验证码不匹配", "userpw.php", 0);
}
$_SESSION['sms_code'] = '';
$_SESSION['sms_sendTime'] = '';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="icon" href="<?php
echo $imgstr2;
?>
" type="image/x-icon" />
<link rel="shortcut icon" href="<?php
示例11: empty
$act = empty($_GET['act']) ? '' : sqlReplace(trim($_GET['act']));
$telstr = '';
if ($act == 'yes') {
if ($site_sms == '2') {
alertInfo('短信功能未开启,请配置', "site_sms.php", 0);
}
if (empty($_POST["idlist"])) {
alertInfo('请选择群发项!', "", 1);
}
$listall = $_POST["idlist"];
foreach ($listall as $listid) {
$sqlStr = "select * from qiyu_user where user_id in({$listid})";
$result = mysql_query($sqlStr);
$row = mysql_fetch_array($result);
if (!$row) {
alertInfo('数据不存在', '', 1);
} else {
if (!empty($row['user_phone'])) {
$telstr .= $row['user_phone'] . ';';
}
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> 群发短信 </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Jiangting@WiiPu -- http://www.wiipu.com" />
<link rel="stylesheet" href="style2.css" type="text/css"/>
示例12: mysql_query
$sql = "select * from qiyu_user where user_phone='" . $_SESSION['Phone'] . "'";
$rs = mysql_query($sql);
$rows = mysql_fetch_assoc($rs);
if ($rows) {
if ($code != $rows['user_vcode']) {
$str = "手机验证失败!";
} else {
$sqlStr = "update qiyu_user set user_status='1',user_vcode='' where user_phone='" . $_SESSION['Phone'] . "'";
if (mysql_query($sqlStr)) {
$str = "恭喜您!您的手机18801296063已验证成功。";
} else {
$str = "手机验证失败!";
}
}
} else {
alertInfo("手机号不存在", "userreg.php", 0);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="5;url=index.php"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<script src="js/jquery-1.3.1.js" type="text/javascript"></script>
<script src="js/tab.js" type="text/javascript"></script>
<script src="js/slide.js" type="text/javascript"></script>
<script src="js/scale.js" type="text/javascript"></script>
<script src="js/addbg.js" type="text/javascript"></script>
<script src="js/userreg.js" type="text/javascript"></script>
<title> 用户注册 - <?php
示例13: mysql_query
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if (!$row) {
$sta = getOrderKey($id);
alertInfo('非法操作', "userorder.php?key={$sta}", 0);
} else {
$order = $row['order_id2'];
$sql2 = "update qiyu_order set order_status='4' where order_id=" . $id . " and order_status=1";
if (mysql_query($sql2)) {
//添加订单记录
$orderContent = "<span class='greenbg'><span><span>订单已完成</span></span></span>";
$orderContent .= "亲,享受美味的时候,别忘了继续光顾" . $SHOP_NAME . "哦,我们将更好的为您服务。";
addOrderType($order, HTMLEncode($orderContent));
alertInfo('订单完成!', '', 1);
} else {
alertInfo('设置完成失败,原因SQL出现异常', 'userorder.php?key=1', 0);
}
}
}
$sql = "select * from qiyu_order inner join qiyu_useraddr on useraddr_id=order_useraddr and order_id=" . $id;
$rs = mysql_query($sql);
$rows = mysql_fetch_assoc($rs);
if ($rows) {
$userName = $rows['useraddr_name'];
$userPhone = $rows['useraddr_phone'];
$userAddress = $rows['useraddr_address'];
$spotID = $rows['useraddr_spot'];
$totalAll = $rows['order_totalprice'];
$total = $rows['order_price'];
$deliverfee_r = $rows['order_deliverprice'];
$order = $rows['order_id2'];
示例14: alertInfo
//echo $content;
} else {
alertInfo('Add Failed', '', 1);
//echo $content;
//echo add_system_log($content);
}
//alertInfo('修改成功!','list.php',0);
} else {
alertInfo('Modify Failed', '', 1);
}
break;
case 'del':
//得到sortlist传递的值,并检测
$id = sqlReplace(trim($_GET['id']));
if ($id == "") {
alertInfo('Illegal Operation', 'list.php', 0);
}
$sql_del = "delete from articles where aid = {$id}";
if (mysql_query($sql_del)) {
$content = "Deleted an article,No. is:" . $title;
if (add_system_log($content) == 1) {
alertInfo('Deleted success', 'list.php', 0);
//echo $content;
} else {
alertInfo('Delete failed', '', 1);
//echo $content;
//echo add_system_log($content);
}
}
break;
}
示例15: checkData
checkData($pwd, '密码', 1);
$code = sqlReplace(trim($_POST["imgcode"]));
//验证码
if (empty($code)) {
alertInfo('验证码不能为空', "", 1);
}
if ($code != $_SESSION['imgcode']) {
alertInfo('验证码不正确,请检查!', "", 1);
}
$sql = "select * from qiyu_shop where shop_account='" . $account . "'";
$rs = mysql_query($sql);
$rows = mysql_fetch_assoc($rs);
if ($rows) {
$salt = $rows['shop_salt'];
$pw = md5(md5($pwd) . $salt);
$sqlStr = "select * from qiyu_shop where shop_account='" . $account . "' and shop_password='" . $pw . "'";
$rs_r = mysql_query($sqlStr);
$row = mysql_fetch_assoc($rs_r);
if ($row) {
setcookie("QIYUSHOP", $rows['shop_account'], time() + 60 * 60 * 24 * 7);
setcookie("QIYUSHOPVERD", md5($pw . $salt), time() + 60 * 60 * 24 * 7);
$_SESSION['qiyu_shopID'] = $rows['shop_id'];
Header("Location: admin.php");
} else {
alertInfo("密码错误", "", 1);
}
} else {
alertInfo("用户名不存在", "", 1);
}
break;
}