Changeset 547 for trunk


Ignore:
Timestamp:
Mar 28, 2009, 8:49:22 PM (16 years ago)
Author:
barny
Message:

Registrace a chtyp.php predelan na WOTLK plus grafika webu

Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/pages/chtyp.php

    r489 r547  
    1 <?php
    2 $html -> PrgStart();
     1<center><div style="background-image:url(./imgs/web/prg.gif);
     2                background-repeat:repeat;
     3                width:346px;
     4                height:417px;">
     5<br><br><br><br>
     6<a href="?page=acc"><- Zpět do správy účtu </a>
     7<br><br>
     8<center><font face="Verdana" color="black" size="3"><h3>Změna typu accountu</h3></font></center>
     9<form action="" method="post"><center>
     10<table border=0>
     11<tr><td width="50px"><font face="verdana" size="2"><b>Ú&#269;et :</b></font></td>
     12<td><input type="textbox" name="aa"></td></tr>
     13<tr><td><font face="verdana" size="2"><b>Heslo :</b></font></td>
     14<td><input type="password" name="ab"></td></tr>
     15<tr><td></td><td><select name="vyber">
     16 <option value="wotlk">WotLK datadisk</option>
     17 <option value="tbc">TBC datadisk</option>
     18 <option value="wow">bez datadisku</option></select>
     19<tr><td><input type="submit" name="ac" value="odeslat"></td><td></center>
     20</form>
     21</table>
     22<?
    323
    4  if ($player -> Check())
     24include "./inc/db.php";
     25
     26if(array_key_exists("aa", $_POST))
     27if(array_key_exists("ab", $_POST))
     28if(array_key_exists("vyber", $_POST))
     29{
     30
     31$account= @$_POST['aa'];
     32$heslo= @$_POST['ab'];
     33$vyber = @$_POST['vyber'];
     34
     35if($account!="" || $heslo!="")
     36{ mysql_connect("$db_server", "$db_user", "$db_pass");
     37mysql_select_db("$db_realmd");
     38 
     39    $user2 = strtoupper($account);
     40    $pass = strtoupper($heslo);
     41    $i = SHA1($user2.':'.$pass);
     42 
     43 
     44  $data = mysql_query("select id from `$db_realmd`.`account` where username='$account' and sha_pass_hash='$i' limit 0,1");
     45 
     46  $id = mysql_fetch_array($data);
     47 
     48  if($id['id']== "")
    549  {
    6 $zmenit = $_POST['zmenit'];
    7 if($zmenit==1){
    8     include("inc/db.php");
    9     $account = $_POST['acc1'];
    10     $typ = $_POST['typ'];
    11    
     50  die("<font face=\"verdana\" size=\"2\" color=\"red\">Špatně zadané údaje accountu.</font>");
     51  }
    1252
    13     mysql_connect($db_server, $db_user, $db_pass);
    14         mysql_select_db($db_realmd);
    15         $acc_check = mysql_num_rows(mysql_query("select id from account where username='$account'"));
    16         if($acc_check!=0):
    17         $typ_update = mysql_query("update account set tbc='$typ' where username='$account'");
    18         if($typ_update):
    19         $info = "<font color=green><strong>Typ accountu byl vpořádku změněn!</strong></font>";
    20         else:
    21     $info = "<font color=red><strong>Typ accontu se nepodařilo změnit!</strong></font>";
    22         endif;
    23         else:
    24         $info = "<font color=red><b>Zadali jste neexistujici account!</b></font>";
    25         endif;
     53switch ($vyber):
     54  case wotlk:
     55  $nastaveni = "2";
     56  break;
     57  case tbc:
     58  $nastaveni = "1";
     59  break;
     60  case wow:
     61  $nastaveni = "0";
     62  break;
     63endswitch;
     64
     65$querko = mysql_query("update `account` set `expansion` = '$nastaveni' where `username` = '$account'");
     66
     67if($nastaveni == "1"){
     68
     69echo "<br /><font face=\"verdana\" size=\"2\" color=\"DarkGreen\">datadisk The Burning Crusade byl pro ú&#269;et $account úsp&#283;šn&#283; zapnut.</font><br>";
     70
     71} elseif($nastaveni == "2"){
     72
     73echo "<br /><font face=\"verdana\" size=\"2\" color=\"DarkGreen\">datadisk Wrath of the Litch King byl pro ú&#269;et $account úsp&#283;šn&#283; zapnut.</font><br>";
     74
     75} else {
     76
     77echo "<br /><font face=\"verdana\" size=\"2\" color=\"DarkGreen\">Veškeré datadisky byly pro ú&#269;et $account úsp&#283;šn&#283; vypnuty.</font><br>";
     78
     79}
     80}
    2681}
    2782
    2883
    29 echo "&nbsp;<a href=\"?page=acc\">&lt;- Zpět do správy účtu</a><br />
    30 
    31 <b>$info</b>
    32 <form method=post action=\"?page=chtyp\">
    33 <center><h3>Změna typu accountu</h3></center>
    34 
    35 <table align=\"center\">
    36  
    37       <input type=\"hidden\" name=\"acc1\" value='".$_SESSION["UserName"]."'>
    38          
    39   <tr>
    40     <td>
    41       Typ Acc : </td>
    42     <td>
    43       <select name=\"typ\">
    44           <option value=1>Normální WoW
    45           <option value=2>Datadisk The Buning Crusade
    46           </select></td>
    47   </tr>
    48   <tr>
    49     <td colspan=\"2\" align=\"right\">
    50         <input type=hidden name=zmenit value='1'>
    51       <input type=\"submit\" value=\"Změnit\" name=\"change\"></td>
    52   </tr>
    53 </table>
    54 </form>
    55 ";
    56 }
    57 else
    58 {
    59 $player -> LoginForm();
    60 }
    61 
    62 $html -> PrgStop();
    6384?>
     85</div>
  • trunk/pages/gmlog.php

    r528 r547  
    1 
    2 
    3 <?php
     1<?php
    42$gmlog = "/a/mangos1/logs/GM_Commands.log"; //CESTA K GM LOGU
    53$config = "../gh_system/conn.php"; //CESTA KE CONN.PHP
     
    1614$radku = count($data);
    1715$i = 0;
    18 
     16echo "<br>";
    1917
    2018while($i < $pocet_radku){
  • trunk/pages/guilda.php

    r407 r547  
    5656  {
    5757   
    58     $query = $db -> query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE `guid` = '".$member[0]."' LIMIT 1;");
     58    $query = $db -> query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 53+1), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE `guid` = '".$member[0]."' LIMIT 1;");
    5959    $online = $query -> fetch_array();
    6060          $accid = $online["account"];
  • trunk/pages/register.php

    r546 r547  
    44
    55<table align="center" width="520">
    6           <tr><th align="center"><img src="./imgs/logoreg.png" alt="Registrace"></th></tr>
    7           <tr><th align="center"><img src="./imgs/textreg.png" alt="Registrace"></th></tr>
     6          <tr><th align="center"><img src="./imgs/logoreg.png"</th></tr>
     7          <tr><th align="center"><img src="./imgs/textreg.png"</th></tr>
    88          <tr><td align="center"><br>
    99         
     
    1616<tr><td>Typ účtu</td><td><select name="expansion">
    1717      <option value="">-- vyber typ účtu --</option>
    18       <option value="0">bez datadisku</option>
    19       <option value="1">s datadiskem TBC</option>
    20      
     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>
    2122<tr><td></td><td><input type="submit" Value="Registrovat"></td></tr>
    2223</form>
     
    3334echo "<h11>Limit vyčerpán</h11>";
    3435} else {
    35 
    3636$account = addslashes($_POST['account']);
    3737$password1 = addslashes($_POST['heslo1']);
     
    4949echo "<br>";
    5050
    51 if ($account == "" || $password1 == "" || $password2 == "" || $email="" || $expansion=""):
     51if ($account == "" || $password1 == "" || $password2 == "" || $email="" || $expansion="" || $agree=""):
    5252echo "<h10>Je nutno vyplnit všechny údaje</h10>";
    5353echo "<p>";
  • trunk/pages/server.php

    r504 r547  
    44$server_setings = array
    55(
    6   "mangos" => " MaNGOS rev. 7460",
    7   "udb" => "UDB 0.11.0 rev. 369",
    8   "sd2" => "ScriptDev2 rev. 902",
     6  "mangos" => " MaNGOS rev. 7528",
     7  "udb" => "UDB 0.11.0 rev. 370",
     8  "sd2" => "ScriptDev2 rev. 912",
    99);
    1010
  • trunk/styles/style.css

    r407 r547  
    22body {
    33height: 100%;
     4background-image: url(../imgs/web/bg.jpg);
     5background-repeat: repeat-x;
    46background-color: black;
    57margin-top: -10px;
Note: See TracChangeset for help on using the changeset viewer.