Changeset 576 for trunk/inc/html.php


Ignore:
Timestamp:
Apr 29, 2009, 8:02:38 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Kód a styl stránky registrace účtů.
  • Opraveno: Třídat player byla pročištěna a opravena pro kompatibilitu s konfiguračním souborem config.php a nastavením názvů databází.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/html.php

    r555 r576  
    66  private $db;
    77
    8   public function __construct($values,$db)
     8  public function __construct($values, $db)
    99  {
    1010    $this->db = &$db;
     
    104104    $anti_ref = array
    105105    (
    106       "server" => 5,
    107       "events" => 2,
    108       "aukce" => 2,
    109       "gmlog" => 300,
    110       "online" => 2,
     106      'server' => 5,
     107      'events' => 2,
     108      'aukce' => 2,
     109      'gmlog' => 300,
     110      'online' => 2,
    111111    );
    112     $site_show = "./".$dir_pages."/".$get.".php";
     112    $site_show = $dir_pages.'/'.$get.'.php';
    113113    if(isset($anti_ref[$get]))
    114114    {
     
    120120      {
    121121        $this->RefreshMsg($this -> Antirefresh($anti_ref[$get], $get), $get);
    122         return("./".$dir_pages."/free.php");
    123       }
    124     } else
    125     {
    126       if($site_show != "" AND is_readable($site_show)) return($site_show);
    127         else return("./".$dir_pages."/".$def.".php");
     122        return($dir_pages.'/free.php');
     123      }
     124    } else
     125    {
     126      if($site_show != '' AND is_readable($site_show)) return($site_show);
     127        else return($dir_pages.'/'.$def.'.php');
    128128    }
    129129  }
     
    132132  {
    133133    $hash = md5($page);
    134     if(isset($_SESSION["rf".$hash."rsh"]))
    135     {
    136       $refresh = $_SESSION["rf".$hash."rsh"] + $value;
     134    if(isset($_SESSION['rf'.$hash.'rsh']))
     135    {
     136      $refresh = $_SESSION['rf'.$hash.'rsh'] + $value;
    137137      if(time() < $refresh)
    138138      {
     
    141141      }
    142142    }
    143     $_SESSION["rf".$hash."rsh"] = time();
     143    $_SESSION['rf'.$hash.'rsh'] = time();
    144144  }
    145145
     
    150150      if($dif > 60)
    151151      {
    152         $dif = round($dif / 60)." min";
     152        $dif = round($dif / 60).' min';
    153153        $refresh = 30;
    154154      } else
    155155      {
    156         $dif = $dif." s";
     156        $dif = $dif.' s';
    157157        $refresh = 2;
    158158      }
    159       echo("<center><h3>Refresh omezení</h3></center>
     159      echo('<center><h3>Refresh omezení</h3></center>
    160160          Stránka nepovoluje tak krátký čas pro refresh (znovunačtení).<br />
    161           Další načtení stránky <b>?page=".$get."</b> bude možné za <b>".$dif."</b>.<br />
     161          Další načtení stránky <b>?page='.$get.'</b> bude možné za <b>'.$dif.'</b>.<br />
    162162          Pokud tento čas vyčkáte budete přesměrován automaticky !
    163          <meta http-equiv=\"refresh\" content=\"".$refresh.";url=\">");
     163         <meta http-equiv="refresh" content="'.$refresh.';url=">');
    164164    }
    165165  }
     
    167167  public function PrgStart()
    168168  {
    169     echo("<table align=\"center\" width=\"346\" height=\"417\" border=\"0\" style=\"background-image: url(imgs/web/prg.gif);\">
    170           <tr height=\"80\">
    171             <td width=\"20\"></td>
    172             <td align=\"center\">
     169    echo('<table align="center" width="346" height="417" border="0" style="background-image: url(imgs/web/prg.gif);">
     170          <tr height="80">
     171            <td width="20"></td>
     172            <td align="center">
    173173            <h3>Správa účtu</h3>
    174174            </td>
    175             <td width=\"20\"></td>
     175            <td width="20"></td>
    176176          </tr>
    177177          <tr>
    178             <td width=\"20\"></td>
    179             <td align=\"center\" valign=\"top\">"); 
     178            <td width="20"></td>
     179            <td align="center" valign="top">'); 
    180180  }
    181181
    182182  public function PrgStop()
    183183  {
    184     echo("</td>
    185         <td width=\"20\"></td>
     184    echo('</td>
     185        <td width="20"></td>
    186186      </tr>
    187       <tr height=\"30\">
    188         <td width=\"20\"></td>
     187      <tr height="30">
     188        <td width="20"></td>
    189189        <td></td>
    190         <td width=\"20\"></td>
     190        <td width="20"></td>
    191191      </tr>
    192       </table>");
     192      </table>');
    193193  }
    194194
    195195  public function ShowNews($kategorie)
    196196  {
    197           include("inc/db.php");
     197          include('inc/db.php');
    198198                global $db_webu;
    199199               
     
    286286  function QuickNew()
    287287  {
    288     global $server;
    289 
    290     if(isset($_COOKIE["hof-quick"]) AND $_COOKIE["hof-quick"] == "no")
     288    global $server, $Config;
     289
     290    if(isset($_COOKIE['hof-quick']) AND $_COOKIE['hof-quick'] == 'no')
    291291    {
    292292    } else
     
    299299        '<tr>'.
    300300        '<td colspan="2">'.
    301         '<strong>Server : </strong>'.$server->ServerImg($server->ServerOnline('wow.zdechov.net', 8085)).'<b> (<a href="?page=online">'.$server->MangosOnline().' hráčů</a>) | Patch 3.0.9 | <a href="http://wow.zdechov.net/pages/realmlist.wtf">Realmlist</a> | Více info <a href="?page=server">zde</a></b>'.
     301        '<strong>Server : </strong>'.$server->ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 8085)).'<b> (<a href="?page=online">'.$server->MangosOnline().' hráčů</a>) | Patch '.$Config['Mangos']['ClientVersion'].' | <a href="'.$Config['Web']['BaseURL'].'/pages/realmlist.wtf">Realmlist</a> | Více info <a href="?page=server">zde</a></b>'.
    302302        '</td></tr></table><br />');
    303303    }
Note: See TracChangeset for help on using the changeset viewer.