Changeset 109 for db/obsah.php
- Timestamp:
- Oct 14, 2007, 1:35:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
db/obsah.php
r92 r109 4 4 if( !empty($id) ){ 5 5 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"; } 6 9 elseif( $id == "stats" ){ $file = "stats"; $nadpis = "Statistiky"; } 7 10 elseif( $id == "bugreport" ){ $file = "bug_report"; $nadpis = "Systém na opravu chyb"; } … … 31 34 else{ $file = "uvod"; $nadpis = "Úvod"; }; 32 35 33 if( File_Exists("./include/".$file.".php") ){ 34 $file = "./include/".$file.".php"; 35 }; 36 $file = "./include/".$file.".php"; 36 37 } 37 38 elseif( !empty($quest) ){ … … 46 47 elseif( !empty($creature) ){ 47 48 $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" ) { 49 50 $result = @MySQL_Fetch_Array($creature_dotaz_nadpis); 50 51 $nadpis_creature = $result["name"]; … … 52 53 } else{ $creature_quest = "Chyba !"; }; 53 54 $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; 54 64 if( !File_Exists($file) ){ $file = "./include/uvod.php"; }; 55 65 } … … 60 70 61 71 <?php 62 require_once $file; 72 if( !File_exists($file) ){ echo "<p>Chyba! Nebyl nalezen kořenový soubor.</p>"; }; 73 @require_once $file; 63 74 ?> 64 75
Note:
See TracChangeset
for help on using the changeset viewer.