Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92219499
index.php.wml
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 18, 11:21
Size
4 KB
Mime Type
text/x-c
Expires
Wed, Nov 20, 11:21 (2 d)
Engine
blob
Format
Raw Data
Handle
22396151
Attached To
R3600 invenio-infoscience
index.php.wml
View Options
## $Id$
## This file is part of the CERN Document Server Software (CDSware).
## Copyright (C) 2002, 2003, 2004, 2005 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.
<?
require("commonPhpFunctions.php");
?>
#include "cdspage.wml" \
title="WebSubmit Admin" \
navtrail_previous_links="<a class=navtrail href=<WEBURL>/admin/<lang:star: index.*.html>><MSG_ADMIN_AREA></a>" \
navbar_name="admin" \
navbar_select="websubmit"
<?
<protect>
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
</protect>
function displayDoctypeList()
{
$queryResult = mysql_query("SELECT sdocname, ldocname FROM sbmDOCTYPE "
. "ORDER BY ldocname");
if($queryResult)
{
# Query has executed successfully, so we can proceed to display all
# document types in the EDS system...
makeDoctypeTable($queryResult, "documentEDS.php");
} // END if
else
{
# In this case, the query failed, so we can terminate the scripts
# running, and terminate the WebSubmit Administrator session, as no
# further actions can be carried out...
print('<H3>Error: Unable to retrieve data from the sbmDOCTYPE table.'
. '</H3>');
} // END else
}
function makeDoctypeTable($queryResult, $linkTo)
{
/***************************************************************
This function produces the table of hyperlinks for all of the
doctypes in the system. The table is displayed without borders,
and is centered in the page. The function loops through each
row of the query dynaset that is passed to it ($queryResult),
outputting each record as a row in the table.
The function has been adapted to serve both WebSubmit and EDS, so that
the URL of the page to be linked to is passed as an argument to
the function, and therefore the relevant page is linked to,
depending upon whether it is in the WebSubmit Administrator, or the
WebSubmit Administrator.
Author: Nicholas Robinson
Email: Nicholas.Robinson@cern.ch
ca8nro@yahoo.co.uk
Created: Long Ago!!
Last Modified: 06/02/2001
***************************************************************/
# Begin outputting a table to display the document types in.
# The table has no border.
print('<TABLE ALIGN="center" BORDER=0 WIDTH="100%"><TR>'
. '<TH> <SPAN STYLE="color: navy; font-size: large; '
. 'font-weight: bold; text-align: center">Document Type'
. ' </SPAN></TH></TR><TR><TD ALIGN="center">'
. '<TABLE ALIGN="center" BORDER=0>');
# While there are still records to retrieve from the query...
# ...get each row, assign the fields to $doctype and $name, then...
# ...display the document type fullname in a table as a hyperlink.
# When the hyperlink is clicked, the details of that document type
# are displayed.
while(list($doctype, $name) = mysql_fetch_row($queryResult))
{
print('<TR>');
print('<TD ALIGN="left"><A ');
print('HREF="'.$linkTo.'?doctype='.$doctype.'" onMouseOver = "window.defaultStatus = \'\'; window.status=\'View Details Of ');
print(htmlspecialchars($name));
print(' Document Type\';');
print(' return true">');
print(htmlspecialchars($name));
print(' </A></TD>');
print('</TR>');
} // END while
# Close Table
print('</TABLE></TD></TR></TABLE>');
} // END function makeDoctypeTable($queryResult)
// ***********
/**********************Start of main script***************************/
# Connect to the MySQL server
serverConnect(MYSQLDOCMACHINE, MYSQLDOCUSERID, MYSQLDOCPASSWORD);
# Select the CDS Search database...
dbSelect(DOCS_DATABASE);
$auth = canUseWebSubmitAdmin($uid);
if (!$auth[0])
outWarning($auth[1]);
else
displayDoctypeList();
/************************End of main script***************************/
?>
Event Timeline
Log In to Comment