1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php require_once('check_login.php');
$id = (int)$_GET["id"];
$sql = "select * from news where id = ?"; $parameters = array($id); $old_news_info = bind_pdo($sql, $parameters, "selectone");
foreach ($arraylangcode as $langcode => $langname) { //unlink image $unlink_file_path = "../images/news/".$old_news_info["cover_img_".$langcode];
if( is_file ($unlink_file_path) ){ unlink($unlink_file_path); } }
// Delete Record $sql = "update news set deleted = ?, lastupdate = ?, lastupby = ? WHERE id=?"; $parameters = array("1", $nowdate, $_SESSION["cmsloginid"], $id); bind_pdo($sql, $parameters);
$dbh = null;
header("Location: news_index.php?msg=3&typeid=".$_GET["typeid"]);
|