[Fusionforge-commits] FusionForge branch master updated. af98058d94c0d715c4fc2b1d01a661024e6a7d4f

Franck Villaume nerville at fusionforge.org
Fri Jun 20 14:42:55 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  af98058d94c0d715c4fc2b1d01a661024e6a7d4f (commit)
       via  de9d8a3f00315e4db288e39ca184b35121ec1080 (commit)
       via  40e611e8424b64151468f681e57a84605ee6fa5c (commit)
       via  f4d9c8ee2793de39d6adeebdf4c729520268235a (commit)
       via  00a28ec427efd99289ff9dfdd64ca71edbd7c97d (commit)
      from  0eb9d482bdbf83b0f0ebf742327ac10622f24cf9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit af98058d94c0d715c4fc2b1d01a661024e6a7d4f
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Jun 20 14:39:20 2014 +0200

    headermenu: better ajax, html5 placeholder

diff --git a/src/plugins/headermenu/action/validateOrder.php b/src/plugins/headermenu/action/validateOrder.php
index a03ae97..1f257d7 100644
--- a/src/plugins/headermenu/action/validateOrder.php
+++ b/src/plugins/headermenu/action/validateOrder.php
@@ -2,7 +2,7 @@
 /**
  * headermenu plugin : validateOrder action
  *
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -22,16 +22,18 @@
  */
 
 global $headermenu;
+global $HTML;
 
 $sysdebug_enable = false;
 
 $linksOrder = getStringFromRequest('linkorder');
-$returnValue = 1;
+$returnValue = array();
+$returnValue['html'] = $HTML->error(_('Error in Link Order validation'));
 
 if ($linksOrder && strlen($linksOrder)) {
 	$linksOrderArr = explode(',', $linksOrder);
 	if ($headermenu->setLinksOrder($linksOrderArr))
-		$returnValue = 0;
+		$returnValue['html'] = $HTML->feedback(_('Link Order successfully validated'));
 }
-echo $returnValue;
+echo json_encode($returnValue);
 exit;
diff --git a/src/plugins/headermenu/view/admin/updateLinkValue.php b/src/plugins/headermenu/view/admin/updateLinkValue.php
index 06270ee..11778d0 100644
--- a/src/plugins/headermenu/view/admin/updateLinkValue.php
+++ b/src/plugins/headermenu/view/admin/updateLinkValue.php
@@ -107,7 +107,7 @@ if (is_array($linkValues)) {
 				'<input type="submit" value="'. _('Update') .'" />'.
 				'<input type="submit" name="submit" value="'. _('Cancel') .'" formnovalidate="formnovalidate" />', false);
 	echo $HTML->closeForm();
-	echo html_e('span', array(), sprintf(_('Fields marked with %s are mandatory.'), utils_requiredField()), false);
+	echo $HTML->addRequiredFieldsInfoBox();
 } else {
 	$error_msg = _('Cannot retrieve value for this link')._(': ').$linkId;
 	session_redirect($redirect_url);
diff --git a/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php b/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
index 25200ad..f70e72c 100644
--- a/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
+++ b/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
@@ -25,7 +25,7 @@ global $HTML;
 global $headermenu;
 global $type;
 
-$actionurl = '/plugins/'.$headermenu->name.'?type='.$type;
+$actionurl = '/plugins/'.$headermenu->name.'/?type='.$type;
 echo html_ao('script', array('type' => 'text/javascript'));
 ?>
 //<![CDATA[
@@ -43,10 +43,6 @@ jQuery(document).ready(function() {
 		tableHeaTbLink: jQuery('.sortable_headermenu_listlinks tbody'),
 		validOutButton:	jQuery('#linkorderoutervalidatebutton'),
 		validHeaButton:	jQuery('#linkorderheadervalidatebutton'),
-		validMessOut:	'<?php echo _('Outermenu Link Order successfully validated') ?>',
-		validMessHea:	'<?php echo _('Headermenu Link Order successfully validated') ?>',
-		errMessOut:	'<?php echo _('Error in Outermenu Link Order validation') ?>',
-		errMessHea:	'<?php echo _('Error in Headermenu Link Order validation') ?>'
 	});
 });
 
@@ -132,22 +128,22 @@ echo $HTML->information(_('You can add specific tabs in outermenu (main tab) or
 echo $HTML->openForm(array('method' => 'POST', 'name' => 'addLink', 'action' => util_make_uri($actionurl.'&action=addLink')));
 echo $HTML->listTableTop();
 $cells = array();
-$cells[] = array(_('Displayed Name')._(':'), 'style' => 'text-align:right');
-$cells[][] = '<input required="required" name="name" type="text" maxlength="255" />';
+$cells[] = array(_('Displayed Name').utils_requiredField()._(':'), 'style' => 'text-align:right');
+$cells[][] = '<input required="required" name="name" type="text" maxlength="255" value="" size="40" placeholder="'._('the displayed name in menu').'" />';
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
-$cells[] = array(_('Description')._(':'), 'style' => 'text-align:right');
-$cells[][] = '<input name="description" type="text" maxlength="255" />';
+$cells[] = array(_('Description').utils_requiredField()._(':'), 'style' => 'text-align:right');
+$cells[][] = '<input name="description" type="text" maxlength="255" value="" size="40" placeholder="'._('the description, used by the tooltip system').'" />';
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
-$cells[] = array(_('Menu Location')._(':'), 'style' => 'text-align:right');
+$cells[] = array(_('Menu Location').utils_requiredField()._(':'), 'style' => 'text-align:right');
 $vals = array('headermenu', 'outermenu');
 $texts = array('headermenu', 'outermenu');
 $select_name = 'linkmenu';
 $cells[][] = html_build_radio_buttons_from_arrays($vals, $texts, $select_name, 'headermenu', false);
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
-$cells[] = array(_('Tab Type')._(':'), 'style' => 'text-align:right');
+$cells[] = array(_('Tab Type').utils_requiredField()._(':'), 'style' => 'text-align:right');
 $texts = array('URL', 'HTML Page');
 $vals = array('url', 'htmlcode');
 $select_name = 'typemenu';
@@ -165,10 +161,11 @@ $cells[][] = $params['content'];
 echo $HTML->multiTableRow(array('id' => 'trhtmlcode', 'class' => 'hide'), $cells);
 $cells = array();
 $cells[] = array(_('URL')._(':'), 'style' => 'text-align:right');
-$cells[][] = '<input name="link" type="text" maxlength="255" />';
+$cells[][] = '<input name="link" type="url" maxlength="255" size="40" />';
 echo $HTML->multiTableRow(array('id' => 'urlcode', 'class' => 'hide'), $cells);
 $cells = array();
 $cells[] = array('<input type="submit" value="'. _('Add') .'" />', 'colspan' => 2);
 echo $HTML->multiTableRow(array(), $cells);
 echo $HTML->listTableBottom();
 echo $HTML->closeForm();
+echo $HTML->addRequiredFieldsInfoBox();
diff --git a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
index e21094e..86fff22 100644
--- a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
+++ b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
@@ -40,9 +40,7 @@ jQuery(document).ready(function() {
 		tableTbodyLink:	jQuery('#sortable').find('tbody'),
 		validateButton:	jQuery('#linkordervalidatebutton'),
 		groupId:	'<?php echo $group_id ?>',
-		headerMenuUrl:	'<?php echo util_make_uri('/plugins/'.$headermenu->name) ?>',
-		validMessage:	'<?php echo _('Link Order successfully validated') ?>',
-		errorMessage:	'<?php echo _('Error in Link Order validation') ?>'
+		headerMenuUrl:	'<?php echo util_make_uri('/plugins/'.$headermenu->name) ?>'
 	});
 });
 
