Advertisement
Guest User

Untitled

a guest
May 6th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.21 KB | None | 0 0
  1. <?php
  2. $uid = (int)$_GET['uid'];
  3.  
  4. if(!empty($uid)){
  5. $usuarios = mysql_query("SELECT * FROM ".TBL_USERS." WHERE id = '".$uid."' LIMIT 1") or die(mysql_error());
  6. $usuario = mysql_fetch_assoc($usuarios);
  7. } else {
  8. $usuarios = mysql_query("SELECT * FROM ".TBL_USERS." WHERE id = '".$id."' LIMIT 1") or die(mysql_error());
  9. $usuario = mysql_fetch_assoc($usuarios);
  10. }
  11.  
  12. if(isset($_GET['tab'])){
  13. if($_GET['tab'] < 1 || $_GET['tab'] > 3 ){
  14. header("Location: perfil.php?uid=".$usuario['id']."");
  15. $tab = 0;
  16. exit;
  17. } else {
  18. $tab = (int)$_GET['tab'];
  19. }
  20. }
  21.  
  22.  
  23. ///////////////////////////////////////// PERFIL /////////////////////////////////////////////////
  24.  
  25. if($tab == 1){
  26.  
  27. if(!empty($_POST['ok'])){
  28.  
  29. $city = $_POST['cidade'];
  30. $desc1 = $_POST['desc1'];
  31. $desc2 = $_POST['desc2'];
  32. $namevillage = $_POST['namevillage'];
  33. $sex = $_POST["sexo"];
  34.  
  35. $day = $_POST["dia"];
  36. $month = $_POST["mes"];
  37. $year = $_POST["ano"];
  38. $date = "$day-$month-$year";
  39.  
  40. mysql_query("UPDATE ".TBL_USERS." SET city = '".$city."', description1 = '".$desc1."', description2 = '".$desc2."', sex = '".$sex."', date = '".$date."', email = '".$email."' WHERE id = '".$user['id']."' LIMIT 1") or die(mysql_error());
  41. mysql_query("UPDATE ".TBL_VILLAGES." SET name = '".$namevillage."' WHERE uid = '".$usuario['id']."' LIMIT 1") or die(mysql_error());
  42.  
  43. header("location: perfil.php");
  44.  
  45. } else {
  46.  
  47. $city = $user['city'];
  48. $desc1 = $user['description1'];
  49. $desc2 = $user['description2'];
  50. $namevillage = $user['name'];
  51. $sex = $user['sex'];
  52.  
  53. $date = explode("-", $user['date']);
  54. $day = $date[0];
  55. $month = $date[1];
  56. $year = $date[2];
  57.  
  58. }
  59.  
  60. }
  61.  
  62. ///////////////////////////////////////// CONTA /////////////////////////////////////////////////
  63.  
  64. if($tab == 2){
  65.  
  66. if(!empty($_POST['oldpass'])){
  67.  
  68. $oldpass = $_POST['oldpass'];
  69. $newpass1 = $_POST['newpass1'];
  70. $newpass2 = $_POST['newpass2'];
  71.  
  72. if($oldpass != $user['password'] && !empty($oldpass)){
  73.  
  74. $erro['oldpass'] = "<li>(A senha antiga est� incorreta!)</li>";
  75.  
  76. } elseif($newpass1 != $newpass2 && !empty($newpass1) && !empty($newpass2)){
  77.  
  78. $erro['newpass1'] = "<li>(As novas senhas est�o diferentes!)</li>";
  79.  
  80. } elseif($oldpass == $user['password'] && $newpass1 == $newpass2){
  81.  
  82. mysql_query("UPDATE ".TBL_USERS." SET password = '".$newpass2."' WHERE id = '".$user['id']."' LIMIT 1") or die(mysql_error());
  83.  
  84. }
  85.  
  86. }
  87.  
  88. if(!empty($_POST['email1'])){
  89.  
  90. $email1 = addslashes($_POST['email1']);
  91. $email2 = addslashes($_POST['email2']);
  92.  
  93. $email_check1 = preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $email1);
  94. $email_check2 = preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $email2);
  95.  
  96. if($email_check1 != 1 || $email_check2 != 1 || strlen($email1) < 6 || strlen($email2) < 6){
  97.  
  98. $erro['mail'] = "<li>(E-mail inv�lido)</li>";
  99.  
  100. } elseif($email1 != $user['email']){
  101.  
  102. $erro['mail'] = "<li>(Este email n�o consta no Banco de Dados)</li>";
  103.  
  104. } else {
  105.  
  106. mysql_query("UPDATE ".TBL_USERS." SET email = '".$email2."' WHERE id = '".$user['id']."' LIMIT 1") or die(mysql_error());
  107.  
  108. }
  109.  
  110. }
  111.  
  112. if(!empty($_POST['sitter'])){
  113.  
  114. $sitter = addslashes($_POST['sitter']);
  115.  
  116. $users_sitter = mysql_query("SELECT * FROM ".TBL_USERS." WHERE username = '".$sitter."' LIMIT 1") or die(mysql_error());
  117. $sitters = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE username = '".$sitter."' AND type = '1' LIMIT 1") or die(mysql_error());
  118.  
  119. if(mysql_num_rows($users_sitter) >= 1 && mysql_num_rows($sitters) == 0 && $sitter != $user['username']){
  120.  
  121. mysql_query("INSERT INTO ".TBL_SITTER_SAMEPC." (uid,username,type) VALUES ('".$user['id']."', '".$sitter."', 1)") or die(mysql_error());
  122.  
  123. } elseif($sitter == $user['username']) {
  124.  
  125. $erro['sitter'] = "<li>(Erro! Voc� n�o pode adicionar a si mesmo)</li>";
  126.  
  127. } elseif(mysql_num_rows($users_sitter) == 0) {
  128.  
  129. $erro['sitter'] = "<li>(Este usu�rio n�o existe!)</li>";
  130.  
  131. }
  132.  
  133. }
  134.  
  135. if(isset($_GET['id']) && $_GET['type'] == "1" && $_GET['e'] == "1"){
  136.  
  137. $userid = (int)$_GET['id'];
  138.  
  139. $users_sitter = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TBL_USERS." WHERE id = '".$userid."' LIMIT 1")) or die(mysql_error());
  140. $sitters = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$user['id']."' AND username = '".$users_sitter['username']."' AND type = '1' LIMIT 1") or die(mysql_error());
  141.  
  142. if(mysql_num_rows($sitters) >= 0){
  143. mysql_query("DELETE FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$user['id']."' AND username = '".$users_sitter['username']."' AND type = '1' LIMIT 1") or die(mysql_error());
  144. }
  145.  
  146. }
  147.  
  148. if(isset($_GET['id']) && $_GET['type'] == "1" && $_GET['f'] == "1"){
  149.  
  150. $userid = (int)$_GET['id'];
  151.  
  152. $users_sitter = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TBL_USERS." WHERE id = '".$userid."' LIMIT 1")) or die(mysql_error());
  153. $sitters = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$users_sitter['id']."' AND username = '".$user['username']."' AND type = '1' LIMIT 1") or die(mysql_error());
  154.  
  155. if(mysql_num_rows($sitters) >= 0){
  156. mysql_query("DELETE FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$users_sitter['id']."' AND username = '".$user['username']."' AND type = '1' LIMIT 1") or die(mysql_error());
  157. }
  158.  
  159. }
  160.  
  161. if(!empty($_POST['same_pc'])){
  162.  
  163. $same_pc = addslashes($_POST['same_pc']);
  164.  
  165. $users_samepc = mysql_query("SELECT * FROM ".TBL_USERS." WHERE username = '".$same_pc."' LIMIT 1") or die(mysql_error());
  166. $samepc = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE username = '".$same_pc."' AND type = '2' LIMIT 1") or die(mysql_error());
  167.  
  168. if(mysql_num_rows($users_samepc) >= 1 && mysql_num_rows($samepc) == 0 && $same_pc != $user['username']){
  169.  
  170. mysql_query("INSERT INTO ".TBL_SITTER_SAMEPC." (uid,username,type) VALUES ('".$user['id']."', '".$same_pc."', 2)") or die(mysql_error());
  171.  
  172. } elseif($same_pc == $user['username']) {
  173.  
  174. $erro['samepc'] = "<li>(Erro! Voc� n�o pode adicionar a si mesmo)</li>";
  175.  
  176. } elseif(mysql_num_rows($users_samepc) == 0) {
  177.  
  178. $erro['samepc'] = "<li>(Este usu�rio n�o existe!)</li>";
  179.  
  180. }
  181.  
  182. }
  183.  
  184. if(isset($_GET['id']) && $_GET['type'] == "2" && $_GET['g'] == "1"){
  185.  
  186. $userid = (int)$_GET['id'];
  187.  
  188. $users_samepc = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TBL_USERS." WHERE id = '".$userid."' LIMIT 1")) or die(mysql_error());
  189. $sitters = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$user['id']."' AND username = '".$users_samepc['username']."' AND type = '2' LIMIT 1") or die(mysql_error());
  190.  
  191. if(mysql_num_rows($sitters) >= 0){
  192. mysql_query("DELETE FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$user['id']."' AND username = '".$users_samepc['username']."' AND type = '2' LIMIT 1") or die(mysql_error());
  193. }
  194.  
  195. }
  196.  
  197.  
  198. }
  199.  
  200. include("template/header.php");
  201. ?>
  202. <div id="content" class="player">
  203. <h1>Perfil do jogador</h1>
  204. <?php if($usuario['id'] == $user['id']){ ?>
  205. <div id="textmenu">
  206. <a href="perfil.php?uid=<?php echo $usuario['id'];?>" <?php if(!isset($uid) || !empty($uid) || empty($tab)){ echo "class=\"selected\"";}?>>Vis�o geral</a> |
  207. <a href="perfil.php?tab=1" <?php if($tab == "1"){ echo "class=\"selected\"";}?>>Perfil</a> |
  208. <a href="perfil.php?tab=2" <?php if($tab == "2"){ echo "class=\"selected\"";}?>>Conta</a>
  209. <?php /*?>
  210. <a href="perfil.php?tab=2" <?php if($tab == "2"){ echo "class=\"selected\"";}?>>Prefer�ncias</a> |
  211. <a href="perfil.php?tab=3" <?php if($tab == "3"){ echo "class=\"selected\"";}?>>Pacote gr�fico</a>
  212. <?php */ ?>
  213. </div>
  214. <?php }
  215.  
  216. if(!isset($uid) || !empty($uid) || empty($tab)){
  217. ?>
  218. <table id="profile" cellpadding="1" cellspacing="1">
  219. <thead>
  220. <tr>
  221.  
  222. <th colspan="2">Jogador <?php echo $usuario['username'];?></th>
  223. </tr>
  224. <tr>
  225. <td>Detalhes</td>
  226. <td>Descri��o:</td>
  227. </tr>
  228. </thead><tbody>
  229.  
  230. <tr>
  231. <td class="empty"></td><td class="empty"></td>
  232. </tr>
  233. <tr>
  234. <td class="details">
  235. <table cellpadding="0" cellspacing="0">
  236. <tr>
  237. <th>Classifica��o</th>
  238.  
  239. <td>X</td>
  240. </tr>
  241. <tr>
  242. <th>Tribo:</th>
  243. <td><?php echo Tribo($usuario['tribe']);?></td>
  244. </tr>
  245. <tr>
  246.  
  247. <th>Alian�a:</th>
  248. <td><?php echo Ally($usuario['id']);?></td>
  249. </tr>
  250. <tr>
  251. <th>Aldeias:</th>
  252. <td><?php echo NumAldeias($usuario['id']);?></td>
  253. </tr>
  254.  
  255. <tr>
  256. <th>Popula��o:</th>
  257. <td><?php echo PopTotal($usuario['id']);?></td>
  258. </tr><tr>
  259. <td colspan="2" class="empty"></td>
  260. </tr>
  261. <tr>
  262. <td colspan="2">
  263. <?php
  264. if($usuario['id'] == $user['id']){
  265. echo "<a href=\"spieler.php?s=1\">&raquo; Alterar perfil</a>";
  266. } elseif($usuario['id'] != $user['id']) {
  267. echo "<a href=\"nachrichten.php?t=1&id=".$usuario['id']."\">&raquo; Escrever mensagem</a>";
  268. }
  269. ?>
  270.  
  271. </td>
  272. </tr>
  273. <tr>
  274. <td colspan="2" class="empty"></td>
  275. </tr>
  276. <tr>
  277. <td colspan="2" class="desc2">
  278. <?php echo $usuario['description2'];?>
  279. </td>
  280. </tr>
  281.  
  282. </table>
  283.  
  284. </td>
  285. <td class="desc1">
  286. <div><?php echo $usuario['description1'];?></div>
  287. </td>
  288. </tr>
  289. </tbody>
  290.  
  291. </table><table cellpadding="1" cellspacing="1" id="villages">
  292. <thead>
  293. <tr>
  294. <th colspan="3">Aldeias:</th>
  295. </tr>
  296. <tr>
  297. <td>Nome</td>
  298. <td>Habitantes</td>
  299.  
  300. <td>Coordenadas</td>
  301. </tr>
  302. </thead><tbody>
  303. <tr>
  304. <?php
  305. $villages = mysql_query("SELECT * FROM ".TBL_VILLAGES." WHERE uid = '".$usuario['id']."' LIMIT 1") or die(mysql_error());
  306. while($myvillages = mysql_fetch_assoc($villages)){
  307.  
  308. if($myvillages['capital'] == "1"){
  309. $capital = "<span class=\"none3\">(Capital)</span>";
  310. } else {
  311. $capital = "";
  312. }
  313.  
  314. $mapa = mysql_fetch_array(mysql_query("SELECT x,y FROM ".TBL_MAP." WHERE id = '".$myvillages['map']."' LIMIT 1")) or die(mysql_error());
  315. ?>
  316. <td class="nam"><a href="karte.php?d=169169&c=8d"><?php echo $village['name'];?></a> <?php echo $capital;?></td>
  317. <td class="hab"><?php echo $myvillages['pop'];?></td>
  318. <td class="aligned_coords">
  319. <div class="cox">(<?php echo $mapa['0'];?></div>
  320.  
  321. <div class="pi">|</div>
  322. <div class="coy"><?php echo $mapa['1'];?>)</div>
  323. </td>
  324. <?php
  325. }
  326. ?>
  327. </tr>
  328. </tbody>
  329. </table>
  330. <?php } elseif($tab == "1"){?>
  331. <form action="perfil.php?tab=1" method="POST">
  332.  
  333. <table cellpadding="1" cellspacing="1" id="edit"><thead>
  334. <tr>
  335. <th colspan="3">Jogador <?php echo $usuario['username'];?></th>
  336. </tr>
  337. <tr>
  338. <td colspan="2">Detalhes</td>
  339. <td>Descri��o:</td>
  340. </tr>
  341.  
  342. </thead>
  343. <tbody>
  344. <tr>
  345. <td colspan="2" class="empty"></td><td class="empty"></td></tr>
  346. <tr>
  347. <th>Data de nascimento:</th><td class="birth">
  348. <input tabindex="1" class="text day" type="text" name="dia" value="<?php echo $day;?>" maxlength="2" />
  349. <select tabindex="2" name="mes" size="" class="dropdown">
  350. <option value="00" <?php if($day == "00"){ echo "selected";}?>></option>
  351. <option value="01" <?php if($day == "01"){ echo "selected";}?>>Jan</option>
  352. <option value="02" <?php if($day == "02"){ echo "selected";}?>>Fev</option>
  353. <option value="03" <?php if($day == "03"){ echo "selected";}?>>Mar</option>
  354. <option value="04" <?php if($day == "04"){ echo "selected";}?>>Abr</option>
  355. <option value="05" <?php if($day == "05"){ echo "selected";}?>>Mai</option>
  356. <option value="06" <?php if($day == "06"){ echo "selected";}?>>Jun</option>
  357. <option value="07" <?php if($day == "07"){ echo "selected";}?>>Jul</option>
  358. <option value="08" <?php if($day == "08"){ echo "selected";}?>>Ago</option>
  359. <option value="09" <?php if($day == "09"){ echo "selected";}?>>Set</option>
  360. <option value="10" <?php if($day == "10"){ echo "selected";}?>>Out</option>
  361. <option value="11" <?php if($day == "11"){ echo "selected";}?>>Nov</option>
  362. <option value="12" <?php if($day == "12"){ echo "selected";}?>>Dez</option>
  363. </select>
  364. <input tabindex="3" type="text" name="ano" value="<?php echo $year;?>" maxlength="4" class="text year">
  365. </td>
  366.  
  367. <td rowspan="7" class="desc1"><textarea tabindex="7" name="desc1"><?php echo $desc1;?></textarea></td></tr>
  368. <tr><th>Sexo:</th>
  369. <td class="gend">
  370. <label><input class="radio" type="radio" name="sexo" value="0" <?php if($sex == "0"){ echo "checked";}?>>n.d.</label>
  371. <label><input class="radio" type="radio" name="sexo" value="1" <?php if($sex == "1"){ echo "checked";}?>>m</label>
  372. <label><input class="radio" type="radio" name="sexo" value="2" <?php if($sex == "2"){ echo "checked";}?>>f</label>
  373.  
  374. </td></tr>
  375.  
  376. <tr><th>Cidade:</th><td><input tabindex="5" type="text" name="cidade" value="<?php echo $city;?>" maxlength="30" class="text"></td></tr>
  377.  
  378. <tr><td colspan="2" class="empty"></td></tr>
  379.  
  380. <tr><th>Nome da aldeia:</th><td><input tabindex="6" type="text" name="namevillage" value="<?php echo $village['name'];?>" maxlength="20" class="text"></td></tr><tr><td colspan="2" class="empty"></td></tr>
  381.  
  382. <tr><td colspan="2" class="desc2"><textarea tabindex="8" name="desc2"><?php echo $desc2;?></textarea></td></tr>
  383. </table>
  384. <p class="btn"><input type="image" value="1" tabindex="9" name="ok" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p>
  385. </form>
  386. <?php } elseif($tab == "2"){
  387.  
  388. $my_sitter = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$user['id']."' AND type = '1' LIMIT 2") or die(mysql_error());
  389. $sitter_row = mysql_num_rows($my_sitter);
  390.  
  391. $sitters = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE username = '".$user['username']."' AND type = '1' LIMIT 2") or die(mysql_error());
  392. $sitters_row = mysql_num_rows($sitters);
  393.  
  394. $same_pc_q = mysql_query("SELECT * FROM ".TBL_SITTER_SAMEPC." WHERE uid = '".$user['id']."' AND type = '2'") or die(mysql_error());
  395. $samepc_row = mysql_num_rows($same_pc_q);
  396.  
  397. ?>
  398. <form action="perfil.php?tab=2" method="POST">
  399.  
  400. <ul class="important">
  401. <?php echo $erro['oldpass'].$erro['newpass1'].$erro['mail'].$erro['sitter'].$erro['samepc'];?>
  402. </ul>
  403.  
  404. <table cellpadding="1" cellspacing="1" id="change_pass" class="account">
  405. <thead>
  406. <tr>
  407. <th colspan="2">Alterar senha</th>
  408. </tr>
  409. </thead>
  410. <tbody>
  411. <tr>
  412. <th>Senha antiga:</th>
  413. <td><input class="text" type="password" name="oldpass" maxlength="20"></td>
  414. </tr>
  415. <tr>
  416. <th>Nova senha:</th>
  417. <td><input class="text" type="password" name="newpass1" maxlength="20"></td>
  418.  
  419. </tr>
  420. <tr>
  421. <th>Nova senha:</th>
  422. <td><input class="text" type="password" name="newpass2" maxlength="20"></td>
  423. </tr>
  424. </tbody>
  425. </table>
  426.  
  427. <table cellpadding="1" cellspacing="1" id="change_mail" class="account">
  428. <thead>
  429. <tr>
  430. <th colspan="2">Alterar e-mail</th>
  431. </tr>
  432. </thead>
  433. <tbody>
  434. <tr>
  435. <td class="note" colspan="2">Por favor digite seu e-mail antigo e o e-mail atual. Voc� ir� receber um c�digo de confirma��o em ambos endere�os de e-mail, os quais dever�o ser digitados aqui.</td></tr>
  436.  
  437. <tr>
  438. <th>E-Mail antigo:</th>
  439. <td><input class="text" type="text" name="email1" maxlength="50"></td>
  440. </tr>
  441. <tr>
  442. <th>E-Mail novo:</th>
  443. <td><input class="text" type="text" name="email2" maxlength="50"></td>
  444. </tr>
  445. </tbody>
  446. </table>
  447.  
  448. <table cellpadding="1" cellspacing="1" id="sitter" class="account">
  449. <thead>
  450. <tr>
  451. <th colspan="2">Sitters da conta</th>
  452. </tr>
  453. </thead>
  454. <tbody>
  455. <tr>
  456. <td class="note" colspan="2">Um sitter pode entrar na sua conta com o seu nome de usu�rio e a senha dele. Voc� pode ter no m�ximo dois sitters.</td>
  457. </tr>
  458. <tr>
  459. <th>Nome dos sitters:</th>
  460. <td><input class="text" type="text" name="sitter" maxlength="15" <?php if($sitter_row == 2){ echo "disabled";}?>><span class="count"><b><?php if($sitter_row == 0){ echo "<font color=\"#008000\">$sitter_row/2</font>";} elseif($sitter_row == 1){ echo "<font color=\"#D26900\">$sitter_row/2</font>";} elseif($sitter_row == 2){ echo "<font color=\"#800000\">$sitter_row/2</font>";}?></b></span></td>
  461. </tr>
  462. <tr>
  463. <td colspan="2" class="sitter">
  464. <?php if($sitter_row == 0){ ?>
  465. <span class="none">Voc� n�o tem sitters.</span>
  466. <?php } else {
  467. while($sitter_fetch = mysql_fetch_assoc($my_sitter)){
  468. $users = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TBL_USERS." WHERE username = '".$sitter_fetch['username']."' LIMIT 1")) or die(mysql_error());
  469. ?>
  470. <div>
  471. <a href="perfil.php?tab=2&id=<?php echo $users['id'];?>&type=1&e=1"><img class="del" src="img/x.gif" title="Remover sitters" alt="Remover sitters" /></a>
  472. <a href="perfil.php?uid=<?php echo $users['id'];?>"><?php echo $users['username'];?></a>
  473. </div>
  474. <?php } } ?>
  475. </td>
  476. </tr>
  477. <tr>
  478. <td class="note" colspan="2">Voc� foi escolhido como sitter das seguintes contas.
  479. Pode cancelar com um clique no X vermelho.</td></tr>
  480. <tr>
  481. <td colspan="2" class="sitter">
  482. <?php if($sitters_row == 0){ ?>
  483. <span class="none">Voc� n�o � sitter.</span>
  484. <?php } else {
  485. while($sitter_fetch = mysql_fetch_assoc($sitters)){
  486. $users = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TBL_USERS." WHERE id = '".$sitter_fetch['uid']."' LIMIT 1")) or die(mysql_error());
  487. ?>
  488. <div>
  489. <a href="perfil.php?tab=2&id=<?php echo $users['id'];?>&type=1&f=1"><img class="del" src="img/x.gif" title="Remover sitters" alt="Remover sitters" /></a>
  490. <a href="perfil.php?uid=<?php echo $users['id'];?>"><?php echo $users['username'];?></a>
  491. </div>
  492. <?php } } ?>
  493. </td>
  494. </tr>
  495. </table>
  496.  
  497. <table cellpadding="1" cellspacing="1" id="same_pc" class="account">
  498. <thead>
  499. <tr>
  500. <th colspan="2">Mesmo PC em uso</th>
  501. </tr>
  502. </thead>
  503. <tbody>
  504. <tr>
  505. <td class="note" colspan="2">Se voc� joga Travian com outras pessoas no mesmo PC, tem que inserir o nome das diferentes contas aqui. Essa op��o se aplica apenas para o mesmo computador, n�o rede.</td>
  506. </tr>
  507. <tr>
  508. <th>Nome do jogador</th>
  509. <td><input class="text" type="text" name="same_pc" maxlength="15" /></td>
  510. </tr>
  511. <tr>
  512. <td colspan="2" class="user">
  513. <?php if($samepc_row == 0){ ?>
  514. <span class="none">Voc� n�o tem jogadores adicionados ao Mesmo PC em Uso.</span>
  515. <?php } else {
  516. while($samepc_q = mysql_fetch_assoc($same_pc_q)){
  517. $users = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TBL_USERS." WHERE username = '".$samepc_q['username']."' LIMIT 1")) or die(mysql_error());
  518. ?>
  519. <a href="perfil.php?tab=2&id=<?php echo $users['id'];?>&type=2&g=1"><img class="del" src="img/x.gif" title="Terminar com uso de mesmo PC" alt="Terminar com uso de mesmo PC" /></a>
  520. <a href="perfil.php?uid=<?php echo $users['id'];?>"><?php echo $users['username'];?></a>
  521. <?php } } ?>
  522. </td>
  523. </tr>
  524. </tbody>
  525. </table>
  526.  
  527. <table cellpadding="1" cellspacing="1" id="del_acc" class="account">
  528. <thead>
  529. <tr>
  530. <th colspan="2">Cancelar conta</th>
  531. </tr>
  532. </thead>
  533. <tbody>
  534. <tr>
  535. <td class="note" colspan="2">Voc� pode cancelar a sua conta aqui. Ap�s o pedido de cancelamento, voc� ter� apenas 24h para mudar de id�ia. A sua conta ser� definitivamente cancelada ap�s 3 dias.</td>
  536. </tr>
  537. <tr>
  538. <th>Cancelar conta?</th>
  539. <td class="del_selection">
  540. <label><input class="radio" type="radio" name="del" value="1"> sim</label>
  541. <label><input class="radio" type="radio" name="del" value="0" checked> n�o</label>
  542. </td>
  543. </tr>
  544. <tr>
  545. <th>Confirmar com a senha:</th>
  546. <td><input class="text" type="password" name="del_senha" maxlength="20" /></td>
  547. </tr>
  548. </tbody>
  549. </table>
  550.  
  551. <p class="btn"><input type="image" value="" name="s1" id="btn_save" class="dynamic_img" src="img/x.gif" alt="salvar" /></p>
  552. </form>
  553. <?php } ?>
  554. </div>
  555. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement