Page MenuHomec4science

allModifyEDS.php.wml
No OneTemporary

File Metadata

Created
Sun, Jun 30, 01:25

allModifyEDS.php.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.
<?
require("commonPhpFunctions.php");
?>
#include "cdspage.wml" \
title="Available modification texts" \
navtrail_previous_links="<a class=navtrail href=<WEBURL>/admin/<lang:star: index.*.html>><MSG_ADMIN_AREA></a> &gt; <a class=navtrail href=<WEBURL>/admin/websubmit/><MSG_ADMIN_SUBMIT></a>" \
navbar_name="admin" \
navbar_select="websubmit_listmodify" \
cdspageboxlefttopadd="<protect><?displayLoginMenu('submit');?></protect>"
<?
<protect>
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
function displayPage()
{
# Query the sbmMODIFY table to obtain a list of all EDS modify items.
$qRes = mysql_query("SELECT modn FROM sbmMODIFY ORDER BY modn");
if($qRes)
{
# In this case, the query worked, and we can now obtain a list of
# all of the checks.
if(mysql_num_rows($qRes) < 1)
{
# In this case, there are no modifies in the DB, so we can
# just display a message stating this fact...
print("<TABLE WIDTH='100%' BORDER=0 CELLPADDING=0 ALIGN='cent"
. "er' CELLSPACING=0>\n<TR>\n<TD ALIGN='center'><SPAN STYLE="
. "\"color: green; text-align: center; font-size: large\">The"
. "re are currently no modify items in the database</SPAN></T"
. "D>\n</TR>\n</TABLE>\n");
} // END if
else
{
# In this case, there are modifies to display, so we can get
# on with it!
# Display the table header..
print("<TABLE BORDER=0 ALIGN='center'>\n");
# Now display each modify item in the table..
while($dataItem = mysql_fetch_array($qRes))
{
print("<TR>\n<TD ALIGN='left'>\n<A HREF='viewModifyEDS."
. "php?modn=" . ereg_replace("'", "&#39;",
htmlspecialchars($dataItem["modn"])) . "'>"
. ereg_replace("'", "&#39;",
htmlspecialchars($dataItem["modn"]))
. "</A></TD>\n</TR>\n");
} // END while
# Now that the table has been made, it is possible to close it
print("</TABLE>\n");
} // END else
# Now that the modifies have been displayed (or not), we can
# display a button to allow the addition of a new Modify item to
# EDS
print("<FORM ACTION='addModifyEDS.php' METHOD='post'><TABLE "
. "BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN='center' WIDTH="
. "'100%'>\n<TR><TD ALIGN='center'>\n<INPUT TYPE='button' VALUE"
. "='CREATE MODIFICATION TEXT' onClick=\"submit();\">\n</TD>\n</TR>\n"
. "</TABLE>\n</FORM>\n");
} // END if
else
{
# In this case, the query failed, so we can display an error
# message
print("<P CLASS=\"errorMsg\"><SPAN STYLE=\"color: red\">ERROR:"
. "</SPAN> It was not possible to obtain a list of modify items "
. "from the sbmMODIFY table of the " . DOCS_DATABASE
. " database.<BR>Please contact the 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);
if (!canUseWebSubmitAdmin($uid))
outWarning("You are not allowed to access WebSubmit Admin for this "
. "type of documents");
else
displayPage();
/************************End of main script***************************/
</protect>
?>

Event Timeline