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
|
<?php require_once("check_login.php");
$slideid = (int)$_GET["slideid"];
$sql = "select * from slideshow where slideid = ?"; $parameters = array($slideid); $old_slideshow_info = bind_pdo($sql, $parameters, "selectone");
foreach ($arraylangcode as $langcode => $langname) { //unlink image $unlink_file_path = "../images/slideshow/".$old_slideshow_info["slideimg_".$langcode];
if( is_file ($unlink_file_path) ){ unlink($unlink_file_path); } }
$sql = "Update slideshow set deleted = ? WHERE slideid=?"; $parameters = array("1" ,$slideid); bind_pdo($sql, $parameters);
header("Location: slideshow_index.php?msg=3");
$dbh = null;
|