Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103185941
Test_Status.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
Fri, Feb 28, 00:42
Size
3 KB
Mime Type
text/html
Expires
Sun, Mar 2, 00:42 (2 d)
Engine
blob
Format
Raw Data
Handle
24513046
Attached To
R3600 invenio-infoscience
Test_Status.php.wml
View Options
## $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.
<?
<protect>
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
## Description: function Test_Status
## This function checks whether the document is still waiting
## for approval or not.
## Author: T.Baron
##
## PARAMETERS: -
function Test_Status($param_array,$MAINPATH)
{
global $doctypes,$URLPATH;
$repno = $GLOBALS[VARS]->get_report_number();
$password = join("",file("$MAINPATH/password"));
$res = mysql_query("
SELECT status,
access
FROM sbmAPPROVAL
WHERE rn='$repno'");
if (mysql_num_rows($res) == 0)
printNotRequested($repno);
else
{
$row = mysql_fetch_row($res);
if ($row[0] == "approved")
printApproved($repno);
elseif ($row[0] == "rejected")
printRejected($repno);
}
}
function printNotRequested($repno)
{
global $URLPATH;
Request_Print("A", "
<SCRIPT>
document.forms[1].action=\"$URLPATH/Main.php\";
document.forms[1].page.value = 1;
document.forms[1].submit();
alert('The document $repno has never been asked for approval.\\nAnyway, you can still choose another document if you wish.');
</SCRIPT>");
// THE SCRIPT STOPS EXECUTION AT THIS POINT
exit;
}
function printApproved($repno)
{
global $URLPATH;
Request_Print("A", "
<SCRIPT>
document.forms[1].action=\"$URLPATH/Main.php\";
document.forms[1].page.value = 1;
document.forms[1].submit();
alert('The document $repno has already been approved.\\nAnyway, you can still choose another document if you wish.');
</SCRIPT>");
// THE SCRIPT STOPS EXECUTION AT THIS POINT
exit;
}
function printRejected($repno)
{
global $URLPATH;
Request_Print("A", "
<SCRIPT>
document.forms[1].action=\"$URLPATH/Main.php\";
document.forms[1].page.value = 1;
document.forms[1].submit();
alert('The document $repno has already been rejected.\\nAnyway, you can still choose another document if you wish.');
</SCRIPT>");
// THE SCRIPT STOPS EXECUTION AT THIS POINT
exit;
}
function printNotAuthorised($repno)
{
global $URLPATH;
Request_Print("A", "
<SCRIPT>
document.forms[1].action=\"$URLPATH/Main.php\";
document.forms[1].page.value = 1;
document.forms[1].submit();
alert('You did not enter the correct access number for document $repno.\\nPlease try another one.');
</SCRIPT>");
// THE SCRIPT STOPS EXECUTION AT THIS POINT
exit;
}
</protect>
?>
Event Timeline
Log In to Comment