Changeset 92
- Timestamp:
- Sep 30, 2007, 6:34:12 PM (17 years ago)
- Location:
- db
- Files:
-
- 6 added
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
db
-
Property svn:ignore
set to
config.php
-
Property svn:ignore
set to
-
db/config.sample.php
r89 r92 4 4 'Database' => array( 5 5 'Host' => 'localhost', 6 'User' => ' root',7 'Password' => ' gurubashi'6 'User' => '', 7 'Password' => '' 8 8 ), 9 9 'Style' => 'maron', -
db/css/zakladni_css.css
r82 r92 32 32 33 33 img { 34 border: 0px; 35 display: block; } 34 border: 0px; } 36 35 i { } 37 36 form { … … 220 219 margin-left: 10px; 221 220 list-style-type: circle; } 221 #right table#sendbug { 222 empty-cells: show; 223 width: 720px; 224 margin-top: 15px; 225 border: 0px; } 226 #right table#sendbug td { 227 vertical-align: top; 228 border: 0px; } 229 #right table#sendbug td.text { 230 overflow-x: auto; 231 padding:4px; 232 border: 1px solid white; } 222 233 223 234 #pata { -
db/databaze_tabulky/sql.sql
r89 r92 24 24 `nick` varchar(50) NOT NULL, 25 25 `typ` varchar(250) NOT NULL, 26 `vlozeno` bigint(20) unsigned NOT NULL, 26 27 `popis` text NOT NULL, 27 `status` varchar(200) NOT NULL,28 28 `opraveno` enum('0','1') NOT NULL default '0', 29 29 `popis_opravy` text NOT NULL, … … 51 51 PRIMARY KEY (`id`) 52 52 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; 53 54 -- 55 -- Struktura tabulky `klice` 56 -- 57 -- Vytvoření: Neděle 30. září 2007, 16:27 58 -- Poslední změna: Neděle 30. září 2007, 16:27 59 -- 60 61 CREATE TABLE `klice` ( 62 `id` int(10) unsigned NOT NULL auto_increment, 63 `klic` varchar(20) NOT NULL, 64 PRIMARY KEY (`id`), 65 UNIQUE KEY `klic` (`klic`) 66 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -
db/hlavni.php
r82 r92 18 18 <div id="left"> 19 19 <ul id="hlavni_menu"> 20 <li><a href="index.php?id=uvod">Hlavni</a><ul> 21 <li><a href="./../">Zpět na web</a></li> 22 <li><a href="./../forum/">Forum</a></li> 23 <li><a href="./../registrace/">Registrace</a></li> 24 <li><a href="./index.php?id=bugreport<?php echo $SID; ?>">Hlášení chyb</a></li> 25 <li><a href="./index.php?id=stats<?php echo $SID; ?>">Statistiky</a></li> 26 <li><a href="./index.php?id=races<?php echo $SID; ?>">Rasy</a></li> 27 <li><a href="./index.php?id=classes<?php echo $SID; ?>">Povolání</a></li> 28 </ul></li> 29 <li><a href="#">Obecné Hledání</a><ul> 30 <li><span style="padding-left: 5px;"> 31 <input type="text" name="search" maxlength="255" class="search" title="Pro Odeslání stiskněte Enter"> 32 </span></li> 33 </ul></li> 34 <li><a href="#">Uživatelé</a><ul> 35 <li><a href="./index.php?id=chars<?php echo $SID; ?>">Postavy</a></li> 36 <li><a href="./index.php?id=myacc<?php echo $SID; ?>">Muj účet</a></li> 37 <li><a href="./index.php?id=guild<?php echo $SID; ?>">Guildy</a></li> 38 </ul></li> 39 <li><a href="./index.php?id=items<?php echo $SID; ?>">Itemy</a><ul> 40 <li><a href="./index.php?id=items<?php echo $SID; ?>">Hledání</a></li> 41 <li><a href="./index.php?id=itemsets<?php echo $SID; ?>">Sety</a></li> 42 </ul></li> 43 <li><a href="./index.php?id=questy<?php echo $SID; ?>">Questy</a><ul> 44 <li><a href="./index.php?id=questy<?php echo $SID; ?>">Hledání</a></li> 45 <li><a href="./index.php?id=qzone<?php echo $SID; ?>">Zóny</a></li> 46 <li><a href="./index.php?id=qtrskill<?php echo $SID; ?>">Profese</a></li> 47 <li><a href="./index.php?id=qspecial<?php echo $SID; ?>">Speciální</a></li> 48 </ul></li> 49 <li><a href="./index.php?id=creeps<?php echo $SID; ?>">Bestiář</a><ul> 50 <li><a href="./index.php?id=creeps<?php echo $SID; ?>">Hledání</a></li> 51 <li><a href="./index.php?id=czone<?php echo $SID; ?>">Zóny</a></li> 52 <li><a href="./index.php?id=ctype<?php echo $SID; ?>">Typy</a></li> 53 <li><a href="./index.php?id=crare<?php echo $SID; ?>">Unikátní</a></li> 54 </ul></li> 55 <li><a href="#">Geografie</a><ul> 56 <li><a href="./index.php?id=glevel<?php echo $SID; ?>">Podle levelu</a></li> 57 <li><a href="./index.php?id=gzone<?php echo $SID; ?>">Zóny</a></li> 58 </ul></li> 59 <li><a href="./index.php?id=spells<?php echo $SID; ?>">Spell</a><ul> 60 <li><a href="./index.php?id=spells<?php echo $SID; ?>">Hledání</a></li> 61 <li><a href="./index.php?id=sclass<?php echo $SID; ?>">Podle tříd</a></li> 62 </ul></li> 63 <li><a href="./index.php?id=talents<?php echo $SID; ?>">Talenty</a><ul> 64 <li><a href="./index.php?id=talents<?php echo $SID; ?>">Prohlížet</a></li> 65 </ul></li> 66 <li><a href="./index.php?id=profes<?php echo $SID; ?>">Profese</a><ul> 67 <li><a href="./index.php?id=profes<?php echo $SID; ?>">Prohlížet</a></li> 68 <li><a href="./index.php?id=pteach<?php echo $SID; ?>">Učitelé</a></li> 69 </ul></li> 20 <?php echo GenerateMenu(); ?> 70 21 </ul><!-- hlavni_menu --> 71 22 </div><!-- left --> … … 78 29 <div class="back"> 79 30 <div class="float"><?php echo $sql_select['strankovani']; ?></div> 80 <a href="#top">Nahoru</a> 81 <a href="<?php echo $_SERVER["HTTP_REFERER"]; ?>" id="back">Zpět</a> 31 <a href="#top"><?php echo $text['navigation']['top']; ?></a> 32 <?php if( empty($_POST) ){ ?> 33 <a href="<?php echo $_SERVER["HTTP_REFERER"]; ?>" id="back"><?php echo $text['navigation']['back']; ?></a> 34 <?php }; ?> 82 35 <script type="text/javascript"> 83 36 onload=document.getElementById('back').href="javascript:history.back();"; … … 87 40 88 41 <div style="clear:both;"></div><div id="pata"> 89 | Správce serveru: Chronos|90 Správce oddělení: HosipLan|91 Email: wow@zdechov.net|92 Provozováno na <a href="http://game-server.zdechov.net/">game-server.zdechov.net</a> |42 | <?php echo $text['foot']['admin'].": ".$Config['DB_read']['DB_read']['Admin']; ?> | 43 <?php echo $text['foot']['section'].": ".$Config['DB_read']['DB_read']['SubAdmin']; ?> | 44 <?php echo $text['other']['email'].": ".$Config['DB_read']['DB_read']['AdminEmail']; ?> | 45 <?php echo $text['foot']['host']." <a href=\"http://".$Config['DB_read']['DB_read']['Web']."\">".$Config['DB_read']['DB_read']['Web']."</a>"; ?> | 93 46 </div><!-- pata --> 94 47 -
db/include/bug_report.php
r89 r92 3 3 ?> 4 4 5 <p>Nezprovozněno.</p> 5 <?php if( !empty($sql_select['bug']) AND $id="bugreport" AND !empty($bug) ){ ?> 6 7 <table border="0" id="sendbug" cellspacing="0" cellpadding="2"> 8 <col width="120px;"><col width="160px;"> 9 <tr><td><b>Vlozil:</b></td><td><?php echo htmlentities($sql_select['bug']['nick']); ?></td></tr> 10 <tr><td><b>Vlozeno:</b></td><td><?php echo @date("H:i d.m.Y", $sql_select['bug']['vlozeno']); ?></td></tr> 11 <tr><td><b>Status:</b></td><td><?php echo $sql_select['bug']['opraveno']; ?></td></tr> 12 <tr><td><b>Opravil:</b></td><td><?php echo $sql_select['bug']['opravil_nick']; ?></td></tr> 13 <tr><td><b>Popis Chyby:</b></td><td></td><td></td></tr> 14 <tr><td colspan='3' class="text"><?php echo nl2br(htmlentities($sql_select['bug']['popis'])); ?></td></tr> 15 <?php if( !empty($sql_select['bug']['popis_opravy']) ){ ?> 16 <tr><td><b>Popis Opravy:</b></td><td></td><td></td></tr> 17 <tr><td colspan='3' class="text"><?php echo nl2br(htmlentities($sql_select['bug']['popis_opravy'])); ?></td></tr> 18 <?php }; ?> 19 </table> 20 21 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p> 22 <?php } elseif( !empty($sql_select['result']) AND $id="bugreport" AND empty($bug) ){ ?> 23 <?php echo $sql_select['result']; ?> 24 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p> 25 <?php } elseif( $id=="sendbug" ){ ?> 26 <?php echo $sql_insert['result']; ?> 27 <form action="./index.php?id=sendbug" method="post"> 28 <table id="sendbug" border="0" cellspacing="0" cellpadding="2"> 29 <tr><td> 30 <label for="game_nick">Váš nick ve hře:</label></td><td> 31 <input type="text" name="game_nick" id="game_nick" maxlength="50" style="width:300px;"> 32 </td></tr><tr><td> 33 <label for="err_type">Typ chyby:</label></td><td> 34 <select name="err_type" id="err_type" style="width:300px;"> 35 <option value="q">Buglý Úkol (Quest)</option> 36 <option value="i">Buglá Věc (Item)</option> 37 <option value="c">Buglý Creep (NPC)</option> 38 <option value="g">Buglý Objekt ve hře (Gameobject)</option> 39 <option value="p">Buglá Profese (Profesion)</option> 40 <option value="s">Buglé Kouzlo (Spell)</option> 41 <option value="t">Buglý Talent</option> 42 <option value="o">Jiný</option> 43 </select> 44 </td></tr><tr><td colspan='2'> 45 <label for="typ">Popis chyby:</label></td></tr><tr><td colspan='2'> 46 <textarea name="popis" id="popis" rows="5" cols="50" style="width:474px;height:100px;"></textarea> 47 </td></tr><tr><td align='left' valign='top'> 48 <input type="submit" value="Nahlásit Chybu" name="send"></td><td> 49 </td></tr> 50 </table></form> 51 <?php } elseif( !empty($sql_select['error']) ){ ?> 52 <?php echo $sql_select['error']; ?> 53 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p> 54 <?php }; ?> 6 55 7 56 <?php -
db/include/questy.php
r82 r92 9 9 <tr><td>Level <label for="lvl_d">od:</label></td><td><input type="text" name="lvl_d" id="lvl_d" maxlength="3" style="width: 45px;" value="<?php echo $lvl_d; ?>"></td><td><label for="lvl_h">do:</label></td><td><input type="text" name="lvl_h" id="lvl_h" maxlength="3" style="width: 45px;" value="<?php echo $lvl_h; ?>"></td><td><input type="submit" value="Hledat" name="quest_find"></td></tr> 10 10 </table><?php if(!empty($session_id)){ ?><input type="hidden" name="PHPSESSID" value="<?php echo $session; ?>" class="hidden"><?php }; ?></form> 11 <?php echo $sql_select['result']; ?> 11 <?php if( !empty($sql_select['result']) ){ ?> 12 <?php echo $sql_select['result']; ?> 13 <?php } elseif( !empty($sql_select['error']) ){ ?> 14 <?php echo $sql_select['error']; ?> 15 <?php }; ?> 16 12 17 13 18 <?php -
db/include/uvod.php
r84 r92 15 15 klidně pište na ICQ 327671143 nebo na E-mail: HosipLan<!-- spam ochrana -->@<!-- spam ochrana -->seznam.cz</p> 16 16 17 <h4>Aktuality:</h4> 18 19 <p>HosipLan 19.září.2007<br> 20 Teď nám funguje: <br> 21 -Hledání Questů a nějaké základní údaje o nich.<br> 22 -Návozanost Questu na Creepa a jeho výpis už taky částečně funguje.</p> 23 24 25 <p> </p><p>Postupujeme kvůli časové tísni velice pomalinku.<br> 26 Pokud by chctěl někdo nějak přiložit ruku tak to jedině uvítám</p> 27 17 <?php /* 18 // Tohel tady zatím může strašit.. 28 19 <h4>Na projektu se podílejí:</h4> 29 20 … … 53 44 </ul> 54 45 55 <p>Tímto děkuji všem co se jakkoliv zapojili.</p> 46 <p>Tímto děkuji všem co se jakkoliv zapojili.</p> */ 47 ?> 56 48 57 49 <?php -
db/index.php
r89 r92 4 4 if( !empty($session_id) ){ $session = $session_id; }; 5 5 6 /* =========== Config =========== */6 /* =========== Config aj. =========== */ 7 7 if( !file_exists('./config.php') ){ exit; }; 8 8 require_once './config.php'; 9 9 require_once "./menu.php"; 10 11 require_once "./language/".$Config['DB_read']['language'].".php"; 12 10 13 /* =========== Připojení k Databázi =========== */ 11 14 … … 33 36 }; 34 37 35 function StranovaniVypisu($sql, $limit, $nastranu, $adresa, $SID ,$DB){ 36 $pocet_radku = @mysql_num_rows(mysql_query($sql,$DB)); 38 function StranovaniVypisu($sql, $limit, $nastranu, $adresa, $SID){ 39 global $text; 40 $pocet_radku = @mysql_num_rows(mysql_query($sql)); 37 41 if( $pocet_radku > 0 ) { 38 42 $listovani = $pocet_radku/10; … … 52 56 if( $listovani <= 10 ){ 53 57 for( $i=1; ($i<=10)AND($i<=$listovani) ;$i++ ){ 54 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}55 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};58 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 59 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 56 60 }; 57 61 58 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\" Začátek\"><<</a>"." ";59 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\" Předchozí\"><</a> ";60 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\" Další\">></a>"." ";61 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\" Konec\">>></a>";62 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"".$text['navigation']['start']."\"><<</a>"." "; 63 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"".$text['navigation']['previous']."\"><</a> "; 64 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"".$text['navigation']['next']."\">></a>"." "; 65 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"".$text['navigation']['end']."\">>></a>"; 62 66 63 67 if( $limit == 1 ){ $navigace['zacatek'] = "<<"." < "; }; … … 67 71 if( $limit <= 6 ){ 68 72 for( $i=1; ($i<=10) ;$i++ ){ 69 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}70 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};73 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 74 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 71 75 }; $navigace['cisla'] .= " ... "; 72 76 } … … 76 80 for( $i=$limit-5; ($i<=$limit+5) ;$i++ ){ 77 81 78 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}79 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};82 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 83 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 80 84 81 85 }; $navigace['cisla'] .= " ... "; … … 84 88 $navigace['cisla'] .= " ... "; 85 89 for( $i=$listovani-10; ($i<=$listovani) ;$i++ ){ 86 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}87 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};90 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 91 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 88 92 }; 89 93 }; 90 94 91 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"Začátek\"><<</a>"." "; 92 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"Předchozí\"><</a> "; 93 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"Další\">></a>"." "; 94 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"Konec\">>></a>"; 95 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"".$text['navigation']['start']."\"><<</a>"." "; 96 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"".$text['navigation']['previous']."\"><</a> "; 97 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"".$text['navigation']['next']."\">></a>"." "; 98 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"".$text['navigation']['end']."\">>></a>"; 99 95 100 96 101 if( $limit == 1 ){ $navigace['zacatek'] = "<<"." < "; }; … … 105 110 }; 106 111 107 function SQLselect_Strankovani($dotaz, $limit, $nastranu, $adresa, $SID , $DB){108 $navigace = StranovaniVypisu($dotaz, $limit, $nastranu, $adresa, $SID , $DB);109 $dotaz = @mysql_query($dotaz." LIMIT ".(--$limit*10*($nastranu/10)).", $nastranu " ,$DB);112 function SQLselect_Strankovani($dotaz, $limit, $nastranu, $adresa, $SID){ 113 $navigace = StranovaniVypisu($dotaz, $limit, $nastranu, $adresa, $SID); 114 $dotaz = @mysql_query($dotaz." LIMIT ".(--$limit*10*($nastranu/10)).", $nastranu "); 110 115 $vysledek = array( '1' => $dotaz, 111 116 'strankovani' => $navigace ); … … 119 124 /* =========== GET hodnoty =========== */ 120 125 $id = $_GET['id']; // tady získá id z adresy 121 $q = addslashes($_GET['q']); 126 $q = addslashes($_GET['q']); 122 127 $limit = $_GET['list']; // tady získá list z adresy 123 128 if( is_numeric($limit) == FALSE ){ unset($limit); }; 124 if( $limit < 1 OR empty($limit) ){ $limit = 1; }; 129 if( $limit < 1 OR empty($limit) ){ $limit = 1; }; 130 $bug = addslashes($_GET['bug']); 131 if( is_numeric($bug) == FALSE ){ unset($bug); }; 125 132 $quest = addslashes($_GET['quest']); 126 133 if( is_numeric($quest) == FALSE ){ unset($quest); }; -
db/obsah.php
r89 r92 5 5 if( $id == "uvod" ){ $file = "uvod"; $nadpis = "Úvod"; } 6 6 elseif( $id == "stats" ){ $file = "stats"; $nadpis = "Statistiky"; } 7 elseif( $id == "bugreport" ){ $file = "bug_report"; $nadpis = "Systém pro opravu chyb"; } 7 elseif( $id == "bugreport" ){ $file = "bug_report"; $nadpis = "Systém na opravu chyb"; } 8 elseif( $id == "sendbug" ){ $file = "bug_report"; $nadpis = "Systém na opravu chyb - nahlášení chyby"; } 8 9 elseif( $id == "races" ){ $file = "races"; $nadpis = "Rasy"; } 9 10 elseif( $id == "classes" ){ $file = "classes"; $nadpis = "Povolání"; } … … 35 36 } 36 37 elseif( !empty($quest) ){ 37 $quest_dotaz_nadpis = mysql_query("SELECT `Title` FROM `quest_template` WHERE `entry`='".$quest."' LIMIT 1" ,$DB_mangos);38 $quest_dotaz_nadpis = mysql_query("SELECT `Title` FROM `quest_template` WHERE `entry`='".$quest."' LIMIT 1"); 38 39 if( mysql_num_rows($quest_dotaz_nadpis) == "1" ) { $i = "0"; 39 40 $result = MySQL_Fetch_Array($quest_dotaz_nadpis); … … 44 45 } 45 46 elseif( !empty($creature) ){ 46 $creature_dotaz_nadpis = mysql_query("SELECT `name`,`subname` FROM `creature_template` WHERE `entry`='".$creature."' LIMIT 1" ,$DB_mangos);47 $creature_dotaz_nadpis = mysql_query("SELECT `name`,`subname` FROM `creature_template` WHERE `entry`='".$creature."' LIMIT 1"); 47 48 if( mysql_num_rows($creature_dotaz_nadpis) == "1" ) { $i = "0"; 48 49 $result = @MySQL_Fetch_Array($creature_dotaz_nadpis); -
db/post_read.php
r89 r92 7 7 if( !empty($q) AND !empty($id) ){ 8 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&q=".$q."&lvl_d=".$lvl_d."&lvl_h=".$lvl_h, $SID , $DB_mangos);9 $sql_select = SQLselect_Strankovani("SELECT * FROM quest_template WHERE ( $where`Title` LIKE '%$q%' )", $limit, 20, "?id=questy&q=".$q."&lvl_d=".$lvl_d."&lvl_h=".$lvl_h, $SID); 10 10 if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0; 11 11 $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; … … 18 18 $sql_select['result'] .= "<td>"; 19 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']." " ,$DB_mangos);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 21 while( $start_creature = @MySQL_Fetch_Array($startovni_creature_dotaz) ){ 22 22 $sql_select['result'] .= "<a href=\"index.php?creature=".$start_creature['entry']."\">".$start_creature['name']."</a><br>"; 23 23 }; 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']." " ,$DB_mangos);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 25 while( $start_gameobject = @MySQL_Fetch_Array($startovni_gameobject_dotaz) ){ 26 26 $sql_select['result'] .= "<a href=\"index.php?gameobject=".$start_gameobject['entry']."\">".$start_gameobject['name']."</a><br>"; … … 33 33 34 34 $sql_select['result'] .= "</table>\n"; 35 } ;35 } else{ $sql_select['error'] = "<p>Nebyly nalezeny žádné questy.</p>"; }; 36 36 37 37 } 38 38 elseif( !empty($quest) AND empty($id) ){ 39 $sql_select['sql'] = mysql_query("SELECT * FROM quest_template WHERE `entry`='$quest' LIMIT 1;" ,$DB_mangos);39 $sql_select['sql'] = mysql_query("SELECT * FROM quest_template WHERE `entry`='$quest' LIMIT 1;"); 40 40 if( @mysql_num_rows($sql_select['sql']) > 0 ){ $i = 0; 41 41 $result = MySQL_Fetch_Array($sql_select['sql']); … … 43 43 44 44 // Zjištění creatur a gameobjectů kde se Quest dá vzít 45 $startovni_NPC_dotaz_creature = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$sql_select['quest']['entry']." " ,$DB_mangos);45 $startovni_NPC_dotaz_creature = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$sql_select['quest']['entry']." "); 46 46 if( @mysql_num_rows($startovni_NPC_dotaz_creature) > 0 ){ 47 47 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_creature)){ 48 48 $sql_select['other']['StartNPC'] .= "<a href=\"index.php?creature=".$start_NPC['entry']."\">".$start_NPC['name']."</a><br>\n"; 49 49 }; }; 50 $startovni_NPC_dotaz_gameobject = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$sql_select['quest']['entry']." " ,$DB_mangos);50 $startovni_NPC_dotaz_gameobject = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$sql_select['quest']['entry']." "); 51 51 if( @mysql_num_rows($startovni_NPC_dotaz_gameobject) > 0 ){ 52 52 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_gameobject)){ … … 54 54 }; }; 55 55 if( empty($sql_select['other']['StartNPC']) ){ 56 $sql_select['other']['StartNPC'] = "<b>Úkol není kde začít!< br> Nahlaste to prosím adminovy!</b>"; }56 $sql_select['other']['StartNPC'] = "<b>Úkol není kde začít!</b>"; } 57 57 58 58 // Zjištění Oblasti … … 61 61 62 62 // Důležitá věc 63 $SrcItemId_dotaz = mysql_query("SELECT * FROM item_template WHERE entry =".$sql_select['quest']['SrcItemId']." LIMIT 1;" ,$DB_mangos);63 $SrcItemId_dotaz = mysql_query("SELECT * FROM item_template WHERE entry =".$sql_select['quest']['SrcItemId']." LIMIT 1;"); 64 64 if( @mysql_num_rows($SrcItemId_dotaz) > 0 ){ 65 65 $SrcItemId = @MySQL_Fetch_Array($SrcItemId_dotaz); … … 107 107 } 108 108 elseif( !empty($creature) AND empty($id) ){ 109 $sql_select['sql'] = mysql_query("SELECT * FROM creature_template WHERE `entry`='$creature' LIMIT 1;" ,$DB_mangos);109 $sql_select['sql'] = mysql_query("SELECT * FROM creature_template WHERE `entry`='$creature' LIMIT 1;"); 110 110 if( @mysql_num_rows($sql_select['sql']) > 0 ){ $i = 0; 111 111 $result = MySQL_Fetch_Array($sql_select['sql']); 112 112 $sql_select['creature'] = $result; 113 113 114 $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 ) " ,$DB_mangos);114 $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 ) "); 115 115 if( @mysql_num_rows($questy_dotaz_creature) > 0 ){ 116 116 while($quest_NPC = @MySQL_Fetch_Array($questy_dotaz_creature)){ … … 119 119 120 120 } else{ $sql_select['error'] = "<p>Creep nebyl nalezen.</p>"; }; 121 122 } 123 elseif( $id == "bugreport" AND empty($bug) ){ 124 $DB_web = mysql_select_db($Config['DB_read']['DB_read']['Database_web']); 125 if( !$DB_web ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); }; 126 127 $sql_select = SQLselect_Strankovani("SELECT * FROM `bug_report` ORDER BY `opraveno` ASC, `vlozeno` DESC", $limit, 20, "?id=bugreport", $SID); 128 if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0; 129 $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; 130 $sql_select['result'] .= "<thead><tr><td>Vloženo</td><td>Chyba</td><td align='right'>Status</td></tr></thead>\n<col width=\"120px\"><col><col width=\"60px\">"; 131 132 while( $result = MySQL_Fetch_Array($sql_select[1]) ){ 133 $sql_select['result'] .= "<tr><td valign='top'>"; 134 $sql_select['result'] .= "<a href=\"./index.php?id=bugreport&bug=".$result['id']."\">".@date("d.m.Y H:i", $result['vlozeno'])."</a>"; 135 $sql_select['result'] .= "</td><td valign='top'>"; 136 $sql_select['result'] .= nl2br(htmlentities($result['popis'])); 137 $sql_select['result'] .= "</td><td valign='top' align='right'>"; 138 if( $result['opraveno'] == 0 ){ 139 $sql_select['result'] .= "<img src=\"img/aff_cross.gif\" alt=\"ne\" height=\"16\" width=\"16\">"; } 140 elseif( $result['opraveno'] == 1 ){ 141 $sql_select['result'] .= "<img src=\"img/aff_tick.gif\" alt=\"ne\" height=\"16\" width=\"16\">"; } 142 $sql_select['result'] .= "</td></tr>\n"; 143 }; 144 145 $sql_select['result'] .= "</table>\n"; 146 147 } else{ $sql_select['error'] .= "<p>V databázi nejsou záznamy o chybách.</p>"; }; 148 149 } 150 elseif( $id == "bugreport" AND !empty($bug) ){ 151 $DB_web = mysql_select_db($Config['DB_read']['DB_read']['Database_web']); 152 if( !$DB_web ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); }; 153 154 $sql_select['sql'] = mysql_query("SELECT * FROM `bug_report` WHERE id=$bug LIMIT 1"); 155 if( @mysql_num_rows($sql_select['sql']) > 0 ){ 156 $result = MySQL_Fetch_Array($sql_select['sql']); 157 $sql_select['bug'] = $result; 158 if( empty($sql_select['bug']['opravil_nick']) ){ 159 $sql_select['bug']['opravil_nick'] = "Zatím nikdo"; }; 160 if( $sql_select['bug']['opraveno'] == 0 ){ 161 $sql_select['bug']['opraveno'] = "<img src=\"img/aff_cross.gif\" alt=\"ne\" height=\"16\" width=\"16\"> Čeká na vyřízení"; } 162 elseif( $sql_select['bug']['opraveno'] == 1 ){ 163 $sql_select['bug']['opraveno'] = "<img src=\"img/aff_tick.gif\" alt=\"ne\" height=\"16\" width=\"16\"> Opraveno"; } 164 } else{ $sql_select['error'] = "<p>V databázi není záznam s touto chybou.</p>"; }; 165 166 } 167 elseif( $id == "sendbug" ANd isset($_POST['send']) ){ 168 $DB_web = mysql_select_db($Config['DB_read']['DB_read']['Database_web']); 169 if( !$DB_web ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); }; 170 171 $sql_insert['sql'] = "INSERT INTO `bug_report` (`nick`,`typ`,`vlozeno`,`popis`) VALUES('".$_POST['game_nick']."','".$_POST['err_type']."','".time()."','".$_POST['popis']."')"; 172 if( mysql_query($sql_insert['sql']) ){ 173 $sql_insert['result'] = "<p>Bug byl uložen do databáze.</p>"; 174 } 175 else{ $sql_insert['result'] = "<p>Bug se nepodařilo uložit do databáze.<br>Zkuste to později znovu prosím.</p>"; }; 121 176 122 177 };
Note:
See TracChangeset
for help on using the changeset viewer.