Page MenuHomec4science

functiondescription.html.wml
No OneTemporary

File Metadata

Created
Sun, Apr 28, 12:40

functiondescription.html.wml

## $Id$
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio 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.
##
## CDS Invenio 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 CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#include "configbis.wml"
#include "cdspage.wml" \
title="All functions explained" \
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> &gt; <a class=navtrail href=<lang:star: index.*.html>>_(Guide)_</a>" \
navbar_name="admin" \
navbar_select="websubmit-admin-guide"
<h3>Description:</h3>
<BLOCKQUOTE>
&nbsp;<span class="guideheader">T</span>his page lists and explains all the functions used in the demo
provided with CDSWare package. This list is not exhaustive since you can add any new function you need.<br>
&nbsp;<span class="guideheader">C</span>lick on one function name to get its description.<br>
&nbsp;<span class="guideheader">P</span>lease note in this page when we refer to [param] this means the
value of the parameter 'param' for a given document type.<br><br>
<table cellspacing=5><tr>
<td valign="top">
<a HREF="#CaseEDS">CaseEDS</A><br>
<a HREF="#Create_Modify_Interface">Create_Modify_Interface</A><br>
<a HREF="#Create_Recid">Create_Recid</A><br>
<a HREF="#Finish_Submission">Finish_Submission</A><br>
<a HREF="#Get_Info">Get_Info</A><br>
<a HREF="#Get_Report_Number">Get_Report_Number</A><br>
<a HREF="#Get_Sysno">Get_Sysno</A><br>
<a HREF="#Get_TFU_Files">Get_TFU_Files</A><br>
<a HREF="#Insert_Modify_Record">Insert_Modify_Record</A><br>
<a HREF="#Insert_Record">Insert_Record</A><br>
</td>
<td valign="top">
<a HREF="#Is_Original_Submitter">Is_Original_Submitter</A><br>
<a HREF="#Is_Referee">Is_Referee</A><br>
<a HREF="#Mail_Submitter">Mail_Submitter</A><br>
<a HREF="#Make_Modify_Record">Make_Modify_Record</A><br>
<a HREF="#Make_Record">Make_Record</A><br>
<a HREF="#Move_From_Pending">Move_From_Pending</A><br>
<a HREF="#Move_to_Done">Move_to_Done</A><br>
<a HREF="#Move_to_Pending">Move_to_Pending</A><br>
<a HREF="#Print_Success">Print_Success</A><br>
<a HREF="#Print_Success_APP">Print_Success_APP</A><br>
</td>
<td valign="top">
<a HREF="#Print_Success_MBI">Print_Success_MBI</A><br>
<a HREF="#Print_Success_SRV">Print_Success_SRV</A><br>
<a HREF="#Report_Number_Generation">Report_Number_Generation</A><br>
<a HREF="#Send_Approval_Request">Send_Approval_Request</A><br>
<a HREF="#Send_APP_Mail">Send_APP_Mail</A><br>
<a HREF="#Send_Modify_Mail">Send_Modify_Mail</A><br>
<a HREF="#Send_SRV_Mail">Send_SRV_Mail</A><br>
<a HREF="#Test_Status">Test_Status</A><br>
<a HREF="#Update_Approval_DB">Update_Approval_DB</A><br>
<a HREF="#Upload_Files">Upload_Files</A><br>
</td>
</tr></table>
</BLOCKQUOTE>
<br><br><A NAME="CaseEDS">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>CaseEDS</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function may be used if the treatment to be done after a submission depends on a field entered by
the user. Typically this is used in an approval interface. If the referee approves then we do this. If he rejects,
then we do other thing.<br>
More specifically, the function gets the value from the file named [casevariable] and compares it with the
values stored in [casevalues]. If a value matches, the function directly goes to the corresponding step stored
in [casesteps]. If no value is matched, it goes to step [casedefault].
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>casevariable</b></SMALL></TD>
<TD><SMALL>
This parameters contains the name of the file in which the function will get the chosen value.<br>
Eg: "decision"
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>casevalues</b></SMALL></TD>
<TD><SMALL>
Contains the list of recognized values to match with the chosen value. Should be a comma separated list of words.<br>
Eg: "approve,reject"
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>casesteps</b></SMALL></TD>
<TD><SMALL>
Contains the list of steps corresponding to the values matched in [casevalue]. It should be a comma
separated list of numbers<br>
Eg: "2,3"<br>
<i>In this example, if the value stored in the file named "decision" is "approved", then the function launches
step 2 of this action. If it is "reject", then step 3 is launched.</i>
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>casedefault</b></SMALL></TD>
<TD><SMALL>
Contains the step number to go by default if no match is found.<br>
Eg: "4"<br>
<i>In this example, if the value stored in the file named "decision" is not "approved" nor "reject", then
step 4 is launched.</i>
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Create_Modify_Interface">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Create_Modify_Interface</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
To be used in the MBI-Modify Record action.
It displays a web form allowing the user to modify the fields he chose. The fields are prefilled with the existing
values extracted from the documents database.
This functions takes the values stored in the [fieldnameMBI] file. This file contains a list of field name separated
with "+" (it is usually generated from a multiple select form field). Then the function retrieves the corresponding
tag name (marc-21) stored in the element definition. Finally it displays the web form and fills it with the existing
values found in the documents database.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>fieldnameMBI</b></SMALL></TD>
<TD><SMALL>
Contains the name of the file in which the function will find the list of fields the user wants to modify. Depends
on the web form configuration.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Create_Recid">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Create_Recid</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function retrieves a new record id from the records database. This record id will then be used to create the
XML record afterwards, or to link with the fulltext files. The created id is stored in a file named "SN".
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Finish_Submission">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Finish_Submission</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function stops the data treatment process even if further steps exist. This is used for example in the
approval action. In the first step, the program determines whether the user approved or rejected the
document (see <A href="#CaseEDS">CaseEDS</a> function description). Then depending on the result, it
executes step 2 or step 3. If it executes step 2, then it should continue with step 3 if nothing stopped it. The
Finish_Submission function plays this role.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Get_Info">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Get_Info</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function tries to retrieve in the "pending" directory or directly in the documents database, some information
about the document: title, original submitter's email and author(s).<br>
If found, this information is stored in 3 global variables: $emailvalue, $titlevalue, $authorvalue to be used
in other functions.<br>
If not found, an error message is displayed.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>authorFile</b></SMALL></TD>
<TD><SMALL>
Name of the file in which the author may be found if the document has not yet been integrated (in this case
it is still in the "pending" directory).
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>emailFile</b></SMALL></TD>
<TD><SMALL>
Name of the file in which the email of the original submitter may be found if the document has not yet been
integrated (in this case it is still in the "pending" directory).
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>titleFile</b></SMALL></TD>
<TD><SMALL>
Name of the file in which the title may be found if the document has not yet been integrated (in this case it is
still in the "pending" directory).
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Get_Report_Number">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Get_Report_Number</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function gets the value contained in the [edsrn] file and stores it in the reference global variable.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>edsrn</b></SMALL></TD>
<TD><SMALL>
Name of the file which stores the reference.<br>
This value depends on the web form configuration you did. It should contain the name of the form element used for storing the reference of the document.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Get_Sysno">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Get_Sysno</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This functions searches for the document in the database and stores the system number of this document in the "SN" file and in a global variable.<br>
"Get_Report_Number" should be called before.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Insert_Modify_Record">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Insert_Modify_Record</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function gets the output of bibconvert and uploads it into the MySQL bibliographical database.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Insert_Record">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Insert_Record</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function gets the output of bibFormat and uploads it into the MySQL bibliographical database.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Is_Original_Submitter">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Is_Original_Submitter</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
If the authentication module (login) is active in webSubmit, this function compares the current login with the email of the original submitter. If it is the same (or if the current user has superuser rights), we go on. If it differs, an error message is issued.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Is_Referee">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Is_Referee</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function checks whether the currently logged user is a referee for this document.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Mail_Submitter">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Mail_Submitter</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function send an email to the submitter to warn him the document he has just submitted has been
correctly received.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>authorfile</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the authors of the document<br>
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>titleFile</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the title of the document<br>
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>emailFile</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the email of the submitter of the document<br>
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>status</b></SMALL></TD>
<TD><SMALL>
Depending on the value of this parameter, the function adds an additional text to the email.<br>
This parameter can be one of:<br>
<b>ADDED</b>: The file has been integrated in the database.<br>
<b>APPROVAL</b>: The file has been sent for approval to a referee.<br>
or can stay empty.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>edsrn</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the reference of the document<br>
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>newrnin</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the 2nd reference of the document (if any)<br>
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Make_Modify_Record">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Make_Modify_Record</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function creates the record file formatted for a direct insertion in the documents database. It uses the
<a href="bibconvert.<lang:star: *>.html">bibConvert</a> tool.<br>
The main difference between all the Make_..._Record functions are the parameters.<br>
As its name says, this particular function should be used for the modification of a record. (MBI- Modify
Record action).
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>modifyTemplate</b></SMALL></TD>
<TD><SMALL>
Name of bibconvert's configuration file used for creating the mysql record.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>sourceTemplate</b></SMALL></TD>
<TD><SMALL>
Name of bibconvert's source file.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Make_Record">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Make_Record</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function creates the record file formatted for a direct insertion in the documents database. It uses the
<a href="bibconvert.<lang:star: *>.html">bibConvert</a> tool.<br>
The main difference between all the Make_..._Record functions are the parameters.<br>
As its name does not say :), this particular function should be used for the submission of a document.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>createTemplate</b></SMALL></TD>
<TD><SMALL>
Name of bibconvert's configuration file used for creating the mysql record.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>sourceTemplate</b></SMALL></TD>
<TD><SMALL>
Name of bibconvert's source file.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Move_From_Pending">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Move_From_Pending</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function retrieves the data of a submission which was temporarily stored in the "pending" directory
(waiting for an approval for example), and moves it to the current action directory.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Move_to_Done">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Move_to_Done</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function moves the existing submission directory to the <CFG_SUBMIT_DIR>/done directory. If the
Then it tars and gzips the directory.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Move_to_Pending">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Move_to_Pending</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function moves the existing submission directory to the <CFG_SUBMIT_DIR>/pending directory. It is
used to store temporarily this data until it is approved or...
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Print_Success">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Print_Success</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function simply displays a text on the screen, telling the user the submission went fine. To be used in
the "Submit New Record" action.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>status</b></SMALL></TD>
<TD><SMALL>
Depending on the value of this parameter, the function adds an additional text to the email.<br>
This parameter can be one of:<br>
<b>ADDED</b>: The file has been integrated in the database.<br>
<b>APPROVAL</b>: The file has been sent for approval to a referee.<br>
or can stay empty.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>edsrn</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the reference of the document<br>
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>newrnin</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the 2nd reference of the document (if any)<br>
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Print_Success_APP">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Print_Success_APP</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function simply displays a text on the screen, telling the referee his decision has been taken into account.
To be used in the Approve (APP) action.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Print_Success_MBI">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Print_Success_MBI</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function simply displays a text on the screen, telling the user the modification went fine. To be used in
the Modify Record (MBI) action.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Print_Success_SRV">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Print_Success_SRV</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function simply displays a text on the screen, telling the user the revision went fine. To be used in the
Submit New File (SRV) action.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL>none</TD>
</TR>
</TABLE>
<br><br><A NAME="Report_Number_Generation">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Report_Number_Generation</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function is used to automatically generate a reference number.<br>
After generating the reference, the function saves it into the [newrnin] file and sets the global variable
containing this reference.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>autorngen</b></SMALL></TD>
<TD><SMALL>
If set to "<b>Y</b>": The reference number is generated.<br>
If set to "<b>N</b>": The reference number is read from a file ([newrnin])<br>
If set to "<b>A</b>": The reference number will be the access number of the submission.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>counterpath</b></SMALL></TD>
<TD><SMALL>
indicates the file in which the program will find the counter for this reference generation.<br>
The value of this parameter may contain one of:<BR>
"<b>&lt;PA&gt;categ&lt;/PA&gt;</b>": in this case this string is replaced with the content of the file [altrnin]<br>
"<b>&lt;PA&gt;yy&lt;/PA&gt;</b>": in this case this string is replaced by the current year (4 digits) if [altyeargen]
is set to "AUTO", or by the content of the [altyeargen] file in any other case. (this content should be formatted
as a date (dd/mm/yyyy).
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>rnformat</b></SMALL></TD>
<TD><SMALL>
This is the format used by the program to create the reference. The program computes the value of the
parameter and appends a "-" followed by the current value of the counter increased by 1.<br>
The value of this parameter may contain one of:<BR>
"<b>&lt;PA&gt;categ&lt;/PA&gt;</b>": in this case this string is replaced with the content of the file [altrnin]<br>
"<b>&lt;PA&gt;yy&lt;/PA&gt;</b>": in this case this string is replaced by the current year (4 digits) if [altyeargen]
is set to "AUTO", or by the content of the [altyeargen] file in any other case. (this content should be formatted
as a date (dd/mm/yyyy).
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>rnin</b></SMALL></TD>
<TD><SMALL>
This parameter contains the name of the file in which the program will find the category if needed. The content
of thif file will then replace the string &lt;PA&gt;categ&lt;/PA&gt; in the reference format or in the counter
path.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>yeargen</b></SMALL></TD>
<TD><SMALL>
This parameter can be one of:<br>
"<b>AUTO</b>": in this case the program takes the current 4 digit year.<br>
"<b>&lt;filename&gt;</b>": in this case the program extract the year from the file which name is
&lt;filename&gt;. This file should contain a date (dd/mm/yyyy).
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>edsrn</b></SMALL></TD>
<TD><SMALL>
Name of the file in which the created reference will be stored.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Send_Approval_Request">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Send_Approval_Request</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function sends an email to the referee in order to start the simple approval process.<br>
This function is very CERN-specific and should be changed in case of external use.<br>
Must be called after the <a href=#Get_Report_Number>Get_Report_Number</a> function.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>addressesDAM</b></SMALL></TD>
<TD><SMALL>
email addresses of the people who will receive this email (comma separated list). this parameter may contain the <b>&lt;CATEG&gt;</b> string. In which case the variable computed from the [categformatDAM] parameter replaces this string.<br>
eg.: "&lt;CATEG&gt;-email@cern.ch"
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>categformatDAM</b></SMALL></TD>
<TD><SMALL>
contains a regular expression used to compute the category of the document given the reference of the document.<br>
eg.: if [categformatAFP]="TEST-&lt;CATEG&gt;-.*" and the reference of the document is "TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1"
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>authorfile</b></SMALL></TD>
<TD><SMALL>
name of the file in which the authors are stored
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>titlefile</b></SMALL></TD>
<TD><SMALL>
name of the file in which the title is stored.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>directory</b></SMALL></TD>
<TD><SMALL>
parameter used to create the URL to access the files.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Send_APP_Mail">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Send_APP_Mail</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
Sends an email to warn people that a document has been approved.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>addressesAPP</b></SMALL></TD>
<TD><SMALL>
email addresses of the people who will receive this email (comma separated list). this parameter may contain
the <b>&lt;CATEG&gt;</b> string. In which case the variable computed from the [categformatAFP] parameter
replaces this string.<br>
eg.: "&lt;CATEG&gt;-email@cern.ch"
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>categformatAPP</b></SMALL></TD>
<TD><SMALL>
contains a regular expression used to compute the category of the document given the reference of the
document.<br>
eg.: if [categformatAFP]="TEST-&lt;CATEG&gt;-.*" and the reference of the document is
"TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1"
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>newrnin</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the 2nd reference of the approved document (if any).
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>edsrn</b></SMALL></TD>
<TD><SMALL>
Name of the file containing the reference of the approved document.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Send_Modify_Mail">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Send_Modify_Mail</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function sends an email to warn people a document has been modified and the user his modifications
have been taken into account..
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>addressesMBI</b></SMALL></TD>
<TD><SMALL>
email addresses of the people who will receive this email (comma separated list).
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>fieldnameMBI</b></SMALL></TD>
<TD><SMALL>
name of the file containing the modified fields.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>sourceDoc</b></SMALL></TD>
<TD><SMALL>
Long name for the type of document. This name will be displayed in the mail.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>emailfile</b></SMALL></TD>
<TD><SMALL>
name of the file in which the email of the modifier will be found.
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Send_SRV_Mail">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Send_SRV_Mail</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function sends an email to warn people a revision has been carried out.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>notefile</b></SMALL></TD>
<TD><SMALL>
name of the file in which the note can be found
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>emailfile</b></SMALL></TD>
<TD><SMALL>
name of the file containing the submitter's email
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>addressesSRV</b></SMALL></TD>
<TD><SMALL>
email addresses of the people who will receive this email (comma separated list). this parameter may contain the <b>&lt;CATEG&gt;</b> string. In which case the variable computed from the [categformatDAM] parameter replaces this string.<br>
eg.: "&lt;CATEG&gt;-email@cern.ch"
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>categformatDAM</b></SMALL></TD>
<TD><SMALL>
contains a regular expression used to compute the category of the document given the reference of the
document.<br>
eg.: if [categformatAFP]="TEST-&lt;CATEG&gt;-.*" and the reference of the document is
"TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1"
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Test_Status">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Test_Status</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function checks whether the considered document has been requested for approval and is still waiting
for approval. It also checks whether the password stored in file "password" of the submission directory
corresponds to the password associated with the document..
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top" colspan="2"><SMALL><b>none</b></SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Update_Approval_DB">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Update_Approval_DB</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function updates the approval database when a document has just been approved or rejected. It uses
the [categformatDAM] parameter to compute the category of the document.<br>
Must be called after the <a href=#Get_Report_Number>Get_Report_Number</a> function.
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>categformatDAM</b></SMALL></TD>
<TD><SMALL>
It contains the regular expression which allows the retrieval of the category from the reference number.<br>
Eg: if [categformatDAM]="TEST-&lt;CATEG&gt;-.*" and the reference is "TEST-CATEG1-2001-001" then the
category will be recognized as "CATEG1".
</SMALL></TD>
</TR>
</TABLE>
<br><br><A NAME="Upload_Files">
<table border="1" width="80%">
<TR><TD colspan="2" bgcolor="#ddddff"><SMALL><b>Upload_Files</b></SMALL></TD></TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>description</SMALL></TD></TR>
<TR>
<TD colspan="2">
<SMALL>
This function displays the list of already transfered files (main and additional ones), and also outputs an html
form for uploading other files (pictures or fulltexts).
</SMALL>
</TD>
</TR>
<TR><TD colspan="2" bgcolor="#eeeeff" align="center"><SMALL>parameters</SMALL></TD></TR>
<TR>
<TD valign="top"><SMALL><b>maxsize</b></SMALL></TD>
<TD><SMALL>
Maximum allowed size for the transfered files (size in bits)
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>minsize</b></SMALL></TD>
<TD><SMALL>
Minimum allowed size for the transfered files (size in bits)
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>iconsize</b></SMALL></TD>
<TD><SMALL>
In case the transfered files are pictures (jpg, gif or pdf), the function will automatically try to create icons from them.
This parameter indicates the size in pixel of the created icon.
</SMALL></TD>
</TR>
<TR>
<TD valign="top"><SMALL><b>type</b></SMALL></TD>
<TD><SMALL>
This can be one of "fulltext" or "picture". If the type is set to "picture" then the function will try to create icons
(uses the ImageMagick's "convert" tool)
</SMALL></TD>
</TR>
</TABLE>
<h3>See also:</h3>
<BLOCKQUOTE>
<li><A HREF="functionnew.<lang:star: *>.html">create a new function</A><BR>
<li><A HREF="functiondelete.<lang:star: *>.html">delete a function</A><BR>
<li><A HREF="functionedit.<lang:star: *>.html">edit a function</A><BR>
</BLOCKQUOTE>

Event Timeline