## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.
?>
<SMALL>
<BR>
<FONT color=red>Description:</FONT><BR></SMALL>
<BLOCKQUOTE>
<UL>
<SMALL>
This page lists and explains the most of 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>
Click on one function name to get its description.<br>
Please note in this page when we refer to [param] this means the value of the parameter 'param' for a given document type.<br><br>
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].
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>
This function saves the value representing the base in which the document should be stored in a special file (named "DB"). This files will then be used by the bibFormat program (see "<A href="#Make_Weblib_Record">Make_Weblib_Record</a>" function)<br>
The values you use for these parameters are really dependant on the way your catalogues will be implemented in webSearch.<br>
For example if your document type will be a catalogue in itself, you can give him a unique database name in the [base] parameter. If this document type will be only a subpart of a catalogue, choose the catalogue name in [base].<br>
In itself, this function only saves values in special files, it does not do anything else. It's only the way <A href="#Make_Weblib_Record">Make_Weblib_Record</a> function will deal with these files which will be meaningful for your documents.
This parameter indicates the name of the form field used to transfer the first picture file. In standard configuration this is set to "PictureFiles".<br>
This value depends on the configuration you used for defining the form fields.
This parameter indicates the name of the form field used to transfer the firstaddtional picture file. In general this value shall be set to "OtherPictures".<br>
see the "<a href="#Upload_Included_Files">Upload_Included_Files</a>" function description.
To be used in the MBI-Modify Bibliographic Data 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 "+". Then the function retrieves the corresponding tag name (aleph or 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.
This function goes in the documents database to retrieve the title and author(s) of the document the user wants to revise or modify or... and displays this information on the screen so that the user can check if it is the correct document.
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.
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>
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).
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.
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.
This function creates the record file formatted for a direct insertion in the documents database. It uses the <a href="uploader.<lang:star: *>.php">Uploader</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 Bibliographic Information action).
This function creates the record file formatted for a direct insertion in the documents database. It uses the <a href="uploader.<lang:star: *>.php">Uploader</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.
This function takes the files transfered by the user and save them in their final destination. This destination as well as the final name of the file are computed from the "archivepath" and "formatfile" variables set by the Set_Archive_Files function.<br>
The "<a href=#Set_Archive_Files>Set_Archive_Files</a>" function should have been called before this function.
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.
This function takes the files transfered by the user and save them in their final destination. This destination as well as the final name of the file are computed from the "archivepath" and "formatfile" variables set by the Set_Archive_Files function.<br>
The "<a href=#Set_Archive_Files>Set_Archive_Files</a>" function should have been called before this function.<br>
This function is very similar to the <a href=#Move_Files_Archive>Move_Files_Archive</a> one, except that it also deals with the icons created during the submission process.
This function takes the files transfered by the user and save them in their final destination. This destination as well as the final name of the file are computed from the "archivepath" and "formatfile" variables set by the Set_Archive_Files function.<br>
The "<a href=#Set_Archive_Files>Set_Archive_Files</a>" function should have been called before this function.<br>
The main difference with the <a href=#Move_Files_Archive>Move_Files_Archive</a> function is that this function is used for revisions. So if there are already existing files in the archive, it saves them in an "obsolete" directory.
This function moves the existing submission directory to the /$STORAGE/done directory. If the TAR_FINAL_DIR configuration variable is set to TRUE then it tars and gzips the directory. configuration variables can be found in the "config_XXX.<lang:star: *>.php" file.
This function moves the existing submission directory to the /$STORAGE/pending directory. It is used to store temporarily this data until it is approved or...
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.
This function simply displays a text on the screen, telling the user the modification went fine. To be used in the Modify Bibliographic Information (MBI) action.
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><PA>categ</PA></b>": in this case this string is replaced with the content of the file [altrnin]<br>
"<b><PA>yy</PA></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).
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><PA>categ</PA></b>": in this case this string is replaced with the content of the file [altrnin]<br>
"<b><PA>yy</PA></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 <PA>categ</PA> 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><filename></b>": in this case the program extract the year from the file which name is <filename>. 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.
To be used in step 2 of the Modify Bibliographic Info (MBI) action, after the user has entered the new values of the fields he wants to modify (step 1).<br>
This function retrieves the modified fields from the cgi line and saves them in the submission directory.
email addresses of the people who will receive this email (comma separated list). this parameter may contain the <b><CATEG></b> string. In which case the variable computed from the [categformatDAM] parameter replaces this string.<br>
contains a regular expression used to compute the category of the document given the reference of the document.<br>
eg.: if [categformatAFP]="TEST-<CATEG>-.*" and the reference of the document is "TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1"
email addresses of the people who will receive this email (comma separated list). this parameter may contain the <b><CATEG></b> string. In which case the variable computed from the [categformatAFP] parameter replaces this string.<br>
contains a regular expression used to compute the category of the document given the reference of the document.<br>
eg.: if [categformatAFP]="TEST-<CATEG>-.*" 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.
You can write here a personal version of this email. If you want to insert some data from the submission directory in this mail, then insert strings like "<[filename]>" where [filename] is the name of the file containing the value. Eg.: "<TI>" will be replaced by the value extracted from the TI file (which in general contains the title).
email addresses of the people who will receive this email (comma separated list). this parameter may contain the <b><CATEG></b> string. In which case the variable computed from the [categformatDAM] parameter replaces this string.<br>
contains a regular expression used to compute the category of the document given the reference of the document.<br>
eg.: if [categformatAFP]="TEST-<CATEG>-.*" and the reference of the document is "TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1"
This function computes the value of the name the fulltext files should be saved as, and the value of the path where these files should be moved to.<br>
These values are saved in the "formatfile" and "archivepath" files.<br>
This function differs from the <a href=#Set_Approved_Archive>Set_Approved_Archive</a> function by the parameters it uses and the name of the files the computed values are saved in.<br>
Please note the <a href=#Get_Report_Number>Get_Report_Number</a> function should be called before this one.
contains a regular expression used to compute the variables used in [formatARCHIVE] and [pathARCHIVE] parameters.<br>
eg.: if [variablesARCHIVE]="ATL-<TEXT>" and the reference of the document is "ATL-CATEGORY1-2001-001", then the computed variable <TEXT> equals "CATEGORY1-2001-001".
This function retrieves the format of the transfered file (using file/gfile), and compares it to the default result stored in the sbmGFILERESULT table of webSubmit database. For the time being there is no way to modify this table through the manager interface... <br>
This function retrieves the extension of the transfered file as well as the declared format, and compares this extension to the default one stored in the FILE_EXTENSION table of the webSubmit database. For the time being there is no way to modify this table through the manager interface... <br>
The function also renames files containing special characters.<br>
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..
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.
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).
This parameter indicates the name of the form field used to transfer the first file. In standard configuration this is set to "PictureFiles" or "MainFile".<br>
This value depends on the configuration you used for defining the form fields.
This parameter indicates the name of the form field used to transfer the addtional files. In general this value shall be set to "OtherPictures" or "IncludedFiles".<br>
Can be one of "<b>picture</b>" or "<b>fulltext</b>".<br>
This value will determine whether the program will try to display an icon next to the list of transfered files or not.<br>
It will also determine how the form for the additional files upload will be created (will the authorized formats such as "jpeg", "gif"... or such as "PostScript", "PDF"...
</SMALL></TD>
</TR>
</TABLE>
</SMALL>
<BR><SMALL>
<FONT color=green>See also:</FONT></SMALL>
<BLOCKQUOTE><SMALL>
<A HREF="functionnew.<lang:star: *>.php">create a new function</A><BR>
<A HREF="functiondelete.<lang:star: *>.php">delete a function</A><BR>
<A HREF="functionedit.<lang:star: *>.php">edit a function</A><BR>