Page MenuHomec4science

submitlist.php.wml
No OneTemporary

File Metadata

Created
Wed, Aug 7, 16:23

submitlist.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.
#include "configbis.wml"
<?
require("<LIBDIR>/php/cdsware/websubmit/commonPhpFunctions.php");
?>
#include "cdspage.wml" \
title="Monitor all submissions" \
navbar_name="main" \
navbar_select="monitor" \
cdspageboxlefttopadd="<protect><?displayLoginMenu('submit');?></protect>"
<?
<protect>
## $Id$
## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
// database connection
connectDB(DOCS_DATABASE);
// retrieve the long name of this type of document
$res = mysql_query("
SELECT ldocname
FROM sbmDOCTYPE
WHERE sdocname='$doctype'");
$row = mysql_fetch_row($res);
$ldocname = $row[0];
if ($ldocname == "")
outError("submitlist.php: Cannot find document type $doctype");
$formnb = 1;
?>
<BR>
<SMALL>
<STRONG class=headline>Notice:</STRONG><BR>
<?
print "You will find here the list of all the actions that have been made"
. " through CDS Submit and which were completed for the following type"
. " of document:<br><h3><b>$ldocname</b></h3>\n";
?>
</SMALL>
<TABLE>
<TR>
<TD>
<?
// request order
// default value
$reqorder = "md DESC, email";
// requested value
if ($order == "emaildown")
$reqorder = "email ASC, md DESC";
elseif ($order == "emailup")
$reqorder = "email DESC, md DESC";
elseif ($order == "refdown")
$reqorder = "reference ASC, md DESC";
elseif ($order == "refup")
$reqorder = "reference DESC, md DESC";
elseif ($order == "cddown")
$reqorder = "cd DESC, email";
elseif ($order == "cdup")
$reqorder = "cd ASC, email";
elseif ($order == "mddown")
$reqorder = "md DESC, email";
elseif ($order == "mdup")
$reqorder = "md ASC, email";
if (!AUTHENTICATION || $uid_email == "guest" || $uid_email == "")
print "<font color=red size=+1>You first have to login before using"
. " this feature. Use the left menu to log in.</font>";
else
{
$res = mysql_query("
SELECT *
FROM sbmSUBMISSIONS
WHERE status='finished' and
doctype='$doctype' and
id!=''
ORDER BY action,$reqorder");
$currentemail = "";
$currentaction = "";
$num = 0;
print "<TABLE border=0>";
while ($row = mysql_fetch_array($res))
{
if ($currentaction != $row['action'])
{
$currentaction = $row['action'];
$currentemail = "";
$res2 = mysql_query("
SELECT lactname
FROM sbmACTION
WHERE sactname='$currentaction'");
$row2 = mysql_fetch_row($res2);
$lactname = $row2[0];
print "<TR><TD colspan=5>&nbsp;</TD></TR>\n";
print "<TR><TD colspan=5 class=headerselected align=center>"
. "<b>$lactname</b></td></tr>";
print "<tr><th class=headerselected>Email&nbsp;&nbsp;"
. "<a href=submitlist.php?order=emaildown&doctype=$doctype>"
. "<img src=$IMAGES/smalldown.gif border=0></a>&nbsp;"
. "<a href=submitlist.php?order=emailup&doctype=$doctype>"
. "<img src=$IMAGES/smallup.gif border=0></a></th>"
. "<th class=headerselected>id</th>"
. "<th class=headerselected>reference&nbsp;&nbsp;"
. "<a href=submitlist.php?order=refdown&doctype=$doctype>"
. "<img src=$IMAGES/smalldown.gif border=0></a>&nbsp;"
. "<a href=submitlist.php?order=refup&doctype=$doctype>"
. "<img src=$IMAGES/smallup.gif border=0></a></th>"
. "<th class=headerselected>first access&nbsp;&nbsp;"
. "<a href=submitlist.php?order=cddown&doctype=$doctype>"
. "<img src=$IMAGES/smalldown.gif border=0></a>&nbsp;"
. "<a href=submitlist.php?order=cdup&doctype=$doctype>"
. "<img src=$IMAGES/smallup.gif border=0></a></th>"
. "<th class=headerselected>last access&nbsp;&nbsp;"
. "<a href=submitlist.php?order=mddown&doctype=$doctype>"
. "<img src=$IMAGES/smalldown.gif border=0></a>&nbsp;"
. "<a href=submitlist.php?order=mdup&doctype=$doctype>"
. "<img src=$IMAGES/smallup.gif border=0></a></th></tr>\n";
}
if ($currentemail != $row['email'])
{
$currentemail = $row['email'];
$emailtext = "$currentemail";
}
else
$emailtext = "\"";
$row['cd'] = str_replace(" ","&nbsp;",$row['cd']);
$row['md'] = str_replace(" ","&nbsp;",$row['md']);
if ($row['reference'] == "")
$row['reference'] = "<font color=red>not yet given</font>\n";
if ((int)($num/2) == $num/2)
print "<TR bgcolor=\"#e0e0e0\">\n";
else
print "<TR bgcolor=\"#eeeeee\">\n";
print "<td align=center><small>$emailtext</small></td><td><small>"
. $row['id']."</small></td><td><small>&nbsp;".$row['reference']
. "</small></td><td><small>".$row['cd']."</small></td><td><small>"
. $row['md']."</small></td></tr>";
$num++;
}
print "</table>";
}
?>
</TD>
</TR>
</TABLE>
</protect>

Event Timeline