Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.09 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Registro</title>
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13. <style type="text/css">
  14. body {
  15. background-image: url(C:\SERVIDOR\br/img2.jpeg);
  16. background-color: #000;
  17. font-color: #fff;
  18. background-repeat: x,y;
  19. margin:0;
  20. padding:0;
  21.  
  22.  
  23.  
  24. }
  25. body,td,th {
  26. font-size: 14px;
  27. color: #fff;
  28. }
  29. .frm input {
  30. /* Size and position */
  31. padding: 3px 3px;
  32.  
  33. /* Styles */
  34. background: #1f2124; /* Fallback */
  35. background: -moz-linear-gradient(#1f2124, #27292c);
  36. background: -ms-linear-gradient(#1f2124, #27292c);
  37. background: -o-linear-gradient(#1f2124, #27292c);
  38. background: -webkit-gradient(linear, 0 0, 0 100%, from(#1f2124), to(#27292c));
  39. background: -webkit-linear-gradient(#1f2124, #27292c);
  40. background: linear-gradient(#1f2124, #27292c);
  41. border: 2px solid #FFF;
  42.  
  43. border-radius: 8px;
  44.  
  45. /* Font styles */
  46. font-family: 'Ubuntu', 'Lato', sans-serif;
  47. font-weight: bold;
  48. background: #FFF;
  49. box-shadow: inset 0 0 4px #e6e4e4;
  50. border-color: #FFF;
  51. }
  52. .frm input:focus {
  53. box-shadow: inset 0 0 4px #e6e4e4;
  54. border-color: #000;
  55. outline: none; /* Remove Chrome outline */
  56. }
  57. .button {
  58. cursor:pointer;
  59. box-shadow: inset 0 0 4px #e6e4e4;
  60. border-color: #FFF;
  61. outline: none; /* Remove Chrome outline */
  62. }
  63. .button:hover {
  64. cursor:pointer;
  65. box-shadow: inset 0 0 4px #e6e4e4;
  66. border-color: #000;
  67. outline: none; /* Remove Chrome outline */
  68. }
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. </style>
  77. <script>
  78. function bannedKey(evt,en,th,num,space)
  79. {
  80. //ex. onKeypress="bannedKey(event,'yes','no','yes','no')"
  81. var key;
  82. var ret;
  83. if (window.event) {
  84. key = window.event.keyCode;
  85. ret = "window.event.returnValue = false;";
  86. } else if (evt) {
  87. key = evt.which;
  88. ret = "keyPressed = evt.preventDefault()";
  89. }
  90. if (key!=8 && key!=0) {
  91.  
  92. if (num=='yes') {
  93. if (key>=48 && key<=57) { boo1 = true; } else { boo1 = false; }
  94. } else { boo1 = false; }
  95. if (en=='yes') {
  96. if ((key>=65 && key<=90) || (key>=97 && key<=122)) { boo2 = true; } else { boo2 = false; }
  97. } else { boo2 = false; }
  98. if (th=='yes') {
  99. if ((key>=161 && key<=255) || (key>=3585 && key<=3675)) { boo3 = true; } else { boo3 = false; }
  100. } else { boo3 = false; }
  101. if (space!='no') {
  102. if (key==32) { boo4 = true; } else { boo4 = false; }
  103. } else { boo4 = false; }
  104.  
  105. a = boo1 || boo2 || boo3 || boo4;
  106. if (a==false) {
  107. eval(ret);
  108. }
  109. }
  110. }
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. </script>
  118.  
  119.  
  120.  
  121.  
  122. </head>
  123.  
  124. <body>
  125.  
  126. <table width="1122" height="719" border="0" cellspacing="0" cellpadding="0" class="register">
  127. <tr>
  128.  
  129. <td><form class="frm" name="frm" action="" method="POST">
  130. <center><table width="320" border="0" cellpadding="0" cellspacing="0">
  131. <tr><!-- -->
  132. <td class="style1" align="right">Usuario :</td>
  133. <td align="left"><input name="username" type="text" class="textfield" size="24" maxlength="15" onKeypress="bannedKey(event,'yes','no','yes','no')"/></td>
  134. </tr>
  135. <tr height="2">
  136. </tr>
  137. <tr>
  138. <td class="style1" align="right" >Senha :</td>
  139. <td align="left"><input name="password" type="password" class="textfield" size="24" maxlength="15" onKeypress="bannedKey(event,'yes','no','yes','no')"/></td>
  140. </tr>
  141. <tr height="2">
  142. </tr>
  143. <tr>
  144. <td class="style1" align="right">Repita a senha :</td>
  145. <td align="left"><input name="repassword" type="password" class="textfield" id="repassword" size="24" maxlength="15" onKeypress="bannedKey(event,'yes','no','yes','no')"/></td>
  146. </tr>
  147. <tr height="2">
  148. </tr>
  149. <tr>
  150. <td class="style1" align="right">Sexo :</td>
  151. <td class="style2" align="left"><input name="sexo" type="radio" value="1" checked="checked" />
  152. Masculino
  153. <input name="sexo" type="radio" value="0" />
  154. Feminino</td>
  155. </tr>
  156. <tr height="2">
  157. </tr>
  158. <tr>
  159. <td class="style1" align="right">Nome do Personagem:</td>
  160. <td align="left"><input name="char" type="text" class="textfield" size="24" maxlength="15" onKeypress="bannedKey(event,'yes','yes','yes','no')"/></td>
  161. </tr>
  162.  
  163. </table>
  164. <span class="style1"><center></center>
  165. </span><br /><!-- -->
  166. <input name="submit" type="submit" class="button" value="Registrar" style="padding: 9px 9px;">
  167. &nbsp;&nbsp;&nbsp;
  168. <input name="Reset" type="reset" class="button" id="button" value="Limpar" style="padding: 9px 9px;"/>
  169. </center></form><br />
  170. <?php
  171. if($_POST["submit"])
  172. {
  173. $username = $_POST["username"];
  174. $senha = $_POST["password"];
  175. $resenha = $_POST["repassword"];
  176. $sexo = $_POST["sexo"];
  177. $nickname = $_POST["char"];
  178. define('HOST','WIN-VLS9QUNM3TI');
  179. define('D_DB','Db_Tank');
  180. define('USER','sa');
  181. define('PASS','@Diegogay');
  182. $conn = odbc_connect("Driver={SQL Server};Server=".HOST.";Database=".D_DB.";", USER, PASS);
  183. $verlogin = odbc_num_rows(odbc_exec($conn,"SELECT * FROM Sys_Users_Detail WHERE UserName = '$username'"));
  184. $vernickname = odbc_num_rows(odbc_exec($conn,"SELECT * FROM Sys_Users_Detail WHERE NickName = '$nickname'"));
  185. if (empty($username) || empty($senha)|| empty($resenha)|| empty($nickname))
  186. {
  187. echo "<div align='center'>Todos os campos devem ser preenchidos corretamente.</div>";
  188. }
  189. elseif($verlogin > 0) {
  190. echo("<div align='center'>Este nome de usuário já está sendo utilizado!</div");
  191. }
  192. elseif($vernickname > 0) {
  193. echo("<div align='center'>Este apelido já está sendo utilizado!</div");
  194. }
  195. elseif(strlen($username) < 5) {
  196. echo("<div align='center'>É necessário ter no mínimo 5 digitos e no máximo 15 digitos no Nome de Usuário.</div");
  197. }
  198. elseif(strlen($nickname) < 4) {
  199. echo("<div align='center'>É necessário ter no mínimo 4 digitos e no máximo 15 digitos no Apelido.</div");
  200. }
  201. elseif(strlen($senha) < 5 || strlen($resenha) < 5) {
  202. echo("<div align='center'>É necessário ter no mínimo 5 digitos e no máximo 15 digitos na senha.</div");
  203. }
  204. elseif($senha != $resenha) {
  205. echo('As duas senhas digitadas não se coincidem!');
  206. } else {
  207. $cadastro_cupons = 500;
  208. $cadastro_gold = 500;
  209. $cadastro_money = 500;
  210. odbc_exec($conn,"exec Db_Membership.dbo.Mem_Users_CreateUser @ApplicationName=N'DanDanTang',@UserName=N'".$username."',@password=N'".strtoupper(md5($senha))."',@email=N'stwtank@hotmail.com',@PasswordFormat=N'1',@PasswordSalt=N'MD5',@UserSex='".$sexo."',@UserId=''");
  211. odbc_exec($conn,"exec Db_Membership.dbo.Mem_Users_Accede @ApplicationName=N'DanDanTang',@UserName=N'".$username."',@password=N'".strtoupper(md5($senha))."',@UserId=''");
  212. odbc_exec($conn,"exec Db_Tank.dbo.SP_Users_Active @UserID='',@Attack=0,@Colors=N',,,,,,',@ConsortiaID=0,@Defence=0,@Gold=$cadastro_gold,@GP=538554,@Grade=20,@Luck=0,@Money=$cadastro_money,@Style=N',,,,,,',@Agility=0,@State=0,@UserName=$username,@PassWord=N'".strtoupper(md5($senha))."',@Sex=$sexo,@Hide=1111111111,@ActiveIP=N'',@Skin=N'',@Site=N'',@MagicAttack='',@evolutionGrade='',@evolutionExp='',@MagicDefence=''");
  213.  
  214. if($_POST['sexo']==1){
  215. odbc_exec($conn,"exec Db_Tank.dbo.SP_Users_RegisterNotValidate @UserName=N'".$username."',@PassWord=N'".strtoupper(md5($senha))."',@NickName=N'".$nickname."',@BArmID=7008,@BHairID=3158,@BFaceID=6103,@BClothID=5160,@BHatID=1142,@GArmID=7008,@GHairID=3158,@GFaceID=6103,@GClothID=5160,@GHatID=1142,@ArmColor=N'',@HairColor=N'',@FaceColor=N'',@ClothColor=N'',@HatColor=N'',@Sex=$sexo,@StyleDate=0");
  216. }
  217. else
  218. if($_POST['sexo']==0){
  219. odbc_exec($conn,"exec Db_Tank.dbo.SP_Users_RegisterNotValidate @UserName=N'".$username."',@PassWord=N'".strtoupper(md5($senha))."',@NickName=N'".$nickname."',@BArmID=7008,@BHairID=3244,@BFaceID=6204,@BClothID=5276,@BHatID=1214,@GArmID=7008,@GHairID=3244,@GFaceID=6202,@GClothID=5276,@GHatID=1214,@ArmColor=N'',@HairColor=N'',@FaceColor=N'',@ClothColor=N'',@HatColor=N'',@Sex=$sexo,@StyleDate=0");
  220. }
  221. odbc_exec($conn,"exec Db_Tank.dbo.SP_Users_LoginWeb @UserName=N'".$username."',@Password=N'',@FirstValidate=0,@Nickname=N'".$nickname."'");
  222. echo "<div align='center' style='#00FF7C'>Cadastro efetuado com sucesso!</div>";
  223. }
  224. }
  225. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement