Changeset 102
- Timestamp:
- Sep 30, 2007, 10:22:32 PM (17 years ago)
- Location:
- db
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
db/config.sample.php
r98 r102 17 17 ), 18 18 'DB_read' => array( 19 'Charset' => 'utf-8',20 19 'Database_mangos' => 'mangos', 21 20 'Database_realmd' => 'realmd', -
db/hlavni.php
r92 r102 6 6 <head> 7 7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 8 8 9 <meta name="Description" content="<?php echo $Config['DB_read']['Description']; ?>"> 9 10 <meta name="robots" content="all, follow"> … … 15 16 <body> 16 17 <div id="center"><div id="hlavni"> 17 <div id="top">< ?php //require_once "user_center/user_menu.php"; ?></div>18 <div id="top"></div> 18 19 <div id="left"> 19 20 <ul id="hlavni_menu"> -
db/include/bug_report.php
r92 r102 7 7 <table border="0" id="sendbug" cellspacing="0" cellpadding="2"> 8 8 <col width="120px;"><col width="160px;"> 9 <tr><td><b>Vlozil:</b></td><td><?php echo htmlentities($sql_select['bug']['nick']); ?></td></tr>9 <tr><td><b>Vlozil:</b></td><td><?php echo preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['nick']); ?></td></tr> 10 10 <tr><td><b>Vlozeno:</b></td><td><?php echo @date("H:i d.m.Y", $sql_select['bug']['vlozeno']); ?></td></tr> 11 11 <tr><td><b>Status:</b></td><td><?php echo $sql_select['bug']['opraveno']; ?></td></tr> 12 12 <tr><td><b>Opravil:</b></td><td><?php echo $sql_select['bug']['opravil_nick']; ?></td></tr> 13 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>14 <tr><td colspan='3' class="text"><?php echo nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['popis'])); ?></td></tr> 15 15 <?php if( !empty($sql_select['bug']['popis_opravy']) ){ ?> 16 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>17 <tr><td colspan='3' class="text"><?php echo nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['popis_opravy'])); ?></td></tr> 18 18 <?php }; ?> 19 19 </table> -
db/index.php
r98 r102 14 14 @mysql_connect( $Config['DB_read']['Database']['Host'], $Config['DB_read']['Database']['User'], $Config['DB_read']['Database']['Password'] ) 15 15 OR DIE("<p>Vyskytla se chyba a nelze se připojit k databázi.<br> Zkuste to později.</p>"); 16 $DB_mangos = mysql_select_db($Config['DB_read']['DB_read']['Database_mangos']);17 if( !$DB_mangos ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_mangos']."!</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 18 /* $DB_realmd = mysql_select_db($Config['DB_read']['DB_read']['Database_realmd']); 19 19 if( !$DB_realmd ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>"); }; 20 20 $DB_web = mysql_select_db($Config['DB_read']['DB_read']['Database_web']); 21 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 NAMES ".$Config['DB_read']['DB_read']['Charset']);22 @mysql_query("SET CHARACTER SET utf8"); 23 23 24 24 /* =========== Speciální FCE =========== */ -
db/menu.php
r92 r102 57 57 if( $inside_submenu == 1 ){ $Generated_Menu .= " </ul></li>\n"; } 58 58 elseif( !empty($Generated_Menu) ){ $Generated_Menu .= "</li>\n"; } unset($inside_submenu); 59 60 59 $Generated_Menu .= " <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a>"; 61 62 60 $submenu = 1; 63 61 } 64 62 elseif($Menu[$klice[$i]][0] == 2){ 65 63 if( $submenu == 1 ){ $Generated_Menu .= "<ul>\n"; }; unset($submenu); 66 67 64 $Generated_Menu .= " <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a><li>\n"; 68 69 65 $inside_submenu = 1; 70 66 } 71 67 elseif($Menu[$klice[$i]][0] == 3){ 72 68 if( $submenu == 1 ){ $Generated_Menu .= "<ul>"; }; unset($submenu); 73 74 69 $Generated_Menu .= " <li>".$Menu[$klice[$i]][1]."</li>\n"; 75 76 70 $inside_submenu = 1; 77 71 } … … 79 73 $Generated_Menu .= " <li><a href=\"#\">Chyba !!</a>"; } 80 74 else{ $Generated_Menu .= " </ul></li>\n"; }; 75 }; 81 76 82 };83 84 77 return $Generated_Menu; 85 78 }; 86 79 87 /*88 <li><a href=""></a><ul>89 <li><a href=""></a></li>90 <li><a href=""></a></li>91 </ul></li>92 */93 94 80 ?> -
db/post_read.php
r92 r102 122 122 } 123 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>"); };124 mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 125 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 126 126 127 127 $sql_select = SQLselect_Strankovani("SELECT * FROM `bug_report` ORDER BY `opraveno` ASC, `vlozeno` DESC", $limit, 20, "?id=bugreport", $SID); … … 134 134 $sql_select['result'] .= "<a href=\"./index.php?id=bugreport&bug=".$result['id']."\">".@date("d.m.Y H:i", $result['vlozeno'])."</a>"; 135 135 $sql_select['result'] .= "</td><td valign='top'>"; 136 $sql_select['result'] .= nl2br( htmlentities($result['popis']));136 $sql_select['result'] .= nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $result['popis'])); 137 137 $sql_select['result'] .= "</td><td valign='top' align='right'>"; 138 138 if( $result['opraveno'] == 0 ){ … … 142 142 $sql_select['result'] .= "</td></tr>\n"; 143 143 }; 144 144 145 145 $sql_select['result'] .= "</table>\n"; 146 146 … … 149 149 } 150 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>"); };151 mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 152 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 153 153 154 154 $sql_select['sql'] = mysql_query("SELECT * FROM `bug_report` WHERE id=$bug LIMIT 1"); … … 166 166 } 167 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>"); };168 mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 169 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 170 170 171 171 $sql_insert['sql'] = "INSERT INTO `bug_report` (`nick`,`typ`,`vlozeno`,`popis`) VALUES('".$_POST['game_nick']."','".$_POST['err_type']."','".time()."','".$_POST['popis']."')";
Note:
See TracChangeset
for help on using the changeset viewer.