Changeset 109 for db


Ignore:
Timestamp:
Oct 14, 2007, 1:35:47 PM (17 years ago)
Author:
hosiplan
Message:

+ možnost přihlásit se jako v minimanageru tzn. na herní ACC
+ jednoduchá administrace
+ správa bugů z bugreporter
+ export characteru
+ hledání creepů + jejich drop
+ úprava databáze

Location:
db
Files:
9 added
12 edited

Legend:

Unmodified
Added
Removed
  • db/config.sample.php

    r102 r109  
    2222    'Description' => 'Neoficiální herní server hry World of Warcraft',
    2323    'Title' => 'Heroes of Fantasy - Databáze',
     24    'Abbr' => 'HoF',
    2425    'Admin' => 'Chronos',
    2526    'SubAdmin' => 'HosipLan',
     
    3132$Database = array(
    3233  'class' => array(
    33     1 => "",
    34     2 => ""
     34    1 => "Warrior",
     35    2 => "Paladin",
     36    3 => "Hunter",
     37    4 => "Rogue",
     38    5 => "Priest",
     39    6 => "",
     40    7 => "Shaman",
     41    8 => "Mage",
     42    9 => "Warlock",
     43    10 => "",
     44    11 => "Druid"
    3545    ),
    36   'race' => array(
    37     1 => "",
    38     2 => ""
     46  'race' => array(
     47    1 => "Human",
     48    2 => "Orc",
     49    3 => "Dwarf",
     50    4 => "Night Elf",
     51    5 => "Undead",
     52    6 => "Tauren",
     53    7 => "Gnome",
     54    8 => "Troll",
     55    9 => "",
     56    10 => "Blood Elf",
     57    11 => "Dranei"
    3958    ),
    4059  'item' => array(
     
    4665    2 => ""
    4766    ),
     67  'creep' => array(
     68    'type' => array(
     69      1 => "Beast",
     70      2 => "Dragonkin",
     71      3 => "Demon",
     72      4 => "Elemental",
     73      5 => "Giant",
     74      6 => "Undead",
     75      7 => "Humanoid",
     76      8 => "Critter",
     77      9 => "Mechanical",
     78      10 => "Not specified",
     79      11 => "Totem" ),
     80    )
    4881);
    4982
  • db/css/css.php

    r76 r109  
    55
    66readfile("zakladni_css.css");
     7readfile("horiz-menu_css.css");
    78readfile("cotojatka.css");
    89
  • db/css/zakladni_css.css

    r92 r109  
    1515
    1616h1, h2, h3, h4, h5, h6   {
    17         font-size: 18px;
     17        font-size: 16px;
    1818        font-weight: bold;
    19         text-decoration: underline;
    2019  margin-top: 5px; margin-bottom: 5px;
    21   padding-left: 30px; }
    22 h2   { font-size: 17px; }
    23 h3   { font-size: 16px; }
     20  padding-left: 20px; }
     21h2   { font-size: 16px; }
     22h3   { font-size: 15px; }
    2423h4   { font-size: 15px; }
    2524h5   { font-size: 14px; }
    26 h6   { font-size: 13px; }
     25h6   { font-size: 14px; }
    2726
    2827h3.dkc {
     
    4342input {
    4443  display: inline;
    45   background: white; }
     44  border: 1px solid black;
     45  background: white;
     46  color: black; }
    4647input.hidden {
    4748  display: none; }
     
    7677  color: #000000;
    7778  text-decoration: none; background-color: #ffffff; }
     79a.graylink { font-weight: bold; padding: 1px; color: gray; text-decoration: none; }
     80a.whitelink { font-weight: bold; padding: 1px; color: white; text-decoration: none; }
     81a.whitelink:hover { color: black; }
     82a.greenlink { font-weight: bold; padding: 1px; color: #23e64c; text-decoration: none; }
     83a.bluelink { font-weight: bold; padding: 1px; color: #239fe6; text-decoration: none; }
     84a.purplelink { font-weight: bold; padding: 1px; color: #ba55d3; text-decoration: none; }
     85a.orangelink { font-weight: bold; padding: 1px; color: #e6b623; text-decoration: none; }
     86a.redlink { font-weight: bold; padding: 1px; color: #e62323; text-decoration: none; }
    7887
    7988#center {
     
    98107  float: left;
    99108  width: 120px; }
    100 #left ul {
    101   display: block; }
    102 #left ul li {
     109#left ul#hlavni_menu {
     110  display: block;
     111  margin-bottom: 25px; }
     112#left ul#hlavni_menu li {
    103113  display: block;
    104114  overflow: hidden;
    105115  list-style-type: none; }
    106 #left ul li a {
     116#left ul#hlavni_menu li a {
    107117  display: block;
    108118  width: 100%;
     
    113123  text-decoration: none;
    114124  background-color: #e0e0e0; }
    115 #left ul li a:hover {
     125#left ul#hlavni_menu li a:hover {
    116126  color: #ffffff;
    117127  background-color: #545454; }
    118 #left ul li ul {
     128#left ul#hlavni_menu li ul {
    119129  display: block; }
    120 #left ul li ul li {
     130#left ul#hlavni_menu li ul li {
    121131  display: block;
    122132  border: 0px;
    123133  overflow: hidden;
    124134  list-style-type: none; }
    125 #left ul li  ul li a {
     135#left ul#hlavni_menu li  ul li a {
    126136  display: block;
    127137  width: 100%;
     
    131141  color: #ffffff;
    132142  background-color: #000000; }
    133 #left ul li ul li .search {
     143#left ul#hlavni_menu li ul li .search {
    134144  width: 110px;
    135145  border: 1px solid white;
     
    162172  padding: 8px; }
    163173#right p {
    164   margin-bottom: 8px; }
     174  margin-top: 2px;
     175  margin-bottom: 6px; }
    165176#right .back {
    166177  display: block;
     
    207218  border-right: 0px;
    208219  border-bottom: 2px solid white; }
     220#right table#quest table#drop td {
     221  border-bottom:1px solid white; }
     222#right table#quest table#drop thead td {
     223  padding-top: 3px;
     224  border-bottom: 2px solid white; }
    209225#right table#quest table td {
    210226  border: 0px; }
     
    228244  border: 0px; }
    229245#right table#sendbug td.text {
    230   overflow-x: auto;
     246  overflow: auto;
    231247  padding:4px;
    232248  border: 1px solid white; }
     249#right table#login {
     250  empty-cells: show;
     251  margin-top: 15px;
     252  text-align: left;
     253  border: 0px; }
     254#right table#login input {
     255  display: inline;
     256  border: 1px solid white;
     257  background: black;
     258  color: white; }
     259#right table#acc {
     260  display: block;
     261  width: 60%;
     262  empty-cells: show;
     263  margin-top: 15px;
     264  text-align: left;
     265  border: 1px solid white; }
     266#right table#acc td {
     267  padding: 5px; }
     268#right table#acc h2 {
     269  margin: 0px;
     270  padding-left: 10px; }
     271
    233272
    234273#pata {
  • db/databaze_tabulky/sql.sql

    r92 r109  
    2121
    2222CREATE TABLE `bug_report` (
    23   `id` int(11) unsigned NOT NULL auto_increment,
    24   `nick` varchar(50) NOT NULL,
    25   `typ` varchar(250) NOT NULL,
    26   `vlozeno` bigint(20) unsigned NOT NULL,
     23  `id` int( 11 ) unsigned NOT NULL auto_increment,
     24  `nick` varchar( 50 ) NOT NULL,
     25  `typ` varchar( 250 ) NOT NULL,
     26  `vlozeno` bigint( 20 ) unsigned NOT NULL,
    2727  `popis` text NOT NULL,
    2828  `opraveno` enum('0','1') NOT NULL default '0',
    2929  `popis_opravy` text NOT NULL,
    30   `opravil` bigint(20) unsigned NOT NULL,
    31   `opravil_nick` varchar(50) NOT NULL,
     30  `opravil` bigint( 20 ) unsigned NOT NULL,
     31  `opravil_nick` varchar( 50 ) NOT NULL,
    3232  PRIMARY KEY  (`id`)
    3333) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Bug report system' AUTO_INCREMENT=1 ;
     
    4141
    4242CREATE TABLE `komentare` (
    43   `id` int(10) unsigned NOT NULL auto_increment,
    44   `vlozil` text NOT NULL,
    45   `vlozil_nick` varchar(50) NOT NULL,
    46   `prava` varchar(100) NOT NULL default 'Hráč',
    47   `kdy` text NOT NULL,
     43  `id` BIGINT( 20 ) unsigned NOT NULL auto_increment,
     44  `vlozil_nick` varchar( 50 ) NOT NULL,
     45  `prava` varchar( 100 ) NOT NULL default 'Hráč',
     46  `kdy` BIGINT( 20 ) NOT NULL,
    4847  `komentar` text NOT NULL,
    49   `ceho` text NOT NULL,
    50   `ceho_id` bigint(20) unsigned NOT NULL,
     48  `ceho` varchar( 50 ) NOT NULL,
     49  `ceho_id` BIGINT( 20 ) unsigned NOT NULL,
    5150  PRIMARY KEY  (`id`)
    5251) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
     
    6059
    6160CREATE TABLE `klice` (
    62   `id` int(10) unsigned NOT NULL auto_increment,
    63   `klic` varchar(20) NOT NULL,
     61  `id` int( 10 ) unsigned NOT NULL auto_increment,
     62  `klic` varchar( 20 ) NOT NULL,
    6463  PRIMARY KEY  (`id`),
    6564  UNIQUE KEY `klic` (`klic`)
    6665) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     66
     67--
     68-- Struktura tabulky `acc_online`
     69--
     70-- Vytvoření: Sobota 13. října 2007, 12:45
     71-- Poslední změna: Sobota 13. října 2007, 12:45
     72--
     73
     74CREATE TABLE `acc_online` (
     75`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
     76`nick` VARCHAR( 50 ) NOT NULL ,
     77`phpsession` VARCHAR( 32 ) NOT NULL ,
     78`hodnost` SMALLINT( 3 ) UNSIGNED NOT NULL ,
     79`dateoflogin` BIGINT( 20 ) UNSIGNED NOT NULL
     80) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
     81
     82--
     83-- Struktura tabulky `acc_down_char`
     84--
     85-- Vytvoření: Sobota 13. října 2007, 13:47
     86-- Poslední změna: Sobota 13. října 2007, 13:47
     87--
     88
     89CREATE TABLE `acc_down_char` (
     90`id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
     91`acc` VARCHAR( 20 ) NOT NULL ,
     92`char` VARCHAR( 20 ) NOT NULL ,
     93`date` BIGINT( 20 ) UNSIGNED NOT NULL ,
     94`ip` VARCHAR( 15 ) UNSIGNED NOT NULL
     95) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
  • db/hlavni.php

    r102 r109  
    66  <head>
    77    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    8    
    9     <meta name="Description" content="<?php echo $Config['DB_read']['Description']; ?>">
     8<?php if( $id == "logout" OR ($id == "login" AND !empty($SID) ) ){ ?>
     9    <meta http-equiv="refresh" content="2;url=./index.php?id=uvod<?php echo $SID; ?>" />
     10<?php }; ?>
     11    <meta name="Description" content="<?php echo $Config['DB_read']['DB_read']['Description']; ?>">
    1012    <meta name="robots" content="all, follow">
    1113    <link rel="stylesheet" type="text/css" href="css/css.php">
    1214    <link rel="shortcut icon" href="img/favicon.ico">
    1315    <script src="js/scripty.js" type="text/javascript"></script>
    14     <title><?php echo $Config['DB_read']['Title']; ?></title>
     16    <title><?php echo $Config['DB_read']['DB_read']['Title']; ?></title>
    1517  </head>
    1618  <body>
  • db/include/bug_report.php

    r103 r109  
    2525<?php } elseif( $id=="sendbug" ){ ?>
    2626  <?php echo $sql_insert['result']; ?>
     27  <p>Příspěvky, které se netýkají chyb v databázi, budou nemilosrdně mazány.</p>
    2728  <form action="./index.php?id=sendbug" method="post" accept-charset="utf-8">
    2829    <table id="sendbug" border="0" cellspacing="0" cellpadding="2">
  • db/include/creep.php

    r84 r109  
    22if($vlozeni_souboru == "OK"){
    33?>
     4
     5  <script type="text/javascript">
     6    function Show_drop_drop(){
     7      document.getElementById('item_drop').style.display='table';
     8      document.getElementById('item_pickpocket').style.display='none';
     9      document.getElementById('item_skin').style.display='none';
     10      };
     11    function Show_drop_pickpocket(){
     12      document.getElementById('item_drop').style.display='none';
     13      document.getElementById('item_pickpocket').style.display='table';
     14      document.getElementById('item_skin').style.display='none';
     15      };
     16    function Show_drop_skin(){
     17      document.getElementById('item_drop').style.display='none';
     18      document.getElementById('item_pickpocket').style.display='none';
     19      document.getElementById('item_skin').style.display='table';
     20      };
     21  </script>
    422
    523<?php if( empty($sql_select['error']) ){ ?>
     
    725    <tr><td width="20%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    826      <tr><td>ID Creepa: <?php echo $sql_select['creature']['entry']; ?></td></tr>
     27<?php if( $sql_select['creature']['rank'] != 3 ){ ?>
    928      <tr><td><?php echo "Level od ".$sql_select['creature']['minlevel']." do ".$sql_select['creature']['maxlevel']; ?></td></tr>
     29<?php }; ?>
     30      <tr><td>Typ: <?php echo $Database['creep']['type'][$sql_select['creature']['type']]; ?></td></tr>
     31      <tr><td style="padding-left: 15px;"><?php echo $sql_select['other']['creature_type']; ?></td></tr>
     32      <tr><td><?php echo $sql_select['creature']['maxhealth']; ?> HP</td></tr>
     33<?php if( !empty($sql_select['creature']['maxmana']) AND $sql_select['creature']['maxmana'] != 0 ){ ?>
     34      <tr><td><?php echo $sql_select['creature']['maxmana']; ?> Many</td></tr>
     35<?php }; ?>
    1036      <tr><td>Rychlost: <?php echo $sql_select['creature']['speed']."x"; ?></td></tr>
    1137<?php if( !empty($sql_select['other']['creature_quests']) ){ ?>
     
    1440<?php }; ?>
    1541    </table></td><td width="80%" style="padding-bottom:20px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    16       <p>Zde se bude zobrazovat brázek s lokací.</p>
    17     </table></td></tr><tr><td colspan='2'>
    18       <p>Zde se bude zobrazovat seznam dropú.</p>
    19     </td></tr>
     42      <p>Zde se bude zobrazovat brázek s lokací a screen creepa.</p>
     43    </table></td></tr><tr><td colspan='2'><table width="90%" id="drop" border="0" cellspacing="0" cellpadding="0">
     44        <tr><td colspan='2'><input type="radio" name="item_set_drop" onclick="Show_drop_drop();" id="item_set_drop_drop" value="item_drop" checked="true"> &nbsp; <label for="item_set_drop_drop"> Drop </label> &nbsp;
     45        <input type="radio" name="item_set_drop" onclick="Show_drop_pickpocket();" id="item_set_drop_pickpocket" value="item_pickpocket"> &nbsp; <label for="item_set_drop_pickpocket"> Pickpocket </label> &nbsp;
     46        <input type="radio" name="item_set_drop" onclick="Show_drop_skin();" id="item_set_drop_skin" value="item_skin"> &nbsp; <label for="item_set_drop_skin"> Skinning </label></td></tr>
     47        <tr><td colspan='2'><table style="width:90%;border-left:2px solid white;" id="item_drop" border="0" cellspacing="0" cellpadding="2">
     48        <thead><tr><td>Item</td><td>Šance na drop</td></tr></thead>
     49<?php echo $sql_select['other']['creature_drop']; ?>
     50        </table><noscript></td</tr><tr><td colspan='2' style="padding-top:20px;"><b>Pickpocket:</b> </td></tr><tr><td colspan='2'></noscript>
     51        <table style="width:90%;border-left:2px solid white;" id="item_pickpocket" border="0" cellspacing="0" cellpadding="2">
     52        <thead><tr><td>Item</td><td>Šance na drop</td></tr></thead>
     53<?php echo $sql_select['other']['creature_pickpocket']; ?>
     54        </table><noscript></td</tr><tr><td colspan='2' style="padding-top:20px;"><b>Skinning:</b> </td></tr><tr><td colspan='2'></noscript>
     55        <table style="width:90%;border-left:2px solid white;" id="item_skin" border="0" cellspacing="0" cellpadding="2">
     56        <thead><tr><td>Item</td><td>Šance na drop</td></tr></thead>
     57<?php echo $sql_select['other']['creature_skin']; ?>
     58        </table></td></tr>
     59    </table></td></tr>
    2060  </table>
    2161<?php } elseif( !empty($sql_select['error']) ){ ?>
     
    2363<?php }; ?>
    2464
     65<script type="text/javascript">
     66  document.getElementById('item_pickpocket').style.display='none';
     67  document.getElementById('item_skin').style.display='none';
     68</script>
    2569
    2670<?php
  • db/include/creeps.php

    r76 r109  
    33?>
    44
    5 <p>Nezprovozněno.</p>
     5  <form action=" " method="get" class="search_form">
     6  <input type="hidden" name="id" value="creeps" class="hidden">
     7  <table class="search_form" border="0" cellspacing="0" cellpadding="2">
     8    <tr><td><label for="q">Hledat:</label></td><td colspan='3'><input type="text" name="q" id="q" value="<?php echo $q; ?>"></td><td><input type="submit" value="Hledat" name="quest_find"></td></tr>
     9</table><?php if(!empty($session_id)){ ?><input type="hidden" name="PHPSESSID" value="<?php echo $session; ?>" class="hidden"><?php }; ?></form>
     10<?php if( !empty($sql_select['result']) ){ ?>
     11  <?php echo $sql_select['result']; ?>
     12<?php } elseif( !empty($sql_select['error']) ){ ?>
     13  <?php echo $sql_select['error']; ?>
     14<?php }; ?>
     15
    616
    717<?php
  • db/include/myacc.php

    r76 r109  
    11<?php
    2 if($vlozeni_souboru == "OK"){
     2if($vlozeni_souboru == "OK" AND $user['loged'] == 1 ){
    33?>
    44
    5 <p>Nezprovozněno.</p>
     5<table border="0" id="acc" cellspacing="0">
     6  <tr><td colspan='2'><h2><?php echo $user['nick']; ?></h2></td></tr>
     7  <tr><td>Oprávnění:</td><td><?php echo $sql_select['result']['other']['opravneni']; ?></td></tr>
     8  <tr><td>E-mail:</td><td><?php echo $sql_select['result']['acc']['email']; ?></td></tr>
     9  <tr><td>Typ účtu:</td><td><?php echo $sql_select['result']['other']['version']; ?></td></tr>
     10  <tr><td colspan='2' style="padding-left: 15px;border-top: 1px solid white;">
     11  <b>Postavy:</b>
     12  <?php echo $sql_select['result']['other']['chars']; ?></td></tr>
     13</table>
     14
     15<p>Pokud chcete údaje měnit musíte navštívit <a href="./../minimanager/">Minimanager</a></p>
    616
    717<?php
  • db/index.php

    r102 r109  
    66/* =========== Config aj. =========== */
    77  require_once "./config.php";
    8   require_once "./menu.php";
    9 
    10   require_once "./language/".$Config['DB_read']['language'].".php";
     8  require_once "./check_database.php";
    119
    1210/* =========== Připojení k Databázi =========== */
    13 
    1411  @mysql_connect( $Config['DB_read']['Database']['Host'], $Config['DB_read']['Database']['User'], $Config['DB_read']['Database']['Password'] )
    1512    OR DIE("<p>Vyskytla se chyba a nelze se připojit k databázi.<br> Zkuste to později.</p>");
    16   @mysql_select_db($Config['DB_read']['DB_read']['Database_mangos'])
    17     OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_mangos']."!</p>");
    18 /*  $DB_realmd = mysql_select_db($Config['DB_read']['DB_read']['Database_realmd']);
    19     if( !$DB_realmd ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>"); };
    20   $DB_web = mysql_select_db($Config['DB_read']['DB_read']['Database_web']);
    21     if( !$DB_web ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); }; */
    22   @mysql_query("SET CHARACTER SET utf8"); 
     13
     14/* =========== Login / Logout =========== */
     15  @mysql_select_db($Config['DB_read']['DB_read']['Database_realmd'])
     16    OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>");
     17  @mysql_query("SET CHARACTER SET utf8");
     18
     19  if( !empty($_POST['username']) AND !empty($_POST['pass']) ){
     20    $nick = $_POST['username'];
     21    $heslo = $_POST['pass'];
     22    $zakodovane_heslo = sha1(STRTOUPPER($nick).":".STRTOUPPER($heslo));
     23 
     24    /* přihlášení proběhne pouze pokud bylo odesláno heslo a jméno */
     25      $sql_user = @mysql_query("SELECT * FROM `account` WHERE (`username`='$nick' AND `I`='$zakodovane_heslo') LIMIT 1 ");
     26      if( mysql_num_rows($sql_user) == 1 ) {
     27        $login_info = @MySQL_Fetch_Array($sql_user);
     28
     29      @mysql_select_db($Config['DB_read']['DB_read']['Database_web'])
     30        OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>");
     31      @mysql_query("SET CHARACTER SET utf8");
     32     
     33          $sql_active_id_dotaz = @mysql_query("SELECT * FROM `acc_online` WHERE `nick`='".$login_info['username']."' LIMIT 1");
     34          if( @mysql_num_rows($sql_active_id_dotaz) == 1 ) {
     35            $active = @MySQL_Fetch_Array($sql_active_id_dotaz);
     36            } else{ unset($active); };
     37
     38          if( empty($active['id']) ){
     39            @mysql_query("INSERT INTO `acc_online` ( `nick`, `phpsession`, `hodnost`, `dateoflogin` ) VALUES ( '".$login_info['username']."', '".$session."', '".$login_info['gmlevel']."', '".time()."' )");
     40            $login_err = "Přihlášení proběhlo úspěšně.";
     41            }
     42          elseif( !empty($active['id']) ){
     43            @mysql_query("DELETE FROM `acc_online` WHERE id='".$active['id']."' LIMIT 1 ");
     44            @mysql_query("INSERT INTO `acc_online` ( `nick`, `phpsession`, `hodnost`, `dateoflogin` ) VALUES ( '".$login_info['username']."', '".$session."', '".$login_info['gmlevel']."', '".time()."' )");
     45            $login_err = "Přihlášení proběhlo úspěšně.";
     46            }
     47          else{ $login_err = "Chyba: Nelze se přihlásit! <br> Zkuste to znovu. "; };
     48
     49        }
     50      else{ $login_err = "Nejste registrovaný uživatel nebo byly špaťně zadány údaje,<br /> přihlásit se proto nemůžete! "; };
     51    }
     52    elseif( isset($_POST['login']) AND ( empty($prijaty_nick) OR empty($prijate_heslo) ) ){
     53      $login_err = "Jeden z údajů chybí! Vyplňte Prosím jméno i heslo!";
     54      };
     55
     56  @mysql_select_db($Config['DB_read']['DB_read']['Database_web'])
     57    OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>");
     58  @mysql_query("SET CHARACTER SET utf8");
     59 
     60  if( $_GET['id'] == "logout" ){
     61    session_destroy(); session_regenerate_id();
     62    @mysql_query("DELETE FROM `acc_online` WHERE `phpsession`='$session' LIMIT 1");
     63    unset($user); unset($SID);
     64    };
     65
     66  $user_sql = mysql_query("SELECT * FROM `acc_online` WHERE `phpsession`='".$session."' LIMIT 1 ");
     67  if( @mysql_num_rows($user_sql) == 1 ) {
     68    $user = @MySQL_Fetch_Array($user_sql);
     69    $user['loged'] = 1;
     70    $get = count($_GET);
     71      if( $get < 1 ){ $SID = "?PHPSESSID=".$session; }
     72      else{ $SID = "&amp;PHPSESSID=".$session; };
     73    $time_login = $user['dateoflogin']+(60*20); $time_now = time();
     74    if( $time_login <= $time_now ){ 
     75      session_destroy(); session_regenerate_id();
     76      @mysql_query("DELETE FROM `acc_online` WHERE `phpsession`='$session' LIMIT 1"); unset($user); unset($SID);
     77      } else{ mysql_query("UPDATE `acc_online` SET `dateoflogin` = '".$time_now."' WHERE `id`='".$user['id']."' LIMIT 1"); };
     78
     79    } else{ unset($user); };
     80
     81/* =========== Definice Menu =========== */
     82  $Menu = array(
     83      /*  0 => array("Typ - 1/2/3","Odkaz","Popisek");
     84      // typ: 1- kategorie
     85      //      2- položka
     86      //      3- jiné */
     87 
     88          1 => array(1,"index.php?id=uvod$SID","Hlavni"),
     89          2 => array(2,"./../","Zpět na web"),
     90          3 => array(2,"./../minimanager/","Minimanager"),
     91          4 => array(2,"./../forum/","Forum"),
     92          5 => array(2,"./../registrace/","Registrace"),
     93          6 => array(2,"./index.php?id=bugreport$SID","Hlášení chyb"),
     94  //        7 => array(2,"./index.php?id=stats$SID","Statistiky"),
     95  //        8 => array(2,"./index.php?id=races$SID","Rasy"),
     96  //        9 => array(2,"./index.php?id=classes$SID","Povolání"),
     97  //        10 => array(1,"#","Obecné Hledání"),
     98  //        11 => array(3,"<span style=\"padding-left: 5px;\">\n                <input type=\"text\" name=\"search\" maxlength=\"255\" class=\"search\" title=\"Pro Odeslání stiskněte Enter\">\n              </span>",""),
     99          );
     100  if( $user['loged'] == 1 ){
     101      $Menu_add = array(
     102          12 => array(1,"#",$user['nick']),
     103          13 => array(2,"./index.php?id=myacc$SID","Muj účet"),
     104          14 => array(2,"./../guildy.php","Guildy"),
     105          15 => array(2,"./../honor.php","Honor"),
     106          ); $Menu = array_merge($Menu, $Menu_add);
     107    if( $user['hodnost'] == 3 ){
     108      $Menu_add = array(
     109          16 => array(2,"./index.php?id=admin$SID","Administrace"),
     110          ); $Menu = array_merge($Menu, $Menu_add);
     111      };
     112      $Menu_add = array( 17 => array(2,"./index.php?id=logout$SID","Logout") ); $Menu = array_merge($Menu, $Menu_add);
     113    } else {
     114      $Menu_add = array(
     115          12 => array(1,"#","Uživatelé"),
     116          13 => array(2,"./index.php?id=login","Login"),
     117          14 => array(2,"./../guildy.php","Guildy"),
     118          15 => array(2,"./../honor.php","Honor"),
     119          ); $Menu = array_merge($Menu, $Menu_add);
     120    };
     121  $Menu_add = array(
     122  //        18 => array(1,"./index.php?id=items$SID","Itemy"),
     123  //        19 => array(2,"./index.php?id=items$SID","Hledání"),
     124  //        20 => array(2,"./index.php?id=itemsets$SID","Sety"),
     125          21 => array(1,"./index.php?id=questy$SID","Questy"),
     126          22 => array(2,"./index.php?id=questy$SID","Hledání"),
     127  //        23 => array(2,"./index.php?id=qzone$SID","Zóny"),
     128  //        24 => array(2,"./index.php?id=qtrskill$SID","Profese"),
     129  //        25 => array(2,"./index.php?id=qspecial$SID","Speciální"),
     130          26 => array(1,"./index.php?id=creeps$SID","Bestiář"),
     131          27 => array(2,"./index.php?id=creeps$SID","Hledání"),
     132  //        28 => array(2,"./index.php?id=czone$SID","Zóny"),
     133  //        29 => array(2,"./index.php?id=ctype$SID","Typy"),
     134  //        30 => array(2,"./index.php?id=crare$SID","Unikátní"),
     135  //        31 => array(1,"#","Geografie"),
     136  //        32 => array(2,"./index.php?id=glevel$SID","Podle levelu"),
     137  //        33 => array(2,"./index.php?id=gzone$SID","Zóny"),
     138  //        34 => array(1,"./index.php?id=spells$SID","Spell"),
     139  //        35 => array(2,"./index.php?id=spells$SID","Hledání"),
     140  //        36 => array(2,"./index.php?id=sclass$SID","Podle tříd"),
     141  //        37 => array(1,"./index.php?id=talents$SID","Talenty"),
     142  //        38 => array(2,"./index.php?id=talents$SID","Prohlížet"),
     143  //        39 => array(1,"./index.php?id=profes$SID","Profese"),
     144  //        40 => array(2,"./index.php?id=profes$SID","Prohlížet"),
     145  //        41 => array(2,"./index.php?id=pteach$SID","Učitelé"),
     146          );
     147  $Menu = array_merge($Menu, $Menu_add);
    23148
    24149/* =========== Speciální FCE =========== */
     
    118243    };
    119244
     245  function GenerateMenu(){
     246    global $Menu;
     247
     248    $klice = array_keys($Menu);
     249    $klice_count = count($klice);
     250
     251    for($i=0; $i <= $klice_count ;$i++){
     252        if($Menu[$klice[$i]][0] == 1){ 
     253        if( $inside_submenu == 1 ){ $Generated_Menu .= "          </ul></li>\n"; }
     254        elseif( !empty($Generated_Menu) ){ $Generated_Menu .= "</li>\n"; } unset($inside_submenu);
     255          $Generated_Menu .= "          <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a>";
     256        $submenu = 1;
     257        }
     258      elseif($Menu[$klice[$i]][0] == 2){
     259        if( $submenu == 1 ){ $Generated_Menu .= "<ul>\n"; }; unset($submenu);
     260          $Generated_Menu .= "            <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a></li>\n";
     261        $inside_submenu = 1;
     262        }
     263      elseif($Menu[$klice[$i]][0] == 3){
     264        if( $submenu == 1 ){ $Generated_Menu .= "<ul>"; }; unset($submenu);
     265          $Generated_Menu .= "          <li>".$Menu[$klice[$i]][1]."</li>\n";
     266        $inside_submenu = 1;
     267        }
     268      elseif( !empty($Menu[$klice[$i]][0]) AND !empty($Menu[$klice[$i]][1]) AND !empty($Menu[$klice[$i]][2]) ){
     269        $Generated_Menu .= "          <li><a href=\"#\">Chyba !!</a>"; }
     270      else{ $Generated_Menu .= "          </ul></li>\n"; };
     271      };
     272
     273    return $Generated_Menu;
     274    };
     275
    120276/* =========== END_TOP =========== */
    121277  $vlozeni_souboru = "OK";
     
    124280    /* =========== GET hodnoty =========== */
    125281    $id = $_GET['id']; // tady získá id z adresy
     282    $str = $_GET['str']; // tady získá str z adresy
     283    $char = $_GET['char']; // tady získá str z adresy
    126284    $q = addslashes($_GET['q']);
    127285    $limit = $_GET['list']; // tady získá list z adresy
     
    134292    $creature = addslashes($_GET['creature']);
    135293      if( is_numeric($creature) == FALSE ){ unset($creature); };
     294    $item = addslashes($_GET['item']);
     295      if( is_numeric($item) == FALSE ){ unset($item); };
    136296    $lvl_d = addslashes($_GET['lvl_d']);
    137297      if( is_numeric($lvl_d) == FALSE ){ unset($lvl_d); };
     
    139299      if( is_numeric($lvl_h) == FALSE ){ unset($lvl_h); };
    140300
     301    /* =========== Výchozí databáze =========== */
     302    @mysql_select_db($Config['DB_read']['DB_read']['Database_mangos'])
     303      OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_mangos']."!</p>");
     304    @mysql_query("SET CHARACTER SET utf8");
     305   
    141306    /* =========== Vložení základního souboru =========== */
     307    require_once "./language/".$Config['DB_read']['language'].".php";
     308
    142309    require_once "./post_read.php";
    143310    require_once "./hlavni.php";
  • db/obsah.php

    r92 r109  
    44          if( !empty($id) ){
    55            if( $id == "uvod" ){ $file = "uvod"; $nadpis = "Úvod"; }
     6            elseif( $id == "login" ){ $file = "login"; $nadpis = "Přihlášení"; }
     7            elseif( $id == "admin" ){ $file = "../admin/obsah"; $nadpis = "Administrace"; }
     8            elseif( $id == "getchar" ){ $file = "getchar"; $nadpis = "Export postavy z databáze"; }
    69            elseif( $id == "stats" ){ $file = "stats"; $nadpis = "Statistiky"; }
    710            elseif( $id == "bugreport" ){ $file = "bug_report"; $nadpis = "Systém na opravu chyb"; }
     
    3134            else{ $file = "uvod"; $nadpis = "Úvod"; };
    3235
    33             if( File_Exists("./include/".$file.".php") ){
    34               $file = "./include/".$file.".php";
    35               };
     36            $file = "./include/".$file.".php";
    3637            }
    3738          elseif( !empty($quest) ){
     
    4647          elseif( !empty($creature) ){
    4748            $creature_dotaz_nadpis =  mysql_query("SELECT `name`,`subname` FROM `creature_template` WHERE `entry`='".$creature."' LIMIT 1");
    48             if( mysql_num_rows($creature_dotaz_nadpis) == "1" ) { $i = "0";
     49            if( mysql_num_rows($creature_dotaz_nadpis) == "1" ) {
    4950              $result = @MySQL_Fetch_Array($creature_dotaz_nadpis);
    5051                $nadpis_creature = $result["name"];
     
    5253              } else{ $creature_quest = "Chyba !"; };
    5354            $file = "./include/creep.php"; $nadpis = "Creep: ".$nadpis_creature;
     55            if( !File_Exists($file) ){ $file = "./include/uvod.php"; };
     56            }
     57          elseif( !empty($item) ){
     58            $item_dotaz_nadpis =  mysql_query("SELECT `name` FROM `item_template` WHERE `entry`='".$item."' LIMIT 1");
     59            if( mysql_num_rows($item_dotaz_nadpis) == 1 ) {
     60              $result = @MySQL_Fetch_Array($item_dotaz_nadpis);
     61                $nadpis_item = $result["name"];
     62              } else{ $creature_quest = "Chyba !"; };
     63            $file = "./include/item.php"; $nadpis = "Item: ".$nadpis_item;
    5464            if( !File_Exists($file) ){ $file = "./include/uvod.php"; };
    5565            }
     
    6070
    6171<?php
    62         require_once $file;
     72        if( !File_exists($file) ){ echo "<p>Chyba! Nebyl nalezen kořenový soubor.</p>"; };
     73        @require_once $file;
    6374?>
    6475
  • db/post_read.php

    r103 r109  
    11<?php
    22if($vlozeni_souboru == "OK"){
    3 ?>
    4 
    5 <?php
    63
    74if( !empty($q) AND !empty($id) ){
    8   if( !empty($lvl_d) AND !empty($lvl_h) ){ $where = "(`MinLevel`>='$lvl_d' AND `MinLevel`<='$lvl_h') AND "; };
    9   $sql_select = SQLselect_Strankovani("SELECT * FROM quest_template WHERE ( $where`Title` LIKE '%$q%' )", $limit, 20, "?id=questy&amp;q=".$q."&amp;lvl_d=".$lvl_d."&amp;lvl_h=".$lvl_h, $SID);
    10   if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0;
    11     $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
    12     $sql_select['result'] .= "<thead><tr><td>Název úkolu</td><td>Min level</td><td>Úkol zadává</td><td>Úkol</td></tr></thead>\n<col width=\"180px\"><col width=\"70px\">";
    13 
    14     while( $result = MySQL_Fetch_Array($sql_select[1]) ){
    15       $sql_select['result'] .= "  <tr valign='top'>";
    16       $sql_select['result'] .= "<td><a href=\"index.php?quest=".$result['entry']."\">".$result['Title']."</a></td>";
    17       $sql_select['result'] .= "<td>".$result['MinLevel']."</td>";
    18       $sql_select['result'] .= "<td>";
    19 
    20         $startovni_creature_dotaz = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$result['entry']." ");
    21         while( $start_creature = @MySQL_Fetch_Array($startovni_creature_dotaz) ){
    22           $sql_select['result'] .= "<a href=\"index.php?creature=".$start_creature['entry']."\">".$start_creature['name']."</a><br>";
     5  if( $id == "questy" ){
     6    if( !empty($lvl_d) AND !empty($lvl_h) ){ $where = "(`MinLevel`>='$lvl_d' AND `MinLevel`<='$lvl_h') AND "; };
     7    $sql_select = SQLselect_Strankovani("SELECT * FROM `quest_template` WHERE ( $where`Title` LIKE '%$q%' ) ORDER BY `entry` ASC", $limit, 20, "?id=questy&amp;q=".$q."&amp;lvl_d=".$lvl_d."&amp;lvl_h=".$lvl_h, $SID);
     8    if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0;
     9      $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
     10      $sql_select['result'] .= "<thead><tr><td>Název úkolu</td><td>Min level</td><td>Úkol zadává</td><td>Úkol</td></tr></thead>\n<col width=\"180px\"><col width=\"70px\">";
     11 
     12      while( $result = MySQL_Fetch_Array($sql_select[1]) ){
     13        $sql_select['result'] .= "  <tr valign='top'>";
     14        $sql_select['result'] .= "<td><a href=\"index.php?quest=".$result['entry']."\">".$result['Title']."</a></td>";
     15        $sql_select['result'] .= "<td>".$result['MinLevel']."</td>";
     16        $sql_select['result'] .= "<td>";
     17 
     18          $startovni_creature_dotaz = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$result['entry']." ");
     19          while( $start_creature = @MySQL_Fetch_Array($startovni_creature_dotaz) ){
     20            $sql_select['result'] .= "<a href=\"index.php?creature=".$start_creature['entry']."\">".$start_creature['name']."</a><br>";
     21            };
     22          $startovni_gameobject_dotaz = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$result['entry']." ");
     23          while( $start_gameobject = @MySQL_Fetch_Array($startovni_gameobject_dotaz) ){
     24            $sql_select['result'] .= "<a href=\"index.php?gameobject=".$start_gameobject['entry']."\">".$start_gameobject['name']."</a><br>";
     25            };
     26 
     27        $sql_select['result'] .= "</td>";
     28        $sql_select['result'] .= "<td>".$result['Objectives']."</td>";
     29        $sql_select['result'] .= "</tr>\n";
     30        };
     31     
     32      $sql_select['result'] .= "</table>\n";
     33      }  else{ $sql_select['error'] = "<p>Nebyly nalezeny žádné questy.</p>"; };
     34   
     35    }
     36  elseif( $id == "creeps" ){
     37    $sql_select = SQLselect_Strankovani("SELECT * FROM `creature_template` WHERE ( `name` LIKE '%$q%' OR `subname` LIKE '%$q%' ) ORDER BY `entry` ASC", $limit, 20, "?id=creeps&amp;q=".$q, $SID);
     38    if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0;
     39      $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
     40      $sql_select['result'] .= "<thead><tr><td>Název creepa</td><td>Level</td></tr></thead>\n<col><col width=\"70px\">";
     41 
     42      while( $result = MySQL_Fetch_Array($sql_select[1]) ){
     43        $sql_select['result'] .= "  <tr valign='top'>";
     44        $sql_select['result'] .= "<td><a href=\"index.php?creature=".$result['entry']."\">".$result['name']."</a></td>";
     45        if( $result['rank'] != 3 ){
     46          $sql_select['result'] .= "<td align='center'>".$result['minlevel']." - ".$result['maxlevel']."</td>";
     47          }
     48        else{
     49          $sql_select['result'] .= "<td align='center'>Boss</td>";
    2350          };
    24         $startovni_gameobject_dotaz = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$result['entry']." ");
    25         while( $start_gameobject = @MySQL_Fetch_Array($startovni_gameobject_dotaz) ){
    26           $sql_select['result'] .= "<a href=\"index.php?gameobject=".$start_gameobject['entry']."\">".$start_gameobject['name']."</a><br>";
    27           };
    28 
    29       $sql_select['result'] .= "</td>";
    30       $sql_select['result'] .= "<td>".$result['Objectives']."</td>";
    31       $sql_select['result'] .= "</tr>\n";
    32       };
    33    
    34     $sql_select['result'] .= "</table>\n";
    35     }  else{ $sql_select['error'] = "<p>Nebyly nalezeny žádné questy.</p>"; };
    36  
     51        $sql_select['result'] .= "</tr>\n";
     52        };
     53     
     54      $sql_select['result'] .= "</table>\n";
     55      }  else{ $sql_select['error'] = "<p>Nebyly nalezeny žádní creepové.</p>"; };
     56
     57    };
    3758  }
    3859elseif( !empty($quest) AND empty($id) ){
     
    111132    $result = MySQL_Fetch_Array($sql_select['sql']);
    112133    $sql_select['creature'] = $result;
     134   
     135    switch($sql_select['creature']['rank']){
     136      case 0: $sql_select['other']['creature_type'] = "Normal"; break;
     137      case 1: $sql_select['other']['creature_type'] = "Elite"; break;
     138      case 2: $sql_select['other']['creature_type'] = "Rare Elite"; break;
     139      case 3: $sql_select['other']['creature_type'] = "World Boss"; break;
     140      case 4: $sql_select['other']['creature_type'] = "Rare"; break;
     141      };
    113142
    114143    $questy_dotaz_creature = mysql_query("SELECT * FROM `creature_questrelation` LEFT JOIN `quest_template` ON `creature_questrelation`.`quest` = `quest_template`.`entry` WHERE (`creature_questrelation`.`id` =".$sql_select['creature']['entry']." AND `quest_template`.`PrevQuestId`=0 ) ");
     
    117146          $sql_select['other']['creature_quests'] .= "<a href=\"index.php?quest=".$quest_NPC['entry']."\">".$quest_NPC['Title']."</a><br>\n";
    118147        }; };
     148
     149    $drop_creature = mysql_query("SELECT * FROM `creature_loot_template` LEFT JOIN `item_template` ON `creature_loot_template`.`item` = `item_template`.`entry` WHERE `creature_loot_template`.`entry`='".$sql_select['creature']['lootid']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC ");
     150      if( @mysql_num_rows($drop_creature) > 0 ){
     151        while($drop_NPC = @MySQL_Fetch_Array($drop_creature)){
     152          switch($drop_NPC['Quality']){
     153            case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break;
     154            case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break;
     155            case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break;
     156            case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break;
     157            case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break;
     158            case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break;
     159            case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break;
     160            };
     161          $sql_select['other']['creature_drop'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>";
     162          $sql_select['other']['creature_drop'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n";
     163        }; } else{ $sql_select['other']['creature_drop'] = "<tr><td colspan='2'>Tento creep nemá žádný drop !</td></tr>"; };
     164
     165    $pickpocket_creature = mysql_query("SELECT * FROM `pickpocketing_loot_template` LEFT JOIN `item_template` ON `pickpocketing_loot_template`.`item` = `item_template`.`entry` WHERE `pickpocketing_loot_template`.`entry`='".$sql_select['creature']['pickpocketloot']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC ");
     166      if( @mysql_num_rows($pickpocket_creature) > 0 ){
     167        while($drop_NPC = @MySQL_Fetch_Array($pickpocket_creature)){
     168          switch($drop_NPC['Quality']){
     169            case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break;
     170            case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break;
     171            case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break;
     172            case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break;
     173            case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break;
     174            case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break;
     175            case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break;
     176            };
     177          $sql_select['other']['creature_pickpocket'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>";
     178          $sql_select['other']['creature_pickpocket'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n";
     179        }; } else{ $sql_select['other']['creature_pickpocket'] = "<tr><td colspan='2'>Tento creep nemá žádný Pickpocket !</td></tr>"; };
     180
     181    $skin_creature = mysql_query("SELECT * FROM `skinning_loot_template` LEFT JOIN `item_template` ON `skinning_loot_template`.`item` = `item_template`.`entry` WHERE `skinning_loot_template`.`entry`='".$sql_select['creature']['skinloot']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC ");
     182      if( @mysql_num_rows($skin_creature) > 0 ){
     183        while($drop_NPC = @MySQL_Fetch_Array($skin_creature)){
     184          switch($drop_NPC['Quality']){
     185            case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break;
     186            case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break;
     187            case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break;
     188            case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break;
     189            case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break;
     190            case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break;
     191            case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break;
     192            };
     193          $sql_select['other']['creature_skin'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>";
     194          $sql_select['other']['creature_skin'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n";
     195        }; } else{ $sql_select['other']['creature_skin'] = "<tr><td colspan='2'>Tento creep nemá žádný Skin !</td></tr>"; };
    119196
    120197    } else{ $sql_select['error'] = "<p>Creep nebyl nalezen.</p>"; };
     
    167244
    168245  }
    169 elseif( $id == "sendbug" ANd isset($_POST['send']) ){
     246elseif( $id == "sendbug" AND isset($_POST['send']) ){
    170247  mysql_select_db($Config['DB_read']['DB_read']['Database_web'])
    171248    OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>");
     
    178255  else{ $sql_insert['result'] = "<p>Bug se nepodařilo uložit do databáze.<br>Zkuste to později znovu prosím.</p>"; };
    179256 
     257  }
     258elseif( $id == "myacc" ){
     259  mysql_select_db($Config['DB_read']['DB_read']['Database_realmd'])
     260    OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>");
     261    @mysql_query("SET CHARACTER SET utf8"); 
     262
     263  $sql_select['sql'] = mysql_query("SELECT * FROM `account` WHERE `username`='".$user['nick']."' LIMIT 1");
     264  $sql_select['result']['acc'] = @mysql_fetch_array($sql_select['sql']);
     265
     266  mysql_select_db($Config['DB_read']['DB_read']['Database_mangos'])
     267    OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_mangos']."!</p>");
     268    @mysql_query("SET CHARACTER SET utf8"); 
     269
     270  $sql_select['sql'] = mysql_query("SELECT * FROM `character` WHERE `account`='".$sql_select['result']['acc']['id']."' ");
     271  $sql_select['result']['char_count'] = @mysql_num_rows($sql_select['sql']);
     272  for($i=0;$sql_select['result']['char'][$i] = @mysql_fetch_array($sql_select['sql']) ;$i++){
     273    $sql_select['result']['char'][$i]['data'] = explode(" ", $sql_select['result']['char'][$i]['data']);
     274    };
     275
     276  switch($sql_select['result']['acc']['gmlevel']){
     277    case 0: $sql_select['result']['other']['opravneni'] = "Player"; break;
     278    case 1: $sql_select['result']['other']['opravneni'] = "Moderator"; break;
     279    case 2: $sql_select['result']['other']['opravneni'] = "GameMaster"; break;
     280    case 3: $sql_select['result']['other']['opravneni'] = "Administrator"; break;
     281    default: $sql_select['result']['other']['opravneni'] = "unknown";
     282    };
     283
     284  switch($sql_select['result']['acc']['tbc']){
     285    case 0: $sql_select['result']['other']['version'] = "Normal"; break;
     286    case 1: $sql_select['result']['other']['version'] = "Burning Crusade"; break;
     287    };
     288
     289  $sql_select['result']['other']['chars'] .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n";
     290  for($i=0; $i < $sql_select['result']['char_count'] ;$i++){
     291    $sql_select['result']['other']['chars'] .= "<tr><td>".$sql_select['result']['char'][$i]['name']."</td>";
     292    $sql_select['result']['other']['chars'] .= "<td title=\"Level\">".$sql_select['result']['char'][$i]['data'][34]."</td>";
     293    $sql_select['result']['other']['chars'] .= "<td title=\"Rasa\">".$Database['race'][$sql_select['result']['char'][$i]['race']]."</td>";
     294    $sql_select['result']['other']['chars'] .= "<td title=\"Povolání\">".$Database['class'][$sql_select['result']['char'][$i]['class']]."</td>\n";
     295    $sql_select['result']['other']['chars'] .= "<td> - <a href=\"./character.php?char=".$sql_select['result']['char'][$i]['guid']."\">Exportovat</a></td></tr>\n";
     296    }; $sql_select['result']['other']['chars'] .= "</table>";
     297
     298
    180299  };
    181300
    182301
     302
     303
     304  }; // vložení souboru
    183305?>
    184 
    185 
    186 <?php
    187   };
    188 ?>
    189 
Note: See TracChangeset for help on using the changeset viewer.