* 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 License, or
- * (at your option) any later version.
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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.
*/
$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $group->getUnixName();
-$feedback = '' ;
/*
* Here's where we do the dirty work based on the step the user has chosen
*/
?>
-<h2><?php echo _('Step 1: Edit Release') ?></h2>
+<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" />
</form>
<hr />
-<h2><?php echo _('Step 2: Add Files To This Release') ?></h2>
+<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"; ?>">
printf(_('Alternatively, you can use FTP to upload a new file at %1$s.'), forge_get_config('ftp_upload_host'));
echo '<br />';
echo _('Choose an already uploaded file:').'<br />';
- $ftp_files_arr=ls($upload_dir,true);
+ $ftp_files_arr=frs_filterfiles(ls($upload_dir,true));
echo html_build_select_box_from_arrays($ftp_files_arr,$ftp_files_arr,'ftp_filename',''); ?>
</p>
<?php } ?>
$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=ls($incoming,true);
+ $manual_files_arr=frs_filterfiles(ls($incoming,true));
echo html_build_select_box_from_arrays($manual_files_arr,$manual_files_arr,'manual_filename',''); ?>
</p>
<?php } ?>
-
+</fieldset>
<table width="60%">
<tr>
<td>
</table>
<p>
<input type="submit" name="submit" value="<?php echo _('Add This File') ?>" /></p>
-</fieldset>
</form>
-<hr />
-<h2><?php echo _('Step 3: Edit Files In This Release') ?></h2>
<?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 < 1) {
- print("<span class=\"error\">"._('No Files In This Release')."</span>\n");
- } else {
+ 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[]=_('Filename<br />Release').'<br />';
$title_arr[]=_('Processor<br />Release Date').'<br />';
</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>
<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\'m Sure') ?>
-
+
+ <input type="submit" name="submit" value="<?php echo _('Delete File') ?> " /> <input type="checkbox" name="im_sure" value="1" /> <?php echo _('I\'m Sure') ?>
+
</td>
</tr>
</form>
}
echo '<p>' . sprintf(ngettext('There is %1$s user monitoring this package.', 'There are %1$s users monitoring this package.', $frsp->getMonitorCount()), $frsp->getMonitorCount()) . '</p>';
-echo '<hr />';
frs_admin_footer();