Page MenuHomec4science

allChecksEDS.php.wml
No OneTemporary

File Metadata

Created
Sun, May 12, 12:54

allChecksEDS.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.
<?
require("commonPhpFunctions.php");
?>
#include "cdspage.wml" \
title="Available javascript checking functions" \
navtrail_previous_links="<a class=navtrail href=<WEBURL>/admin/<lang:star: index.*.html>>_(Admin Area)_</a> &gt; <a class=navtrail href=<WEBURL>/admin/websubmit/>_(WebSubmit Administration)_</a>" \
navbar_name="admin" \
navbar_select="websubmit_listchecks"
<?
<protect>
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
function displayPage()
{
# Query the sbmCHECKS table to obtain a list of all EDS checks.
$qRes = mysql_query("SELECT * FROM sbmCHECKS ORDER BY chname");
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 checks in the DB, so we can just
# display a message stating this fact...
print("<TABLE WIDTH='100%' BORDER=0 CELLPADDING=0 ALIGN='"
. "center' CELLSPACING=0>\n<TR>\n<TD ALIGN='center'><SPAN "
. "STYLE=\"color: green; text-align: center; font-size: "
. "large\">There are currently no checks in the database</SPA"
. "N></TD>\n</TR>\n</TABLE>\n");
} // END if
else
{
# In this case, there are checks to display, so we can get on
# with it!
# Display the table header..
print("<TABLE BORDER=0 ALIGN='center'>\n");
# Now display each action item in the table..
while($dataItems = mysql_fetch_array($qRes))
{
print("<TR>\n<TD ALIGN='left'>\n<A HREF='viewChecksEDS."
. "php?chname=" . ereg_replace("'", "&#39;",
htmlspecialchars($dataItems["chname"])) . "'>"
. ereg_replace("'", "&#39;",
htmlspecialchars($dataItems["chname"]))
. "</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 actions have been displayed (or not), we can
# display a button to allow the addition of a new action to EDS
print("<FORM ACTION='addCheckEDS.php' METHOD='post'><TABLE "
. "BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN='center' WIDTH="
. "'100%'>\n<TR><TD ALIGN='center'>\n<INPUT TYPE='button' VALUE"
. "='ADD NEW CHECK' onClick=\"submit();\">\n</TD>\n</TR>\n</TAB"
. "LE>\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 checks from "
. "the sbmCHECKS 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);
$auth = canUseWebSubmitAdmin($uid);
if (!$auth[0])
outWarning($auth[1]);
else
displayPage();
/************************End of main script***************************/
</protect>
?>

Event Timeline