/var/www/hkosl.com/innoutstorage/webadmin/payment_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");

    
$payment_info get_payment_by_id((int)$_GET["id"]);

    if(
$payment_info["payable_type"] == "DEPOSIT"){
        
$return_link "deposit_modifyform.php?id=".$payment_info["payable_id"];
    }

    if(
$payment_info["payable_type"] == "INVOICE"){
        
$return_link "invoice_modifyform.php?id=".$payment_info["payable_id"];
    }

    
$sql "update payment set deleted = 1 where id = ? and status = 'NEW'";
    
$parameters = array((int)$_GET["id"]);
    
bind_pdo($sql$parameters);

    
$dbh null;

    
header("Location: " $return_link);