* The rest Copyright 2002-2004 (c) GForge Team
* http://gforge.org/
*
- * @version $Id$
- *
* This file is part of GForge.
*
* GForge is free software; you can redistribute it and/or modify
if (getStringFromRequest('submit')) {
$func = getStringFromRequest('func');
$package_id = getIntFromRequest('package_id');
- $package_name = getStringFromRequest('package_name');
+ $package_name = trim(getStringFromRequest('package_name'));
$status_id = getIntFromRequest('status_id');
$is_public = getStringFromRequest('is_public');
frs_admin_header(array('title'=>_('Release Edit/File Releases'),'group'=>$group_id));
-$res=db_query("SELECT status_id,package_id,name AS package_name
- FROM frs_package WHERE group_id='$group_id'");
+$res=db_query_params ('SELECT status_id,package_id,name AS package_name
+ FROM frs_package WHERE group_id=$1',
+ array($group_id));
$rows=db_numrows($res);
if ($res && $rows > 0) {
echo '<h3>'._('QRS').'</h3>';
- printf(_('Click here to %1$s quick-release a file %2$s'), '<a href="qrs.php?package_id=' . $package_id . '&group_id=' . $group_id . '">', '</a>').'<br />';
+ printf(_('Click here to %1$s quick-release a file %2$s'), '<a href="qrs.php?group_id=' . $group_id . '">', '</a>').'<br />';
}
?>
-<?php echo _('<h3>Packages</h3><p>You can use packages to group different file releases together, or use them however you like. <p><H4>An example of packages:</h4><p><strong>Mysql-win</strong><br /><strong>Mysql-unix</strong><br /><strong>Mysql-odbc</strong><p><h4>Your Packages:</H4><p><ol><li>Define your packages</li><li>Create new releases of packages</li></ol><p><h3>Releases of Packages</h3><p>A release of a package can contain multiple files.<p><H4>Examples of Releases</h4><p><strong>3.22.1</strong><br /><strong>3.22.2</strong><br /><strong>3.22.3</strong><br /><p>You can create new releases of packages by clicking on <strong>Add/Edit Releases</strong> next to your package name.<p>') ?>
-<p>
+
+<fieldset>
+<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
/*
*/
if (!$res || $rows < 1) {
- echo '<h4>'._('You Have No Packages Defined').'</h4>';
+ echo '<p><strong>'._('You Have No Packages Defined').'</strong></p>';
} else {
$title_arr=array();
$title_arr[]=_('Releases');
<input type="hidden" name="func" value="update_package" />
<input type="hidden" name="package_id" value="'. db_result($res,$i,'package_id') .'" />
<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'>
- <td nowrap="nowrap" style="text-align:center">
+ <td style="white-space: nowrap;" align="center">
<a href="qrs.php?package_id='.
db_result($res,$i,'package_id') .'&group_id='. $group_id .'"><strong>['._('Add Release').']</strong>
</a>
</a>
</td>
- <td><input type="text" name="package_name" value="'.db_result($res,$i,'package_name') .'" size="20" maxlength="30" /></td>
+ <td><input type="text" name="package_name" value="'.db_result($res,$i,'package_name') .'" size="20" maxlength="60" /></td>
<td>'.frs_show_status_popup ('status_id', db_result($res,$i,'status_id')).'</span></td>
<td><input type="submit" name="submit" value="'._('Update').'" />
*/
?>
-</p>
-<h3><?php echo _('New Package Name') ?>:</h3>
-<p>
+
+<fieldset>
+<legend><?php echo _('Create New Package') ?></legend>
<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
<input type="hidden" name="func" value="add_package" />
-<input type="text" name="package_name" value="" size="20" maxlength="30" />
-<p>
-<strong><?php echo _('Publicly Viewable'); ?>:</strong><br />
-<input type="radio" name="is_public" value="1" checked> <?php echo _('Public'); ?><br />
-<input type="radio" name="is_public" value="0"> <?php echo _('Private'); ?><br />
+<p><strong><?php echo _('New Package Name') ?>:</strong>
+<input type="text" name="package_name" value="" size="20" maxlength="30" /></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></p>
+</form>
+</fieldset>
<?php