diff options
| author | Christopher Guindon | 2016-06-14 18:31:15 +0000 |
|---|---|---|
| committer | Christopher Guindon | 2016-06-15 13:54:50 +0000 |
| commit | 6cf361d51e87a17d55df26fe1bf249bc81766972 (patch) | |
| tree | 5f9100f697018fc21106357124244161171f2b18 | |
| parent | a653c01e71131bae13cbe3d329e57722c5b39fdc (diff) | |
| download | dev.eclipse.org-6cf361d51e87a17d55df26fe1bf249bc81766972.tar.gz dev.eclipse.org-6cf361d51e87a17d55df26fe1bf249bc81766972.tar.xz dev.eclipse.org-6cf361d51e87a17d55df26fe1bf249bc81766972.zip | |
Bug 2067 - Clean up dev.eclipse.org
This patch also wraps the Eclipse Infra status page with the solstice
theme. I am keeping committers/css, committers/html and committers/js
since this template is currently being used on more than 20 pages. I
needed to include committers/menu/menu.php since it's currently being
used on the same page of this old template.
Change-Id: I31456f5cdf80130a16c50e57216cd2e517830f42
Signed-off-by: Christopher Guindon <chris.guindon@eclipse.org>
94 files changed, 562 insertions, 6664 deletions
diff --git a/committers/categories/add_category.php b/committers/categories/add_category.php deleted file mode 100755 index 58a4a7d..0000000 --- a/committers/categories/add_category.php +++ /dev/null @@ -1,40 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # add_category.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This file adds a Category to the database - #**************************************************************************** - - require_once ("includes/header.php"); - - $category_shortname = htmlentities($_POST['catShortName']); - $description = htmlentities($_POST['description']); - - $query = "INSERT INTO categories (category_shortname, description) values ('$category_shortname', '$description')"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - <html> - <body> - <h2>Category Added Successfully</h2> - <a href="categories.php">Return to Categories</a> - </body> - <html> -
\ No newline at end of file diff --git a/committers/categories/add_prj_category.php b/committers/categories/add_prj_category.php deleted file mode 100755 index 2023af5..0000000 --- a/committers/categories/add_prj_category.php +++ /dev/null @@ -1,42 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # add_category.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This file adds a Category to the database - #**************************************************************************** - - require_once ("includes/header.php"); - - $prj_id = htmlentities($_POST['prj_id']); - $cat_id = htmlentities($_POST['cat_id']); - $shortname = htmlentities($_POST['shortname']); - $description = htmlentities($_POST['description']); - - $query = "INSERT INTO project_categories (project_id, category_id, description, long_description) values ('$prj_id', '$cat_id', '$shortname', '$description')"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - <html> - <body> - <h2>Project Category Association Added Successfully</h2> - <a href="project_categories.php">Return to Project Categories</a> - </body> - <html> -
\ No newline at end of file diff --git a/committers/categories/categories.php b/committers/categories/categories.php deleted file mode 100755 index 144fde8..0000000 --- a/committers/categories/categories.php +++ /dev/null @@ -1,85 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # categories.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This page displays the contents of the categories DB. - #**************************************************************************** - require_once ("includes/header.php"); - - $query = "Select * from categories"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - - <html> - <body> - <h2>Category Database Contents</h2> - - <table border="1"> - <tr> - <td>Category ID</td> - <td>Category ShortName</td> - <td>Long Description</td> - <td></td> - <td></td> - </tr> - <? while ($dbiterator = mysql_fetch_array($result)) - { - $id = $dbiterator["category_id"]; - $shortname = $dbiterator["category_shortname"]; - $long_desc = $dbiterator["description"]; - ?> - <tr> - <td><?=$id;?></td> - <td><?=$shortname;?></td> - <td><?=$long_desc;?></td> - <td><a href="edit_category.php?id=<?=$id;?>">Edit</a> - <td><a href="delete_category.php?id=<?=$id;?>">Delete</a> - </tr> - <? - } - ?> - </table> - <br/> - <h2>Add a Category</h2><br/> - <form action="add_category.php" method="POST"> - <table> - <tr> - <td>Category Shortname :</td> - <td><input name="catShortName" type="text"></td> - </tr> - <tr> - <td>Long Description :</td> - <td> - <textarea name="description" rows="10" cols="50" wrap="off"> - </textarea> - </td> - </tr> - <tr> - <td></td> - <td><input type="submit" name="submit" value="Add Category"/></td> - </tr> - </table> - </form> - </body> - </html> - - -
\ No newline at end of file diff --git a/committers/categories/delete_category.php b/committers/categories/delete_category.php deleted file mode 100755 index 41d5328..0000000 --- a/committers/categories/delete_category.php +++ /dev/null @@ -1,39 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # add_category.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This file adds a Category to the database - #**************************************************************************** - - require_once ("includes/header.php"); - - $id = $_GET['id'] ? $_GET['id'] : $_POST['id']; - - $query = "DELETE FROM categories where category_id = $id"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - <html> - <body> - <h2>Category Deleted Successfully</h2> - <a href="categories.php">Return to Categories</a> - </body> - <html> -
\ No newline at end of file diff --git a/committers/categories/delete_prj_category.php b/committers/categories/delete_prj_category.php deleted file mode 100755 index 5100fec..0000000 --- a/committers/categories/delete_prj_category.php +++ /dev/null @@ -1,41 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # delete_prj_category.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This file deletes a project category association - #**************************************************************************** - - require_once ("includes/header.php"); - - $prj_id = $_GET['prj_id'] ? $_GET['prj_id'] : $_POST['prj_id']; - $cat_id = $_GET['cat_id'] ? $_GET['cat_id'] : $_POST['cat_id']; - - - $query = "DELETE FROM project_categories WHERE category_id = $cat_id AND project_id = '$prj_id'"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - <html> - <body> - <h2>Project Category Association Deleted Successfully</h2> - <a href="project_categories.php">Return to Project Categories</a> - </body> - <html> -
\ No newline at end of file diff --git a/committers/categories/edit_category.php b/committers/categories/edit_category.php deleted file mode 100755 index 85e77fb..0000000 --- a/committers/categories/edit_category.php +++ /dev/null @@ -1,79 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # add_category.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This file adds a Category to the database - #**************************************************************************** - - require_once ("includes/header.php"); - - $id = $_GET['id'] ? $_GET['id'] : $_POST['id']; - $submit = $_GET['submit'] ? $_GET['submit'] : $_POST['submit']; - - if ($submit == "Edit Category") - { - $catShortName = htmlentities($_GET['catShortName'] ? $_GET['catShortName'] : $_POST['catShortName']); - $description = htmlentities($_GET['description'] ? $_GET['description'] : $_POST['description']); - $query = "UPDATE categories set category_shortname = '$catShortName', description = '$description' where category_id = $id"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - <html> - <body> - <h2>Category Edited Successfully</h2> - <a href="categories.php">Return to Categories</a> - </body> - <html> - <? - } - else - { - $query = "Select * from categories where category_id = $id"; - $result = mysql_query($query); - echo mysql_error(); - - $dbiterator = mysql_fetch_array($result); - $catShortName = $dbiterator["category_shortname"]; - $description = $dbiterator["description"]; - ?> - <html> - <body> - <h2>Edit a Category</h2><br/> - <form action="edit_category.php" method="POST"> - <table> - <tr> - <td>Category Shortname :</td> - <td><input name="catShortName" value="<?=$catShortName;?>" type="text"></td> - </tr> - <tr> - <td>Long Description :</td> - <td> - <textarea name="description" rows="10" cols="50" wrap="off"><?=$description;?></textarea> - </td> - </tr> - <tr> - <td><input type="hidden" name="id" value="<?=$id;?>"></td> - <td><input type="submit" name="submit" value="Edit Category"/></td> - </tr> - </table> - </form> - </body> - <html> - <? } ?>
\ No newline at end of file diff --git a/committers/categories/edit_prj_category.php b/committers/categories/edit_prj_category.php deleted file mode 100755 index c54e450..0000000 --- a/committers/categories/edit_prj_category.php +++ /dev/null @@ -1,89 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # add_category.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This file adds a Category to the database - #**************************************************************************** - - require_once ("includes/header.php"); - - $prj_id = $_GET['prj_id'] ? $_GET['prj_id'] : $_POST['prj_id']; - $cat_id = $_GET['cat_id'] ? $_GET['cat_id'] : $_POST['cat_id']; - $submit = $_GET['submit'] ? $_GET['submit'] : $_POST['submit']; - - if ($submit == "Edit Project Category") - { - - $shortname = htmlentities($_GET['shortname'] ? $_GET['shortname'] : $_POST['shortname']); - $description = htmlentities($_GET['description'] ? $_GET['description'] : $_POST['description']); - $query = "UPDATE project_categories set category_id = $cat_id, description = '$shortname', long_description = '$description' WHERE project_id = '$prj_id' AND category_id = $cat_id"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - <html> - <body> - <h2>Project Category Edited Successfully</h2> - <a href="project_categories.php">Return to Project Category Associations</a> - </body> - <html> - <? - } - else - { - $query = "Select * from project_categories where category_id = $cat_id AND project_id = '$prj_id'"; - $result = mysql_query($query); - echo mysql_error(); - - $dbiterator = mysql_fetch_array($result); - $shortname = $dbiterator["description"]; - $description = $dbiterator["long_description"]; - ?> - <html> - <body> - <h2>Edit a Project Category Association</h2><br/> - <form action="edit_prj_category.php" method="POST"> - <table> - <tr> - <td>Project ID :</td> - <td><?=$prj_id;?></td> - </tr> - <tr> - <td>Category ID :</td> - <td><input name="cat_id" value="<?=$cat_id;?>" type="text"></td> - </tr> - <tr> - <td>Short Description:</td> - <td><input name="shortname" value="<?=$shortname;?>" type="text"></td> - </tr> - <tr> - <td>Long Description :</td> - <td> - <textarea name="description" rows="10" cols="50" wrap="off"><?=$description;?></textarea> - </td> - </tr> - <tr> - <td><input type="hidden" name="prj_id" value="<?=$prj_id;?>"></td> - <td><input type="submit" name="submit" value="Edit Project Category"/></td> - </tr> - </table> - </form> - </body> - <html> - <? } ?>
\ No newline at end of file diff --git a/committers/categories/edit_project.php b/committers/categories/edit_project.php deleted file mode 100755 index e44a569..0000000 --- a/committers/categories/edit_project.php +++ /dev/null @@ -1,106 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # add_category.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This file adds a Project to the database - #**************************************************************************** - - require_once ("includes/header.php"); - - $id = $_GET['id'] ? $_GET['id'] : $_POST['id']; - $submit = $_GET['submit'] ? $_GET['submit'] : $_POST['submit']; - - if ($submit == "Edit Project") - { - $url_newsgroup = htmlentities($_GET['url_newsgroup'] ? $_GET['url_newsgroup'] : $_POST['url_newsgroup']); - $url_mailinglist = htmlentities($_GET['url_mailinglist'] ? $_GET['url_mailinglist'] : $_POST['url_mailinglist']); - $url_wiki = htmlentities($_GET['url_wiki'] ? $_GET['url_wiki'] : $_POST['url_wiki']); - $url_docs= htmlentities($_GET['url_docs'] ? $_GET['url_docs'] : $_POST['url_docs']); - - $query = "UPDATE projects SET url_newsgroup = '$url_newsgroup', url_mailinglist = '$url_mailinglist', url_wiki = '$url_wiki', url_docs = '$url_docs' WHERE project_id = '$id'"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - <html> - <body> - <h2>Project Edited Successfully</h2> - <a href="projects.php">Return to Projects</a> - </body> - <html> - <? - } - else - { - $query = "Select * from projects where project_id = '$id'"; - $result = mysql_query($query); - echo mysql_error(); - - $dbiterator = mysql_fetch_array($result); - $project_id = $dbiterator["project_id"]; - $url_newsgroup = $dbiterator["url_newsgroup"]; - $url_mailinglist = $dbiterator["url_mailinglist"]; - $url_wiki = $dbiterator["url_wiki"]; - $url_docs = $dbiterator["url_docs"]; - - $catShortName = $dbiterator["category_shortname"]; - $description = $dbiterator["description"]; - ?> - <html> - <body> - <h2>Edit a Project</h2><br/> - <form action="edit_project.php" method="POST"> - <table> - <tr> - <td>Project Id :</td> - <td><?=$project_id;?></td> - </tr> - <tr> - <td>Newsgroup URL:</td> - <td> - <input type="text" name="url_newsgroup" value="<?=$url_newsgroup;?>"> - </td> - </tr> - <tr> - <td>MailingList URL:</td> - <td> - <input type="text" name="url_mailinglist" value="<?=$url_mailinglist;?>"> - </td> - </tr> - <tr> - <td>Wiki URL:</td> - <td> - <input type="text" name="url_wiki" value="<?=$url_wiki;?>"> - </td> - </tr> - <tr> - <td>Docs URL:</td> - <td> - <input type="text" name="url_docs" value="<?=$url_docs;?>"> - </td> - </tr> - <tr> - <td><input type="hidden" name="id" value="<?=$id;?>"></td> - <td><input type="submit" name="submit" value="Edit Project"/></td> - </tr> - </table> - </form> - </body> - <html> - <? } ?>
\ No newline at end of file diff --git a/committers/categories/includes/header.php b/committers/categories/includes/header.php deleted file mode 100755 index 26c2755..0000000 --- a/committers/categories/includes/header.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -if ($_SERVER['SERVER_NAME'] != 'dev.localhost') { - require_once ($documentRoot . "/eclipse.org-common/system/app.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php"); - - $App = new App(); - $App->runStdWebAppCacheable(); - - $LDAPPerson = new LDAPPerson(); - $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - include("../html/header.php"); - - $Menu = new Menu("en"); - $Menu->addMenuItem("Categories Database Home", "index.php", "_self"); - include("../modules/menu.php"); - } -?> diff --git a/committers/categories/index.php b/committers/categories/index.php deleted file mode 100755 index d4f57a1..0000000 --- a/committers/categories/index.php +++ /dev/null @@ -1,178 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # sql.php - # - # Author: Nathan Gervais - # Date: Oct 31st, 2008 - # - # Description: - # Category Meta-Data Management Tool. - #**************************************************************************** - $documentRoot = $_SERVER['DOCUMENT_ROOT']; - //require_once("C:\httproot\krumo\class.krumo.php"); - require_once ("includes/header.php"); - require_once ($documentRoot . "/eclipse.org-common/system/app.class.php"); - require_once ($documentRoot . "/eclipse.org-common/classes/projects/projectInfoList.class.php"); - $App = new App(); - - - function retrieveCategories($categoryList, $projectID, $App) { - foreach ($categoryList as $cl) - { - $categoriesString .= "\"". $cl . "\", "; - } - $categoriesString = trim($categoriesString); - $categoriesString = trim($categoriesString, ','); - $sql = "SELECT piv.value from ProjectInfoValues as piv - INNER JOIN ProjectInfo as pi on pi.ProjectInfoID = piv.ProjectInfoID - WHERE pi.MainKey = 'categories' and piv.Value IN ($categoriesString) and pi.ProjectID = \"$projectID\" ORDER by piv.value"; - $result = $App->eclipse_sql($sql); - while ($rr = mysql_fetch_array($result)) - { - $categoriesFoundArray[] = $rr['value']; - } - if (count($categoriesFoundArray) == 0) - { - $categoriesFoundArray = array(); - } - foreach ($categoryList as $cl){ - if (array_search($cl, $categoriesFoundArray) !== FALSE ) - { - $categoriesDiscovered[$cl]=1; - } - } - if (count($categoriesDiscovered) == 0) - { - $categoriesDiscovered = array(); - } - return $categoriesDiscovered; - } - - function gatherAndUpdateRecord($categoryList, $projectID, $_POST, $App) - { - foreach($categoryList as $cl){ - $categoryUpdateList[$cl] = array_key_exists($cl, $_POST); - } - if ($_POST['other'] != ""){ - $other = $_POST['other']; - $categoryUpdateList[$other] = TRUE; - } - foreach ($categoryUpdateList as $culKey => $cul) - { - insertUpdate($culKey, $cul, $projectID, $App); - } - } - - function insertUpdate($category, $value, $projectID, $App){ - if ($value == TRUE) { - $checkSQL = "SELECT pi.ProjectInfoID from ProjectInfoValues as piv - INNER JOIN ProjectInfo as pi on pi.ProjectInfoID = piv.ProjectInfoID - WHERE pi.MainKey = 'categories' and pi.ProjectID = '$projectID' and piv.Value = '$category'"; - $result = $App->eclipse_sql($checkSQL); - if (mysql_num_rows($result) == 0) - { - $insertSQL = "INSERT INTO ProjectInfo VALUES (NULL, '$projectID', 'categories', NULL)"; - $result = $App->eclipse_sql($insertSQL); - $insertSQL = "INSERT INTO ProjectInfoValues (ProjectInfoID, SubKey, Value) VALUES (LAST_INSERT_ID(), '', '$category')"; - $result = $App->eclipse_sql($insertSQL); - - echo "$projectID - $category - Added<br/>"; - } - } - else { - $checkSQL = "SELECT pi.ProjectInfoID from ProjectInfoValues as piv - INNER JOIN ProjectInfo as pi on pi.ProjectInfoID = piv.ProjectInfoID - WHERE pi.MainKey = 'categories' and pi.ProjectID = '$projectID' and piv.Value = '$category'"; - $result = $App->eclipse_sql($checkSQL); - if (mysql_num_rows($result) == 1) - { - $ra = mysql_fetch_array($result); - $ProjectInfoID = $ra['ProjectInfoID']; - $deleteSQL = "DELETE FROM ProjectInfo where ProjectInfoID = $ProjectInfoID"; - $result = $App->eclipse_sql($deleteSQL); - - echo "$projectID - $category - Removed<br/>"; - } - } - } - - $distinctCatSql = "SELECT DISTINCT piv.value from ProjectInfoValues as piv - INNER JOIN ProjectInfo as pi on pi.ProjectInfoID = piv.ProjectInfoID - WHERE pi.MainKey = 'categories' ORDER by piv.value"; - $result = $App->eclipse_sql($distinctCatSql); - while ($rr = mysql_fetch_array($result)) - { - $categoryArray[] = $rr['value']; - } - - - - $distinctIDSql = "SELECT DISTINCT ProjectID from ProjectInfo ORDER BY ProjectID"; - $result = $App->eclipse_sql($distinctIDSql); - while ($rr = mysql_fetch_array($result)) - { - $pidArray[] = $rr['ProjectID']; - } - - $ProjectInfoList = new ProjectInfoList(); - - - ?> - <html> - <body> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="post"> - <select name="projectID"> - <? foreach ($pidArray as $pid) - { - $selected = ""; - if ($_POST['projectID'] == $pid) - { - $selected = "selected"; - } - echo "<option value=\"$pid\" $selected>$pid</option>"; - } ?> - </select> - <input name="viewCat" type="submit" value="View Categories"/> - </form> - - <? - if (isset($_POST['viewCat'])) - { - $retCat = retrieveCategories($categoryArray,$_POST['projectID'], $App); - ?><h1>Categories found for <?=$_POST['projectID'];?></h1> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="post"> - <input type="hidden" name="projectID" value="<?=$_POST['projectID'];?>"/> - <? - foreach ($categoryArray as $ca){ ?> - <input type="checkbox" name="<?=$ca;?>" <? if (array_key_exists($ca, $retCat) !== FALSE) echo "checked";?>/><?=$ca;?><br/> - <? } ?> - <input type="text" name="other"/> Other<br/> - <input type="submit" name="modify" value="Update Category"/> - </form> - <? - } - if (isset($_POST['modify'])) - { - $projectID = $_POST['projectID']; - echo "Received Update Record for $projectID"; - gatherAndUpdateRecord($categoryArray, $projectID, $_POST, $App); - } - ?> - - </body> - </html> - - -
\ No newline at end of file diff --git a/committers/categories/project_categories.php b/committers/categories/project_categories.php deleted file mode 100755 index c90a9b3..0000000 --- a/committers/categories/project_categories.php +++ /dev/null @@ -1,92 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # project_categories.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This page displays the contents of the project_categories DB. - #**************************************************************************** - require_once ("includes/header.php"); - - $query = "Select * from project_categories order by category_id"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - - <html> - <body> - <h2>Project_Categories Database Contents</h2> - - <table border="1"> - <tr> - <td>Project ID</td> - <td>Category ID</td> - <td>Short Description</td> - <td>Long Description</td> - <td></td> - <td></td> - </tr> - <? while ($dbiterator = mysql_fetch_array($result)) - { - $prj_id = $dbiterator["project_id"]; - $cat_id = $dbiterator["category_id"]; - $shortname = $dbiterator["description"]; - $long_desc = $dbiterator["long_description"]; - ?> - <tr> - <td><?=$prj_id;?></td> - <td><?=$cat_id;?></td> - <td><?=$shortname;?></td> - <td><?=$long_desc;?></td> - <td><a href="edit_prj_category.php?prj_id=<?=$prj_id;?>&cat_id=<?=$cat_id;?>">Edit</a> - <td><a href="delete_prj_category.php?prj_id=<?=$prj_id;?>&cat_id=<?=$cat_id;?>">Delete</a> - </tr> - <? - } - ?> - </table> - <br/> - <h2>Add a Project Category Association</h2><br/> - <form action="add_prj_category.php" method="POST"> - <table> - <tr> - <td>Project ID :</td> - <td><input name="prj_id" type="text"></td> - </tr> - <tr> - <td>Category ID :</td> - <td><input name="cat_id" type="text"></td> - </tr> - <tr> - <td>Short Description :</td> - <td><input name="shortname" type="text"></td> - </tr> - <tr> - <td>Long Description :</td> - <td> - <textarea name="description" rows="10" cols="50" wrap="off"></textarea> - </td> - </tr> - <tr> - <td></td> - <td><input type="submit" name="submit" value="Add Project Category Association"/></td> - </tr> - </table> - </form> - </body> - </html>
\ No newline at end of file diff --git a/committers/categories/projects.php b/committers/categories/projects.php deleted file mode 100755 index 909768c..0000000 --- a/committers/categories/projects.php +++ /dev/null @@ -1,93 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # projects.php - # - # Author: Nathan Gervais - # Date: Nov 3rd, 2006 - # - # Description: - # This page displays the projects DB - #**************************************************************************** - require_once ("includes/header.php"); - - $query = "Select * from projects"; - $result = mysql_query($query); - echo mysql_error(); - - ?> - - <html> - <body> - <h2>Project Database Contents</h2> - - <table border="1" style="font-size:9pt;"> - <tr> - <td>Project ID</td> - <td>Name</td> - <td>Newsgroup URL</td> - <td>Mailing List URL</td> - <td>Wiki URL</td> - <td>Docs URL</td> - <td></td> - <td></td> - </tr> - <? while ($dbiterator = mysql_fetch_array($result)) - { - $id = $dbiterator["project_id"]; - $name = $dbiterator["name"]; - $url_newsgroup = $dbiterator["url_newsgroup"]; - $url_mailinglist = $dbiterator["url_mailinglist"]; - $url_wiki = $dbiterator["url_wiki"]; - $url_docs = $dbiterator["url_docs"]; - ?> - <tr> - <td><?=$id;?></td> - <td><?=$name;?></td> - <td><?=$url_newsgroup;?></td> - <td><?=$url_mailinglist;?></td> - <td><?=$url_wiki;?></td> - <td><?=$url_docs;?></td> - <td><a href="edit_project.php?id=<?=$id;?>">Edit</a> - <td><a href="delete_project.php?id=<?=$id;?>">Delete</a> - </tr> - <? - } - ?> - </table> - <br/> - <h2>Add a Category</h2><br/> - <form action="add_category.php" method="POST"> - <table> - <tr> - <td>Category Shortname :</td> - <td><input name="catShortName" type="text"></td> - </tr> - <tr> - <td>Long Description :</td> - <td> - <textarea name="description" rows="10" cols="50" wrap="off"></textarea> - </td> - </tr> - <tr> - <td></td> - <td><input type="submit" name="submit" value="Add Category"/></td> - </tr> - </table> - </form> - </body> - </html> - - -
\ No newline at end of file diff --git a/committers/classes/ldap.class.php b/committers/classes/ldap.class.php deleted file mode 100755 index f2360e3..0000000 --- a/committers/classes/ldap.class.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -class Ldap { - #***************************************************************************** - # - # ldap.class.php - # - # Author: Denis Roy - # Date: 2005-12-12 - # - # Description: functions for querying LDAP - # - # HISTORY: - # - #**************************************************************************** - - var $ldaphost = "main"; - var $list = array(); - - function getUserGroupList($_uid_dn) { - /* @return: Array of Strings - * - * Using the DN passed as a param, query LDAP to get User groups (DN) - * - * 2005-12-06: droy - * - initial code - */ - - - if($_uid_dn != "") { - $ds = ldap_connect($this->ldaphost); - ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); - if ($ds) { - $r = @ldap_bind($ds); # anonymous bind - - if($r) { - $sr = ldap_search($ds, "ou=group,dc=eclipse,dc=org", "(cn=*)"); - - $groupList = ldap_get_entries($ds, $sr); - - for( $i = 0; $i < $groupList["count"]; $i++ ) { - for($j=0; $j<$groupList[$i]["member"]["count"]; $j++) { - $data2 = $groupList[$i]["member"][$j]; - if($data2 == $_uid_dn) { - $this->list[count($this->list)] = $groupList[$i]["dn"]; - } - } - } - } - } - ldap_close($ds); - } - - return $this->list; - } -} -?>
\ No newline at end of file diff --git a/committers/committertools/adReports.php b/committers/committertools/adReports.php index c8e88cd..b468a24 100755 --- a/committers/committertools/adReports.php +++ b/committers/committertools/adReports.php @@ -27,6 +27,7 @@ header("Content-type: text/html; charset=utf-8"); $App->preventCaching(); ob_start(); +print '<h1>' . $pageTitle . '</h1>'; print $AdReports->outputPage(); $html = ob_get_clean(); diff --git a/committers/committertools/groups.php b/committers/committertools/groups.php deleted file mode 100755 index b895a29..0000000 --- a/committers/committertools/groups.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php"); - require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/projectList.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/system/dbconnection_foundation_ro.class.php"); - require_once($_SERVER['DOCUMENT_ROOT'] . "/committers/classes/ldap.class.php"); - - - #***************************************************************************** - # - # project_category_list.php - # - # Author: Denis Roy - # Date: 2005-04-04 - # - # Description: manage project Categories for Downloads By Topic page, - # - # HISTORY: - # - #**************************************************************************** - - $App = new App(); - $App->runStdWebAppCacheable(); - $ErrorMessage = ""; - - $LDAPPerson = new LDAPPerson(); - $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - # Incoming parameters - $_STATE = ($_GET['state'] ? $_GET['state'] : $_POST['state']); - $_PROJECT_ID = ($_GET['project_id'] ? $_GET['project_id'] : $_POST['project_id']); - $_CATEGORY_ID = ($_GET['category_id'] ? $_GET['category_id'] : $_POST['category_id']); - - $ProjectList = new ProjectList(); - $Ldap = new Ldap(); - - $GroupList = $Ldap->getUserGroupList($LDAPPerson->getDN()); - sort($GroupList); - -/* - # Load quota info - $UsedArray = array(); - $QuotaArray = array(); - $fileName = "/home/data/common/monitor/quotas.txt"; - $fileContents = file_get_contents($fileName); - $lines = explode("\n", $fileContents); - for($i = 0; $i < count($lines); $i++) { - $lines[$i] = str_replace(" ", " ", $lines[$i]); - $lines[$i] = str_replace(" ", " ", $lines[$i]); - $lines[$i] = str_replace(" ", "|", $lines[$i]); - $parts = explode("|", $lines[$i]); - $UsedArray[$parts[0]] = sprintf("%.2f", $parts[2] / 1024); - $QuotaArray[$parts[0]] = sprintf("%.2f", $parts[4] / 1024); - } - */ - - include("inc/en_groups.php"); - -?> -
\ No newline at end of file diff --git a/committers/committertools/inc/en_groups.php b/committers/committertools/inc/en_groups.php deleted file mode 100755 index 2de692d..0000000 --- a/committers/committertools/inc/en_groups.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - #***************************************************************************** - # - # en_status.inc - # - # Author: Denis Roy - # Date: 2004-09-10 - # - # Description: Infrastructure status UI - # - # HISTORY: - # - #**************************************************************************** - - include("../html/header.php"); - - $Menu = new Menu("en"); - - include("../modules/menu.php"); - -?> - <br /> - <td width="100%" valign="top" class="normal"> - <form name="form1" method="post"> - <font class="large_title">UNIX groups</font><br /><br /> - - You are a member of the UNIX groups below. Disk quotas are updated hourly.<br /><br /> - - <?= $ErrorMessage != "" ? "<font class='error'>" . $ErrorMessage . "</font>" : "" ?> - - <table width="100%" cellpadding="0" cellspacing="0" border="0" class="rect_header"> - <tr height="<?= $App->getDefaultRowHeight() ?>"> - <td width="5"></td> - <td nowrap="true" class="rect_header">My groups</td> - <td width="100%"></td> - <td nowrap="true" id="action_bar"> - </td> - </tr> - <tr> - <td height="1"></td> - </tr> - </table> - <table width="100%" cellpadding="0" cellspacing="0" border="0" class="normal"> - <tr class="list_column_header" height="<?= $App->getDefaultRowHeight() ?>"> - <td width="5"></td> - <td><b>Group</b></td> - </tr> -<?php - for($i = 0; $i < count($GroupList); $i++) { - $GroupName = str_replace(",ou=group,dc=eclipse,dc=org", "", $GroupList[$i]); - $GroupName = str_replace("cn=", "", $GroupName); - - # Get quota info -?> - <tr height="<?= $App->getDefaultRowHeight() ?>" class="data<?= $i % 2 ?>"> - <td width="5"></td> - <td><?= $GroupName ?></td> - </tr> - <tr height="1" class="menu_border"> - <td colspan="7"></td> - </tr> - -<?php - } -?> - </table> - <table width="100%" cellpadding="0" cellspacing="0" border="0" class="normal"> - <tr height="1"> - <td colspan="2"></td> - </tr> - <tr class="list_column_header"> - <td width="5"></td> - <td><b><?= $i ?> group<?= $i != 1 ? "s" : "" ?> found.</td> - </tr> - </table> - </form> - </td> -<?php - include("../html/footer.php"); -?> diff --git a/committers/help/howdoi.php b/committers/help/howdoi.php deleted file mode 100755 index f0f2d49..0000000 --- a/committers/help/howdoi.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - header("Location: http://wiki.eclipse.org/IT_Infrastructure_Doc"); - exit; - require_once("/home/data/httpd/eclipse-php-classes/system/app.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php"); - - #***************************************************************************** - # - # status.php - # - # Author: Denis Roy - # Date: 2005-04-04 - # - # Description: Get infrastructure status - # - # HISTORY: - # - #**************************************************************************** - - $App = new App(); - $App->runStdWebAppCacheable(); - - $LDAPPerson = new LDAPPerson(); - $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - # Incoming parameters - $_STATE = ($_GET['state'] ? $_GET['state'] : $_POST['state']); - - include("inc/en_howdoi.php"); - -?> diff --git a/committers/help/inc/en_howdoi.php b/committers/help/inc/en_howdoi.php deleted file mode 100755 index 9d0f9dd..0000000 --- a/committers/help/inc/en_howdoi.php +++ /dev/null @@ -1,434 +0,0 @@ -<?php - #***************************************************************************** - # - # en_status.inc - # - # Author: Denis Roy - # Date: 2004-09-10 - # - # Description: Infrastructure status UI - # - # HISTORY: - # - #**************************************************************************** - - include("../html/header.php"); - - $Menu = new Menu("en"); - - include("../modules/menu.php"); - - -?> - <br /> - <td width="100%" valign="top" class="normal"> - <font class="large_title">How do I?</font><br /><br /> - - <h2>Website</h2> - <ul> - <li><a href="#website.websetup">Setup my project website?</a></li> - <li><a href="#website.phoenix">Author web pages using the Phoenix method?</a></li> - <li><a href="#website.db.bugs">Access the Bugzilla database using PHP?</a></li> - <li><a href="#website.db">Use a database for my website?</a></li> - <li><a href="#website.largefiles">I need to put a large file on my website. How should I do this?</a></li> - <li><a href="#website.php">Use PHP on my website?</a></li> - <li><a href="#website.php.optimize">Optimize my PHP code for large-scale use?</a></li> - </ul> - <h2>CVS</h2> - <ul> - <li><a href="#cvs.connect">Connect to Eclipse CVS?</a></li> - <li><a href="#cvs.proxy">Connect to Eclipse CVS when PSERVER and/or EXTSSH are firewalled?</a></li> - <li><a href="#cvs.delete">Delete files from CVS?</a></li> - <li><a href="#cvs.groups">Manage UNIX groups for CVS access?</a></li> - </ul> - <h2>Bugzilla</h2> - <ul> - <li><a href="#bugzilla.component">Create a new Component/Version/Milestone/Target?</a></li> - </ul> - <h2>Downloads</h2> - <ul> - <li><a href="#downloads.put">Put files on the download server?</a></li> - <li><a href="#downloads.archives">Move files to archive.eclipse.org?</a></li> - <li><a href="#downloads.mirrors">See which mirrors are mirroring my files?</a></li> - <li><a href="#downloads.findamirror">Use the Find a Mirror script?</a></li> - <li><a href="#downloads.updatesite">Create an Update Site?</a></li> - <li><a href="#downloads.stats">See download statistics?</a></li> - <li><a href="#downloads.quotas">View my disk space quota?</a></li> - <li><a href="#downloads.increasequotas">Increase my disk space quota?</a></li> - <li><a href="#downloads.sign">Sign my plugins/ZIP files?</a></li> - </ul> - <h2>Builds</h2> - <ul> - <li><a href="#builds.buildserver">Access/use the Eclipse Build server?</a></li> - </ul> - <h2>Mailing Lists</h2> - <ul> - <li><a href="#mailinglist.setup">Setup a new mailing list?</a></li> - <li><a href="#mailinglist.viewmembers">View list members?</a></li> - </ul> - <h2>Eclipse Wiki</h2> - <ul> - <li><a href="#wiki.createpage">Create a new page in the Eclipse Wiki</a></li> - </ul> - <h2>Eclipse servers</h2> - <ul> - <li><a href="#server.login">Login to the Eclipse servers</a></li> - </ul> - - - - -<br /><br /> - - <table> - <tr> - <td colspan="2"><h2>Website</h2></td> - </tr> - <tr> - <td width="50" /> - <td> - <a name="website.websetup"></a><h3>How do I setup my project website?</h3> - Project websites are hosted in a CVS repository separate from the actual project code. The repository path is dev.eclipse.org:/cvsroot/org.eclipse, in the www component. - Once the webmaster - adds a space for your project, files you commit to the website CVS are automatically checked out to www.eclipse.org/xyz, where - xyz is your project's short name.<br /><br /> - You are free to use HTML and PHP on your website.<br /><br /> - Requesting a project website is normally done when the project proposal has been approved.<br /><br > - If you suspect your files are not being checked out to the www.eclipse.org website, simply commit a small change to one file. This is usually - enough to trigger a website refresh. - - <a name="website.phoenix"></a><h3>How do I author web pages using the Phoenix method?</h3> - Please see <a href="phoenix.php">this document</a> for information on using Phoenix. - You can also check out: <a href="http://wiki.eclipse.org/Using_Phoenix">Using Phoenix</a> and <a href="http://www.eclipse.org/phoenix/docs/sample_pages.php">Sample Pages</a> - - <a name="website.db.bugs"></a><h3>Access the Bugzilla database using PHP?</h3> - Please see <a href="../committertools/dbo_index.php">this page</a>. - - <a name="website.db"></a><h3>Use a database for my website?</h3> - We currently do not offer projects with database support. - - <a name="website.largefiles"></a><h3>I need to put a large file on my website. How should I do this?</h3> - Large (1 MB+) ZIP and JAR files must be put in the downloads area, using the Find A Mirror script to link to them. - However, small files (less than 1 MB) can be put on the www.eclipse.org/yourproject website directly without causing too much harm.<br /><br /> - - The Find A Mirror script supports transparent mirror use, so large screencasts and PDFs can be put in the downloads area as well without imposing the added step of selecting - a mirror site for the file. Simply add &r=1 to the URL. For instance, http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.1-200506271435/eclipse-SDK-3.1-linux-gtk.tar.gz&r=1 will fetch you the - Eclipse SDK 3.1 for Linux from a random mirror site without asking you which one.<br /><br /> - - Remember to allow our mirrors at least 24 hours to sync up before using a transparent mirror redirect. - - <a name="website.php"></a><h3>Use PHP on my website?</h3> - PHP support is available on www.eclipse.org only. Simply commit files with the .php file extention to your website's CVS repository. - Although some projects host PHP files on download.eclipse.org, we do not encourage or recommend it.<br /><br /> - - Eclipse.org is a high-traffic website. Please make sure your PHP code is optimized to run in this type of environment. See the next item. - - <a name="website.php.optimize"></a><h3>Optimize my PHP code for large-scale use?</h3> - Eclipse.org is a high-traffic website. To improve PHP's functionality, we have set very liberal limits on how many resources - PHP can consume. However. if if your project is very popular, bad PHP code can slow the entire site down.<br /><br /> - - Of course, we could harden PHP to protect our website, but that would cut some functionality. Some tips for you: - <ul> - <li><b>Never call the web service to include/open files</b> - include("http://www.eclipse.org/somefile.html") and fopen("http://localhost/somefile.xml") - are very costly to run, because they call the web service, and can lead to eclipse.org Denial-Of-Servicing itself under heavy load.</li> - - <li><b>Never include/open remote files</b> - include("http://www.someothersite.org/somefile.html") is forbidden, as someone could launch a Denial-Of-Service attack - against a remote site. We don't allow you to establish remote connections from eclipse.org servers other than the build server.</li> - - <li><b>Sanitize your incoming parameters</b> - include($parameter) is particularly dangerous if $parameter is not sanitized. Someone could freely surf the web - anonymously, hiding behind eclipse.org servers, or they could use your page to access local files, or launch Denial-Of-Service attacks against remote servers.</li> - - <li><b>Cache aggregated, processor-intensive data</b> - SQL aggregations, file system scans, Bugzilla lists can (and should) be cached to avoid redundant processor- and disk-intensive operations. For instance, - scanning through download.eclipse.org directories to display the size of a build could be useful, but doesn't need to happen for each website visitor. Cache the results of this operation to - a file, and update the file if the file is older than 12 hours.</li> - </ul> - - There are many, many other security and PHP best-practices. These are just the basics. - </td> - </tr> - <tr> - <td colspan="2"> </td> - </tr> - - <tr> - <td colspan="2"><h2>CVS</h2> - </tr> - <tr> - <td width="50" /> - <td> - <a name="cvs.connect"></a><h3>Connect to Eclipse CVS?</h3> - Please see <a href="http://dev.eclipse.org/cvshowto.html">this page</a>. - - <a name="cvs.proxy"></a><h3>Connect to Eclipse CVS when PSERVER and/or EXTSSH are firewalled?</h3> - Please see the Proxy configuration on <a href="http://wiki.eclipse.org/index.php/CVS_Howto">this page</a>. - - <a name="cvs.delete"></a><h3>Delete files from CVS?</h3> - Although you can use SSH and a terminal to delete files in your CVS repository, we recommend you open a Bugzilla bug, in Community CVS, - requesting the files that need to be deleted. - - <a name="cvs.groups"></a><h3>Manage UNIX groups for CVS access?</h3> - The unix groups are essentially webmaster tools used to manage commit rights to CVS - repositories and to the downloads area.<br /><br /> - - For each project (Eclipse-Foundation-sanctioned project, such as Eclipse Platform, DSDP-DD, Mylar, - CDT, etc) we typically create three groups: - <ul> - <li><b>project-dev:</b> the group of accounts that can commit to the project's code repository</li> - <li><b>project-home:</b> the group of accounts that can commit to the project'ss website</li> - <li><b>projectadmin:</b> those who can store files in the downloads area.</li> - </ul> - - For some projects, having all committers in one group with commit rights across the entire - project is not adequate when some committers must be limited to a specific set of modules. - In these cases, we create project-module groups that allow specific committers to only - commit to that portion of CVS. - </td> - </tr> - <tr> - <td colspan="2"> </td> - </tr> - - <tr> - <td colspan="2"><h2>Bugzilla</h2> - </tr> - <tr> - <td width="50" /> - <td> - <a name="bugzilla.component"></a><h3>Create a new Component/Version/Milestone/Target?</h3> - <a href="http://wiki.eclipse.org/index.php/Webmaster_FAQ#I_need_to_add.2Fremove.change_a_version.2Fmilestone.2Fcomponent_in_Bugzilla._How_do_I_do_this.3F">Please see the documentation here</a> - </td> - </tr> - <tr> - <td colspan="2"> </td> - </tr> - - - - <tr> - <td colspan="2"><h2>Downloads</h2> - </tr> - <tr> - <td width="50" /> - <td> - <a name="downloads.put"></a><h3>Put files on the download server?</h3> - Downloadable files must be placed on the download.eclipse.org server so they can be mirrored to our mirror sites worldwide. Please refer to the <a href="paths.php">File Paths</a> document to see where your files should go.<br /><br /> - - <b>Please ensure only pertinent, current files are in the downloads area</b>, as we cannot store an eternity of nightly, integration and stable builds. Production releases can be kept forever; however, we ask that you move archived releases to archive.eclipse.org (see below).<br /><br /> - - To transfer your files, use an SCP(committers,release engineers) or SFTP(build engineers only) client and connect to download1.eclipse.org using your committer account. Transfer files to your project's directory in the downloads area (Typically ~/downloads/toplevel/yourproject). Your project's - downloads directory is typically communicated to the Project Lead upon project provisionning.<br /><br /> - - Large projects with frequent builds can request an RSYNC configuration to push files into the download server. Please contact the WebMaster for this.<br /><br /> - - Once your files are on the download.eclipse.org server, it will take anywhere from 5 minutes to 2 hours (30 minutes typical) for them to be available to the general public. You may also get Access Forbidden errors during this time. - This is due to cluster replication delay times, so we ask that you allow for 2 hours before linking to the download files. Also, it typically takes a day or two for all the mirror - sites to synchronize with us and get new files.<br /><br /> - - To make your downloads available to the general public, please do not link directly to download.eclipse.org. Instead, use the Find a Mirror script. Using this script allows you to view download statistics and allows users to pick a nearby mirror - site for their download.<br /><br /> - - Please note that although we tolerate PHP, HTML and JPG/GIF files on download.eclipse.org, we encourage you to put such files - on www.eclipse.org. Those files are not mirrored to public mirror servers.<br /><br /> - - To save disk space on our mirror servers, and to reclaim some quota space, we recommend you move old release builds to archive.eclipse.org. - - - - <a name="downloads.archives"></a><h3>Move files to archive.eclipse.org?</h3> - - Because our mirror sites don't have as much disk space for Eclipse file as we do, we have created an http://archive.eclipse.org site for you to - store older release builds.<br /><br /> - - The archive.eclipse.org structure is similar to that of download.eclipse.org. To move your files, we recommend using the SSH prompt as below. If you are - not comfortable with the SSH prompt, you can ask WebMaster to move the files for you.<pre> - - ssh yourcommitterid@dev.eclipse.org - - mv ~/downloads/your/project/oldrelease/ /home/data/httpd/archive.eclipse.org/your/project/oldrelease/ - </pre> - - - <a name="downloads.mirrors"></a><h3>See which mirror sites are mirroring my files?</h3> - You can use the Find a Mirror script to see which mirror sites have your files. The Find a Mirror script is here: http://www.eclipse.org/downloads/download.php<br /><br /> -<b>Parameters:</b><br /> - <b>file</b> (Required): specify the filename, relative to the downloads home, starting with a "/". This file or directory must exist in the downloads area.<br /> - <b>format</b> (Optional): specify html (default) or xml. Useful for building the mirrors.xml for Update sites.<br /> - <b>protocol</b> (Optional): ftp or http: list only ftp or http mirrors only (both are the default)<br /> - <b>r</b> (Optional): specify 1 to automatically redirect to a random mirror without asking the user to choose.<br /> - <b>nf</b> (Optional): specify 1 to get an actual 404 Not Found error if the file doesn't exist (instead of a lovely page saying so).<br /><br /> - - Examples:<br /> - All mirrors of the Lepido project, in XML format: http://www.eclipse.org/downloads/download.php?file=/technology/lepido/M1/&format=xml<br /> - Get a file from a random mirror, without prompting: http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.1-200506271435/eclipse-SDK-3.1-win32.zip&r=1<br /><br /> - <b>PLEASE NOTE:</b> We have a list of excluded file patterns -- files that are *not* sent to our mirrors. - Nightly and Integration builds are typically very large and don't get many downloads, - therefore it's typically more costly (in terms of bandwidth) to mirror them than to support the few client downloads they generate. - At time of writing, our exclusion list is: drops/I* drops/N* drops/M* webtools/committers/ *.jpg *.gif callisto/staging/ callisto/testUpdates/ eclipse/testUpdates/ eclipse/updates/3.2milestones dev/TPTP* - - - - <a name="downloads.findamirror"></a><h3>Use the Find a Mirror script?</h3> - Mirror sites are polled every hour to determine the freshness of the mirror site. The Find a Mirror site will determine which mirrors have the file a user requested and will display the list. To use it, simply - link to the following URL:<br /><br /> - - http://www.eclipse.org/downloads/download.php?file=/toplevel/yourproject/yourfile.zip<br /><br /> - - <b>Parameters:</b><br /> - <b>file</b> (Required): specify the filename, relative to the downloads home, starting with a "/". This file or directory must exist in the downloads area.<br /> - <b>format</b> (Optional): specify html (default) or xml. Useful for building the mirrors.xml for Update sites.<br /> - <b>protocol</b> (Optional): ftp or http: list only ftp or http mirrors only (both are the default)<br /> - <b>r</b> (Optional): specify 1 to automatically redirect to a random mirror without asking the user to choose.<br /> - <b>nf</b> (Optional): specify 1 to get an actual 404 Not Found error if the file doesn't exist (instead of a lovely page saying so).<br /><br /> - - - For instance:<br /> - A file in the BIRT project:<br /> - http://www.eclipse.org/downloads/download.php?file=/birt/1.0/chart/someFile.zip<br /><br /> - - A file in the Technology project, http mirrors only, don't prompt the user for a mirror:<br /> - http://www.eclipse.org/downloads/download.php?r=1&protocol=http&file=/technology/cme/R-1.2.4-200105211245/someFile.zip<br /><br /> - - A file in the Tools project:<br /> - http://www.eclipse.org/downloads/download.php?file=/tools/cdt/R-1.2.4-200105211245/someFile.zip<br /><br /> - - <a name="downloads.updatesite"></a><h3>Create an Update Site?</h3> - Project update sites are currently not integrated to the Platform update site, and therefore you must provide Update instructions on your website.<br /><br /> - <ol> - <li>In your downloads directory, create a directory called update-site</li> - <li>in update-site/, put your features in a features/ subdirectory, your plugins in a plugins/ subdirectory, and your site.xml file in the update-site/ directory.</li> - <li>Use the mirrorsURL tag with the Find A Mirror script to prompt the users for a mirror site. See a sample site.xml file below.</li> - <li>Provide instructions on your download pages that tell the user to add a remote Update site, and indicate the url to your update-site/ directory</li> - </ol> - - Sample site.xml file (from Lepido project): - <pre> -<?xml version="1.0" encoding="UTF-8"?> -<site mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/technology/lepido/update-site/site.xml&amp;format=xml"> - <description url="http://download.eclipse.org/technology/lepido/update-site/"> - Lepido, Tools for Apache Cocoon - </description> - <feature url="features/org.eclipse.lepido_0.1.0.jar" id="org.eclipse.lepido" version="0.1.0"> - <category name="lepido"/> - </feature> - <category-def name="lepido" label="Lepido, Tools for Apache Cocoon"/> -</site> -</pre> - - <a name="downloads.stats"></a><h3>See download statistics?</h3> - The Find a Mirror script tracks download requests once the user has picked a mirror site (or the main Eclipse download site). To view these statistics, - use the Live Download Statistics tool in the Committer Tools. - - <a name="downloads.quotas"></a><h3>View my disk space quota?</h3> - Because the downloads content is mirrored worldwide, Eclipse.org imposes disk space quotas to not overburden our mirror sites. There are no quotas on mail, CVS or www.eclipse.org website content. New projects are configured with - 2GB of disk quotas. If this is insufficient, we can increase the quota to suit your needs. However, before increasing a quota, we will make sure that your downloads area doesn't contain old or stale files.<br /><br /> We appreciate - your keeping the downloads areas as lean and clean as possible. - - You can view your project's download.eclipse.org disk usage and quota <a href="../committertools/diskspace.php">here</a>. - - <a name="downloads.increasequotas"></a><h3>Increase my disk space quota?</h3> - Before requesting your quota be increased, please delete any old files that are no longer required, and move older release builds - to archive.eclipse.org (instructions above). If you are confident that your download.eclipse.org footprint is as small as it can be - and that you're still running out of space, simply send an e-mail to the WebMaster with your request, stating which project you're on. - - <a name="#downloads.sign"></a><h3>Sign my plugins/ZIP files?</h3> - The Eclipse Foundation will allow one or two committers on each project to sign JAR and ZIP files on its behalf. Signing is done on the build.eclipse.org server, using your - CVS userid and an SSH command line. To sign, simply get your PMC or Project Lead to contact the webmaster@eclipse.org to indicate the committers (max. 2) that should have - signing privilege. Typically, the release engineers, build teams or whoever puts the files on download.eclipse.org should be the signers. - </td> - </tr> - <tr> - <td colspan="2"> </td> - </tr> - <tr> - <td colspan="2"><h2>Builds</h2> - </tr> - <tr> - <td width="50" /> - <td> - <a name="builds.buildserver"></a><h3>Access/use the Eclipse Build Server?</h3> - Committers can use the build.eclipse.org server to run builds and tests for their project. - Unlike the other eclipse.org servers, committers are permitted to run software on this server, - and to maintain running software in the background. If you need to run cron jobs, please contact - the webmaster, stating the time and frequency at which these jobs are to run, and for how long - they typically run.<br /><br /> - - <b>Server details:</b><br /> - - host: build.eclipse.org<br /> - username: use your committer account<br /> - server: IBM P5 550 quad-cpu, 16G of RAM<br /> - architecture: PPC64<br /> - <br /><br /> - - You can use an SSH client to connect to the server. Here are some - directories that are of interest:<br /><br /> - - /cvsroot -> the CVS repositories, connected to eclipse.org via a - Gigabit connection. Your Build account cannot write to these files directly - <br /><br /> - /home/data/httpd/download.eclipse.org -> the download.eclipse.org root, - connected to eclipse.org via Gigabit connection. - <br /><br /> - /shared -> a shared disk to store your build files and - applications. Please note, however, that we do not maintain backups of - this directory. This path is structured like the downloads area, and is accessible via http://build.eclipse.org/ - <br /><br /> - /shared/common -> a common location to store applications. Ant and JDK - 5.0 are located there. - <br /><br /> - If you have any questions, please contact the webmaster. - </td> - </tr> - <tr> - <td colspan="2"><h2>Mailing Lists</h2> - </tr> - <tr> - <td width="50" /> - <td> - <a name="mailinglist.setup"></a><h3>Setup a new mailing list?</h3> - Because Mailing Lists are subject to SPAM and can adversely affect eclipse.org performance (imaging sending 200 e-mails to a list that contains 3000 members), proper care - is taken in configuring each list. New mailing lists are set up by the WebMaster for this reason. Also, the webmaster creates an HTML view (called mailing list archives) of mailing list postings for - archive and search purposes. - - <a name="mailinglist.viewmembers"></a><h3>View list members?</h3> - Because mailing lists contain private information, such as a member's e-mail address, name and surname, we cannot publicly display this information. However, - the PMC or Project Lead can become the list administrator, which would allow you to view the membership information for - your lists. The PMC/Project lead can inquire about list administration to the WebMaster, stating which lists they would like to manage.<br /><br /> - </td> - <tr> - <td colspan="2"> </td> - </tr> - <tr> - <td colspan="2"><h2>Eclipse Wiki</h2> - </tr> - <tr> - <td width="50" /> - <td> - <a name="wiki.createpage"></a><h3>Create a new page in the Eclipse Wiki</h3> - To create a new page, simply type the page name at the end of "index.php/" in the URL. The name can contain spaces. For instance, - http://wiki.eclipse.org/index.php/Some Page will allow you to create and edit this new page. - </td> - </tr> - <tr> - <td colspan="2"> </td> - </tr> - - <tr> - <td colspan="2"><h2>Eclipse Servers</h2> - </tr> - <tr> - <td width="50" /> - <td> - <a name="server.login">Login to the Eclipse servers</a><h3></h3> - When you become committer, your default shell allows only CVS and SVN commands. - If you need a 'real' shell for dealing with distribution files or working with automated builds, you'll need to have your project lead or the project PMC file a bug requesting the upgrade. - </td> - </tr> - <tr> - <td colspan="2"> </td> - </tr> - - -<?php - include("../html/footer.php"); -?> diff --git a/committers/help/inc/en_paths.inc b/committers/help/inc/en_paths.inc deleted file mode 100755 index 3bec4ee..0000000 --- a/committers/help/inc/en_paths.inc +++ /dev/null @@ -1,83 +0,0 @@ -<?php - #***************************************************************************** - # - # en_status.inc - # - # Author: Denis Roy - # Date: 2004-09-10 - # - # Description: Infrastructure status UI - # - # HISTORY: - # - #**************************************************************************** - - include("../html/header.php"); - - $Menu = new Menu("en"); - - include("../modules/menu.php"); - -?> - <META HTTP-EQUIV="Refresh" CONTENT="120;" /> - <br /> - <td width="100%" valign="top" class="normal"> - <font class="large_title">Eclipse.org paths to data</font><br /><br /> - - - Because of redundant and load-balanced services, the eclipse.org infrastructure is more complex than in the past. - This page should help you figure out what's where. - - <table border="1"> - <tr> - <td><b>Path</b></td> - <td><b>Description</b></td> - </tr> - <tr> - <td><b>/home</b></td> - <td>This is where all the public data is. Needless to look anywhere else.</td> - </tr> - <tr> - <td> - <b>/cvsroot/eclipse<br /> - /cvsroot/tools<br /> - /cvsroot/webtools</b> etc...<br /> - </td> - <td>These are your CVS repositories. We <b>strongly</b> encourage you to contact the WebMaster to move or delete files, instead of doing it from the shell.</td> - </tr> - <tr> - <td> - <b>/cvsroot/org.eclipse</b> - </td> - <td>This is the website repository. Look in www/yourproject. Anything you commit here is published to www.eclipse.org/yourproject within one minute.</td> - </tr> - <tr> - <td> - <b>/home/data/httpd/download.eclipse.org</b><br /> - (a.k.a /home/www and ~/downloads) - </td> - <td>This is the main download area, accessible only via RSYNC and SSH/SFTP/SCP. The download.eclipse.org webserver does not look here, so do not use this path for PHP scripts. DO use this path to add or remove downloadable files. This directory is replicated to /home/local/data/httpd/download.eclipse.org on each node server.</td> - </tr> - <tr> - <td><b>/home/data/httpd/download-staging.priv</b></td> - <td>This is where you can store downloadable files that aren't ready for downloads yet. Perhaps you need to verify them, or sign them. The Eclipse web servers cannot access this area, so it's private.</td> - </tr> - <tr> - <td><b>/home/data/httpd/writable</b></td> - <td>This is where your PHP scripts can write files. Temp files, status files, XML files, whatever. Ask us for a spot here if your project's PHP scripts need write access.</td> - </tr> - <tr> - <td><b>/home/data/users</b></td> - <td>These are your Home directories. Just type <b>cd</b> to get to yours.</td> - </tr> - <tr> - <td><b>/home/local/data/httpd/download.eclipse.org</b></td> - <td>This is the replicated downloads area, used exclusively by download.eclipse.org. Use this location to build your Download web pages using PHP. Don't change files here, because your changes will be lost.</td> - </tr> - </table> - </td> - - -<?php - include("../html/footer.php"); -?> diff --git a/committers/help/inc/en_status.inc b/committers/help/inc/en_status.inc index 86091ff..5e76e46 100755 --- a/committers/help/inc/en_status.inc +++ b/committers/help/inc/en_status.inc @@ -1,45 +1,35 @@ <?php - #***************************************************************************** - # - # en_status.inc - # - # Author: Denis Roy - # Date: 2004-09-10 - # - # Description: Infrastructure status UI - # - # HISTORY: - # - #**************************************************************************** - - include("../html/header.php"); - - $Menu = new Menu("en"); - - $currBandwidthLimit = 250; - $currHTTPLimit = 10000; # www(300x3) + bugs(100x2) + wiki (100x2) + nodes(1000x5) + build(3000) + eclipsecon(100) - $currCPULimit = 2800; # www(12cpu) + bugs(8cpu) + + wiki (8cpu) + nodes(8cpu) + build(4cpu) + eclipsecon+foundation(2cpu) x 5.0 load = 210 (gross approximation) - - $currTIME = time(); - $deadthreshold = 300; # 5 minutes = dead - - include("../modules/menu.php"); - - ob_start(); - -?> - <table width="100%"> - <tr> - <td width="60%" valign="top"> - <b>Server load average</b> <a href="javascript:fnPopup('load');">(What does this mean?)</a><br /> - <table class="tbl" width="100%"> - <tr> - <td><b>Server</b></td> - <td align="right" nowrap="nowrap"><b>1 min</b></td> - <td align="right" nowrap="nowrap"><b>5 min</b></td> - <td align="right" nowrap="nowrap"><b>15 min</b></td> - <td nowrap="nowrap"><b>Top CPU Hogs</b></td> - </tr> +/******************************************************************************* + * Copyright (c) 2014-2016 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: + * Denis Roy (Eclipse Foundation) - initial API and implementation + * Christopher Guindon (Eclipse Foundation) - Solstice migration + *******************************************************************************/ + + $currBandwidthLimit = 250; + $currHTTPLimit = 10000; # www(300x3) + bugs(100x2) + wiki (100x2) + nodes(1000x5) + build(3000) + eclipsecon(100) + $currCPULimit = 2800; # www(12cpu) + bugs(8cpu) + + wiki (8cpu) + nodes(8cpu) + build(4cpu) + eclipsecon+foundation(2cpu) x 5.0 load = 210 (gross approximation) + + $currTIME = time(); + $deadthreshold = 300; # 5 minutes = dead +?> + <table width="100%"> + <tr> + <td width="60%" valign="top"> + <b>Server load average</b> <a href="javascript:fnPopup('load');">(What does this mean?)</a><br /> + <table class="tbl" width="100%"> + <tr> + <td><b>Server</b></td> + <td align="right" nowrap="nowrap"><b>1 min</b></td> + <td align="right" nowrap="nowrap"><b>5 min</b></td> + <td align="right" nowrap="nowrap"><b>15 min</b></td> + <td nowrap="nowrap"><b>Top CPU Hogs</b></td> + </tr> <?php @@ -47,537 +37,529 @@ $dirlist = scandir($aDirectory); $totCPU = 0; - foreach($dirlist as $file) { - - if($file != "." && $file != ".." && $file != "main2") { - $fileName = $aDirectory . $file; - if($h = @fopen($fileName, "r")) { - $line = fread($h, filesize($fileName)); - $isDead = ($currTIME - filemtime($fileName) > $deadthreshold); - @fclose($h); - - if(!$isDead) { - $parts = explode(" ", $line); - - $line = ""; - $fileName = "/home/data/common/monitor/topps/" . $file; - if($h = @fopen($fileName, "r")) { - $line = rtrim(fread($h, filesize($fileName)), "\x00..\x1F"); - @fclose($h); - } - - $totCPU += $parts[0]; - } - else { - $parts[0] = " "; - $parts[1] = " "; - $parts[2] = " "; - $line = "DEAD, offline or not reporting"; - } - $row_bgcolor = ""; - if( strpos($file, "node") !== FALSE) { - $row_bgcolor = "#ffffcc"; - } - if( strpos($file, "www") !== FALSE) { - $row_bgcolor = "#dcd5d5"; - # Hide process list - if(!$isDead) { - $line = ""; - } - } - if( strpos($file, "dev") !== FALSE) { - $row_bgcolor = "#66cc66"; - } - if( strpos($file, "bugs") !== FALSE) { - $row_bgcolor = "#d3f281"; - # Hide process list - if(!$isDead) { - $line = ""; - } - } - if( strpos($file, "php-") !== FALSE) { - $row_bgcolor = "#99aaff"; - # Hide process list - if(!$isDead) { - $line = ""; - } - } - if( strpos($file, "fred") !== FALSE || strpos($file, "barney") !== FALSE || strpos($file, "db") !== FALSE) { - $row_bgcolor = "#fff0f0"; - } - if($line == "") { - $line = " "; - } - else { - $line = "<pre>" . $line . "</pre>"; - } - + foreach($dirlist as $file) { + + if($file != "." && $file != ".." && $file != "main2") { + $fileName = $aDirectory . $file; + if($h = @fopen($fileName, "r")) { + $line = fread($h, filesize($fileName)); + $isDead = ($currTIME - filemtime($fileName) > $deadthreshold); + @fclose($h); + + if(!$isDead) { + $parts = explode(" ", $line); + + $line = ""; + $fileName = "/home/data/common/monitor/topps/" . $file; + if($h = @fopen($fileName, "r")) { + $line = rtrim(fread($h, filesize($fileName)), "\x00..\x1F"); + @fclose($h); + } + + $totCPU += $parts[0]; + } + else { + $parts[0] = " "; + $parts[1] = " "; + $parts[2] = " "; + $line = "DEAD, offline or not reporting"; + } + $row_bgcolor = ""; + if( strpos($file, "node") !== FALSE) { + $row_bgcolor = "#ffffcc"; + } + if( strpos($file, "www") !== FALSE) { + $row_bgcolor = "#dcd5d5"; + # Hide process list + if(!$isDead) { + $line = ""; + } + } + if( strpos($file, "dev") !== FALSE) { + $row_bgcolor = "#66cc66"; + } + if( strpos($file, "bugs") !== FALSE) { + $row_bgcolor = "#d3f281"; + # Hide process list + if(!$isDead) { + $line = ""; + } + } + if( strpos($file, "php-") !== FALSE) { + $row_bgcolor = "#99aaff"; + # Hide process list + if(!$isDead) { + $line = ""; + } + } + if( strpos($file, "fred") !== FALSE || strpos($file, "barney") !== FALSE || strpos($file, "db") !== FALSE) { + $row_bgcolor = "#fff0f0"; + } + if($line == "") { + $line = " "; + } + else { + $line = "<pre>" . $line . "</pre>"; + } + ?> - <tr <?= $row_bgcolor != "" ? "style=\"background-color:" . $row_bgcolor . ";\"" : "" ?>> - <td><a href="/committers/loadstats/showmonthstats.php?server=/home/data/common/monitor/loadstats/<?= $file ?>"><?= $file ?></a></td> + <tr <?= $row_bgcolor != "" ? "style=\"background-color:" . $row_bgcolor . ";\"" : "" ?>> + <td><a href="/committers/loadstats/showmonthstats.php?server=/home/data/common/monitor/loadstats/<?= $file ?>"><?= $file ?></a></td> <?php - $colour = "black"; - for($i = 0; $i < 3; $i++) { - - if($parts[$i] > 3) { - $colour = "blue"; - if(preg_match("/(barney|fred|build|bugs|www|download|dev)/", $file)) { - $colour = "black"; - } - } - if($parts[$i] > 5) { - $colour = "orangered"; - if(preg_match("/(barney|build|bugs|www|dev)/", $file)) { - $colour = "blue"; - } - if(preg_match("/(fred|download)/", $file)) { - $colour = "black"; - } - - } - if($parts[$i] > 8) { - $colour = "red"; - if(preg_match("/(barney|build|bugs|www|dev)/", $file)) { - $colour = "orangered"; - } - if(preg_match("/(fred|download)/", $file)) { - $colour = "blue"; - } - - } - if($parts[$i] > 12) { - $colour = "red"; - if(preg_match("/(fred|download)/", $file)) { - $colour = "blue"; - } - - } - if($parts[$i] > 20) { - $colour = "darkred"; - if(preg_match("/(fred)/", $file)) { - $colour = "orangered"; - } - if(preg_match("/(download)/", $file)) { - $colour = "blue"; - } - - } - if($parts[$i] > 25) { - $colour = "darkred"; - if(preg_match("/(fred)/", $file)) { - $colour = "red"; - } - if(preg_match("/(download)/", $file)) { - $colour = "blue"; - } - - } - if($parts[$i] > 30) { - $colour = "darkred"; - if(preg_match("/(download)/", $file)) { - $colour = "orangered"; - } - } - if($parts[$i] > 40) { - if(preg_match("/(download)/", $file)) { - $colour = "red"; - } - } - if($parts[$i] > 60) { - if(preg_match("/(download)/", $file)) { - $colour = "darkred"; - } - } - - -?> - <td align="right"><font color='<?= $colour ?>'><?= $parts[$i] ?></font></td> -<?php } + $colour = "black"; + for($i = 0; $i < 3; $i++) { + + if($parts[$i] > 3) { + $colour = "blue"; + if(preg_match("/(barney|fred|build|bugs|www|download|dev)/", $file)) { + $colour = "black"; + } + } + if($parts[$i] > 5) { + $colour = "orangered"; + if(preg_match("/(barney|build|bugs|www|dev)/", $file)) { + $colour = "blue"; + } + if(preg_match("/(fred|download)/", $file)) { + $colour = "black"; + } + + } + if($parts[$i] > 8) { + $colour = "red"; + if(preg_match("/(barney|build|bugs|www|dev)/", $file)) { + $colour = "orangered"; + } + if(preg_match("/(fred|download)/", $file)) { + $colour = "blue"; + } + + } + if($parts[$i] > 12) { + $colour = "red"; + if(preg_match("/(fred|download)/", $file)) { + $colour = "blue"; + } + + } + if($parts[$i] > 20) { + $colour = "darkred"; + if(preg_match("/(fred)/", $file)) { + $colour = "orangered"; + } + if(preg_match("/(download)/", $file)) { + $colour = "blue"; + } + + } + if($parts[$i] > 25) { + $colour = "darkred"; + if(preg_match("/(fred)/", $file)) { + $colour = "red"; + } + if(preg_match("/(download)/", $file)) { + $colour = "blue"; + } + + } + if($parts[$i] > 30) { + $colour = "darkred"; + if(preg_match("/(download)/", $file)) { + $colour = "orangered"; + } + } + if($parts[$i] > 40) { + if(preg_match("/(download)/", $file)) { + $colour = "red"; + } + } + if($parts[$i] > 60) { + if(preg_match("/(download)/", $file)) { + $colour = "darkred"; + } + } + + +?> + <td align="right"><font color='<?= $colour ?>'><?= $parts[$i] ?></font></td> +<?php } ?> - <td><?= $line ?></td> - </tr> -<?php - - } - - } + <td><?= $line ?></td> + </tr> +<?php } - + + } + + } + ?> - </table> - </td> - <td width="20"></td> - <td width="400" valign="top"> - <b>Bandwidth usage and connection count</b> <a href="javascript:fnPopup('bandwidth');">(What does this mean?)</a> - <table class="tbl" width="100%"> - <tr> - <td><b>Server</b></td> - <td align="right"><b>Mbps out</b></td> - <td align="right"><b>Mbps in</b></td> - <td align="right"><b>HTTP Conn</b></td> - <td align="right"><b>RSYNCd Conn</b></td> - <td align="right"><b>git Procs</b></td> - </tr> + </table> + </td> + <td width="20"></td> + <td width="400" valign="top"> + <b>Bandwidth usage and connection count</b> <a href="javascript:fnPopup('bandwidth');">(What does this mean?)</a> + <table class="tbl" width="100%"> + <tr> + <td><b>Server</b></td> + <td align="right"><b>Mbps out</b></td> + <td align="right"><b>Mbps in</b></td> + <td align="right"><b>HTTP Conn</b></td> + <td align="right"><b>RSYNCd Conn</b></td> + <td align="right"><b>git Procs</b></td> + </tr> <?php $aDirectory = "/home/data/common/monitor/bandwdthavg/"; - $dirlist = scandir($aDirectory); + $dirlist = scandir($aDirectory); - $totTX = 0; - $totRX = 0; - $totHTTP = 0; - $totRSYNCD = 0; + $totTX = 0; + $totRX = 0; + $totHTTP = 0; + $totRSYNCD = 0; $totPSERVER = 0; - $pctTX = 0; - $pctHTTP = 0; - $pctCPU = 0; - + $pctTX = 0; + $pctHTTP = 0; + $pctCPU = 0; + foreach($dirlist as $file) { - - if($file != "." && $file != "..") { - $fileName = $aDirectory . $file; - if($h = @fopen($fileName, "r")) { - $line = fread($h, filesize($fileName)); - $isDead = ($currTIME - filemtime($fileName) > $deadthreshold); - @fclose($h); - - if(!$isDead) { - $errorFactor = 0.96; - $parts = explode(" ", $line); - $parts[2] = sprintf("%.2f", $parts[2] / 1024 * 8 * $errorFactor); - $parts[3] = sprintf("%.2f", $parts[3] / 1024 * 8 * $errorFactor); - $totTX += $parts[2]; - $totRX += $parts[3]; - - $apacheCount = 0; - $fileName = "/home/data/common/monitor/apache2/" . $file; - if($h = @fopen($fileName, "r")) { - $apacheCount = fread($h, filesize($fileName)); - - if( strpos($file, "download") !== FALSE) { - # 32 threads per server - $apacheCount = $apacheCount * 32; - } - - $totHTTP += $apacheCount; - @fclose($h); - } - else { - $apacheCount = " "; - } - - $rsyncdCount = 0; - $fileName = "/home/data/common/monitor/rsyncd/" . $file; - if($h = @fopen($fileName, "r")) { - $rsyncdCount = fread($h, filesize($fileName)); - - $totRSYNCD += $rsyncdCount; - @fclose($h); - } - else { - $rsyncdCount = " "; - } - - $pserverCount = 0; - $fileName = "/home/data/common/monitor/pserver/" . $file; - if($h = @fopen($fileName, "r")) { - $pserverCount = fread($h, filesize($fileName)); - - $totPSERVER += $pserverCount; - @fclose($h); - } - else { - $pserverCount = " "; - } - } - else { - $pserverCount = 0; - $rsyncdCount = 0; - $apacheCount = 0; - $parts[2] = 0; - $parts[3] = 0; - } - - $row_bgcolor = ""; - $apachecount_color = "black"; - if( strpos($file, "dev") !== FALSE) { - $row_bgcolor = "#66cc66"; - if($apacheCount > 3000) { - $apachecount_color = "red"; - } - - } - if( strpos($file, "www") !== FALSE) { - $row_bgcolor = "#dcd5d5"; - if($apacheCount > 850) { - $apachecount_color = "red"; - } - - } - if( strpos($file, "bugs") !== FALSE) { - $row_bgcolor = "#d3f281"; - if($apacheCount > 70) { - $apachecount_color = "red"; - } - } - if( strpos($file, "download") !== FALSE) { - if($apacheCount > 11000) { - $apachecount_color = "red"; - } - } - if( strpos($file, "php-") !== FALSE) { - $row_bgcolor = "#99aaff"; - if($apacheCount > 500) { - $apachecount_color = "red"; - } - } - if( strpos($file, "fred") !== FALSE || strpos($file, "barney") || strpos($file, "wilma") !== FALSE) { - $row_bgcolor = "#fff0f0"; - } - - - + + if($file != "." && $file != "..") { + $fileName = $aDirectory . $file; + if($h = @fopen($fileName, "r")) { + $line = fread($h, filesize($fileName)); + $isDead = ($currTIME - filemtime($fileName) > $deadthreshold); + @fclose($h); + + if(!$isDead) { + $errorFactor = 0.96; + $parts = explode(" ", $line); + $parts[2] = sprintf("%.2f", $parts[2] / 1024 * 8 * $errorFactor); + $parts[3] = sprintf("%.2f", $parts[3] / 1024 * 8 * $errorFactor); + $totTX += $parts[2]; + $totRX += $parts[3]; + + $apacheCount = 0; + $fileName = "/home/data/common/monitor/apache2/" . $file; + if($h = @fopen($fileName, "r")) { + $apacheCount = fread($h, filesize($fileName)); + + if( strpos($file, "download") !== FALSE) { + # 32 threads per server + $apacheCount = $apacheCount * 32; + } + + $totHTTP += $apacheCount; + @fclose($h); + } + else { + $apacheCount = " "; + } + + $rsyncdCount = 0; + $fileName = "/home/data/common/monitor/rsyncd/" . $file; + if($h = @fopen($fileName, "r")) { + $rsyncdCount = fread($h, filesize($fileName)); + + $totRSYNCD += $rsyncdCount; + @fclose($h); + } + else { + $rsyncdCount = " "; + } + + $pserverCount = 0; + $fileName = "/home/data/common/monitor/pserver/" . $file; + if($h = @fopen($fileName, "r")) { + $pserverCount = fread($h, filesize($fileName)); + + $totPSERVER += $pserverCount; + @fclose($h); + } + else { + $pserverCount = " "; + } + } + else { + $pserverCount = 0; + $rsyncdCount = 0; + $apacheCount = 0; + $parts[2] = 0; + $parts[3] = 0; + } + + $row_bgcolor = ""; + $apachecount_color = "black"; + if( strpos($file, "dev") !== FALSE) { + $row_bgcolor = "#66cc66"; + if($apacheCount > 3000) { + $apachecount_color = "red"; + } + + } + if( strpos($file, "www") !== FALSE) { + $row_bgcolor = "#dcd5d5"; + if($apacheCount > 850) { + $apachecount_color = "red"; + } + + } + if( strpos($file, "bugs") !== FALSE) { + $row_bgcolor = "#d3f281"; + if($apacheCount > 70) { + $apachecount_color = "red"; + } + } + if( strpos($file, "download") !== FALSE) { + if($apacheCount > 11000) { + $apachecount_color = "red"; + } + } + if( strpos($file, "php-") !== FALSE) { + $row_bgcolor = "#99aaff"; + if($apacheCount > 500) { + $apachecount_color = "red"; + } + } + if( strpos($file, "fred") !== FALSE || strpos($file, "barney") || strpos($file, "wilma") !== FALSE) { + $row_bgcolor = "#fff0f0"; + } + + + ?> - <tr <?= $row_bgcolor != "" ? "style=\"background-color:" . $row_bgcolor . ";\"" : "" ?>> - <td><?= $file ?></td> - <td align="right"><?= $parts[2] ?></td> - <td align="right"><?= $parts[3] ?></td> - <td align="right"><font color='<?=$apachecount_color ?>'><?= $apacheCount ?></font></td> - <td align="right"><?= $rsyncdCount ?></td> - <td align="right"><?= $pserverCount ?></td> - </tr> + <tr <?= $row_bgcolor != "" ? "style=\"background-color:" . $row_bgcolor . ";\"" : "" ?>> + <td><?= $file ?></td> + <td align="right"><?= $parts[2] ?></td> + <td align="right"><?= $parts[3] ?></td> + <td align="right"><font color='<?=$apachecount_color ?>'><?= $apacheCount ?></font></td> + <td align="right"><?= $rsyncdCount ?></td> + <td align="right"><?= $pserverCount ?></td> + </tr> <?php - } - } - - $pctTX = number_format($totTX / $currBandwidthLimit * 100, 1); - $pctHTTP = number_format($totHTTP / $currHTTPLimit * 100, 1); - $pctCPU = number_format($totCPU / $currCPULimit * 100, 1); - } -?> - <tr> - <td><b>Total</b></td> - <td align="right"><b><?= $totTX ?></b></td> - <td align="right"><b><?= $totRX ?></b></td> - <td align="right"><b><?= $totHTTP ?></b></td> - <td align="right"><b><?= $totRSYNCD ?></b></td> - <td align="right"><b><?= $totPSERVER ?></b></td> - </tr> - </table> - - </td> - </tr> - </table> - <br /><br /> - <table width="100%"> - <tr> - <td valign="top"> - <b>MySQL server metrics</b> <a href="javascript:fnPopup('mysql');">(What does this mean?)</a> - <table class="tbl" width="100%"> - <tr> - <td></td> - <td align="right"><b>dbmaster</b></td> - <td align="right"><b>dbslave2</b></td> - <td align="right"><b>dbapi</b></td> - <td align="right"><b>dbapislave</b></td> - </tr> + } + } + + $pctTX = number_format($totTX / $currBandwidthLimit * 100, 1); + $pctHTTP = number_format($totHTTP / $currHTTPLimit * 100, 1); + $pctCPU = number_format($totCPU / $currCPULimit * 100, 1); + } +?> + <tr> + <td><b>Total</b></td> + <td align="right"><b><?= $totTX ?></b></td> + <td align="right"><b><?= $totRX ?></b></td> + <td align="right"><b><?= $totHTTP ?></b></td> + <td align="right"><b><?= $totRSYNCD ?></b></td> + <td align="right"><b><?= $totPSERVER ?></b></td> + </tr> + </table> + + </td> + </tr> + </table> + <br /><br /> + <table width="100%"> + <tr> + <td valign="top"> + <b>MySQL server metrics</b> <a href="javascript:fnPopup('mysql');">(What does this mean?)</a> + <table class="tbl" width="100%"> + <tr> + <td></td> + <td align="right"><b>dbmaster</b></td> + <td align="right"><b>dbslave2</b></td> + <td align="right"><b>dbapi</b></td> + <td align="right"><b>dbapislave</b></td> + </tr> <?php $aDirectory = "/home/data/common/monitor/mysql/"; $dir = opendir($aDirectory); - $fileName = $aDirectory . "dbmaster"; - if($h = @fopen($fileName, "r")) { - $dbmasterline = fread($h, filesize($fileName)); - @fclose($h); - $isdbmasterDead = ($currTIME - filemtime($fileName) > 60); - } - $fileName = $aDirectory . "dbslave2"; - if($h = @fopen($fileName, "r")) { - $dbslave2line = fread($h, filesize($fileName)); - @fclose($h); - $isdbslave2Dead = ($currTIME - filemtime($fileName) > 60); - } - $fileName = $aDirectory . "dbapi"; - if($h = @fopen($fileName, "r")) { - $dbapiline = fread($h, filesize($fileName)); - @fclose($h); - $isdbapiDead = ($currTIME - filemtime($fileName) > 60); - } - $fileName = $aDirectory . "dbapislave"; - if($h = @fopen($fileName, "r")) { - $dbapislaveline = fread($h, filesize($fileName)); - @fclose($h); - $isdbapislaveDead = ($currTIME - filemtime($fileName) > 60); - } - - $dbmasterparts = explode(" ", $dbmasterline); - $dbslave2parts = explode(" ", $dbslave2line); - $dbapiparts = explode(" ", $dbapiline); - $dbapislaveparts = explode(" ", $dbapislaveline); - - for($i = 0; $i < count($dbmasterparts); $i++) { - $dbmastervariable = $dbmasterparts[$i]; - $dbslave2variable = $dbslave2parts[$i]; - $dbapivariable = $dbapiparts[$i]; - $dbapislavevariable = $dbapislaveparts[$i]; - - $dbmastervariableparts = explode(":", $dbmastervariable); - $dbslave2variableparts = explode(":", $dbslave2variable); - $dbapivariableparts = explode(":", $dbapivariable); - $dbapislavevariableparts = explode(":", $dbapislavevariable); - - $label = $dbmastervariableparts[0]; - $dbmastervalue = $dbmastervariableparts[1]; - $dbslave2value = $dbslave2variableparts[1]; - $dbapivalue = $dbapivariableparts[1]; - $dbapislavevalue = $dbapislavevariableparts[1]; - - if($dbmastervalue == "") { - $dbmastervalue = " "; - } - if($dbapivalue == "") { - $dbapivalue = " "; - } - - if($label == "Uptime") { - $label = "Uptime_Days"; - } - - $row_bgcolor = ""; - if($label == "Queries_Per_Second") { - $row_bgcolor = "#ffffcc"; - } - - if($label == "Threads" || $label == "Queries_Per_Second" || $label == "Query_Cache_Hit_Rate(%)" || $label == "Slave_running" || $label == "Slave_IO_Running" || $label == "Slave_SQL_Running" || $label == "Seconds_Behind_Master") { + $fileName = $aDirectory . "dbmaster"; + if($h = @fopen($fileName, "r")) { + $dbmasterline = fread($h, filesize($fileName)); + @fclose($h); + $isdbmasterDead = ($currTIME - filemtime($fileName) > 60); + } + $fileName = $aDirectory . "dbslave2"; + if($h = @fopen($fileName, "r")) { + $dbslave2line = fread($h, filesize($fileName)); + @fclose($h); + $isdbslave2Dead = ($currTIME - filemtime($fileName) > 60); + } + $fileName = $aDirectory . "dbapi"; + if($h = @fopen($fileName, "r")) { + $dbapiline = fread($h, filesize($fileName)); + @fclose($h); + $isdbapiDead = ($currTIME - filemtime($fileName) > 60); + } + $fileName = $aDirectory . "dbapislave"; + if($h = @fopen($fileName, "r")) { + $dbapislaveline = fread($h, filesize($fileName)); + @fclose($h); + $isdbapislaveDead = ($currTIME - filemtime($fileName) > 60); + } + + $dbmasterparts = explode(" ", $dbmasterline); + $dbslave2parts = explode(" ", $dbslave2line); + $dbapiparts = explode(" ", $dbapiline); + $dbapislaveparts = explode(" ", $dbapislaveline); + + for($i = 0; $i < count($dbmasterparts); $i++) { + $dbmastervariable = $dbmasterparts[$i]; + $dbslave2variable = $dbslave2parts[$i]; + $dbapivariable = $dbapiparts[$i]; + $dbapislavevariable = $dbapislaveparts[$i]; + + $dbmastervariableparts = explode(":", $dbmastervariable); + $dbslave2variableparts = explode(":", $dbslave2variable); + $dbapivariableparts = explode(":", $dbapivariable); + $dbapislavevariableparts = explode(":", $dbapislavevariable); + + $label = $dbmastervariableparts[0]; + $dbmastervalue = $dbmastervariableparts[1]; + $dbslave2value = $dbslave2variableparts[1]; + $dbapivalue = $dbapivariableparts[1]; + $dbapislavevalue = $dbapislavevariableparts[1]; + + if($dbmastervalue == "") { + $dbmastervalue = " "; + } + if($dbapivalue == "") { + $dbapivalue = " "; + } + + if($label == "Uptime") { + $label = "Uptime_Days"; + } + + $row_bgcolor = ""; + if($label == "Queries_Per_Second") { + $row_bgcolor = "#ffffcc"; + } + + if($label == "Threads" || $label == "Queries_Per_Second" || $label == "Query_Cache_Hit_Rate(%)" || $label == "Slave_running" || $label == "Slave_IO_Running" || $label == "Slave_SQL_Running" || $label == "Seconds_Behind_Master") { ?> - <tr <?= $row_bgcolor != "" ? "style=\"background-color:" . $row_bgcolor . ";\"" : "" ?>> - <td><b><?= $label ?></b></td> - <td align="right"><?= $isdbmasterDead ? "<font color=red>NR</font>" : $dbmastervalue ?></td> - <td align="right"><?= $isdbslave2Dead ? "<font color=red>NR</font>" : $dbslave2value ?></td> - <td align="right"><?= $isdbapiDead ? "<font color=red>NR</font>" : $dbapivalue ?></td> - <td align="right"><?= $isdbapislaveDead ? "<font color=red>NR</font>" : $dbapislavevalue ?></td> - </tr> -<?php - } - } -?> - </table> - </td> - <td width="20"></td> - <td valign="top" > - <!-- <b>Job run status</b> <a href="javascript:fnPopup('jobs');">(What does this mean?)</a> - <table class="tbl" width="100%"> - <tr> - <td><b>Job Description</b></td> - <td><b>Last Run</b></td> - <td><b>Last Attempt</b></td> - <td><b>Server</b></td> - <td><b>Abort Reason</b></td> - </tr> --> + <tr <?= $row_bgcolor != "" ? "style=\"background-color:" . $row_bgcolor . ";\"" : "" ?>> + <td><b><?= $label ?></b></td> + <td align="right"><?= $isdbmasterDead ? "<font color=red>NR</font>" : $dbmastervalue ?></td> + <td align="right"><?= $isdbslave2Dead ? "<font color=red>NR</font>" : $dbslave2value ?></td> + <td align="right"><?= $isdbapiDead ? "<font color=red>NR</font>" : $dbapivalue ?></td> + <td align="right"><?= $isdbapislaveDead ? "<font color=red>NR</font>" : $dbapislavevalue ?></td> + </tr> +<?php + } + } +?> + </table> + </td> + <td width="20"></td> + <td valign="top" > + <!-- <b>Job run status</b> <a href="javascript:fnPopup('jobs');">(What does this mean?)</a> + <table class="tbl" width="100%"> + <tr> + <td><b>Job Description</b></td> + <td><b>Last Run</b></td> + <td><b>Last Attempt</b></td> + <td><b>Server</b></td> + <td><b>Abort Reason</b></td> + </tr> --> <?php -/* +/* $aDirectory = "/home/data/common/monitor/lastrun/"; $dir = opendir($aDirectory); - - while (($file = readdir($dir)) !== false) { - - if($file != "." && $file != "..") { - $fileName = $aDirectory . $file; - if($h = @fopen($fileName, "r")) { - $line = fread($h, filesize($fileName)); - @fclose($h); - - $parts = explode("^", $line); - - $jobDesc = ""; - if($file == "fixperm") { - $jobDesc = "Fix permissions on download.eclipse.org"; - } - if(substr($file, 0, 9) == "rsync.nfs") { - $jobDesc = "Cluster replication"; - } - if($file == "mail.archive") { - $jobDesc = "Mailing list archive to HTML"; - } - if($file == "news.archive") { - $jobDesc = "Newsgroup archive to HTML"; - } - if(substr($file, 0, 14) == "rsync.websites") { - $jobDesc = "Backend replication - web"; - } - - - if($parts[0] == $parts[1]) { - $parts[1] = " "; - } - -?> - <tr> - <td><?= $jobDesc ?></td> - <td><?= $parts[0] ?></td> - <td><?= $parts[1] ?></td> - <td><?= $parts[2] ?></td> - <td><?= str_replace("\n", "", $parts[3]) ?> </td> - </tr> -<?php - - } - - } + while (($file = readdir($dir)) !== false) { + + if($file != "." && $file != "..") { + $fileName = $aDirectory . $file; + if($h = @fopen($fileName, "r")) { + $line = fread($h, filesize($fileName)); + @fclose($h); + + $parts = explode("^", $line); + + $jobDesc = ""; + if($file == "fixperm") { + $jobDesc = "Fix permissions on download.eclipse.org"; + } + if(substr($file, 0, 9) == "rsync.nfs") { + $jobDesc = "Cluster replication"; + } + if($file == "mail.archive") { + $jobDesc = "Mailing list archive to HTML"; + } + if($file == "news.archive") { + $jobDesc = "Newsgroup archive to HTML"; + } + if(substr($file, 0, 14) == "rsync.websites") { + $jobDesc = "Backend replication - web"; + } + + + if($parts[0] == $parts[1]) { + $parts[1] = " "; + } - } - */ ?> - <!-- </table> - <br /> --> - <table><tr><td style="background-color:#ffffcc;">Yellow indicates dev/download general cluster node.</td> - <td style="background-color:#dcd5d5;">Gray indicates www.eclipse.org cluster node.</td></tr> - - <tr><td style="background-color:#d3f281;">Greenish indicates Bugzilla cluster node.</td> - <td style="background-color:#fff0f0;">Twinkle pink indicates Storage/database backend node.</td></tr> - <tr style="background-color:#99aaff;"><td>Blue indicates PHP/Wiki cluster node.</td></tr> - </table> - </td> - </tr> - </table> - <br /> - Currently running on <?= $_SERVER['SERVER_NAME'] ?> at <?= $_SERVER['SERVER_ADDR'] ?> on <?= date("Y-m-d H:i") ?><br /> - </td> + + <tr> + <td><?= $jobDesc ?></td> + <td><?= $parts[0] ?></td> + <td><?= $parts[1] ?></td> + <td><?= $parts[2] ?></td> + <td><?= str_replace("\n", "", $parts[3]) ?> </td> + </tr> <?php - $html = ob_get_contents(); - ob_end_clean(); + + } + + } + + } + */ ?> - <script language="javascript"> - function fnPopup(_file){ - var filename = 'inc/en_popup_' + _file + '.html'; - window.open(filename, 'popup', 'toolbar=no,scrollbar=no,addressbar=no,width=500,height=400'); - } - </script> - <style> - .tbl { border: 1px solid; } - .tbl tr { padding: 0px; } - .tbl td { - border:1px solid; - border-color: #bbb; - } - pre { margin: 0px; } - } - </style> - <META HTTP-EQUIV="Refresh" CONTENT="120;" /> - <td width="100%" valign="top" class="normal"> - <table width="90%" cellpadding="0" cellspacing="1" border="0"> - <tr> - <td><b>CPU:</b> <?= $pctCPU ?> %</td> - <td><b>Bandwidth:</b> <?= $pctTX ?> %</td> - <td><b>HTTPConn:</b> <?= $pctHTTP ?> %</td> - </tr> - </table> -<? - echo $html; - - include("../html/footer.php"); -?>
\ No newline at end of file + <!-- </table> + <br /> --> + <table><tr><td style="background-color:#ffffcc;">Yellow indicates dev/download general cluster node.</td> + <td style="background-color:#dcd5d5;">Gray indicates www.eclipse.org cluster node.</td></tr> + + <tr><td style="background-color:#d3f281;">Greenish indicates Bugzilla cluster node.</td> + <td style="background-color:#fff0f0;">Twinkle pink indicates Storage/database backend node.</td></tr> + <tr style="background-color:#99aaff;"><td>Blue indicates PHP/Wiki cluster node.</td></tr> + </table> + </td> + </tr> + </table> + <br /> + Currently running on <?= $_SERVER['SERVER_NAME'] ?> at <?= $_SERVER['SERVER_ADDR'] ?> on <?= date("Y-m-d H:i") ?><br /> + </td> + + <script language="javascript"> + function fnPopup(_file){ + var filename = 'inc/en_popup_' + _file + '.html'; + window.open(filename, 'popup', 'toolbar=no,scrollbar=no,addressbar=no,width=500,height=400'); + } + </script> + <style> + .tbl { border: 1px solid; } + .tbl tr { padding: 0px; } + .tbl td { + border:1px solid; + border-color: #bbb; + } + pre { margin: 0px; } + } + </style> + <META HTTP-EQUIV="Refresh" CONTENT="120;" /> + <td width="100%" valign="top" class="normal"> + <table width="90%" cellpadding="0" cellspacing="1" border="0"> + <tr> + <td><b>CPU:</b> <?= $pctCPU ?> %</td> + <td><b>Bandwidth:</b> <?= $pctTX ?> %</td> + <td><b>HTTPConn:</b> <?= $pctHTTP ?> %</td> + </tr> + </table>
\ No newline at end of file diff --git a/committers/help/paths.php b/committers/help/paths.php deleted file mode 100755 index a27b7b1..0000000 --- a/committers/help/paths.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - header("Location: http://wiki.eclipse.org/IT_Infrastructure_Doc"); - exit; - require_once("/home/data/httpd/eclipse-php-classes/system/app.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php"); - - #***************************************************************************** - # - # status.php - # - # Author: Denis Roy - # Date: 2005-04-04 - # - # Description: Get infrastructure status - # - # HISTORY: - # - #**************************************************************************** - - $App = new App(); - $App->runStdWebAppCacheable(); - - $LDAPPerson = new LDAPPerson(); - $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - include("inc/en_paths.inc"); - -?> diff --git a/committers/help/phoenix.php b/committers/help/phoenix.php deleted file mode 100755 index f7d5a2a..0000000 --- a/committers/help/phoenix.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - header("Location: http://wiki.eclipse.org/index.php/Using_Phoenix"); -?>
\ No newline at end of file diff --git a/committers/help/status.php b/committers/help/status.php index 4cb7b16..a5e6b3f 100755 --- a/committers/help/status.php +++ b/committers/help/status.php @@ -1,30 +1,35 @@ <?php - require_once("/home/data/httpd/eclipse-php-classes/system/app.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php"); - - #***************************************************************************** - # - # status.php - # - # Author: Denis Roy - # Date: 2005-04-04 - # - # Description: Get infrastructure status - # - # HISTORY: - # - #**************************************************************************** +/******************************************************************************* + * Copyright (c) 2014-2016 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: + * Denis Roy (Eclipse Foundation) - initial API and implementation + * Christopher Guindon (Eclipse Foundation) - Solstice migration + *******************************************************************************/ + require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); - $App = new App(); - $App->runStdWebAppCacheable(); - - $LDAPPerson = new LDAPPerson(); - #$LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - # Incoming parameters - $_STATE = (isset($_GET['state']) ? $_GET['state'] : ""); - - include("inc/en_status.inc"); - -?> + $App = new App(); + $App->preventCaching(); + $Theme = $App->getThemeClass($theme); + + //$LDAPPerson = new LDAPPerson(); + //$LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); + + //$Theme->setBreadcrumb($Breadcrumb); + //$Theme->setNav($Nav); + //$Theme->setMenu($Menu); + $Theme->setPageAuthor('Eclipse Foundation'); + $Theme->setPageKeywords('eclipse, download, downloads, mirror, project, plug-ins, plugins, java, ide, swt, refactoring, free java ide, tools, platform, open source, development environment, development, ide'); + $Theme->setPageTitle('Eclipse infras status'); + + // Place your html content in a file called content/en_pagename.php + ob_start(); + include("inc/en_status.inc"); + $html = ob_get_clean(); + + $Theme->setHtml($html); + $Theme->generatePage(); diff --git a/committers/login/inc/en_login.inc.php b/committers/login/inc/en_login.inc.php deleted file mode 100755 index caacf9c..0000000 --- a/committers/login/inc/en_login.inc.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php - #***************************************************************************** - # - # login.inc.php - # - # Author: Denis Roy - # Date: 2004-08-06 - # - # Description: UI for User login - # - # HISTORY: - # - #**************************************************************************** - - include("../html/header.php"); -?> - - <td class="normal" valign="top"> - - - <form name="form1" method="post"> - <center> - <table width="85%" border="0"> - <tr> - <td colspan="3"> - <br /> - <font class="app_title">Welcome to <?= $App->getAppName() ?></font><br /> - <font class="normal">Welcome to the Eclipse Foundation's systems. Please be aware that your use of these servers must be for purposes approved by the Eclipse Management Organization (EMO) and/or an Eclipse Project Management Committee (PMC). - </font> - <br /><br /> - - <font class="error"><?= $_uid != "" ? "Error: your User ID and/or password are incorrect. Please try again, or contact the Eclipse Webmaster" : "" ?></font> - </td> - </tr> - <tr> - <td width="200"></td> - <td width="40%"> - - <table width="100%" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header">Sign-in</td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%" class="rect_border"> - <table height="200" width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="white_back"> - <td> - <table> - <tr> - <td class="normal" colspan="2"> - Please log in using your eclipse.org committer User ID and password (the one you use for CVS - not bugzilla).<br /><br /> - </td> - </tr> - <tr> - <td class="normal">Eclipse.org User ID</td> - <td><input type="text" name="uid" size="16" maxlength="100" value="<?= $_uid ?>" /></td> - </tr> - <tr> - <td class="normal">Password</td> - <td class="small"><input type="password" name="password" size="16" maxlength="16" value="" /></td> - </tr> - <tr> - <td></td> - <td><input type="button" name="Signin" onclick="fnSignIn();" value="Sign-in" /></td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - <td width="200"></td> - </tr> - </table> - </center> - <input type="hidden" name="state" value="signin" /> - </form> - - - - <script language="javascript"> - document.form1.uid.focus(); - - function fnSignIn() { - document.form1.submit(); - } - </script> - </td> - - -<?php - include("../html/footer.php"); -?> diff --git a/committers/login/index.php b/committers/login/index.php deleted file mode 100755 index 15d2cb5..0000000 --- a/committers/login/index.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - - header("Location: https://dev.eclipse.org/portal/myfoundation/portal/portal.php"); - exit; -?>
\ No newline at end of file diff --git a/committers/member_portal_admin/_projectCommon.php b/committers/member_portal_admin/_projectCommon.php deleted file mode 100755 index 29b806f..0000000 --- a/committers/member_portal_admin/_projectCommon.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - - # Set the theme for your project's web pages. - # See the Committer Tools "How Do I" for list of themes - # https://dev.eclipse.org/committers/ - # Optional: defaults to system theme - $theme = "Lazarus"; - - # Define your project-wide Nav bars here. - # Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3) - # these are optional - #$Nav->addNavSeparator("Project Home", "downloads.php"); - #$Nav->addCustomNav("Downloads", "downloads.php", "_self", 2); - #$Nav->addCustomNav("Installation", "install.php", "_self", 2); - #$Nav->addCustomNav("FAQ", "faq.php", "_self", 2); - -?> diff --git a/committers/member_portal_admin/denistest.php b/committers/member_portal_admin/denistest.php deleted file mode 100755 index e7ff1cb..0000000 --- a/committers/member_portal_admin/denistest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php
-require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
-require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php");
-require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php");
-$App = new App(); $Nav = new Nav(); $Menu = new Menu();
-include($App->getProjectCommon());
- # All on the same line to unclutter the user's desktop'
-
- #
- # Begin: page-specific settings. Change these.
- $pageTitle = "Eclipse Membership";
- $pageKeywords = "Type, page, keywords, here";
- $pageAuthor = "Type your name here";
-
- # Add page-specific Nav bars here
- # Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank)
- # $Nav->addCustomNav("My Link", "mypage.php", "_self");
- # $Nav->addCustomNav("Google", "http://www.google.com/", "_blank");
-
- # End: page-specific settings
- #
-
-
-
-
- $html = <<<EOHTML
-<div id="maincontent">
- <div id="midcolumn">
- <h1>$pageTitle</h1>
- </div>
- <div id="rightcolumn">
- <div class="sideitem">
- <h6>Related Links</h6>
- <ul>
- <li><a href="../services/">Eclipse Services</a></li>
- </ul>
- </div>
- </div>
-
-</div>
-
-EOHTML;
-
-
- # Generate the web page
- $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/committers/member_portal_admin/scripts/db_access.php b/committers/member_portal_admin/scripts/db_access.php deleted file mode 100755 index ce76d05..0000000 --- a/committers/member_portal_admin/scripts/db_access.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php
-
-function mysql_evaluate($query, $default_value="undefined") {
- $result = mysql_query($query);
- if (mysql_num_rows($result)==0)
- return $default_value;
- else
- return mysql_result($result,0);
-}
-
-function mysql_evaluate_row($query) {
- $result = mysql_query($query);
- return mysql_fetch_row($result);
-}
-
-function mysql_evaluate_rows($query) {
- $result = mysql_query($query);
- $values = array();
- for ($i=0; $i<mysql_num_rows($result); ++$i)
- array_push($values, mysql_fetch_row($result));
-
- return $values;
-}
-
-function mysql_evaluate_array($query) {
- $result = mysql_query($query);
- $values = array();
-
-}
-
-
-?>
diff --git a/committers/member_portal_admin/scripts/rw_db_access.php b/committers/member_portal_admin/scripts/rw_db_access.php deleted file mode 100755 index 681a199..0000000 --- a/committers/member_portal_admin/scripts/rw_db_access.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php
-
-$debug = 0;
-if ($debug) echo "IN RWDB 1";
-
- function is_authorized_to_edit_resources($userid) {
- return in_array($userid, array('wbeaton', 'ngervais', 'iskerrett', 'mward', 'cguindon'));
- }
-
-if ($debug) echo "IN RWDB 9a";
-
-/*********************************************
- if ($_SERVER['SERVER_NAME'] != 'local.eclipse.org') {
-if ($debug) echo "IN RWDB 12";
- require_once("/home/data/httpd/eclipse-php-classes/system/app.class.php");
-if ($debug) echo "IN RWDB 13";
- require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php");
-
-if ($debug) echo "IN RWDB 15";
-
- $App = new App();
- $App->runStdWebAppCacheable();
-
-if ($debug) echo "IN RWDB 18a3";
-
- $LDAPPerson = new LDAPPerson();
- $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn();
-
-// echo "IN RWDB 18b uid = " . $LDAPPerson->getuid();
-
-// if (!is_authorized_to_edit_resources($LDAPPerson->getuid())) {
-// echo("NOT AUTHORIZED");
-// exit;
-// }
-if ($debug) echo "IN RWDB 29";
- }
-******************************************************/
-
-if ($debug) echo "IN RWDB 32";
-
- if (file_exists("/home/data/httpd/eclipse-php-classes/system/dbconnection_rw.class.php")) {
-if ($debug) echo "IN RWDB 35";
- require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_rw.class.php";
- $dbc = new DBConnectionRW();
- $dbc->connect();
- } else {
-
- $dbc = mysql_connect(null, "root", null);
-
- if (!$dbc) {
- echo( "<P>Unable to connect to the database server at this time.</P>" );
- return;
- }
-if ($debug) echo "IN RWDB 47";
- mysql_select_db("local_eclipse", $dbc);
- }
-
-if ($debug) echo "IN RWDB 51";
- include("db_access.php");
-
-
-?>
diff --git a/committers/member_portal_admin/tagManager.php b/committers/member_portal_admin/tagManager.php deleted file mode 100755 index 96e81c9..0000000 --- a/committers/member_portal_admin/tagManager.php +++ /dev/null @@ -1,144 +0,0 @@ -<?php
-$debug = 0;
-if ($debug) echo "test3";
-
-require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
-require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php");
-require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php");
-if ($debug) echo "test8";
-
-$App = new App(); $Nav = new Nav(); $Menu = new Menu();
-include($App->getProjectCommon());
- # All on the same line to unclutter the user's desktop'
-
- #
- # Begin: page-specific settings. Change these.
- $pageTitle = "Eclipse Membership";
- $pageKeywords = "Type, page, keywords, here";
- $pageAuthor = "Type your name here";
-
- # Add page-specific Nav bars here
- # Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank)
- # $Nav->addCustomNav("My Link", "mypage.php", "_self");
- # $Nav->addCustomNav("Google", "http://www.google.com/", "_blank");
-
- # End: page-specific settings
- #
-
- # Paste your HTML content between the EOHTML markers!
- if ($debug) echo "test28v2";
- if ($debug) echo "SERVER_DR:" . $_SERVER['DOCUMENT_ROOT'];
-
- include("scripts/rw_db_access.php");
-
-
- mysql_query("select * from OrganizationInformation;");
- echo mysql_error();
- echo("Organization Information");
-
- mysql_query("select * from OrganizationProducts;");
- echo mysql_error();
- echo("Organization Products");
-
- mysql_query("select * from TagNames;");
- echo mysql_error();
- echo("TagNames ");
-
- mysql_query("select * from OrganizationTags;");
- echo mysql_error();
- echo("OrganizationTags");
-
-
-
- $industry_tag_sql = 'select * from TagNames where is_industry_tag=\'Y\' order by tag_name;';
- $membership_tag_sql = 'select * from TagNames where is_membership_level_tag=\'Y\' order by tag_name;';
- $alphabet_tag_sql = 'select * from TagNames where is_alphabetical_tag=\'Y\' order by tag_name;';
- $project_tag_sql = 'select * from TagNames where is_project_tag=\'Y\' order by tag_name;';
-
- if ($debug) echo "test40";
-
- $industry = mysql_evaluate_rows($industry_tag_sql);
- $membership = mysql_evaluate_rows($membership_tag_sql);
- $alphabet = mysql_evaluate_rows($alphabet_tag_sql);
- $project = mysql_evaluate_rows($project_tag_sql);
-
-if ($debug) echo "test45";
-
- $industry_html = '<div class="homeitem3col"><h3>Industry Tags</h3>';
- $tag_html = '';
- foreach ($industry as $a) {
- $tag_name = $a[1];
- if ($tag_html != '') {$tag_html .= ', ';}
- $tag_html .= '<a href="./showMembersWithTag.php?tag_name=' . $tag_name . '"> ' . $tag_name . '</a>';
- }
- $industry_html .= $tag_html . '</div>';
-
- $membership_html = '<div class="homeitem3col"><h3>Membership Tags</h3>';
- $tag_html = '';
- foreach ($membership as $a) {
- $tag_name = $a[1];
- if ($tag_html != '') {$tag_html .= ', ';}
- $tag_html .= '<a href="./showMembersWithTag.php?tag_name=' . $tag_name . '"> ' . $tag_name . '</a>';
- }
- $membership_html .= $tag_html . '</div>';
-
-
- $alphabet_html = '<div class="homeitem3col"><h3>Alphabetical Tags</h3>';
- $tag_html = '';
- foreach ($alphabet as $a) {
- $tag_name = $a[1];
- if ($tag_html != '') {$tag_html .= ', ';}
- $tag_html .= '<a href="./showMembersWithTag.php?tag_name=' . $tag_name . '"> ' . $tag_name . '</a>';
- }
- $alphabet_html .= $tag_html . '</div>';
-
- $project_html = '<div class="homeitem3col"><h3>Project Tags</h3>';
- $tag_html = '';
- foreach ($project as $a) {
- $tag_name = $a[1];
- if ($tag_html != '') {$tag_html .= ', ';}
- $tag_html .= '<a href="./showMembersWithTag.php?tag_name=' . $tag_name . '"> ' . $tag_name . '</a>';
- }
- $project_html .= $tag_html . '</div>';
-
-
-
- $html = <<<EOHTML
-<div id="maincontent">
- <div id="midcolumn">
- <h1>$pageTitle</h1>
- <p> The Eclipse Foundation is supported by its member organizations. You do not have to be a
- member to use the Eclipse technology or participate in an Eclipse open source project. Member
- organizations typically have an Eclipse specific solution that they offer to the community.
- </p>
- <a href="become_a_member/"><img align="left" src="mem_eclipse_pos_logo_fc_xsm.jpg" border="1" alt="Become a member" /></a>
- <br />
-   <font size="+1"><b><a href="become_a_member/">Become a member</a></b></font><br />
-   Discover the benefits of being a member of the Eclipse Foundation.
-
- <hr class="clearer" />
-
- <h1>Find Eclipse Members By Tag</h1>
- $industry_html
- $project_html
- $membership_html
- $alphabet_html
-
- </div>
- <div id="rightcolumn">
- <div class="sideitem">
- <h6>Related Links</h6>
- <ul>
- <li><a href="../services/">Eclipse Services</a></li>
- </ul>
- </div>
- </div>
-
-</div>
-
-EOHTML;
-
-
- # Generate the web page
- $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
diff --git a/committers/membership/edit_member.php b/committers/membership/edit_member.php deleted file mode 100755 index f9a08de..0000000 --- a/committers/membership/edit_member.php +++ /dev/null @@ -1,135 +0,0 @@ -<?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: - # Edit a tag! - #**************************************************************************** - include('scripts/common.php'); - include('scripts/header.php'); - - -if ($_POST['submit']) - { - $id = $_POST['organizationID']; - $companyURL = $_POST['companyURL']; - $shortDesc = $_POST['shortDesc']; - $longDesc = $_POST['longDesc']; - $smallLogoUpdate = $largeLogoUpdate = 0; - - if (is_uploaded_file($_FILES['smallLogo']['tmp_name'])) - { - if ($_FILES['smallLogo']['size'] < 100000) - { - $smallLogoUpdate = 1; - $smallImgData = addslashes (file_get_contents($_FILES['smallLogo']['tmp_name'])); - $smallSize = getimagesize($_FILES['smallLogo']['tmp_name']); - $smallMime = $smallSize['mime']; - } - } - if (is_uploaded_file($_FILES['largeLogo']['tmp_name'])) - { - if ($_FILES['largeLogo']['size'] < 100000) - { - $largeLogoUpdate = 1; - $largeImgData = addslashes (file_get_contents($_FILES['largeLogo']['tmp_name'])); - $largeSize = getimagesize($_FILES['largeLogo']['tmp_name']); - $largeMime = $largeSize['mime']; - } - } - - $query = "Update OrganizationInformation set short_description = '$shortDesc', long_description='$longDesc', company_url = '$companyURL'"; - if ($smallLogoUpdate) - { - $query .= ",small_mime = '$smallMime', small_logo = '$smallImgData'"; - } - if ($largeLogoUpdate) - { - $query .= ", large_mime = '$largeMime', large_logo = '$largeImgData'"; - } - $query .= " WHERE OrganizationID = $id"; - - mysql_query($query) or die(mysql_error()); - //echo $query; - echo "Organization Updated successfully!<br/><a href=\"member_management.php\">Return to Member Management</a>"; - } - else - { - $_input_id = $_GET['id']; - $query = "select OI.*, ORG.name1 from OrganizationInformation as OI INNER JOIN organizations as ORG on OI.OrganizationID = ORG.organization_id where OrganizationID = $_input_id"; - $result = mysql_query($query); - $orgIterator = mysql_fetch_array($result); - - $id = $orgIterator['OrganizationID']; - $shortDesc = $orgIterator['short_description']; - $longDesc = $orgIterator['long_description']; - $companyURL = $orgIterator['company_url']; - $smallMime = $orgIterator['small_mime']; - $smallLogo = $orgIterator['small_logo']; - $largeMime = $orgIterator['large_mime']; - $largeLogo = $orgIterator['large_logo']; - $orgName = $orgIterator['name1']; - ?> - <form enctype="multipart/form-data" 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>Company URL</td> - <td><input type="text" name="companyURL" value="<?=$companyURL;?>" size="80"/></td> - </tr> - <td>Short Description</td> - <td><textarea name="shortDesc" id="shortDesc" cols="60" rows="5" onkeyup="CheckFieldLength(shortDesc, 'myCounter', 180);" onkeydown="CheckFieldLength(shortDesc, 'myCounter', 180);" onmouseout="CheckFieldLength(shortDesc, 'myCounter', 180);" maxLength="180"><?=$shortDesc;?></textarea> - <br/>You have <B><SPAN id=myCounter></SPAN></B> characters remaining for your short description...</font></td> - </tr> - <tr> - <td>Long Description</td> - <td><textarea name="longDesc" cols="60" rows="10"><?=$longDesc;?></textarea></td> - </tr> - <tr> - <td>Small Logo</td> - <td><img src="scripts/get_image.php?id=<?=$id;?>&size=small"><br/><input name="smallLogo" type="file"/></td> - </tr> - <tr> - <td>Small Mime Type</td> - <td><?=$smallMime;?></td> - </tr> - <tr> - <td>Large Logo</td> - <td><img src="scripts/get_image.php?id=<?=$id;?>&size=large"><br/><input name="largeLogo" type="file"/></td> - </tr> - <tr> - <td>Large Mime Type</td> - <td><?=$largeMime;?></td> - </tr> - <tr> - <td></td> - <td><input type="submit" name="submit" value="Update Member"></td> - </tr> - </table> - </form> - <? - } - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/edit_member_tags.php b/committers/membership/edit_member_tags.php deleted file mode 100755 index 4a53608..0000000 --- a/committers/membership/edit_member_tags.php +++ /dev/null @@ -1,134 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_tags.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page to add / remove tags from a member - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - - if ($_POST['submit']) - { - $orgID = $_POST['OrganizationID']; - $deletionQuery = "delete from OrganizationTags where OrganizationID = $orgID"; - mysql_query($deletionQuery); - - $allTagQuery = "SELECT tag_name, TagID FROM TagNames"; - $allTagResult = mysql_query($allTagQuery); - $insertsToDo = 0; - $insertQuery = "INSERT INTO OrganizationTags (OrganizationID, TagID) VALUES"; - while($allTagIterator = mysql_fetch_array($allTagResult)) - { - $tagName = $allTagIterator['tag_name']; - $tagID = $allTagIterator['TagID']; - //echo $tagName; - if ($_POST[$tagID] == "on") - { - $insertsToDo++; - if ($insertsToDo > 1) - $insertQuery .= ","; - $insertQuery .= "($orgID, $tagID)"; - } - } - if ($insertsToDo > 0) - { - //echo $insertQuery; - mysql_query($insertQuery); - echo "Tags Updated Successfully<br/>"; - echo "<a href=\"member_tags.php\">Return to Member Tags</a>"; - } - - } - else{ - $_input_id = $_GET['id']; - $query = "SELECT organization_id, name1 FROM organizations WHERE organization_id = $_input_id"; - $result = mysql_query($query); - $orgIterator = mysql_fetch_array($result); - $id = $orgIterator['organization_id']; - $orgName = $orgIterator['name1']; - - $existingTagArray = existingTagPopulate($id); - - $membershipTagQuery = "SELECT tag_name, TagID FROM TagNames WHERE is_membership_level_tag = 1 ORDER BY tag_name"; - $membershipTagResult = mysql_query($membershipTagQuery); - while($membershipTagIterator = mysql_fetch_array($membershipTagResult)) - { - $tagName = $membershipTagIterator['tag_name']; - $tagID = $membershipTagIterator['TagID']; - $membershipTagList .= "<input name=\"". $tagID . "\" type=\"checkbox\" " . checkExistingTags($tagID, $existingTagArray) . "/>". $tagName ."<br/><br/>"; - } - - $alphaTagQuery = "SELECT tag_name, TagID FROM TagNames WHERE is_alphabetical_tag = 1 ORDER BY tag_name"; - $alphaTagResult = mysql_query($alphaTagQuery); - while($alphaTagIterator = mysql_fetch_array($alphaTagResult)) - { - $tagName = $alphaTagIterator['tag_name']; - $tagID = $alphaTagIterator['TagID']; - $alphaTagList .= "<input name=\"". $tagID . "\" type=\"checkbox\" " . checkExistingTags($tagID, $existingTagArray) . "/>". $tagName ."<br/><br/>"; - } - - $industryTagQuery = "SELECT tag_name, TagID FROM TagNames WHERE is_industry_tag = 1 ORDER BY tag_name"; - $industryTagResult = mysql_query($industryTagQuery); - while($industryTagIterator = mysql_fetch_array($industryTagResult)) - { - $tagName = $industryTagIterator['tag_name']; - $tagID = $industryTagIterator['TagID']; - $industryTagList .= "<input name=\"". $tagID . "\" type=\"checkbox\" " . checkExistingTags($tagID, $existingTagArray) . "/>". $tagName ."<br/><br/>"; - } - - $projectTagQuery = "SELECT tag_name, TagID FROM TagNames WHERE is_project_tag = 1 ORDER BY tag_name"; - $projectTagResult = mysql_query($projectTagQuery); - while($projectTagIterator = mysql_fetch_array($projectTagResult)) - { - $tagName = $projectTagIterator['tag_name']; - $tagID = $projectTagIterator['TagID']; - $projectTagList .= "<input name=\"". $tagID . "\" type=\"checkbox\" " . checkExistingTags($tagID, $existingTagArray) . "/>". $tagName ."<br/><br/>"; - } - - - ?> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <table> - <tr> - <td valign="top">Organization Name :</td> - <td valign="top" colspan=3><?=$orgName;?><input type="hidden" name="OrganizationID" value="<?=$id;?>"/><br/><br/></td> - </tr> - <tr> - <td width="150"><u>Membership Tags</u></td> - <td width="150"><u>Alphabetical Tags</u></td> - <td width="150"><u>Industry Tags</u></td> - <td width="150"><u>Project Tags</u></td> - </tr> - <tr> - <td valign="top"><?=$membershipTagList;?></td> - <td valign="top"><?=$alphaTagList;?></td> - <td valign="top"><?=$industryTagList;?></td> - <td valign="top"><?=$projectTagList;?></td> - </tr> - - <tr> - <td></td> - <td><input name="submit" value="Update Tags" type="submit"/></td> - </table> - </form> - <? - } - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/edit_product.php b/committers/membership/edit_product.php deleted file mode 100755 index ab3a0ec..0000000 --- a/committers/membership/edit_product.php +++ /dev/null @@ -1,80 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_management.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page for members, displays a list of members, allows for adds, edits , removals. - #**************************************************************************** - include('scripts/common.php'); - include('scripts/header.php'); - - if ($_POST['submit']) - { - $id = $_POST['ProductID']; - $orgID = $_POST['OrgID']; - $productName = $_POST['productName']; - $productDesc = $_POST['description']; - $productURL = $_POST['productURL']; - $query = "UPDATE OrganizationProducts set name = '$productName', product_url = '$productURL', description = '$productDesc' where ProductID = $id"; - debugEcho ($productDesc); - mysql_query($query); - ?> - Product Updated Successfully!</br> - <a href="product_management.php?id=<?=$orgID;?>">Return to Product Management</a> - <? - - } - else - { - $_input_id = $_GET['id']; - $query = "SELECT OrganizationID, name, description, product_url FROM OrganizationProducts where ProductID = $_input_id"; - $result = mysql_query($query); - $productIterator = mysql_fetch_array($result); - - $orgID = $productIterator['OrganizationID']; - $productName = $productIterator['name']; - $productDesc = $productIterator['description']; - $productURL = $productIterator['product_url']; - ?> - <h2>Edit a Product</h2> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <input type="hidden" name="ProductID" value="<?=$_input_id;?>"> - <input type="hidden" name="OrgID" value="<?=$orgID;?>"> - <table> - <tr> - <td>Product Name :</td> - <td><input name="productName" type="text" value="<?=$productName;?>" size="80"/></td> - </tr> - <tr> - <td>Product URL :</td> - <td><input name="productURL" type="text" value="<?=$productURL;?>" size="80"/></td> - </tr> - <tr> - <td>Description :</td> - <td><textarea name="description" cols="60" rows="10"><?=$productDesc;?></textarea></td> - <tr/> - <tr> - <td></td> - <td><input name="submit" value="Update Product" type="submit"/></td> - </tr> - </table> - </form> - <? - } - include('scripts/footer.php'); -?> diff --git a/committers/membership/edit_tags.php b/committers/membership/edit_tags.php deleted file mode 100755 index 5734ef3..0000000 --- a/committers/membership/edit_tags.php +++ /dev/null @@ -1,106 +0,0 @@ -<?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: - # Edit a tag! - #**************************************************************************** - include('scripts/common.php'); - include('scripts/header.php'); - if ($_POST['submit']) - { - $id = $_POST['tagID']; - $tagName = $_POST['tagName']; - $tagType = $_POST['tagType']; - $verifiedTag = $_POST['verifiedTag']; - if ($verifiedTag == "on") - $verifiedTag = 1; - else - $verifiedTag = 0; - - $membershipTag = $alphaTag = $industryTag = $projectTag = 0; - - switch ($tagType) { - case 1 : - $membershipTag = 1; - break; - case 2 : - $alphaTag = 1; - break; - case 3 : - $industryTag = 1; - break; - case 4 : - $projectTag = 1; - break; - } - - $query = "update TagNames set tag_name = '$tagName', is_verified_tag = $verifiedTag, is_membership_level_tag = $membershipTag, is_alphabetical_tag = $alphaTag, is_industry_tag = $industryTag, is_project_tag = $projectTag WHERE TagID = $id"; - mysql_query($query); - ?> - <a href="tags_management.php">Return to Tags Management</a> - <? - - } - else - { - $_input_id = $_GET['id']; - $query = "select * from TagNames where TagID = $_input_id"; - $result = mysql_query($query); - $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']; - ?> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <table> - <tr> - <td>Tag ID:</td> - <td><input type="hidden" name="tagID" value="<?=$id;?>"><?=$id;?></td> - </tr> - <tr> - <td>Tag Name:</td> - <td><input type="text" name="tagName" value="<?=$tagName;?>"></td> - </tr> - <tr> - <td>Tag Type: </td> - <td><select name="tagType"> - <option value="1" <? if ($membershipTag) echo "selected"; ?>>Membership</option> - <option value="2" <? if ($alphaTag) echo "selected"; ?>>Alphabetical</option> - <option value="3" <? if ($industryTag) echo "selected"; ?>>Industry</option> - <option value="4" <? if ($projectTag) echo "selected"; ?>>Project</option> - </select> - </td> - </tr> - <td>Verified Tag</td> - <td><input type="checkbox" name="verifiedTag" <? if ($verifiedTag) echo "checked";?>></td> - </tr> - <tr> - <td></td> - <td><input type="submit" value="Update Tag" name="submit"></td> - </table> - </form> - <? - } - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/edit_tags_member.php b/committers/membership/edit_tags_member.php deleted file mode 100755 index 1f1dece..0000000 --- a/committers/membership/edit_tags_member.php +++ /dev/null @@ -1,98 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_tags.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page to add / remove members from a tag - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - - if ($_POST['submit']) - { - $tagID = $_POST['TagID']; - $deletionQuery = "delete from OrganizationTags where TagID = $tagID"; - mysql_query($deletionQuery); - - $allOrgQuery = "SELECT OrganizationID from OrganizationInformation"; - $allOrgResult = mysql_query($allOrgQuery); - $insertsToDo = 0; - $insertQuery = "INSERT INTO OrganizationTags (OrganizationID, TagID) VALUES"; - while($allOrgIterator = mysql_fetch_array($allOrgResult)) - { - $orgID = $allOrgIterator['OrganizationID']; - if ($_POST[$orgID] == "on") - { - $insertsToDo++; - if ($insertsToDo > 1) - $insertQuery .= ","; - $insertQuery .= "($orgID, $tagID)"; - } - } - if ($insertsToDo > 0) - { - //echo $insertQuery; - mysql_query($insertQuery); - echo "Members Updated Successfully<br/>"; - echo "<a href=\"tags_member.php\">Return to Tags Members</a>"; - } - - } - else{ - $_input_id = $_GET['id']; - $query = "SELECT tag_name, TagID from TagNames WHERE TagID = $_input_id"; - $result = mysql_query($query); - $tagIterator = mysql_fetch_array($result); - $id = $tagIterator['TagID']; - $tagName = $tagIterator['tag_name']; - - $existingMemberArray = existingMemberPopulate($id); - $allOrgQuery = "SELECT ORG.name1, ORGINFO.OrganizationID from OrganizationInformation as ORGINFO INNER JOIN organizations as ORG on ORGINFO.OrganizationID = ORG.organization_id WHERE ORG.member_type != '' order by ORG.name1"; - $allOrgResult = mysql_query($allOrgQuery); - - - - ?> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <table> - <tr> - <td>Tag Name :</td> - <td><?=$tagName;?><input type="hidden" name="TagID" value="<?=$id;?>"/></td> - </tr> - <? - while($allOrgIterator = mysql_fetch_array($allOrgResult)) - { - $orgName = $allOrgIterator['name1']; - $orgID = $allOrgIterator['OrganizationID']; - ?> - <tr> - <td><?=$orgName;?></td> - <td><input name="<?=$orgID;?>" type="checkbox" <?=checkExistingMembers($orgID, $existingMemberArray);?>/></td> - </tr> - <? - } ?> - <tr> - <td></td> - <td><input name="submit" value="Update Members" type="submit"/></td> - </table> - </form> - <? - } - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/index.php b/committers/membership/index.php deleted file mode 100755 index 6b1b573..0000000 --- a/committers/membership/index.php +++ /dev/null @@ -1,46 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # index.php - # - # Author: Nathan - # Date: February 16, 2006 - # - # Description: - # Introduction page for the membership section - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - - $query = "Select count(*) from OrganizationInformation"; - $result = mysql_query($query); - $countMembers = mysql_fetch_array($result); - $query = "Select count(*) from TagNames"; - $result = mysql_query($query); - $countTags = mysql_fetch_array($result); - ?> - <table> - <tr> - <td>Number of Tags</td> - <td><?=$countTags[0];?></td> - </tr> - <tr> - <td>Number of Members</td> - <td><?=$countMembers[0];?></td> - </tr> - </table> - <? - include('scripts/footer.php'); -?> diff --git a/committers/membership/industry_tag_kpi.php b/committers/membership/industry_tag_kpi.php deleted file mode 100755 index 8804d4a..0000000 --- a/committers/membership/industry_tag_kpi.php +++ /dev/null @@ -1,67 +0,0 @@ -<?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');
-?>
\ No newline at end of file diff --git a/committers/membership/member_management.php b/committers/membership/member_management.php deleted file mode 100755 index 3973dad..0000000 --- a/committers/membership/member_management.php +++ /dev/null @@ -1,168 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_management.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page for members, displays a list of members, allows for adds, edits , removals. - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - - if ($_POST['submit']) - { - $id = $_POST['orgName']; - $companyURL = $_POST['companyURL']; - $shortDesc = $_POST['shortDesc']; - $longDesc = $_POST['longDesc']; - - if (is_uploaded_file($_FILES['smallLogo']['tmp_name'])) - { - if ($_FILES['smallLogo']['size'] < 100000) - { - $smallImgData = addslashes (file_get_contents($_FILES['smallLogo']['tmp_name'])); - $smallSize = getimagesize($_FILES['smallLogo']['tmp_name']); - $smallMime = $smallSize['mime']; - } - } - if (is_uploaded_file($_FILES['largeLogo']['tmp_name'])) - { - if ($_FILES['largeLogo']['size'] < 100000) - { - $largeImgData = addslashes (file_get_contents($_FILES['largeLogo']['tmp_name'])); - $largeSize = getimagesize($_FILES['largeLogo']['tmp_name']); - $largeMime = $largeSize['mime']; - } - } - - - $query = "INSERT INTO OrganizationInformation VALUES ($id, '$shortDesc' ,'$longDesc', '$companyURL', '$smallMime', '$smallImgData', '$largeMime', '$largeImgData')"; - mysql_query($query) or die(mysql_error()); - //echo $query; - - echo "Organization added successfully!<br/>"; - echo "<a href=\"edit_member_tags.php?id=" . $id . "\">Edit Tags</a> for this new member"; - - } - ?> - <h2>Member Management</h2> - <table style="border:1px solid #000;" cellspacing=0 cellpadding=1> - <tr class="header"> - <td width="125">Organization ID</td> - <td width="175">Organization Name</td> - <td width="175">Membership Type</td> - <td width="175">Tags</td> - <td width="75">Products</td> - <td width="75">Edit</td> - <td width="75">Edit Tags</td> - <td width="75">Remove</td> - </tr> - <? - $query = "SELECT OI.OrganizationID, ORG.name1, ORG.member_type FROM OrganizationInformation as OI INNER JOIN organizations as ORG on OI.OrganizationID = ORG.organization_id WHERE ORG.member_type != '' ORDER BY ORG.name1"; - $result = mysql_query($query); - while($orgIterator = mysql_fetch_array($result)) - { - $id = $orgIterator['OrganizationID']; - $companyName = $orgIterator['name1']; - $memberType = $orgIterator['member_type']; - - $productQuery = "SELECT count(*) from OrganizationProducts where OrganizationID = $id"; - $productResult = mysql_query($productQuery); - $productIterator = mysql_fetch_array($productResult); - $numProducts = $productIterator[0]; - - $subQuery = "SELECT TAG.tag_name, TAGORG.TagID FROM OrganizationTags as TAGORG INNER JOIN TagNames as TAG on TAGORG.TagID = TAG.TagID WHERE TAGORG.OrganizationID = $id ORDER by TAG.tag_name"; - $subResult = mysql_query($subQuery); - $tagList = "<select>"; - while ($tagIterator = mysql_fetch_array($subResult)) - { - $tagName = $tagIterator['tag_name']; - $tagList .= "<option>" . $tagName . "</option>"; - } - $tagList .= "</select>"; - ?> - - <tr onMouseOver="this.style.background='#CDE3FB';" onMouseOut="this.style.background='#FFFFFF';"> - <td><?=$id;?></td> - <td><?=$companyName;?></td> - <td><?=memberType($memberType);?></td> - <td><?=$tagList;?></td> - <td><a href="product_management.php?id=<?=$id;?>"><?=$numProducts;?></a></td> - <td><a href="edit_member.php?id=<?=$id;?>">Edit</a></td> - <td><a href="edit_member_tags.php?id=<?=$id;?>">Edit Tags</a></td> - <td><a href="remove_member.php?id=<?=$id;?>">Remove</a></td> - </tr> - <? - } - ?> - </table> - <br/> - <h3>Add a Member</h3> - <form enctype="multipart/form-data" action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <input type="hidden" name="MAX_FILE_SIZE" value="100000"> - <table> - <tr> - <td>Organization Name:</td> - <td> - <select name="orgName"> - <? - $query = "CREATE TEMPORARY TABLE orgTempTable SELECT ORG.organization_id, OI.OrganizationID, ORG.name1, ORG.member_type from organizations as ORG left join OrganizationInformation as OI on ORG.organization_id = OI.OrganizationID"; - mysql_query($query) or die(mysql_error()); - $query = "SELECT * from orgTempTable WHERE OrganizationID IS NULL and member_type != '' ORDER BY name1"; - $result = mysql_query($query); - while ($orgIterator = mysql_fetch_array($result)) - { - $id = $orgIterator['organization_id']; - $orgName = $orgIterator['name1']; - ?><option value="<?=$id;?>"><?=$orgName;?></option> - <? - } - ?> - </td> - </tr> - <tr> - <td>Company URL</td> - <td><input type="text" name="companyURL" size="80"/></td> - </tr> - <td>Short Description</td> - <td><textarea name="shortDesc" id="shortDesc" cols="60" rows="5" onkeyup="CheckFieldLength(shortDesc, 'myCounter', 180);" onkeydown="CheckFieldLength(shortDesc, 'myCounter', 180);" onmouseout="CheckFieldLength(shortDesc, 'myCounter', 180);" maxLength="180"></textarea> - <br/>You have <B><SPAN id=myCounter>180</SPAN></B> characters remaining for your short description...</font></td> - </tr> - <tr> - <td>Long Description</td> - <td><textarea name="longDesc" cols="60" rows="10"></textarea></td> - </tr> - <tr> - <td>Small Logo</td> - <td><input name="smallLogo" type="file"/></td> - </tr> - <tr> - <td>Large Logo</td> - <td><input name="largeLogo" type="file"/></td> - </tr> - <tr> - <td></td> - <td><input type="submit" name="submit" value="Add Member"></td> - </tr> - </table> - </form> - - <? - - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/member_tags.php b/committers/membership/member_tags.php deleted file mode 100755 index 09cb125..0000000 --- a/committers/membership/member_tags.php +++ /dev/null @@ -1,72 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_tags.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page to add / remove tags from a member - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - - ?> - <h2>Add Tags to Members</h2> - <table style="border:1px solid #000;" cellspacing=0 cellpadding=1> - <tr class="header"> - <td width="125">Organization ID</td> - <td width="175">Organization Name</td> - <td width="175">Tags</td> - <td width="75">Edit</td> - </tr> - <? - $query = "SELECT OI.OrganizationID, ORG.name1, ORG.member_type FROM OrganizationInformation as OI INNER JOIN organizations as ORG on OI.OrganizationID = ORG.organization_id WHERE ORG.member_type != '' ORDER BY ORG.name1"; - $result = mysql_query($query); - debugEcho($query); - while($orgIterator = mysql_fetch_array($result)) - { - $id = $orgIterator['OrganizationID']; - $companyName = $orgIterator['name1']; - $memberType = $orgIterator['member_type']; - - $subQuery = "SELECT TAG.tag_name, TAGORG.TagID FROM OrganizationTags as TAGORG INNER JOIN TagNames as TAG on TAGORG.TagID = TAG.TagID WHERE TAGORG.OrganizationID = $id ORDER by TAG.tag_name"; - $subResult = mysql_query($subQuery); - $tagList = "<select>"; - while ($tagIterator = mysql_fetch_array($subResult)) - { - $tagName = $tagIterator['tag_name']; - $tagList .= "<option>" . $tagName . "</option>"; - } - $tagList .= "</select>"; - ?> - - <tr onMouseOver="this.style.background='#CDE3FB';" onMouseOut="this.style.background='#FFFFFF';"> - <td><?=$id;?></td> - <td><?=$companyName;?></td> - <td><?=$tagList;?></td> - <td><a href="edit_member_tags.php?id=<?=$id;?>">Edit</a></td> - </tr> - <? - } - ?> - </table> - - - <? - - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/membership.css b/committers/membership/membership.css deleted file mode 100755 index 2e81630..0000000 --- a/committers/membership/membership.css +++ /dev/null @@ -1,20 +0,0 @@ -body { - font-family:arial, tahoma, sans serif; -} - -.header { - background-color:#91B8E8; - color:#FFFFFF; -} - -.highlight { - background-color:#CDE3FB; -} - - -.header td { - border-bottom: 1px solid #444; -} - -table - { padding:0px; }
\ No newline at end of file diff --git a/committers/membership/processTag.php b/committers/membership/processTag.php deleted file mode 100755 index b653b0e..0000000 --- a/committers/membership/processTag.php +++ /dev/null @@ -1,150 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_tags.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page to add / remove members from a tag - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - - if ( ($_POST['submit'] == "Add New Tag") || ($_POST['submit'] == "Add New Tag No Org") ) - { - $noOrg = ($_POST['submit'] == "Add New Tag No Org"); - $confirmedTagName = $_POST['confirmTagName']; - if (!$noOrg) $confirmedOrgID = $_POST['confirmOrgID']; - - - $row = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS numrows FROM TagNames where tag_name='".$confirmedTagName."';")); - $tag_exists = $row['numrows'] != 0; - - if ($tag_exists) { - echo "<br><font color=\"red\">Tag " . $confirmedTagName . " Already Exists! <br> Did you already add it?</font>"; - if (!$noOrg) { - echo "<br>Check out the tags <a href=\"https://dev.eclipse.org/committers/membership/edit_member_tags.php?id=" . $confirmedOrgID . "\"> for this member.</a>"; - } - echo "<br><br><a href=\"index.php\">Return to Membership Main</a>"; - - } else { - $createTagQuery = "INSERT INTO TagNames VALUES(NULL, '$confirmedTagName', 0,1,0,1,0)"; - mysql_query($createTagQuery); - $createdTagID = mysql_insert_id(); - - if (!$noOrg) { - $createAssocQuery = "INSERT INTO OrganizationTags VALUES($confirmedOrgID, $createdTagID)"; - mysql_query($createAssocQuery); - } - - echo "Tag : ". $confirmedTagName ." Created Succesfully<br/>"; - $other = $noOrg ? "" : "other "; - echo "<br>Add ". $other . "members to the <a href=\"https://dev.eclipse.org/committers/membership/edit_tags_member.php?id=" . $createdTagID . "\">" . $confirmedTagName . "</a> tag."; - echo "<br><br><a href=\"index.php\">Return to Membership Main</a>"; - } - - - } - elseif (($_POST['submit'] == "Add Existing Tag") || ($_POST['submit'] == "Add Tag to Member")) - { - $confirmedTagID = $_POST['confirmTagID']; - $confirmedOrgID = $_POST['confirmOrgID']; - $confirmedTagName = $_POST['confirmTagName']; - - - $row = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS numrows FROM OrganizationTags where OrganizationID='".$confirmedOrgID."' and TagID='".$confirmedTagID."';")); - $relation_exists = $row['numrows'] != 0; - - if ($relation_exists) { - echo "<br><font color=\"red\">Relationship of tag " .$confirmedTagName . " with OrgID ". $confirmedOrgID . " Already Exists! <br> Did you already add it?</font>"; - echo "<br>Check out the tags <a href=\"https://dev.eclipse.org/committers/membership/edit_member_tags.php?id=" . $confirmedOrgID . "\">" . $confirmedTagName . " for this member.</a>"; - echo "<br><br><a href=\"index.php\">Return to Membership Main</a>"; - } else { - $createAssocQuery = "INSERT INTO OrganizationTags VALUES($confirmedOrgID, $confirmedTagID)"; - mysql_query($createAssocQuery); - debugEcho($createAssocQuery); - - echo "Tag : ". $confirmedTagName ." Added Succesfully<br/><a href=\"index.php\">Return to Membership Main</a>"; - } - } - else - { - $_type = $_GET['type']; - $_tagName = $_GET['tagName']; - $_tagID = $_GET['tagID']; - $_org_id = $_GET['orgID']; - $query = "SELECT name1 from organizations where organization_id = $_org_id"; - $result = mysql_query($query); - $memberName = mysql_fetch_array($result); - $tagName = mysql_fetch_array(mysql_query("SELECT tag_name FROM TagNames WHERE TagID = $_tagID")); - - - if ($_type == "AddNew") - { - ?> - <h2>New Tag Addition</h2> - Tag Name: <?=$_tagName;?><br/><br/> - Member: <?=$memberName[0];?><br/><br/> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <input type="hidden" name="confirmOrgID" value="<?=$_org_id;?>"/> - <input type="hidden" name="confirmTagName" value="<?=$_tagName;?>"/> - <input type="submit" value="Add New Tag" name="submit"/> - </form> - <? - } - if ($_type == "AddNewNoOrg") - { - ?> - <h2>New Tag Addition Without An Org</h2> - Tag Name: <?=$_tagName;?><br/><br/> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <input type="hidden" name="confirmTagName" value="<?=$_tagName;?>"/> - <input type="submit" value="Add New Tag No Org" name="submit"/> - </form> - <? - } - if ($_type == "AddExisting") - { - ?> - <h2>Existing Tag Addition</h2> - Tag Name: <?=$tagName[0];?><br/><br/> - Member: <?=$memberName[0];?><br/><br/> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <input type="hidden" name="confirmOrgID" value="<?=$_org_id;?>"/> - <input type="hidden" name="confirmTagName" value="<?=$tagName[0];?>"/> - <input type="hidden" name="confirmTagID" value="<?=$_tagID;?>"/> - <input type="submit" value="Add Existing Tag" name="submit"/> - </form> - <? - } - if ($_type == "AddMember") - { - ?> - <h2>Existing Member Addition</h2> - Tag Name: <?=$tagName[0];?><br/><br/> - Member: <?=$memberName[0];?><br/><br/> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <input type="hidden" name="confirmOrgID" value="<?=$_org_id;?>"/> - <input type="hidden" name="confirmTagName" value="<?=$tagName[0];?>"/> - <input type="hidden" name="confirmTagID" value="<?=$_tagID;?>"/> - <input type="submit" value="Add Tag to Member" name="submit"/> - </form> - <? - } - } - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/product_management.php b/committers/membership/product_management.php deleted file mode 100755 index 29aaa55..0000000 --- a/committers/membership/product_management.php +++ /dev/null @@ -1,93 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_management.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page for members, displays a list of members, allows for adds, edits , removals. - #**************************************************************************** - include('scripts/common.php'); - include('scripts/header.php'); - - if ($_POST['submit']) - { - $orgID = $_POST['orgID']; - $productName = $_POST['productName']; - $productURL = $_POST['productURL']; - $productDesc = $_POST['description']; - - $query = "INSERT INTO OrganizationProducts VALUES ('', $orgID, '$productName', '$productDesc', '$productURL' )"; - //echo $query; - mysql_query($query); - echo "Product Added Successfully!<br/>"; - } - - $_input_id = $_GET['id'] ? $_GET['id'] : $_POST['orgID']; - $query = "SELECT name1 FROM organizations WHERE organization_id = $_input_id"; - $result = mysql_query($query); - $resultData = mysql_fetch_array($result); - $orgName = $resultData['name1']; - ?> - <h2>Products for <?=$orgName;?></h2> - <table style="border: 1px solid #000;" cellspacing=0 cellpadding=1> - <tr class="header"> - <td width="75">Product ID</td> - <td width="250">Product Name</td> - <td width="75">Edit</td> - <td width="75">Remove</td> - </tr> - <? - $productQuery = "SELECT ProductID, name FROM OrganizationProducts WHERE OrganizationId = $_input_id ORDER by ProductID"; - $productResult = mysql_query($productQuery); - while ($productIterator = mysql_fetch_array($productResult)) - { - $productID = $productIterator['ProductID']; - $productName = $productIterator['name']; - ?> - <tr onMouseOver="this.style.background='#CDE3FB';" onMouseOut="this.style.background='#FFFFFF';"> - <td><?=$productID;?></td> - <td><?=$productName;?></td> - <td><a href="edit_product.php?id=<?=$productID;?>">Edit</a></td> - <td><a href="remove_product.php?id=<?=$productID;?>">Remove</a></td> - </tr> - <? } ?> - </table> - <br/> - <h3>Add a Product to <?=$orgName;?></h3> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <input type="hidden" name="orgID" value="<?=$_input_id;?>"/> - <table> - <tr> - <td>Product Name:</td> - <td><input type="text" name="productName" size="80"/></td> - </tr> - <tr> - <td>Product URL:</td> - <td><input type="text" name="productURL" size="80"/></td> - </tr> - <tr> - <td>Description:</td> - <td><textarea name="description" rows="10" cols="60"></textarea></td> - </tr> - <tr> - <td></td> - <td><input type="submit" name="submit" value="Add Product"/></td> - </tr> - </table> - </form> - <? include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/remove_member.php b/committers/membership/remove_member.php deleted file mode 100755 index 4ab8ea2..0000000 --- a/committers/membership/remove_member.php +++ /dev/null @@ -1,79 +0,0 @@ -<?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'); -?>
\ No newline at end of file diff --git a/committers/membership/remove_product.php b/committers/membership/remove_product.php deleted file mode 100755 index 3b84f0e..0000000 --- a/committers/membership/remove_product.php +++ /dev/null @@ -1,67 +0,0 @@ -<?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'); -?>
\ No newline at end of file diff --git a/committers/membership/remove_tags.php b/committers/membership/remove_tags.php deleted file mode 100755 index 2e783cb..0000000 --- a/committers/membership/remove_tags.php +++ /dev/null @@ -1,78 +0,0 @@ -<?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 tag! - #**************************************************************************** - include('scripts/common.php'); - include('scripts/header.php'); - if ($_POST['submit']) - { - $id = $_POST['tagID']; - - $query = "delete from TagNames where TagID = $id"; - mysql_query($query); - $relationshipQuery = "delete from OrganizationTags where TagID = $id"; - mysql_query($relationshipQuery); - ?> - Tag Removed Successfully<br/> - <a href="tags_management.php">Return to Tags Management</a> - <? - - } - else - { - $_input_id = $_GET['id']; - $query = "select * from TagNames where TagID = $_input_id"; - $result = mysql_query($query); - $tagIterator = mysql_fetch_array($result); - $id = $tagIterator['TagID']; - $tagName = $tagIterator['tag_name']; - - $relationshipQuery = "SELECT ORG.name1, ORGTAG.OrganizationID from OrganizationTags as ORGTAG INNER JOIN organizations as ORG on ORGTAG.OrganizationID = ORG.organization_id WHERE ORGTAG.TagID = $id ORDER by ORG.name1"; - $relationshipResult = mysql_query($relationshipQuery); - while ($relationshipIterator = mysql_fetch_array($relationshipResult)) - { - $orgName = $relationshipIterator['name1']; - $existingRelationships .= $orgName . "<br/>"; - } - ?> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <table> - <tr> - <td>Tag ID:</td> - <td><input type="hidden" name="tagID" value="<?=$id;?>"><?=$id;?></td> - </tr> - <tr> - <td>Tag Name:</td> - <td><?=$tagName;?></td> - </tr> - <tr> - <td colspan=2><br/>This Tag 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 Tag" name="submit"></td> - </tr> - </table> - </form> - <? - } - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/scripts/common.php b/committers/membership/scripts/common.php deleted file mode 100755 index 2d62393..0000000 --- a/committers/membership/scripts/common.php +++ /dev/null @@ -1,150 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # common.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file contains functions that are used in managing resources. - #**************************************************************************** - - function debugEcho ($_echo) - { - echo "<!-- " . $_echo . " -->"; - } - - function tagType ($_membershipTag, $_alphaTag, $_industryTag, $_projectTag) - { - if ($_membershipTag == 1) - $retVal = "Membership Level"; - if ($_alphaTag == 1) - $retVal = "Alphabetical"; - if ($_industryTag == 1) - $retVal = "Industry"; - if ($_projectTag == 1) - $retVal = "Project"; - return $retVal; - } - - function verified($_verifiedTag) - { - if ($_verifiedTag == 1) - $retVal = "style=\"color:green;\""; - else - $retVal = "style=\"color:red;\""; - return $retVal; - } - - function memberType ($_member_type) - { - if ($_member_type == "SD") - $retVal = "Strategic Developer"; - elseif($_member_type == "SC") - $retVal = "Strategic Consumer"; - elseif($_member_type == "AP") - $retVal = "Add-in Provider"; - elseif($_member_type == "AS") - $retVal = "Associate Member"; - return $retVal; - } - - function existingMemberPopulate($_tag_id) - { - $existingOrgArray = array(); - $existingOrgQuery = "SELECT OrganizationID FROM OrganizationTags WHERE TagID = $_tag_id"; - $existingOrgResult = mysql_query($existingOrgQuery); - while ($existingOrgIterator = mysql_fetch_array($existingOrgResult)) - { - $tagID = $existingOrgIterator['OrganizationID']; - $existingOrgArray[$tagID] = 1; - - } - return $existingOrgArray; - } - - function existingTagPopulate($_org_id) - { - $existingTagArray = array(); - $existingTagQuery = "SELECT TagID FROM OrganizationTags WHERE OrganizationID = $_org_id"; - $existingTagResult = mysql_query($existingTagQuery); - while ($existingTagIterator = mysql_fetch_array($existingTagResult)) - { - $tagID = $existingTagIterator['TagID']; - $existingTagArray[$tagID] = 1; - - } - return $existingTagArray; - } - - function checkExistingMembers($_org_id, $_existingOrgArray) - { - $retVal = ""; - $testVal = $_existingOrgArray[$_org_id]; - if ($testVal) - { - $retVal = "checked"; - } - return $retVal; - } - - function checkExistingTags($_tag_id, $_existingTagArray) - { - $retVal = ""; - $testVal = $_existingTagArray[$_tag_id]; - if ($testVal) - { - $retVal = "checked"; - } - return $retVal; - } - - - - function is_authorized_to_edit_resources($userid) { - return in_array($userid, array('ngervais','mward','cguindon')); - } - - if ($_SERVER['SERVER_NAME'] != 'dev.localhost') { - require_once("/home/data/httpd/eclipse-php-classes/system/app.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - - $App = new App(); - $App->runStdWebAppCacheable(); - - $LDAPPerson = new LDAPPerson(); - $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - if (!is_authorized_to_edit_resources($LDAPPerson->getuid())) { - header ("Location: /committers/resources/restricted.php"); - exit; - } - } - - if (file_exists("/home/data/httpd/eclipse-php-classes/system/dbconnection_rw.class.php")) { - require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_rw.class.php"; - $dbc = new DBConnectionRW(); - $dbc->connect(); - } else { - $dbc = mysql_connect(null, "phoenix", "fireB!rd"); - - if (!$dbc) { - echo( "<P>Unable to connect to the database server at this time.</P>" ); - return; - } - - mysql_select_db("local_eclipse", $dbc); - } -?> diff --git a/committers/membership/scripts/footer.php b/committers/membership/scripts/footer.php deleted file mode 100755 index e14ccd3..0000000 --- a/committers/membership/scripts/footer.php +++ /dev/null @@ -1,28 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # footer.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file adds a footer to the page. - #**************************************************************************** -?> - <table><tr> - -<?php - include("../html/footer.php"); -?> diff --git a/committers/membership/scripts/get_image.php b/committers/membership/scripts/get_image.php deleted file mode 100755 index ef6d2e6..0000000 --- a/committers/membership/scripts/get_image.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -require_once ('common.php'); -$_input_id = $_GET['id']; -$_input_size = $_GET['size']; -$query = "SELECT ". $_input_size . "_logo, ". $_input_size . "_mime FROM OrganizationInformation WHERE OrganizationID = $_input_id"; -$result = mysql_query($query); -$imageIterator = mysql_fetch_array($result); -$imageData = $imageIterator[0]; -$imageMime = $imageIterator[1]; - -header("Content-type: " . $imageMime); -echo $imageData; - -?> diff --git a/committers/membership/scripts/header.php b/committers/membership/scripts/header.php deleted file mode 100755 index ad8a3d9..0000000 --- a/committers/membership/scripts/header.php +++ /dev/null @@ -1,51 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # header.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file adds a header (with menu) to the page. - #**************************************************************************** - - include("../html/header.php"); - if (file_exists("/home/data/httpd/eclipse-php-classes/menu/menu.class.php")) { - require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php"); - $Menu = new Menu("en"); - $Menu->addMenuItem("Tags Management", "/committers/membership/tags_management.php", "_self"); - $Menu->addMenuItem("Member Management", "/committers/membership/member_management.php", "_self"); - $Menu->addMenuItem("Add Tags To Member", "/committers/membership/member_tags.php", "_self"); - $Menu->addMenuItem("Add Members To Tag", "/committers/membership/tags_member.php", "_self"); - - include("../modules/menu.php"); - echo "</tr></table>"; - } - -?> - -<script language="Javascript"> - -// fieldname, warningname, remainingname, maxchars -function CheckFieldLength(fn,rn,mc) { - var len = fn.value.length; - if (len > mc) { - fn.value = fn.value.substring(0,mc); - len = mc; - } - document.getElementById(rn).innerHTML = mc - len; -} -</script> -<link rel="stylesheet" type="text/css" href="./membership.css" /> diff --git a/committers/membership/scripts/sql.php b/committers/membership/scripts/sql.php deleted file mode 100755 index 015cf1b..0000000 --- a/committers/membership/scripts/sql.php +++ /dev/null @@ -1,448 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # sql.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file contains function that interact with the database. - #**************************************************************************** - -class ResourceBroker { - var $messages = ''; - var $error; - - private function add_message($message) { - $this->messages .= "$message<br/>"; - } - - private function begin_transaction() { - $this->add_message("Begin transaction"); - mysql_query("begin"); - } - - private function commit_transaction() { - $this->add_message("Commit transaction"); - mysql_query("commit"); - } - - function rollback_transaction() { - $this->add_message("Rollback transaction"); - mysql_query("rollback"); - } - - function create_resource($title, $description, $type, $image_path, $categories) { - $this->begin_transaction(); - - $this->add_message("Creating resource..."); - try { - $id = $this->primitive_create_resource($title, $description, $type, $image_path); - $this->primitive_update_categories($id, $categories); - $this->commit_transaction(); - return $id; - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function delete_resource($id) { - $this->begin_transaction(); - try { - $this->primitive_delete_resource($id); - $this->primitive_delete_resource_category_mappings($id); - $this->primitive_delete_resource_links($id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function update_resource($id, $title, $description, $type, $image_path, $categories) { - $this->begin_transaction(); - $this->add_message("Updating resource $id"); - try { - $this->primitive_update_resource($id, $title, $description, $type, $image_path); - $this->primitive_update_categories($id, $categories); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - $this->add_message("Resource updated"); - } - - function add_categories($id, $category_ids) { - if (!is_array($category_ids)) return; - if (count($category_ids) == 0) return; - $this->begin_transaction(); - foreach($category_ids as $category_id) { - $this->add_message("Adding reference to category '$category_id'."); - $result = mysql_query("select * from resource_category where category_id=$category_id and resource_id=$id"); - if (mysql_fetch_array($result)) { - $this->add_message("The category is already referenced."); - continue; - } - mysql_query("insert into resource_category (resource_id, category_id) values ($id, $category_id)"); - if ($error = mysql_error()) { - $this->add_message("An error occurred while adding reference to category '$category_id'."); - $this->rollback_transaction(); - return; - } - } - $this->commit_transaction(); - } - - function create_link($id, $title, $language, $date, $path, $type, $authors) { - $this->begin_transaction(); - $this->add_message("Creating link for resource $id"); - try { - $link_id = $this->primitive_create_link($id, $title, $language, $date, $path, $type); - $this->primitive_update_link_authors($link_id, $authors); - $this->add_message("Link $link_id created."); - $this->commit_transaction(); - return $link_id; - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e; - $this->rollback_transaction(); - } - } - - function update_link($id, $link_id, $title, $language, $date, $path, $type, $authors) { - $this->begin_transaction(); - $this->add_message("Updating link $link_id"); - try { - $this->primitive_update_link($id, $link_id, $title, $language, $date, $path, $type); - $this->primitive_update_link_authors($link_id, $authors); - $this->commit_transaction(); - $this->add_message("Link updated"); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function delete_link($link_id) { - $this->begin_transaction(); - try { - $this->primitive_delete_resource_link($link_id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function get_type_suggestions_string() { - $result = mysql_query("select distinct type from link"); - $type_suggestions = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $item = $row[0]; - $item = trim($item); - if (!$item) continue; - $type_suggestions .= $separator.$item; - $separator = ', '; - } - return $type_suggestions; - } - - function get_language_suggestions_string() { - $result = mysql_query("select distinct language from link"); - $language_suggestions = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $item = $row[0]; - $item = trim($item); - if (!$item) continue; - $language_suggestions .= $separator.$item; - $separator = ', '; - } - return $language_suggestions; - } - - function get_link_authors_string($link_id) { - $result = mysql_query("select name from author, link_author where link_author.link_id=$link_id and link_author.author_id=author.id"); - $link_authors = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $link_authors .= $separator.$row[0]; - $separator = ', '; - } - return $link_authors; - } - - function get_resource_categories_string($id) { - $result = mysql_query("select name from category, resource_category where resource_category.resource_id=$id and resource_category.category_id = category.id"); - $categories = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $categories .= $separator.$row[0]; - $separator = ', '; - } - return $categories; - } - - function update_author($id, $name, $email, $company, $url) { - $this->add_message("Updating author $id"); - $result = mysql_query("update author set name='$name', email='$email', company='$company', link='$url' where id=$id"); - if ($error = mysql_error()) { - add_message("Error updating authors: $error"); - return; - } - $this->add_message("Author $id updated."); - } - - function delete_author($id) { - $this->add_message("Deleting author $id"); - $this->begin_transaction(); - try { - $this->primitive_delete_author_mappings($id); - $this->primitive_delete_author($id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->rollback_transaction(); - } - $this->add_message("Author $id deleted."); - } - - function update_category($id, $name) { - $this->add_message("Updating category $id"); - //$name = mysql_escape_string($name); - $result = mysql_query("update category set name='$name' where id=$id"); - if ($error = mysql_error()) { - add_message("Error updating category: $error"); - return; - } - $this->add_message("Category $id updated."); - } - - function delete_category($id) { - $this->add_message("Deleting category $id"); - $this->begin_transaction(); - try { - $this->primitive_delete_category_mappings($id); - $this->primitive_delete_category($id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->rollback_transaction(); - } - $this->add_message("Category $id deleted."); - } - - function primitive_delete_author($id) { - $result = mysql_query("delete from author where id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting author: $error"); - } - } - - function primitive_update_link($id, $link_id, $title, $language, $date, $path, $type) { - mysql_query("update link set title='$title', language='$language', create_date='$date', path='$path', type='$type' where id=$link_id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - } - - function primitive_update_resource($id, $title, $description, $type, $image_path) { - mysql_query("update resource set title='$title', description='$description', type='$type', image_path='$image_path' where id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - } - - function primitive_delete_resource($id) { - $this->add_message("Deleting resource $id"); - mysql_query("delete from resource where id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - $this->add_message("Resource $id deleted"); - } - - function primitive_delete_resource_category_mappings($id) { - $this->add_message("Deleting resource/category mappings for $id"); - mysql_query("delete from resource_category where resource_id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - $this->add_message("Resource/category mappings deleted"); - } - - function primitive_delete_resource_link($link_id) { - $this->add_message("Deleting link $link_id."); - $this->primitive_delete_link_author_mapping($link_id); - - $result = mysql_query("delete from link where id=$link_id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - $this->add_message("Link deleted."); - } - - function primitive_delete_resource_links($id) { - $this->add_message("Deleting links for resource $id"); - $result = mysql_query("select id from link where resource_id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - while ($row = mysql_fetch_array($result)) { - $link_id = $row[0]; - $this->primitive_delete_resource_link($link_id); - } - - $this->add_message("Links deleted"); - } - - /* - * This function deletes all mappings to from the link - * with the given $id to its authors. - */ - function primitive_delete_link_author_mapping($id) { - $this->add_message("Deleting link/author mappings for link $id"); - mysql_query("delete from link_author where link_id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - $this->add_message("Link/author mappings deleted"); - } - - /* - * This function deletes all mappings to the author with - * the given $id. - */ - function primitive_delete_author_mappings($id) { - $result = mysql_query("delete from link_author where author_id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting links to author: $error"); - } - $this->add_message("References to author $id in links deleted."); - } - - function primitive_delete_category($id) { - $result = mysql_query("delete from category where id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting category: $error"); - } - } - - /* - * This function deletes all mappings to the category with - * the given $id. - */ - function primitive_delete_category_mappings($id) { - $result = mysql_query("delete from resource_category where category_id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting links to author: $error"); - } - $this->add_message("References to category $id deleted."); - } - - function primitive_create_link($id, $title, $language, $date, $path, $type) { - mysql_query("insert into link (resource_id, title, language, create_date, path, type) values ($id, '$title', '$language', '$date', '$path', '$type')"); - if ($error = mysql_error()) { - throw new Exception($error); - } - return mysql_insert_id(); - } - - function primitive_update_link_authors($link_id, $authors) { - if (!$authors) return; - $this->add_message("Updating link authors..."); - $this->primitive_delete_link_author_mapping($link_id); - - $authors = split(',', $authors); - foreach($authors as $author_name) { - $author_name = trim($author_name); - if (!$author_name) continue; - $this->add_message("Searching for author '$author_name'..."); - $result = mysql_query("select id from author where name='$author_name'"); - if ($error = mysql_error()) { - throw new Exception("Error querying for existing author '$author_name': $error"); - } - $row = mysql_fetch_row($result); - if ($row) { - $author_id = $row[0]; - $this->add_message("Found author with id $author_id..."); - } else { - $this->add_message("Creating new author record..."); - mysql_query("insert into author (name, email, company, link) values ('$author_name', '', '', '')"); - if ($error = mysql_error()) { - throw new Exception("Error inserting author '$author_name': $error");; - } - $author_id = mysql_insert_id(); - } - $this->add_message("Inserting reference to author $author_id..."); - mysql_query("insert into link_author (link_id, author_id) values ($link_id, $author_id)"); - if ($error = mysql_error()) { - throw new Exception("Error inserting mapping to author $author_id: $error"); - } - } - } - - function primitive_create_resource($title, $description, $type, $image_path) { - mysql_query("insert into resource (type, title, description, image_path) values ('$type', '$title', '$description', '$image_path')"); - if ($error = mysql_error()) { - throw new Exception("Error inserting resource: $error"); - } - return mysql_insert_id(); - } - - function primitive_update_categories($id, $categories) { - $this->primitive_delete_resource_category_mappings($id); - $categories = split(',', $categories); - foreach($categories as $category_name) { - $category_name = trim($category_name); - if (!$category_name) continue; - $this->add_message("Searching for category '$category_name'."); - $result = mysql_query("select id from category where name='$category_name'"); - if ($error = mysql_error()) { - throw new Exception ("Error querying for existing category '$category_name': $error"); - } - $row = mysql_fetch_row($result); - if ($row) { - $category_id = $row[0]; - $this->add_message("Found category with id $category_id."); - } else { - $this->add_message("Creating category $category_name."); - mysql_query("insert into category (name) values ('$category_name')"); - if ($error = mysql_error()) { - throw new Exception($error); - } - $category_id = mysql_insert_id(); - } - $this->add_message("Inserting reference to category $category_id."); - mysql_query("insert into resource_category (resource_id, category_id) values ($id, $category_id)"); - if ($error = mysql_error()) { - throw new Exception($error); - } - } - } -} -?> diff --git a/committers/membership/tags_management.php b/committers/membership/tags_management.php deleted file mode 100755 index d417355..0000000 --- a/committers/membership/tags_management.php +++ /dev/null @@ -1,123 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # tags_management.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Displays a list of current tags, allows adds, edits, and removals. - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - - if ($_POST['submit']) - { - $id = $_POST['tagID']; - $tagName = $_POST['tagName']; - $tagType = $_POST['tagType']; - $verifiedTag = $_POST['verifiedTag']; - if ($verifiedTag == "on") - $verifiedTag = 1; - else - $verifiedTag = 0; - - $membershipTag = $alphaTag = $industryTag = $projectTag = 0; - - switch ($tagType) { - case 1 : - $membershipTag = 1; - break; - case 2 : - $alphaTag = 1; - break; - case 3 : - $industryTag = 1; - break; - case 4 : - $projectTag = 1; - break; - } - $query = "INSERT INTO TagNames VALUES (0, '$tagName' ,$membershipTag, $verifiedTag, $alphaTag, $industryTag, $projectTag)"; - mysql_query($query) or die(mysql_error()); - echo "Tag added successfully!<br/>"; - } - ?> - <h3>Add a Tag</h3> - <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> - <table> - <tr> - <td>Tag Name:</td> - <td><input type="text" name="tagName"></td> - </tr> - <tr> - <td>Tag Type: </td> - <td><select name="tagType"> - <option value="3" selected="1">Industry</option> - <option value="4">Project</option> - </select> - </td> - </tr> - <td>Verified Tag</td> - <td><input type="checkbox" name="verifiedTag" checked="1"></td> - </tr> - <tr> - <td></td> - <td><input type="submit" value="Add Tag" name="submit"></td> - </tr> - </table> - </form><br/> - <h2>Tag Management</h2> - <table style="border:1px solid #000;" cellspacing=0 cellpadding=1> - <tr class="header"> - <td width="75">Tag ID</td> - <td width="175">Tag Name</td> - <td width="175">Tag Type</td> - <td width="75">Edit</td> - <td width="75">Remove</td> - </tr> - <? - $query = "select * from TagNames order by is_membership_level_tag desc, is_industry_tag desc, is_project_tag desc, 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']; - ?> - - <tr onMouseOver="this.style.background='#CDE3FB';" onMouseOut="this.style.background='#FFFFFF';"> - <td><?=$id;?></td> - <td <?=verified($verifiedTag);?>><?=$tagName;?></td> - <td><?=tagType($membershipTag, $alphaTag, $industryTag, $projectTag);?></td> - <td><a href="edit_tags.php?id=<?=$id;?>">Edit</a></td> - <td><a href="remove_tags.php?id=<?=$id;?>">Remove</a></td> - </tr> - <? - } - ?> - </table> - - - - <? - - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/membership/tags_member.php b/committers/membership/tags_member.php deleted file mode 100755 index 41cfae6..0000000 --- a/committers/membership/tags_member.php +++ /dev/null @@ -1,77 +0,0 @@ -<?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 - *******************************************************************************/ - - #***************************************************************************** - # - # member_tags.php - # - # Author: Nathan Gervais - # Date: Feb 6th, 2007 - # - # Description: - # Management page to add / remove tags from a member - #**************************************************************************** - include('scripts/common.php'); - - include('scripts/header.php'); - ?> - <h2>Add Members to Tag</h2> - <table style="border:1px solid #000;" cellspacing=0 cellpadding=1> - <tr class="header"> - <td width="75">Tag ID</td> - <td width="175">Tag Name</td> - <td width="175">Tag Type</td> - <td width="175">Organizations</td> - <td width="75">Edit</td> - </tr> - <? - $query = "SELECT * FROM TagNames ORDER by tag_name"; - $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 ORG.name1, ORGTAG.OrganizationID from OrganizationTags as ORGTAG INNER JOIN organizations as ORG on ORGTAG.OrganizationID = ORG.organization_id WHERE ORGTAG.TagID = $id ORDER by ORG.name1"; - $subResult = mysql_query($subQuery); - $orgList = "<select>"; - while ($orgIterator = mysql_fetch_array($subResult)) - { - $orgName = $orgIterator['name1']; - $orgList .= "<option>".$orgName . "</option>"; - } - $orgList .= "</select>"; - ?> - - <tr onMouseOver="this.style.background='#CDE3FB';" onMouseOut="this.style.background='#FFFFFF';"> - <td><?=$id;?></td> - <td <?=verified($verifiedTag);?>><?=$tagName;?></td> - <td><?=tagType($membershipTag, $alphaTag, $industryTag, $projectTag);?></td> - <td><?=$orgList;?></td> - <td><a href="edit_tags_member.php?id=<?=$id;?>">Edit</a></td> - </tr> - <? - } - ?> - </table> - - - <? - - include('scripts/footer.php'); -?>
\ No newline at end of file diff --git a/committers/menu/inc/en_menu.inc b/committers/menu/inc/en_menu.inc deleted file mode 100755 index a1b23b0..0000000 --- a/committers/menu/inc/en_menu.inc +++ /dev/null @@ -1,235 +0,0 @@ -<?php - #***************************************************************************** - # - # menu.inc - # - # Author: Denis Roy - # Date: 2004-09-10 - # - # Description: Menu UI - # - # HISTORY: - # - #**************************************************************************** - - include("../html/header.php"); - -?> - <br /> - <font class="normal">Your eclipse.org password will expire in <?= $daysLeft ?> days.</font><br /> - <table width="100%"> - <tr> - <td width="100%" valign="top"> - <table width="100%" cellpadding="0" cellspacing="0"> - <tr> - <td width="201" valign="top"> - <table width="201" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header"><center>About Me</center></td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="box_background"> - <td> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/passwd.php">Change my Eclipse.org password</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/groups.php">UNIX Groups</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/diskspace.php">Disk space/quotas</a><br /><br /> - <br /> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - <td width="201" valign="top"> - <table width="201" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header"><center>Help</center></td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="box_background"> - <td> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/dbo_index.php">Accessing system databases with PHP</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../help/paths.php">List of file paths</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../help/howdoi.php">How do I...?</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../help/phoenix.php">Using Phoenix</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="http://dev.eclipse.org/mhonarc/lists/eclipse.org-committers/maillist.html">Committer Announcements Archive</a><br /><br /> - <br /> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - <td width="201" valign="top"> - <table width="201" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header"><center>System</center></td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="box_background"> - <td> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../login/index.php">Sign-out</a><br /><br /> - <br /> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td> </td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%" valign="top"> - <table width="100%" cellpadding="0" cellspacing="0"> - <tr> - <td width="201" valign="top"> - <table width="201" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header"><center>Eclipse Projects</center></td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="box_background"> - <td> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/project_category_list.php">Project Category Associations</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/committerlists.php">Project Committer lists</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../bugs/bugz_manager.php">Bugzilla components, targets, versions</a><br /><br /> - <br /> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - <td width="201" valign="top"> - <table width="201" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header"><center>Intellectual Property (IP)</center></td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="box_background"> - <td> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/moved_to_portal.php">Contribution Questionnaire</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="/ipzilla/">IPZilla</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/moved_to_portal.php">Initiate an IP discussion using IPZilla</a><br /><br /> - <br /> - </td> - </tr> - </table> - </td> - </tr> - </table> - - <table width="201" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header"><center>Applications</center></td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="box_background"> - <td> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../resources/list_resources.php">List/Edit Eclipse Resources</a><br /><br /> - <br /> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - <td width="201" valign="top"> - <table width="201" border="0" cellpadding="1" cellspacing="0"> - <tr> - <td width="100%" class="rect_border"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr> - <td class="rect_header"><center>Infrastructure</center></td> - </tr> - </table> - </td> - </tr> - <tr> - <td width="100%"> - <table width="100%" cellpadding="3" cellspacing="0" border="0"> - <tr class="box_background"> - <td> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/stats.php">Download stats</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../help/status.php">Eclipse.org Infrastructure Status</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../webstats/webstats.php">Web Server Statistics</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../committertools/ip_test.php">Test my DNS!</a><br /><br /> - <img src="../images/ico_point_7_7.gif" width="7" height="7" border="0" /> <a href="../loadstats/dailyloadstats.php">Server load stats</a><br /><br /> - <br /> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td> </td> - </tr> - </table> - </td> - </tr> - </table> - -<?php - include("../html/footer.php"); -?> diff --git a/committers/menu/menu.php b/committers/menu/menu.php deleted file mode 100755 index 943377b..0000000 --- a/committers/menu/menu.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - - header("Location: https://dev.eclipse.org/portal/myfoundation/portal/portal.php"); - exit; - - require_once("/home/data/httpd/eclipse-php-classes/system/app.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/system/ldapconnection.class.php"); - - #***************************************************************************** - # - # menu.php - # - # Author: Denis Roy - # Date: 2004-09-11 - # - # Description: Main menu system - # - # HISTORY: - # - #**************************************************************************** - - $App = new App(); - $App->runStdWebAppCacheable(); - - $LDAPPerson = new LDAPPerson(); - $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - $daysLeft = $LDAPPerson->getPasswordExpiryDays(); - - include("inc/en_menu.inc"); - -?> diff --git a/committers/resources/edit_author.php b/committers/resources/edit_author.php deleted file mode 100755 index fbf34ce..0000000 --- a/committers/resources/edit_author.php +++ /dev/null @@ -1,94 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # add_resource.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file is used to create a new resource. - #**************************************************************************** - - include("scripts/common.php"); - include("scripts/sql.php"); - include("scripts/header.php"); - - function get_selected($parameter, $value) { - return get_parameter($parameter) == $value ? 'selected' : ''; - } - - $broker = new ResourceBroker(); - if (get_parameter('update')) { - $id = get_parameter('author_id'); - $name = get_parameter('author_name'); - $email = get_parameter('author_email'); - $company = get_parameter('author_company'); - $url = get_parameter('author_url'); - $broker->update_author($id, $name, $email, $company, $url); - } else if (get_parameter('delete')) { - $id = get_parameter('author_id'); - $broker->delete_author($id); - } - display_messages($broker->messages); - -?> - - <script language="javascript" type="text/javascript"> - function confirm_delete() { - return confirm("Are you sure you want to delete this author?"); - } - </script> - - <div class="section"> - <h3>Add Resource</h3> - <table border="1"> - <tr><th>Name</th><th>email</th><th>Company</th><th>URL</th><th>#</th></tr> - <?php - $result = mysql_query('select author.id, author.name, author.email, author.company, author.link, count(link_author.author_id) from author left join link_author on (author.id = link_author.author_id) group by author.name order by author.name'); - - if ($error = mysql_error()) { - echo "Error querying authors: $error<br/>"; - break; - } - while ($row = mysql_fetch_array($result)) { - $id = $row[0]; - $name = $row[1]; - $email = $row[2]; - $company = $row[3]; - $url = $row[4]; - $count = $row[5]; - ?> - <form method="post" action="edit_author.php"> - <input type="hidden" name="author_id" value="<?= $id ?>"/> - <tr <?= $count == 0 ? 'style="background:red;color:white;font-weight:bold"' : ''?>> - <td><input type="text" style="border-style:none;width: 150px;" name="author_name" value="<?= $name ?>"/></td> - <td><input type="text" style="border-style:none;width: 100px;" name="author_email" value="<?= $email ?>"/></td> - <td><input type="text" style="border-style:none;width: 100px;" name="author_company" value="<?= $company ?>"/></td> - <td><input type="text" style="border-style:none;width: 100px;" name="author_url" value="<?= $url ?>"/></td> - <td><?= $count ?></td> - <td> - <input type="submit" name="update" value="Update"/> - <input type="submit" name="delete" value="Delete" onclick="return confirm_delete();"/> - </td> - </tr> - </form> - <?php - } - ?> - </table> - </div> -<?php - include("scripts/footer.php"); -?>
\ No newline at end of file diff --git a/committers/resources/edit_category.php b/committers/resources/edit_category.php deleted file mode 100755 index cdd6ef2..0000000 --- a/committers/resources/edit_category.php +++ /dev/null @@ -1,84 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # edit_category.php - # - # Author: Wayne Beaton - # Date: November 14, 2006 - # - # Description: - # This file is used to edit categories. - #**************************************************************************** - - include("scripts/common.php"); - include("scripts/sql.php"); - include("scripts/header.php"); - - function get_selected($parameter, $value) { - return get_parameter($parameter) == $value ? 'selected' : ''; - } - - $broker = new ResourceBroker(); - if (get_parameter('update')) { - $id = get_parameter('category_id'); - $name = get_parameter('category_name'); - $broker->update_category($id, $name); - } else if (get_parameter('delete')) { - $id = get_parameter('category_id'); - $broker->delete_category($id); - } - display_messages($broker->messages); - -?> - <script language="javascript" type="text/javascript"> - function confirm_delete() { - return confirm("Are you sure you want to delete this category?"); - } - </script> - <div class="section"> - <h3>Edit Categories</h3> - <table style="border-style:solid;border-width:1px"> - <tr><th>Name</th><th>#</th></tr> - <?php - $result = mysql_query('select category.id, category.name, count(resource_category.resource_id) from category left join resource_category on (category.id = resource_category.category_id) group by category.name order by category.name'); - - if ($error = mysql_error()) { - echo "Error querying authors: $error<br/>"; - break; - } - while ($row = mysql_fetch_array($result)) { - $id = $row[0]; - $name = $row[1]; - $count = $row[2]; - ?> - <form method="post" action="edit_category.php""> - <input type="hidden" name="category_id" value="<?= $id ?>"/> - <tr <?= $count == 0 ? 'style="background:red;color:white;font-weight:bold"' : ''?>> - <td><input type="text" style="border-style:none;width: 150px;" name="category_name" value="<?= $name ?>"/></td> - <td><?= $count ?></td> - <td> - <input type="submit" name="update" value="Update"/> - <input type="submit" name="delete" value="Delete" onclick="return confirm_delete();"/> - </td> - </tr> - </form> - <?php - } - ?> - </table> - </div> - -<?php - include("scripts/footer.php"); -?>
\ No newline at end of file diff --git a/committers/resources/edit_resource.php b/committers/resources/edit_resource.php deleted file mode 100755 index 5fc55c8..0000000 --- a/committers/resources/edit_resource.php +++ /dev/null @@ -1,312 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # edit_resource.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file is used to edit resources. - #**************************************************************************** - - include ('scripts/common.php'); - include ('scripts/sql.php'); - - $broker = new ResourceBroker(); - $id = get_get_parameter('id'); - if ($id == null) { - $id = get_post_parameter('id'); - $action = get_post_parameter('action'); - if ($id == null) { - if ($action == "create_resource") { - $title = get_post_parameter('resource_title'); - $description = get_post_parameter('resource_description'); - $type = get_post_parameter('resource_type'); - $image = get_post_parameter('resource_image'); - $categories = get_post_parameter('resource_categories'); - $id = $broker->create_resource($title, $description, $type, $image, $categories); - } - } else { - if ($action == "update_resource") { - $title = get_post_parameter('resource_title'); - $description = get_post_parameter('resource_description'); - $type = get_post_parameter('resource_type'); - $image = get_post_parameter('resource_image'); - $categories = get_post_parameter('resource_categories'); - $broker->update_resource($id, $title, $description, $type, $image, $categories); - } else if ($action == "delete_resource") { - $broker->delete_resource($id); - goto_list_resources(); - } else if ($action == "add_categories") { - $category_ids = get_post_parameter('category'); - $broker->add_categories($id, $category_ids); - } else if ($action == "update_link") { - $link_id = get_post_parameter('link_id'); - $title = get_post_parameter('link_title'); - $language = get_post_parameter('link_language'); - $date = get_post_parameter('link_date'); - $path = get_post_parameter('link_path'); - $type = get_post_parameter('link_type'); - $authors = get_post_parameter('link_authors'); - $broker->update_link($id, $link_id, $title, $language, $date, $path, $type, $authors); - } else if ($action == "delete_link") { - $link_id = get_post_parameter('link_id'); - $broker->delete_link($link_id); - }else if ($action == "create_link") { - $title = get_post_parameter('link_title'); - $language = get_post_parameter('link_language'); - $date = get_post_parameter('link_date'); - $path = get_post_parameter('link_path'); - $type = get_post_parameter('link_type'); - $authors = get_post_parameter('link_authors'); - $broker->create_link($id, $title, $language, $date, $path, $type, $authors); - } - } - } - - include("scripts/header.php"); - display_messages($broker->messages); - - function get_selected($parameter, $value) { - global $type; - return $type == $value ? 'selected' : ''; - } - - if ($id != null) { - $result = mysql_query("select id, title, type, description, image_path from resource where id=$id"); - if ($error = mysql_error()) { - echo "Error querying resources: $error<br/>"; - exit; - } - if ($row = mysql_fetch_array($result)) { - $id = $row[0]; - $title = $row[1]; - $type = $row[2]; - $description = $row[3]; - $image_path = $row[4]; - $categories = $broker->get_resource_categories_string($id); - - } else { - echo "No resource found with id=$id"; - exit; - } - } else { - $title = "New Resource"; - $type = "article"; - $description = "Description"; - $image_path = ""; - } -?> - <div class="section"> - <h3><?= $id == null ? 'Create' : 'Edit' ?> Resource</h3> -<?php - if ($id != null) { -?> - <form method="post" action="edit_resource.php"> - <input type="hidden" name="action" value="delete_resource"/> - <input type="hidden" name="id" value="<?= $id ?>"/> - <p><input type="submit" value="Delete"/></p> - </form> -<?php - } -?> - <form method="post" action="edit_resource.php"> - <input type="hidden" name="action" value="<?= $id == null ? 'create_resource' : 'update_resource' ?>"/> - <input type="hidden" name="id" value="<?= $id ?>"/> - <table> - <tr><td>Title: *</td><td><input type="text" style="width: 500px;" name="resource_title" value="<?= $title ?>"/></td></tr> - <tr><td valign="top">Description: *</td> - <td> - <textarea style="width: 500px;" rows="5" name="resource_description"><?= $description ?></textarea><br/> - The description should <b>not</b> contain HTML markup. - </td> - </tr> - <tr><td>Type: *</td><td> - <select name="resource_type"> - <option value="article" <?= get_selected($type, 'article') ?>>Eclipse Corner Article</option> - <option value="publication" <?= get_selected($type, 'publication') ?>>Article from another source</option> - <option value="study" <?= get_selected($type, 'study') ?>>Case study</option> - <option value="book" <?= get_selected($type, 'book') ?>>Book</option> - <option value="presentation" <?= get_selected($type, 'presentation') ?>>Presentation</option> - <option value="demo" <?= get_selected($type, 'demo') ?>>Demonstration</option> - <option value="webinar" <?= get_selected($type, 'webinar') ?>>Webinar</option> - <option value="podcast" <?= get_selected($type, 'podcast') ?>>Podcast</option> - <option value="code" <?= get_selected($type, 'code') ?>>Code Sample</option> - <option value="course" <?= get_selected($type, 'course') ?>>Course</option> - <option value="other" <?= get_selected($type, 'other') ?>>Other</option> - </select> - </td></tr> - <tr><td>Image Path:</td><td><input type="text" style="width: 500px;" name="resource_image" value="<?= $image_path ?>"/></td></tr> - <tr><td>Categories:</td><td><input type="text" style="width: 500px;" name="resource_categories" value="<?= $categories ?>"/></td></tr> - <tr> - <td colspan="2" align="center"> - <input type="submit" value="<?= $id == null ? 'Add' : 'Update' ?>"/> <input type="reset" value="Reset"/> - </td> - <tr> - </table> - </form> - </div> - -<?php - - if ($id != null) { -?> - <div class="section"> - <h3>Add to Categories</h3> - <form method="post" action="edit_resource.php"> - <input type="hidden" name="action" value="add_categories"/> - <input type="hidden" name="id" value="<?= $id ?>"/> - <table><tbody><tr> -<?php - $result = mysql_query("select id, name from category order by name"); - if ($error = mysql_error()) { - echo "Error querying categories: $error<br/>"; - exit; - } - $index = 0; - while ($row = mysql_fetch_array($result)) { - $category_id = $row[0]; - $category_name = $row[1]; - - if ($index % 5 == 0) echo "</tr><tr>"; - - $index++; -?> - <td><input type="checkbox" name="category[<?= $index ?>]" value="<?= $category_id ?>"><?= $category_name ?></input></td> -<?php - } -?> - </tr></tbody></table> - <p style="align:center"><input type="submit" value="Add Categories"/> <input type="reset" value="Reset"/></p> - </form> - </div> -<?php - $type_suggestions = $broker->get_type_suggestions_string(); - $language_suggestions = $broker->get_language_suggestions_string(); - - $result = mysql_query("select id, type, title, language, path, create_date from link where resource_id=$id"); - if ($error = mysql_error()) { - echo "Error querying authors: $error<br/>"; - exit; - } - $index = 0; - while ($row = mysql_fetch_array($result)) { - $link_id = $row[0]; - $type = $row[1]; - $title = $row[2]; - $language = $row[3]; - $path = $row[4]; - $date = $row[5]; - $link_authors = $broker->get_link_authors_string($link_id); - $index++; -?> - <div class="section"> - <h3>Link #<?= $index ?></h3> - <form method="post" action="edit_resource.php"> - <input type="hidden" name="action" value="delete_link"/> - <input type="hidden" name="id" value="<?= $id ?>"/> - <input type="hidden" name="link_id" value="<?= $link_id ?>"/> - <p><input type="submit" value="Delete"/></p> - </form> - <form method="post" action="edit_resource.php"> - <input type="hidden" name="action" value="update_link"/> - <input type="hidden" name="id" value="<?= $id ?>"/> - <input type="hidden" name="link_id" value="<?= $link_id ?>"/> - <table> - <tr><td>Link Path: *</td><td><input type="text" style="width: 500px;" name="link_path" value="<?= $path ?>"/></td></tr> - <tr><td>Link Title:</td><td><input type="text" style="width: 500px;" name="link_title" value="<?= $title ?>"/></td></tr> - <tr><td>Link Date: *</td><td><input type="text" style="width: 500px;" name="link_date" value="<?= $date ?>"/></td></tr> - <tr> - <td>Link Language: *</td> - <td> - <input type="text" size="2" name="link_language" value="<?= $language ?>"/> - Suggested values: <?= $language_suggestions ?>. - </td> - </tr> - <tr> - <td> - Link Type: *</td><td><input type="text" size="2" name="link_type" value="<?= $type ?>"/> - Suggested values: <?= $type_suggestions ?>. - </td> - </tr> - <tr> - <td valign="top">Link Authors:</td> - <td width="550"> - <input type="text" style="width: 500px;" name="link_authors" value="<?= $link_authors ?>"/><br/> - Enter author names here (separated by commas). If authors with these names already exist in the - database, those existing authors will be used. New authors will be created as necessary. - </td> - </tr> - <tr> - <td align="center" colspan="2"> - <input type="submit" value="Update"/> <input type="reset" value="Reset"/> - </td> - </tr> - </table> - </form> - </div> - -<?php - } - } - - if ($id != null) { -?> - <div class="section"> - <h3>New Link</h3> - <form method="post" action="edit_resource.php"> - <input type="hidden" name="action" value="create_link"/> - <input type="hidden" name="id" value="<?= $id ?>"/> - <table> - <tr><td>Link Path: *</td><td><input type="text" style="width: 500px;" name="link_path"/></td></tr> - <tr><td>Link Title:</td><td><input type="text" style="width: 500px;" name="link_title"/></td></tr> - <tr><td>Link Date: *</td><td><input type="text" style="width: 500px;" name="link_date"/></td></tr> - <tr> - <td>Link Language: *</td> - <td> - <input type="text" size="2" name="link_language" value="en"/> - Suggested values: <?= $language_suggestions ?>. - </td> - </tr> - <tr> - <td> - Link Type: * - </td> - <td> - <input type="text" size="2" name="link_type" value="html"/> - Suggested values: <?= $type_suggestions ?>. - </td> - </tr> - <tr> - <td valign="top">Link Authors:</td> - <td width="550"> - <input type="text" style="width: 500px;" name="link_authors"/><br/> - Enter author names here (separated by commas). If authors with these names already exist in the - database, those existing authors will be used. New authors will be created as necessary. - </td> - </tr> - <tr> - <td align="center" colspan="2"> - <input type="submit" value="Add"/> - </td> - </tr> - </table> - - </form> - </div> -<?php - } - include("scripts/footer.php"); -?>
\ No newline at end of file diff --git a/committers/resources/list_resources.php b/committers/resources/list_resources.php deleted file mode 100755 index 6fb0afb..0000000 --- a/committers/resources/list_resources.php +++ /dev/null @@ -1,79 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # add_resource.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file is used to list and delete resources. - #**************************************************************************** - include('scripts/common.php'); - include('scripts/sql.php'); - - function get_selected($parameter, $value) { - return get_parameter($parameter) == $value ? 'selected' : ''; - } - - $action = get_get_parameter('action', 'list'); - $id = get_get_parameter('id'); - - $broker = new ResourceBroker(); - - if ($action == 'delete') { - $broker->delete_resource($id); - } - - include("scripts/header.php"); - display_messages($broker->messages); -?> - <script language="javascript" type="text/javascript"> - function confirm_delete(id, title) { - answer = confirm("Are you sure you want to delete \"" + title + "\""); - if (answer) { - window.location.href = "list_resources.php?action=delete&id="+ id; - } - } - </script> - - <div class="section"> - <h3>List Resources</h3> - - <?php - $result = mysql_query('select id, title from resource order by title'); - if ($error = mysql_error()) { - echo "Error querying authors: $error<br/>"; - break; - } - ?> - - <ul> - <?php - while ($row = mysql_fetch_array($result)) { - $id = $row[0]; - $name = $row[1]; - ?> - - <li><?= $name ?> <a target="_blank" href="http://www.eclipse.org/resources/resource.php?id=<?= $id ?>">[open]</a> <a href="edit_resource.php?id=<?= $id ?>">[edit]</a> <a href="javascript:confirm_delete(<?= $id ?>, '<?= $name ?>');">[delete]</a></li> - - <?php - } - ?> - </ul> - </div> - -<?php - include("scripts/footer.php"); -?>
\ No newline at end of file diff --git a/committers/resources/resources.css b/committers/resources/resources.css deleted file mode 100755 index ba9a062..0000000 --- a/committers/resources/resources.css +++ /dev/null @@ -1,17 +0,0 @@ -.section { - border-style:solid; - border-width:1px; - width:700px; - padding:5px; - margin: 10px; -} - -.section h3 { - padding: 3px; - margin: -5px; - margin-bottom: 5px; - background: navy; - color: white; - font-family:sans-serif; - font-size:12pt; -} diff --git a/committers/resources/restricted.php b/committers/resources/restricted.php deleted file mode 100755 index 78c9762..0000000 --- a/committers/resources/restricted.php +++ /dev/null @@ -1,34 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # restricted.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # Displays a message telling the user that they're not allowed to - # use the page. - #**************************************************************************** - - include("scripts/header.php"); - -?> - -<h1>Restricted</h1> -<p>Use of the resources management pages is currently restricted to authorized users only.</p> - -<?php - include("scripts/footer.php"); -?>
\ No newline at end of file diff --git a/committers/resources/scripts/common.php b/committers/resources/scripts/common.php deleted file mode 100755 index 4565288..0000000 --- a/committers/resources/scripts/common.php +++ /dev/null @@ -1,95 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # common.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file contains functions that are used in managing resources. - #**************************************************************************** - - function dump_get_parameters() { - foreach($_GET as $key=>$value) - echo "$key => $value<br/>"; - } - - - function dump_post_parameters() { - foreach($_POST as $key=>$value) - echo "$key => $value<br/>"; - } - - function get_get_parameter($parameter, $default='') { - if (array_key_exists($parameter, $_GET)) { - return $_GET[$parameter]; - } else return $default; - } - - function get_post_parameter($parameter, $default='') { - if (array_key_exists($parameter, $_POST)) { - return $_POST[$parameter]; - } else return $default; - } - - function get_parameter($parameter, $default='') { - return get_post_parameter($parameter, $default); - } - - function goto_list_resources() { - header ("Location: list_resources.php"); - exit; - } - - function display_messages($messages) { - if (!$messages) return; - echo "<div><font color=\"red\">$messages</font></div>"; - } - - function is_authorized_to_edit_resources($userid) { - return in_array($userid, array('wbeaton', 'ngervais', 'iskerrett')); - } - - if ($_SERVER['SERVER_NAME'] != 'local.dev.eclipse.org') { - require_once("/home/data/httpd/eclipse-php-classes/system/app.class.php"); - require_once("/home/data/httpd/eclipse-php-classes/people/ldapperson.class.php"); - - $App = new App(); - $App->runStdWebAppCacheable(); - - $LDAPPerson = new LDAPPerson(); - $LDAPPerson = $LDAPPerson->redirectIfNotLoggedIn(); - - if (!is_authorized_to_edit_resources($LDAPPerson->getuid())) { - header ("Location: /committers/resources/restricted.php"); - exit; - } - } - - if (file_exists("/home/data/httpd/eclipse-php-classes/system/dbconnection_rw.class.php")) { - require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_rw.class.php"; - $dbc = new DBConnectionRW(); - $dbc->connect(); - } else { - $dbc = mysql_connect(null, "phoenix", "fireB!rd"); - - if (!$dbc) { - echo( "<P>Unable to connect to the database server at this time.</P>" ); - return; - } - - mysql_select_db("local_eclipse", $dbc); - } -?> diff --git a/committers/resources/scripts/footer.php b/committers/resources/scripts/footer.php deleted file mode 100755 index e14ccd3..0000000 --- a/committers/resources/scripts/footer.php +++ /dev/null @@ -1,28 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # footer.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file adds a footer to the page. - #**************************************************************************** -?> - <table><tr> - -<?php - include("../html/footer.php"); -?> diff --git a/committers/resources/scripts/header.php b/committers/resources/scripts/header.php deleted file mode 100755 index c407f81..0000000 --- a/committers/resources/scripts/header.php +++ /dev/null @@ -1,38 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # header.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file adds a header (with menu) to the page. - #**************************************************************************** - - include("../html/header.php"); - if (file_exists("/home/data/httpd/eclipse-php-classes/menu/menu.class.php")) { - require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php"); - $Menu = new Menu("en"); - $Menu->addMenuItem("List/edit resources", "/committers/resources/list_resources.php", "_self"); - $Menu->addMenuItem("Add resource", "/committers/resources/edit_resource.php", "_self"); - $Menu->addMenuItem("List/edit authors", "/committers/resources/edit_author.php", "_self"); - $Menu->addMenuItem("List/edit categories", "/committers/resources/edit_category.php", "_self"); - - include("../modules/menu.php"); - echo "</tr></table>"; - } - -?> -<link rel="stylesheet" type="text/css" href="./resources.css" title="rats" /> diff --git a/committers/resources/scripts/sql.php b/committers/resources/scripts/sql.php deleted file mode 100755 index 015cf1b..0000000 --- a/committers/resources/scripts/sql.php +++ /dev/null @@ -1,448 +0,0 @@ -<?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: - * Wayne Beaton (Eclipse Foundation)- initial API and implementation - *******************************************************************************/ - - #***************************************************************************** - # - # sql.php - # - # Author: Wayne Beaton - # Date: February 16, 2006 - # - # Description: - # This file contains function that interact with the database. - #**************************************************************************** - -class ResourceBroker { - var $messages = ''; - var $error; - - private function add_message($message) { - $this->messages .= "$message<br/>"; - } - - private function begin_transaction() { - $this->add_message("Begin transaction"); - mysql_query("begin"); - } - - private function commit_transaction() { - $this->add_message("Commit transaction"); - mysql_query("commit"); - } - - function rollback_transaction() { - $this->add_message("Rollback transaction"); - mysql_query("rollback"); - } - - function create_resource($title, $description, $type, $image_path, $categories) { - $this->begin_transaction(); - - $this->add_message("Creating resource..."); - try { - $id = $this->primitive_create_resource($title, $description, $type, $image_path); - $this->primitive_update_categories($id, $categories); - $this->commit_transaction(); - return $id; - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function delete_resource($id) { - $this->begin_transaction(); - try { - $this->primitive_delete_resource($id); - $this->primitive_delete_resource_category_mappings($id); - $this->primitive_delete_resource_links($id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function update_resource($id, $title, $description, $type, $image_path, $categories) { - $this->begin_transaction(); - $this->add_message("Updating resource $id"); - try { - $this->primitive_update_resource($id, $title, $description, $type, $image_path); - $this->primitive_update_categories($id, $categories); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - $this->add_message("Resource updated"); - } - - function add_categories($id, $category_ids) { - if (!is_array($category_ids)) return; - if (count($category_ids) == 0) return; - $this->begin_transaction(); - foreach($category_ids as $category_id) { - $this->add_message("Adding reference to category '$category_id'."); - $result = mysql_query("select * from resource_category where category_id=$category_id and resource_id=$id"); - if (mysql_fetch_array($result)) { - $this->add_message("The category is already referenced."); - continue; - } - mysql_query("insert into resource_category (resource_id, category_id) values ($id, $category_id)"); - if ($error = mysql_error()) { - $this->add_message("An error occurred while adding reference to category '$category_id'."); - $this->rollback_transaction(); - return; - } - } - $this->commit_transaction(); - } - - function create_link($id, $title, $language, $date, $path, $type, $authors) { - $this->begin_transaction(); - $this->add_message("Creating link for resource $id"); - try { - $link_id = $this->primitive_create_link($id, $title, $language, $date, $path, $type); - $this->primitive_update_link_authors($link_id, $authors); - $this->add_message("Link $link_id created."); - $this->commit_transaction(); - return $link_id; - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e; - $this->rollback_transaction(); - } - } - - function update_link($id, $link_id, $title, $language, $date, $path, $type, $authors) { - $this->begin_transaction(); - $this->add_message("Updating link $link_id"); - try { - $this->primitive_update_link($id, $link_id, $title, $language, $date, $path, $type); - $this->primitive_update_link_authors($link_id, $authors); - $this->commit_transaction(); - $this->add_message("Link updated"); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function delete_link($link_id) { - $this->begin_transaction(); - try { - $this->primitive_delete_resource_link($link_id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->error = $e->getMessage(); - $this->rollback_transaction(); - } - } - - function get_type_suggestions_string() { - $result = mysql_query("select distinct type from link"); - $type_suggestions = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $item = $row[0]; - $item = trim($item); - if (!$item) continue; - $type_suggestions .= $separator.$item; - $separator = ', '; - } - return $type_suggestions; - } - - function get_language_suggestions_string() { - $result = mysql_query("select distinct language from link"); - $language_suggestions = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $item = $row[0]; - $item = trim($item); - if (!$item) continue; - $language_suggestions .= $separator.$item; - $separator = ', '; - } - return $language_suggestions; - } - - function get_link_authors_string($link_id) { - $result = mysql_query("select name from author, link_author where link_author.link_id=$link_id and link_author.author_id=author.id"); - $link_authors = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $link_authors .= $separator.$row[0]; - $separator = ', '; - } - return $link_authors; - } - - function get_resource_categories_string($id) { - $result = mysql_query("select name from category, resource_category where resource_category.resource_id=$id and resource_category.category_id = category.id"); - $categories = ''; - $separator = ''; - while ($row = mysql_fetch_array($result)) { - $categories .= $separator.$row[0]; - $separator = ', '; - } - return $categories; - } - - function update_author($id, $name, $email, $company, $url) { - $this->add_message("Updating author $id"); - $result = mysql_query("update author set name='$name', email='$email', company='$company', link='$url' where id=$id"); - if ($error = mysql_error()) { - add_message("Error updating authors: $error"); - return; - } - $this->add_message("Author $id updated."); - } - - function delete_author($id) { - $this->add_message("Deleting author $id"); - $this->begin_transaction(); - try { - $this->primitive_delete_author_mappings($id); - $this->primitive_delete_author($id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->rollback_transaction(); - } - $this->add_message("Author $id deleted."); - } - - function update_category($id, $name) { - $this->add_message("Updating category $id"); - //$name = mysql_escape_string($name); - $result = mysql_query("update category set name='$name' where id=$id"); - if ($error = mysql_error()) { - add_message("Error updating category: $error"); - return; - } - $this->add_message("Category $id updated."); - } - - function delete_category($id) { - $this->add_message("Deleting category $id"); - $this->begin_transaction(); - try { - $this->primitive_delete_category_mappings($id); - $this->primitive_delete_category($id); - $this->commit_transaction(); - } catch (Exception $e) { - $this->add_message($e->getMessage()); - $this->rollback_transaction(); - } - $this->add_message("Category $id deleted."); - } - - function primitive_delete_author($id) { - $result = mysql_query("delete from author where id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting author: $error"); - } - } - - function primitive_update_link($id, $link_id, $title, $language, $date, $path, $type) { - mysql_query("update link set title='$title', language='$language', create_date='$date', path='$path', type='$type' where id=$link_id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - } - - function primitive_update_resource($id, $title, $description, $type, $image_path) { - mysql_query("update resource set title='$title', description='$description', type='$type', image_path='$image_path' where id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - } - - function primitive_delete_resource($id) { - $this->add_message("Deleting resource $id"); - mysql_query("delete from resource where id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - $this->add_message("Resource $id deleted"); - } - - function primitive_delete_resource_category_mappings($id) { - $this->add_message("Deleting resource/category mappings for $id"); - mysql_query("delete from resource_category where resource_id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - $this->add_message("Resource/category mappings deleted"); - } - - function primitive_delete_resource_link($link_id) { - $this->add_message("Deleting link $link_id."); - $this->primitive_delete_link_author_mapping($link_id); - - $result = mysql_query("delete from link where id=$link_id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - $this->add_message("Link deleted."); - } - - function primitive_delete_resource_links($id) { - $this->add_message("Deleting links for resource $id"); - $result = mysql_query("select id from link where resource_id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - while ($row = mysql_fetch_array($result)) { - $link_id = $row[0]; - $this->primitive_delete_resource_link($link_id); - } - - $this->add_message("Links deleted"); - } - - /* - * This function deletes all mappings to from the link - * with the given $id to its authors. - */ - function primitive_delete_link_author_mapping($id) { - $this->add_message("Deleting link/author mappings for link $id"); - mysql_query("delete from link_author where link_id=$id"); - if ($error = mysql_error()) { - throw new Exception($error); - } - - $this->add_message("Link/author mappings deleted"); - } - - /* - * This function deletes all mappings to the author with - * the given $id. - */ - function primitive_delete_author_mappings($id) { - $result = mysql_query("delete from link_author where author_id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting links to author: $error"); - } - $this->add_message("References to author $id in links deleted."); - } - - function primitive_delete_category($id) { - $result = mysql_query("delete from category where id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting category: $error"); - } - } - - /* - * This function deletes all mappings to the category with - * the given $id. - */ - function primitive_delete_category_mappings($id) { - $result = mysql_query("delete from resource_category where category_id=$id"); - if ($error = mysql_error()) { - throw new Exception("Error deleting links to author: $error"); - } - $this->add_message("References to category $id deleted."); - } - - function primitive_create_link($id, $title, $language, $date, $path, $type) { - mysql_query("insert into link (resource_id, title, language, create_date, path, type) values ($id, '$title', '$language', '$date', '$path', '$type')"); - if ($error = mysql_error()) { - throw new Exception($error); - } - return mysql_insert_id(); - } - - function primitive_update_link_authors($link_id, $authors) { - if (!$authors) return; - $this->add_message("Updating link authors..."); - $this->primitive_delete_link_author_mapping($link_id); - - $authors = split(',', $authors); - foreach($authors as $author_name) { - $author_name = trim($author_name); - if (!$author_name) continue; - $this->add_message("Searching for author '$author_name'..."); - $result = mysql_query("select id from author where name='$author_name'"); - if ($error = mysql_error()) { - throw new Exception("Error querying for existing author '$author_name': $error"); - } - $row = mysql_fetch_row($result); - if ($row) { - $author_id = $row[0]; - $this->add_message("Found author with id $author_id..."); - } else { - $this->add_message("Creating new author record..."); - mysql_query("insert into author (name, email, company, link) values ('$author_name', '', '', '')"); - if ($error = mysql_error()) { - throw new Exception("Error inserting author '$author_name': $error");; - } - $author_id = mysql_insert_id(); - } - $this->add_message("Inserting reference to author $author_id..."); - mysql_query("insert into link_author (link_id, author_id) values ($link_id, $author_id)"); - if ($error = mysql_error()) { - throw new Exception("Error inserting mapping to author $author_id: $error"); - } - } - } - - function primitive_create_resource($title, $description, $type, $image_path) { - mysql_query("insert into resource (type, title, description, image_path) values ('$type', '$title', '$description', '$image_path')"); - if ($error = mysql_error()) { - throw new Exception("Error inserting resource: $error"); - } - return mysql_insert_id(); - } - - function primitive_update_categories($id, $categories) { - $this->primitive_delete_resource_category_mappings($id); - $categories = split(',', $categories); - foreach($categories as $category_name) { - $category_name = trim($category_name); - if (!$category_name) continue; - $this->add_message("Searching for category '$category_name'."); - $result = mysql_query("select id from category where name='$category_name'"); - if ($error = mysql_error()) { - throw new Exception ("Error querying for existing category '$category_name': $error"); - } - $row = mysql_fetch_row($result); - if ($row) { - $category_id = $row[0]; - $this->add_message("Found category with id $category_id."); - } else { - $this->add_message("Creating category $category_name."); - mysql_query("insert into category (name) values ('$category_name')"); - if ($error = mysql_error()) { - throw new Exception($error); - } - $category_id = mysql_insert_id(); - } - $this->add_message("Inserting reference to category $category_id."); - mysql_query("insert into resource_category (resource_id, category_id) values ($id, $category_id)"); - if ($error = mysql_error()) { - throw new Exception($error); - } - } - } -} -?> diff --git a/eclipse_home_icon.png b/eclipse_home_icon.png Binary files differdeleted file mode 100644 index fd1b18b..0000000 --- a/eclipse_home_icon.png +++ /dev/null diff --git a/images/Adarrow.gif b/images/Adarrow.gif Binary files differdeleted file mode 100644 index 1848247..0000000 --- a/images/Adarrow.gif +++ /dev/null diff --git a/images/EclipseBannerPic.jpg b/images/EclipseBannerPic.jpg Binary files differdeleted file mode 100644 index 17b2a32..0000000 --- a/images/EclipseBannerPic.jpg +++ /dev/null diff --git a/images/Idea.jpg b/images/Idea.jpg Binary files differdeleted file mode 100644 index 119ce70..0000000 --- a/images/Idea.jpg +++ /dev/null diff --git a/images/bugs-16x16.png b/images/bugs-16x16.png Binary files differdeleted file mode 100644 index 19ce836..0000000 --- a/images/bugs-16x16.png +++ /dev/null diff --git a/images/c.gif b/images/c.gif Binary files differdeleted file mode 100644 index 50e1e94..0000000 --- a/images/c.gif +++ /dev/null diff --git a/images/ebugs-simple.GIF b/images/ebugs-simple.GIF Binary files differdeleted file mode 100644 index 8f1c084..0000000 --- a/images/ebugs-simple.GIF +++ /dev/null diff --git a/images/eclipse-org.GIF b/images/eclipse-org.GIF Binary files differdeleted file mode 100644 index 7668918..0000000 --- a/images/eclipse-org.GIF +++ /dev/null diff --git a/images/ecorner-simple.GIF b/images/ecorner-simple.GIF Binary files differdeleted file mode 100644 index 8e11659..0000000 --- a/images/ecorner-simple.GIF +++ /dev/null diff --git a/images/eproject-simple.GIF b/images/eproject-simple.GIF Binary files differdeleted file mode 100644 index 4ff2845..0000000 --- a/images/eproject-simple.GIF +++ /dev/null diff --git a/images/gerrit-16x16.gif b/images/gerrit-16x16.gif Binary files differdeleted file mode 100644 index 5c65e1f..0000000 --- a/images/gerrit-16x16.gif +++ /dev/null diff --git a/images/git-16x16.png b/images/git-16x16.png Binary files differdeleted file mode 100644 index 40371ae..0000000 --- a/images/git-16x16.png +++ /dev/null diff --git a/images/github-16x16.png b/images/github-16x16.png Binary files differdeleted file mode 100644 index ea7ac8e..0000000 --- a/images/github-16x16.png +++ /dev/null diff --git a/images/gradient.jpg b/images/gradient.jpg Binary files differdeleted file mode 100644 index 92d91d9..0000000 --- a/images/gradient.jpg +++ /dev/null diff --git a/images/howto_banner.jpg b/images/howto_banner.jpg Binary files differdeleted file mode 100644 index f2e2d42..0000000 --- a/images/howto_banner.jpg +++ /dev/null diff --git a/images/mainarrow.gif b/images/mainarrow.gif Binary files differdeleted file mode 100644 index 95d6f62..0000000 --- a/images/mainarrow.gif +++ /dev/null diff --git a/images/spinner.gif b/images/spinner.gif Binary files differdeleted file mode 100644 index e24bb17..0000000 --- a/images/spinner.gif +++ /dev/null diff --git a/members-only/.project b/members-only/.project deleted file mode 100644 index 7fa186c..0000000 --- a/members-only/.project +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>members-only</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - </buildSpec> - <natures> - </natures> -</projectDescription> diff --git a/members-only/_projectCommon.php b/members-only/_projectCommon.php deleted file mode 100644 index da5f999..0000000 --- a/members-only/_projectCommon.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - - # Set the theme for your project's web pages. - # See the Committer Tools "How Do I" for list of themes - # https://dev.eclipse.org/committers/ - # Optional: defaults to system theme - $theme = "solstice"; - - # Define your project-wide Nav bars here. - # Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3) - # these are optional - $Nav->addNavSeparator("Project Home", "downloads.php"); - $Nav->addCustomNav("Downloads", "downloads.php", "_self", 2); - $Nav->addCustomNav("Installation", "install.php", "_self", 2); - $Nav->addCustomNav("FAQ", "faq.php", "_self", 2); - - - - -?> diff --git a/members-only/index.php b/members-only/index.php deleted file mode 100644 index 566ed1c..0000000 --- a/members-only/index.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
-
- #*****************************************************************************
- #
- # template.php
- #
- # Author: Denis Roy
- # Date: 2005-06-16
- #
- # Description: Type your page comments here - these are not sent to the browser
- #
- #
- #****************************************************************************
-
- #
- # Begin: page-specific settings. Change these.
- $pageTitle = "Welcome to the Eclipse Members-Only Content Page";
- $pageKeywords = "Type, page, keywords, here";
- $pageAuthor = "Type your name here";
-
- # Add page-specific Nav bars here
- # Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3)
- # $Nav->addNavSeparator("My Page Links", "downloads.php");
- # $Nav->addCustomNav("My Link", "mypage.php", "_self", 3);
- # $Nav->addCustomNav("Google", "http://www.google.com/", "_blank", 3);
-
- # End: page-specific settings
- #
-
- # Paste your HTML content between the EOHTML markers!
- $html = <<<EOHTML
-
-<div id="maincontent">
- <div id="midcolumn">
- <h1>$pageTitle</h1>
- <p>Content on this page is for the exclusive use of <a href="http://www.eclipse.org/membership/exploreMembership.php">
- Eclipse Foundation Members</a>. Members should feel free to contact <a href="mailto:membership@eclipse.org">membership@eclipse.org</a>
- at any time with any questions about membership and using your benefits.</p>
- <div class="homeitem">
- <h3>Members Meeting Minutes</h3>
- <ul>
- <li><a target="_minutes" href="./minutes/120618Minutes.pdf">June 18, 2012 Minutes</a> (PDF)</li>
- <li><a target="_minutes" href="./minutes/120328Minutes.pdf">March 28, 2012 Minutes</a> (PDF)</li>
- <li><a target="_minutes" href="./minutes/111220Minutes.pdf">December 20, 2011 Minutes</a> (PDF)</li>
- <li><a target="_minutes" href="./minutes/110929Minutes.pdf">September 29, 2011 Minutes</a> (PDF)</li>
- <li><a target="_minutes" href="./minutes/110621Minutes.pdf">June 21, 2011 Minutes</a> (PDF)</li>
- <li><a target="_minutes" href="./minutes/080624Minutes.pdf">June 24, 2008 Minutes</a> (PDF)</li>
- </ul>
- </div>
- <div class="homeitem">
- <h3>Member Newsletters</h3>
- <ul>
- <li><a target="_newsletter" href="http://www.eclipse.org/community/newsletter/2008/2008January.html">January, 2008 Newsletter</a> (HTML)</li>
- <li><a target="_newsletter" href="http://www.eclipse.org/community/newsletter/2008/2008February.html">February, 2008 Newsletter</a> (HTML)</li>
- <li><a target="_newsletter" href="http://www.eclipse.org/community/newsletter/2008/2008March.html">March, 2008 Newsletter</a> (HTML)</li>
- <li><a target="_newsletter" href="http://www.eclipse.org/community/newsletter/2008/2008April.html">April, 2008 Newsletter</a> (HTML)</li>
- <li><a target="_newsletter" href="http://www.eclipse.org/community/newsletter/2008/2008May.html">May, 2008 Newsletter</a> (HTML)</li>
- <li><a target="_newsletter" href="http://www.eclipse.org/community/newsletter/2008/2008June.html">June, 2008 Newsletter</a> (HTML)</li>
- <li><a target="_newsletter" href="http://www.eclipse.org/community/newsletter/2008/2008July.html">July, 2008 Newsletter</a> (HTML)</li>
- </ul>
- </div>
- <div class="homeitem3col">
- <h3>Links to Membership Related Resources on eclipse.org</h3>
- <ul>
- <li><a target="_eclipseorg" href="http://www.eclipse.org/membership/become_a_member/benefits.php?member=yes">Membership Benefits</a></li>
- <li><a target="_eclipseorg" href="http://www.eclipse.org/membership/special_programs/">Current Members-Only Special Programs</a></li>
- <li><a target="_eclipseorg" href="http://eclipseplugincentral.com/">Eclipse Plugin Central</a></li>
- <li><a target="_eclipseorg" href="http://www.eclipse.org/artwork/">Membership Logos and Artwork</a></li>
- <li><a target="_eclipseorg" href="http://www.eclipse.org/legal/">Legal Resources</a></li>
- </ul>
- </div>
- <hr class="clearer" />
-
- </div>
-
-</div>
-
-
-EOHTML;
-
-
- # Generate the web page
- $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
\ No newline at end of file diff --git a/members-only/minutes/080624Minutes.pdf b/members-only/minutes/080624Minutes.pdf Binary files differdeleted file mode 100644 index b7690b2..0000000 --- a/members-only/minutes/080624Minutes.pdf +++ /dev/null diff --git a/members-only/minutes/110621Minutes.pdf b/members-only/minutes/110621Minutes.pdf Binary files differdeleted file mode 100644 index 64cc2f7..0000000 --- a/members-only/minutes/110621Minutes.pdf +++ /dev/null diff --git a/members-only/minutes/110929Minutes.pdf b/members-only/minutes/110929Minutes.pdf Binary files differdeleted file mode 100755 index b58fbf8..0000000 --- a/members-only/minutes/110929Minutes.pdf +++ /dev/null diff --git a/members-only/minutes/111220Minutes.pdf b/members-only/minutes/111220Minutes.pdf Binary files differdeleted file mode 100755 index ec34025..0000000 --- a/members-only/minutes/111220Minutes.pdf +++ /dev/null diff --git a/members-only/minutes/120328Minutes.pdf b/members-only/minutes/120328Minutes.pdf Binary files differdeleted file mode 100644 index a98b74f..0000000 --- a/members-only/minutes/120328Minutes.pdf +++ /dev/null diff --git a/members-only/minutes/120618Minutes.pdf b/members-only/minutes/120618Minutes.pdf Binary files differdeleted file mode 100644 index 6e49fb5..0000000 --- a/members-only/minutes/120618Minutes.pdf +++ /dev/null diff --git a/members-only/template.php b/members-only/template.php deleted file mode 100644 index 276f6f3..0000000 --- a/members-only/template.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop' - - #***************************************************************************** - # - # template.php - # - # Author: Denis Roy - # Date: 2005-06-16 - # - # Description: Type your page comments here - these are not sent to the browser - # - # - #**************************************************************************** - - # - # Begin: page-specific settings. Change these. - $pageTitle = "Sample Phoenix web page using the new templates"; - $pageKeywords = "Type, page, keywords, here"; - $pageAuthor = "Type your name here"; - - # Add page-specific Nav bars here - # Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3) - # $Nav->addNavSeparator("My Page Links", "downloads.php"); - # $Nav->addCustomNav("My Link", "mypage.php", "_self", 3); - # $Nav->addCustomNav("Google", "http://www.google.com/", "_blank", 3); - - # End: page-specific settings - # - - # Paste your HTML content between the EOHTML markers! - $html = <<<EOHTML - -<div id="maincontent"> - <div id="midcolumn"> - <h1>$pageTitle</h1> - <h2>Section title</h2> - <p>Intro text.<br /> <a href="#">more about something »</a> </p> - <div class="homeitem"> - <h3>Narrow column</h3> - <ul> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - </ul> - </div> - <div class="homeitem"> - <h3>Narrow column</h3> - <ul> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - </ul> - </div> - <div class="homeitem3col"> - <h3>This is a wide column</h3> - <ul> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - <li><a href="#">Link</a>. Teaser text <a href="#">'Reference'</a><span class="dates">02/05/05</span></li> - </ul> - </div> - <hr class="clearer" /> - <p>Some free text</p> - <ul class="midlist"> - <li>list of items in free text</li> - <li>list of items in free text</li> - <li>list of items in free text</li> - </ul> - <ol> - <li>Ordered list</li> - <li>Ordered list</li> - <li>Ordered list</li> - </ol> - </div> - <div id="rightcolumn"> - <div class="sideitem"> - <h6>Related links</h6> - <ul> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - </ul> - </div> - <div class="sideitem"> - <h6>Related links</h6> - <ul> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - <li><a href="#">Link</a> - descriptive text</li> - </ul> - </div> - </div> -</div> - - -EOHTML; - - - # Generate the web page - $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); -?>
\ No newline at end of file diff --git a/planet_icon.png b/planet_icon.png Binary files differdeleted file mode 100644 index 0d65554..0000000 --- a/planet_icon.png +++ /dev/null diff --git a/plugin_icon.png b/plugin_icon.png Binary files differdeleted file mode 100644 index c3fc874..0000000 --- a/plugin_icon.png +++ /dev/null diff --git a/poweredby.png b/poweredby.png Binary files differdeleted file mode 100644 index 616a840..0000000 --- a/poweredby.png +++ /dev/null |
