Source for file instruments.php
Documentation is available at instruments.php
* Edit/create/delete instruments
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* path (bumblebee root)/inc/actions/instruments.php
/** Load ancillary functions */
require_once 'inc/typeinfo.php';
require_once 'inc/bb/instrument.php';
require_once 'inc/formslib/anchortablelist.php';
require_once 'inc/actions/actionaction.php';
* Edit/create/delete instruments
* @param BumblebeeAuth $auth Authorisation object
* @param array $pdata extra state data from the call path
if (! isset
($this->PD['id'])) {
} elseif (isset
($this->PD['delete'])) {
echo
"<br /><br /><a href='".
makeURL('instruments').
"'>".
T_('Return to instruments list').
"</a>";
function select($deleted=
false) {
$select->deleted =
$deleted;
$select->connectDB('instruments', array('id', 'name', 'longname'));
$select->list->prepend(array('-1', T_('Create new instrument')));
$select->list->append(array('showdeleted', T_('Show deleted instruments')));
$select->hrefbase =
makeURL('instruments', array('id'=>
'__id__'));
$select->setFormat('id', '%s', array('name'), ' %30.30s', array('longname'));
#echo $groupselect->list->text_dump();
$instrument->update($this->PD);
$instrument->checkValid();
:
T_('Instrument updated')),
STATUS_ERR =>
T_('Instrument could not be changed:').
' '.
$instrument->errorMessage
echo
$instrument->display();
if ($instrument->id <
0) {
$submit =
T_('Create new instrument');
$submit =
T_('Update entry');
$delete =
$instrument->isDeleted ?
T_('Undelete entry') :
T_('Delete entry');
#$submit = ($PD['id'] < 0 ? "Create new" : "Update entry");
echo
"<input type='submit' name='submit' value='$submit' />";
if ($delete) echo
"<input type='submit' name='delete' value='$delete' />";
STATUS_OK =>
$instrument->isDeleted ?
T_('Instrument undeleted')
:
T_('Instrument deleted'),
.
'<br/><br/>'.
$instrument->errorMessage
Documentation generated on Tue, 06 Mar 2007 10:01:41 +0000 by phpDocumentor 1.3.0