if($kw){
foreach($arr as $rk=>$rv){
$nrv[$rv['md5']]=$rv;
}
$arr=array_values($nrv);
}
Run code
Cut to clipboard
#,广西南宁市,2017-12-12,15:15:59, MYSQL对某个字段去重
SELECT *, COUNT(DISTINCT iswtf) FROM table GROUP BY iswtf
Run code
Cut to clipboard
#,广西南宁市,2017-12-12,15:19:23, mysql去除重复数据 group by order by 同时使用 mysql去重复查询 查询去除重复 MySQL去除查询结果重复值 mysql查询所有记录,并去掉重复的记录 mysql去重复 保留一条
$sql='SELECT *, COUNT(DISTINCT iswtf) FROM viiscc where tagss like \'%'.$kw.'%\' or sceneii like \'%'.$kw.'%\' GROUP BY iswtf order by tc '.$obrddd.', sc '.$obrddd.', id '.$obrddd.' limit '.$ps.','.$psize;
#,广西南宁市,2017-12-05,11:07:41, 可以在id=1后加一个单引号,变成id=1' 。页面如果报错多了一个单引号,那么说明可能存在注入点。 也可以在id=1后通过and符号多增加多个判断,如果‘id=1 and 1=1’页面正常,‘id=1 and 1=2’时页面不正常,则这个页面边可能存在注入。
#723
#724
#725
<script> //自适应宽度列数 var nnw=document.body.clientWidth; var nums=parseInt(nnw/200);//图片宽度200 document.write('<style>.waterfall{-moz-column-count:'+nums+'; /* Firefox */-webkit-column-count:'+nums+'; /* Safari 和 Chrome */column-count:'+nums+';-moz-column-gap: 1em;-webkit-column-gap: 1em;column-gap: 1em;}</style>') </script><style> img{width:200px;border:10px solid #ddd;box-sizing: border-box;} </style> <div class="waterfall"> <img src="http://img.hb.aicdn.com/b31acc570c8da8e9436829c8e04fef81159eef7116081-zD1mO2_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"> <img src="http://img.hb.aicdn.com/b31acc570c8da8e9436829c8e04fef81159eef7116081-zD1mO2_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"><img src="http://img.hb.aicdn.com/6011915376ebbf461282fd3609e908fa4392f1c42200ec-8p9Wfy_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"><img src="http://img.hb.aicdn.com/464018fc59c94a1bcab810565a1b0998edbd01031eb1c-WoTS41_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"><img src="http://img.hb.aicdn.com/b31acc570c8da8e9436829c8e04fef81159eef7116081-zD1mO2_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"><img src="http://img.hb.aicdn.com/b31acc570c8da8e9436829c8e04fef81159eef7116081-zD1mO2_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"><img src="http://img.hb.aicdn.com/b31acc570c8da8e9436829c8e04fef81159eef7116081-zD1mO2_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"><img src="http://img.hb.aicdn.com/b31acc570c8da8e9436829c8e04fef81159eef7116081-zD1mO2_fw658"> <img src="http://img.hb.aicdn.com/5f359596645040f8609dafa9c073b464c81850251824eb-Hzd7kn_fw658"> <img src="http://img.hb.aicdn.com/59efd2ee6f50e54ee1c067e45dc53a43112003641f73a-MRomA8_fw658"> </div> <script> //自适应宽度列数 var nnw=document.body.clientWidth; var nums=parseInt(nnw/200);//图片宽度200 document.write('<style>.waterfall{-moz-column-count:'+nums+'; /* Firefox */-webkit-column-count:'+nums+'; /* Safari 和 Chrome */column-count:'+nums+';-moz-column-gap: 1em;-webkit-column-gap: 1em;column-gap: 1em;}</style>') </script>#726
微信请在菜单中选择在浏览器中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>微信弹出遮罩</title> </head> <body> <style type="text/css"> *{margin:0; padding:0;} img{max-width: 100%; height: auto;} .test{height: 600px; max-width: 600px; font-size: 40px;} </style> <div class="test"> <a href="http://mp.weixin.qq.com/mp/redirect?url=http://mobile.xinlianwang.com/android/distributor/DistributorApp.apk#weixin.qq.com#wechat_redirect ">有效跳转</a> </div> <script type="text/javascript"> function is_weixin() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == "micromessenger") { return true; } else { return false; } } var isWeixin = is_weixin(); var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight; function loadHtml(){ var div = document.createElement('div'); div.id = 'weixin-tip'; div.innerHTML = '<p><img src="live_weixin.png" alt="微信打开"/></p>'; document.body.appendChild(div); } function loadStyleText(cssText) { var style = document.createElement('style'); style.rel = 'stylesheet'; style.type = 'text/css'; try { style.appendChild(document.createTextNode(cssText)); } catch (e) { style.styleSheet.cssText = cssText; //ie9以下 } var head=document.getElementsByTagName("head")[0]; //head标签之间加上style样式 head.appendChild(style); } var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}"; if(isWeixin){ loadHtml(); loadStyleText(cssText); } </script> </body> </html>#727
#728
《「名探侦コナン」メインテーマ(ヴォーカルヴァージョン)》
#729
#730
<style> /*页面变灰*/ html, img, div, li, ul, span, em, a, i{ -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%); filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); filter:gray; /*ie9- */ } </style>#731
下联:拍大腿后悔 拍屁股走人
横批:一地鸡毛
#732
吴永宁坠亡前影像曝光
生前曾挣扎
吴咏宁 攀爬大楼 镜头 直播 高空 恐高
#733
<?php //定义数组 $arr=array( "name"=>"zhidao", "age"=>"10" ); $result = array_values($arr); var_dump($result); /*array(2) { [0]=> string(6) "zhidao" [1]=> string(2) "10" }*/if($kw){ foreach($arr as $rk=>$rv){ $nrv[$rv['md5']]=$rv; } $arr=array_values($nrv); }SELECT *, COUNT(DISTINCT iswtf) FROM table GROUP BY iswtf$sql='SELECT *, COUNT(DISTINCT iswtf) FROM viiscc where tagss like \'%'.$kw.'%\' or sceneii like \'%'.$kw.'%\' GROUP BY iswtf order by tc '.$obrddd.', sc '.$obrddd.', id '.$obrddd.' limit '.$ps.','.$psize;#734
#735
header("Content-type: text/html; charset=utf-8"); $kw=iconv("GBK","utf-8",$_GET['kw']); //将字符串的编码从GB2312转到UTF-8 if(!$kw) $kw=$_GET['kw']; $kw=char($kw); @mysql_query("set names utf8mb4"); <meta http-equiv="content-type" content="text/html;charset=utf-8">function getSafeStr($str){ $s1 = iconv('utf-8','gbk',$str); $s0 = iconv('gbk','utf-8',$s1); if($s0 == $str){ return $str;//'utf-8'; }else{ return iconv('gbk','utf-8',$str);//'gbk' } }也可以在id=1后通过and符号多增加多个判断,如果‘id=1 and 1=1’页面正常,‘id=1 and 1=2’时页面不正常,则这个页面边可能存在注入。
#736
#737
<?php //获取access_token $appid = "wxff7c********"; $appsecret = "197*******7a*******5"; function access_token($appid,$appsecret){ $url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={$appid}&secret={$appsecret}"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查,FALSE表示阻止对证书的合法性的检查。 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//将使用PHP curl获取页面内容或提交数据,作为变量储存,而不是直接输出。 $output = curl_exec($ch);// 执行操作,这里就是返回的结果 $jsoninfo = json_decode($output, true); $access_token = $jsoninfo["access_token"]; curl_close($ch);//关闭一个curl会话 //echo $access_token;exit; return $access_token; } //print_r($post);exit; //post请求 function post($url,$post) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查,FALSE表示阻止对证书的合法性的检查。 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在 curl_setopt($ch, CURLOPT_POST , 1); //使用post提交数据 curl_setopt($ch, CURLOPT_POSTFIELDS, $post); //设置 post提交的数据 //curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); $jsoninfo = json_decode($output, true); return $output; } function get($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查,FALSE表示阻止对证书的合法性的检查。 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//将使用PHP curl获取页面内容或提交数据,作为变量储存,而不是直接输出。 $response = curl_exec($ch); // 已经获取到内容,没有输出到页面上。 $jsoninfo = json_decode($response, true); return $jsoninfo; } //自定义菜单 function menudiy($appid,$appsecret){ $access_token=access_token($appid,$appsecret); $url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token={$access_token}"; $post='{ "button":[ { "type":"view", "name":"微官网", "url":"http://www.liangtianmei.com/index.php?s=/addon/WeiSite/WeiSite/index.html" }, { "name":"网页授权", "sub_button":[ { "type":"view", "name":"base型", "url":"http://www.liangtianmei.com/menu.php" }, { "type":"view", "name":"userinfo型", "url":"http://www.liangtianmei.com/menu.php" } ] }] }'; post($url,$post); } function snsapi_base($appid,$appsecret,$redirect_url){ $snsapi_base_url="https://open.weixin.qq.com/connect/oauth2/authorize?appid={$appid}&redirect_uri={$redirect_url}&response_type=code&scope=snsapi_base&state=123#wechat_redirect"; if(!isset($_GET['code'])){ header("Location:{$snsapi_base_url}"); } $code=$_GET['code']; $url="https://api.weixin.qq.com/sns/oauth2/access_token?appid={$appid}&secret={$appsecret}&code={$code}&grant_type=authorization_code"; get($url); } function snsapi_userinfo($appid,$appsecret,$redirect_url){ $snsapi_userinfo_url="https://open.weixin.qq.com/connect/oauth2/authorize?appid={$appid}&redirect_uri={$redirect_url}&response_type=code&scope=snsapi_userinfo&state=1443#wechat_redirect"; if(!isset($_GET['code'])){ header("Location:{$snsapi_userinfo_url}"); } $code=$_GET['code']; //return $code;exit; //return $appid;exit; $urlll="https://api.weixin.qq.com/sns/oauth2/access_token?appid={$appid}&secret={$appsecret}&code={$code}&grant_type=authorization_code"; $rrr= get($urlll); $access_token=$rrr['access_token']; $openid=$rrr['openid']; //return $access_token;exit; $urls="https://api.weixin.qq.com/sns/userinfo?access_token={$access_token}&openid={$openid}&lang=zh_CN"; return get($urls); //return get($urls); } //echo snsapi_userinfo(); ?>curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查,FALSE表示阻止对证书的合法性的检查。 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在#738
const formatTime = date => { const year = date.getFullYear() const month = date.getMonth() + 1 const day = date.getDate() const hour = date.getHours() const minute = date.getMinutes() const second = date.getSeconds() return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') } const formatNumber = n => { n = n.toString() return n[1] ? n : '0' + n } //服务器时间戳 function ntime(utilMd5, that){ wx.request({ url: 'https://hhh.liangtianmei.com/ntime.php',//请修改为你服务器 data: { }, header: { 'content-type': 'application/json' }, success: function (res) { //return res; var ttken = 'JLI5vvqq0KRnzfla';//密钥 //var ttime = parseInt(Date.parse(new Date()) / 1000);//时间 秒 var ttime = res.data;//util.ntime(); var ntoken = ttken + ttime; var token = utilMd5.hexMD5(ntoken); //console.log(token); //return token; var url = 'https://hhh.liangtianmei.com/index.php/Home/Product/index'; updatenew(url, token, that); } }) } //更新数据 function updatenew(url, token, that) { wx.request({ url: url,//'https://hhh.liangtianmei.com/index.php/Home/Product/index', //仅为示例,并非真实的接口地址 data: { token: token }, method: 'GET', header: { 'content-type': 'application/json' // 默认值 }, success: function (res) { // alert(res.data) // res.data.content = app.convertHtmlToText(res.content) /*that.setData({ textdata: res.data }); console.log (res.data)*/ // that.setData(res.data) /*that.setData({ all: res.data//第一个data为固定用法,第二个data是json中的data })*/ //console.log(token); //console.log(res) that.setData({ all: res.data // imageUrl: "../images/sp_07.png"//触发事件时的图片 }) } }) } //构造令牌 // 在需要使用的js文件中,导入js //var util = require('../../utils/util.js'); /*var ttken ='JLI5vvqq0KRnzfla';//密钥 var ttime = parseInt(Date.parse(new Date())/1000);//时间 秒 //var ttime = util.ntime(); var ntoken=ttken+ttime; var token = utilMd5.hexMD5(ntoken); console.log(token);*/ //end module.exports = { formatTime: formatTime, ntime: ntime }//构造令牌 使用服务器时间戳 var utilMd5 = require('../../utils/md5.js'); var util = require('../../utils/util.js'); // pages/product/product.js Page({ /** * 页面的初始数据 */ data: { // tabs:["泰国香米","湖北早梗米"], // clickId:0,//默认选中的键值,从零开始 // imageUrl:'../images/sp_0777.png'//默认图片 titlessss:'产品中心' }, btn_primary: function (event) { console.log(event) var that = this; this.setData({ clickId: event.currentTarget.id, // imageUrl: "../images/sp_07.png"//触发事件时的图片 }) } , /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { var that = this; var app = getApp();//获取app小程序实例 // WxParse.wxParse('content', 'html', content, that, 5) wx.login({ success: function (res) { if (res.code) { //更新数据 util.ntime(utilMd5, that); } } }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })#739
<script type="text/javascript"> function isIE() { if (!!window.ActiveXObject || "ActiveXObject" in window || navigator.userAgent.indexOf("Edge")>-1){ return true; } else{ return false; } } if(isIE()) { alert("不支持IE,谢谢!") window.open('www.lizhenhu.com'); } </script> <style type="text/css"> .page-wrap,.page-inner{ margin: 0 auto; width: 600px; padding: 50px 0 0 60px; background: #fff; border-radius: 0 20px 0 0; text-align: justify; } .page-inner{ padding: 0 60px 40px 0; } .page-wrap{ position: relative; margin-left: 0; filter: drop-shadow(0px 0px 25px #aaa); } .page-wrap:before{ content: ''; display: block; position: absolute; right: -60px; top: 0; width: 60px; height: 50px; background: linear-gradient(42deg, #ddd 30%, rgba(0,0,0,0) 40%) } </style> <div class="page-wrap"> <div class="page-inner"> </div> </div>#740
<!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> body,html{ margin: 0; padding: 0; font-size: 16px } .number li { width: 16px; height: 16px; line-height: 16px; display: inline-block; overflow: hidden; } .number li span { display: block; transform: translateY(0%); } .number li.active span { animation: move 0.3s; animation-fill-mode: forwards; } @keyframes move { from { transform: translateY(0); } to { transform: translateY(-100%); } } </style> </head> <body> <ul id="main" class="number"></ul> <script type="text/javascript"> function makeThreeNum(num){ var num = (num || "").toString(); return num.match(/\d{1,3}/g).join(','); } function getRand(max, min){ return parseInt(Math.random()*(max-min)+min); } function addStep(base){10 return (parseInt(getRand(0, 10)) + parseInt(base)); } var w_old = 123456789; function update(oldNum, newNum){ w_old = newNum; var oldNum = makeThreeNum(oldNum), newNum = makeThreeNum(newNum), numberHTML = ''; for (var i = 0; i < oldNum.length; i++) { if(oldNum[i] !== newNum[i]){ numberHTML += "<li class=\"group active\"><span class=\"old\">" + oldNum[i] + "</span><span class=\"new\">" + newNum[i] + "</span></li>"; }else{ numberHTML += "<li class=\"group\"><span class=\"old\">" + oldNum[i] + "</span><span class=\"new\">" + newNum[i] + "</span></li>"; } } document.getElementById('main').innerHTML = numberHTML; } window.setInterval(function(){ update(w_old, addStep(w_old)); }, 1000); </script> </body> </html>#741