/var/www/hkosl.com/alliancealliance/webadmin/menu_delete.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
    
require_once("check_login.php");

    
$parent_id = (int)$_GET["parent_id"];
    
$id        = (int)$_GET["id"];
    
$sort      = (int)$_GET["sort"];

    
//set this category delete as 1
    
$sql        "update menu set deleted=?, lastupdate=?, lastupby=? where id=? and level_num > ?";
    
$parameters = array(1$nowdate, (int)$_SESSION['cmsloginid'], $id1);
    
bind_pdo($sql$parameters);

    
//update sort
    
$sql        "update menu set sort = sort - 1 where sort > ? and parent_id = ?";
    
$parameters = array($sort$parent_id);
    
bind_pdo($sql$parameters);

    
$dbh null;

    
header("Location: menu_index.php?pid=$parent_id&msg=3");