function fieldWrapper($name, $label, $element)
 {
     $out = '<div class="form-group';
     $out .= fieldError($name) . '">';
     $out .= fieldLabel($name, $label);
     $out .= $element;
     $out .= '</div>';
     return $out;
 }
Example #2
0
    $showSourceCheckBoxIsChecked = " checked";
} else {
    $showSourceCheckBoxIsChecked = "";
}
echo "\n<tr>\n\t<td valign=\"top\"" . $rowSpan . "><b>Options:</b></td>\n\t<td" . $rowSpan . ">&nbsp;</td>" . "\n\t<td width=\"215\" valign=\"top\"" . $rowSpan . "><input type=\"checkbox\" name=\"showSource\" value=\"1\"{$showSourceCheckBoxIsChecked} title=\"mark this checkbox if original source data shall be displayed alongside the parsed data for easy comparison\">&nbsp;&nbsp;Display original source data</td>";
if (isset($_SESSION['user_permissions']) and preg_match("/allow_batch_import/", $_SESSION['user_permissions'])) {
    if ($importRecordsRadio == "all") {
        $importRecordsRadioAllChecked = " checked";
        // select the 'All' radio button
        $importRecordsRadioOnlyChecked = "";
    } else {
        $importRecordsRadioAllChecked = "";
        $importRecordsRadioOnlyChecked = " checked";
        // select the 'Only' radio button
    }
    echo "\n\t<td width=\"98\" valign=\"top\"" . $rowSpan . ">Import records:</td>" . "\n\t<td valign=\"top\"><input type=\"radio\" name=\"importRecordsRadio\" value=\"all\"{$importRecordsRadioAllChecked} title=\"choose 'All' if you want to import all pasted records at once\">&nbsp;All</td>" . "\n</tr>" . "\n<tr>" . "\n\t<td valign=\"top\">" . fieldError("importRecords", $errors) . "<input type=\"radio\" name=\"importRecordsRadio\" value=\"only\"{$importRecordsRadioOnlyChecked} title=\"choose 'Only' if you just want to import particular records from the pasted source data\">&nbsp;Only:&nbsp;&nbsp;<input type=\"text\" name=\"importRecords\" value=\"{$importRecords}\" size=\"5\" title=\"enter the record number(s) here: e.g. enter '1-5' to import the first five records; or enter '1 3-5 7' to import records 1, 3, 4, 5 and 7\"></td>";
} else {
    echo "\n\t<td colspan=\"2\">&nbsp;</td>";
}
echo "\n</tr>";
echo "\n<tr>\n\t<td>&nbsp;</td>\n\t<td>&nbsp;</td>";
if (isset($_SESSION['user_permissions']) and preg_match("/allow_import|allow_batch_import/", $_SESSION['user_permissions'])) {
    $importButtonLock = "";
    $importTitle = "press this button to import the given source data";
} else {
    $importButtonLock = " disabled";
    $importTitle = "not available since you have no permission to import any records";
}
echo "\n\t<td colspan=\"3\">\n\t\t<input type=\"submit\" name=\"submit\" value=\"Import\"{$importButtonLock} title=\"{$importTitle}\">\n\t</td>" . "\n</tr>" . "\n<tr>\n\t<td align=\"center\" colspan=\"5\">&nbsp;</td>" . "\n</tr>" . "\n<tr>\n\t<td valign=\"top\"><b>Help:</b></td>\n\t<td>&nbsp;</td>" . "\n\t<td valign=\"top\" colspan=\"3\">This form enables you to import records from the <a href=\"" . $importCSArecordsURL . "\" target=\"top\">" . "Cambridge Scientific Abstracts</a> (CSA) Internet Database Service. The form requires the 'full record' format offered by the CSA Internet Database Service. An example of a valid CSA 'full record' format is given below:</td>" . "\n</tr>" . "\n<tr>\n\t<td valign=\"top\"><b>Example:</b></td>\n\t<td>&nbsp;</td>" . "\n\t<td valign=\"top\" colspan=\"3\"><pre>Record 1 of 52\n\nDN: Database Name\n    ASFA: Aquatic Sciences and Fisheries Abstracts\nTI: Title\n    Diet composition influences the growth of the pelagic mysid\n    shrimp, Mysis mixta (Mysidacea)\nAU: Author\n    Lehtiniemi, M; Vitasalo, M; Kuosa, H\nAF: Affiliation\n    Finnish Institute of Marine Research, P.O. Box 33, FIN-00931\n    Helsinki, Finland\nSO: Source\n    Boreal Environment Research [Boreal Environ. Res.]. Vol. 7, no. 2,\n    pp. 121-128. 2002.\nIS: ISSN\n    1239-6095\nAB: Abstract\n    We studied the growth, feeding, and elemental composition of Mysis\n    mixta from June to September 1997 in the northern Baltic Sea. In\n    June the juvenile population had a unimodal size distribution\n    (mean length similar to 6 mm), but in July-August, the population\n    was divided into two cohorts. A stomach content analysis showed\n    that the mysids in the larger and faster growing cohort fed\n    significantly more on crustacean zooplankton and pelagic material\n    than the smaller one: the mean ratios of zooplankton:phytoplankton\n    and pelagic:benthic particles in July-August were respectively\n    0.27 and 0.11 for the small cohort, and 0.54 and 0.36 for the\n    large cohort. This suggests that food quality and its energy\n    content are important in influencing the growth of pelagic mysids\n    in the northern Baltic. The C:N ratio of the two cohorts did not\n    vary much, which shows that ingestion of food items with varying\n    elemental content is not necessarily reflected in the elemental\n    composition of consumers.\nLA: Language\n    English\nSL: Summary Language\n    English\nPY: Publication Year\n    2002\nPD: Publication Date\n    20020000\nPT: Publication Type\n    Journal Article\nDE: Descriptors\n    Growth; Feeding; Diets; Chemical composition; Seasonal variations;\n    Mysis mixta; ANE, Baltic Sea\nTR: ASFA Input Center Number\n    CS0309883\nCL: Classification\n    Q1 01424 Age and growth; O 1070 Ecology/Community Studies\nUD: Update\n    200305\nSF: Subfile\n    ASFA 1: Biological Sciences &amp; Living Resources; Oceanic Abstracts\nAN: Accession Number\n    5449614\nF1: Fulltext Info\n    1239-6095,7,2,121-128,2002\nA1: Alert Info\n    20030606\nJN: Journal Name\n    Boreal Environment Research\nJP: Journal Pages\n    121-128\nJV: Journal Volume\n    7\nJI: Journal Issue\n    2\nDT: Document Type\n    J\nBL: Bibliographic Level\n    AS\n</pre></td>" . "\n</tr>" . "\n</table>" . "\n</form>";
// --------------------------------------------------------------------
// SHOW ERROR IN RED:
Example #3
0
?>
</span>
		</a>
	</td>
