user.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. <?php
  2. include 'user/config.php';
  3. //session_start();
  4. if(empty($_SESSION["uid"])){
  5. echo "<script>alert('非法访问');history.go(-1)</script>";
  6. exit;
  7. }
  8. //if($_SESSION["vip"]!=1){
  9. // echo "<script>alert('VIP权限不足 ');history.go(-1)</script>";
  10. // exit;
  11. //}
  12. if(isset($_SESSION['expiretime'])) {
  13. if($_SESSION['expiretime'] < time()) {
  14. unset($_SESSION['expiretime']);
  15. header('Location: index.php?TIMEOUT'); // 登出
  16. exit(0);
  17. } else {
  18. $_SESSION['expiretime'] = time() + 3600; // 刷新时间戳
  19. }
  20. }
  21. $t=time();
  22. ?>
  23. <!DOCTYPE html>
  24. <html lang="zh">
  25. <head>
  26. <meta charset="utf-8">
  27. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  28. <title><?php echo $gmbt; ?>-玩家后台</title>
  29. <link rel="icon" href="favicon.ico" type="image/ico">
  30. <meta name="author" content="yinqi">
  31. <link href="https://cdn.staticfile.org/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
  32. <link href="css/style.css" rel="stylesheet">
  33. <script type="text/javascript" src="https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"></script>
  34. <script type="text/javascript" src="https://cdn.staticfile.org/bootbox.js/4.4.0/bootbox.min.js"></script>
  35. <script type="text/javascript" src="https://cdn.staticfile.org/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
  36. <script type="text/javascript" src="https://cdn.staticfile.org/bootstrap-select/1.13.10/js/bootstrap-select.min.js"></script>
  37. <script type="text/javascript" src="https://cdn.staticfile.org/bootstrap-select/1.13.10/js/i18n/defaults-zh_CN.js"></script>
  38. <script src="js/uti.js"></script>
  39. <style>
  40. .wrapper {
  41. position: relative;
  42. }
  43. .login {
  44. display: flex !important;
  45. min-height: 100vh;
  46. align-items: center !important;
  47. justify-content: center !important;
  48. }
  49. .login-center {
  50. background: #fff;
  51. min-width: 38.25rem;
  52. padding: 2.14286em 3.57143em;
  53. border-radius: 5px;
  54. margin: 2.85714em 0;
  55. }
  56. .login-header {
  57. margin-bottom: 1.5rem !important;
  58. }
  59. .login-center .has-feedback.feedback-left .form-control {
  60. padding-left: 38px;
  61. padding-right: 12px;
  62. }
  63. .login-center .has-feedback.feedback-left .form-control-feedback {
  64. left: 0;
  65. right: auto;
  66. width: 38px;
  67. height: 38px;
  68. line-height: 38px;
  69. z-index: 4;
  70. color: #dcdcdc;
  71. }
  72. .login-center .has-feedback.feedback-left.row .form-control-feedback {
  73. left: 15px;
  74. }
  75. </style>
  76. <style>
  77. .lizi1{
  78. display:table;
  79. z-index:10;
  80. position:absolute;
  81. height:100%;
  82. width:100%;
  83. }
  84. .login-center{
  85. background: rgba(255, 255, 255, 0.4);
  86. }
  87. </style>
  88. </head>
  89. <body>
  90. <body data-logobg="color_8" data-sidebarbg="color_8">
  91. <!--开始-->
  92. <style type="text/css">
  93. *{margin:0;padding:0;list-style-type:none;}
  94. a,img{border:0;}
  95. </style>
  96. <canvas id="sakura" style="position:absolute;"></canvas>
  97. <!-- sakura shader -->
  98. <script id="sakura_point_vsh" type="x-shader/x_vertex">
  99. uniform mat4 uProjection;
  100. uniform mat4 uModelview;
  101. uniform vec3 uResolution;
  102. uniform vec3 uOffset;
  103. uniform vec3 uDOF; //x:focus distance, y:focus radius, z:max radius
  104. uniform vec3 uFade; //x:start distance, y:half distance, z:near fade start
  105. attribute vec3 aPosition;
  106. attribute vec3 aEuler;
  107. attribute vec2 aMisc; //x:size, y:fade
  108. varying vec3 pposition;
  109. varying float psize;
  110. varying float palpha;
  111. varying float pdist;
  112. //varying mat3 rotMat;
  113. varying vec3 normX;
  114. varying vec3 normY;
  115. varying vec3 normZ;
  116. varying vec3 normal;
  117. varying float diffuse;
  118. varying float specular;
  119. varying float rstop;
  120. varying float distancefade;
  121. void main(void) {
  122. // Projection is based on vertical angle
  123. vec4 pos = uModelview * vec4(aPosition + uOffset, 1.0);
  124. gl_Position = uProjection * pos;
  125. gl_PointSize = aMisc.x * uProjection[1][1] / -pos.z * uResolution.y * 0.5;
  126. pposition = pos.xyz;
  127. psize = aMisc.x;
  128. pdist = length(pos.xyz);
  129. palpha = smoothstep(0.0, 1.0, (pdist - 0.1) / uFade.z);
  130. vec3 elrsn = sin(aEuler);
  131. vec3 elrcs = cos(aEuler);
  132. mat3 rotx = mat3(
  133. 1.0, 0.0, 0.0,
  134. 0.0, elrcs.x, elrsn.x,
  135. 0.0, -elrsn.x, elrcs.x
  136. );
  137. mat3 roty = mat3(
  138. elrcs.y, 0.0, -elrsn.y,
  139. 0.0, 1.0, 0.0,
  140. elrsn.y, 0.0, elrcs.y
  141. );
  142. mat3 rotz = mat3(
  143. elrcs.z, elrsn.z, 0.0,
  144. -elrsn.z, elrcs.z, 0.0,
  145. 0.0, 0.0, 1.0
  146. );
  147. mat3 rotmat = rotx * roty * rotz;
  148. normal = rotmat[2];
  149. mat3 trrotm = mat3(
  150. rotmat[0][0], rotmat[1][0], rotmat[2][0],
  151. rotmat[0][1], rotmat[1][1], rotmat[2][1],
  152. rotmat[0][2], rotmat[1][2], rotmat[2][2]
  153. );
  154. normX = trrotm[0];
  155. normY = trrotm[1];
  156. normZ = trrotm[2];
  157. const vec3 lit = vec3(0.6917144638660746, 0.6917144638660746, -0.20751433915982237);
  158. float tmpdfs = dot(lit, normal);
  159. if(tmpdfs < 0.0) {
  160. normal = -normal;
  161. tmpdfs = dot(lit, normal);
  162. }
  163. diffuse = 0.4 + tmpdfs;
  164. vec3 eyev = normalize(-pos.xyz);
  165. if(dot(eyev, normal) > 0.0) {
  166. vec3 hv = normalize(eyev + lit);
  167. specular = pow(max(dot(hv, normal), 0.0), 20.0);
  168. }
  169. else {
  170. specular = 0.0;
  171. }
  172. rstop = clamp((abs(pdist - uDOF.x) - uDOF.y) / uDOF.z, 0.0, 1.0);
  173. rstop = pow(rstop, 0.5);
  174. //-0.69315 = ln(0.5)
  175. distancefade = min(1.0, exp((uFade.x - pdist) * 0.69315 / uFade.y));
  176. }
  177. </script>
  178. <script id="sakura_point_fsh" type="x-shader/x_fragment">
  179. #ifdef GL_ES
  180. //precision mediump float;
  181. precision highp float;
  182. #endif
  183. uniform vec3 uDOF; //x:focus distance, y:focus radius, z:max radius
  184. uniform vec3 uFade; //x:start distance, y:half distance, z:near fade start
  185. const vec3 fadeCol = vec3(0.08, 0.03, 0.06);
  186. varying vec3 pposition;
  187. varying float psize;
  188. varying float palpha;
  189. varying float pdist;
  190. //varying mat3 rotMat;
  191. varying vec3 normX;
  192. varying vec3 normY;
  193. varying vec3 normZ;
  194. varying vec3 normal;
  195. varying float diffuse;
  196. varying float specular;
  197. varying float rstop;
  198. varying float distancefade;
  199. float ellipse(vec2 p, vec2 o, vec2 r) {
  200. vec2 lp = (p - o) / r;
  201. return length(lp) - 1.0;
  202. }
  203. void main(void) {
  204. vec3 p = vec3(gl_PointCoord - vec2(0.5, 0.5), 0.0) * 2.0;
  205. vec3 d = vec3(0.0, 0.0, -1.0);
  206. float nd = normZ.z; //dot(-normZ, d);
  207. if(abs(nd) < 0.0001) discard;
  208. float np = dot(normZ, p);
  209. vec3 tp = p + d * np / nd;
  210. vec2 coord = vec2(dot(normX, tp), dot(normY, tp));
  211. //angle = 15 degree
  212. const float flwrsn = 0.258819045102521;
  213. const float flwrcs = 0.965925826289068;
  214. mat2 flwrm = mat2(flwrcs, -flwrsn, flwrsn, flwrcs);
  215. vec2 flwrp = vec2(abs(coord.x), coord.y) * flwrm;
  216. float r;
  217. if(flwrp.x < 0.0) {
  218. r = ellipse(flwrp, vec2(0.065, 0.024) * 0.5, vec2(0.36, 0.96) * 0.5);
  219. }
  220. else {
  221. r = ellipse(flwrp, vec2(0.065, 0.024) * 0.5, vec2(0.58, 0.96) * 0.5);
  222. }
  223. if(r > rstop) discard;
  224. vec3 col = mix(vec3(1.0, 0.8, 0.75), vec3(1.0, 0.9, 0.87), r);
  225. float grady = mix(0.0, 1.0, pow(coord.y * 0.5 + 0.5, 0.35));
  226. col *= vec3(1.0, grady, grady);
  227. col *= mix(0.8, 1.0, pow(abs(coord.x), 0.3));
  228. col = col * diffuse + specular;
  229. col = mix(fadeCol, col, distancefade);
  230. float alpha = (rstop > 0.001)? (0.5 - r / (rstop * 2.0)) : 1.0;
  231. alpha = smoothstep(0.0, 1.0, alpha) * palpha;
  232. gl_FragColor = vec4(col * 0.5, alpha);
  233. }
  234. </script>
  235. <!-- effects -->
  236. <script id="fx_common_vsh" type="x-shader/x_vertex">
  237. uniform vec3 uResolution;
  238. attribute vec2 aPosition;
  239. varying vec2 texCoord;
  240. varying vec2 screenCoord;
  241. void main(void) {
  242. gl_Position = vec4(aPosition, 0.0, 1.0);
  243. texCoord = aPosition.xy * 0.5 + vec2(0.5, 0.5);
  244. screenCoord = aPosition.xy * vec2(uResolution.z, 1.0);
  245. }
  246. </script>
  247. <script id="bg_fsh" type="x-shader/x_fragment">
  248. #ifdef GL_ES
  249. //precision mediump float;
  250. precision highp float;
  251. #endif
  252. uniform vec2 uTimes;
  253. varying vec2 texCoord;
  254. varying vec2 screenCoord;
  255. void main(void) {
  256. vec3 col;
  257. float c;
  258. vec2 tmpv = texCoord * vec2(0.8, 1.0) - vec2(0.95, 1.0);
  259. c = exp(-pow(length(tmpv) * 1.8, 2.0));
  260. col = mix(vec3(0.02, 0.0, 0.03), vec3(0.96, 0.98, 1.0) * 1.5, c);
  261. gl_FragColor = vec4(col * 0.5, 1.0);
  262. }
  263. </script>
  264. <script id="fx_brightbuf_fsh" type="x-shader/x_fragment">
  265. #ifdef GL_ES
  266. //precision mediump float;
  267. precision highp float;
  268. #endif
  269. uniform sampler2D uSrc;
  270. uniform vec2 uDelta;
  271. varying vec2 texCoord;
  272. varying vec2 screenCoord;
  273. void main(void) {
  274. vec4 col = texture2D(uSrc, texCoord);
  275. gl_FragColor = vec4(col.rgb * 2.0 - vec3(0.5), 1.0);
  276. }
  277. </script>
  278. <script id="fx_dirblur_r4_fsh" type="x-shader/x_fragment">
  279. #ifdef GL_ES
  280. //precision mediump float;
  281. precision highp float;
  282. #endif
  283. uniform sampler2D uSrc;
  284. uniform vec2 uDelta;
  285. uniform vec4 uBlurDir; //dir(x, y), stride(z, w)
  286. varying vec2 texCoord;
  287. varying vec2 screenCoord;
  288. void main(void) {
  289. vec4 col = texture2D(uSrc, texCoord);
  290. col = col + texture2D(uSrc, texCoord + uBlurDir.xy * uDelta);
  291. col = col + texture2D(uSrc, texCoord - uBlurDir.xy * uDelta);
  292. col = col + texture2D(uSrc, texCoord + (uBlurDir.xy + uBlurDir.zw) * uDelta);
  293. col = col + texture2D(uSrc, texCoord - (uBlurDir.xy + uBlurDir.zw) * uDelta);
  294. gl_FragColor = col / 5.0;
  295. }
  296. </script>
  297. <!-- effect fragment shader template -->
  298. <script id="fx_common_fsh" type="x-shader/x_fragment">
  299. #ifdef GL_ES
  300. //precision mediump float;
  301. precision highp float;
  302. #endif
  303. uniform sampler2D uSrc;
  304. uniform vec2 uDelta;
  305. varying vec2 texCoord;
  306. varying vec2 screenCoord;
  307. void main(void) {
  308. gl_FragColor = texture2D(uSrc, texCoord);
  309. }
  310. </script>
  311. <!-- post processing -->
  312. <script id="pp_final_vsh" type="x-shader/x_vertex">
  313. uniform vec3 uResolution;
  314. attribute vec2 aPosition;
  315. varying vec2 texCoord;
  316. varying vec2 screenCoord;
  317. void main(void) {
  318. gl_Position = vec4(aPosition, 0.0, 1.0);
  319. texCoord = aPosition.xy * 0.5 + vec2(0.5, 0.5);
  320. screenCoord = aPosition.xy * vec2(uResolution.z, 1.0);
  321. }
  322. </script>
  323. <script id="pp_final_fsh" type="x-shader/x_fragment">
  324. #ifdef GL_ES
  325. //precision mediump float;
  326. precision highp float;
  327. #endif
  328. uniform sampler2D uSrc;
  329. uniform sampler2D uBloom;
  330. uniform vec2 uDelta;
  331. varying vec2 texCoord;
  332. varying vec2 screenCoord;
  333. void main(void) {
  334. vec4 srccol = texture2D(uSrc, texCoord) * 2.0;
  335. vec4 bloomcol = texture2D(uBloom, texCoord);
  336. vec4 col;
  337. col = srccol + bloomcol * (vec4(1.0) + srccol);
  338. col *= smoothstep(1.0, 0.0, pow(length((texCoord - vec2(0.5)) * 2.0), 1.2) * 0.5);
  339. col = pow(col, vec4(0.45454545454545)); //(1.0 / 2.2)
  340. gl_FragColor = vec4(col.rgb, 1.0);
  341. gl_FragColor.a = 1.0;
  342. }
  343. </script>
  344. <!--结尾-->
  345. <div class="lizi1">
  346. <div class="login">
  347. <div class="login-center">
  348. <div class="login-header text-center">
  349. <h3><?php echo $gmbt; ?>-玩家后台</h3>
  350. </div>
  351. <form method="post" id="register-form" autocomplete="off" action="#" class="nice-validator n-default" novalidate>
  352. <div class="form-group has-feedback feedback-left">
  353. <input type='name' disabled="disabled" class="form-control" placeholder="<?=$_SESSION["uid"]?>" value='' id='name'>
  354. </div>
  355. <div class="form-group has-feedback feedback-left">
  356. <div class="input-group">
  357. <input type='text' value='' id='searchiptitemlx' class="form-control" placeholder='输入货币名点搜索'>
  358. <span class="input-group-btn"><button class="btn btn-info" type="button" id='searchitemlx' >搜索</button></span>
  359. </div>
  360. <div class="form-group">
  361. <select id='chargelx' class="form-control"><option value='0'>请选择货币</option>
  362. <?php
  363. $file = fopen("user/pay_wj.txt", "r");
  364. while(!feof($file)){
  365. $line=fgets($file);
  366. $txts=explode('|',$line);
  367. if(count($txts)==2){
  368. echo '<option value="'.$txts[0].'">'.$txts[1].'</option>';
  369. }
  370. }
  371. fclose($file);
  372. ?>
  373. <input type='button'class="btn btn-danger btn-block" value='充值货币' id='chargebtn'>
  374. <span>充值提醒: </span><span style='color:red'>充值数量不宜过多,按需求使用,用完再发,发爆号概不负责!</span><td>
  375. </div>
  376. <?php if ($_SESSION["vip"]>1){?>
  377. <div>
  378. <div class="form-group has-feedback feedback-left">
  379. <div class="input-group">
  380. <input type='text' value='' id='searchiptitem' class="form-control" placeholder='输入物品名点搜索'>
  381. <span class="input-group-btn"><button class="btn btn-info" type="button" id='searchitem' >搜索</button></span>
  382. </div>
  383. <div class="form-group">
  384. <select id='mailid' class="form-control"><option value='0'>请选择物品</option>
  385. <?php
  386. $file = fopen("user/item_wj.txt", "r");
  387. while(!feof($file))
  388. {
  389. $line=fgets($file);
  390. $txts=explode('|',$line);
  391. if(count($txts)==2){
  392. echo '<option value="'.$txts[0].'">'.$txts[1].'</option>';
  393. }
  394. }
  395. fclose($file);
  396. ?>
  397. </select>
  398. <input type='text' value='' id='mailnum' class="form-control" placeholder='请输入物品数量'>
  399. <input type='button' class="btn btn-primary btn-block" value='发送物品(邮箱领取)' id='mailbtn'>
  400. <span>物品提醒: </span><span style='color:red'>物品数量不宜过多,按需求使用,用完再发,发爆号概不负责!</span>
  401. </div>
  402. <?php }?>
  403. <div>
  404. </div>
  405. <div class="form-group has-feedback feedback-left">
  406. <input class="btn btn-block btn-danger" value="退出" type="button" onclick="window.location.href='user/exit.php'">
  407. </div><br>
  408. <footer class="col-sm-12 text-center"><p class="m-b-0"><?php echo $gmbt; ?> &copy; 星辰大海</p>
  409. </footer>
  410. </div>
  411. </div>
  412. </div>
  413. <script src="js/msg.js?v=<?php echo $t;?>"></script>
  414. <script>
  415. $('#searchitem').click(function(){
  416. var keyword=$('#searchiptitem').val();
  417. $.ajax({
  418. url:'user/itemquery.php',
  419. type:'post',
  420. 'data':{keyword:keyword,typea:'item_wj'},
  421. 'cache':false,
  422. 'dataType':'json',
  423. success:function(data){
  424. if(data){
  425. $('#mailid').html('');
  426. for (var i in data){
  427. $('#mailid').append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  428. }
  429. }else{
  430. $('#mailid').html('<option value="0">未找到</option>');
  431. }
  432. },
  433. error:function(){
  434. bootbox.alert({message:'操作失败',title:"提示"});
  435. }
  436. });
  437. });
  438. $('#searchitemlx').click(function(){
  439. var keyword=$('#searchiptitemlx').val();
  440. $.ajax({
  441. url:'user/itemquery.php',
  442. type:'post',
  443. 'data':{keyword:keyword,typea:'pay_wj'},
  444. 'cache':false,
  445. 'dataType':'json',
  446. success:function(data){
  447. if(data){
  448. $('#chargelx').html('');
  449. for (var i in data){
  450. $('#chargelx').append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  451. }
  452. }else{
  453. $('#chargelx').html('<option value="0">未找到</option>');
  454. }
  455. },
  456. error:function(){
  457. bootbox.alert({message:'操作失败',title:"提示"});
  458. }
  459. });
  460. });
  461. window.onload=function(){
  462. document.onkeydown=function(){
  463. var e=window.event||arguments[0];
  464. if(e.keyCode==123){
  465. return false;
  466. }else if((e.ctrlKey)&&(e.shiftKey)&&(e.keyCode==73)){
  467. return false;
  468. }
  469. };
  470. document.oncontextmenu=function(){
  471. return false;
  472. }
  473. }
  474. </script>
  475. </body>
  476. </html>