index.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. <?php
  2. include '../gm/user/config.php';
  3. ?>
  4. <!DOCTYPE html>
  5. <!DOCTYPE html>
  6. <html lang="zh">
  7. <head>
  8. <meta charset="utf-8">
  9. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  10. <title><?php echo $gmbt; ?>-自助授权</title>
  11. <link rel="icon" href="favicon.ico" type="image/ico">
  12. <meta name="author" content="yinqi">
  13. <link href="https://cdn.staticfile.org/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
  14. <link href="images/style.css" rel="stylesheet">
  15. <script type="text/javascript" src="https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"></script>
  16. <script type="text/javascript" src="https://cdn.staticfile.org/bootbox.js/4.4.0/bootbox.min.js"></script>
  17. <script type="text/javascript" src="https://cdn.staticfile.org/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
  18. <script type="text/javascript" src="https://cdn.staticfile.org/bootstrap-select/1.13.10/js/bootstrap-select.min.js"></script>
  19. <script type="text/javascript" src="https://cdn.staticfile.org/bootstrap-select/1.13.10/js/i18n/defaults-zh_CN.js"></script>
  20. <script src="js/uti.js"></script>
  21. <style>
  22. .wrapper {
  23. position: relative;
  24. }
  25. .login {
  26. display: flex !important;
  27. min-height: 100vh;
  28. align-items: center !important;
  29. justify-content: center !important;
  30. }
  31. .login-center {
  32. background: #fff;
  33. min-width: 38.25rem;
  34. padding: 2.14286em 3.57143em;
  35. border-radius: 5px;
  36. margin: 2.85714em 0;
  37. }
  38. .login-header {
  39. margin-bottom: 1.5rem !important;
  40. }
  41. .login-center .has-feedback.feedback-left .form-control {
  42. padding-left: 38px;
  43. padding-right: 12px;
  44. }
  45. .login-center .has-feedback.feedback-left .form-control-feedback {
  46. left: 0;
  47. right: auto;
  48. width: 38px;
  49. height: 38px;
  50. line-height: 38px;
  51. z-index: 4;
  52. color: #dcdcdc;
  53. }
  54. .login-center .has-feedback.feedback-left.row .form-control-feedback {
  55. left: 15px;
  56. }
  57. </style>
  58. <style>
  59. .lizi1{
  60. display:table;
  61. z-index:10;
  62. position:absolute;
  63. height:100%;
  64. width:100%;
  65. }
  66. .login-center{
  67. background: rgba(255, 255, 255, 0.4);
  68. }
  69. </style>
  70. </head>
  71. <body>
  72. <body data-logobg="color_8" data-sidebarbg="color_8">
  73. <!--开始-->
  74. <style type="text/css">
  75. *{margin:0;padding:0;list-style-type:none;}
  76. a,img{border:0;}
  77. </style>
  78. <canvas id="sakura" style="position:absolute;"></canvas>
  79. <!-- sakura shader -->
  80. <script id="sakura_point_vsh" type="x-shader/x_vertex">
  81. uniform mat4 uProjection;
  82. uniform mat4 uModelview;
  83. uniform vec3 uResolution;
  84. uniform vec3 uOffset;
  85. uniform vec3 uDOF; //x:focus distance, y:focus radius, z:max radius
  86. uniform vec3 uFade; //x:start distance, y:half distance, z:near fade start
  87. attribute vec3 aPosition;
  88. attribute vec3 aEuler;
  89. attribute vec2 aMisc; //x:size, y:fade
  90. varying vec3 pposition;
  91. varying float psize;
  92. varying float palpha;
  93. varying float pdist;
  94. //varying mat3 rotMat;
  95. varying vec3 normX;
  96. varying vec3 normY;
  97. varying vec3 normZ;
  98. varying vec3 normal;
  99. varying float diffuse;
  100. varying float specular;
  101. varying float rstop;
  102. varying float distancefade;
  103. void main(void) {
  104. // Projection is based on vertical angle
  105. vec4 pos = uModelview * vec4(aPosition + uOffset, 1.0);
  106. gl_Position = uProjection * pos;
  107. gl_PointSize = aMisc.x * uProjection[1][1] / -pos.z * uResolution.y * 0.5;
  108. pposition = pos.xyz;
  109. psize = aMisc.x;
  110. pdist = length(pos.xyz);
  111. palpha = smoothstep(0.0, 1.0, (pdist - 0.1) / uFade.z);
  112. vec3 elrsn = sin(aEuler);
  113. vec3 elrcs = cos(aEuler);
  114. mat3 rotx = mat3(
  115. 1.0, 0.0, 0.0,
  116. 0.0, elrcs.x, elrsn.x,
  117. 0.0, -elrsn.x, elrcs.x
  118. );
  119. mat3 roty = mat3(
  120. elrcs.y, 0.0, -elrsn.y,
  121. 0.0, 1.0, 0.0,
  122. elrsn.y, 0.0, elrcs.y
  123. );
  124. mat3 rotz = mat3(
  125. elrcs.z, elrsn.z, 0.0,
  126. -elrsn.z, elrcs.z, 0.0,
  127. 0.0, 0.0, 1.0
  128. );
  129. mat3 rotmat = rotx * roty * rotz;
  130. normal = rotmat[2];
  131. mat3 trrotm = mat3(
  132. rotmat[0][0], rotmat[1][0], rotmat[2][0],
  133. rotmat[0][1], rotmat[1][1], rotmat[2][1],
  134. rotmat[0][2], rotmat[1][2], rotmat[2][2]
  135. );
  136. normX = trrotm[0];
  137. normY = trrotm[1];
  138. normZ = trrotm[2];
  139. const vec3 lit = vec3(0.6917144638660746, 0.6917144638660746, -0.20751433915982237);
  140. float tmpdfs = dot(lit, normal);
  141. if(tmpdfs < 0.0) {
  142. normal = -normal;
  143. tmpdfs = dot(lit, normal);
  144. }
  145. diffuse = 0.4 + tmpdfs;
  146. vec3 eyev = normalize(-pos.xyz);
  147. if(dot(eyev, normal) > 0.0) {
  148. vec3 hv = normalize(eyev + lit);
  149. specular = pow(max(dot(hv, normal), 0.0), 20.0);
  150. }
  151. else {
  152. specular = 0.0;
  153. }
  154. rstop = clamp((abs(pdist - uDOF.x) - uDOF.y) / uDOF.z, 0.0, 1.0);
  155. rstop = pow(rstop, 0.5);
  156. //-0.69315 = ln(0.5)
  157. distancefade = min(1.0, exp((uFade.x - pdist) * 0.69315 / uFade.y));
  158. }
  159. </script>
  160. <script id="sakura_point_fsh" type="x-shader/x_fragment">
  161. #ifdef GL_ES
  162. //precision mediump float;
  163. precision highp float;
  164. #endif
  165. uniform vec3 uDOF; //x:focus distance, y:focus radius, z:max radius
  166. uniform vec3 uFade; //x:start distance, y:half distance, z:near fade start
  167. const vec3 fadeCol = vec3(0.08, 0.03, 0.06);
  168. varying vec3 pposition;
  169. varying float psize;
  170. varying float palpha;
  171. varying float pdist;
  172. //varying mat3 rotMat;
  173. varying vec3 normX;
  174. varying vec3 normY;
  175. varying vec3 normZ;
  176. varying vec3 normal;
  177. varying float diffuse;
  178. varying float specular;
  179. varying float rstop;
  180. varying float distancefade;
  181. float ellipse(vec2 p, vec2 o, vec2 r) {
  182. vec2 lp = (p - o) / r;
  183. return length(lp) - 1.0;
  184. }
  185. void main(void) {
  186. vec3 p = vec3(gl_PointCoord - vec2(0.5, 0.5), 0.0) * 2.0;
  187. vec3 d = vec3(0.0, 0.0, -1.0);
  188. float nd = normZ.z; //dot(-normZ, d);
  189. if(abs(nd) < 0.0001) discard;
  190. float np = dot(normZ, p);
  191. vec3 tp = p + d * np / nd;
  192. vec2 coord = vec2(dot(normX, tp), dot(normY, tp));
  193. //angle = 15 degree
  194. const float flwrsn = 0.258819045102521;
  195. const float flwrcs = 0.965925826289068;
  196. mat2 flwrm = mat2(flwrcs, -flwrsn, flwrsn, flwrcs);
  197. vec2 flwrp = vec2(abs(coord.x), coord.y) * flwrm;
  198. float r;
  199. if(flwrp.x < 0.0) {
  200. r = ellipse(flwrp, vec2(0.065, 0.024) * 0.5, vec2(0.36, 0.96) * 0.5);
  201. }
  202. else {
  203. r = ellipse(flwrp, vec2(0.065, 0.024) * 0.5, vec2(0.58, 0.96) * 0.5);
  204. }
  205. if(r > rstop) discard;
  206. vec3 col = mix(vec3(1.0, 0.8, 0.75), vec3(1.0, 0.9, 0.87), r);
  207. float grady = mix(0.0, 1.0, pow(coord.y * 0.5 + 0.5, 0.35));
  208. col *= vec3(1.0, grady, grady);
  209. col *= mix(0.8, 1.0, pow(abs(coord.x), 0.3));
  210. col = col * diffuse + specular;
  211. col = mix(fadeCol, col, distancefade);
  212. float alpha = (rstop > 0.001)? (0.5 - r / (rstop * 2.0)) : 1.0;
  213. alpha = smoothstep(0.0, 1.0, alpha) * palpha;
  214. gl_FragColor = vec4(col * 0.5, alpha);
  215. }
  216. </script>
  217. <!-- effects -->
  218. <script id="fx_common_vsh" type="x-shader/x_vertex">
  219. uniform vec3 uResolution;
  220. attribute vec2 aPosition;
  221. varying vec2 texCoord;
  222. varying vec2 screenCoord;
  223. void main(void) {
  224. gl_Position = vec4(aPosition, 0.0, 1.0);
  225. texCoord = aPosition.xy * 0.5 + vec2(0.5, 0.5);
  226. screenCoord = aPosition.xy * vec2(uResolution.z, 1.0);
  227. }
  228. </script>
  229. <script id="bg_fsh" type="x-shader/x_fragment">
  230. #ifdef GL_ES
  231. //precision mediump float;
  232. precision highp float;
  233. #endif
  234. uniform vec2 uTimes;
  235. varying vec2 texCoord;
  236. varying vec2 screenCoord;
  237. void main(void) {
  238. vec3 col;
  239. float c;
  240. vec2 tmpv = texCoord * vec2(0.8, 1.0) - vec2(0.95, 1.0);
  241. c = exp(-pow(length(tmpv) * 1.8, 2.0));
  242. col = mix(vec3(0.02, 0.0, 0.03), vec3(0.96, 0.98, 1.0) * 1.5, c);
  243. gl_FragColor = vec4(col * 0.5, 1.0);
  244. }
  245. </script>
  246. <script id="fx_brightbuf_fsh" type="x-shader/x_fragment">
  247. #ifdef GL_ES
  248. //precision mediump float;
  249. precision highp float;
  250. #endif
  251. uniform sampler2D uSrc;
  252. uniform vec2 uDelta;
  253. varying vec2 texCoord;
  254. varying vec2 screenCoord;
  255. void main(void) {
  256. vec4 col = texture2D(uSrc, texCoord);
  257. gl_FragColor = vec4(col.rgb * 2.0 - vec3(0.5), 1.0);
  258. }
  259. </script>
  260. <script id="fx_dirblur_r4_fsh" type="x-shader/x_fragment">
  261. #ifdef GL_ES
  262. //precision mediump float;
  263. precision highp float;
  264. #endif
  265. uniform sampler2D uSrc;
  266. uniform vec2 uDelta;
  267. uniform vec4 uBlurDir; //dir(x, y), stride(z, w)
  268. varying vec2 texCoord;
  269. varying vec2 screenCoord;
  270. void main(void) {
  271. vec4 col = texture2D(uSrc, texCoord);
  272. col = col + texture2D(uSrc, texCoord + uBlurDir.xy * uDelta);
  273. col = col + texture2D(uSrc, texCoord - uBlurDir.xy * uDelta);
  274. col = col + texture2D(uSrc, texCoord + (uBlurDir.xy + uBlurDir.zw) * uDelta);
  275. col = col + texture2D(uSrc, texCoord - (uBlurDir.xy + uBlurDir.zw) * uDelta);
  276. gl_FragColor = col / 5.0;
  277. }
  278. </script>
  279. <!-- effect fragment shader template -->
  280. <script id="fx_common_fsh" type="x-shader/x_fragment">
  281. #ifdef GL_ES
  282. //precision mediump float;
  283. precision highp float;
  284. #endif
  285. uniform sampler2D uSrc;
  286. uniform vec2 uDelta;
  287. varying vec2 texCoord;
  288. varying vec2 screenCoord;
  289. void main(void) {
  290. gl_FragColor = texture2D(uSrc, texCoord);
  291. }
  292. </script>
  293. <!-- post processing -->
  294. <script id="pp_final_vsh" type="x-shader/x_vertex">
  295. uniform vec3 uResolution;
  296. attribute vec2 aPosition;
  297. varying vec2 texCoord;
  298. varying vec2 screenCoord;
  299. void main(void) {
  300. gl_Position = vec4(aPosition, 0.0, 1.0);
  301. texCoord = aPosition.xy * 0.5 + vec2(0.5, 0.5);
  302. screenCoord = aPosition.xy * vec2(uResolution.z, 1.0);
  303. }
  304. </script>
  305. <script id="pp_final_fsh" type="x-shader/x_fragment">
  306. #ifdef GL_ES
  307. //precision mediump float;
  308. precision highp float;
  309. #endif
  310. uniform sampler2D uSrc;
  311. uniform sampler2D uBloom;
  312. uniform vec2 uDelta;
  313. varying vec2 texCoord;
  314. varying vec2 screenCoord;
  315. void main(void) {
  316. vec4 srccol = texture2D(uSrc, texCoord) * 2.0;
  317. vec4 bloomcol = texture2D(uBloom, texCoord);
  318. vec4 col;
  319. col = srccol + bloomcol * (vec4(1.0) + srccol);
  320. col *= smoothstep(1.0, 0.0, pow(length((texCoord - vec2(0.5)) * 2.0), 1.2) * 0.5);
  321. col = pow(col, vec4(0.45454545454545)); //(1.0 / 2.2)
  322. gl_FragColor = vec4(col.rgb, 1.0);
  323. gl_FragColor.a = 1.0;
  324. }
  325. </script>
  326. <!--结尾-->
  327. <div class="lizi1">
  328. <div class="login">
  329. <div class="login-center">
  330. <div class="login-header text-center">
  331. <h3><?php echo $gmbt; ?>-激活</h3>
  332. </div>
  333. <form method="post" id="register-form" autocomplete="off" action="#" class="nice-validator n-default" novalidate>
  334. &nbsp;
  335. <div class="alert alert-danger">
  336. <strong style="color:red">温馨提示:</strong><br>
  337. 注意是游戏角色名授权<br>
  338. </div>
  339. <div class="form-group has-feedback feedback-left">
  340. <input type="text" class="form-control" id="cdk" name="cdk" placeholder="请输入CDKEY" autocomplete="off">
  341. </div>
  342. <div class="form-group has-feedback feedback-left">
  343. <select id="qu" name="qu" class="form-control" title="请选择区服">
  344. <?php
  345. foreach($quarr as $key=>$value){
  346. if($value['hidde']!=true){
  347. echo '<option value="'.$key.'">'.$value['name'].'</option>';
  348. }
  349. }
  350. ?>
  351. </select>
  352. </div>
  353. <div class="form-group has-feedback feedback-left">
  354. <input type="text" class="form-control" id="usr" name="usr" placeholder="请输入<?php echo $xname; ?>" autocomplete="off">
  355. </div>
  356. <div class="form-group has-feedback feedback-left">
  357. <input type="text" class="form-control" id="pass" name="pass" onKeyUp="value=value.replace(/[\W]/g,'')" placeholder="请填写后台密码(仅支持数字和英文)" autocomplete="off">
  358. </div>
  359. <div class="form-group">
  360. <input class="btn btn-block btn-primary" name='reg' id="1" value="提交授权" type="button" onclick= "test(this)">
  361. <input class="btn btn-block btn-primary" value="跳转后台" type="button" onclick="window.location.href='../gm'">
  362. </div><br>
  363. <footer class="col-sm-12 text-center"><p class="m-b-0">    <?php echo $gmbt; ?> &copy; 星辰大海    </p>
  364. </footer>
  365. </div>
  366. </div>
  367. </div>
  368. <script>
  369. function api(){
  370. $.ajaxSetup({contentType: "application/x-www-form-urlencoded; charset=utf-8"});
  371. $.post("pay.php", {
  372. usr:$("#usr").val(),
  373. pas:$("#pass").val(),
  374. cdk:$("#cdk").val(),
  375. qu:$("#qu").val()
  376. },function(data){
  377. $('input[name=reg]').attr('id','1');
  378. $('input[name=reg]').attr('value','提交授权');
  379. bootbox.alert({message:data,title:"提示"});
  380. });
  381. }
  382. function test(obj){
  383. var _status = obj.id;
  384. if(_status != '1'){
  385. $('input[name=reg]').attr('id','0');
  386. $('input[name=reg]').attr('value','正在提交...');
  387. return false;
  388. }else{
  389. $('input[name=reg]').attr('id','0');
  390. $('input[name=reg]').attr('value','正在提交...');
  391. api();
  392. }
  393. };
  394. document.onkeydown = function(event) {
  395. var target, code, tag;
  396. if (!event) {
  397. event = window.event; //针对ie浏览器
  398. target = event.srcElement;
  399. code = event.keyCode;
  400. if (code == 13) {
  401. tag = target.tagName;
  402. if (tag == "TEXTAREA") { return true; }
  403. else { return false; }
  404. }
  405. }else {
  406. target = event.target; //针对遵循w3c标准的浏览器,如Firefox
  407. code = event.keyCode;
  408. if (code == 13) {
  409. tag = target.tagName;
  410. if (tag == "INPUT") { return false; }
  411. else { return true; }
  412. }
  413. }
  414. };
  415. window.onload=function(){
  416. document.onkeydown=function(){
  417. var e=window.event||arguments[0];
  418. if(e.keyCode==123){
  419. return false;
  420. }else if((e.ctrlKey)&&(e.shiftKey)&&(e.keyCode==73)){
  421. return false;
  422. }
  423. };
  424. document.oncontextmenu=function(){
  425. return false;
  426. }
  427. }
  428. </script>
  429. </body>
  430. </html>