/
delete_product_software.php
41 lines (33 loc) · 1.3 KB
/
delete_product_software.php
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
// delete_product_software.php
//
// SiT (Support Incident Tracker) - Support call tracking system
// Copyright (C) 2000-2009 Salford Software Ltd. and Contributors
//
// This software may be used and distributed according to the terms
// of the GNU General Public License, incorporated herein by reference.
//
// Author: Ivan Lucas <ivanlucas[at]users.sourceforge.net>
// Removes link between a product and software
$permission = 24; // Add Product
require ('core.php');
require (APPLICATION_LIBPATH . 'functions.inc.php');
$title = "{$strDisassociateSkillWithProduct}";
// This page requires authentication
require (APPLICATION_LIBPATH . 'auth.inc.php');
// External variables
$productid = cleanvar($_REQUEST['productid']);
$softwareid = cleanvar($_REQUEST['softwareid']);
if (!empty($productid) && !empty($softwareid))
{
$sql = "DELETE FROM `{$dbSoftwareProducts}` WHERE productid='$productid' AND softwareid='$softwareid' LIMIT 1";
mysql_query($sql);
if (mysql_error()) trigger_error("MySQL Query Error ".mysql_error(), E_USER_ERROR);
journal(CFG_LOGGING_NORMAL, 'Skill Unlinked', "Skill $softwareid was unlinked from Product $productid", CFG_JOURNAL_PRODUCTS, $productid);
html_redirect("products.php");
}
else
{
html_redirect("products.php", FALSE, "{$strRequiredDataMissing}");
}
?>