Changeset 576 for trunk/pages
- Timestamp:
- Apr 29, 2009, 8:02:38 PM (16 years ago)
- Location:
- trunk/pages
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/chars.php
r405 r576 1 1 <?php 2 $html -> PrgStart();3 echo " <a href=\"?page=acc\"><- Zpět do správy účtu</a>";4 2 5 $player -> CharsOnAcc($_SESSION["UserId"]); 3 $html->PrgStart(); 4 echo(' <a href="?page=acc"><- Zpět do správy účtu</a>'); 6 5 6 $player->CharsOnAcc($_SESSION['UserId']); 7 7 8 echo "<font size=\"1\">Výpis omezen na 10 postav</font>"; 9 $html -> PrgStop(); 8 echo('<font size="1">Výpis omezen na 10 postav</font>'); 9 $html->PrgStop(); 10 10 11 ?> -
trunk/pages/gmteam.php
r573 r576 1 1 <?php 2 3 include('inc/db.php');4 2 5 3 $Role = array('Hráč', 'Moderátor', 'Game Master', 'Kontrolor chyb', 'Vedoucí Tábora', 'Administrátor', 'Správce Systému'); … … 46 44 { 47 45 echo('<tr><td>Profil na foru:</td>'); 48 echo('<td><strong><a href=" http://wow.zdechov.net/forum/memberlist.php?mode=viewprofile&u='.$Line['ForumId'].'">Profil</a></strong></td>');46 echo('<td><strong><a href="'.$Config['Web']['BaseURL'].'forum/memberlist.php?mode=viewprofile&u='.$Line['ForumId'].'">Profil</a></strong></td>'); 49 47 echo '</tr>'; 50 48 } -
trunk/pages/register.php
r567 r576 1 <? 2 include('./inc/db.php'); 3 ?> 1 <?php 4 2 5 <table align="center" width="520"> 6 <tr><th align="center"><img src="./imgs/logoreg.png"</th></tr> 7 8 <tr><td align="center"><br> 9 10 <table align="center" width="230"> 11 <form method="post" action="http://wow.zdechov.net/?page=register"> 12 <tr><td>Account</td><td><input type="text" name="account"></td></tr> 13 <tr><td>Heslo</td><td><input type="password" name="heslo1"></td></tr> 14 <tr><td>Heslo znovu</td><td><input type="password" name="heslo2"></td></tr> 15 <tr><td>Email</td><td><input type="text" name="email"></td></tr> 16 <tr><td>Typ účtu</td><td><select name="expansion"> 17 <option value="">-- vyber typ účtu --</option> 18 <option value="0">Classic</option> 19 <option value="1">TBC</option> 20 <option value="2">WoTLK</option></td></tr> 21 <tr><td>Pravidla <a href="http://wow.zdechov.net/forum/viewtopic.php?f=11&t=2066">ČTI</a></td><td><center>Souhlasím<input type="checkbox" name="agree" value="ON"></td><td></td></tr></center> 22 <tr><td></td><td><input type="submit" Value="Registrovat"></td></tr> 23 </form> 24 <style type="text/css"> 25 h10 {color: red; font-style: arial} 26 h11 {color: blue; font-style: arial} 27 </style> 28 <tr><td colspan="2" align="center"><strong> 29 <?php 30 mysql_connect($db_server, $db_user, $db_pass) or die ("Spojení nebylo uspěšné"); 31 $p = mysql_num_rows(mysql_query("SELECT * FROM `realm1_realmd`.`account`")); 32 if($p >= 13000) { 33 echo "<h10>Registrace jsou uzavřeny</h10><p>"; 34 echo "<h11>Limit vyčerpán</h11>"; 35 } else { 36 $account = addslashes($_POST['account']); 37 $password1 = addslashes($_POST['heslo1']); 38 $password2 = addslashes($_POST['heslo2']); 39 $email = addslashes($_POST['email']); 40 $expansion = addslashes($_POST['expansion']); 41 42 function sha_password($account,$password){ 43 $account = strtoupper($account); 44 $password = strtoupper($password); 45 46 return SHA1($account.':'.$password); 3 function sha_password($account, $password) 4 { 5 $account = strtoupper($account); 6 $password = strtoupper($password); 7 return(sha1($account.':'.$password)); 47 8 } 48 9 49 echo "<br>"; 10 echo('<div style="margin-left:auto; margin-right:auto; text-align:center; align: center;">'. 11 '<div style="margin-left:auto; margin-right:auto; text-align:center; align: center;">'. 12 '<img style="align: center" src="./imgs/logoreg.png" alt="logo" /></div>'. 13 '<form method="post" action="?page=register">'. 14 '<table style="margin-left:auto; margin-right:auto; text-align:center;">'. 15 '<tr><td>Účet:</td><td><input type="text" name="account" value="'.$_POST['account'].'"/></td></tr>'. 16 '<tr><td>Heslo:</td><td><input type="password" name="heslo1" value="'.$_POST['heslo1'].'"/></td></tr>'. 17 '<tr><td>Heslo znovu:</td><td><input type="password" name="heslo2" value="'.$_POST['heslo2'].'"/></td></tr>'. 18 '<tr><td>Email:</td><td><input type="text" name="email" value="'.$_POST['email'].'"/></td></tr>'. 19 '<tr><td>Typ účtu:</td><td><select name="expansion" value="'.$_POST['expansion'].'">'. 20 '<option value="">-- vyber typ účtu --</option>'. 21 '<option value="0">Klasický</option>'. 22 '<option value="1">Rozšíření TBC</option>'. 23 '<option value="2">Rozšíření WoTLK</option>'. 24 '</select></td></tr>'. 25 '<tr><td>Pravidla <a href="'.$Config['Web']['BaseURL'].'forum/viewtopic.php?f=11&t=2066">ČTI</a></td><td>Souhlasím <input type="checkbox" name="agree" value="on" /></td><td></td></tr>'. 26 '<tr><td></td><td><input type="submit" value="Registrovat" /></td></tr></table>'. 27 '</form>'. 28 '<br />'); 50 29 51 if ($account == "" || $password1 == "" || $password2 == "" || $email="" || $expansion="" || $agree=""): 52 echo "<h10>Je nutno vyplnit všechny údaje</h10>"; 53 echo "<p>"; 54 echo "<h11>Registrace otevřeny</h11>"; 55 else: 30 $db->select_db($Config['Mangos']['DatabaseRealmd']); 31 $DbResult = $db->query('SELECT COUNT(*) FROM `account`'); 32 if($DbResult->num_rows >= $Config['Mangos']['MaxAccountCount']) 33 { 34 echo('<div class="h10">Registrace jsou uzavřeny</div>'); 35 echo('<div class="h11">Limit vyčerpán</div>'); 36 } else 37 { 38 echo('<div class="h11">Registrace otevřeny</div>'); 56 39 57 if ($password1 != $password2): 58 echo "Zadaná hesla se neshodují"; 59 60 else: 61 $password = $password1; 62 $account = strtoupper($account); 63 $heslo = sha_password($account, $password); 40 $account = addslashes($_POST['account']); 41 $password1 = addslashes($_POST['heslo1']); 42 $password2 = addslashes($_POST['heslo2']); 64 43 $email = addslashes($_POST['email']); 65 44 $expansion = addslashes($_POST['expansion']); 66 $dbconn = mysql_connect($db_server, $db_user, $db_pass) or die ("Spojení nebylo uspěšné"); 67 mysql_select_db($db_realmd, $dbconn) or die ("Nepovedlo se vybrat databázy $realmd"); 68 $acc_dotaz_sql = "SELECT id, username, sha_pass_hash FROM account WHERE username='".$account."'"; 69 $acc_dotaz_sql_vysledek = mysql_query($acc_dotaz_sql, $dbconn); 70 $row = mysql_fetch_array($acc_dotaz_sql_vysledek); 71 72 if ($row["id"] != ""): 73 echo "Účet již existuje"; 74 75 else: 45 $agree = addslashes($_POST['agree']); 76 46 77 mysql_select_db($db_realmd, $dbconn) or die ("Nepovedlo se vybrat databázy $characters"); 78 79 $sqlko = "INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`expansion`) values ('$account','$heslo','$email','$expansion')"; 80 81 mysql_query($sqlko, $dbconn) or die ('něco nevyšlo v querry'); 82 echo "Účet $character byl vytvořen!"; 83 84 endif; 85 mysql_close(); 86 endif; 87 endif; 47 echo('<br />'); 88 48 49 if(($account == '') or ($password1 == '') or ($password2 == '') or ($email == '') or ($expansion == '') or ($agree == '')) 50 { 51 echo('<div class="h10">Je nutno vyplnit všechny údaje</div>'); 52 } else 53 { 54 if($password1 != $password2) echo('Zadaná hesla se neshodují'); 55 else 56 { 57 $password = $password1; 58 $account = strtoupper($account); 59 $heslo = sha_password($account, $password); 60 $email = addslashes($_POST['email']); 61 $expansion = addslashes($_POST['expansion']); 62 63 $DbResult = $db->query('SELECT `id`, `username`, `sha_pass_hash` FROM `account` WHERE `username`="'.$account.'"'); 64 if($DbResult->num_rows > 0) 65 { 66 echo('<div class="h10">Účet již existuje</div>'); 67 } else 68 { 69 $DbResult = $db->query('INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`expansion`) values ("'.$account.'","'.$heslo.'","'.$email.'","'.$expansion.'")'); 70 echo($db->error); 71 echo('<div class="h10">Účet '.$account.' byl vytvořen!</div>'); 72 } 73 } 74 } 89 75 } 76 echo('</div><p></p>'); 77 90 78 ?> 91 </strong></table></td></tr></table>92 <? echo('<center><br><br><br><a href="http://wow.zdechov.net/?page=acc">Úprava Profilu</a><br/></center>'); ?> -
trunk/pages/server.php
r571 r576 8 8 <tr> 9 9 <td>Herní server je</td> 10 <td>'.$server->ServerImg($server->ServerOnline( 'wow.zdechov.net', 8085)).'</td>10 <td>'.$server->ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 8085)).'</td> 11 11 </tr> 12 12 … … 29 29 <tr> 30 30 <td><a href="?page=teamspeak">TeamSpeak</a> server je</td> 31 <td>'.$server->ServerImg($server->ServerOnline( 'game.zdechov.net', 51234)).'</td>31 <td>'.$server->ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 51234)).'</td> 32 32 </tr> 33 33 <tr> 34 34 <td><a href="http://game.zdechov.net:6969/">Torrent</a> server je</td> 35 <td>'.$server->ServerImg($server->ServerOnline( 'game.zdechov.net', 6969)).'</td>35 <td>'.$server->ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 6969)).'</td> 36 36 </tr> 37 37 <tr> -
trunk/pages/xpreset.php
r438 r576 1 1 <?php 2 $html -> PrgStart(); 3 if ($player -> Check()) 4 { 5 echo " 6 <a href=\"?page=acc\"><- Zpět do správy účtu</a>2 3 $html->PrgStart(); 4 if($player->Check()) 5 { 6 echo('<a href="?page=acc"><- Zpět do správy účtu</a> 7 7 <center><h3>Resetování XP vaší postavy</h3></center> 8 <form method= \"post\">9 <table align= \"center\">8 <form method="post"> 9 <table align="center"> 10 10 <tr> 11 11 <td> 12 Jméno postavy pro resetování XP: </td>12 Jméno postavy: </td> 13 13 <td> 14 <input type= \"text\" name=\"char\"></td>14 <input type="text" name="char"></td> 15 15 </tr> 16 16 <tr> 17 <td colspan= \"2\" align=\"right\">18 <input type= \"submit\" value=\"Resetovat\" name=\"xpreset\"></td>17 <td colspan="2" align="right"> 18 <input type="submit" value="Resetovat" name="xpreset"></td> 19 19 </tr> 20 20 </table> 21 </form> 22 "; 23 if (isset($_POST["xpreset"]) AND $_POST["char"] != "") 21 </form>'); 22 23 if(isset($_POST['xpreset']) and $_POST['char'] != '') 24 { 25 $guid = $player->CharNameToGuid($_POST['char']); 26 $player->ResetXP($guid); 27 } 28 } else 24 29 { 25 $guid = $player -> CharNameToGuid($_POST["char"]); 26 $player -> ResetXP($guid); 27 } 28 } 29 else 30 { 31 $player -> LoginForm(); 30 $player->LoginForm(); 32 31 } 33 32 34 $html -> PrgStop(); 33 $html->PrgStop(); 34 35 35 ?>
Note:
See TracChangeset
for help on using the changeset viewer.