</tr>
</table>
<table id="searchopt" align="center" border="0" cellpadding="0" cellspacing="10" width="95%" summary="This table holds search &amp; display options" style="display: none;">
<tr>
	<td width="120" valign="top">
		<div class="sect"><?php 
echo $loc["SQLQuery"];
?>
:</div>
	</td>
	<td colspan="2"><?php 
echo fieldError("sqlQuery", $errors);
?>

		<textarea name="sqlQuery" rows="6" cols="60"><?php 
echo $sqlQuery;
?>

		</textarea>
	</td>
</tr>
<tr>
	<td valign="middle">
		<div class="sect"><?php 
echo $loc["DisplayOptions"];
?>
:</div>
Example #4
0
} else {
    $userGroupsFieldLock = " disabled";
    // it would be more consistent to remove the user groups field completely from the form if the user has no permission to use the user groups feature; but since this would complicate the processing quite a bit, we just disable the field (for now)
    $userGroupsTitle = $loc["NoPermission"] . $loc["NoPermission_ForUserGroups"];
}
echo "\n\t<td colspan=\"3\" class=\"userfieldsbg\">" . "\n\t\t<input type=\"text\" id=\"userGroupsName\" name=\"userGroupsName\" value=\"{$userGroupsName}\" size=\"47\"{$userGroupsFieldLock} title=\"{$userGroupsTitle}\">" . $userGroupsSuggestElements . "\n\t</td>" . "\n\t<td width=\"74\" class=\"userfieldsbg\"><b>" . $loc["CiteKey"] . "</b></td>" . "\n\t<td align=\"right\" class=\"userfieldsbg\">" . "\n\t\t<input type=\"text\" id=\"citeKeyName\" name=\"citeKeyName\" value=\"{$citeKeyName}\" size=\"14\" title=\"" . $loc["DescriptionCiteKey"] . "\">" . $citeKeySuggestElements . "\n\t</td>" . "\n</tr>" . "\n<tr>" . "\n\t<td width=\"74\" class=\"userfieldsbg\"><b>" . $loc["Related"] . "</b></td>" . "\n\t<td colspan=\"5\" class=\"userfieldsbg\">" . "\n\t\t<input type=\"text\" id=\"relatedName\" name=\"relatedName\" value=\"{$relatedName}\" size=\"84\" title=\"" . $loc["DescriptionRelated"] . "\">" . $relatedSuggestElements . "\n\t</td>" . "\n</tr>" . "\n<tr>" . "\n\t<td width=\"74\" class=\"otherfieldsbg\"><b>" . $loc["File"] . "</b></td>" . "\n\t<td colspan=\"3\" class=\"otherfieldsbg\"><input type=\"text\" id=\"fileName\" name=\"fileName\" value=\"{$fileName}\" size=\"47\" title=\"" . $loc["DescriptionFile"] . "\"{$fieldLock}></td>";
if (isset($_SESSION['user_permissions']) and preg_match("/allow_upload/", $_SESSION['user_permissions'])) {
    $uploadButtonLock = "";
    $uploadTitle = $loc["DescriptionFileUpload"];
} else {
    $uploadButtonLock = " disabled";
    // disabling of the upload button doesn't seem to work in all browsers (e.g., it doesn't work in Safari on MacOSX Panther, but does work with Mozilla & Camino) ?:-/
    $uploadTitle = $loc["NoPermission"] . $loc["NoPermission_ForFileUpload"];
    // similarily, not all browsers will show title strings for disabled buttons (Safari does, Mozilla & Camino do not)
}
echo "\n\t<td valign=\"bottom\" colspan=\"2\" class=\"otherfieldsbg\">" . fieldError("uploadFile", $errors) . "<input type=\"file\" id=\"uploadFile\" name=\"uploadFile\" size=\"17\"{$uploadButtonLock} title=\"{$uploadTitle}\"></td>" . "\n</tr>" . "\n<tr>" . "\n\t<td width=\"74\" class=\"otherfieldsbg\"><b>" . $loc["URL"] . "</b></td>" . "\n\t<td colspan=\"3\" class=\"otherfieldsbg\">" . "\n\t\t<input type=\"text\" id=\"urlName\" name=\"urlName\" value=\"{$urlName}\" size=\"47\" title=\"" . $loc["DescriptionURL"] . "\">" . $urlSuggestElements . "\n\t</td>" . "\n\t<td width=\"74\" class=\"otherfieldsbg\"><b>" . $loc["DOI"] . "</b></td>" . "\n\t<td align=\"right\" class=\"otherfieldsbg\">" . "\n\t\t<input type=\"text\" id=\"doiName\" name=\"doiName\" value=\"{$doiName}\" size=\"14\" title=\"" . $loc["DescriptionDOI"] . "\">" . $doiSuggestElements . "\n\t</td>" . "\n</tr>";
if ($onlinePublication == "yes") {
    // if the 'online_publication' field value is "yes"
    $onlinePublicationCheckBoxIsChecked = " checked";
} else {
    $onlinePublicationCheckBoxIsChecked = "";
}
// don't mark the 'Online publication' checkbox
echo "\n<tr>" . "\n\t<td width=\"74\" class=\"otherfieldsbg\">&nbsp;</td>" . "\n\t<td colspan=\"3\" class=\"otherfieldsbg\">\n\t\t<input type=\"checkbox\" id=\"onlinePublicationCheckBox\" name=\"onlinePublicationCheckBox\" value=\"1\"{$onlinePublicationCheckBoxIsChecked} title=\"" . $loc["DescriptionOnlinePublicationCheckbox"] . "\">&nbsp;" . "\n\t\t" . $loc["Online publication. Cite with this text:"] . "&nbsp;" . "\n\t\t<input type=\"text\" id=\"onlineCitationName\" name=\"onlineCitationName\" value=\"{$onlineCitationName}\" size=\"7\" title=\"" . $loc["DescriptionOnlinePublicationCitation"] . "\">" . $onlineCitationSuggestElements . "\n\t</td>";
if (isset($loginEmail)) {
    // ...we'll show a checkbox where the user can state that the current publication stems form his own institution
    if ($contributionIDCheckBox == "1" or preg_match("/{$abbrevInstitution}/", $contributionID)) {
        // if the '$contributionIDCheckBox' variable is set to 1 -OR- if the currrent user's abbreviated institution name is listed within the 'contribution_id' field
        $contributionIDCheckBoxIsChecked = " checked";
    } else {
        $contributionIDCheckBoxIsChecked = "";
Example #5
0
	<td valign="top"><?php 
echo fieldError("exportFormatSelector", $errors);
?>

		<select name="exportFormatSelector[]" multiple><?php 
echo $exportFormatOptionTags;
?>

		</select>
	</td>
</tr>
<tr>
	<td align="left"></td>
	<td align="left" valign="top">"Main fields" searches:</td>
	<td valign="top"><?php 
echo fieldError("mainFieldsSelector", $errors);
?>

		<select name="mainFieldsSelector[]" multiple<?php 
echo $fieldDisabled;
?>
><?php 
echo $mainFieldsOptionTags;
?>

		</select>
	</td>
</tr>
<tr>
	<td align="left"></td>
	<td colspan="2">
Example #6
0
		<input type="text" name="origRecord" value="<?php 
echo encodeHTML($origRecord);
?>
" size="10" title="enter the serial number of the original (master) record">
	</td>
</tr>
<tr>
	<td width="120">
		<div class="sect"><?php 
echo $loc["Duplicates"];
?>
:</div>
	</td>
	<td><?php 
echo fieldError("dupRecords", $errors);
?>

		<input type="text" name="dupRecords" value="<?php 
echo encodeHTML($dupRecords);
?>
" size="50" title="enter the serial number(s) of all records that are duplicate entries of the above specified record; separate multiple serials with any non-digit characters">
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td>
		<input type="submit" name="submit" value="Flag Duplicates" title="mark the given records as original/duplicate entries">
	</td>
</tr>
</table>
Example #7
0
}
echo "\n<tr>\n\t<td>&nbsp;</td>\n\t<td>&nbsp;</td>";
if (isset($_SESSION['user_permissions']) and preg_match("/allow_import|allow_batch_import/", $_SESSION['user_permissions'])) {
    $importButtonLock = "";
    $importTitleMain = "press this button to import the given source data";
    $importTitleID = "press this button to fetch &amp; import source data for the given IDs";
} else {
    $importButtonLock = " disabled";
    $importTitleMain = "not available since you have no permission to import any records";
    $importTitleID = "not available since you have no permission to import any records";
}
echo "\n\t<td colspan=\"3\">\n\t\t<input type=\"submit\" name=\"submit\" value=\"Import\"{$importButtonLock} title=\"{$importTitleMain}\">\n\t</td>" . "\n</tr>" . "\n</table>" . "\n</form>";
// (2c) Start <form> and <table> holding the form elements of the "Import IDs" form:
echo "\n<form action=\"import_modify.php\" method=\"POST\">" . "\n<input type=\"hidden\" name=\"formType\" value=\"importID\">" . "\n<input type=\"hidden\" name=\"submit\" value=\"Import\">" . "\n<input type=\"hidden\" name=\"showSource\" value=\"1\">";
// in case of the MEDLINE format, original source data will be displayed alongside the parsed data for easier comparison
echo "\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" width=\"95%\" summary=\"This table holds a form to import records via their ID\">" . "\n<tr>\n\t<td width=\"94\" valign=\"top\"><b>Import IDs:</b></td>\n\t<td width=\"10\">&nbsp;</td>" . "\n\t<td colspan=\"3\">" . fieldError("sourceIDs", $errors) . $skipBadRecordsInputID . "<input type=\"text\" name=\"sourceIDs\" value=\"{$sourceIDs}\" size=\"66\" title=\"enter PubMed IDs, arXiv IDs, DOIs or OpenURLs, multiple IDs must be delimited by whitespace\"></td>" . "\n</tr>" . "\n<tr>\n\t<td>&nbsp;</td>\n\t<td>&nbsp;</td>" . "\n\t<td colspan=\"3\">\n\t\t<input type=\"submit\" name=\"submit\" value=\"Import\"{$importButtonLock} title=\"{$importTitleID}\">\n\t</td>" . "\n</tr>" . "\n<tr>\n\t<td align=\"center\" colspan=\"5\">&nbsp;</td>" . "\n</tr>";
// (2d) Display a table row with some help text:
echo "\n<tr>\n\t<td valign=\"top\"><b>Help:</b></td>\n\t<td>&nbsp;</td>" . "\n\t<td valign=\"top\" colspan=\"3\">The upper form enables you to import records from " . "<a href=\"http://www.endnote.com/\" target=\"top\">Endnote</a> (tagged text or XML), " . "<a href=\"http://www.refman.com/\" target=\"top\">Reference Manager</a> (RIS), " . "<a href=\"http://www.refworks.com/\" target=\"top\">RefWorks</a>, " . "<a href=\"http://en.wikipedia.org/wiki/Bibtex\" target=\"top\">BibTeX</a>, " . "<a href=\"http://www.loc.gov/standards/mods/\" target=\"top\">MODS XML</a>, " . "<a href=\"http://isiknowledge.com/wos/\" target=\"top\">ISI Web of Science</a>, " . "<a href=\"http://www.pubmed.gov/\" target=\"top\">PubMed</a> (MEDLINE or XML), " . "<a href=\"" . $importCSArecordsURL . "\" target=\"top\">CSA Illumina</a>, " . "<a href=\"http://www.cas.org/SCIFINDER/\" target=\"top\">SciFinder</a> " . "and <a href=\"http://www.copac.ac.uk/\" target=\"top\">COPAC</a>." . " Please see the <a href=\"http://import.refbase.net/\" target=\"top\">refbase online documentation</a> for more information about the supported formats and any requirements in format structure.</td>" . "\n</tr>" . "\n<tr>\n\t<td>&nbsp;</td>\n\t<td>&nbsp;</td>" . "\n\t<td colspan=\"3\">The lower form allows you to import records via their ID; supported IDs: <a href=\"http://www.pubmed.gov/\" target=\"top\">PubMed</a> <a href=\"http://en.wikipedia.org/wiki/PMID\" target=\"top\">ID (PMID)</a>, <a href=\"http://arxiv.org/\" target=\"top\">arXiv</a> <a href=\"http://arxiv.org/help/arxiv_identifier\" target=\"top\">ID</a>, <a href=\"http://www.doi.org/\" target=\"top\">DOI</a> and <a href=\"http://en.wikipedia.org/wiki/OpenURL\" target=\"top\">OpenURL</a>. Just enter one or more IDs (delimited by whitespace) and press the <em>Import</em> button. Please note that currently you cannot mix different IDs within the same import action, i.e. specify either PubMed IDs or DOIs, etc.</td>" . "\n</tr>" . "\n</table>" . "\n</form>";
// --------------------------------------------------------------------
// SHOW ERROR IN RED:
function fieldError($fieldName, $errors)
{
    if (isset($errors[$fieldName])) {
        return "<b><span class=\"warning2\">" . $errors[$fieldName] . "</span></b><br>";
    }
}
// --------------------------------------------------------------------
// DISPLAY THE HTML FOOTER:
// call the 'showPageFooter()' and 'displayHTMLfoot()' functions (which are defined in 'footer.inc.php')
showPageFooter($HeaderString);
displayHTMLfoot();
Example #8
0
		<td valign="top"><b>Path to the Bibutils directory [optional]:</b></td>
		<td valign="top"><?php 
    echo fieldError("pathToBibutils", $errors);
    ?>

			<input type="text" name="pathToBibutils" value="<?php 
    echo $formVars["pathToBibutils"];
    ?>
" size="30">
		</td>
		<td valign="top"><a href="http://bibutils.refbase.net/" target="top" title="more info about the refbase integration with Bibutils"><em>Bibutils</em></a> provides additional import and export funtionality to refbase (e.g. support for Endnote &amp; BibTeX). It is optional, but highly recommended. The install script attempts to locate <em>Bibutils</em> for you. If you can't access <em>Bibutils</em> from your path, please fill this value in manually (and, if you think other people might have <em>Bibutils</em> installed to the same path, <a href="http://support.refbase.net/" target="top" title="refbase forums &amp; mailinglists">report</a> it to the refbase developers). The path must end with a slash!</td>
	</tr>
	<tr>
		<td valign="top"><b>Default character set:</b></td>
		<td valign="top"><?php 
    echo fieldError("defaultCharacterSet", $errors);
    ?>

			<select name="defaultCharacterSet">
				<option<?php 
    echo $latin1CharacterSetSelected;
    ?>
>latin1</option>
				<option<?php 
    echo $unicodeCharacterSetSelected;
    ?>
>utf8</option>
			</select>
		</td>
		<td valign="top">Specify the default character set for the MySQL database used by refbase. Note that <em>utf8</em> (Unicode) requires MySQL 4.1.x or greater, otherwise <em>latin1</em> (i.e., ISO-8859-1 West European) will be used by default.</td>
	</tr>
Example #9
0
			<input type="text" name="adminUserName" value="<?php 
    echo $formVars["adminUserName"];
    ?>
" size="30">
		</td>
		<td valign="top">Give the name of an administrative user that has full access to your MySQL database. Often, this is the <em>root</em> user.</td>
	</tr>
	<tr>
		<td valign="top"><b>MySQL Admin Password:</b></td>
		<td valign="top"><?php 
    // the form won't remember the password, so we'll ask the user to re-type it...
    if (!empty($errors) and !isset($errors["adminPassword"])) {
        // ...if there were some validation errors but not with the password field
        echo "\n\t\t\t<b>Please type your password again:</b>\n\t\t\t<br>";
    } else {
        echo fieldError("adminPassword", $errors);
    }
    ?>

			<input type="password" name="adminPassword" size="30">
		</td>
		<td valign="top">Please enter the password for the administrative user you've specified above.</td>
	</tr>
	<tr>
		<td valign="top">&nbsp;</td>
		<td valign="top" align="right">
			<input type="submit" name="submit" value="Update">
		</td>
		<td valign="top">&nbsp;</td>
	</tr>
</table>
Example #10
0
    echo fieldError("notes", $errors);
    ?>

		<input type="text" name="notes" value="<?php 
    echo encodeHTML($formVars["notes"]);
    ?>
" size="50">
	</td>
</tr>
<tr>
	<td align="left"><?php 
    echo $loc["Marked"];
    ?>
:</td>
	<td><?php 
    echo fieldError("marked", $errors);
    ?>

		<input type="radio" name="marked" value="yes"<?php 
    echo $markedRadioYesChecked;
    ?>
>&nbsp;&nbsp;<?php 
    echo $loc["yes"];
    ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="marked" value="no"<?php 
    echo $markedRadioNoChecked;
    ?>
>&nbsp;&nbsp;<?php 
    echo $loc["no"];
    ?>