Changeset 581


Ignore:
Timestamp:
Apr 30, 2009, 1:28:25 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Chybová některých chybových hlášení.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r578 r581  
    9595    else include_once('pages/main.php');
    9696}
    97 echo('</div><div id="footer"><br /><div id="copyright"><a href="?page=autori">Vývoj webu</a></div></div>');
     97echo('</div><div id="footer"><br /><div id="copyright"><a href="?page=autori">Vývoj webu</a></div></div></div>');
    9898
    9999$html->Stop();
  • trunk/pages/chmeil.php

    r489 r581  
    11<?php
    2 $html -> PrgStart();
    3  
    4  if ($player -> Check())
     2
     3$info = '';
     4$html->PrgStart();
     5if($player->Check())
     6{
     7  if(array_key_exists('zmenit', $_POST) and ($_POST['zmenit'] == 1))
    58  {
    6 
    7 $zmenit = $_POST['zmenit'];
    8 if($zmenit==1){
    9     include("inc/db.php");
    109    $account = $_POST['acc1'];
    1110    $email1 = $_POST['email1'];
    1211    $email2 = $_POST['email2'];
    1312
    14     mysql_connect($db_server, $db_user, $db_pass);
    15         mysql_select_db($db_realmd);
    16         $email_check = mysql_num_rows(mysql_query("select id from account where username='$account' and email='$email1'"));
    17         if($email_check!=0):
    18         $email_update = mysql_query("update account set email='$email2' where username='$account'");
    19         if($email_update):
    20         $info = "<font color=green><strong>Email byl vpořádku změněn!</strong></font>";
    21         else:
    22     $info = "<font color=red><strong>Email se nepodařilo změnit!</strong></font>";
    23         endif;
    24         else:
    25         $info = "<font color=red><b>Zadali jste špatný stávající email nebo neexistující account!</b></font>";
    26         endif;
    27 }
     13          $db->select_db($Config['Mangos']['DatabaseRealmd']);
     14    $DbResult = $db->query('select id from account where username="'.$account.'" and email="'.$email1.'"');
     15          if($DbResult->num_rows > 0)
     16    {
     17            $email_update = $db->query('update account set email="'.$email2.'" where username="'.$account.'"');
     18            if($email_update)
     19      {
     20              $info = '<font color="green"><strong>Email byl vpořádku změněn!</strong></font>';
     21            } else
     22      {
     23        $info = '<font color="red"><strong>Email se nepodařilo změnit!</strong></font>';
     24            }
     25          } else $info = '<font color=red><b>Zadali jste špatný stávající email nebo neexistující účet!</b></font>';
     26  }
    2827
    2928
    30 echo "&nbsp;<a href=\"?page=acc\">&lt;- Zpět do správy účtu</a><br />
     29  echo('&nbsp;<a href="?page=acc">&lt;- Zpět do správy účtu</a><br />');
    3130
    32 <b>$info</b>
    33 <form method=post action=\"?page=chmeil\">
     31  echo('<b>'.$info.'</b>
     32<form method="post" action="?page=chmeil">
    3433<center><h3>Změna e-mailu</h3></center>
    3534
    36 <table align=\"center\">
    37  <input type=\"hidden\" name=\"acc1\" value='".$_SESSION["UserName"]."'>
     35<table align="center">
     36 <input type="hidden" name="acc1" value="'.$_SESSION['UserName'].'" />
    3837  <tr>
    3938    <td>
    4039      Starý e-mail : </td>
    4140    <td>
    42       <input type=\"text\" name=\"email1\" autocomplete=\"off\"></td>
     41      <input type="text" name="email1" autocomplete="off" /></td>
    4342  </tr>
    4443  <tr>
     
    4645      Nový e-mail : </td>
    4746    <td>
    48       <input type=\"text\" name=\"email2\" autocomplete=\"off\"></td>
     47      <input type="text" name="email2" autocomplete="off" /></td>
    4948  </tr>
    5049  <tr>
    51     <td colspan=\"2\" align=\"right\">
    52         <input type=hidden name=zmenit value='1'>
    53       <input type=\"submit\" value=\"Změnit\" name=\"change\"></td>
     50    <td colspan="2" align="right">
     51        <input type="hidden" name=zmenit value="1" />
     52      <input type="submit" value="Změnit" name="change" /></td>
    5453  </tr>
    5554</table>
    56 </form>
    57 ";
     55</form>');
     56} else
     57{
     58  $player->LoginForm();
    5859}
    59 else
    60 {
     60$html->PrgStop();
    6161
    62 $player -> LoginForm();
    63 
    64 }
    65 $html -> PrgStop();
    6662?>
  • trunk/pages/chpass.php

    r489 r581  
    11<?php
    2 $html -> PrgStart();
    32
    4  if ($player -> Check())
     3$info = '';
     4$html->PrgStart();
     5if($player->Check())
     6{
     7  if(array_key_exists('zmenit', $_POST) and ($_POST['zmenit'] == 1))
    58  {
    6 $zmenit = $_POST['zmenit'];
    7 if($zmenit==1){
    8     include("inc/db.php");
    99    $account = $_POST['acc1'];
    1010    $heslo1 = $_POST['heslo1'];
    11         $heslo2 = $_POST['heslo2'];
    12         $heslo3 = $_POST['heslo3'];
     11        $heslo2 = $_POST['heslo2'];
     12          $heslo3 = $_POST['heslo3'];
    1313   
    14 if(empty($account) OR empty($heslo1) OR empty($heslo2) OR empty($heslo3)):
    15 $info = "<font color=red><strong>Nevyplnil jste všechna políčka!</strong></font>";
    16 else:
    17     mysql_connect($db_server, $db_user, $db_pass);
    18         mysql_select_db($db_realmd);
    19         $acc_check = mysql_num_rows(mysql_query("select id from account where username='$account' and sha_pass_hash=SHA1(CONCAT(UPPER('$account'),':',UPPER('$heslo1')))"));
    20         if($acc_check!=0):
    21         if($heslo2==$heslo3):
    22         $pass_update = mysql_query("update account set sha_pass_hash=SHA1(CONCAT(UPPER('$account'),':',UPPER('$heslo2'))) where username='$account'");
    23         if($pass_update):
    24         $info = "<font color=green><strong>Heslo bylo vpořádku změněno!</strong></font>";
    25         else:
    26     $info = "<font color=red><strong>Heslo se nepodařilo změnit!</strong></font>";
    27         endif;
    28         else:
    29         $info = "<font color=red><b>Hesla se neshodují!</b></font>";
    30         endif;
    31         else:
    32         $info = "<font color=red><b>Zadali jste neexistujici account nebo špatné heslo!</b></font>";
    33         endif;
    34 endif;
    35 }
     14    if(empty($account) OR empty($heslo1) OR empty($heslo2) OR empty($heslo3)) $info = '<font color=red><strong>Nevyplnil jste všechna políčka!</strong></font>';
     15    else   
     16    {
     17      $db->select_db($Config['Mangos']['DatabaseRealmd']);
     18      $DbResult = $db->query('SELECT id FROM account WHERE username="'.$account.'" and sha_pass_hash=SHA1(CONCAT(UPPER("'.$account.'"),":",UPPER("'.$heslo1.'")))');
     19            if($DbResult->num_rows > 0)
     20      {
     21              if($heslo2 == $heslo3)
     22        {
     23                $pass_update = $db->query('update account set sha_pass_hash=SHA1(CONCAT(UPPER("'.$account.'"), ":", UPPER("'.$heslo2.'"))) where username="'.$account.'"');
     24                if($pass_update) $info = '<font color="green"><strong>Heslo bylo vpořádku změněno!</strong></font>';
     25                else $info = '<font color="red"><strong>Heslo se nepodařilo změnit!</strong></font>';
     26              } else $info = '<font color="red"><b>Hesla se neshodují!</b></font>';     
     27            } else $info = '<font color="red"><b>Zadali jste neexistujici účet nebo špatné heslo!</b></font>';     
     28    }
     29  }
    3630
     31  echo('&nbsp;<a href="?page=acc">&lt;- Zpět do správy účtu</a><br />
    3732
    38 echo "&nbsp;<a href=\"?page=acc\">&lt;- Zpět do správy účtu</a><br />
     33<b>'.$info.'</b>
     34<form method="post" action="?page=chpass">
     35<center><h3>Změna typu účtu</h3></center>
    3936
    40 <b>$info</b>
    41 <form method=post action=\"?page=chpass\">
    42 <center><h3>Změna typu accountu</h3></center>
    43 
    44 <table align=\"center\">
    45   <input type=\"hidden\" name=\"acc1\" value='".$_SESSION["UserName"]."'>
     37<table align="center">
     38  <input type="hidden" name="acc1" value="'.$_SESSION['UserName'].'" />
    4639  <tr>
    4740    <td>
    48       Momentální Heslo : </td>
     41      Momentální Heslo: </td>
    4942    <td>
    50      <input type=\"password\" name=\"heslo1\"></td>
     43     <input type="password" name="heslo1" /></td>
    5144  </tr>
    5245   <tr>
     
    5447      Nové Heslo : </td>
    5548    <td>
    56      <input type=\"password\" name=\"heslo2\"></td>
     49     <input type="password" name="heslo2" /></td>
    5750  </tr>
    5851   <tr>
     
    6053      Nové Heslo podruhé : </td>
    6154    <td>
    62      <input type=\"password\" name=\"heslo3\"></td>
     55     <input type="password" name="heslo3" /></td>
    6356  </tr>
    6457  <tr>
    65     <td colspan=\"2\" align=\"right\">
    66         <input type=hidden name=zmenit value='1'>
    67       <input type=\"submit\" value=\"Změnit\" name=\"change\"></td>
     58    <td colspan="2" align="right">
     59        <input type="hidden" name="zmenit" value="1" />
     60      <input type="submit" value="Změnit" name="change"></td>
    6861  </tr>
    6962</table>
    70 </form>
    71 ";
     63</form>');
    7264}
    73 else
    74 {
     65else $player->LoginForm();
     66$html->PrgStop();
    7567
    76 $player -> LoginForm();
    77 
    78 }
    79 
    80 $html -> PrgStop();
    8168?>
  • trunk/pages/webconfig.php

    r579 r581  
    11<?php
    2 $html->PrgStart();
    3 echo('&nbsp;<a href="?page=acc">&lt;- Zpět do správy účtu</a>');
    42
     3$year = 7 * 24 * 60 * 60;
    54if(isset($_POST['save']))
    65{
    7   $year = 7 * 24 * 60 * 60;
    86  setcookie('hof-random', $_POST['random'], time() + $year);
    97  setcookie('hof-widget', $_POST['widget'], time() + $year);
     
    1917function Check($value, $option)
    2018{
     19  global $year;
     20 
    2121  if(!isset($_COOKIE['hof-'.$value]) or $_COOKIE['hof-'.$value] == '')
    2222  {
     
    3737        break;
    3838    }
    39     $year = 7 * 24 * 60 * 60;
    4039    setcookie('hof-'.$value, $default, time() + $year);
    4140    $msg = '<center><b>Nahrávám základní nastavení</b></center><br />
     
    4443  if(isset($_COOKIE['hof-'.$value]) and $_COOKIE['hof-'.$value] == $option)
    4544  {
    46     return('checked="checked" ');
     45    return(' checked="checked"');
    4746  }
    4847}
    49 echo('<form method="post">
     48$Output ='<form method="post">
    5049<div align="left">
    5150  <b>Náhodný obrázek v hlavičce stránky.</b><br />
    52   Ano <input type="radio" name="random" value="yes"'.Check('random', 'yes').'>
    53   Ne <input type="radio" name="random" value="no"'.Check('random','no').'>
     51  Ano <input type="radio" name="random" value="yes"'.Check('random', 'yes').' />
     52  Ne <input type="radio" name="random" value="no"'.Check('random','no').' />
    5453  <br />
    5554  <b>Preferovaný tooltip</b><br />
    56   Wowhead <input type="radio" name="widget" value="wowhead"'.Check('widget', 'wowhead').'>
    57   Thottbot <input type="radio" name="widget" value="thottbot"'.Check('widget', 'thottbot').'>
     55  Wowhead <input type="radio" name="widget" value="wowhead"'.Check('widget', 'wowhead').' />
     56  Thottbot <input type="radio" name="widget" value="thottbot"'.Check('widget', 'thottbot').' />
    5857  <br />
    5958  <b>Rychlý přehled</b><br />
    60   Ano <input type="radio" name="quick" value="yes"'.Check('quick', 'yes').'>
    61   Ne <input type="radio" name="quick" value="no"'.Check('quick', 'no').'>
     59  Ano <input type="radio" name="quick" value="yes"'.Check('quick', 'yes').' />
     60  Ne <input type="radio" name="quick" value="no"'.Check('quick', 'no').' />
    6261  <br />
    6362  <b>Zobrazovat web</b><br />
    64   Web 1.0 (původní menu vlevo) <input type="radio" name="web" value="1"'.Check('web', 1).'><br />
    65   Web 2.0 (nový menu vpravo) <input type="radio" name="web" value="2"'.Check('web', 2).'>
     63  Web 1.0 (původní menu vlevo) <input type="radio" name="web" value="1"'.Check('web', 1).' /><br />
     64  Web 2.0 (nový menu vpravo) <input type="radio" name="web" value="2"'.Check('web', 2).' />
    6665<br />
    6766<input type="submit" value="Uložit" name="save">
    68 </form>'.$msg.'</div>');
     67</form>'.$msg.'</div>';
    6968
     69$html->PrgStart();
     70echo('&nbsp;<a href="?page=acc">&lt;- Zpět do správy účtu</a>');
     71echo($Output);
    7072$html->PrgStop();
    7173
  • trunk/styles/style.css

    r576 r581  
    180180  margin-right: auto;
    181181  text-align: center;
    182   border-width: 2px;
    183   border-style: solid;
     182  border-width: 2px 2px 2px 2px;
     183  border-style: solid;
     184  border-color: black;
    184185}
    185186
    186187.gmlog th
    187188{
    188   border-width: 1px;
    189   border-style: solid;
     189  border-width: 1px 1px 1px 1px;
     190  border-style: solid;
     191  border-color: black;
    190192}
    191193
     
    193195{
    194196  text-align: center;
    195   border-width: 1px;
    196   border-style: solid;
     197  border-width: 1px 1px 1px 1px;
     198  border-style: solid;
     199  border-color: black;
    197200}
    198201
Note: See TracChangeset for help on using the changeset viewer.