Changeset 102


Ignore:
Timestamp:
Sep 30, 2007, 10:22:32 PM (17 years ago)
Author:
hosiplan
Message:

Doufám že teď už bude diakritika ok :)

Location:
db
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • db/config.sample.php

    r98 r102  
    1717  ),
    1818  'DB_read' => array(
    19     'Charset' => 'utf-8',
    2019    'Database_mangos' => 'mangos',
    2120    'Database_realmd' => 'realmd',
  • db/hlavni.php

    r92 r102  
    66  <head>
    77    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     8   
    89    <meta name="Description" content="<?php echo $Config['DB_read']['Description']; ?>">
    910    <meta name="robots" content="all, follow">
     
    1516  <body>
    1617    <div id="center"><div id="hlavni">
    17       <div id="top"><?php //require_once "user_center/user_menu.php"; ?></div>
     18      <div id="top"></div>
    1819      <div id="left">
    1920        <ul id="hlavni_menu">
  • db/include/bug_report.php

    r92 r102  
    77  <table border="0" id="sendbug" cellspacing="0" cellpadding="2">
    88    <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("&#60;","&#62;"), $sql_select['bug']['nick']); ?></td></tr>
    1010    <tr><td><b>Vlozeno:</b></td><td><?php echo @date("H:i d.m.Y", $sql_select['bug']['vlozeno']); ?></td></tr>
    1111    <tr><td><b>Status:</b></td><td><?php echo $sql_select['bug']['opraveno']; ?></td></tr>
    1212    <tr><td><b>Opravil:</b></td><td><?php echo $sql_select['bug']['opravil_nick']; ?></td></tr>
    1313    <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("&#60;","&#62;"), $sql_select['bug']['popis'])); ?></td></tr>
    1515<?php if( !empty($sql_select['bug']['popis_opravy']) ){ ?>
    1616    <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("&#60;","&#62;"), $sql_select['bug']['popis_opravy'])); ?></td></tr>
    1818<?php }; ?>
    1919  </table>
  • db/index.php

    r98 r102  
    1414  @mysql_connect( $Config['DB_read']['Database']['Host'], $Config['DB_read']['Database']['User'], $Config['DB_read']['Database']['Password'] )
    1515    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>");
    1818/*  $DB_realmd = mysql_select_db($Config['DB_read']['DB_read']['Database_realmd']);
    1919    if( !$DB_realmd ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>"); };
    2020  $DB_web = mysql_select_db($Config['DB_read']['DB_read']['Database_web']);
    2121    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");
    2323
    2424/* =========== Speciální FCE =========== */
  • db/menu.php

    r92 r102  
    5757        if( $inside_submenu == 1 ){ $Generated_Menu .= "          </ul></li>\n"; }
    5858        elseif( !empty($Generated_Menu) ){ $Generated_Menu .= "</li>\n"; } unset($inside_submenu);
    59 
    6059          $Generated_Menu .= "          <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a>";
    61 
    6260        $submenu = 1;
    6361        }
    6462      elseif($Menu[$klice[$i]][0] == 2){
    6563        if( $submenu == 1 ){ $Generated_Menu .= "<ul>\n"; }; unset($submenu);
    66 
    6764          $Generated_Menu .= "            <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a><li>\n";
    68 
    6965        $inside_submenu = 1;
    7066        }
    7167      elseif($Menu[$klice[$i]][0] == 3){
    7268        if( $submenu == 1 ){ $Generated_Menu .= "<ul>"; }; unset($submenu);
    73 
    7469          $Generated_Menu .= "          <li>".$Menu[$klice[$i]][1]."</li>\n";
    75 
    7670        $inside_submenu = 1;
    7771        }
     
    7973        $Generated_Menu .= "          <li><a href=\"#\">Chyba !!</a>"; }
    8074      else{ $Generated_Menu .= "          </ul></li>\n"; };
     75      };
    8176
    82       };
    83    
    8477    return $Generated_Menu;
    8578    };
    8679
    87 /*
    88           <li><a href=""></a><ul>
    89               <li><a href=""></a></li>
    90               <li><a href=""></a></li>
    91             </ul></li>
    92 */
    93 
    9480?>
  • db/post_read.php

    r92 r102  
    122122  }
    123123elseif( $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>");
    126126
    127127  $sql_select = SQLselect_Strankovani("SELECT * FROM `bug_report` ORDER BY `opraveno` ASC, `vlozeno` DESC", $limit, 20, "?id=bugreport", $SID);
     
    134134      $sql_select['result'] .= "<a href=\"./index.php?id=bugreport&amp;bug=".$result['id']."\">".@date("d.m.Y H:i", $result['vlozeno'])."</a>";
    135135      $sql_select['result'] .= "</td><td valign='top'>";
    136       $sql_select['result'] .= nl2br(htmlentities($result['popis']));
     136      $sql_select['result'] .= nl2br(preg_replace(array("(\<)","(\>)"), array("&#60;","&#62;"), $result['popis']));
    137137      $sql_select['result'] .= "</td><td valign='top' align='right'>";
    138138      if( $result['opraveno'] == 0 ){
     
    142142      $sql_select['result'] .= "</td></tr>\n";
    143143      };
    144 
     144 
    145145    $sql_select['result'] .= "</table>\n";
    146146
     
    149149  }
    150150elseif( $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>");
    153153
    154154  $sql_select['sql'] = mysql_query("SELECT * FROM `bug_report` WHERE id=$bug LIMIT 1");
     
    166166  }
    167167elseif( $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>");
    170170
    171171  $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.