blob: 4ab8ea2f3b76dd72f46c338e05481d45ca792691 [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 association
#****************************************************************************
include('scripts/common.php');
include('scripts/header.php');
if ($_POST['submit'])
{
$id = $_POST['OrganizationID'];
$query = "delete from OrganizationInformation where OrganizationID = $id";
mysql_query($query);
$relationshipQuery = "delete from OrganizationTags where OrganizationID = $id";
mysql_query($relationshipQuery);
?>
Member Removed Successfully</br>
<a href="member_management.php">Return to Member Management</a>
<?
}
else
{
$_input_id = $_GET['id'];
$query = "SELECT organization_id, name1 FROM organizations WHERE organization_id = $_input_id";
//echo $query;
$result = mysql_query($query);
$orgIterator = mysql_fetch_array($result);
$id = $orgIterator['organization_id'];
$orgName = $orgIterator['name1'];
$relationshipQuery = "SELECT TAG.tag_name, ORGTAG.TagID from OrganizationTags as ORGTAG INNER JOIN TagNames as TAG on ORGTAG.TagID = TAG.TagId WHERE ORGTAG.OrganizationID = $id ORDER by TAG.tag_name";
$relationshipResult = mysql_query($relationshipQuery);
while ($relationshipIterator = mysql_fetch_array($relationshipResult))
{
$tagName = $relationshipIterator['tag_name'];
$existingRelationships .= $tagName . "<br/>";
}
?>
<form action="<?=$_SERVER['PHP_SELF'];?>" method="POST">
<table>
<tr>
<td>Organization ID:</td>
<td><input type="hidden" name="OrganizationID" value="<?=$id;?>"><?=$id;?></td>
</tr>
<tr>
<td>Organization Name:</td>
<td><?=$orgName;?></td>
</tr>
<tr>
<td colspan=2><br/>This Member has existing relationships with:<br/><b><?=$existingRelationships;?></b><br/>These relationships will be removed if you confirm.</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Remove Member" name="submit"></td>
</table>
</form>
<?
}
include('scripts/footer.php');
?>