Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92237354
allElementsEDS.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, 15:29
Size
6 KB
Mime Type
text/x-c
Expires
Wed, Nov 20, 15:29 (2 d)
Engine
blob
Format
Raw Data
Handle
22401333
Attached To
R3600 invenio-infoscience
allElementsEDS.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="Available Element Descriptions" \
navtrail_previous_links="<a class=navtrail href=<WEBURL>/admin/<lang:star: index.*.html>><MSG_ADMIN_AREA></a> > <a class=navtrail href=<WEBURL>/admin/websubmit/><MSG_ADMIN_SUBMIT></a>" \
navbar_name="admin" \
navbar_select="websubmit_listelements"
<?
<protect>
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
function displayPage()
{
# Conduct a select query in order to retrieve the details of all of
# the EDS element descriptions.
$queryResult = mysql_query("SELECT name FROM sbmFIELDDESC ORDER BY "
. "name");
if($queryResult)
{
# Query worked
if(mysql_num_rows($queryResult) < 1)
{
# No elements in EDS
print("<P CLASS=\"errorMsg\">There Are Currently No Element "
. "Descriptions In " . DOCS_DATABASE . "</P>\n");
} // END if
else
{
# In this case, there are elements to display...
# Display the table header..
print("<TABLE BORDER=1 CELLSPACING=3 ALIGN='center'>\n"
. "<TR>\n");
# We only want to display 25 items in a table column (as there
# are many elements desciptions in EDS), so we need to have a
# counter...
$itemCount = 0;
$numEls = mysql_num_rows($queryResult);
# Put all of the elements in an array...
$allOfThem = resToArray($queryResult);
for($i = 0; $i < $numEls; $i++)
{
# Hey, display the element names...
if($itemCount == 0)
{
# First item of a table
print("<TD ALIGN='center' VALIGN='top'>\n"
. "<TABLE ALIGN='center' BORDER=0"
. " CELLSPACING=0 CELLPADDING=0>\n<TR>\n<TD ALIGN='"
. "left'>\n<A HREF='elementConfigDetsEDS.php?name="
. ereg_replace("'", "'",
htmlspecialchars($allOfThem[$i][0]))
. "&caller=allElementsEDS.php'>"
. ereg_replace("'", "'",
htmlspecialchars($allOfThem[$i][0]))
. "</A> </TD>\n</TR>\n");
$itemCount++;
} // END if
elseif($itemCount == 24)
{
# Last item for the current table column...
print("<TR>\n<TD ALIGN='left'>\n<A HREF='elementConfig"
. "DetsEDS.php?name=" . ereg_replace("'", "'",
htmlspecialchars($allOfThem[$i][0]))
. "&caller=allElementsEDS.php'>"
. ereg_replace("'", "'",
htmlspecialchars($allOfThem[$i][0]))
. "</A> </TD>\n</TR>\n</TABLE>\n</TD>\n");
$itemCount = 0;
} // END elseif
else
{
# Just a normal column element
print("<TR>\n<TD ALIGN='left'><A HREF='elementConfigD"
. "etsEDS.php?name=" . ereg_replace("'", "'",
htmlspecialchars($allOfThem[$i][0]))
. "&caller=allElementsEDS.php'>"
. ereg_replace("'", "'",
htmlspecialchars($allOfThem[$i][0]))
. "</A> </TD>\n</TR>\n");
$itemCount++;
} // END else
} // END for
if($itemCount != 0)
{
# Our inner table has not yet been closed up, so we can do
# this
print("</TABLE>\n</TD>\n");
} // END if
# Now that the table has been made, it is possible to close it
print("</TR>\n</TABLE>\n");
} // END else
# Now that the Element description names have been displayed, we
# can display a button that will allow the addition of a new
# element to EDS.
print("<FORM ACTION='addElementDescrEDS.php' METHOD='post'><TA"
. "BLE BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN='left' "
. "WIDTH='100%'>\n<TR><TD ALIGN='left'>\n<INPUT TYPE='button'"
. " VALUE='CREATE NEW ELEMENT DESCRIPTION' onClick=\"submit();\">\n"
. "</TD>\n</TR>\n</TABLE>\n</FORM>\n");
} // END if
else
{
# In this case, the query has failed, so we can display an error
# message to the user..
print("<P STYLE=\"font-size: large; color: navy; text-align: "
. "center\"><SPAN STYLE=\"color: red\">ERROR:</SPAN> Unable to "
. "query the <EM>sbmFIELDDESC</EM> table of the " . DOCS_DATABASE
. " database.<BR>Please contact system administrator.</P>\n");
} // END else
}
/**********************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
displayPage();
/************************End of main script***************************/
</protect>
?>
Event Timeline
Log In to Comment