diff --git a/src/plugins/headermenu/www/scripts/HeaderMenuController.js b/src/plugins/headermenu/www/scripts/HeaderMenuController.js
index 246455d..df35dc4 100644
--- a/src/plugins/headermenu/www/scripts/HeaderMenuController.js
+++ b/src/plugins/headermenu/www/scripts/HeaderMenuController.js
@@ -1,7 +1,7 @@
 /**
  * headerMenu Plugin Js Controller
  *
- * Copyright 2012-2013, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -101,43 +101,41 @@ HeaderMenuController.prototype =
 	},
 
 	validateOutLinkOrder: function() {
-		var linkOrder = jQuery(".sortable_outermenu_listlinks tbody").sortable('toArray').toString();
-		jQuery.get(this.params.headerMenuUrl,
+		var linkOrder = this.params.tableOutTbLink.sortable('toArray').toString();
+		jQuery.getJSON(this.params.headerMenuUrl,
 				{
 					action:		'validateOrder',
 					linkorder:	linkOrder,
 					type:		'globaladmin'
 				},
 				jQuery.proxy(function(data) {
-						jQuery('.feedback').remove();
-						jQuery('.error').remove();
-						if (data == 0) {
-							jQuery('#maindiv').prepend('<div class="actionresult"><p id="validateLinkMessage" class="feedback">'+this.params.validMessOut+'</p></div>');
-						} else {
-							jQuery('#maindiv').prepend('<p id="validateLinkMessage" class="error">'+this.params.errMessOut+'</p>');
+						jQuery('#maindiv > .feedback').remove();
+						jQuery('#maindiv > .error').remove();
+						jQuery('#maindiv > .warning_msg').remove();
+						if (typeof data.html != 'undefined') {
+							jQuery('#maindiv').prepend(data.html);
 						}
-                        jQuery("#linkorderoutervalidatebutton").hide();
+						this.params.validOutButton.hide();
 					}, this)
 			);
 	},
 
 	validateHeaLinkOrder: function() {
-		var linkOrder = jQuery(".sortable_headermenu_listlinks tbody").sortable('toArray').toString();
-		jQuery.get(this.params.headerMenuUrl,
+		var linkOrder = this.params.tableHeaTbLink.sortable('toArray').toString();
+		jQuery.getJSON(this.params.headerMenuUrl,
 				{
 					action:		'validateOrder',
 					linkorder:	linkOrder,
 					type:		'globaladmin'
 				},
 				jQuery.proxy(function(data) {
-						jQuery('.feedback').remove();
-						jQuery('.error').remove();
-						if (data == 0) {
-							jQuery('#maindiv').prepend('<div class="actionresult"><p id="validateLinkMessage" class="feedback">'+this.params.validMessHea+'</p></div>');
-						} else {
-							jQuery('#maindiv').prepend('<p id="validateLinkMessage" class="error">'+this.params.errMessHea+'</p>');
+						jQuery('#maindiv > .feedback').remove();
+						jQuery('#maindiv > .error').remove();
+						jQuery('#maindiv > .warning_msg').remove();
+						if (typeof data.html != 'undefined') {
+							jQuery('#maindiv').prepend(data.html);
 						}
-                        jQuery("#linkorderheadervalidatebutton").hide();
+						this.params.validHeaButton.hide();
 					}, this)
 			);
 	}
@@ -190,7 +188,7 @@ GroupMenuController.prototype =
 
 	validateProjectLinkOrder: function() {
 		var linkOrder = jQuery("#sortable").find("tbody").sortable('toArray').toString();
-		jQuery.get(this.params.headerMenuUrl,
+		jQuery.getJSON(this.params.headerMenuUrl,
 				{
 					group_id:	this.params.groupId,
 					action:		'validateOrder',
@@ -198,17 +196,15 @@ GroupMenuController.prototype =
 					type:		'projectadmin'
 				},
 				jQuery.proxy(function(data) {
-						jQuery('.feedback').remove();
-						jQuery('.error').remove();
-						if (data == 0) {
-							jQuery('#maindiv').prepend('<div class="actionresult"><p id="validateLinkMessage" class="feedback">'+this.params.validMessage+'</p></div>');
-						} else {
-							jQuery('#maindiv').prepend('<p id="validateLinkMessage" class="error">'+this.params.errorMessage+'</p>');
+						jQuery('#maindiv > .feedback').remove();
+						jQuery('#maindiv > .error').remove();
+						jQuery('#maindiv > .warning_msg').remove();
+						if (typeof data.html != 'undefined') {
+							jQuery('#maindiv').prepend(data.html);
 						}
 						this.params.validateButton.hide();
 					}, this)
 			);
-
 	}
 };
 

commit de9d8a3f00315e4db288e39ca184b35121ec1080
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Jun 20 14:37:53 2014 +0200

    partial [#693]: sync docman monitory icons with standard icon set

diff --git a/src/common/docman/actions/monitordirectory.php b/src/common/docman/actions/monitordirectory.php
index 434c1ef..af08c62 100644
--- a/src/common/docman/actions/monitordirectory.php
+++ b/src/common/docman/actions/monitordirectory.php
@@ -37,7 +37,7 @@ $directoryid = getStringFromRequest('directoryid');
 $option = getStringFromRequest('option');
 $feedback = _('Folder').' ';
 switch ($option) {
-	case 'add': {
+	case 'start': {
 		if (!empty($directoryid)) {
 			$dg = new DocumentGroup($g, $directoryid);
 			$feedback .= $dg->getName()._(': ');
@@ -52,7 +52,7 @@ switch ($option) {
 		$feedback .= _('Monitoring Started');
 		break;
 	}
-	case 'remove': {
+	case 'stop': {
 		if (!empty($directoryid)) {
 			$dg = new DocumentGroup($g, $directoryid);
 			$feedback .= $dg->getName().' ';
diff --git a/src/common/docman/actions/monitorfile.php b/src/common/docman/actions/monitorfile.php
index e08c5f6..2edec35 100644
--- a/src/common/docman/actions/monitorfile.php
+++ b/src/common/docman/actions/monitorfile.php
@@ -50,7 +50,7 @@ if (!forge_check_perm('docman', $g->getID(), 'read')) {
 $arr_fileid = explode(',', getStringFromRequest('fileid'));
 $option = getStringFromRequest('option');
 switch ($option) {
-	case 'add': {
+	case 'start': {
 		foreach ($arr_fileid as $fileid) {
 			if (!empty($fileid)) {
 				$d = new Document($g, $fileid);
@@ -67,7 +67,7 @@ switch ($option) {
 		$feedback = sprintf(ngettext('Monitoring %s document started.', 'Monitoring %s documents started.', $count), $count);
 		break;
 	}
-	case 'remove': {
+	case 'stop': {
 		foreach ($arr_fileid as $fileid) {
 			if (!empty($fileid)) {
 				$d = new Document($g, $fileid);
diff --git a/src/common/docman/views/listfile.php b/src/common/docman/views/listfile.php
index 7a6f102..2e631b7 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -186,7 +186,7 @@ if ($DocGroupName) {
 		if (forge_check_perm('docman', $ndg->Group->getID(), 'approve')) {
 			echo html_e('input', array('type' => 'hidden', 'id' => 'doc_group_id', 'value' => $ndg->getID()));
 			echo util_make_link('#', html_image('docman/configure-directory.png', 22, 22, array('alt' => 'edit')), array('id' => 'docman-editdirectory', 'title' => _('Edit this folder'), 'onclick' => 'javascript:controllerListFile.toggleEditDirectoryView()' ), true);
-			echo util_make_link($redirecturl.'&action=trashdir', html_image('docman/trash-empty.png', 22, 22, array('alt' => 'trashdir')), array('id' => 'docman-trashdirectory', 'title' => _('Move this folder and his content to trash')));
+			echo util_make_link($redirecturl.'&action=trashdir', $HTML->getDeletePic('', 'trashdir'), array('id' => 'docman-trashdirectory', 'title' => _('Move this folder and his content to trash')));
 			if (!isset($nested_docs[$dirid]) && !isset($nested_groups[$dirid]) && !isset($nested_pending_docs[$dirid])) {
 				echo util_make_link($redirecturl.'&action=deldir', html_image('docman/delete-directory.png', 22, 22, array('alt' => 'deldir')), array('id' => 'docman-deletedirectory', 'title' => _('Permanently delete this folder')));
 			}
@@ -205,13 +205,15 @@ if ($DocGroupName) {
 
 	if (session_loggedin()) {
 		if ($ndg->isMonitoredBy($u->getID())) {
-			$option = 'remove';
+			$option = 'stop';
 			$titleMonitor = _('Stop monitoring this folder');
+			$image = $HTML->getStopMonitoringPic('', $titleMonitor);
 		} else {
-			$option = 'add';
+			$option = 'start';
 			$titleMonitor = _('Start monitoring this folder');
+			$image = $HTML->getStartMonitoringPic('', $titleMonitor);
 		}
-		echo util_make_link($redirecturl.'&action=monitordirectory&option='.$option.'&directoryid='.$ndg->getID(), html_image('docman/monitor-'.$option.'document.png',22,22,array('alt'=>$titleMonitor)), array('title' => $titleMonitor));
+		echo util_make_link($redirecturl.'&action=monitordirectory&option='.$option.'&directoryid='.$ndg->getID(), $image, array('title' => $titleMonitor));
 	}
 	echo html_ac(html_ap() - 1);
 
@@ -313,7 +315,7 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 			}
 			$editfileaction .= '&group_id='.$GLOBALS['group_id'];
 			if (!$d->getLocked() && !$d->getReserved()) {
-				$nextcell .= util_make_link($redirecturl.'&action=trashfile&fileid='.$d->getID(), html_image('docman/trash-empty.png', 22, 22, array('alt' => _('Move this document to trash'))), array('title' => _('Move this document to trash')));
+				$nextcell .= util_make_link($redirecturl.'&action=trashfile&fileid='.$d->getID(), $HTML->getDeletePic('', _('Move this document to trash')), array('title' => _('Move this document to trash')));
 				$nextcell .= util_make_link('#', html_image('docman/edit-file.png',22,22,array('alt'=>_('Edit this document'))), array('onclick' => 'javascript:controllerListFile.toggleEditFileView({action:\''.util_make_uri($editfileaction).'\', lockIntervalDelay: 60000, childGroupId: '.util_ifsetor($childgroup_id, 0).' ,id:'.$d->getID().', groupId:'.$d->Group->getID().', docgroupId:'.$d->getDocGroupID().', statusId:'.$d->getStateID().', statusDict:'.$dm->getStatusNameList('json').', docgroupDict:'.$dm->getDocGroupList($nested_groups, 'json').', title:\''.addslashes($d->getName()).'\', filename:\''.$d->getFilename().'\', description:\''.addslashes($d->getDescription()).'\', isURL:\''.$d->isURL().'\', isText:\''.$d->isText().'\', isHtml:\''.$d->isHtml().'\', useCreateOnline:'.$d->Group->useCreateOnline().', docManURL:\''.util_make_uri('/docman').'\'})', 'title' => _('Edit this document')), true);
 				if (session_loggedin()) {
 					$nextcell .= util_make_link($redirecturl.'&action=reservefile&fileid='.$d->getID(), html_image('docman/reserve-document.png', 22, 22, array('alt' => _('Reserve this document'))), array('title' => _('Reserve this document for later edition')));
@@ -324,20 +326,22 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 						$nextcell .= util_make_link($redirecturl.'&action=enforcereserve&fileid='.$d->getID(), html_image('docman/enforce-document.png',22,22,array('alt'=>_('Enforce reservation'))), array('title' => _('Enforce reservation')));
 					}
 				} else {
-					$nextcell .= util_make_link($redirecturl.'&action=trashfile&fileid='.$d->getID(), html_image('docman/trash-empty.png', 22, 22, array('alt' => _('Move this document to trash'))), array('title' => _('Move this document to trash')));
+					$nextcell .= util_make_link($redirecturl.'&action=trashfile&fileid='.$d->getID(), $HTML->getDeletePic('', _('Move this document to trash')), array('title' => _('Move this document to trash')));
 					$nextcell .= util_make_link('#', html_image('docman/edit-file.png', 22 ,22, array('alt' => _('Edit this document'))), array('onclick' => 'javascript:controllerListFile.toggleEditFileView({action:\''.util_make_uri($editfileaction).'\', lockIntervalDelay: 60000, childGroupId: '.util_ifsetor($childgroup_id, 0).' ,id:'.$d->getID().', groupId:'.$d->Group->getID().', docgroupId:'.$d->getDocGroupID().', statusId:'.$d->getStateID().', statusDict:'.$dm->getStatusNameList('json').', docgroupDict:'.$dm->getDocGroupList($nested_groups, 'json').', title:\''.addslashes($d->getName()).'\', filename:\''.$d->getFilename().'\', description:\''.addslashes($d->getDescription()).'\', isURL:\''.$d->isURL().'\', isText:\''.$d->isText().'\', isHtml:\''.$d->isHtml().'\', useCreateOnline:'.$d->Group->useCreateOnline().', docManURL:\''.util_make_uri('/docman').'\'})', 'title' => _('Edit this document')), true);
 					$nextcell .= util_make_link($redirecturl.'&action=releasefile&fileid='.$d->getID(), html_image('docman/release-document.png', 22, 22, array('alt' => _('Release reservation'))), array('title' => _('Release reservation')));
 				}
 			}
 			if (session_loggedin()) {
 				if ($d->isMonitoredBy($u->getID())) {
-					$option = 'remove';
+					$option = 'stop';
 					$titleMonitor = _('Stop monitoring this document');
+					$image = $HTML->getStopMonitoringPic('', $titleMonitor);
 				} else {
-					$option = 'add';
+					$option = 'start';
 					$titleMonitor = _('Start monitoring this document');
+					$image = $HTML->getStartMonitoringPic('', $titleMonitor);
 				}
-				$nextcell .= util_make_link($redirecturl.'&action=monitorfile&option='.$option.'&fileid='.$d->getID(), html_image('docman/monitor-'.$option.'document.png', 22, 22, array('alt' => $titleMonitor)), array('title' => $titleMonitor));
+				$nextcell .= util_make_link($redirecturl.'&action=monitorfile&option='.$option.'&fileid='.$d->getID(), $image, array('title' => $titleMonitor));
 			}
 			$cells[][] = $nextcell;
 		}
@@ -348,12 +352,12 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 	echo html_ao('span', array('id' => 'massactionactive', 'class' => 'hide'));
 	echo html_e('span', array('id' => 'docman-massactionmessage', 'title' => _('Actions availables for selected documents, you need to check at least one document to get actions')), _('Mass actions for selected documents:'), false);
 	if (forge_check_perm('docman', $ndg->Group->getID(), 'approve')) {
-		echo util_make_link('#', html_image('docman/trash-empty.png', 22, 22, array('alt' => _('Move to trash'))), array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=trashfile&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Move to trash')), true);
+		echo util_make_link('#', $HTML->getDeletePic('', _('Move to trash')), array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=trashfile&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Move to trash')), true);
 		if (session_loggedin()) {
 			echo util_make_link('#', html_image('docman/reserve-document.png', 22, 22, array('alt' => _('Reserve'))), array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=reservefile&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Reserve for later edition')), true);
 			echo util_make_link('#', html_image('docman/release-document.png', 22, 22, array('alt' => _('Release reservation'))) , array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=releasefile&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Release reservation')), true);
-			echo util_make_link('#', html_image('docman/monitor-adddocument.png', 22, 22, array('alt' => _('Monitor'))), array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=monitorfile&option=add&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Monitor')), true);
-			echo util_make_link('#', html_image('docman/monitor-removedocument.png', 22, 22, array('alt' => _('Stop Monitoring'))), array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=monitorfile&option=remove&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Stop Monitoring')), true);
+			echo util_make_link('#', $HTML->getStartMonitoringPic('', _('Start monitoring')), array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=monitorfile&option=add&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Monitor')), true);
+			echo util_make_link('#', $HTML->getStopMonitoringPic('', _('Stop monitoring')), array('onclick' => 'window.location.href=\''.util_make_uri($redirecturl.'&action=monitorfile&option=remove&fileid=\'+controllerListFile.buildUrlByCheckbox("active")'), 'title' => _('Stop Monitoring')), true);
 			echo util_make_link('#', html_image('docman/move-document.png', 22, 22, array('alt' => _('Move files to another folder'))), array('onclick' => 'javascript:controllerListFile.toggleMoveFileView({})', 'title' => _('Move files to another folder')), true);
 		}
 	}

commit 40e611e8424b64151468f681e57a84605ee6fa5c
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Jun 20 14:33:11 2014 +0200

    docman: no need to declare a variable here

diff --git a/src/www/docman/index.php b/src/www/docman/index.php
index 501f625..90c9044 100644
--- a/src/www/docman/index.php
+++ b/src/www/docman/index.php
@@ -115,9 +115,7 @@ html_use_jquerysplitter();
 use_javascript('/docman/scripts/DocManController.js');
 use_javascript('/js/sortable.js');
 
-$title = _('Documents for ').$g->getPublicName();
-
-site_project_header(array('title'=>$title, 'group'=>$group_id, 'toptab'=>'docman'));
+site_project_header(array('title'=> _('Documents for ').$g->getPublicName(), 'group'=>$group_id, 'toptab'=>'docman'));
 
 echo html_ao('div', array('id' => 'menu'));
 include ($gfcommon.'docman/views/menu.php');

commit f4d9c8ee2793de39d6adeebdf4c729520268235a
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Jun 20 14:32:14 2014 +0200

    themes: remove trailing quotes

diff --git a/src/www/themes/funky-wOw/Theme.class.php b/src/www/themes/funky-wOw/Theme.class.php
index 73d7f75..865697e 100644
--- a/src/www/themes/funky-wOw/Theme.class.php
+++ b/src/www/themes/funky-wOw/Theme.class.php
@@ -125,8 +125,8 @@ class Theme extends Layout {
 		if ($id) {
 			$id = $this->toSlug($id);
 			$idid = $id;
-			$idtitle = $id.'-title"';
-			$idtcont = $id.'-title-content"';
+			$idtitle = $id.'-title';
+			$idtcont = $id.'-title-content';
 		} else {
 			$idid = "";
 			$idtitle = "";
diff --git a/src/www/themes/funky/Theme.class.php b/src/www/themes/funky/Theme.class.php
index c32eb8c..e41a065 100644
--- a/src/www/themes/funky/Theme.class.php
+++ b/src/www/themes/funky/Theme.class.php
@@ -124,12 +124,12 @@ class Theme extends Layout {
 		if ($id) {
 			$id = $this->toSlug($id);
 			$idid = $id;
-			$idtitle = $id.'-title"';
-			$idtcont = $id.'-title-content"';
+			$idtitle = $id.'-title';
+			$idtcont = $id.'-title-content';
 		} else {
-			$idid = "";
-			$idtitle = "";
-			$idtcont = "";
+			$idid = '';
+			$idtitle = '';
+			$idtcont = '';
 		}
 
 		$t_result = '';

commit 00a28ec427efd99289ff9dfdd64ca71edbd7c97d
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Jun 20 14:29:17 2014 +0200

    implement [#692]: FRS reorganise code

diff --git a/src/CHANGES b/src/CHANGES
index 1c4eba6..0144109 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -1,6 +1,7 @@
 Fusionforge-X.X:
 * [#658] Docman: Basic Webdav write mkcol, delete, put, move support (TrivialDev)
 * [#657] Docman: Add move mass actions (TrivialDev)
+* [#692] FRS: Reorganise code (TrivialDev)
 * [#656] General: drop tipsy plugin, use standard jQuery UI tooltip already provided (TrivialDev)
 * [#663] General: FusionForge Theme & jQuery UI theme sync (TrivialDev)
 * [#664] General: Update the jQuery & jQuery UI frameworks (TrivialDev)
diff --git a/src/common/frs/FRSFile.class.php b/src/common/frs/FRSFile.class.php
index 95fe16d..c51bba4 100644
--- a/src/common/frs/FRSFile.class.php
+++ b/src/common/frs/FRSFile.class.php
@@ -4,7 +4,7 @@
  *
  * Copyright 2002, Tim Perdue/GForge, LLC
  * Copyright 2009, Roland Mas
- * Copyright 2012-2013, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
  * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -38,7 +38,7 @@ function &frsfile_get_object($file_id, $data=false) {
 		if ($data) {
 					//the db result handle was passed in
 		} else {
-			$res = db_query_params ('SELECT * FROM frs_file WHERE file_id=$1',
+			$res = db_query_params ('SELECT * FROM frs_file_vw WHERE file_id=$1',
 						array ($file_id)) ;
 			if (db_numrows($res)<1 ) {
 				$FRSFILE_OBJ['_'.$file_id.'_']=false;
@@ -156,7 +156,7 @@ class FRSFile extends Error {
 		if (!is_dir($path_name)) {
 			mkdir($path_name, 0755, true);
 		} else {
-			if ( fileperms($path_name) != 0x4755 ) {
+			if (fileperms($path_name) != 0x4755) {
 				chmod($path_name, 0755);
 			}
 		}
@@ -164,7 +164,7 @@ class FRSFile extends Error {
 		if (!is_dir($path_name)) {
 			mkdir($path_name, 0755);
 		} else {
-			if ( fileperms($path_name) != 0x4755 ) {
+			if (fileperms($path_name) != 0x4755) {
 				chmod($path_name, 0755);
 			}
 		}
@@ -172,7 +172,7 @@ class FRSFile extends Error {
 		if (!is_dir($path_name)) {
 			mkdir($path_name, 0755);
 		} else {
-			if ( fileperms($path_name) != 0x4755 ) {
+			if (fileperms($path_name) != 0x4755) {
 				chmod($path_name, 0755);
 			}
 		}
@@ -189,9 +189,9 @@ class FRSFile extends Error {
 		}
 
 		if (!$release_time) {
-			$release_time=time();
+			$release_time = time();
 		}
-		$file_size=filesize("$newfilelocation$name");
+		$file_size = filesize("$newfilelocation$name");
 
 		db_begin();
 		$result = db_query_params('INSERT INTO frs_file(release_id,filename,release_time,type_id,processor_id,file_size,post_date) VALUES ($1,$2,$3,$4,$5,$6,$7)',
@@ -207,7 +207,7 @@ class FRSFile extends Error {
 			db_rollback();
 			return false;
 		}
-		$this->file_id=db_insertid($result,'frs_file','file_id');
+		$this->file_id = db_insertid($result,'frs_file','file_id');
 		if (!$this->fetchData($this->file_id)) {
 			db_rollback();
 			return false;
@@ -348,23 +348,23 @@ class FRSFile extends Error {
 			return false;
 		}
 
-		$file=forge_get_config('upload_dir').'/'.
-			$this->FRSRelease->FRSPackage->Group->getUnixName() . '/' .
+		$file = forge_get_config('upload_dir').'/'.
+			$this->FRSRelease->FRSPackage->Group->getUnixName().'/'.
 			$this->FRSRelease->FRSPackage->getFileName().'/'.
 			$this->FRSRelease->getFileName().'/'.
 			$this->getName();
 			if (file_exists($file))
 				unlink($file);
-		$result = db_query_params ('DELETE FROM frs_file WHERE file_id=$1',
-					   array ($this->getID())) ;
+		$result = db_query_params('DELETE FROM frs_file WHERE file_id=$1',
+					   array($this->getID()));
 		if (!$result || db_affected_rows($result) < 1) {
 			$this->setError("frsDeleteFile()::2 ".db_error());
 			return false;
 		} else {
-			db_query_params ('DELETE FROM frs_dlstats_file WHERE file_id=$1',
-						array ($this->getID())) ;
-			db_query_params ('DELETE FROM frs_dlstats_filetotal_agg WHERE file_id=$1',
-						array ($this->getID())) ;
+			db_query_params('DELETE FROM frs_dlstats_file WHERE file_id=$1',
+						array ($this->getID()));
+			db_query_params('DELETE FROM frs_dlstats_filetotal_agg WHERE file_id=$1',
+						array ($this->getID()));
 			$this->FRSRelease->FRSPackage->createNewestReleaseFilesAsZip();
 			return true;
 		}
@@ -405,12 +405,12 @@ class FRSFile extends Error {
 
 		// Update database
 		db_begin();
-		$res = db_query_params ('UPDATE frs_file SET type_id=$1,processor_id=$2,release_time=$3,release_id=$4 WHERE file_id=$5',
-					array ($type_id,
-					       $processor_id,
-					       $release_time,
-					       $release_id,
-					       $this->getID())) ;
+		$res = db_query_params('UPDATE frs_file SET type_id=$1,processor_id=$2,release_time=$3,release_id=$4 WHERE file_id=$5',
+					array($type_id,
+						$processor_id,
+						$release_time,
+						$release_id,
+						$this->getID()));
 
 		if (!$res || db_affected_rows($res) < 1) {
 			$this->setError(sprintf(_('Error On Update: %s'), db_error()));
diff --git a/src/common/frs/actions/addfile.php b/src/common/frs/actions/addfile.php
new file mode 100644
index 0000000..f1ca5ab
--- /dev/null
+++ b/src/common/frs/actions/addfile.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * FusionForge FRS: Add file Action
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $warning_msg; // warning message
+global $feedback; // feedback message
+global $error_msg; // error message
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$warning_msg = _('FRS Action Denied.');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+$package_id = getIntFromRequest('package_id');
+$release_id = getIntFromRequest('release_id');
+$userfile = getUploadedFile('userfile');
+$userfile_name = $userfile['name'];
+$type_id = getIntFromRequest('type_id');
+$release_date = getStringFromRequest('release_date');
+// Build a Unix time value from the supplied Y-m-d value
+$release_date = strtotime($release_date);
+$processor_id = getIntFromRequest('processor_id');
+$group_unix_name=group_getunixname($group_id);
+$ftp_filename = getStringFromRequest('ftp_filename');
+$manual_filename = getStringFromRequest('manual_filename');
+$docman_fileid = getIntFromRequest('docman_fileid');
+
+$frsp = new FRSPackage($g, $package_id);
+if (!$frsp || !is_object($frsp)) {
+	exit_error(_('Could Not Get FRS Package'), 'frs');
+} elseif ($frsp->isError()) {
+	exit_error($frsp->getErrorMessage(), 'frs');
+}
+
+$frsr = new FRSRelease($frsp,$release_id);
+if (!$frsr || !is_object($frsr)) {
+	exit_error(_('Could Not Get FRS Release'), 'frs');
+} elseif ($frsr->isError()) {
+	exit_error($frsr->getErrorMessage(), 'frs');
+}
+
+$ret = frs_add_file_from_form($frsr, $type_id, $processor_id, $release_date, $userfile, $ftp_filename, $manual_filename, $docman_fileid);
+
+if ($ret === true) {
+	$feedback = _('File Released');
+} else {
+	$error_msg = $ret;
+}
+
+session_redirect('/frs/?group_id='.$group_id.'&view=editrelease&release_id='.$release_id.'&package_id='.$package_id);
diff --git a/src/common/frs/actions/addpackage.php b/src/common/frs/actions/addpackage.php
new file mode 100644
index 0000000..dd2ab3c
--- /dev/null
+++ b/src/common/frs/actions/addpackage.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * FusionForge FRS: Add package Action
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $warning_msg; // warning message
+global $feedback; // feedback message
+global $error_msg; // error message
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$warning_msg = _('FRS Action Denied.');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+$package_name = htmlspecialchars(trim(getStringFromRequest('package_name')));
+
+if ($package_name) {
+	//create a new package
+	$frsp = new FRSPackage($g);
+	if (!$frsp || !is_object($frsp)) {
+		exit_error(_('Could Not Get FRS Package'), 'frs');
+	} elseif ($frsp->isError()) {
+		exit_error($frsp->getErrorMessage(), 'frs');
+	}
+	if (!$frsp->create($package_name, $is_public)) {
+		$error_msg = $frsp->getErrorMessage();
+	} else {
+		$feedback .= _('Added Package');
+	}
+} else {
+	$error_msg = _('Missing package_name');
+}
+session_redirect('/frs/?group_id='.$group_id);
diff --git a/src/common/frs/actions/addrelease.php b/src/common/frs/actions/addrelease.php
new file mode 100644
index 0000000..00f843e
--- /dev/null
+++ b/src/common/frs/actions/addrelease.php
@@ -0,0 +1,133 @@
+<?php
+/**
+ * FusionForge FRS: Add release Action
+ *
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $warning_msg; // warning message
+global $feedback; // feedback message
+global $error_msg; // error message
+
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$warning_msg = _('FRS Action Denied.');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+$package_id = getIntFromRequest('package_id');
+if (!$package_id) {
+	$error_msg = _('Missing package_id');
+	session_redirect('/frs/?group_id='.$group_id.'&view=admin');
+}
+
+$frsp = new FRSPackage($g, $package_id);
+if (!$frsp || !is_object($frsp)) {
+	$error_msg = _('Could Not Get FRS Package');
+	session_redirect('/frs/?group_id='.$group_id.'&view=admin');
+} elseif ($frsp->isError()) {
+	$error_msg = $frsp->getErrorMessage();
+	session_redirect('/frs/?group_id='.$group_id.'&view=admin');
+}
+
+$userfile = getUploadedFile('userfile');
+$userfile_name = $userfile['name'];
+$type_id = getIntFromRequest('type_id');
+$release_name = getStringFromRequest('release_name');
+$uploaded_notes = getUploadedFile('uploaded_notes');
+$uploaded_changes = getUploadedFile('uploaded_changes');
+$release_notes = getStringFromRequest('release_notes');
+$release_changes = getStringFromRequest('release_changes');
+$preformatted = getStringFromRequest('preformatted');
+$release_date = getStringFromRequest('release_date');
+// Build a Unix time value from the supplied Y-m-d value
+$release_date = strtotime($release_date);
+$processor_id = getIntFromRequest('processor_id');
+$ftp_filename = getStringFromRequest('ftp_filename');
+$manual_filename = getStringFromRequest('manual_filename');
+$docman_fileid = getIntFromRequest('docman_fileid');
+$exec_changes = true;
+
+if (strlen($release_name) >= 3) {
+	// Check for uploaded release notes
+	if ($uploaded_notes['tmp_name']) {
+		if (!is_uploaded_file($uploaded_notes['tmp_name'])) {
+			$error_msg = _('Attempted File Upload Attack');
+			session_redirect('/frs/?group_id='.$group_id);
+		}
+		if ($uploaded_notes['type'] !== 'text/plain') {
+			$error_msg .= _('Release Notes Are not in Text').'<br />';
+			$exec_changes = false;
+		} else {
+			$notes = fread(fopen($uploaded_notes['tmp_name'], 'r'), $uploaded_notes['size']);
+		}
+	} else {
+		$notes = $release_notes;
+	}
+
+	if (strlen($notes) < 20) {
+		$error_msg .= _('Release Notes Are Too Small').'<br />';
+		$exec_changes = false;
+	}
+
+	// Check for uploaded change logs
+	if ($uploaded_changes['tmp_name']) {
+		if (!is_uploaded_file($uploaded_changes['tmp_name'])) {
+			$error_msg = _('Attempted File Upload Attack');
+			session_redirect('/frs/?group_id='.$group_id);
+		}
+		if ($uploaded_changes['type'] !== 'text/plain') {
+			$error_msg .= _('Change Log Is not in Text').'<br />';
+			$exec_changes = false;
+		} else {
+			$changes = fread(fopen($uploaded_changes['tmp_name'], 'r'), $uploaded_changes['size']);
+		}
+	} else {
+		$changes = $release_changes;
+	}
+
+	if (strlen($changes) < 20) {
+		$error_msg .= _('Change Log Is Too Small');
+		$exec_changes = false;
+	}
+	if ($exec_changes) {
+		$frsr = new FRSRelease($frsp);
+		if ($frsr->create($release_name, $notes, $changes, $preformatted, $release_date)) {
+			$feedback = _('Release successfully created');
+			if (strlen($userfile_name) || strlen($ftp_filename) || strlen($manual_filename) || $docman_fileid) {
+				$ret = frs_add_file_from_form($frsr, $type_id, $processor_id, $release_date, $userfile, $ftp_filename, $manual_filename, $docman_fileid);
+				if ($ret === true) {
+					$feedback .= _(' and file successfully added to the release.');
+				} else {
+					$error_msg = $ret;
+				}
+			}
+			session_redirect('/frs/?group_id='.$group_id.'&view=showreleases&package_id='.$package_id);
+		} else {
+			$error_msg = $frsr->getErrorMessage();
+		}
+	}
+} else {
+	$error_msg = _('Missing release_name or too short release_name, at least 3 characters.');
+}
+session_redirect('/frs/?group_id='.$group_id.'&view=admin');
diff --git a/src/common/frs/actions/deletefile.php b/src/common/frs/actions/deletefile.php
new file mode 100644
index 0000000..765c968
--- /dev/null
+++ b/src/common/frs/actions/deletefile.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * FusionForge FRS: Add release Action
+ *
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $HTML;
+
+$sysdebug_enable = false;
+$result = array();
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$result['html'] = $HTML->warning_msg(_('FRS Action Denied.'));
+	echo json_encode($result);
+	exit;
+}
+
+$file_id = getIntFromRequest('file_id');
+$result['html'] = $HTML->error_msg(_('Missing file_id'));
+
+if ($file_id) {
+	$frsf = frsfile_get_object($file_id);
+		if (!$frsf || !is_object($frsf)) {
+		$result['html'] = $HTML->error_msg(_('Error Getting FRSPackage'));
+		echo json_encode($result);
+		exit;
+	} elseif ($frsf->isError()) {
+		$result['html'] = $HTML->error_msg($frsf->getErrorMessage());
+		echo json_encode($result);
+		exit;
+	}
+	if (!$frsf->delete()) {
+		$result['html'] = $HTML->error_msg($frsf->getErrorMessage());
+		echo json_encode($result);
+		exit;
+	}
+	$result['html'] = $HTML->feedback(_('File successfully deleted.'));
+	$result['deletedom'] = 'fileid'.$file_id;
+}
+
+echo json_encode($result);
+exit;
diff --git a/src/common/frs/actions/deletepackage.php b/src/common/frs/actions/deletepackage.php
new file mode 100644
index 0000000..0bba704
--- /dev/null
+++ b/src/common/frs/actions/deletepackage.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * FusionForge FRS: Delete Package Action
+ *
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $HTML;
+
+$sysdebug_enable = false;
+$result = array();
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$result['html'] = $HTML->warning_msg(_('FRS Action Denied.'));
+	echo json_encode($result);
+	exit;
+}
+
+$package_id = getIntFromRequest('package_id');
+$result['html'] = $HTML->error_msg(_('Missing package_id'));
+
+if ($package_id) {
+	$frsp = new FRSPackage($g, $package_id);
+	if (!$frsp || !is_object($frsp)) {
+		$result['html'] = $HTML->error_msg(_('Error Getting FRSPackage'));
+		echo json_encode($result);
+		exit;
+	} elseif ($frsp->isError()) {
+		$result['html'] = $HTML->error_msg($frsp->getErrorMessage());
+		echo json_encode($result);
+		exit;
+	}
+	$sure = getIntFromRequest('sure');
+	$really_sure = getIntFromRequest('really_sure');
+	if (!$frsp->delete($sure, $really_sure)) {
+		$result['html'] = $HTML->error_msg($frsp->getErrorMessage());
+		echo json_encode($result);
+		exit;
+	}
+	$result['html'] = $HTML->feedback(_('Pacakge successfully deleted'));
+	$result['deletedom'] = 'pkgid'.$package_id;
+}
+
+echo json_encode($result);
+exit;
diff --git a/src/common/frs/actions/deleterelease.php b/src/common/frs/actions/deleterelease.php
new file mode 100644
index 0000000..5336451
--- /dev/null
+++ b/src/common/frs/actions/deleterelease.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * FusionForge FRS: Add release Action
+ *
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+ /* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $HTML;
+
+$sysdebug_enable = false;
+$result = array();
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$result['html'] = $HTML->warning(_('FRS Action Denied.'));
+	echo json_encode($result);
+	exit;
+}
+
+echo json_encode($result);
+exit;
diff --git a/src/common/frs/actions/editfile.php b/src/common/frs/actions/editfile.php
new file mode 100644
index 0000000..dfc218f
--- /dev/null
+++ b/src/common/frs/actions/editfile.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Project Admin: Edit File of Release
+ *
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+ /* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $warning_msg; // warning message
+global $feedback; // feedback message
+global $error_msg; // error message
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$warning_msg = _('FRS Action Denied.');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+$file_id = getIntFromRequest('file_id');
+$processor_id = getIntFromRequest('processor_id');
+$type_id = getIntFromRequest('type_id');
+$new_release_id = getIntFromRequest('new_release_id');
+$release_time = getStringFromRequest('release_time');
+$group_id = getIntFromRequest('group_id');
+$release_id = getIntFromRequest('release_id');
+$package_id = getIntFromRequest('package_id');
+$im_sure = getStringFromRequest('im_sure');
+
+$frsf = frsfile_get_object($file_id);
+if (!$frsf || !is_object($frsf)) {
+	exit_error(_('Could Not Get FRSFile'),'frs');
+} elseif ($frsf->isError()) {
+	exit_error($frsf->getErrorMessage(),'frs');
+} else {
+	//$date_list = split('[- :]',$release_time,5);
+	//$release_time = mktime($date_list[3],$date_list[4],0,$date_list[1],$date_list[2],$date_list[0]);
+	$release_time = strtotime($release_time);
+	if (!$frsf->update($type_id,$processor_id,$release_time,$new_release_id)) {
+		$error_msg = $frsf->getErrorMessage();
+	} else {
+		$feedback .= _('File Updated');
+	}
+}
+
+session_redirect('/frs/?group_id='.$group_id.'&view=editrelease&package_id='.$package_id.'&release_id='.$release_id);
diff --git a/src/common/frs/actions/editrelease.php b/src/common/frs/actions/editrelease.php
new file mode 100644
index 0000000..06d0493
--- /dev/null
+++ b/src/common/frs/actions/editrelease.php
@@ -0,0 +1,124 @@
+<?php
+/**
+ * Project Admin: Edit Releases of Packages
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+ /* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $warning_msg; // warning message
+global $feedback; // feedback message
+global $error_msg; // error message
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$warning_msg = _('FRS Action Denied.');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+$package_id = getIntFromRequest('package_id');
+$release_id = getIntFromRequest('release_id');
+$release_date = getStringFromRequest('release_date');
+$release_name = getStringFromRequest('release_name');
+$status_id = getIntFromRequest('status_id');
+$uploaded_notes = getUploadedFile('uploaded_notes');
+$uploaded_changes = getUploadedFile('uploaded_changes');
+$release_notes = getStringFromRequest('release_notes');
+$release_changes = getStringFromRequest('release_changes');
+$preformatted = getStringFromRequest('preformatted');
+$exec_changes = true;
+
+//
+//  Get the package
+//
+$frsp = new FRSPackage($g, $package_id);
+if (!$frsp || !is_object($frsp)) {
+	exit_error(_('Could Not Get FRS Package'), 'frs');
+} elseif ($frsp->isError()) {
+	exit_error($frsp->getErrorMessage(), 'frs');
+}
+
+//
+//  Get the release
+//
+$frsr = new FRSRelease($frsp,$release_id);
+if (!$frsr || !is_object($frsr)) {
+	exit_error(_('Could Not Get FRS Release'), 'frs');
+} elseif ($frsr->isError()) {
+	exit_error($frsr->getErrorMessage(), 'frs');
+}
+
+// Check for uploaded release notes
+if ($uploaded_notes['tmp_name']) {
+	if (!is_uploaded_file($uploaded_notes['tmp_name'])) {
+		$error_msg = _('Attempted File Upload Attack');
+		session_redirect('/frs/?group_id='.$group_id);
+	}
+	if ($uploaded_notes['type'] !== 'text/plain') {
+		$error_msg .= _('Release Notes Are not in Text').'<br />';
+		$exec_changes = false;
+	} else {
+		$notes = fread(fopen($uploaded_notes['tmp_name'], 'r'), $uploaded_notes['size']);
+	}
+} else {
+	$notes = $release_notes;
+}
+
+if (strlen($notes) < 20) {
+	$error_msg .= _('Release Notes Are Too Small').'<br />';
+	$exec_changes = false;
+}
+
+// Check for uploaded change logs
+if ($uploaded_changes['tmp_name']) {
+	if (!is_uploaded_file($uploaded_changes['tmp_name'])) {
+		$error_msg = _('Attempted File Upload Attack');
+		session_redirect('/frs/?group_id='.$group_id);
+	}
+	if ($uploaded_changes['type'] !== 'text/plain') {
+		$error_msg .= _('Change Log Is not in Text').'<br />';
+		$exec_changes = false;
+	} else {
+		$changes = fread(fopen($uploaded_changes['tmp_name'], 'r'), $uploaded_changes['size']);
+	}
+} else {
+	$changes = $release_changes;
+}
+
+if (strlen($changes) < 20) {
+	$error_msg .= _('Change Log Is Too Small').'<br />';
+	$exec_changes = false;
+}
+
+// If we haven't encountered any problems so far then save the changes
+if ($exec_changes == true) {
+	$release_date = strtotime($release_date);
+	if (!$frsr->update($status_id, $release_name, $notes, $changes, $preformatted, $release_date)) {
+		$error_msg = $frsr->getErrorMessage();
+	} else {
+		$feedback = _('Release edited successfully');
+	}
+}
+
+session_redirect('/frs/?group_id='.$group_id.'&view=editrelease&release_id='.$release_id.'&package_id='.$package_id);
+
diff --git a/src/common/frs/actions/monitor.php b/src/common/frs/actions/monitor.php
new file mode 100644
index 0000000..abf33af
--- /dev/null
+++ b/src/common/frs/actions/monitor.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * FusionForge FRS: Monitor Action
+ *
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $HTML;
+
+$sysdebug_enable = false;
+
+$result = array();
+if (!forge_check_perm('frs', $group_id, 'read_public')) {
+	$result['html'] = $HTML->warning_msg(_('FRS Action Denied.'));
+	echo json_encode($result);
+	exit;
+}
+
+$package_id = getIntFromRequest('package_id');
+
+if ($package_id) {
+	$frsp = new FRSPackage($g, $package_id);
+	if (!$frsp || !is_object($frsp)) {
+		$result['html'] = $HTML->error_msg(_('Error Getting FRSPackage'));
+		echo json_encode($result);
+		exit;
+	} elseif ($frsp->isError()) {
+		$result['html'] = $HTML->error_msg($frsp->getErrorMessage());
+		echo json_encode($result);
+		exit;
+	}
+	$monitorStatus = getIntFromRequest('status');
+	$url = '/frs/?group_id='.$frsp->Group->getID().'&package_id='.$package_id.'&action=monitor';
+	if ($monitorStatus) {
+		if ($frsp->setMonitor()) {
+			$url .= '&status=0';
+			$result['html'] = $HTML->feedback(_('Monitoring started successfuly'));
+			$result['action'] = 'javascript:controllerFRS.doAction({action:\''.$url.'\', id:\'pkgid'.$package_id.'\'})';
+			$result['property'] = 'onclick';
+			$result['img'] = $HTML->getStopMonitoringPic($frsp->getName().' - '._('Stop monitoring this package'));
+			echo json_encode($result);
+			exit;
+		}
+	} else {
+		if ($frsp->stopMonitor()) {
+			$url .= '&status=1';
+			$result['html'] = $HTML->feedback(_('Monitoring stopped successfuly'));
+			$result['action'] = 'javascript:controllerFRS.doAction({action:\''.$url.'\', id:\'pkgid'.$package_id.'\'})';
+			$result['property'] = 'onclick';
+			$result['img'] = $HTML->getStartMonitoringPic($frsp->getName().' - '._('Start monitoring this package'));
+			echo json_encode($result);
+			exit;
+		}
+	}
+}
+$result['html'] = $HTML->error_msg(_('Missing package_id'));
+echo json_encode($result);
+exit;
diff --git a/src/common/frs/actions/updatepackage.php b/src/common/frs/actions/updatepackage.php
new file mode 100644
index 0000000..24f9bb1
--- /dev/null
+++ b/src/common/frs/actions/updatepackage.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * FusionForge FRS: Edit Releases of Packages Action
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+ /* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $g; // group object
+global $feedback; // feedback message
+global $error_msg; // error message
+
+if (!forge_check_perm('frs', $group_id, 'write')) {
+	$warning_msg = _('FRS Action Denied.');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+$package_id = getIntFromRequest('package_id');
+$package_name = htmlspecialchars(trim(getStringFromRequest('package_name')));
+$is_public = getIntFromRequest('is_public');
+$status_id = getIntFromRequest('status_id');
+
+if ($package_id && $package_name) {
+	$frsp = new FRSPackage($g, $package_id);
+	if (!$frsp || !is_object($frsp)) {
+		exit_error(_('Could Not Get FRS Package'), 'frs');
+	} elseif ($frsp->isError()) {
+		exit_error($frsp->getErrorMessage(), 'frs');
+	}
+	if (!$frsp->update($package_name, $status_id, $is_public)) {
+		$error_msg = $frsp->getErrorMessage();
+	} else {
+		$feedback = _('Updated Package');
+	}
+} else {
+	$error_msg = _('Missing package_id or package_name');
+}
+session_redirect('/frs/?group_id='.$group_id.'&view=admin');
diff --git a/src/common/frs/include/frs_utils.php b/src/common/frs/include/frs_utils.php
index fc82643..5bf105f 100644
--- a/src/common/frs/include/frs_utils.php
+++ b/src/common/frs/include/frs_utils.php
@@ -25,222 +25,158 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-/*
-	Standard header to be used on all /project/admin/* pages
-*/
-
-function frs_admin_header($params) {
-	global $group_id;
-
-	/*
-		Are they logged in?
-	*/
-	if (!session_loggedin()) {
-		exit_not_logged_in();
-	}
-
-	$project = group_get_object($group_id);
-	if (!$project || !is_object($project)) {
-		return;
-	}
-
-	session_require_perm('frs', $group_id, 'write');
-
-	frs_header($params);
-}
-
-function frs_admin_footer() {
-	site_project_footer();
-}
-
-function frs_header($params) {
-	global $group_id,$HTML;
-
-	/*
-		Does this site use FRS?
-	*/
-	if (!forge_get_config('use_frs')) {
-		exit_disabled('home');
-	}
-
-	$project = group_get_object($group_id);
-	if (!$project || !is_object($project)) {
-		exit_no_group();
-	}
-
-	$params['toptab'] = 'frs';
-	$params['group'] = $group_id;
-
-	if (forge_check_perm('frs', $group_id, 'write')) {
-		$params['submenu'] = $HTML->subMenu(
-			array(
-				_('View File Releases'),
-				_('Reporting'),
-				_('Administration')
-				),
-			array(
-				'/frs/?group_id='.$group_id,
-				'/frs/reporting/downloads.php?group_id='.$group_id,
-				'/frs/admin/?group_id='.$group_id
-				),
-			array(
-				NULL,
-				NULL,
-				NULL
-				)
-			);
-	}
-	site_project_header($params);
-}
-
-function frs_footer() {
-	site_project_footer();
-}
-
-/*
-	The following functions are for the FRS (File Release System)
-*/
-
-/*
-	pop-up box of public / private frs statuses
-*/
-
-function frs_show_public_popup($name='is_public', $checked_val="xzxz") {
-	/*
-		return a pop-up select box of statuses
-	*/
+/**
+ * frs_show_public_popup - pop-up select box of public / private frs statuses
+ *
+ * @param	string	$name		default value 'is_public'
+ * @param	string	$checked_val	default value 'xzxz'
+ * @return	string	html code
+ */
+function frs_show_public_popup($name = 'is_public', $checked_val = 'xzxz') {
 	$FRS_PUBLIC_RES = array('private', 'public');
 	return html_build_select_box_from_array($FRS_PUBLIC_RES, $name, $checked_val, false);
 }
 
-/*
-	pop-up box of supported frs statuses
-*/
-
-function frs_show_status_popup($name='status_id', $checked_val="xzxz") {
-	/*
-		return a pop-up select box of statuses
-	*/
+/**
+ * frs_show_status_popup - pop-up select box of supported frs statuses
+ *
+ * @param	string	$name		default value 'status_id'
+ * @param	string	$checked_val	default value 'xzxz'
+ * @return	string	html code
+ */
+function frs_show_status_popup($name = 'status_id', $checked_val = 'xzxz') {
 	global $FRS_STATUS_RES;
 	if (!isset($FRS_STATUS_RES)) {
-		$FRS_STATUS_RES=db_query_params('SELECT * FROM frs_status',
-			array());
+		$FRS_STATUS_RES = db_query_params('SELECT * FROM frs_status', array());
 	}
 	return html_build_select_box($FRS_STATUS_RES, $name, $checked_val, false);
 }
 
-/*
-	pop-up box of supported frs filetypes
-*/
-
-function frs_show_filetype_popup ($name='type_id', $checked_val="xzxz") {
-	/*
-		return a pop-up select box of the available filetypes
-	*/
+/**
+ * frs_show_filetype_popup - pop-up select box of supported frs filetypes
+ *
+ * @param	string	$name		default value 'type_id'
+ * @param	string	$checked_val	default value 'xzxz'
+ * @return	string	html code
+ */
+function frs_show_filetype_popup ($name = 'type_id', $checked_val = 'xzxz') {
 	global $FRS_FILETYPE_RES;
 	if (!isset($FRS_FILETYPE_RES)) {
-		$FRS_FILETYPE_RES=db_query_params('SELECT * FROM frs_filetype ORDER BY type_id',
-			array());
+		$FRS_FILETYPE_RES = db_query_params('SELECT * FROM frs_filetype ORDER BY type_id', array());
 	}
 	return html_build_select_box($FRS_FILETYPE_RES, $name, $checked_val, false);
 }
 
-/*
-	pop-up box of supported frs processor options
-*/
-
-function frs_show_processor_popup($name='processor_id', $checked_val="xzxz") {
-	/*
-		return a pop-up select box of the available processors
-	*/
+/**
+ * frs_show_processor_popup - pop-up select box of supported frs processor options
+ *
+ * @param	string	$name		default value 'processor_id'
+ * @param	string	$checked_val	default value 'xzxz'
+ * @return	string html code
+ */
+function frs_show_processor_popup($name = 'processor_id', $checked_val = 'xzxz') {
 	global $FRS_PROCESSOR_RES;
 	if (!isset($FRS_PROCESSOR_RES)) {
-		$FRS_PROCESSOR_RES=db_query_params ('SELECT * FROM frs_processor ORDER BY processor_id',
-			array());
+		$FRS_PROCESSOR_RES = db_query_params('SELECT * FROM frs_processor ORDER BY processor_id', array());
 	}
-	return html_build_select_box ($FRS_PROCESSOR_RES, $name, $checked_val, false);
+	return html_build_select_box($FRS_PROCESSOR_RES, $name, $checked_val, false);
 }
 
-/*
-	pop-up box of packages:releases for this group
-*/
-
-function frs_show_release_popup ($group_id, $name='release_id', $checked_val="xzxz") {
-	/*
-		return a pop-up select box of releases for the project
-	*/
+/**
+ * frs_show_release_popup - pop-up select box of packages:releases for this group
+ *
+ * @param	integer	$group_id	the project id
+ * @param	string	$name		default value 'processor_id'
+ * @param	string	$checked_val	default value 'xzxz'
+ * @return	string	html code
+ */
+function frs_show_release_popup($group_id, $name = 'release_id', $checked_val = 'xzxz') {
 	global $FRS_RELEASE_RES;
 
 	if (!$group_id) {
 		return _('Error: group id required');
 	}
 	if (!isset($FRS_RELEASE_RES)) {
-		$FRS_RELEASE_RES = db_query_params("SELECT frs_release.release_id,(frs_package.name || ' : ' || frs_release.name) FROM frs_release,frs_package
-WHERE frs_package.group_id=$1
-AND frs_release.package_id=frs_package.package_id",
-						   array($group_id));
+		$FRS_RELEASE_RES = db_query_params("SELECT frs_release.release_id,(frs_package.name || ' : ' || frs_release.name) FROM frs_release, frs_package
+							WHERE frs_package.group_id = $1
+							AND frs_release.package_id = frs_package.package_id",
+							array($group_id));
 		echo db_error();
 	}
-	return html_build_select_box($FRS_RELEASE_RES,$name,$checked_val,false);
+	return html_build_select_box($FRS_RELEASE_RES, $name, $checked_val, false);
 }
 
-/*
-	pop-up box of packages for this group
-*/
-
-function frs_show_package_popup ($group_id, $name='package_id', $checked_val="xzxz") {
-	/*
-		return a pop-up select box of packages for this project
-	*/
+/**
+ * frs_show_package_popup - pop-up select box of packages for this group
+ *
+ * @param	integer	$group_id	the project id
+ * @param	string	$name		default value 'processor_id'
+ * @param	string	$checked_val	default value 'xzxz'
+ * @return	string	html code
+ */
+function frs_show_package_popup($group_id, $name = 'package_id', $checked_val = 'xzxz') {
 	global $FRS_PACKAGE_RES;
 	if (!$group_id) {
 		return _('Error: group id required');
 	}
 	if (!isset($FRS_PACKAGE_RES)) {
-		$FRS_PACKAGE_RES=db_query_params ('SELECT package_id,name
-			FROM frs_package WHERE group_id=$1',
-		array($group_id));
+		$FRS_PACKAGE_RES=db_query_params('SELECT package_id,name
+						FROM frs_package WHERE group_id = $1',
+						array($group_id));
 		echo db_error();
 	}
-	return html_build_select_box ($FRS_PACKAGE_RES,$name,$checked_val,false);
+	return html_build_select_box($FRS_PACKAGE_RES, $name, $checked_val, false);
 }
 
-function frs_add_file_from_form ($release, $type_id, $processor_id, $release_date,
+/**
+ * frs_add_file_from_form - helper to add a file from the qrs form which allows multiple possibilities to add a file.
+ *
+ * @param	object		$release		the release object to which the file belongs
+ * @param	integer		$type_id		the file type
+ * @param	integer		$processor_id		the processor type
+ * @param	string		$release_date		the release date
+ * @param	array		$userfile		a new uploaded file
+ * @param	string		$ftp_filename		a already uploaded file using ftp
+ * @param	string		$manual_filename	a already uploaded file using manual upload
+ * @param	integer		$docman_fileid		a doc_id of a already uploaded file using docman
+ * @return	bool|string	true on success or string message on error
+ */
+function frs_add_file_from_form($release, $type_id, $processor_id, $release_date,
 				 $userfile, $ftp_filename, $manual_filename, $docman_fileid) {
 
 	$group_unix_name = $release->getFRSPackage()->getGroup()->getUnixName();
 	$incoming = forge_get_config('groupdir_prefix').'/'.$group_unix_name.'/incoming';
 
-	$filechecks = false ;
+	$filechecks = false;
 
 	if ($userfile && is_uploaded_file($userfile['tmp_name']) && util_is_valid_filename($userfile['name'])) {
-		$infile = $userfile['tmp_name'] ;
-		$fname = $userfile['name'] ;
-		$move = true ;
-		$filechecks = true ;
+		$infile = $userfile['tmp_name'];
+		$fname = $userfile['name'];
+		$move = true;
+		$filechecks = true;
 	} elseif ($userfile && $userfile['error'] != UPLOAD_ERR_OK && $userfile['error'] != UPLOAD_ERR_NO_FILE) {
 		switch ($userfile['error']) {
 			case UPLOAD_ERR_INI_SIZE:
 			case UPLOAD_ERR_FORM_SIZE:
-				return _('The uploaded file exceeds the maximum file size. Contact to the site admin to upload this big file, or use an alternate upload method (if available).') ;
+				return _('The uploaded file exceeds the maximum file size. Contact to the site admin to upload this big file, or use an alternate upload method (if available).');
 			break;
 			case UPLOAD_ERR_PARTIAL:
-				return _('The uploaded file was only partially uploaded.') ;
+				return _('The uploaded file was only partially uploaded.');
 			break;
 			default:
-				return _('Unknown file upload error.') ;
+				return _('Unknown file upload error.');
 			break;
 		}
 	} elseif (forge_get_config('use_ftp_uploads') && $ftp_filename && util_is_valid_filename($ftp_filename) && is_file($upload_dir.'/'.$ftp_filename)) {
 		$infile = $upload_dir.'/'.$ftp_filename;
-		$fname = $ftp_filename ;
-		$move = false ;
-		$filechecks = true ;
+		$fname = $ftp_filename;
+		$move = false;
+		$filechecks = true;
 	} elseif (forge_get_config('use_manual_uploads') && $manual_filename && util_is_valid_filename($manual_filename) && is_file($incoming.'/'.$manual_filename)) {
-		$infile = $incoming.'/'.$manual_filename ;
-		$fname = $manual_filename ;
-		$move = false ;
-		$filechecks = true ;
+		$infile = $incoming.'/'.$manual_filename;
+		$fname = $manual_filename;
+		$move = false;
+		$filechecks = true;
 	} elseif ($release->getFRSPackage()->getGroup()->usesDocman() && $docman_fileid) {
 		$doc = new Document($release->getFRSPackage()->getGroup(), $docman_fileid);
 		$fname = $doc->getFilename();
@@ -248,16 +184,16 @@ function frs_add_file_from_form ($release, $type_id, $processor_id, $release_dat
 		$move = false;
 		$filechecks = true;
 	} elseif ($userfile && $userfile['error'] == UPLOAD_ERR_NO_FILE) {
-		return _('Must select a file.') ;
+		return _('Must select a file.');
 	}
 
 	if ($filechecks) {
 		if (strlen($fname) < 3)
 			return _('Name is too short. It must be at least 3 characters.');
 		if (!$move) {
-			$tmp = tempnam ('', '') ;
-			copy ($infile, $tmp) ;
-			$infile = $tmp ;
+			$tmp = tempnam('', '');
+			copy($infile, $tmp);
+			$infile = $tmp;
 		}
 		$frsf = new FRSFile($release);
 		if (!$frsf || !is_object($frsf)) {
@@ -268,14 +204,19 @@ function frs_add_file_from_form ($release, $type_id, $processor_id, $release_dat
 			if (!$frsf->create($fname,$infile,$type_id,$processor_id,$release_date)) {
 				return $frsf->getErrorMessage();
 			}
-			return true ;
+			return true;
 		}
 	} else {
-		return _('Unknown file upload error.') ;
+		return _('Unknown file upload error.');
 	}
 }
 
-/* filter utils.php:&ls() output for additional constraints from FRS */
+/**
+ * frs_filterfiles - filter utils.php:&ls() output for additional constraints from FRS
+ *
+ * @param	array	$in	the output of the &ls() function from utils.php
+ * @return	array	the filtered array
+ */
 function frs_filterfiles($in) {
 	$out = array();
 	for ($i = 0; $i < count($in); $i++) {
@@ -285,8 +226,3 @@ function frs_filterfiles($in) {
 	}
 	return $out;
 }
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
diff --git a/src/common/frs/views/admin.php b/src/common/frs/views/admin.php
new file mode 100644
index 0000000..c6b20a7
--- /dev/null
+++ b/src/common/frs/views/admin.php
@@ -0,0 +1,127 @@
+<?php
+/**
+ * FusionForge FRS
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010-2011, Franck Villaume - Capgemini
+ * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $HTML; // html object
+global $group_id; // id of group
+global $g; // group object
+
+if ( !forge_check_perm('frs', $group_id, 'write')) {
+	$warning_msg = _('FRS Access Denied');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+$fpFactory = new FRSPackageFactory($g);
+if (!$fpFactory || !is_object($fpFactory)) {
+	exit_error(_('Could Not Get FRSPackageFactory'), 'frs');
+} elseif ($fpFactory->isError()) {
+	exit_error($fpFactory->getErrorMessage(), 'frs');
+}
+
+$FRSPackages = $fpFactory->getFRSs();
+
+if (count($FRSPackages) > 0) {
+	echo html_e('h2', array(), _('QRS'));
+	echo html_e('p', array(), _('Click here to ').util_make_link('/frs/?view=qrs&group_id='.$group_id, _('quick-release a file')));
+}
+
+echo html_ao('script', array('type' => 'text/javascript'));
+?>
+//<![CDATA[
+var controllerFRS;
+jQuery(document).ready(function() {
+	controllerFRS = new FRSController();
+});
+//]]>
+<?php
+echo html_ac(html_ap() - 1);
+
+echo html_ao('fieldset');
+echo html_e('legend', array(), _('Help about Packages and Releases'));
+echo html_e('h3', array(), _('Packages'));
+echo html_e('p', array(), _('You can use packages to group different file releases together, or use them however you like.'));
+echo html_e('h4', array(), _('An example of packages')._(':'));
+echo html_e('p', array(), html_e('strong', array(), 'Mysql-win').html_e('br').html_e('strong', array(), 'Mysql-unix').html_e('br').html_e('strong', array(), 'Mysql-odbc'));
+echo html_e('h4', array(), _('Your Packages')._(':'));
+echo html_ao('ol');
+echo html_e('li', array(), _('Define your packages.'));
+echo html_e('li', array(), _('Create new releases of packages.'));
+echo html_ac(html_ap() -1);
+echo html_e('h3', array(), _('Releases of Packages'));
+echo html_e('p', array(), _('A release of a package can contain multiple files.'));
+echo html_e('h4', array(), _('Examples of releases')._(':'));
+echo html_e('p', array(), html_e('strong', array(), '3.22.1').html_e('br').html_e('strong', array(), '3.22.2').html_e('br').html_e('strong', array(), '3.22.3'));
+echo html_e('p', array(), _('You can create new releases of packages by clicking on <strong>Add/Edit Releases</strong> next to your package name.'));
+echo html_ac(html_ap() -1);
+
+//Show a list of existing packages for this project so they can be edited
+if (count($FRSPackages) == 0) {
+	echo $HTML->information(_('There are no packages defined.'));
+} else {
+	$title_arr = array();
+	$title_arr[] = _('Releases');
+	$title_arr[] = _('Package name');
+	$title_arr[] = _('Status');
+	$title_arr[] = _('Publicly Viewable');
+
+	echo $HTML->openForm(array('action' => util_make_uri('/frs/?group_id='.$group_id.'&action=updatepackage'), 'method' => 'post'));
+	echo $HTML->listTableTop($title_arr);
+	foreach ($FRSPackages as $key => $FRSPackage) {
+		$cells = array();
+		$content = util_make_link('/frs/?view=qrs&package_id='.$FRSPackage->getID().'&group_id='.$group_id, '<strong>['._('Add Release').']</strong>');
+		if (count($FRSPackage->getReleases())) {
+			$content .= util_make_link('/frs/?view=showreleases&package_id='.$FRSPackage->getID().'&group_id='.$group_id, '<strong>['._('Edit Releases').']</strong>');
+		}
+		$cells[] = array($content, 'style' => 'white-space: nowrap;', 'align' => 'center');
+		$cells[][] = html_e('input', array('type' => 'hidden', 'name' => 'package_id', 'value' => $FRSPackage->getID())).html_e('input', array('type' => 'text', 'name' => 'package_name', 'value' => $FRSPackage->getName(), 'size' => 20, 'maxlength' => 60, 'required' => 'required', 'pattern' => '.{3,}', 'title' => _('At least 3 characters')));
+		$cells[][] = frs_show_status_popup('status_id', $FRSPackage->getStatus());
+		$cells[][] = frs_show_public_popup('is_public', $FRSPackage->isPublic());
+		$deleteUrlAction = util_make_uri('/frs/?action=deletepackage&package_id='.$FRSPackage->getID().'&group_id='.$group_id);
+		$cells[][] = html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => _('Update'))).util_make_link('#', $HTML->getDeletePic(_('Delete this package'), _('Delete package')), array('onclick' => 'javascript:controllerFRS.toggleConfirmBox({idconfirmbox: \'confirmbox1\', do: \''._('Delete the package').' '.$FRSPackage->getName().'\', cancel: \''._('Cancel').'\', height: 150, width: 300, action: \''.$deleteUrlAction.'\'})' ), true);
+		echo $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($key, true), 'id' => 'pkgid'.$FRSPackage->getID()), $cells);
+	}
+	echo $HTML->listTableBottom();
+	echo $HTML->closeForm();
+}
+
+echo $HTML->jQueryUIconfirmBox('confirmbox1', _('Delete package'), _('You are about to delete permanently this package. Are you sure? This action is definitive.'));
+
+/*
+	form to create a new package
+*/
+
+echo html_ao('fieldset');
+echo html_e('legend', array(), _('Create New Package'));
+echo $HTML->openForm(array('action' => util_make_uri('/frs/?group_id='.$group_id.'&action=addpackage'), 'method' => 'post'));
+echo html_e('p', array(), html_e('strong', array(), _('New Package Name')._(':')).html_e('input', array('type' => 'text', 'name' => 'package_name', 'size' => 20, 'maxlength' => 30, 'required' => 'required', 'pattern' => '.{3,}', 'title' => _('At least 3 characters'))));
+echo html_e('p', array(), html_e('strong', array(), _('Publicly Viewable')._(':')).
+			html_e('input', array('type' => 'radio', 'name' => 'is_public', 'value' => 1, 'checked' => 'checked'))._('Public').
+			html_e('input', array('type' => 'radio', 'name' => 'is_public', 'value' => 0))._('Private'));
+echo html_e('p', array(), html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => _('Create This Package'))));
+echo $HTML->closeForm();
+echo html_ac(html_ap() - 1);
diff --git a/src/common/frs/views/docmanfile.php b/src/common/frs/views/docmanfile.php
new file mode 100644
index 0000000..18b0602
--- /dev/null
+++ b/src/common/frs/views/docmanfile.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * FusionForge FRS : docman include view
+ *
+ * Copyright 2014 Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $g;
+global $content;
+
+$content .= html_e('p', array(), _('Alternatively, you can pick a file available in the Documents Management tool.'), false);
+$dm = new DocumentManager($g);
+$dgf = new DocumentGroupFactory($g);
+$content .= $dm->showSelectNestedGroups($dgf->getNested(), 'docman_fileid', true, 0, array(), true);
diff --git a/src/common/frs/views/editrelease.php b/src/common/frs/views/editrelease.php
new file mode 100644
index 0000000..4ff78b9
--- /dev/null
+++ b/src/common/frs/views/editrelease.php
@@ -0,0 +1,192 @@
+<?php
+/**
+ * Project Admin: Edit Releases of Packages
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $HTML; // html object
+global $group_id; // id of group
+global $g; // group object
+
+$package_id = getIntFromRequest('package_id');
+$release_id = getIntFromRequest('release_id');
+
+if (!$package_id || !$release_id) {
+	session_redirect('/frs/?view=admin&group_id='.$group_id);
+}
+
+session_require_perm('frs', $group_id, 'write');
+
+//
+//  Get the package
+//
+$frsp = new FRSPackage($g, $package_id);
+if (!$frsp || !is_object($frsp)) {
+	exit_error(_('Could Not Get FRS Package'),'frs');
+} elseif ($frsp->isError()) {
+	exit_error($frsp->getErrorMessage(),'frs');
+}
+
+//
+//  Get the release
+//
+$frsr = new FRSRelease($frsp,$release_id);
+if (!$frsr || !is_object($frsr)) {
+	exit_error(_('Could Not Get FRS Release'),'frs');
+} elseif ($frsr->isError()) {
+	exit_error($frsr->getErrorMessage(),'frs');
+}
+
+echo html_ao('script', array('type' => 'text/javascript'));
+?>
+//<![CDATA[
+var controllerFRS;
+
+jQuery(document).ready(function() {
+	controllerFRS = new FRSController();
+});
+
+//]]>
+<?php
+echo html_ac(html_ap() - 1);
+echo html_e('h2', array(), _('Edit Release for the package').' '.$frsp->getName());
+/*
+ * Show the forms for each part
+ */
+echo $HTML->openForm(array('enctype' => 'multipart/form-data', 'method' => 'post', 'action' => util_make_uri('/frs/?group_id='.$group_id.'&release_id='.$release_id.'&package_id='.$package_id.'&action=editrelease')));
+echo $HTML->listTableTop();
+$cells = array();
+$cells[][] = '<strong>'._('Release Date')._(':').'</strong>';
+$cells[][] = '<input type="text" name="release_date" value="'.date('Y-m-d H:i',$frsr->getReleaseDate()).'" size="16" maxlength="16" />';
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = '<strong>'._('Release Name').utils_requiredField()._(':').'</strong>';
+$cells[][] = '<input type="text" name="release_name" value="'.$frsr->getName().'" required="required" pattern=".{3,}" title="'._('At least 3 characters').'" />';
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = '<strong>'._('Status')._(':').'</strong>';
+$cells[][] = frs_show_status_popup('status_id',$frsr->getStatus());
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Edit the Release Notes or Change Log for this release of this package. These changes will apply to all files attached to this release.').'<br/>'.
+		_('You can either upload the release notes and change log individually, or paste them in together below.'), 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<strong>'._('Upload Release Notes')._(':').'</strong>'.
+		'('._('max upload size')._(': ').human_readable_bytes(util_get_maxuploadfilesize()).')', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<input type="file" name="uploaded_notes" size="30" />', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<strong>'._('Upload Change Log')._(':').'</strong>'.
+		'('._('max upload size')._(': ').human_readable_bytes(util_get_maxuploadfilesize()).')', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<input type="file" name="uploaded_changes" />', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<strong>'._('Paste The Notes In')._(':').'</strong><br/>'.
+		'<textarea name="release_notes" rows="10" cols="60">'.$frsr->getNotes().'</textarea>', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<strong>'._('Paste The Change Log In')._(':').'</strong><br/>'.
+		'<textarea name="release_changes" rows="10" cols="60">'.$frsr->getChanges().'</textarea>', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<input type="checkbox" name="preformatted" value="1" '.(($frsr->getPreformatted())?'checked="checked"':'').' />'._('Preserve my pre-formatted text').
+		'<p><input type="submit" name="submit" value="'._('Submit/Refresh').'" /></p>', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+echo $HTML->listTableBottom();
+echo $HTML->closeForm();
+
+echo html_e('hr');
+echo html_e('h2', array(), _('Add Files To This Release'));
+echo html_e('p', array(), _('Now, choose a file to upload into the system.'));
+
+echo $HTML->openForm(array('enctype' => 'multipart/form-data', 'method' => 'post', 'action' => util_make_uri('/frs/?group_id='.$group_id.'&release_id='.$release_id.'&package_id='.$package_id.'&action=addfile')));
+echo html_ao('fieldset');
+echo html_e('legend', array(), '<strong>'._('File Name').'</strong>');
+echo _('Upload a new file')._(': ').'<input type="file" name="userfile" />'.'('._('max upload size')._(': ').human_readable_bytes(util_get_maxuploadfilesize()).')';
+$content = '';
+if (forge_get_config('use_ftp_uploads')) {
+	include ($gfcommon.'frs/views/useftpuploads.php');
+}
+
+if (forge_get_config('use_manual_uploads')) {
+	include $gfcommon.'frs/views/usemanualuploads.php';
+}
+if ($g->usesDocman() && forge_check_perm('docman', $group_id, 'read')) {
+	include $gfcommon.'frs/views/docmanfile.php';
+}
+if (!empty($content)) {
+	echo $content;
+}
+echo html_ac(html_ap() -1);
+echo $HTML->listTableTop();
+$cells = array();
+$cells[][] = '<strong>'._('File Type')._(':').'</strong>';
+$cells[][] = frs_show_filetype_popup('type_id');
+$cells[][] = '<strong>'._('Processor Type')._(':').'</strong>';
+$cells[][] = frs_show_processor_popup('processor_id');
+echo $HTML->multiTableRow(array(), $cells);
+echo $HTML->listTableBottom();
+echo html_e('p', array(), '<input type="submit" name="submit" value="'._('Add This File').'" />');
+echo $HTML->closeForm();
+// Get a list of files associated with this release
+$files = $frsr->getFiles();
+if(count($files)) {
+	echo '<hr />';
+	echo '<h2>'._('Edit Files In This Release').'</h2>';
+	print(_('Once you have added files to this release you <strong>must</strong> update each of these files with the correct information or they will not appear on your download summary page.')."\n");
+	$title_arr[] = _('File Name');
+	$title_arr[] = _('Processor');
+	$title_arr[] = _('File Type');
+	$title_arr[] = _('Release');
+	$title_arr[] = _('Release Date');
+	$title_arr[] = _('Actions');
+
+	echo $HTML->listTableTop($title_arr, array(), '', '', array(), array(), array(array('style' => 'width: 30%')));
+	echo '<tr><td colspan="6">';
+	foreach ($files as $key => $file) {
+		echo $HTML->openForm(array('action' => util_make_uri('/frs/?group_id='.$group_id.'&release_id='.$release_id.'&package_id='.$package_id.'&file_id='.$file->getID().'&action=editfile'), 'method' => 'post', 'id' => 'fileid'.$file->getID()));
+		echo $HTML->listTableTop();
+		$cells = array();
+		$cells[] = array($file->getName(), 'style' => 'white-space: nowrap; width: 30%');
+		$cells[][] = frs_show_processor_popup('processor_id', $file->getProcessorID());
+		$cells[][] = frs_show_filetype_popup('type_id', $file->getTypeID());
+		$cells[][] = frs_show_release_popup($group_id, $name = 'new_release_id', $release_id);
+		$cells[][] = '<input type="text" name="release_time" value="'.date('Y-m-d', $file->getReleaseTime()).'" size="10" maxlength="10" />';
+		$deleteUrlAction = util_make_uri('/frs/?action=deletefile&package_id='.$package_id.'&group_id='.$group_id.'&release_id='.$release_id.'&file_id='.$file->getID());
+		$cells[][] = '<input type="submit" name="submit" value="'._('Update/Refresh').'" />'.util_make_link('#', $HTML->getDeletePic(_('Delete this file'), _('Delete file')), array('onclick' => 'javascript:controllerFRS.toggleConfirmBox({idconfirmbox: \'confirmbox1\', do: \''._('Delete the file').' '.$file->getName().'\', cancel: \''._('Cancel').'\', height: 150, width: 400, action: \''.$deleteUrlAction.'\'})' ), true);
+		echo $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($key, true)), $cells);
+		echo $HTML->listTableBottom();
+		echo $HTML->closeForm();
+	}
+	echo '</td></tr>';
+	echo $HTML->listTableBottom();
+}
+
+echo $HTML->jQueryUIconfirmBox('confirmbox1', _('Delete file'), _('You are about to delete permanently this file. Are you sure? This action is definitive.'));
+echo '<p>' . sprintf(ngettext('There is %s user monitoring this package.', 'There are %s users monitoring this package.', $frsp->getMonitorCount()), $frsp->getMonitorCount()) . '</p>';
diff --git a/src/common/frs/views/listpackages.php b/src/common/frs/views/listpackages.php
new file mode 100644
index 0000000..ac537bb
--- /dev/null
+++ b/src/common/frs/views/listpackages.php
@@ -0,0 +1,191 @@
+<?php
+/**
+ * FusionForge FRS: List packages view
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * Copyright 2013-2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $HTML; // html object
+global $group_id; // id of group
+global $g; // group object
+
+$fpFactory = new FRSPackageFactory($g);
+if (!$fpFactory || !is_object($fpFactory)) {
+	exit_error(_('Could Not Get FRSPackageFactory'), 'frs');
+} elseif ($fpFactory->isError()) {
+	exit_error($fpFactory->getErrorMessage(), 'frs');
+}
+
+$FRSPackages = $fpFactory->getFRSs();
+
+if ( count($FRSPackages) < 1) {
+	echo $HTML->information(_('There are no file packages defined for this project.'));
+} else {
+	echo html_ao('script', array('type' => 'text/javascript'));
+	?>
+	//<![CDATA[
+	var controllerFRS;
+	jQuery(document).ready(function() {
+		controllerFRS = new FRSController();
+	});
+	//]]>
+	<?php
+	echo html_ac(html_ap() - 1);
+	echo html_ao('div', array('id' => 'forge-frs', 'class' => 'underline-link'));
+
+	$content = _('Below is a list of all files of the project.').' ';
+	if ($release_id) {
+		$content = _('The release you have chosen is <span class="selected">highlighted</span>.').' ';
+	}
+	$content .= _('Before downloading, you may want to read Release Notes and ChangeLog (accessible by clicking on release version).');
+	echo html_e('div', array('class' => 'blue-box'), $content);
+
+	// check the permissions and see if this user is a release manager.
+	// If so, offer the opportunity to create a release
+	if (forge_check_perm('frs', $group_id, 'write')) {
+		echo html_e('p', array(), util_make_link('/frs/?view=qrs&group_id='.$group_id, _('To create a new release click here.')));
+	}
+
+	$proj_stats['packages'] = count($FRSPackages);
+	$proj_stats['releases'] = 0;
+	$proj_stats['size']     = 0;
+
+	// Iterate and show the packages
+	foreach ($FRSPackages as $FRSPackage) {
+
+		$package_id = $FRSPackage->getID();
+		$package_name = $FRSPackage->getName();
+		$url = '/frs/?group_id='.$FRSPackage->Group->getID().'&package_id='.$package_id.'&action=monitor';
+		if($FRSPackage->isMonitoring()) {
+			$title = $package_name.' - '._('Stop monitoring this package');
+			$url .= '&status=0';
+			$image = $HTML->getStopMonitoringPic($title);
+		} else {
+			$title = $package_name.' - '._('Start monitoring this package');
+			$url .= '&status=1';
+			$image = $HTML->getStartMonitoringPic($title);
+		}
+		$errorMessage = _('Unable to set monitoring');
+		$package_monitor = util_make_link('#', $image, array('id' => 'pkgid'.$package_id, 'onclick' => 'javascript:controllerFRS.doAction({action:\''.$url.'\', id:\'pkgid'.$package_id.'\'})'), true);
+
+		$package_name_protected = $HTML->toSlug($package_name);
+		echo html_e('h2', array('id' => 'title_'. $package_name_protected), $package_name.html_e('span', array('class' => 'frs-monitor-package'), $package_monitor));
+
+		// get the releases of the package
+		$FRSPackageReleases = $FRSPackage->getReleases();
+		$num_releases = count($FRSPackageReleases);
+
+		$proj_stats['releases'] += $num_releases;
+
+		if ( !$FRSPackageReleases || $num_releases < 1 ) {
+			echo $HTML->warning_msg(_('No releases'));
+		} else {
+			if (class_exists('ZipArchive')) {
+				// display link to latest-release-as-zip
+				echo html_e('p', array(), html_e('em', array(), _('Download latest release as ZIP')._(': ').
+					util_make_link('/frs/download.php/latestzip/'.$FRSPackage->getID().'/'.$FRSPackage->getNewestReleaseZipName(),
+						$FRSPackage->getNewestReleaseZipName(), array('title' => _('This link always points to the newest release as a ZIP file.')))));
+			}
+
+			// iterate and show the releases of the package
+			foreach ($FRSPackageReleases as $FRSPackageRelease) {
+				$package_release_id = $FRSPackageRelease->getID();
+
+				// Switch whether release_id exists and/or release_id is current one
+				if ( ! $release_id || $release_id == $package_release_id ) {
+					// no release_id OR release_id is current one
+					$release_title = util_make_link('/frs/?view=shownotes&group_id='.$group_id.'&release_id='.$package_release_id, $package_name.' '.$FRSPackageRelease->getName().' ('.date(_('Y-m-d H:i'), $FRSPackageRelease->getReleaseDate()).')');
+					echo $HTML->boxTop($release_title, $package_name.'_'.$FRSPackageRelease->getName());
+				} elseif ( $release_id != $package_release_id ) {
+					// release_id but not current one
+					$t_url_anchor = $HTML->toSlug($package_name).'-'.$HTML->toSlug($FRSPackageRelease->getName()).'-title-content';
+					$t_url = '/frs/?group_id='.$group_id.'&release_id='.$package_release_id.'#'.$t_url_anchor;
+					$release_title = util_make_link( $t_url, $package_name.' '.$FRSPackageRelease->getName());
+					echo html_e('div', array('class' => 'frs_release_name_version'), $release_title);
+				}
+
+				// get the files in this release....
+				$res_files = $FRSPackageRelease->getFiles();
+				$num_files = count($FRSPackageRelease);
+
+				@$proj_stats['files'] += $num_files;
+
+				$cell_data = array();
+				$cell_data[] = _('File Name');
+				$cell_data[] = _('Date');
+				$cell_data[] = _('Size');
+				$cell_data[] = _('D/L');
+				$cell_data[] = _('Arch');
+				$cell_data[] = _('Type');
+				$cell_data[] = _('Latest');
+
+				// Switch whether release_id exists and/or release_id == package_release['release_id']
+				if ( ! $release_id ) {
+					// no release_id
+					echo $HTML->listTableTop($cell_data, '', false);
+				} elseif ( $release_id==$package_release_id ) {
+					// release_id is current one
+					echo $HTML->listTableTop($cell_data, '', true);
+				} else {
+				// release_id but not current one => dont print anything here
+				}
+
+				if ( ! $release_id || $release_id == $package_release_id ) {
+					// no release_id OR no release_id OR release_id is current one
+					if ( !$res_files || $num_files < 1 ) {
+						$cells = array();
+						$cells[] = array('  '.html_e('em', array(), _('No releases')), 'colspan' => 7);
+						echo $HTML->multiTableRow(array(), $cells);
+					} else {
+						// now iterate and show the files in this release....
+						foreach ($res_files as $res_file) {
+							$cells = array();
+							$cells[][] = util_make_link('/frs/download.php/file/'.$res_file->getID().'/'.$res_file->getName(), $res_file->getName());
+							$cells[][] = date(_('Y-m-d H:i'), $res_file->getReleaseTime());
+							$cells[][] = human_readable_bytes($res_file->getSize());
+							$cells[][] = ($res_file->getDownloads() ? number_format($res_file->getDownloads(), 0) : '0');
+							$cells[][] = $res_file->getProcessor();
+							$cells[][] = $res_file->getFileType();
+							$cells[][] = util_make_link('/frs/download.php/latestfile/'.$FRSPackage->getID().'/'.$res_file->getName(), _('Latest version'));
+
+							$proj_stats['size'] += $res_file->getSize();
+							@$proj_stats['downloads'] += $res_file->getDownloads();
+
+							echo $HTML->multiTableRow(array(), $cells);
+						}
+					}
+					echo $HTML->listTableBottom();
+				} else {
+					// release_id but not current one
+					// nothing to print here
+				}
+
+				if ( ! $release_id || $release_id==$package_release_id ) {
+					echo $HTML->boxBottom();
+				}
+			} //for: release(s)
+		} //if: release(s) available
+	}
+	echo html_ac(html_ap() -1);
+}
diff --git a/src/common/frs/views/menu.php b/src/common/frs/views/menu.php
new file mode 100644
index 0000000..0ef8609
--- /dev/null
+++ b/src/common/frs/views/menu.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * FusionForge FRS
+ *
+ * Copyright 2014 Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $HTML; // html object
+global $group_id; // id of group
+
+if (!forge_check_perm('frs', $group_id, 'read_public')) {
+	$warning_msg = _('FRS Access Denied');
+	session_redirect('/frs/?group_id='.$group_id);
+}
+
+/* create the submenu following role, rules and content */
+$menu_text = array();
+$menu_links = array();
+$menu_attr = array();
+
+if (forge_check_perm('frs', $group_id, 'write')) {
+	$menu_text = array(
+			_('View File Releases'),
+			_('Reporting'),
+			_('Administration')
+			);
+	$menu_links = array(
+			'/frs/?group_id='.$group_id,
+			'/frs/?view=reporting&group_id='.$group_id,
+			'/frs/?view=admin&group_id='.$group_id
+			);
+	$menu_attr = array(
+			NULL,
+			NULL,
+			NULL
+			);
+}
+
+if (count($menu_text)) {
+	echo $HTML->subMenu($menu_text, $menu_links, $menu_attr);
+}
+
+plugin_hook('blocks', 'files index');
diff --git a/src/common/frs/views/qrs.php b/src/common/frs/views/qrs.php
new file mode 100644
index 0000000..d1ff76c
--- /dev/null
+++ b/src/common/frs/views/qrs.php
@@ -0,0 +1,100 @@
+<?php
+/**
+ * FusionForge File Release Facility
+ *
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $HTML; // html object
+global $group_id; // id of group
+global $g; // group object
+global $warning_msg; // warning message
+
+// check the permissions and see if this user is a release manager.
+// If so, he can create a release
+session_require_perm('frs', $group_id, 'write');
+
+$package_id = getIntFromRequest('package_id');
+
+$frspf = new FRSPackageFactory($g);
+$packages = $frspf->getFRSs();
+if (!count($packages)) {
+	$warning_msg = _('No package found. You need to create one before creating releases.');
+	session_redirect('/frs/?view=admin&group_id='.$group_id);
+}
+
+echo html_e('h2', array(), _('Quick Release System'));
+echo $HTML->openForm(array('enctype' => 'multipart/form-data', 'method' => 'post', 'action' => util_make_uri('/frs/?group_id='.$group_id.'&action=addrelease')));
+echo $HTML->listTableTop();
+$cells = array();
+$cells[][] = html_e('strong', array(), _('Package ID')._(':'));
+$packageIds = array();
+$packageNames = array();
+foreach ($packages as $onepackage) {
+	$packageIds[] = $onepackage->getID();
+	$packageNames[] = $onepackage->getName();
+}
+$cells[][] = html_build_select_box_from_arrays($packageIds, $packageNames, 'package_id', $package_id, false).'  '.sprintf(_('Or %1$s create a new package %2$s'), '<a href="'.util_make_url ('/frs/?view=admin&group_id='.$group_id).'">', '</a>');
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = html_e('strong', array(), _('Release Name').utils_requiredField()._(':'));
+$cells[][] = html_e('input', array('type' => 'text', 'required' => 'required', 'name' => 'release_name', 'pattern' => '.{3,}', 'title' => _('At least 3 characters')));
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = html_e('strong', array(), _('Release Date')._(':'));
+$cells[][] = html_e('input', array('type' => 'text', 'name' => 'release_date', 'value' => date('Y-m-d H:i'), 'size' => 16, 'maxlength' => 16));
+$cells = array();
+$cells[][] = html_e('strong', array(), _('File Name')._(':'));
+$content = $HTML->information(sprintf(_('You can probably not upload files larger than about %.2f MiB in size.'), human_readable_bytes(util_get_maxuploadfilesize()))).
+		_('Upload a new file')._(': ').hmtl_e('input', array('type' => 'file', 'name' => 'userfile', 'size' => 30));
+if (forge_get_config('use_ftp_uploads')) {
+	include ($gfcommon.'frs/views/useftpuploads.php');
+}
+if (forge_get_config('use_manual_uploads')) {
+	include ($gfcommon.'frs/views/usemanualuploads.php');
+}
+if ($g->usesDocman()) {
+	include ($gfcommon.'frs/views/docmanfile.php');
+}
+$cells[][] = $content;
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = html_e('strong', array(), _('File Type')._(':'));
+$cells[][] = frs_show_filetype_popup('type_id');
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = html_e('strong', array(), _('Processor Type')._(':'));
+$cells[][] = frs_show_processor_popup('processor_id');
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = html_e('strong', array(), _('Release Notes')._(':'));
+$cells[][] = html_e('textarea', array('name' => 'release_notes', 'rows' => 7, 'cols' => 50), '', false);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[][] = html_e('strong', array(), _('Change Log')._(':'));
+$cells[][] = html_e('textarea', array('name' => 'release_changes', 'rows' => 7, 'cols' => 50), '', false);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array('<input type="checkbox" name="preformatted" value="1" />'._('Preserve my pre-formatted text').'<p><input type="submit" name="submit" value="'._('Create release').'" /></p>', 'colspan' => 2, 'style' => 'text-align:center');
+echo $HTML->multiTableRow(array(), $cells);
+echo $HTML->listTableBottom();
+echo $HTML->closeForm();
+echo $HTML->addRequiredFieldsInfoBox();
diff --git a/src/common/frs/views/reporting.php b/src/common/frs/views/reporting.php
new file mode 100644
index 0000000..ea9043b
--- /dev/null
+++ b/src/common/frs/views/reporting.php
@@ -0,0 +1,187 @@
+<?php
+/**
+ * Copyright (C) 2009-2012 Alain Peyrat, Alcatel-Lucent
+ * Copyright 2012,2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ * Standard Alcatel-Lucent disclaimer for contributing to open source
+ *
+ * "The program ("Contribution") has not been tested and/or
+ * validated for release as or in products, combinations with products or
+ * other commercial use. Any use of the Contribution is entirely made at
+ * the user's own responsibility and the user can not rely on any features,
+ * functionalities or performances Alcatel-Lucent has attributed to the
+ * Contribution.
+ *
+ * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
+ * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
+ * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
+ * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
+ * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
+ * ALONE BASIS."
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $HTML; // html object
+
+
+$group_id = getIntFromRequest('group_id');
+$package_id = getIntFromRequest('package_id');
+$start = getIntFromRequest('start');
+$end = getIntFromRequest('end');
+
+session_require_perm('frs', $group_id, 'write');
+
+$report = new Report();
+if ($report->isError()) {
+	exit_error($report->getErrorMessage(), 'frs');
+}
+
+if (!$start || !$end) $z =& $report->getMonthStartArr();
+
+if (!$start) {
+	$start = $z[0];
+}
+
+if (!$end) {
+	$end = $z[count($z) - 1];
+}
+
+if ($end < $start) list($start, $end) = array($end, $start);
+
+html_use_jqueryjqplotpluginCanvas();
+html_use_jqueryjqplotpluginhighlighter();
+echo $HTML->getJavascripts();
+echo $HTML->getStylesheets();
+
+$report = new ReportDownloads($group_id, $package_id, $start, $end);
+if ($report->isError()) {
+	echo $HTML->error_msg($report->getErrorMessage());
+} else {
+
+	echo $HTML->openForm(array('action' => util_make_url('/frs/?view=reporting&group_id='.$group_id), 'method' => 'post', 'class' => 'align-center'));
+	echo html_e('strong', array(), _('Package')._(':')).report_package_box($group_id,'package_id',$package_id);
+	echo html_e('strong', array(), _('Start Date')._(':')).report_months_box($report, 'start', $start);
+	echo html_e('strong', array(), _('End Date')._(':')).report_months_box($report, 'end', $end);
+	echo html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => _('Refresh')));
+	echo $HTML->closeForm();
+
+	$data = $report->getData();
+
+	if ($start == $end) {
+		echo $HTML->error_msg(_('Start and end dates must be different'));
+	} elseif (count($data) == 0) {
+		echo $HTML->information(_('There have been no downloads for this package.'));
+	} else {
+		echo '<script type="text/javascript">//<![CDATA['."\n";
+		echo 'var ticks = new Array();';
+		echo 'var values = new Array();';
+		$arr =& $report->getMonthStartArr();
+		$arr2 = array();
+		$valuesArr = array();
+		for ($i=0; $i < count($arr); $i++) {
+			if ($arr[$i] >= $start && $arr[$i] <= $end) {
+				$arr2[$i] = date(_('Y-m'), $arr[$i]);
+				$valuesArr[$i] = 0;
+			}
+		}
+		foreach ($arr2 as $key) {
+			echo 'ticks.push("'.$key.'");';
+		}
+		for ($i=0; $i < count($data); $i++) {
+			echo 'var labels = [{label:\''.$data[$i][0].'\'}];';
+			$this_date = date(_('Y-m'), mktime(0, 0, 0, substr($data[$i][4], 4, 2), 0, substr($data[$i][4], 0, 4)));
+			$index_key = array_search($this_date, $arr2);
+			$valuesArr[$index_key+1]++;
+		}
+		foreach ($valuesArr as $key) {
+			echo 'values.push('.$key.');';
+		}
+		echo 'var plot1;';
+		echo 'jQuery(document).ready(function(){
+				plot1 = jQuery.jqplot (\'chart1\', [values], {
+						axesDefaults: {
+							tickOptions: {
+								angle: -90,
+								fontSize: \'8px\',
+								showGridline: false,
+								showMark: false,
+							},
+						},
+						legend: {
+							show: true,
+							placement: \'insideGrid\',
+							location: \'nw\'
+						},
+						series:
+							labels
+						,
+						axes: {
+							xaxis: {
+								label: "'._('Month').'",
+								renderer: jQuery.jqplot.CategoryAxisRenderer,
+								ticks: ticks,
+								pad: 0,
+							},
+							yaxis: {
+								label: "'._('Downloads').'",
+								padMin: 0,
+								tickOptions: {
+									angle: 0,
+									showMark: true,
+								}
+							}
+						},
+						highlighter: {
+							show: true,
+							sizeAdjust: 2.5,
+						},
+					});
+			});';
+		echo 'jQuery(window).resize(function() {
+				plot1.replot( { resetAxes: true } );
+			});'."\n";
+		echo '//]]></script>';
+		echo html_e('div', array('id' => 'chart1'), '', false);
+		echo $HTML->listTableTop(array(_('Package'), _('Release'), _('File'), _('User'), _('Date')),
+				false, true, 'Download');
+		for ($i=0; $i<count($data); $i++) {
+			$date = preg_replace('/^(....)(..)(..)$/', '\1-\2-\3', $data[$i][4]);
+			$cells = array();
+			$cells[][] = $data[$i][0];
+			$cells[][] = $data[$i][1];
+			$cells[][] = basename($data[$i][2]);
+			if ($data[$i][6] != 100) {
+				$cells[][] = util_display_user($data[$i][5], $data[$i][6], $data[$i][3]);
+			} else {
+				$cells[][] = $data[$i][3];
+			}
+			$cells[] = array($date, 'class' => 'align-center');
+			echo $HTML->multiTableRow(array(), $cells);
+		}
+		echo $HTML->listTableBottom();
+	}
+}
diff --git a/src/common/frs/views/shownotes.php b/src/common/frs/views/shownotes.php
new file mode 100644
index 0000000..bf267f9
--- /dev/null
+++ b/src/common/frs/views/shownotes.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Show Release Notes/ChangeLog Page
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $group_id; // id of group
+global $HTML; // html object
+
+$release_id = getIntFromRequest('release_id');
+
+$frsr = frsrelease_get_object($release_id);
+if (!$frsr || !is_object($frsr)) {
+	exit_error(_('That Release Was Not Found'), 'frs');
+} elseif ($frsr->isError()) {
+	exit_error($frsr->getErrorMessage(), 'frs');
+}
+
+//  Members of projects can see all packages
+//  Non-members can only see public packages
+if(!$frsr->getFRSPackage()->isPublic()) {
+	if (!session_loggedin() || (!user_ismember($group_id) &&
+		!forge_check_global_perm('forge_admin'))) {
+		exit_permission_denied();
+	}
+}
+
+echo html_e('h2', array(), _('File Release Notes and Changelog'));
+echo html_e('h3', array(), _('Release Name')._(': ').util_make_link('/frs/?group_id='.$group_id.'&release_id='.$release_id, $frsr->getName()));
+
+// Show preformatted or plain notes/changes
+if ($frsr->getPreformatted()) {
+	$htmltag = 'pre';
+} else {
+	$htmltag = 'p';
+}
+
+if (strlen($frsr->getNotes())) {
+	echo $HTML->boxTop(_('Release Notes'));
+	echo html_e($htmltag, array(), $frsr->getNotes());
+	echo $HTML->boxBottom();
+}
+
+if (strlen($frsr->getChanges())) {
+	echo $HTML->boxTop(_('Change Log'));
+	echo html_e($htmltag, array(), $frsr->getChanges());
+	echo $HTML->boxBottom();
+}
diff --git a/src/common/frs/views/showreleases.php b/src/common/frs/views/showreleases.php
new file mode 100644
index 0000000..25eac49
--- /dev/null
+++ b/src/common/frs/views/showreleases.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Project Admin: Edit Releases of Packages
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c), FusionForge Team
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $HTML; // html object
+global $group_id; // id of group
+global $g; // group object
+global $warning_msg; // warning message
+
+$package_id = getIntFromRequest('package_id');
+
+if (!$package_id) {
+	$warning_msg = _('Choose a package to be edited.');
+	session_redirect('/frs/?view=admin&group_id='.$group_id);
+}
+
+session_require_perm('frs', $group_id, 'write');
+
+$frsp = new FRSPackage($g, $package_id);
+if (!$frsp || !is_object($frsp)) {
+	exit_error(_('Could Not Get FRS Package'),'frs');
+} elseif ($frsp->isError()) {
+	exit_error($frsp->getErrorMessage(),'frs');
+}
+
+$rs = $frsp->getReleases();
+if (count($rs) < 1) {
+	exit_error(_('No Releases Of This Package Are Available'), 'frs');
+}
+
+echo html_ao('script', array('type' => 'text/javascript'));
+?>
+//<![CDATA[
+var controllerFRS;
+jQuery(document).ready(function() {
+	controllerFRS = new FRSController();
+});
+//]]>
+<?php
+echo html_ac(html_ap() - 1);
+
+// Display a list of releases in this package
+echo html_e('h2', array(), _('Available Releases for the package').' '.$frsp->getName());
+
+$title_arr=array(_('Release Name'), _('Date'), _('Actions'));
+
+echo $HTML->listTableTop($title_arr);
+for ($i = 0; $i < count($rs); $i++) {
+	$cells = array();
+	$cells[][] = $rs[$i]->getName();
+	$cells[][] = date('Y-m-d H:i',$rs[$i]->getReleaseDate());
+	$deleteUrlAction = util_make_uri('/frs/?action=deleterelease&package_id='.$package_id.'&group_id='.$group_id.'&release_id='.$rs[$i]->getID());
+	$cells[][] = util_make_link('/frs/?view=editrelease&group_id='.$group_id.'&package_id='.$package_id.'&release_id='.$rs[$i]->getID(), '['._('Edit').']')
+			.util_make_link('#', $HTML->getDeletePic(_('Delete this release'), _('Delete release')), array('onclick' => 'javascript:controllerFRS.toggleConfirmBox({idconfirmbox: \'confirmbox1\', do: \''._('Delete the release').' '.$rs[$i]->getName().'\', cancel: \''._('Cancel').'\', height: 150, width: 300, action: \''.$deleteUrlAction.'\'})' ), true);
+	echo $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($i, true)), $cells);
+}
+echo $HTML->listTableBottom();
+echo $HTML->jQueryUIconfirmBox('confirmbox1', _('Delete release'), _('You are about to delete permanently this release. Are you sure? This action is definitive.'));
diff --git a/src/common/frs/views/useftpuploads.php b/src/common/frs/views/useftpuploads.php
new file mode 100644
index 0000000..6031fd3
--- /dev/null
+++ b/src/common/frs/views/useftpuploads.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * FusionForge FRS : use ftp upload include view
+ *
+ * Copyright 2014 Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $content; // the preexistant html content
+global $upload_dir; // the upload diretory of the project
+
+$localcontent .= sprintf(_('Alternatively, you can use FTP to upload a new file at %s.'), forge_get_config('ftp_upload_host'));
+$localcontent .= html_e('br');
+$localcontent .= _('Choose an FTP file instead of uploading')._(':').html_e('br');
+$ftp_files_arr = frs_filterfiles(ls($upload_dir, true));
+$localcontent .= html_build_select_box_from_arrays($ftp_files_arr, $ftp_files_arr, 'ftp_filename', '');
+$content .= html_e('p', array(), $localcontent);
diff --git a/src/common/frs/views/usemanualuploads.php b/src/common/frs/views/usemanualuploads.php
new file mode 100644
index 0000000..bc62bec
--- /dev/null
+++ b/src/common/frs/views/usemanualuploads.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * FusionForge FRS : use manual upload include view
+ *
+ * Copyright 2014 Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $g; // group object
+global $content; // the preexistant html content
+
+$incoming = forge_get_config('groupdir_prefix').'/'.$g->getUnixName().'/incoming';
+$localcontent .= sprintf(_('Alternatively, you can use a file you already uploaded (by SFTP or SCP) to the <a href="%2$s">project\'s incoming directory</a> (%1$s).'),
+			$incoming, 'sftp://'.forge_get_config('web_host').$incoming.'/');
+$localcontent .= ' ' . _('This direct <tt>sftp://</tt> link only works with some browsers, such as Konqueror.') .html_e('br');
+$localcontent .= _('Choose an already uploaded file:').html_e('br');
+$manual_files_arr = frs_filterfiles(ls($incoming,true));
+$localcontent .= html_build_select_box_from_arrays($manual_files_arr, $manual_files_arr, 'manual_filename', '');
+$content .= html_e('p', array(), $localcontent);
diff --git a/src/common/frs/views/views.php b/src/common/frs/views/views.php
new file mode 100644
index 0000000..737394d
--- /dev/null
+++ b/src/common/frs/views/views.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * FusionForge FRS : view dispatcher
+ *
+ * Copyright 2014 Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/frs/index.php to add require */
+/* global variables used */
+global $gfcommon;
+
+$view = getStringFromRequest('view', 'listpackages');
+switch ($view) {
+	case 'admin':
+	case 'deleterelease':
+	case 'editrelease':
+	case 'listpackages':
+	case 'qrs':
+	case 'reporting':
+	case 'shownotes':
+	case 'showreleases': {
+		include ($gfcommon.'frs/views/'.$view.'.php');
+		break;
+	}
+}
diff --git a/src/common/widget/Widget_ProjectLatestFileReleases.class.php b/src/common/widget/Widget_ProjectLatestFileReleases.class.php
index 57c7b73..0c94c83 100644
--- a/src/common/widget/Widget_ProjectLatestFileReleases.class.php
+++ b/src/common/widget/Widget_ProjectLatestFileReleases.class.php
@@ -20,6 +20,7 @@
  */
 
 require_once 'Widget.class.php';
+require_once $gfcommon.'frs/FRSPackageFactory.class.php';
 
 /**
  * Widget_ProjectLatestFileReleases
@@ -44,38 +45,29 @@ class Widget_ProjectLatestFileReleases extends Widget {
 	function getContent() {
 		$request =& HTTPRequest::instance();
 		$pm = ProjectManager::instance();
-		$group_id=$request->get('group_id');
+		$group_id = $request->get('group_id');
 		$project = $pm->getProject($group_id);
-		$unix_group_name = $project->getUnixName();
 		global $HTML;
 
-		//
-		//  Members of projects can see all packages
-		//  Non-members can only see public packages
-		//
-		$public_required = 1;
-		if (session_loggedin() &&
-		    (user_ismember($group_id) || forge_check_global_perm('forge_admin'))) {
-			$public_required = 0 ;
-		}
+		$frspf = new FRSPackageFactory($project);
+		$frsps = $frspf->getFRSs();
+		if (count($frsps) < 1) {
+			echo $HTML->warning_msg(_('This project has not released any files'));
+		} else {
+			use_javascript('/frs/scripts/FRSController.js');
+			echo $HTML->getJavascripts();
+			echo html_ao('script', array('type' => 'text/javascript'));
+			?>
+			//<![CDATA[
+			var controllerFRS;
 
-		$res_files = db_query_params ('SELECT frs_package.package_id,frs_package.name AS package_name,frs_release.name AS release_name,frs_release.release_id AS release_id,frs_release.release_date AS release_date
-			FROM frs_package,frs_release
-			WHERE frs_package.package_id=frs_release.package_id
-			AND frs_package.group_id=$1
-			AND frs_release.status_id=1
-			AND frs_package.status_id=1
-			AND (frs_package.is_public=1 OR 1 != $2)
-			ORDER BY frs_package.package_id,frs_release.release_date DESC',
-			array ($group_id,
-				$public_required));
-		$rows_files=db_numrows($res_files);
-		if (!$res_files || $rows_files < 1) {
-			echo db_error();
-			// No releases
-			echo $HTML->warning_msg(_('This Project Has Not Released Any Files'));
+			jQuery(document).ready(function() {
+				controllerFRS = new FRSController();
+			});
 
-		} else {
+			//]]>
+			<?php
+			echo html_ac(html_ap() - 1);
 			echo '
 				<table summary="Latest file releases" class="width-100p100">
 					<tr class="table-header">
@@ -90,68 +82,72 @@ class Widget_ProjectLatestFileReleases extends Widget {
 						</th>
 						<th scope="col">
 							'._('Notes').'
-						</th>
-						<th scope="col">
+						</th>';
+			if (session_loggedin()) {
+				echo '		<th scope="col">
 							'._('Monitor').'
-						</th>
-						<th scope="col">
+						</th>';
+			}
+			echo '			<th scope="col">
 							'._('Download').'
 						</th>
 					</tr>';
-			/*
-				This query actually contains ALL releases of all packages
-				We will test each row and make sure the package has changed before printing the row
-			*/
-			for ($f=0; $f<$rows_files; $f++) {
-				if (db_result($res_files,$f,'package_id')==db_result($res_files,($f-1),'package_id')) {
-					//same package as last iteration - don't show this release
-				} else {
-					$rel_date = getdate (db_result ($res_files, $f, 'release_date'));
-					$package_name = db_result($res_files, $f, 'package_name');
-					$package_release = db_result($res_files,$f,'release_name');
-					echo '
-						<tr class="align-center">
-						<td class="align-left">
-							<strong>' . $package_name . '</strong>
-						</td>';
-					// Releases to display
+			foreach ($frsps as $key => $frsp) {
+				$frsr = $frsp->getNewestRelease();
+				$rel_date = $frsr->getReleaseDate();
+				$package_name = $frsp->getName();
+				$package_release = $frsr->getName();
+				echo '
+					<tr class="align-center">
+					<td class="align-left">
+						<strong>' . $package_name . '</strong>
+					</td>';
+				// Releases to display
 //print '<div about="" xmlns:sioc="http://rdfs.org/sioc/ns#" rel="container_of" resource="'.util_make_link('/frs/?group_id='.$group_id.'&release_id='.db_result($res_files,$f,'release_id').'">';
-					echo '
-						<td>'
-						.$package_release.'
-						</td>
-						<td>'
-						. $rel_date["month"] . ' ' . $rel_date["mday"] . ', ' . $rel_date["year"] .
-						'</td>
-						<td class="align-center">';
+				echo '
+					<td>'
+					.$package_release.'
+					</td>
+					<td>'
+					. date(_('Y-m-d'), $rel_date).
+					'</td>
+					<td class="align-center">';
 //echo '</div>';
 
-					// -> notes
-					// accessibility: image is a link, so alt must be unique in page => construct a unique alt
-					$tmp_alt = $package_name . " - " . _('Release Notes');
-					$link = '/frs/shownotes.php?group_id=' . $group_id . '&release_id=' . db_result($res_files, $f, 'release_id');
-					$link_content = $HTML->getReleaseNotesPic($tmp_alt, $tmp_alt);
-					echo util_make_link ($link, $link_content);
-					echo '</td>
-						<td class="align-center">';
-
-					// -> monitor
-					$tmp_alt = $package_name . " - " . _('Monitor this package');
-					$link = '/frs/monitor.php?filemodule_id=' .  db_result($res_files,$f,'package_id') . '&group_id='.$group_id.'&start=1';
-					$link_content = $HTML->getMonitorPic($tmp_alt, $tmp_alt);
-					echo util_make_link ($link, $link_content);
-					echo '</td>
-						<td class="align-center">';
+				// -> notes
+				// accessibility: image is a link, so alt must be unique in page => construct a unique alt
+				$tmp_alt = $package_name . " - " . _('Release Notes');
+				$link = '/frs/?group_id=' . $group_id . '&view=shownotes&release_id='.$frsr->getID();
+				$link_content = $HTML->getReleaseNotesPic($tmp_alt, $tmp_alt);
+				echo util_make_link($link, $link_content);
+				echo '</td>';
 
-					// -> download
-					$tmp_alt = $package_name." ".$package_release." - ". _('Download');
-					$link_content = $HTML->getDownloadPic($tmp_alt, $tmp_alt);
-					$t_link_anchor = $HTML->toSlug($package_name)."-".$HTML->toSlug($package_release)."-title-content";
-					$link = '/frs/?group_id=' . $group_id . '&release_id=' . db_result($res_files, $f, 'release_id')."#".$t_link_anchor;
-					echo util_make_link ($link, $link_content);
-					echo '</td>
-					</tr>';
+				// -> monitor
+				if (session_loggedin()) {
+					echo '<td class="align-center">';
+					$url = '/frs/?group_id='.$group_id.'&package_id='.$frsp->getID().'&action=monitor';
+					if($frsp->isMonitoring()) {
+						$title = $package_name . " - " . _('Stop monitoring this package');
+						$url .= '&status=0';
+						$image = $HTML->getStopMonitoringPic($title);
+					} else {
+						$title = $package_name . " - " . _('Start monitoring this package');
+						$url .= '&status=1';
+						$image = $HTML->getStartMonitoringPic($title);
+					}
+					echo util_make_link('#', $image, array('id' => 'pkgid'.$frsp->getID(), 'onclick' => 'javascript:controllerFRS.doAction({action:\''.$url.'\', id:\'pkgid'.$frsp->getID().'\'})'), true);
+					echo '</td>';
 				}
+				echo '	<td class="align-center">';
+
+				// -> download
+				$tmp_alt = $package_name." ".$package_release." - ". _('Download');
+				$link_content = $HTML->getDownloadPic($tmp_alt, $tmp_alt);
+				$t_link_anchor = $HTML->toSlug($package_name)."-".$HTML->toSlug($package_release)."-title-content";
+				$link = '/frs/?group_id=' . $group_id . '&release_id='.$frsr->getID()."#".$t_link_anchor;
+				echo util_make_link ($link, $link_content);
+				echo '</td>
+				</tr>';
 			}
 			echo '</table>';
 		}
diff --git a/src/www/frs/admin/deletepackage.php b/src/www/frs/admin/deletepackage.php
deleted file mode 100644
index 28f684a..0000000
--- a/src/www/frs/admin/deletepackage.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-/**
- *
- * Project Admin: Edit Packages
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-require_once $gfcommon.'frs/FRSPackage.class.php';
-
-$group_id = getIntFromRequest('group_id');
-$package_id = getIntFromRequest('package_id');
-if (!$group_id) {
-	exit_no_group();
-}
-
-$project = group_get_object($group_id);
-if (!$project || !is_object($project)) {
-    exit_no_group();
-} elseif ($project->isError()) {
-	exit_error($project->getErrorMessage(),'frs');
-}
-
-session_require_perm ('frs', $group_id, 'write') ;
-
-$frsp = new FRSPackage($project,$package_id);
-if (!$frsp || !is_object($frsp)) {
-	exit_error(_('Could Not Get FRS Package'),'frs');
-} elseif ($frsp->isError()) {
-	exit_error($frsp->getErrorMessage(),'frs');
-}
-
-/*
-	Relatively simple form to delete packages of releases
-*/
-
-frs_admin_header(array('title'=>_('Delete Package')._(': ').$frsp->getName(),
-                       'group'=>$group_id));
-
-	echo '
-	<form action="/frs/admin/?group_id='.$group_id.'" method="post">
-	<p>
-	<input type="hidden" name="func" value="delete_package" />
-	<input type="hidden" name="package_id" value="'. $package_id .'" />
-	'._('You are about to permanently and irretrievably delete this package and all its releases and files!').'
-        </p>
-        <p>
-	<input type="checkbox" name="sure" value="1" />'._('I am Sure').'
-        </p>
-        <p>
-	<input type="checkbox" name="really_sure" value="1" />'._('I am Really Sure').'
-        </p>
-        <p>
-	<input type="submit" name="submit" value="'._('Delete').'" />
-        </p>
-	</form>';
-
-frs_admin_footer();
diff --git a/src/www/frs/admin/deleterelease.php b/src/www/frs/admin/deleterelease.php
deleted file mode 100644
index c15c1d3..0000000
--- a/src/www/frs/admin/deleterelease.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * Project Admin: Edit Packages
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-require_once $gfcommon.'frs/FRSPackage.class.php';
-require_once $gfcommon.'frs/FRSRelease.class.php';
-require_once $gfcommon.'frs/FRSFile.class.php';
-
-$group_id = getIntFromRequest('group_id');
-$package_id = getIntFromRequest('package_id');
-$release_id = getIntFromRequest('release_id');
-if (!$group_id) {
-	exit_no_group();
-}
-
-$project = group_get_object($group_id);
-if (!$project || !is_object($project)) {
-    exit_no_group();
-} elseif ($project->isError()) {
-	exit_error($project->getErrorMessage(),'frs');
-}
-
-session_require_perm ('frs', $group_id, 'write') ;
-
-$frsp = new FRSPackage($project,$package_id);
-if (!$frsp || !is_object($frsp)) {
-	exit_error(_('Could Not Get FRS Package'),'frs');
-} elseif ($frsp->isError()) {
-	exit_error($frsp->getErrorMessage(),'frs');
-}
-
-$frsr = new FRSRelease($frsp,$release_id);
-if (!$frsr || !is_object($frsr)) {
-	exit_error(_('Could Not Get FRS Release'),'frs');
-} elseif ($frsr->isError()) {
-	exit_error($frsr->getErrorMessage(),'frs');
-}
-
-/*
-	Relatively simple form to delete packages of releases
-*/
-
-frs_admin_header(array('title'=>_('Release Edit/File Releases'),'group'=>$group_id));
-
-	echo '
-	<form action="/frs/admin/showreleases.php?group_id='.$group_id.'&package_id='.$package_id.'" method="post">
-	<input type="hidden" name="func" value="delete_release" />
-	<input type="hidden" name="release_id" value="'. $release_id .'" />
-	'._('You are about to permanently and irretrievably delete this release and its files!').'
-	<p>
-	<input type="checkbox" name="sure" value="1" />'._('I am Sure').'<br />
-	<input type="checkbox" name="really_sure" value="1" />'._('I am Really Sure').'<br />
-	<input type="submit" name="submit" value="'._('Delete').'" />
-	</p>
-	</form>';
-
-frs_admin_footer();
diff --git a/src/www/frs/admin/editrelease.php b/src/www/frs/admin/editrelease.php
deleted file mode 100644
index 1024e2e..0000000
--- a/src/www/frs/admin/editrelease.php
+++ /dev/null
@@ -1,410 +0,0 @@
-<?php
-/**
- * Project Admin: Edit Releases of Packages
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * Copyright 2012-2014, Franck Villaume - TrivialDev
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/FRSPackage.class.php';
-require_once $gfcommon.'frs/FRSRelease.class.php';
-require_once $gfcommon.'frs/FRSFile.class.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-require_once $gfcommon.'docman/DocumentManager.class.php';
-
-$group_id = getIntFromRequest('group_id');
-$package_id = getIntFromRequest('package_id');
-$release_id = getIntFromRequest('release_id');
-if (!$group_id) {
-	exit_no_group();
-}
-if (!$package_id || !$release_id) {
-	session_redirect('/frs/admin/?group_id='.$group_id);
-}
-
-$group = group_get_object($group_id);
-if (!$group || !is_object($group)) {
-	exit_no_group();
-} elseif ($group->isError()) {
-	exit_error($group->getErrorMessage(),'frs');
-}
-session_require_perm ('frs', $group_id, 'write') ;
-
-//
-//  Get the package
-//
-$frsp = new FRSPackage($group,$package_id);
-if (!$frsp || !is_object($frsp)) {
-	exit_error(_('Could Not Get FRS Package'),'frs');
-} elseif ($frsp->isError()) {
-	exit_error($frsp->getErrorMessage(),'frs');
-}
-
-//
-//  Get the release
-//
-$frsr = new FRSRelease($frsp,$release_id);
-if (!$frsr || !is_object($frsr)) {
-	exit_error(_('Could Not Get FRS Release'),'frs');
-} elseif ($frsr->isError()) {
-	exit_error($frsr->getErrorMessage(),'frs');
-}
-
-$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $group->getUnixName();
-
-/*
- * Here's where we do the dirty work based on the step the user has chosen
- */
-
-// Edit release info
-if (getStringFromRequest('step1')) {
-	$release_date = getStringFromRequest('release_date');
-	$release_name = getStringFromRequest('release_name');
-	$status_id = getIntFromRequest('status_id');
-	$uploaded_notes = getUploadedFile('uploaded_notes');
-	$uploaded_changes = getUploadedFile('uploaded_changes');
-	$release_notes = getStringFromRequest('release_notes');
-	$release_changes = getStringFromRequest('release_changes');
-	$preformatted = getStringFromRequest('preformatted');
-	$exec_changes = true;
-
-	// Check for uploaded release notes
-	if ($uploaded_notes["tmp_name"]) {
-		if (!is_uploaded_file($uploaded_notes['tmp_name'])) {
-			exit_error(_('Attempted File Upload Attack'),'frs');
-		}
-		if ($uploaded_notes['type'] !== 'text/plain') {
-			$error_msg .= _('Release Notes Are not in Text').'<br />';
-			$exec_changes = false;
-		} else {
-			$notes = fread(fopen($uploaded_notes['tmp_name'],'r'),$uploaded_notes['size']);
-			if (strlen($notes) < 20) {
-				$error_msg .= _('Release Notes Are Too Small').'<br />';
-				$exec_changes = false;
-			}
-		}
-	} else {
-		$notes = $release_notes;
-	}
-
-	// Check for uploaded change logs
-	if ($uploaded_changes['tmp_name']) {
-		if (!is_uploaded_file($uploaded_changes['tmp_name'])) {
-			exit_error(_('Attempted File Upload Attack'),'frs');
-		}
-		if ($uploaded_changes['type'] !== 'text/plain') {
-			$error_msg .= _('Change Log Is not in Text').'<br />';
-			$exec_changes = false;
-		} else {
-			$changes = fread(fopen($uploaded_changes['tmp_name'],'r'), $uploaded_changes['size']);
-			if (strlen($changes) < 20) {
-				$error_msg .= _('Change Log Is Too Small').'<br />';
-				$exec_changes = false;
-			}
-		}
-	} else {
-		$changes = $release_changes;
-	}
-
-	// If we haven't encountered any problems so far then save the changes
-	if ($exec_changes == true) {
-		//$date_list = split('[- :]',$release_date,5);
-		//$release_date = mktime($date_list[3],$date_list[4],0,$date_list[1],$date_list[2],$date_list[0]);
-		$release_date = strtotime($release_date);
-		if (!$frsr->update($status_id,$release_name,$notes,$changes,$preformatted,$release_date)) {
-			exit_error($frsr->getErrorMessage(),'frs');
-		} else {
-			$feedback .= _('Data Saved');
-		}
-	}
-}
-
-// Add file(s) to the release
-if (getStringFromRequest('step2')) {
-	$userfile = getUploadedFile('userfile');
-	$userfile_name = $userfile['name'];
-	$type_id = getIntFromRequest('type_id');
-	$release_date = getStringFromRequest('release_date');
-	// Build a Unix time value from the supplied Y-m-d value
-	$release_date = strtotime($release_date);
-	$processor_id = getIntFromRequest('processor_id');
-	$group_unix_name=group_getunixname($group_id);
-	$ftp_filename = getStringFromRequest('ftp_filename');
-	$manual_filename = getStringFromRequest('manual_filename');
-	$docman_fileid = getIntFromRequest('docman_fileid');
-
-	$ret = frs_add_file_from_form($frsr, $type_id, $processor_id, $release_date,
-				       $userfile, $ftp_filename, $manual_filename, $docman_fileid);
-
-	if ($ret === true) {
-		$feedback = _('File Released') ;
-	} else {
-		$error_msg .= $ret ;
-	}
-}
-
-// Edit/Delete files in a release
-if (getStringFromRequest('step3')) {
-	$step3 = getStringFromRequest('step3');
-	$file_id = getIntFromRequest('file_id');
-	$processor_id = getIntFromRequest('processor_id');
-	$type_id = getIntFromRequest('type_id');
-	$new_release_id = getIntFromRequest('new_release_id');
-	$release_time = getStringFromRequest('release_time');
-	$group_id = getIntFromRequest('group_id');
-	$release_id = getIntFromRequest('release_id');
-	$package_id = getIntFromRequest('package_id');
-	$file_id = getIntFromRequest('file_id');
-	$im_sure = getStringFromRequest('im_sure');
-
-	// If the user chose to delete the file and he's sure then delete the file
-	if( $step3 == "Delete File" ) {
-		if ($im_sure) {
-			$frsf = new FRSFile($frsr,$file_id);
-			if (!$frsf || !is_object($frsf)) {
-				exit_error(_('Could Not Get FRSFile'),'frs');
-			} elseif ($frsf->isError()) {
-				exit_error($frsf->getErrorMessage(),'frs');
-			} else {
-				if (!$frsf->delete()) {
-					exit_error($frsf->getErrorMessage(),'frs');
-				} else {
-					$feedback .= _('File Deleted');
-				}
-			}
-		} else {
-			$error_msg .= _('File not deleted: you did not check “I am Sure”');
-		}
-	// Otherwise update the file information
-	} else {
-		$frsf = new FRSFile($frsr,$file_id);
-		if (!$frsf || !is_object($frsf)) {
-			exit_error(_('Could Not Get FRSFile'),'frs');
-		} elseif ($frsf->isError()) {
-			exit_error($frsf->getErrorMessage(),'frs');
-		} else {
-			//$date_list = split('[- :]',$release_time,5);
-			//$release_time = mktime($date_list[3],$date_list[4],0,$date_list[1],$date_list[2],$date_list[0]);
-			$release_time = strtotime($release_time);
-			if (!$frsf->update($type_id,$processor_id,$release_time,$new_release_id)) {
-				exit_error($frsf->getErrorMessage(),'frs');
-			} else {
-				$feedback .= _('File Updated');
-			}
-		}
-	}
-}
-
-frs_admin_header(array('title'=>_('Edit Releases'),'group'=>$group_id));
-/*
- * Show the forms for each step
- */
-?>
-
-<h2><?php echo _('Edit Release') ?></h2>
-
-<form enctype="multipart/form-data" method="post" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&release_id=$release_id&package_id=$package_id"; ?>">
-<input type="hidden" name="step1" value="1" />
-<table>
-<tr>
-	<td><strong><?php echo _('Release Date')._(':'); ?></strong></td>
-	<td><input type="text" name="release_date" value="<?php echo date('Y-m-d H:i',$frsr->getReleaseDate()) ?>" size="16" maxlength="16" /></td>
-</tr>
-<tr>
-	<td><strong><?php echo _('Release Name').utils_requiredField()._(':'); ?></strong></td>
-	<td><input type="text" name="release_name" value="<?php echo $frsr->getName(); ?>" required="required" pattern=".{3,}" title="<?php echo _('At least 3 characters') ?>"/></td>
-</tr>
-<tr>
-	<td><strong><?php echo _('Status')._(':'); ?></strong></td>
-	<td>
-		<?php
-			echo frs_show_status_popup('status_id',$frsr->getStatus());
-		?>
-	</td>
-</tr>
-<tr>
-	<td colspan="2">
-		<br />
-		<?php echo _('Edit the Release Notes or Change Log for this release of this package. These changes will apply to all files attached to this release.') ?>
-		<br />
-		<?php echo _('You can either upload the release notes and change log individually, or paste them in together below.') ?>
-	</td>
-</tr>
-<tr>
-	<td colspan="2"><strong><?php echo _('Upload Release Notes')._(':'); ?></strong>
-	<?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?></td>
-</tr>
-<tr>
-	<td><input type="file" name="uploaded_notes" size="30" /></td>
-</tr>
-<tr>
-	<td colspan="2"><strong><?php echo _('Upload Change Log')._(':'); ?></strong>
-	<?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?></td>
-</tr>
-<tr>
-	<td><input type="file" name="uploaded_changes" /></td>
-</tr>
-<tr>
-	<td colspan="2">
-		<strong><?php echo _('Paste The Notes In')._(':'); ?></strong><br />
-		<textarea name="release_notes" rows="10" cols="60"><?php echo $frsr->getNotes(); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td colspan="2">
-		<strong><?php echo _('Paste The Change Log In')._(':'); ?></strong><br />
-		<textarea name="release_changes" rows="10" cols="60"><?php echo $frsr->getChanges(); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td colspan="2">
-		<br />
-		<input type="checkbox" name="preformatted" value="1" <?php echo (($frsr->getPreformatted())?'checked="checked"':''); ?> /> <?php echo _('Preserve my pre-formatted text') ?>
-		<p>
-		<input type="submit" name="submit" value="<?php echo _('Submit/Refresh') ?>"/>
-		</p>
-	</td>
-</tr>
-</table>
-</form>
-<hr />
-
-<h2><?php echo _('Add Files To This Release') ?></h2>
-<p><?php echo _('Now, choose a file to upload into the system.') ?></p>
-
-<form enctype="multipart/form-data" method="post" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&release_id=$release_id&package_id=$package_id"; ?>">
-<input type="hidden" name="step2" value="1" />
-<fieldset><legend><strong><?php echo _("File Name") ?></strong></legend>
-<?php echo _("Upload a new file") ?>: <input type="file" name="userfile" /> <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?>
-<?php
-if (forge_get_config('use_ftp_uploads')) {
-	echo '<p>';
-	printf(_('Alternatively, you can use FTP to upload a new file at %s.'), forge_get_config('ftp_upload_host'));
-	echo '<br />';
-	echo _('Choose an already uploaded file:').'<br />';
-	$ftp_files_arr=frs_filterfiles(ls($upload_dir,true));
-	echo html_build_select_box_from_arrays($ftp_files_arr,$ftp_files_arr,'ftp_filename','');
-	echo '</p>';
-}
-
-if (forge_get_config('use_manual_uploads')) {
-	$incoming = forge_get_config('groupdir_prefix')."/".$group->getUnixName()."/incoming" ;
-	echo '<p>';
-	printf(_('Alternatively, you can use a file you already uploaded (by SFTP or SCP) to the <a href="%2$s">project\'s incoming directory</a> (%1$s).'),
-			$incoming, "sftp://" . forge_get_config ('web_host') . $incoming . "/");
-	echo ' ' . _('This direct <tt>sftp://</tt> link only works with some browsers, such as Konqueror.') . '<br />';
-	echo _('Choose an already uploaded file:').'<br />';
-	$manual_files_arr=frs_filterfiles(ls($incoming,true));
-	echo html_build_select_box_from_arrays($manual_files_arr,$manual_files_arr,'manual_filename','');
-	echo '</p>';
-}
-if ($group->usesDocman()) {
-	echo html_e('p', array(), _('Alternatively, you can pick a file available in the Documents Management tool.'), false);
-	$dm = new DocumentManager($group);
-	$dgf = new DocumentGroupFactory($group);
-	echo $dm->showSelectNestedGroups($dgf->getNested(), 'docman_fileid', true, 0, array(), true);
-}
-?>
-</fieldset>
-<table>
-<tr>
-<td>
-<strong><?php echo _('File Type')._(':'); ?></strong>
-<?php
-	print frs_show_filetype_popup ('type_id');
-?>
-</td>
-<td>
-<strong><?php echo _('Processor Type')._(':'); ?></strong>
-<?php
-	print frs_show_processor_popup ('processor_id');
-?>
-</td>
-</tr>
-</table>
-<p>
-<input type="submit" name="submit" value="<?php echo _('Add This File') ?>" /></p>
-</form>
-
-<?php
-	// Get a list of files associated with this release
-	$res=db_query_params ('SELECT * FROM frs_file WHERE release_id=$1',
-			array($release_id));
-	$rows=db_numrows($res);
-	if($rows > 0) {
-		echo '<hr />';
-		echo '<h2>'._('Edit Files In This Release').'</h2>';
-		print(_('Once you have added files to this release you <strong>must</strong> update each of these files with the correct information or they will not appear on your download summary page.')."\n");
-		$title_arr[]=_('File Name').'<br />'._('Release').'<br />';
-		$title_arr[]=_('Processor').'<br />'._('Release Date').'<br />';
-		$title_arr[]=_('File Type').'<br />'._('Update').'<br />';
-
-		echo $GLOBALS['HTML']->listTableTop ($title_arr);
-
-		for($x=0; $x<$rows; $x++) {
-?>
-			<form action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&release_id=$release_id&package_id=$package_id"; ?>" method="post">
-				<input type="hidden" name="file_id" value="<?php echo db_result($res,$x,'file_id'); ?>" />
-				<input type="hidden" name="step3" value="1" />
-				<tr <?php echo $HTML->boxGetAltRowStyle($x); ?>>
-					<td style="white-space: nowrap;"><?php echo db_result($res,$x,'filename'); ?></td>
-					<td><?php echo frs_show_processor_popup ('processor_id', db_result($res,$x,'processor_id')); ?></td>
-					<td><?php echo frs_show_filetype_popup ('type_id', db_result($res,$x,'type_id')); ?></td>
-				</tr>
-				<tr <?php echo $HTML->boxGetAltRowStyle($x); ?>>
-					<td>
-							<?php echo frs_show_release_popup ($group_id, $name='new_release_id',db_result($res,$x,'release_id')); ?>
-					</td>
-					<td>
-							<input type="text" name="release_time" value="<?php echo date('Y-m-d',db_result($res,$x,'release_time')); ?>" size="10" maxlength="10" />
-					</td>
-					<td><input type="submit" name="submit" value="<?php echo _('Update/Refresh') ?> " /></td>
-				</tr>
-				</form>
-
-			<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
-				<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
-				<input type="hidden" name="release_id" value="<?php echo $release_id; ?>" />
-				<input type="hidden" name="package_id" value="<?php echo $package_id; ?>" />
-				<input type="hidden" name="file_id" value="<?php echo db_result($res,$x,'file_id'); ?>" />
-				<input type="hidden" name="step3" value="Delete File" />
-				<tr <?php echo $HTML->boxGetAltRowStyle($x); ?>>
-					<td> </td>
-					<td> </td>
-					<td>
-							<input type="submit" name="submit" value="<?php echo _('Delete File') ?> " /> <input type="checkbox" name="im_sure" value="1" /> <?php echo _('I am Sure') ?>
-					</td>
-				</tr>
-			</form>
-<?php
-		}
-		echo $GLOBALS['HTML']->listTableBottom();
-	}
-
-echo '<p>' . sprintf(ngettext('There is %s user monitoring this package.', 'There are %s users monitoring this package.', $frsp->getMonitorCount()), $frsp->getMonitorCount()) . '</p>';
-
-frs_admin_footer();
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
diff --git a/src/www/frs/admin/index.php b/src/www/frs/admin/index.php
deleted file mode 100644
index 38236e0..0000000
--- a/src/www/frs/admin/index.php
+++ /dev/null
@@ -1,217 +0,0 @@
-<?php
-/**
- *
- * Project Admin: Edit Packages
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * Copyright 2010-2011, Franck Villaume - Capgemini
- * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-require_once $gfcommon.'frs/FRSPackage.class.php';
-require_once $gfcommon.'frs/FRSRelease.class.php';
-require_once $gfcommon.'frs/FRSFile.class.php';
-
-global $HTML;
-
-$group_id = getIntFromRequest('group_id');
-if (!$group_id) {
-	exit_no_group();
-}
-
-$project = group_get_object($group_id);
-if (!$project || !is_object($project)) {
-    exit_no_group();
-} elseif ($project->isError()) {
-	exit_error($project->getErrorMessage(), 'frs');
-}
-
-session_require_perm('frs', $group_id, 'write');
-
-/*
-	Relatively simple form to edit/add packages of releases
-*/
-
-// only admin can modify packages (vs modifying releases of packages)
-if (getStringFromRequest('submit')) {
-	$func = getStringFromRequest('func');
-	$package_id = getIntFromRequest('package_id');
-	$package_name = htmlspecialchars(trim(getStringFromRequest('package_name')));
-	$is_public = getIntFromRequest('is_public');
-	$status_id = getIntFromRequest('status_id');
-
-	/*
-		make updates to the database
-	*/
-	if ($func == 'add_package' && $package_name) {
-
-		//create a new package
-		$frsp = new FRSPackage($project);
-		if (!$frsp || !is_object($frsp)) {
-			exit_error(_('Could Not Get FRS Package'), 'frs');
-		} elseif ($frsp->isError()) {
-			exit_error($frsp->getErrorMessage(), 'frs');
-		}
-		if (!$frsp->create($package_name, $is_public)) {
-			exit_error($frsp->getErrorMessage(), 'frs');
-		} else {
-			$feedback .= _('Added Package');
-		}
-
-	} elseif ($func == 'delete_package' && $package_id) {
-
-		//delete a package
-		$frsp = new FRSPackage($project, $package_id);
-		if (!$frsp || !is_object($frsp)) {
-			exit_error(_('Could Not Get FRS Package'), 'frs');
-		} elseif ($frsp->isError()) {
-			exit_error($frsp->getErrorMessage(), 'frs');
-		}
-
-		$sure = getIntFromRequest("sure");
-		$really_sure = getIntFromRequest("really_sure");
-		if (!$frsp->delete($sure, $really_sure)) {
-			exit_error($frsp->getErrorMessage(), 'frs');
-		} else {
-			$feedback .= _('Deleted');
-		}
-
-	} elseif ($func == 'update_package' && $package_id && $package_name) {
-		$frsp = new FRSPackage($project, $package_id);
-		if (!$frsp || !is_object($frsp)) {
-			exit_error(_('Could Not Get FRS Package'), 'frs');
-		} elseif ($frsp->isError()) {
-			exit_error($frsp->getErrorMessage(), 'frs');
-		}
-		if (!$frsp->update($package_name, $status_id, $is_public)) {
-			exit_error($frsp->getErrorMessage(), 'frs');
-		} else {
-			$feedback .= _('Updated Package');
-		}
-	}
-}
-
-frs_admin_header(array('title'=>_('Release Edit/File Releases'), 'group'=>$group_id));
-
-$res = db_query_params('SELECT status_id, package_id, name AS package_name, is_public
-			FROM frs_package WHERE group_id=$1',
-			array($group_id));
-$rows = db_numrows($res);
-if ($res && $rows > 0) {
-	echo '<h2>'._('QRS').'</h2>';
-	echo _('Click here to ').util_make_link('/frs/admin/qrs.php?group_id='.$group_id, _('quick-release a file'));
-	echo '<br />';
-}
-?>
-
-<fieldset>
-<legend><?php echo _('Help about Packages and Releases');?></legend>
-<h2><?php echo _("Packages") ?></h2>
-<p><?php echo _("You can use packages to group different file releases together, or use them however you like.") ?></p>
-<h3><?php echo _("An example of packages:") ?></h3>
-<p><strong>Mysql-win</strong><br /><strong>Mysql-unix</strong><br /><strong>Mysql-odbc</strong></p>
-<h3><?php echo _("Your Packages:") ?></h3>
-<ol>
-    <li><?php echo _("Define your packages") ?></li>
-    <li><?php echo _("Create new releases of packages") ?></li>
-</ol>
-<h2><?php echo _("Releases of Packages") ?></h2>
-<p><?php echo _("A release of a package can contain multiple files.") ?></p>
-<h3><?php echo _("Examples of Releases") ?></h3>
-<p><strong>3.22.1</strong><br /><strong>3.22.2</strong><br /><strong>3.22.3</strong></p>
-<p><?php echo _("You can create new releases of packages by clicking on <strong>Add/Edit Releases</strong> next to your package name") ?>.</p>
-</fieldset>
-
-<?php
-/*
-	Show a list of existing packages
-	for this project so they can
-	be edited
-*/
-
-if (!$res || $rows < 1) {
-	echo $HTML->information(_('There are no packages defined.'));
-} else {
-	$title_arr = array();
-	$title_arr[] = _('Releases');
-	$title_arr[] = _('Package name');
-	$title_arr[] = _('Status');
-	$title_arr[] = _('Publicly Viewable');
-
-	echo '
-		<form action="'.util_make_uri('/frs/admin/').'" method="post">
-		<input type="hidden" name="group_id" value="'.$group_id.'" />
-		<input type="hidden" name="func" value="update_package" />';
-	echo $HTML->listTableTop($title_arr);
-
-	for ($i = 0; $i < $rows; $i++) {
-		echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>
-			<td style="white-space: nowrap;" align="center">'.
-				util_make_link('/frs/admin/qrs.php?package_id='.db_result($res, $i, 'package_id').'&group_id='.$group_id, '<strong>['._('Add Release').']</strong>');
-		$packageObject = frspackage_get_object(db_result($res, $i, 'package_id'));
-		if (count($packageObject->getReleases())) {
-			echo util_make_link('/frs/admin/showreleases.php?package_id='.db_result($res, $i, 'package_id').'&group_id='.$group_id, '<strong>['._('Edit Releases').']</strong>');
-		}
-		echo '	</td>
-			<td><input type="hidden" name="package_id" value="'. db_result($res, $i, 'package_id') .'" /><input type="text" name="package_name" value="'.db_result($res, $i, 'package_name') .'" size="20" maxlength="60" required="required" pattern=".{3,}" title="'. _('At least 3 characters') .'" /></td>
-			<td>'.frs_show_status_popup('status_id', db_result($res, $i, 'status_id')).'</td>
-			<td>'.frs_show_public_popup('is_public', db_result($res, $i, 'is_public')).'</td>
-			<td><input type="submit" name="submit" value="'._('Update').'" />'.
-				util_make_link('/frs/admin/deletepackage.php?package_id='.db_result($res,$i,'package_id').'&group_id='.$group_id, '<strong>['._('Delete').']</strong>').
-			'</td>
-			</tr>';
-	}
-
-	echo $HTML->listTableBottom();
-	echo '</form>';
-}
-
-/*
-	form to create a new package
-*/
-
-?>
-
-<fieldset>
-<legend><?php echo _('Create New Package') ?></legend>
-<form action="<?php echo util_make_uri('/frs/admin'); ?>" method="post">
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
-<input type="hidden" name="func" value="add_package" />
-<p><strong><?php echo _('New Package Name')._(':'); ?></strong>
-<input type="text" name="package_name" value="" size="20" maxlength="30" required="required" pattern=".{3,}" title="<?php echo _('At least 3 characters') ?>" /></p>
-<p><strong><?php echo _('Publicly Viewable')._(':'); ?></strong>
-<input type="radio" name="is_public" value="1" checked="checked" /> <?php echo _('Public'); ?>
-<input type="radio" name="is_public" value="0" /> <?php echo _('Private'); ?></p>
-<p><input type="submit" name="submit" value="<?php echo _('Create This Package') ?>" /></p>
-</form>
-</fieldset>
-
-<?php
-
-frs_admin_footer();
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
diff --git a/src/www/frs/admin/qrs.php b/src/www/frs/admin/qrs.php
deleted file mode 100644
index afb9eac..0000000
--- a/src/www/frs/admin/qrs.php
+++ /dev/null
@@ -1,275 +0,0 @@
-<?php
-/**
- * FusionForge File Release Facility
- *
- * Copyright 1999-2001 (c) VA Linux Systems , Darrell Brogdon
- * Copyright 2002 (c) GForge, LLC
- * Copyright 2010 (c), FusionForge Team
- * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
- * Copyright 2014, Franck Villaume - TrivialDev
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/FRSPackage.class.php';
-require_once $gfcommon.'frs/FRSRelease.class.php';
-require_once $gfcommon.'frs/FRSFile.class.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-
-$group_id = getIntFromRequest('group_id');
-$package_id = getIntFromRequest('package_id');
-
-if (!$group_id)
-	exit_no_group();
-
-$g = group_get_object($group_id);
-
-if (!$g || !is_object($g)) {
-	exit_no_group();
-} elseif ($g->isError()) {
-	exit_error('Error', $g->getErrorMessage(), 'frs');
-}
-
-// check the permissions and see if this user is a release manager.
-// If so, he can create a release
-session_require_perm('frs', $group_id, 'write');
-
-$packages = get_frs_packages($g);
-
-$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $g->getUnixName();
-
-if (getStringFromRequest('submit')) {
-	$release_name = trim(getStringFromRequest('release_name'));
-	$userfile = getUploadedFile('userfile');
-	$userfile_name = $userfile['name'];
-	$type_id = getIntFromRequest('type_id');
-	$processor_id = getIntFromRequest('processor_id');
-	$release_date = getStringFromRequest('release_date');
-	// Build a Unix time value from the supplied Y-m-d value
-	$release_date = strtotime($release_date);
-	$release_notes = getStringFromRequest('release_notes');
-	$release_changes = getStringFromRequest('release_changes');
-	$preformatted = getStringFromRequest('preformatted');
-	$ftp_filename = getStringFromRequest('ftp_filename');
-	$manual_filename = getStringFromRequest('manual_filename');
-	$group_unix_name=group_getunixname($group_id);
-
-	$warning_msg = '' ;
-	if (!$release_name) {
-		$warning_msg .= _('Must define a release name.');
-	} else 	if (!$package_id) {
-		$warning_msg .= _('Must select a package.');
-
-	} else {
-
-		//
-		//	Get the package
-		//
-		$frsp = new FRSPackage($g,$package_id);
-		if (!$frsp || !is_object($frsp)) {
-			exit_error(_('Could Not Get FRS Package'),'frs');
-		} elseif ($frsp->isError()) {
-			exit_error($frsp->getErrorMessage(),'frs');
-		} else {
-			//
-			//	Create a new FRSRelease in the db
-			//
-			$frsr = new FRSRelease($frsp);
-			if (!$frsr || !is_object($frsr)) {
-				exit_error(_('Could Not Get FRS Release'),'frs');
-			} elseif ($frsr->isError()) {
-				exit_error($frsr->getErrorMessage(),'frs');
-			} else {
-				db_begin();
-				if (!$frsr->create($release_name,$release_notes,$release_changes,
-						   $preformatted,$release_date)) {
-					db_rollback();
-					exit_error($frsr->getErrorMessage(),'frs');
-				}
-
-				$ret = frs_add_file_from_form ($frsr, $type_id, $processor_id, $release_date,
-							       $userfile, $ftp_filename, $manual_filename) ;
-
-				if ($ret !== true) {
-					db_rollback() ;
-					exit_error ($ret,'frs') ;
-				}
-				$frsr->sendNotice();
-
-				frs_admin_header(array('title'=>_('Quick Release System'),'group'=>$group_id));
-				echo '<p>';
-				printf (_('You can now <a href="%1$s"><strong>add files to this release</strong></a> if you wish, or edit the release. Please note that file(s) may not appear immediately on the <a href="%2$s">download page</a>. Allow several hours for propagation.'),
-					util_make_url ('/frs/admin/editrelease.php?release_id='.$frsr->getID().'&group_id='.$group_id.'&package_id='.$package_id),
-					util_make_url ('/frs/?group_id='.$group_id)
-					) ;
-				echo '</p>';
-				db_commit();
-				frs_admin_footer();
-				exit();
-			}
-		}
-	}
-} else {
-	$release_name = '';
-	$userfile = '';
-	$userfile_name = '';
-	$type_id = '';
-	$processor_id = '';
-	$release_date = '';
-	$release_notes = '';
-	$release_changes = '';
-	$preformatted = '';
-	$ftp_filename = '';
-	$manual_filename = '';
-}
-
-frs_admin_header(array('title'=>_('Quick Release System'),'group'=>$group_id));
-
-?>
-
-<form enctype="multipart/form-data" method="post" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id"; ?>">
-	<table>
-	<tr>
-		<td>
-			<strong><?php echo _('Package ID')._(':'); ?></strong>
-		</td>
-		<td>
-<?php
-	$res=db_query_params("SELECT * FROM frs_package WHERE group_id=$1 AND status_id='1'", array($group_id));
-	$rows=db_numrows($res);
-	if (!$res || $rows < 1) {
-		echo '<h4>'._('No File Types Available').'</h4>';
-	} else {
-
-		echo '<select name="package_id">';
-		for ($i=0; $i<$rows; $i++) {
-			echo '<option value="' . db_result($res,$i,'package_id') .
-				((db_result($res,$i,'package_id') ==$package_id) ? '" selected="selected"' : '"').'>' .
-				db_result($res,$i,'name') . '</option>';
-		}
-		echo '</select>';
-	}
-?>
-			  
-
-			<?php printf(_('Or %1$s create a new package %2$s'), '<a href="'.util_make_url ('/frs/admin/?group_id='.$group_id).'">', '</a>') ?>
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<strong><?php echo _('Release Name').utils_requiredField()._(':'); ?></strong>
-		</td>
-		<td>
-			<input type="text" required="required" name="release_name" value="<?php echo htmlspecialchars($release_name) ?>" pattern=".{3,}" title="<?php echo  _('At least 3 characters') ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<strong><?php echo _('Release Date')._(':'); ?></strong>
-		</td>
-		<td>
-			<input type="text" name="release_date" value="<?php echo date('Y-m-d H:i'); ?>" size="16" maxlength="16" />
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<h4><?php echo _('File Name')._(':'); ?><?php echo utils_requiredField();?></h4>
-		</td>
-		<td>
-		<div class="important">
-		<?php printf(_('You can probably not upload files larger than about %.2f MiB in size.'), util_get_maxuploadfilesize() / 1048576); ?><br />
-		</div>
-		<?php echo _('Upload a new file')._(': '); ?><input type="file" name="userfile"  size="30" />
-		<?php if (forge_get_config('use_ftp_uploads')) {
-			echo '<p>';
-			printf(_('Alternatively, you can use FTP to upload a new file at %s.'), forge_get_config('ftp_upload_host'));
-			echo '<br />';
-			echo _('Choose an FTP file instead of uploading:').'<br />';
-			$ftp_files_arr=frs_filterfiles(ls($upload_dir,true));
-			echo html_build_select_box_from_arrays($ftp_files_arr,$ftp_files_arr,'ftp_filename','');
-			echo '</p>';
-		}
-		if (forge_get_config('use_manual_uploads')) {
-			$incoming = forge_get_config('groupdir_prefix')."/".$g->getUnixName()."/incoming" ;
-			echo '<p>';
-			printf(_('Alternatively, you can use a file you already uploaded (by SFTP or SCP) to the <a href="%2$s">project\'s incoming directory</a> (%1$s).'),
-				$incoming, "sftp://" . forge_get_config ('web_host') . $incoming . "/");
-			echo ' ' . _('This direct <tt>sftp://</tt> link only works with some browsers, such as Konqueror.') . '<br />';
-			echo _('Choose an already uploaded file:').'<br />';
-			$manual_files_arr=frs_filterfiles(ls($incoming,true));
-			echo html_build_select_box_from_arrays($manual_files_arr,$manual_files_arr,'manual_filename','');
-			echo '</p>';
-		}
-?>
-
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<strong><?php echo _('File Type')._(':'); ?></strong>
-		</td>
-		<td>
-<?php
-	print frs_show_filetype_popup ('type_id',$type_id);
-?>
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<strong><?php echo _('Processor Type')._(':'); ?></strong>
-		</td>
-		<td>
-<?php
-	print frs_show_processor_popup ('processor_id',$processor_id);
-?>
-		</td>
-	</tr>
-	<tr>
-		<td class="top">
-			<strong><?php echo _('Release Notes')._(':'); ?></strong>
-		</td>
-		<td>
-			<textarea name="release_notes" rows="7" cols="50"><?php echo htmlspecialchars($release_notes); ?></textarea>
-		</td>
-	</tr>
-	<tr>
-		<td class="top">
-			<strong><?php echo _('Change Log')._(':'); ?></strong>
-		</td>
-		<td>
-			<textarea name="release_changes" rows="7" cols="50"><?php echo htmlspecialchars($release_changes); ?></textarea>
-		</td>
-	</tr>
-	<tr>
-		<td colspan="2" style="text-align:center">
-			<input type="checkbox" name="preformatted" value="1" /> <?php echo _('Preserve my pre-formatted text') ?>
-			<p><input type="submit" name="submit" value="<?php echo _('Release File') ?>" /></p>
-		</td>
-	</tr>
-	</table>
-</form>
-
-<?php
-
-frs_admin_footer();
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
diff --git a/src/www/frs/admin/showreleases.php b/src/www/frs/admin/showreleases.php
deleted file mode 100644
index 2dfb518..0000000
--- a/src/www/frs/admin/showreleases.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-/**
- * Project Admin: Edit Releases of Packages
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * Copyright 2010 (c), FusionForge Team
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/* Updated rewrite of the File Release System to clean up the UI
- * a little and incorporate FRS.class.php.		-Darrell
- */
-
-require_once '../../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-require_once $gfcommon.'frs/FRSPackage.class.php';
-require_once $gfcommon.'frs/FRSRelease.class.php';
-require_once $gfcommon.'frs/FRSFile.class.php';
-
-$group_id = getIntFromRequest('group_id');
-$package_id = getIntFromRequest('package_id');
-if (!$group_id) {
-	exit_no_group();
-}
-if (!$package_id) {
-    $msg = _('Choose package');
-	session_redirect('/frs/admin/?group_id='.$group_id.'?feedback='.urlencode($msg));
-}
-
-$project = group_get_object($group_id);
-if (!$project || !is_object($project)) {
-    exit_no_group();
-} elseif ($project->isError()) {
-	exit_error($project->getErrorMessage(),'frs');
-}
-
-session_require_perm ('frs', $group_id, 'write') ;
-
-$frsp = new FRSPackage($project,$package_id);
-if (!$frsp || !is_object($frsp)) {
-	exit_error(_('Could Not Get FRS Package'),'frs');
-} elseif ($frsp->isError()) {
-	exit_error($frsp->getErrorMessage(),'frs');
-}
-
-//
-//
-//
-$release_id = getIntFromRequest('release_id');
-$func = getStringFromRequest('func');
-if ($func=='delete_release' && $release_id) {
-	$sure = getStringFromRequest('sure');
-	$really_sure = getStringFromRequest('really_sure');
-
-	$frsr = new FRSRelease($frsp,$release_id);
-	if (!$frsr || !is_object($frsr)) {
-		exit_error(_('Could Not Get FRS Release'),'frs');
-	} elseif ($frsr->isError()) {
-		exit_error($frsr->getErrorMessage(),'frs');
-	}
-	if (!$frsr->delete($sure,$really_sure)) {
-		exit_error($frsr->getErrorMessage(),'frs');
-	} else {
-		$feedback .= _('Deleted');
-	}
-}
-
-/*
-	Get the releases of this package
-*/
-$rs = $frsp->getReleases();
-if (count($rs) < 1) {
-	exit_error(_('No Releases Of This Package Are Available'),'frs');
-}
-
-/*
-	Display a list of releases in this package
-*/
-frs_admin_header(array('title'=>_('Release New File Version'),'group'=>$group_id));
-
-$title_arr=array();
-$title_arr[]=_('Package name');
-$title_arr[]=_('Release Name');
-$title_arr[]=_('Date');
-
-echo $GLOBALS['HTML']->listTableTop($title_arr);
-
-for ($i=0; $i<count($rs); $i++) {
-	echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>
-			<td>'.$frsp->getName().'</td>
-			<td><a href="editrelease.php?group_id='.$group_id
-				.'&package_id='.$package_id
-				.'&release_id='.$rs[$i]->getID().'">'.
-				$rs[$i]->getName().' ['._('Edit').']</a>
-				<a href="deleterelease.php?group_id='.$group_id
-				.'&package_id='.$package_id
-				.'&release_id='.$rs[$i]->getID().'">['._('Delete').']</a></td><td>'.
-				date('Y-m-d H:i',$rs[$i]->getReleaseDate()).'</td></tr>';
-}
-
-echo $GLOBALS['HTML']->listTableBottom();
-
-frs_admin_footer();
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
diff --git a/src/www/frs/download.php b/src/www/frs/download.php
index 382aeb7..b6c6520 100644
--- a/src/www/frs/download.php
+++ b/src/www/frs/download.php
@@ -24,7 +24,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-$no_gz_buffer=true;
+$no_gz_buffer = true;
 
 require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
diff --git a/src/www/frs/index.php b/src/www/frs/index.php
index eb6e5ac..df719f1 100644
--- a/src/www/frs/index.php
+++ b/src/www/frs/index.php
@@ -27,7 +27,13 @@
 require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'frs/include/frs_utils.php';
+require_once $gfcommon.'frs/FRSFile.class.php';
+require_once $gfcommon.'frs/FRSPackage.class.php';
 require_once $gfcommon.'frs/FRSPackageFactory.class.php';
+require_once $gfcommon.'frs/FRSRelease.class.php';
+require_once $gfcommon.'reporting/report_utils.php';
+require_once $gfcommon.'reporting/ReportDownloads.class.php';
+require_once $gfcommon.'docman/DocumentManager.class.php';
 
 global $HTML;
 /* are we using frs ? */
@@ -77,173 +83,35 @@ if($content_type != $default_content_type) {
 	exit(0);
 }
 
-
-$fpFactory = new FRSPackageFactory($g);
-if (!$fpFactory || !is_object($fpFactory)) {
-	exit_error(_('Could Not Get FRSPackageFactory'), 'frs');
-} elseif ($fpFactory->isError()) {
-	exit_error($fpFactory->getErrorMessage(), 'frs');
-}
-
-$FRSPackages = $fpFactory->getFRSs();
-
-frs_header(array('title'=>_('Project Filelist'),'group'=>$group_id));
-
-plugin_hook("blocks", "files index");
-
-if ( count($FRSPackages) < 1) {
-	echo "<h1>"._('No File Packages')."</h1>";
-	echo $HTML->warning_msg(_('There are no file packages defined for this project.'));
-} else {
-	echo '<div id="forge-frs" class="underline-link">'."\n";
-
-	echo '<div class="blue-box">'._('Below is a list of all files of the project.').' ';
-	if ($release_id) {
-		echo _('The release you have chosen is <span class="selected">highlighted</span>.').' ';
+/* everything sounds ok, now let do the job */
+$action = getStringFromRequest('action');
+switch ($action) {
+	case 'addfile':
+	case 'addpackage':
+	case 'addrelease':
+	case 'deletefile':
+	case 'deletepackage':
+	case 'deleterelease':
+	case 'editfile':
+	case 'editrelease':
+	case 'monitor':
+	case 'updatepackage': {
+		include ($gfcommon.'frs/actions/'.$action.'.php');
+		break;
 	}
-	echo _('Before downloading, you may want to read Release Notes and ChangeLog (accessible by clicking on release version).').'
-	</div><!-- class="blue-box" -->
-    '."\n";
-
-	// check the permissions and see if this user is a release manager.
-	// If so, offer the opportunity to create a release
+}
 
-	if (forge_check_perm ('frs', $group_id, 'write')) {
-		echo '<p>'.util_make_link('/frs/admin/qrs.php?group_id='.$group_id, _('To create a new release click here.'));
-		echo '</p>';
-	}
+html_use_jqueryui();
+use_javascript('/frs/scripts/FRSController.js');
 
+site_project_header(array('title' => _('Project Filelist for ').$g->getPublicName(), 'group' => $group_id, 'toptab' => 'frs'));
 
-	$proj_stats['packages'] = count($FRSPackages);
-	$proj_stats['releases'] = 0;
-	$proj_stats['size']     = 0;
-
-	// Iterate and show the packages
-	foreach ($FRSPackages as $FRSPackage) {
-
-		$package_id = $FRSPackage->getID();
-
-		$package_name = $FRSPackage->getName();
-
-		if($FRSPackage->isMonitoring()) {
-			$title = $package_name . " - " . _('Stop monitoring this package');
-			$url = '/frs/monitor.php?filemodule_id='. $package_id .'&group_id='.$FRSPackage->Group->getID().'&stop=1';
-			$package_monitor = util_make_link($url, $HTML->getMonitorPic($title));
-		} else {
-			$title = $package_name . " - " . _('Monitor this package');
-			$url = '/frs/monitor.php?filemodule_id='. $package_id .'&group_id='.$FRSPackage->Group->getID().'&start=1';
-			$package_monitor = util_make_link($url, $HTML->getMonitorPic($title));
-		}
-
-		$package_name_protected = $HTML->toSlug($package_name);
-		echo "\n".'<h2 id="title_'. $package_name_protected .'">' . $package_name . ' <span class="frs-monitor-package">' . $package_monitor . '</span></h2>'."\n";
-
-		// get the releases of the package
-		$FRSPackageReleases = $FRSPackage->getReleases();
-		$num_releases = count($FRSPackageReleases);
-
-		$proj_stats['releases'] += $num_releases;
-
-		if ( !$FRSPackageReleases || $num_releases < 1 ) {
-			echo $HTML->warning_msg(_('No releases'));
-		} else {
-			if (class_exists('ZipArchive')) {
-				// display link to latest-release-as-zip
-				print '<p><em>'._('Download latest release as ZIP:').' ';
-				print util_make_link ('/frs/download.php/latestzip/'.$FRSPackage->getID().'/'.$FRSPackage->getNewestReleaseZipName(),
-						$FRSPackage->getNewestReleaseZipName(),
-						array('title' => _('This link always points to the newest release as a ZIP file.')));
-				print '</em></p>';
-			}
-
-			// iterate and show the releases of the package
-			foreach ($FRSPackageReleases as $FRSPackageRelease) {
-				$package_release_id = $FRSPackageRelease->getID();
-
-				// Switch whether release_id exists and/or release_id is current one
-				if ( ! $release_id || $release_id == $package_release_id ) {
-					// no release_id OR release_id is current one
-					$release_title = util_make_link('/frs/shownotes.php?release_id=' . $package_release_id, $package_name.' '.$FRSPackageRelease->getName().' ('.date(_('Y-m-d H:i'), $FRSPackageRelease->getReleaseDate()).')');
-					echo $HTML->boxTop($release_title, $package_name . '_' . $FRSPackageRelease->getName())."\n";
-				} elseif ( $release_id!=$package_release_id ) {
-					// release_id but not current one
-					$t_url_anchor = $HTML->toSlug($package_name)."-".$HTML->toSlug($FRSPackageRelease->getName())."-title-content";
-					$t_url = '/frs/?group_id='.$group_id.'&release_id=' . $package_release_id . "#" . $t_url_anchor;
-					$release_title = util_make_link( $t_url, $package_name.' '.$FRSPackageRelease->getName());
-					echo '<div class="frs_release_name_version">'.$release_title."</div>"."\n";
-				}
-
-				// get the files in this release....
-				$res_files = $FRSPackageRelease->getFiles();
-				$num_files = count($FRSPackageRelease);
-
-				@$proj_stats['files'] += $num_files;
-
-				$cell_data = array();
-				$cell_data[] = _('File Name');
-				$cell_data[] = _('Date');
-				$cell_data[] = _('Size');
-				$cell_data[] = _('D/L');
-				$cell_data[] = _('Arch');
-				$cell_data[] = _('Type');
-				$cell_data[] = _('Latest');
-
-				// Switch whether release_id exists and/or release_id == package_release['release_id']
-				if ( ! $release_id ) {
-					// no release_id
-					echo $HTML->listTableTop($cell_data,'',false);
-				} elseif ( $release_id==$package_release_id ) {
-					// release_id is current one
-					echo $HTML->listTableTop($cell_data,'',true);
-				} else {
-				// release_id but not current one => dont print anything here
-				}
-
-				if ( ! $release_id || $release_id == $package_release_id ) {
-					// no release_id OR no release_id OR release_id is current one
-					if ( !$res_files || $num_files < 1 ) {
-						echo '<tr><td colspan="7">  <em>'._('No releases').'</em></td></tr>
-						';
-					} else {
-						// now iterate and show the files in this release....
-						foreach ($res_files as $res_file) {
-
-						$tmp_col1 = util_make_link('/frs/download.php/file/'.$res_file->getID().'/'.$res_file->getName(), $res_file->getName());
-						$tmp_col2 = date(_('Y-m-d H:i'), $res_file->getReleaseTime());
-						$tmp_col3 = human_readable_bytes($res_file->getSize());
-						$tmp_col4 = ($res_file->getDownloads() ? number_format($res_file->getDownloads(), 0) : '0');
-						$tmp_col5 = $res_file->getProcessor();
-						$tmp_col6 = $res_file->getFileType();
-						$tmp_col7 = util_make_link('/frs/download.php/latestfile/'.$FRSPackage->getID().'/'.$res_file->getName(), _('Latest version'));
-
-						$proj_stats['size'] += $res_file->getSize();
-						@$proj_stats['downloads'] += $res_file->getDownloads();
-
-						echo '<tr ' . ">\n";
-						echo ' <td>' . $tmp_col1 . '</td>'."\n";
-						echo ' <td>' . $tmp_col2 . '</td>'."\n";
-						echo ' <td>' . $tmp_col3 . '</td>'."\n";
-						echo ' <td>' . $tmp_col4 . '</td>'."\n";
-						echo ' <td>' . $tmp_col5 . '</td>'."\n";
-						echo ' <td>' . $tmp_col6 . '</td>'."\n";
-						echo ' <td>' . $tmp_col7 . '</td>'."\n";
-						echo '</tr>'."\n";
-						}
-					}
-					echo $HTML->listTableBottom();
-				} else {
-					// release_id but not current one
-					// nothing to print here
-				}
-
-				if ( ! $release_id || $release_id==$package_release_id ) {
-					echo $HTML->boxBottom();
-				}
-			} //for: release(s)
-		} //if: release(s) available
-	}
-echo '</div><!-- id="forge-frs" -->';
+echo html_ao('div', array('id' => 'menu'));
+include ($gfcommon.'frs/views/menu.php');
+echo html_ac(html_ap() - 1);
 
-}
+echo html_ao('div', array('id' => 'views'));
+include ($gfcommon.'frs/views/views.php');
+echo html_ac(html_ap() - 1);
 
-frs_footer();
+site_project_footer();
diff --git a/src/www/frs/monitor.php b/src/www/frs/monitor.php
deleted file mode 100644
index f5d9fa6..0000000
--- a/src/www/frs/monitor.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-/**
- * FRS Facility
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * Copyright 2010 (c) FusionForge Team
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/FRSPackage.class.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-
-if (session_loggedin()) {
-	$group_id = getIntFromRequest('group_id');
-	$filemodule_id = getIntFromRequest('filemodule_id');
-	$start = getIntFromRequest('start');
-	$stop = getIntFromRequest('stop');
-
-	if ($group_id && $filemodule_id) {
-		//
-		//  Set up local objects
-		//
-		$g = group_get_object($group_id);
-		if (!$g || !is_object($g) || $g->isError()) {
-			exit_no_group();
-		}
-
-		$f=new FRSPackage($g,$filemodule_id);
-		if (!$f || !is_object($f)) {
-			exit_error(_('Error Getting FRSPackage'),'frs');
-		} elseif ($f->isError()) {
-			exit_error($f->getErrorMessage(),'frs');
-		}
-
-		if ($stop) {
-			if (!$f->stopMonitor()) {
-				exit_error($f->getErrorMessage(),'frs');
-			} else {
-                $feedback = _('Monitoring Stopped');
-				frs_header(array('title'=>_('Monitoring Stopped'),'group'=>$group_id));
-				frs_footer();
-			}
-		} elseif($start) {
-			if (!$f->setMonitor()) {
-				exit_error($f->getErrorMessage(),'frs');
-			} else {
-                $feedback = _('Monitoring Started');
-				frs_header(array('title'=>_('Monitoring Started'),'group'=>$group_id));
-				frs_footer();
-			}
-		}
-	} else {
-		exit_missing_param('',array(_('Project ID'),_('File Module ID')),'frs');
-	}
-} else {
-	exit_not_logged_in();
-}
diff --git a/src/www/frs/reporting/downloads.php b/src/www/frs/reporting/downloads.php
deleted file mode 100644
index ba2d978..0000000
--- a/src/www/frs/reporting/downloads.php
+++ /dev/null
@@ -1,216 +0,0 @@
-<?php
-/**
- * Copyright (C) 2009-2012 Alain Peyrat, Alcatel-Lucent
- * Copyright 2012,2014, Franck Villaume - TrivialDev
- * http://fusionforge.org
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/**
- * Standard Alcatel-Lucent disclaimer for contributing to open source
- *
- * "The program ("Contribution") has not been tested and/or
- * validated for release as or in products, combinations with products or
- * other commercial use. Any use of the Contribution is entirely made at
- * the user's own responsibility and the user can not rely on any features,
- * functionalities or performances Alcatel-Lucent has attributed to the
- * Contribution.
- *
- * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
- * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
- * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
- * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
- * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
- * ALONE BASIS."
- */
-
-require_once '../../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-require_once $gfcommon.'reporting/report_utils.php';
-require_once $gfcommon.'reporting/ReportDownloads.class.php';
-
-global $HTML;
-
-$group_id = getIntFromRequest('group_id');
-$package_id = getIntFromRequest('package_id');
-$start = getIntFromRequest('start');
-$end = getIntFromRequest('end');
-
-if (!$group_id) {
-	exit_no_group();
-}
-
-$group = group_get_object($group_id);
-if (!$group || !is_object($group)) {
-	exit_no_group();
-} elseif ($group->isError()) {
-	exit_error($group->getErrorMessage(), 'frs');
-}
-
-session_require_perm('frs', $group_id, 'write');
-
-$report = new Report();
-if ($report->isError()) {
-	exit_error($report->getErrorMessage(), 'frs');
-}
-
-if (!$start || !$end) $z =& $report->getMonthStartArr();
-
-if (!$start) {
-	$start = $z[0];
-}
-
-if (!$end) {
-	$end = $z[ count($z)-1 ];
-}
-
-if ($end < $start) list($start, $end) = array($end, $start);
-
-html_use_jqueryjqplotpluginCanvas();
-html_use_jqueryjqplotpluginhighlighter();
-
-frs_header(array('title' => _('File Release Reporting'),
-		 'group' => $group_id,
-		 'pagename' => 'project_showfiles',
-		 'sectionvals' => group_getname($group_id)));
-
-$report = new ReportDownloads($group_id, $package_id, $start, $end);
-if ($report->isError()) {
-	echo $HTML->error_msg($report->getErrorMessage());
-	frs_footer();
-	exit;
-}
-
-?>
-
-<form action="<?php echo util_make_url('/frs/reporting/downloads.php') ?>"
-	  method="get"
-	  class="align-center">
-	<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
-	<strong><?php echo _('Package')._(':'); ?></strong>
-	<?php echo report_package_box($group_id,'package_id',$package_id); ?>
-	<strong><?php echo _('Start Date')._(':'); ?></strong>
-	<?php echo report_months_box($report, 'start', $start); ?>
-	<strong><?php echo _('End Date')._(':'); ?></strong>
-	<?php echo report_months_box($report, 'end', $end); ?>
-	<input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" />
-</form>
-
-<?php
-
-$data = $report->getData();
-
-if ($start == $end) {
-	echo $HTML->error_msg(_('Start and end dates must be different'));
-} elseif (count($data) == 0) {
-	echo $HTML->information(_('There have been no downloads for this package.'));
-} else {
-	echo '<script type="text/javascript">//<![CDATA['."\n";
-	echo 'var ticks = new Array();';
-	echo 'var values = new Array();';
-	$arr =& $report->getMonthStartArr();
-	$arr2 = array();
-	$valuesArr = array();
-	for ($i=0; $i < count($arr); $i++) {
-		if ($arr[$i] >= $start && $arr[$i] <= $end) {
-			$arr2[$i] = date(_('Y-m'), $arr[$i]);
-			$valuesArr[$i] = 0;
-		}
-	}
-	foreach ($arr2 as $key) {
-		echo 'ticks.push("'.$key.'");';
-	}
-	for ($i=0; $i < count($data); $i++) {
-		echo 'var labels = [{label:\''.$data[$i][0].'\'}];';
-		$this_date = date(_('Y-m'), mktime(0, 0, 0, substr($data[$i][4], 4, 2), 0, substr($data[$i][4], 0, 4)));
-		$index_key = array_search($this_date, $arr2);
-		$valuesArr[$index_key+1]++;
-	}
-	foreach ($valuesArr as $key) {
-		echo 'values.push('.$key.');';
-	}
-	echo 'var plot1;';
-	echo 'jQuery(document).ready(function(){
-			plot1 = jQuery.jqplot (\'chart1\', [values], {
-					axesDefaults: {
-						tickOptions: {
-							angle: -90,
-							fontSize: \'8px\',
-							showGridline: false,
-							showMark: false,
-						},
-					},
-					legend: {
-						show: true,
-						placement: \'insideGrid\',
-						location: \'nw\'
-					},
-					series:
-						labels
-					,
-					axes: {
-						xaxis: {
-							label: "'._('Month').'",
-							renderer: jQuery.jqplot.CategoryAxisRenderer,
-							ticks: ticks,
-							pad: 0,
-						},
-						yaxis: {
-							label: "'._('Downloads').'",
-							padMin: 0,
-							tickOptions: {
-								angle: 0,
-								showMark: true,
-							}
-						}
-					},
-					highlighter: {
-						show: true,
-						sizeAdjust: 2.5,
-					},
-				});
-		});';
-	echo 'jQuery(window).resize(function() {
-			plot1.replot( { resetAxes: true } );
-		});'."\n";
-	echo '//]]></script>';
-	echo '<div id="chart1"></div>';
-	echo $HTML->listTableTop(array(_('Package'), _('Release'), _('File'), _('User'), _('Date')),
-                              false, true, 'Download');
-	for ($i=0; $i<count($data); $i++) {
-		$date = preg_replace('/^(....)(..)(..)$/', '\1-\2-\3', $data[$i][4]);
-		$cells = array();
-		$cells[][] = $data[$i][0];
-		$cells[][] = $data[$i][1];
-		$cells[][] = basename($data[$i][2]);
-		if ($data[$i][6] != 100) {
-			$cells[][] = util_display_user($data[$i][5], $data[$i][6], $data[$i][3]);
-		} else {
-			$cells[][] = $data[$i][3];
-		}
-		$cells[] = array($date, 'class' => 'align-center');
-		echo $HTML->multiTableRow(array(), $cells);
-	}
-	echo $HTML->listTableBottom();
-}
-
-frs_footer();
diff --git a/src/www/frs/scripts/FRSController.js b/src/www/frs/scripts/FRSController.js
new file mode 100644
index 0000000..3ce1842
--- /dev/null
+++ b/src/www/frs/scripts/FRSController.js
@@ -0,0 +1,76 @@
+/**
+ * FusionForge FRS
+ *
+ * Copyright 2014, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+FRSController = function() {};
+
+FRSController.prototype =
+{
+	toggleConfirmBox: function(params) {
+		this.params = params;
+		jQuery('#'+this.params.idconfirmbox).dialog({
+			resizable: false,
+			height: this.params.height,
+			width: this.params.width,
+			modal: true,
+			buttons: [{
+					text: this.params.do,
+					click: jQuery.proxy(function() {
+						jQuery('#'+this.params.idconfirmbox).dialog('close');
+						jQuery.getJSON(this.params.action+'&sure=1&really_sure=1', jQuery.proxy(function(data) {
+							jQuery('#maindiv > .feedback').remove();
+							jQuery('#maindiv > .error').remove();
+							jQuery('#maindiv > .warning_msg').remove();
+							if (typeof data.html != 'undefined') {
+									jQuery('#maindiv').prepend(data.html);
+							}
+							if (typeof data.deletedom != 'undefined') {
+								jQuery('#'+data.deletedom).remove();
+							}
+						}, this));
+					}, this)
+				},
+				{
+					text: this.params.cancel,
+					click: function() { jQuery(this).dialog('close'); },
+				}]
+		});
+	},
+
+	doAction: function(params) {
+		this.params = params;
+		jQuery.getJSON(this.params.action, jQuery.proxy(function(data){
+			jQuery('#maindiv > .feedback').remove();
+			jQuery('#maindiv > .error').remove();
+			jQuery('#maindiv > .warning_msg').remove();
+			if (typeof data.html != 'undefined') {
+				jQuery('#maindiv').prepend(data.html);
+			}
+			if (typeof data.action != 'undefined') {
+				jQuery('#'+this.params.id).attr(data.property, data.action);
+			}
+			if (typeof data.img != 'undefined') {
+				jQuery('#'+this.params.id+' img').remove();
+				jQuery('#'+this.params.id).append(data.img);
+			}
+		}, this));
+	},
+};
diff --git a/src/www/frs/shownotes.php b/src/www/frs/shownotes.php
deleted file mode 100644
index e27a705..0000000
--- a/src/www/frs/shownotes.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-/**
- * Show Release Notes/ChangeLog Page
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * Copyright 2010 (c) FusionForge Team
- * http://fusionforge.org/
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfcommon.'frs/include/frs_utils.php';
-
-$release_id = getIntFromRequest('release_id');
-
-$frsr = frsrelease_get_object($release_id);
-if (!$frsr || !is_object($frsr)) {
-	exit_error(_('That Release Was Not Found'), 'frs');
-} elseif ($frsr->isError()) {
-	exit_error($frsr->getErrorMessage(), 'frs');
-}
-
-$result=db_query_params ('SELECT frs_release.notes,frs_release.changes,
-		frs_release.preformatted,frs_release.name,frs_package.group_id,frs_package.is_public
-		FROM frs_release,frs_package
-		WHERE frs_release.package_id=frs_package.package_id
-		AND frs_release.release_id=$1',
-			array($release_id));
-
-if (!$result || db_numrows($result) < 1) {
-	exit_error(_('That Release Was Not Found'),'frs');
-} else {
-
-	$group_id=db_result($result,0,'group_id');
-	$is_public =db_result($result,0,'is_public');
-
-	//  Members of projects can see all packages
-	//  Non-members can only see public packages
-	if(!$is_public) {
-		if (!session_loggedin() || (!user_ismember($group_id) &&
-		    !forge_check_global_perm('forge_admin'))) {
-			exit_permission_denied();
-		}
-	}
-
-	frs_header(array('title'=>_('File Release Notes and Changelog'),'group'=>$group_id));
-
-	echo '<h2>'._('Release Name')._(': ').'<a href="/frs/?group_id='.db_result($result,0,'group_id').'&release_id='.$release_id.'">'.db_result($result,0,'name').'</a></h2>';
-
-	/*
-	 Show preformatted or plain notes/changes
-	 */
-	if (db_result($result,0,'preformatted')) {
-		$opening = '<pre>';
-		$closing = '</pre>';
-	} else {
-		$opening = '<p>';
-		$closing = '</p>';
-	}
-
-	if (db_result($result,0,'notes')) {
-		echo $HTML->boxTop(_('Release Notes'));
-		echo "$opening".db_result($result,0,'notes')."$closing";
-		echo $HTML->boxBottom();
-	}
-
-	if (db_result($result,0,'changes')) {
-		echo $HTML->boxTop(_('Change Log'));
-		echo "$opening".db_result($result,0,'changes')."$closing";
-		echo $HTML->boxBottom();
-	}
-
-	frs_footer();
-}
diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index 7b0cfeb..25bfd0b 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -651,13 +651,13 @@ if (isset($params['group']) && $params['group']) {
 			$count = count($titleArray);
 			for ($i = 0; $i < $count; $i++) {
 				$thAttrs = array();
-				if ($thOtherAttrsArray && $thOtherAttrsArray[$i]) {
+				if ($thOtherAttrsArray && isset($thOtherAttrsArray[$i])) {
 					$thAttrs = $thOtherAttrsArray[$i];
 				}
-				if ($thClassArray && $thClassArray[$i]) {
+				if ($thClassArray && isset($thClassArray[$i])) {
 					$thAttrs['class'] = $thClassArray[$i];
 				}
-				if ($thTitleArray && $thTitleArray[$i]) {
+				if ($thTitleArray && isset($thTitleArray[$i])) {
 					$thAttrs['title'] = $thTitleArray[$i];
 				}
 				$cell = $titleArray[$i];
@@ -1038,6 +1038,13 @@ if (isset($params['group']) && $params['group']) {
 			';
 	}
 
+	function jQueryUIconfirmBox($id = 'dialog-confirm', $title = 'Confirm your action', $message = 'Do you confirm your action?') {
+		$htmlcode = html_ao('div', array('id' => $id, 'title' => $title, 'class' => 'hide'));
+		$htmlcode .= html_e('p', array(), html_e('span', array('class' => 'ui-icon ui-icon-alert', 'style' => 'float:left; margin:0 7px 20px 0;'), '', false).$message);
+		$htmlcode .= html_ac(html_ap() -1);
+		return $htmlcode;
+	}
+
 	function html_input($name, $id = '', $label = '', $type = 'text', $value = '', $extra_params = '') {
 		if (!$id) {
 			$id = $name;
@@ -1217,6 +1224,14 @@ if (isset($params['group']) && $params['group']) {
 		return $this->getPicto('ic/mail16w.png', $title, $alt);
 	}
 
+	function getStartMonitoringPic($title = '', $alt = '') {
+		return $this->getPicto('ic/startmonitor.png', $title, $alt);
+	}
+
+	function getStopMonitoringPic($title = '', $alt = '') {
+		return $this->getPicto('ic/stopmonitor.png', $title, $alt);
+	}
+
 	function getReleaseNotesPic($title = '', $alt = '') {
 		return $this->getPicto('ic/manual16c.png', $title, $alt);
 	}
@@ -1262,11 +1277,15 @@ if (isset($params['group']) && $params['group']) {
 		return $this->getPicto('ic/ftp16b.png', $title, $alt);
 	}
 
+	function getDeletePic($title = '', $alt = '') {
+		return $this->getPicto('ic/delete.png', $title, $alt);
+	}
+
 	function getPicto($url, $title, $alt, $width = '20', $height = '20') {
 		if (!$alt) {
 			$alt = $title;
 		}
-		return html_image($url, $width, $height, array('title'=>$title, 'alt'=>$alt));
+		return html_image($url, $width, $height, array('title' => $title, 'alt' => $alt));
 	}
 
 	/**
diff --git a/src/www/themes/funky-wOw/images/ic/delete.png b/src/www/themes/funky-wOw/images/ic/delete.png
new file mode 100644
index 0000000..92a1af6
Binary files /dev/null and b/src/www/themes/funky-wOw/images/ic/delete.png differ
diff --git a/src/www/themes/funky-wOw/images/ic/startmonitor.png b/src/www/themes/funky-wOw/images/ic/startmonitor.png
new file mode 100644
index 0000000..7f1fe19
Binary files /dev/null and b/src/www/themes/funky-wOw/images/ic/startmonitor.png differ
diff --git a/src/www/themes/funky-wOw/images/ic/stopmonitor.png b/src/www/themes/funky-wOw/images/ic/stopmonitor.png
new file mode 100644
index 0000000..68967e3
Binary files /dev/null and b/src/www/themes/funky-wOw/images/ic/stopmonitor.png differ
diff --git a/src/www/themes/funky/images/ic/delete.png b/src/www/themes/funky/images/ic/delete.png
new file mode 100644
index 0000000..92a1af6
Binary files /dev/null and b/src/www/themes/funky/images/ic/delete.png differ
diff --git a/src/www/themes/funky/images/ic/startmonitor.png b/src/www/themes/funky/images/ic/startmonitor.png
new file mode 100644
index 0000000..7f1fe19
Binary files /dev/null and b/src/www/themes/funky/images/ic/startmonitor.png differ
diff --git a/src/www/themes/funky/images/ic/stopmonitor.png b/src/www/themes/funky/images/ic/stopmonitor.png
new file mode 100644
index 0000000..68967e3
Binary files /dev/null and b/src/www/themes/funky/images/ic/stopmonitor.png differ

-----------------------------------------------------------------------

Summary of changes:
 src/CHANGES                                        |    1 +
 src/common/docman/actions/monitordirectory.php     |    4 +-
 src/common/docman/actions/monitorfile.php          |    4 +-
 src/common/docman/views/listfile.php               |   28 +-
 src/common/frs/FRSFile.class.php                   |   44 +--
 src/common/frs/actions/addfile.php                 |   75 ++++
 src/common/frs/actions/addpackage.php              |   57 +++
 src/common/frs/actions/addrelease.php              |  133 +++++++
 src/common/frs/actions/deletefile.php              |   63 +++
 src/common/frs/actions/deletepackage.php           |   65 ++++
 .../frs/actions/deleterelease.php}                 |   27 +-
 src/common/frs/actions/editfile.php                |   63 +++
 src/common/frs/actions/editrelease.php             |  124 ++++++
 src/common/frs/actions/monitor.php                 |   78 ++++
 src/common/frs/actions/updatepackage.php           |   58 +++
 src/common/frs/include/frs_utils.php               |  272 +++++--------
 src/common/frs/views/admin.php                     |  127 ++++++
 .../frs/views/docmanfile.php}                      |   25 +-
 src/common/frs/views/editrelease.php               |  192 +++++++++
 src/common/frs/views/listpackages.php              |  191 +++++++++
 src/common/frs/views/menu.php                      |   61 +++
 src/common/frs/views/qrs.php                       |  100 +++++
 src/common/frs/views/reporting.php                 |  187 +++++++++
 src/common/frs/views/shownotes.php                 |   70 ++++
 src/common/frs/views/showreleases.php              |   82 ++++
 .../emptytrash.php => frs/views/useftpuploads.php} |   31 +-
 src/common/frs/views/usemanualuploads.php          |   36 ++
 src/common/{docman => frs}/views/views.php         |   29 +-
 .../Widget_ProjectLatestFileReleases.class.php     |  156 ++++----
 src/plugins/headermenu/action/validateOrder.php    |   10 +-
 .../headermenu/view/admin/updateLinkValue.php      |    2 +-
 .../view/admin/viewGlobalConfiguration.php         |   21 +-
 .../view/admin/viewProjectConfiguration.php        |    4 +-
 .../headermenu/www/scripts/HeaderMenuController.js |   50 ++-
 src/www/docman/index.php                           |    4 +-
 src/www/frs/admin/deletepackage.php                |   78 ----
 src/www/frs/admin/deleterelease.php                |   80 ----
 src/www/frs/admin/editrelease.php                  |  410 --------------------
 src/www/frs/admin/index.php                        |  217 -----------
 src/www/frs/admin/qrs.php                          |  275 -------------
 src/www/frs/admin/showreleases.php                 |  125 ------
 src/www/frs/download.php                           |    2 +-
 src/www/frs/index.php                              |  196 ++--------
 src/www/frs/monitor.php                            |   75 ----
 src/www/frs/reporting/downloads.php                |  216 -----------
 src/www/frs/scripts/FRSController.js               |   76 ++++
 src/www/frs/shownotes.php                          |   90 -----
 src/www/include/Layout.class.php                   |   27 +-
 src/www/themes/funky-wOw/Theme.class.php           |    4 +-
 .../{docman/trash-empty.png => ic/delete.png}      |  Bin 990 -> 990 bytes
 .../startmonitor.png}                              |  Bin 1180 -> 1180 bytes
 .../stopmonitor.png}                               |  Bin 1252 -> 1252 bytes
 src/www/themes/funky/Theme.class.php               |   10 +-
 .../trash-empty.png => funky/images/ic/delete.png} |  Bin 990 -> 990 bytes
 .../images/ic/startmonitor.png}                    |  Bin 1180 -> 1180 bytes
 .../images/ic/stopmonitor.png}                     |  Bin 1252 -> 1252 bytes
 56 files changed, 2215 insertions(+), 2140 deletions(-)
 create mode 100644 src/common/frs/actions/addfile.php
 create mode 100644 src/common/frs/actions/addpackage.php
 create mode 100644 src/common/frs/actions/addrelease.php
 create mode 100644 src/common/frs/actions/deletefile.php
 create mode 100644 src/common/frs/actions/deletepackage.php
 copy src/{plugins/headermenu/action/validateOrder.php => common/frs/actions/deleterelease.php} (62%)
 create mode 100644 src/common/frs/actions/editfile.php
 create mode 100644 src/common/frs/actions/editrelease.php
 create mode 100644 src/common/frs/actions/monitor.php
 create mode 100644 src/common/frs/actions/updatepackage.php
 create mode 100644 src/common/frs/views/admin.php
 copy src/{plugins/headermenu/action/validateOrder.php => common/frs/views/docmanfile.php} (60%)
 create mode 100644 src/common/frs/views/editrelease.php
 create mode 100644 src/common/frs/views/listpackages.php
 create mode 100644 src/common/frs/views/menu.php
 create mode 100644 src/common/frs/views/qrs.php
 create mode 100644 src/common/frs/views/reporting.php
 create mode 100644 src/common/frs/views/shownotes.php
 create mode 100644 src/common/frs/views/showreleases.php
 copy src/common/{docman/actions/emptytrash.php => frs/views/useftpuploads.php} (51%)
 create mode 100644 src/common/frs/views/usemanualuploads.php
 copy src/common/{docman => frs}/views/views.php (62%)
 delete mode 100644 src/www/frs/admin/deletepackage.php
 delete mode 100644 src/www/frs/admin/deleterelease.php
 delete mode 100644 src/www/frs/admin/editrelease.php
 delete mode 100644 src/www/frs/admin/index.php
 delete mode 100644 src/www/frs/admin/qrs.php
 delete mode 100644 src/www/frs/admin/showreleases.php
 delete mode 100644 src/www/frs/monitor.php
 delete mode 100644 src/www/frs/reporting/downloads.php
 create mode 100644 src/www/frs/scripts/FRSController.js
 delete mode 100644 src/www/frs/shownotes.php
 copy src/www/themes/funky-wOw/images/{docman/trash-empty.png => ic/delete.png} (100%)
 copy src/www/themes/funky-wOw/images/{docman/monitor-adddocument.png => ic/startmonitor.png} (100%)
 copy src/www/themes/funky-wOw/images/{docman/monitor-removedocument.png => ic/stopmonitor.png} (100%)
 copy src/www/themes/{funky-wOw/images/docman/trash-empty.png => funky/images/ic/delete.png} (100%)
 copy src/www/themes/{funky-wOw/images/docman/monitor-adddocument.png => funky/images/ic/startmonitor.png} (100%)
 copy src/www/themes/{funky-wOw/images/docman/monitor-removedocument.png => funky/images/ic/stopmonitor.png} (100%)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list