Skip to content

Commit

Permalink
Update news_edit.php
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue authored Mar 6, 2024
1 parent ac14c87 commit fbc3571
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions trunk/web/admin/news_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@

$content = str_replace("<p>", "", $content);
$content = str_replace("</p>", "<br />", $content);
$content = str_replace(",", "&#44;", $content);
// $content = str_replace(",", "&#44;", $content);

$user_id = $_SESSION[$OJ_NAME.'_'.'user_id'];
$news_id = intval($_POST['news_id']);

if(false){
$title = stripslashes($title);
$content = stripslashes($content);
}

$sql = "UPDATE `news` SET `title`=?,`time`=now(),`content`=?,user_id=?,`menu`=? WHERE `news_id`=?";
//echo $sql;
pdo_query($sql,$title,$content,$user_id,$menu,$news_id);
Expand Down

0 comments on commit fbc3571

Please sign in to comment.