header('Content-Type: text/html;charset=utf-8');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
require('inc.php');
$id=base::g("id");
?>
推送消息h2{background: #f0f0f0;line-height: 30px;padding:0 10px;margin-top:10px;}
.contents{border:1px #f0f0f0 solid;padding:0 10px;line-height: 20px;}
h1{color: #ff0000;font-size: 16px;line-height: 30px;}
#loadings{font-size: 14px;color: #ff0000;line-height: 25px;}
if($id) {
$member=$db->get_one("select * from ###_member where id='{$id}'");
echo "给".$member["realname"]." ".$member["title"]."发送推送消息:
";
if(!$member["jpush_id"] || $member["jpush_id"]=="undefined") {
echo "用户手机禁止接受推送消息";
exit;
}
if(!$member["is_push"]) {
echo "用户app里设置不接受推送消息";
exit;
}
}
else {
echo "给所有安装app的用户发送推送消息:
";
}
?>
function set_child_checked(frm,key) {
if($("#countys_"+key).is(':checked')) {
$("#countys_"+key).attr("checked",true);
$(".county_"+key).each(function(){
$(this).prop("checked",true);
});
} else {
$("#countys_"+key).attr("checked",false);
$(".county_"+key).each(function(){
$(this).prop("checked",false);
});
}
}
function sub_add(){
var msg=$("#msg").val();
if(!msg) {
alert('请输入推送内容');
return false;
}
$("#buttons").html('正在发送,请稍等...');
$.ajax({
url: "/admin_1/json.php",
data: {
act: "push_member",
msg:$("#msg").val(),
id:"<?php echo $id?>"
},
dataType: "json",
type:"post",
success: function (result) {
alert('发布成功');
$("#buttons").html('确认发送');
},
error: function (result) {
console.log(result);
}
});
}
一键复制
编辑
Web IDE
原始数据
按行查看
历史