index.php 15 KB

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