blob: 3b84f0e18189c902b6f417af62decfc0ec1daf74 [file]
<?php
/*******************************************************************************
* Copyright (c) 2006 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nathan Gervais (Eclipse Foundation)- initial API and implementation
*******************************************************************************/
#*****************************************************************************
#
# edit_tag.php
#
# Author: Nathan
# Date: February 6, 2007
#
# Description:
# Remove a member product
#****************************************************************************
include('scripts/common.php');
include('scripts/header.php');
if ($_POST['submit'])
{
$id = $_POST['ProductID'];
$orgID = $_POST['OrgID'];
$query = "delete from OrganizationProducts where ProductID = $id";
mysql_query($query);
?>
Product Removed Successfully</br>
<a href="product_management.php?id=<?=$orgID;?>">Return to Product Management</a>
<?
}
else
{
$_input_id = $_GET['id'];
$query = "SELECT name, OrganizationID FROM OrganizationProducts where ProductID = $_input_id";
//echo $query;
$result = mysql_query($query);
$productIterator = mysql_fetch_array($result);
$productName = $productIterator['name'];
$orgID = $productIterator['OrganizationID'];
?>
<form action="<?=$_SERVER['PHP_SELF'];?>" method="POST">
<input type="hidden" name="OrgID" value="<?=$orgID;?>">
<table>
<tr>
<td>Product ID:</td>
<td><input type="hidden" name="ProductID" value="<?=$_input_id;?>"><?=$_input_id;?></td>
</tr>
<tr>
<td>Product Name:</td>
<td><?=$productName;?></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Remove Product" name="submit"></td>
</table>
</form>
<?
}
include('scripts/footer.php');
?>