blob: 8804d4acc4438bd610599135710ccfac53ef089e [file] [log] [blame]
<?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:
* Donald Smith (Eclipse Foundation)- initial API and implementation
*******************************************************************************/
#*****************************************************************************
#
# tags_management.php
#
# Author: Donald Smith
# Date: Jun 6th, 2008
#
# Description:
# Displays a list of current tags, allows adds, edits, and removals.
#****************************************************************************
include('scripts/common.php');
include('scripts/header.php');
?>
<h2>KPI Tags Management</h2>
<table style="border:1px solid #000;" cellspacing=0 cellpadding=1>
<tr class="header">
<td width="175">Tag Name</td>
<td width="75">Count</td>
</tr>
<?
$query = "select * from TagNames where is_industry_tag=1 order by tag_name asc";
$result = mysql_query($query);
while($tagIterator = mysql_fetch_array($result))
{
$id = $tagIterator['TagID'];
$tagName = $tagIterator['tag_name'];
$membershipTag = $tagIterator['is_membership_level_tag'];
$verifiedTag = $tagIterator['is_verified_tag'];
$alphaTag = $tagIterator['is_alphabetical_tag'];
$industryTag = $tagIterator['is_industry_tag'];
$projectTag = $tagIterator['is_project_tag'];
$subQuery = 'SELECT count(*) from OrganizationTags as ORGTAG
INNER JOIN organizations as ORG on ORGTAG.OrganizationID = ORG.organization_id
INNER JOIN OrganizationInformation as m on m.OrganizationID = ORGTAG.OrganizationID
WHERE ORGTAG.TagID = ' . $id . ' and ORG.member_type in ("AP", "AS", "SC", "SD")';
$subResult = mysql_query($subQuery);
// echo "ERROR1: ". mysql_error();
$count = mysql_result($subResult,0);
?>
<tr onMouseOver="this.style.background='#CDE3FB';" onMouseOut="this.style.background='#FFFFFF';">
<td><?=$tagName;?></td>
<td><?=$count;?></td>
</tr>
<?
}
?>
</table>
<?
include('scripts/footer.php');
?>