Page MenuHomec4science

LINK_FORMAT_display.php.wml
No OneTemporary

File Metadata

Created
Mon, May 13, 15:12

LINK_FORMAT_display.php.wml

## $Id$
## This file is part of the CERN Document Server Software (CDSware).
## Copyright (C) 2002, 2003, 2004, 2005, 2006 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.php");
?>
#include "cdspage.wml" \
title="File Formats" \
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="LINK_FORMAT_display"
<?
include("security.inc.php");
<protect>## $Id$</protect>
include(DB);
include(ERROR);
include(HEADER);
?>
<p>Define file format types based on file extensions. This will be
used when proposing various fulltext services.
<em>Example:</em> You can tell that <code>*.pdf</code> files will
be treated as PDF files. <p>
<script type="text/javascript">
<!---
function openwindowlink( addr )
{
newwin=window.open( addr, "Mywindow", "height=620,witdh=520,scrollbars,resizable")
}
//-->
</script>
<?
$db=mysql_connect( $DB_HOST, $DB_USER, $DB_PASSWD ) or errormsg("Couldn't conn
ect to mySQL");
mysql_selectdb( $DB_DB ) or errormsg(sprintf("Couldn't connect into database %
s", $DB_DB));
$qry="select name, text, extensions
from flxFILEFORMATS
order by name";
$res=mysql_query( $qry, $db );
print '<table border="1">';
print "<tr align=\"center\" bgcolor=\"#00CCFF\">";
print "<td><b>Format Id</b></td>";
print "<td><b>Format Description</b></td>";
print "<td><b>File Extensions</b></td>";
print "<td colspan=\"2\"></td>";
print "</tr>";
while($format=mysql_fetch_array($res))
{
list($name, $text, $ext)=$format;
print "<tr>";
print "<td>$name</td>";
print "<td>$text</td>";
print "<td>$ext</td>";
print "<td><a href=\"JavaScript:openwindowlink( '.php?' )\">[Modify]</a></td>";
print "<td><a href=\"LINK_FORMAT_del.php?name=$name\">[Delete]</a></td>";
print "</tr>";
}
print "</table>";
mysql_close( $db );
?>
<hr><br>
<form action="LINK_FORMAT_add.php" method="POST">
<table>
<tr>
<td bgcolor="#000000" colspan="2">
<font color="#FFFFFF">Add new File FORMAT</font>
</td>
</tr>
<tr>
<td>Format Name</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td>Format Description</td>
<td><input type="text" name="text" size="60"></td>
</tr>
<tr>
<td>File Extensions</td>
<td><textarea name="extensions" cols="65" rows="5"></textarea><td>
</tr>
<tr>
<td colspan="2"><input class="formbutton" type="submit" value="Add"></td>
</tr>
</table>
</form>
<?
include(FOOTER);
?>

Event Timeline