Page MenuHomec4science

editPageElementEDS.php.wml
No OneTemporary

File Metadata

Created
Fri, Jul 5, 09:24

editPageElementEDS.php.wml

This document is not UTF8. It was detected as ISO-8859-1 (Latin 1) and converted to UTF8 for display.
## $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="Edit the <I><protect><?print $fidesc;?></protect></I> Element on page <protect><?print $pageNumber;?></protect> of <protect><?print $subname;?></protect>" \
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"
<?
<protect>
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
?>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide
function verifyChanges(curFitext, sugFitext, curLevel, sugLevel,
curSdesc, sugSdesc, curCheckn, sugCheckn)
// Function to test whether the values for the parameters to be changed
// have actually been changed by the user when they submit them to the
// database for update. If not, the function returns false. If so, the
// function returns true.
// Author: Nicholas Robinson
// Email: Nicholas.Robinson@cern.ch
// Created: 27/07/2000
// Last Modified: 31/01/2001
{
if((curFitext == sugFitext) &&
(curLevel == sugLevel) &&
(curSdesc == sugSdesc) &&
(curCheckn == sugCheckn))
{
alert("No Change In The Data Has Been Made! Cannot Submit.");
return false;
} // End if
else
{
return true;
} // End else
} // End function verifyChanges()
// -->
</SCRIPT>
<?
/*********************Function Descriptions***************************/
function makeElementEditInterface($subname, $pageNumber, $fidesc,
$fieldnb, $doctype, $nPgs)
{
/******************************************************************
The purpose of this function is to effectively create the page
that allows the user to edit the details of a given element as it
appears on a given page of a given submission. The function
creates a form that will hold the details of a given element as
it appears on a given page of a given submission in the EDS
system. By altering the details of the element using this form
and then submitting it, the user will be able to alter the
details storred for the element in the database.
The function also creates another form that consists of a
"FINISHED" button. When the user presses this button, the
administrator returns to the page that displays the details of a
submission page and all of its elements, without making any
changes.
The function is passed several parameters. These are the
$subname value, which is the id of the given submission in which
this instance of the element is being used; the $pageNumber
value, which is the page number of the submission on which this
instance of the element is located; the $fidesc value, which is
the description of the element that is being used; the $fieldnb
value, which is the position number of the instance of the
element on the given page of the given submission; the $link
value, which is actually a pointer to a connection to the
database server; the $doctype value, which holds the unique
identifier of the doctype to which the submission belongs. This
is actually passed to the function simply so that the value can
be passed with the form when it is submitted, as it is needed to
correctly display the details of a page when the user moves
backward through the administrator system to the page which
displays the details of a given doctype; the $nPgs value, which
holds a value for the number of pages that make up the given
submission.
Author: Nicholas Robinson
Email: Nicholas.Robinson@cern.ch
ca8nro@yahoo.co.uk
Created: 28/11/2000
Last Modified: 09/05/2001
******************************************************************/
# The first step is to execute a query, selecting the detials of the
# given element as it appears on the given page...
$res = mysql_query("SELECT * FROM sbmFIELD WHERE subname = '$subname'"
. " AND pagenb = '$pageNumber' AND fidesc = '$fidesc' AND fieldnb ="
. " '$fieldnb'");
if($res)
{
# The query to retrieve the information about an element of the
# page has worked.
# Produce the appropriate output, depending upon the number of
# rows returned by the query...
if(mysql_num_rows($res) == 1)
{
# In this case, as expected, there is one entry for the given
# doctype in the sbmDOCTYPE table..
# Now, display a quick set of page instructions for the user..
print("<TABLE WIDTH='90%' BGCOLOR='#D3DCE3' ALIGN='center' "
. "CELLSPACING=0 CELLPADDING=0 BORDER=1>\n<TR><TD "
. "ALIGN='center'>\n<P STYLE=\"color: blue; text-align: "
. "center; font-size: small; font-weight: bold\">Below are "
. "the details of the <EM>$fidesc</EM> element as it "
. "appears on page <EM>$pageNumber</EM> of the <EM>$subname"
. "</EM> submission.<BR>You can edit them by alterring values"
. " in boxes, and clicking on \"SAVE CHANGES\".</P>\n</TD>\n"
. "</TR>\n</TABLE>\n");
# Make a horizontal rule to divide the page sections...
drawSeparator();
# Now make the table: names & fields...
# Get the columns list
$columns = mysql_list_fields(DOCS_DATABASE, "sbmFIELD");
# Get the number of fields
$numTblFlds = mysql_num_fields($columns);
# Get the row of data
$dataRow = mysql_fetch_array($res);
# Now, we are ready to display the details of the given
# element of the given page of the given submission in a
# table. Each data item will be contained within a form input
# box so that it can be edited if this is desirable.
print("<FORM ACTION='editPageElementEDS.php' METHOD='post'>\n"
. "<INPUT TYPE='hidden' NAME='update' VALUE='true'>\n");
# Before we display most of the table, we can first display
# the upper part of the table, which will be the subname,
# pagenb, fieldnb, fidesc, cd, md: fields, that can't be
# modified...
print("<INPUT TYPE='hidden' NAME='subname' VALUE='" . $dataRow["subname"] . "'><INPUT TYPE='hidden' NAME='pageNumber' VALUE='" . $dataRow["pagenb"] . "'><INPUT TYPE='hidden' NAME='fieldnb' VALUE='" . $dataRow["fieldnb"] . "'><INPUT TYPE='hidden' NAME='fidesc' VALUE='" . $dataRow["fidesc"] . "'><INPUT TYPE='hidden' NAME='cd' VALUE='" . $dataRow["cd"] . "'><INPUT TYPE='hidden' NAME='md' VALUE='" . $dataRow["md"] . "'>");
print ("<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN='center"
. "' WIDTH='100%'>\n");
# Now fill this new table with all of the details...
for($indx = 0; $indx < $numTblFlds; $indx++)
{
# Get the name of the current field...
$currentField = mysql_field_name($columns, $indx);
# Ensure that we don't once again print our non-editable
# fields out...
if(($currentField != "subname") && ($currentField !=
"pagenb") && ($currentField != "fieldnb") &&
($currentField != "fidesc") && ($currentField != "cd")
&& ($currentField != "md") && ($currentField !=
"fiefi1")
&& ($currentField != "fiefi2"))
{
# First, display the field name...
print("<TR>\n<TH BGCOLOR='#87CEFA' ALIGN='right' "
. "WIDTH='20%'>\n");
if($currentField == "fitext")
{
print("Element Label:&nbsp;");
} // END if
elseif($currentField == "level")
{
print("Level:&nbsp;");
} // END elseif
elseif($currentField == "sdesc")
{
print("Short Desc:&nbsp;");
} // END elseif
elseif($currentField == "checkn")
{
print("Check:&nbsp;");
} // END elseif
else
{
print("$currentField" . ":&nbsp;");
} // END else
print("&nbsp;</TH>\n<TD ALIGN='left' WIDTH='80%' "
. "BGCOLOR='#FFFFCC'>\n");
if($currentField == "checkn")
{
# This is the check field, and we must simply present
# a drop-down list full of checks.
if($chksRes = mysql_query("SELECT chname FROM sbmCHECKS"
. " ORDER BY chname"))
{
# Query fine.
if(mysql_num_rows($chksRes) > 0)
{
# Checks to be put into a select box...good!
print("<SELECT NAME='checkn'>\n");
if($dataRow["checkn"] != "")
{
# It has a value, so we can show it.
print("<OPTION VALUE='"
. ereg_replace("'", "&#39;",
htmlspecialchars($dataRow[$indx]))
. "'>" . ereg_replace("'", "&#39;",
htmlspecialchars($dataRow[$indx]))
. "</OPTION>\n");
} // END if
# Add option for having no JavaScript Check for
# the element.
print("<OPTION VALUE=''>--NO JAVASCRIPT "
. "CHECK--</OPTION>\n");
while($stuff = mysql_fetch_row($chksRes))
{
if($stuff[0] != $dataRow["checkn"])
{
# Add the check to the list if it is not
# the currently added check
print("<OPTION VALUE='"
. ereg_replace("'", "&#39;",
htmlspecialchars($stuff[0]))
. "'>" . ereg_replace("'", "&#39;",
htmlspecialchars($stuff[0]))
. "</OPTION>\n");
} // END if
} // END while
# Close up the select list
print("</SELECT>\n");
} // END if
else
{
# No checks stored in DB! We therefore can't
# allow the user to alter the current check
# incase they start putting in weird illegal
# checknames that would break referential
# integrity rules.
print("<INPUT TYPE='readonly' NAME='checkn' "
. "VALUE='" . ereg_replace("'", "&#39;",
htmlspecialchars($dataRow[$indx]))
. "'>&nbsp;&nbsp;<SPAN STYLE=\"font-size: "
. "small; font-weight: bold; color: red; "
. "text-align: center\">No Checks Stored In "
. DOCS_DATABASE . ". Cannot Allow Ammending. "
. "<A HREF='addCheckEDS.php'>Add Check</A>"
. ".</SPAN>\n");
} // END else
# Free the memory wasting $chksRes result pointer
mysql_free_result($chksRes);
} // END if
else
{
# Can't query for checks, therefore can't edit it!
print("<INPUT TYPE='readonly' NAME='checkn' "
. "VALUE='" . ereg_replace("'", "&#39;",
htmlspecialchars($dataRow[$indx]))
. "'>&nbsp;&nbsp;<SPAN STYLE=\"font-size: "
. "small; font-weight: bold; color: red; "
. "text-align: center\">Cannot Retrieve Check"
. " Details from " . DOCS_DATABASE . ". Cannot"
. " Allow Ammending of Current Value."
. "</SPAN>\n");
} // END else
} // END if
elseif($currentField == "level")
{
# 'Tis a select list with M or O values that we want
print("<SELECT NAME='$currentField'>\n<OPTION VALUE="
. "'M'>Mandatory</OPTION>\n<OPTION ");
if($dataRow[$indx] == "O" || $dataRow[$indx] == "o")
{
# Make this one selected...
print("SELECTED ");
} // END if
print("VALUE='O'>Optional</OPTION>\n</SELECT>\n");
} // END elseif
else
{
# No need for a listbox...just make it a normal text
# input field...
print("<INPUT TYPE='text' NAME="
. "'$currentField' SIZE=");
if($currentField != "level" &&
mysql_field_type($columns, $indx) == "blob")
{
print("60");
} // END if
else
{
print(mysql_field_len($columns, $indx) + 1);
} // END else
### I'm going to replace all "\n" chars with nothing!
print(" VALUE='" . ereg_replace("\n", " ",
ereg_replace("'", "&#39;",
htmlspecialchars($dataRow[$indx])))
. "'>\n");
} // END else
print("</TD>\n</TR>\n");
} // END if
} // END for
# Now that the table has been filled with all of the actions
# details, it can be closed..
print("</TABLE>\n");
# Now that the form has been drawn, it is possible to produce
# a new table underneath, containing buttons. There will be a
# "SAVE" button, a "RESET" button and a "FINISHED button.
print("<INPUT TYPE='hidden' NAME='doctype' VALUE='$doctype'>"
. "\n<INPUT TYPE='hidden' NAME='nPgs' VALUE='$nPgs'>\n<P>\n"
. "<TABLE ALIGN='center' BORDER=0 CELLSPACING=0 "
. "CELLPADDING=0>\n<TR>\n<TD ALIGN='right'>\n<INPUT TYPE='"
. "button' VALUE='SAVE CHANGES' onClick=\"for(i=0; i < "
. "level.length; i++) { if(level[i].selected) { break; } } "
. "if(verifyChanges("
. "escape('" . ereg_replace("\n", " ",
ereg_replace("'","\\'",
htmlspecialchars($dataRow["fitext"])))
. "'), escape(fitext.value), escape('"
. ereg_replace("'","\\'",
htmlspecialchars($dataRow["level"]))
. "'), escape(level[i].value), escape('"
. ereg_replace("'","\\'",
htmlspecialchars($dataRow["sdesc"]))
. "'), escape(sdesc.value), escape('"
. ereg_replace("'","\\'",
htmlspecialchars($dataRow["checkn"]))
. "'), escape(checkn.options[checkn.selectedIndex].value))) {"
. " if(confirm('Are You Sure You"
. " Want To "
. "Modify These Details?')) { submit(); } }\">\n</TD>\n"
. "<TD ALIGN='center'>\n<INPUT TYPE='button' VALUE='RESET "
. "CHANGES' onClick=\"reset();\">\n</TD>\n</FORM>\n<FORM "
. "ACTION='pageDetsEDS.php' METHOD='post'>\n<INPUT TYPE='"
. "hidden' NAME='subname' VALUE='" . $dataRow["subname"]
. "'>\n<INPUT TYPE='hidden' NAME='pageNumber' VALUE='"
. "$pageNumber'>\n<INPUT TYPE='hidden' NAME='nPgs' VALUE='"
. "$nPgs'>\n<INPUT TYPE='hidden' NAME='doctype' VALUE='"
. "$doctype'>\n<TD ALIGN='center'>\n<INPUT TYPE='button' "
. "VALUE='FINISHED' onClick=\"submit();\">\n</TD>\n</FORM>\n"
. "</TR>\n</TABLE>\n</P>\n");
} // END if
elseif(mysql_num_rows($queryResult) > 1)
{
# In this case, there are more than 1 row for the given
# element instance on a page stored in the sbmFIELD table, which
# means that the sbmFIELD table must have some kind of primary
# key violations..
print("<P CLASS='errorMsg'><SPAN STYLE=\"color: red\">ERROR:"
. "</SPAN> More than one row of data concerning element <EM>"
. "$fieldnb ($fidesc)</EM> on page <EM>$pageNumber</EM> of "
. "the <EM>$subname</EM> submission has been returned from "
. "the <EM>sbmFIELD</EM> table.<BR>This indicates primary key "
. "duplication in this table.<BR>Please inform system "
. "administrator.</P>\n");
# Send a mail to the system admin people to warn them about
# this serious error..
# Get the current date and time...
$dateDets = getdate();
$msgTxt = "When the editDoctypeEDS.php page attempted to "
. "retrieve the details of the <EM>$fieldnb ($fidesc)</EM> on"
. " page <EM>$pageNumber</EM> of the <EM>$subname</EM> "
. "submission, several rows were returned for this element "
. "instance from the sbmFIELD table. The query was made using "
. "the subname, pagenb, fidesc and fieldnb fields as the "
. "search key. As these fields together should uniquely "
. "identify an instance of an element on a page, there "
. "must be key violations in this table.\n\nThis problem "
. "should be corrected immediately.\n\nWebSubmit Administrator (";
$msgTxt .= makeDate();
$msgTxt .= ")";
# Now send the mail..
mail(ADMIN_EMAIL, "sbmFIELD Table Possible Key Violation!",
$msgTxt, "From: WebSubmit_Administrator");
} // END elseif
elseif(mysql_num_rows($queryResult) == 0)
{
# This means that the given element instance has no entry in
# the sbmFIELD table...
print("<P CLASS='errorMsg'><SPAN STYLE=\"color: red\">"
. "ERROR:</SPAN> No data concerning element <EM>$fieldnb "
. "($fidesc)</EM> on page <EM>$pageNumber</EM> of the "
. "<EM>$subname</EM> submission was found in the <EM>sbmFIELD"
. "</EM> table.<BR>This suggests a data consistency error in"
. " the " . DOCS_DATABASE . " database.<BR>Please inform the "
. "system administrator.</P>\n");
# Now send an email to the administrator(s) to inform them of
# this serious error...
$msgTxt = "When the editDoctypeEDS.php script attempted to "
. "retrieve the details of element $fieldnb ($fidesc) on page"
. " $pageNumber of the $subname submission, no rows were "
. "returned from the sbmFIELD table.\n\nBecause the user had to "
. "click a link to get to this page for the given element "
. "instance, its details must be referred to in other tables "
. " of EDS. This suggests that there are either data "
. "inconsistencies or concurrency problems within EDS.\n\n"
. "This should be investigated and corrected ASAP.\n\nEDS "
. "Administrator (";
$msgTxt .= makeDate();
$msgTxt .= ")";
# Now send the mail..
mail(ADMIN_EMAIL, "Possible Data Inconsistency Error!",
$msgTxt, "From: WebSubmit_Administrator");
} // END elseif
else
{
# Some other sort of error has ocurred, so present the error
# message on the screen.
print("<P CLASS='errorMsg'><SPAN STYLE=\"color: red\">"
. "ERROR:</SPAN> Unable to correctly retrieve data from the"
. " <EM>sbmFIELD</EM> table of " . DOCS_DATABASE . ".<BR>Please"
. " inform system administrator.</P>\n");
} // END else
# Now, free the query result...
mysql_free_result($res);
} // END if
else
{
# The query to retrieve the details of the element on the page
# has failed.
print("<P CLASS='errorMsg'><SPAN STYLE=\"color: red\">"
. "ERROR:</SPAN> Unable to conduct a query on the "
. "<EM>sbmFIELD</EM> table of " . DOCS_DATABASE . ".<BR>Please"
. " inform system administrator.</P>\n");
} // END else
} // END function makeElementEditInterface()
function displayPage()
{
global $doctype,$update,$fitext,$level,$sdesc,$checkn,$subname,$pageNumber,$fidesc,$fieldnb,$nPgs;
# Conduct a test to see if this call to the page is the first call
# to it, whereby it should simply display the information about the
# element in a form, or if it is a self-referential call to the
# page, whereby it should carry out some sort of updating of
# details, then redisplay the information
if($update)
{
# In this case, this is a call to update the elements details...
# Free memory space associated with $update...
unset($update);
# Get the data, so that it can be committed for the modification
# date field (md)...
$dateDets = getdate();
# Now put the date into a variable in a nice MySQL friendly
# format
$modifiedDate = $dateDets['year'] . "-" . $dateDets['mon'] . "-"
. $dateDets['mday'];
# Begin constructing the UPDATE query string...
$queryString = "UPDATE sbmFIELD SET fitext = '$fitext', level = '"
. "$level', sdesc = '$sdesc', checkn = '$checkn', md = '"
. "$modifiedDate' WHERE subname = '$subname' AND pagenb = "
. "'$pageNumber' AND fidesc = '$fidesc' AND fieldnb = "
. "'$fieldnb'";
# Now actually execute the update query
$updateResult = mysql_query($queryString);
if($updateResult)
{
# If the query could actually be executed without error
if(mysql_affected_rows() == 1)
{
# In this case, only 1 rows was updated, which is as
# expected
# Display a nice message informing the user that the update
# has been carried out...
print("<P STYLE=\"color: green; text-align: center; font-"
. "style: bold; font-size: large\">Modification of Element"
. " Complete</P>\n");
# Send the administrator a message to inform them of the
# update that has taken place...
$msgTxt = "An update has been carried out on an element of"
. " the $subname submission. The update was carried out "
. "on element $fieldnb ($fidesc), which appears on page "
. "$pageNumber of the $subname submission in the "
. DOCS_DATABASE . " database.\n\nWebSubmit Administrator (";
$msgTxt .= makeDate();
$msgTxt .= ")";
# Now send the mail..
mail(ADMIN_EMAIL, "${subname}.$fidesc Element Updated "
. " (Page $pageNumber)",
$msgTxt, "From: WebSubmit_Administrator");
# Now, we need to update the modified date field for this
# submission in the sbmIMPLEMENT table, so that the actual
# submission itself shows as having been modified.
$mdResult = mysql_query("UPDATE sbmIMPLEMENT SET md = "
. "'$modifiedDate' WHERE subname = '$subname'");
if($mdResult)
{
# The modification query worked, so free its result
mysql_free_result($mdResult);
} // END if
else
{
# The update query failed, so output a quick alert...
print("<SCRIPT TYPE='text/javascript'>alert('ERROR: "
. "Unable to update the md field for this submission"
. "<BR>in the sbmIMPLEMENT table.');</SCRIPT>\n");
} // END else
# We can now redirect the browser to the the page showing
# the details of this document type...
print("<FORM ACTION='pageDetsEDS.php' METHOD='post' "
. "NAME='referForm'>\n"
. "<INPUT TYPE='hidden' NAME='doctype' VALUE='$doctype'>\n"
. "<INPUT TYPE='hidden' NAME='subname' VALUE='$subname'>\n"
. "<INPUT TYPE='hidden' NAME='pageNumber' VALUE='"
. "$pageNumber'>\n<INPUT TYPE='hidden' NAME='nPgs' VALUE='"
. "$nPgs'>\n</FORM>\n");
print("<SCRIPT LANGUAGE=\"JavaScript\">\n"
. "setTimeout(\"document.referForm.submit();\", 0);\n"
. "</SCRIPT>\n");
} // END if
elseif(mysql_affected_rows() > 1)
{
# More than 1 row was updated -> bad news: key duplication
# Display an error message about this...
print("<P CLASS='errorMsg'><SPAN STYLE=\"color: red\">"
. "ERROR:</SPAN> Multiple rows have been updated in the "
. "<EM>sbmFIELD</EM> table.<BR>This has resulted from an "
. "attempt to update element <EM>$fieldnb ($fidesc)</EM> "
. "on page <EM>$pageNumber</EM> of the <EM>$subname</EM> "
. "submission.<BR>Please inform the system administrator."
. "</P>\n");
# Now, email the administrator to let them know this, as it
# is a potentially dangerous error.
$msgTxt = "When a user updated the details of element "
. "$fieldnb ($fidesc) on page $pageNumber of the $subname "
. "submission, using the WebSubmit Administrator, several rows "
. "were affected in the sbmFIELD table. The update was "
. "conducted using the subname, pagenb, fidesc and fieldnb"
. " fields as keys. As an element should only appear once"
. " on a submission page in a certain position, this means"
. " that there must be key violations in the sbmFIELD table. "
. " There should only have been 1 row affected by this "
. " update.\n\nThis problem should be investigated and cor"
. "rected immediately.\n\nWebSubmit Administrator (";
$msgTxt .= makeDate();
$msgTxt .= ")";
# Now send the mail..
mail(ADMIN_EMAIL, "ERROR: sbmFIELD Table Multiple Row "
. "Update!", $msgTxt, "From: WebSubmit_Administrator");
} // END elseif
else
{
# No rows were updated -> Something strange here!
# Display an error message about this...
print("<P CLASS='errorMsg'><SPAN STYLE=\"color: red\">"
. "ERROR:</SPAN> No rows have been updated in the <EM>"
. "sbmFIELD</EM> table.<BR>This suggests that there could be"
. " data inconsistencies or concurrency problems.<BR>Plea"
. "se inform the system administrator.</P>\n");
# Better email the administrator & let them know...
$msgTxt = "When a user updated the details of element "
. "$fieldnb ($fidesc) on page $pageNumber of the $subname "
. "submission, using the WebSubmit Administrator, no rows were "
. "affected in the sbmFIELD table by this update.\n\nBecause "
. "the user must have altered this elements details to "
. "submit an update on it, it must have been present at "
. "around the time that the user submitted their update.\n"
. "\nThis suggests the possibility of concurrency or data "
. "inconsistency problems in this table.\n\nThis should"
. " be investigated and corrected ASAP.\n\nEDS Administrat"
. "or (";
$msgTxt .= makeDate();
$msgTxt .= ")";
# Now send the mail..
mail(ADMIN_EMAIL, "Error: Possible Concurrency Problems",
$msgTxt, "From: WebSubmit_Administrator");
} // END else
} // END if
else
{
# Display an error message about this...
print("<P CLASS='errorMsg'><SPAN STYLE=\"color: red\">"
. "ERROR:</SPAN> No rows have been updated in the <EM>sbmFIELD"
. "</EM> table.<BR>This suggests that there could be data "
. "inconsistencies or concurrency problems.<BR>Please inform"
. " the system administrator.</P>\n");
} // END else
} // END if
else
{
# In this case, this is the first call to the page, so we can
# simply display the details of the given element, as it appears
# on the given page of the given submission...
makeElementEditInterface($subname, $pageNumber, $fidesc,
$fieldnb, $doctype, $nPgs);
} // 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,$doctype);
if (!$auth[0])
outWarning($auth[1]. "<br><br>" . "You are not allowed to access WebSubmit Admin for this type of documents");
else
displayPage();
/************************End of main script***************************/
</protect>
?>

Event Timeline