Page MenuHomec4science

BEH_display.shtml.wml
No OneTemporary

File Metadata

Created
Tue, Dec 3, 06:29

BEH_display.shtml.wml

## $Id$
## This file is part of the CERN Document Server Software (CDSware).
## Copyright (C) 2002 CERN.
##
## The CDSware 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.
##
## The CDSware 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 CDSware; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
<?
include("localconf.inc.shtml");
?>
#include "cdspage.wml" \
title="Behaviours" \
navbar_name="admin" \
navbar_select="BEH_display" \
cdspageboxlefttopadd="<protect><?displayLoginMenu('admin');?> </protect>"
<?
include("security.inc.shtml");
<protect>## $Id$</protect>
//==========================================================================
// File: BEH_display.shtml (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 width="100%" 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 width="100%"><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.shtml?otype=<?print urlencode($otype);?>', 'OC<?print urlencode($otype);?>')"><font size="2">[Details]</font></a></td>
</tr>
<?
}
print "</table>";
?>
<form action="BEH_OTYPE_add.shtml" method="POST">
<table width="70%" align="center">
<tr>
<td align="center" 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 type="submit" value="Add output type"></td>
</tr>
</table>
</form>
<?
mysql_close( $db );
include(FOOTER);
?>

Event Timeline