Page MenuHomec4science

BEH_display.php.wml
No OneTemporary

File Metadata

Created
Sun, May 5, 14:56

BEH_display.php.wml

## $Id$
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio 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.
##
## CDS Invenio 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 CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
<?
include("localconf.inc.php");
?>
#include "cdspage.wml" \
title="Behaviours" \
navtrail_previous_links="<a class=navtrail href=<WEBURL>/admin/<lang:star: index.*.html>>_(Admin Area)_</a> &gt; <a class=navtrail href=<WEBURL>/admin/bibformat/>BibFormat Admin</a>" \
navbar_name="admin" \
navbar_select="BEH_display"
<?
include("security.inc.php");
<protect>## $Id$</protect>
//==========================================================================
// File: BEH_display.php (flexElink WI)
// Description: Shows a list of the existing behaviors in the DB, and allows to
// access to their details or to add new ones
// POST parameters:
// Notes:
// Requires: DB, ERROR
// Author: Hector.Sanchez@cern.ch
//==========================================================================
include(DB);
include(ERROR);
include(HEADER);
?>
<p>Define one or more output BibFormat behaviours. These are then
passed as parameters to the BibFormat modules while executing
formatting.
<em>Example:</em> You can tell BibFormat that is has to enrich the
incoming metadata file by the created format, or that it only has to
print the format out.
<p>
<script type="text/javascript">
<!---
function openwindowlink( addr, name )
{
window.open( addr, "Window"+name, "height=720,witdh=320,scrollbars,resizable")
}
//-->
</script>
<?
$db=mysql_connect( $DB_HOST, $DB_USER, $DB_PASSWD ) or
errormsg("Couldn't connect to mySQL");
mysql_selectdb( $DB_DB ) or
errormsg(sprintf("Couldn't connect into database %s", $DB_DB));
$qry_otypes="select name, type, doc from flxBEHAVIORS order by name";
$qh_otypes=mysql_query( $qry_otypes );
?>
<table border="1">
<tr bgcolor="#0000FF" align="center">
<td><font color="white"><b>Name</b></font></td>
<td><font color="white"><b>Type</b></font></td>
<td><font color="white"><b>Documentation</b></font></td>
<td colspan="2"></td>
</tr>
<?
while($row=mysql_fetch_array( $qh_otypes ))
{
list($otype, $type, $doc)=$row;
?>
<tr bgcolor="#FFFFFF">
<td bgcolor="#33CCFF"><b><?echo $otype?></b></td>
<td><?echo $type;?></td>
<td><font size="2"><?echo $doc;?>&nbsp;</font></td>
<td><a href="JavaScript:openwindowlink( 'BEH_OTYPE_showone.php?otype=<?print urlencode($otype);?>', 'OC<?print urlencode($otype);?>')"><font size="2">[Details]</font></a></td>
</tr>
<?
}
print "</table>";
?>
<form action="BEH_OTYPE_add.php" method="POST">
<table>
<tr>
<td bgcolor="#0000FF" colspan="2">
<font color="#FFFFFF"><strong>Add new OUPUT TYPE</strong></font>
</td>
</tr>
<tr>
<td width="30%" align="right">
Output Type Name
</td>
<td>
<input type="text" name="otype">
</td>
</tr>
<tr>
<td width="30%" align="right">
Behavior Type
</td>
<td>
<select name="type">
<option value="NORMAL">Normal</option>
<option value="IENRICH">Input Enrich</option>
</select>
</td>
</tr>
<tr>
<td width="30%" align="right">Documentation</td>
<td><textarea name="doc" cols="65" rows="5"></textarea></td>
</tr>
<tr>
<td colspan="2" align="center"><input class="formbutton" type="submit" value="Add output type"></td>
</tr>
</table>
</form>
<?
mysql_close( $db );
include(FOOTER);
?>

Event Timeline