Changeset 102 for db/post_read.php


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.