//echo encodeHTML($hostInstitutionAbbrevName); ?> <!--). --><?php //echo $loc["You are welcome to send"]; ?> <!-- <a href="mailto:--><?php //echo $feedbackEmail; ?> <!--">--><?php //echo $loc["feedback address"]; ?> <!--</a>. --><?php //echo $loc["refbaseDesc"]; ?> <!--</td>--> <!-- <td width="--><?php //echo $rightColumnWidth; ?> <!--" valign="top" align="center"><a href="http://www.refbase.net/"><img src="img/refbase_credit.gif" alt="powered by refbase" width="142" height="51" hspace="0" border="0"></a></td>--> <!-- </tr>--> </table><?php // -------------------------------------------------------------------- // (5) CLOSE the database connection: disconnectFromMySQLDatabase(); // function 'disconnectFromMySQLDatabase()' is defined in 'include.inc.php' // -------------------------------------------------------------------- // DISPLAY THE HTML FOOTER: // call the 'showPageFooter()' and 'displayHTMLfoot()' functions (which are defined in 'footer.inc.php') showPageFooter($HeaderString); displayHTMLfoot(); // --------------------------------------------------------------------
function showQueryPage($operation, $viewType, $showRows, $rowOffset) { global $officialDatabaseName; // defined in 'ini.inc.php' global $displayType; global $loc; // defined in 'locales/core.php' global $client; // If there's no stored message available: if (!isset($_SESSION['HeaderString'])) { $HeaderString = $loc["SearchDB"] . ":"; } else { $HeaderString = $_SESSION['HeaderString']; // extract 'HeaderString' session variable (only necessary if register globals is OFF!) // Note: though we clear the session variable, the current message is still available to this script via '$HeaderString': deleteSessionVariable("HeaderString"); // function 'deleteSessionVariable()' is defined in 'include.inc.php' } // For HTML output, we'll need to reset the value of the '$displayType' variable // (which, by default, is set to "Export"; see above); otherwise, the 'originalDisplayType' // parameter in the 'quickSearch' form of the page header would be incorrectly set to "Export" $displayType = ""; // if '$displayType' is empty, 'show.php' will use the default view that's given in session variable 'userDefaultView' // Show the login status: showLogin(); // (function 'showLogin()' is defined in 'include.inc.php') // DISPLAY header: // call the 'displayHTMLhead()' and 'showPageHeader()' functions (which are defined in 'header.inc.php'): displayHTMLhead(encodeHTML($officialDatabaseName) . " -- " . $loc["Search"], "index,follow", "Search the " . encodeHTML($officialDatabaseName), "", true, "", $viewType, array()); if (!preg_match("/^Mobile\$/i", $viewType) and !preg_match("/^inc/i", $client)) { // Note: we omit the visible header in mobile view ('viewType=Mobile') and for include mechanisms! showPageHeader($HeaderString); } // Define variables holding common drop-down elements, i.e. build properly formatted <option> tag elements: $dropDownConditionals1Array = array("contains" => $loc["contains"], "does not contain" => $loc["contains not"], "is equal to" => $loc["equal to"], "is not equal to" => $loc["equal to not"], "starts with" => $loc["starts with"], "ends with" => $loc["ends with"]); $dropDownItems1 = buildSelectMenuOptions($dropDownConditionals1Array, "//", "\t\t\t", true); // function 'buildSelectMenuOptions()' is defined in 'include.inc.php' $dropDownConditionals2Array = array("is greater than" => $loc["is greater than"], "is less than" => $loc["is less than"], "is within range" => $loc["is within range"], "is within list" => $loc["is within list"]); $dropDownItems2 = buildSelectMenuOptions($dropDownConditionals2Array, "//", "\t\t\t", true); $dropDownFieldNames1Array = array("author" => $loc["DropDownFieldName_Author"], "address" => $loc["DropDownFieldName_Address"], "corporate_author" => $loc["DropDownFieldName_CorporateAuthor"], "thesis" => $loc["DropDownFieldName_Thesis"], "", "title" => $loc["DropDownFieldName_Title"], "orig_title" => $loc["DropDownFieldName_OrigTitle"], "", "year" => $loc["DropDownFieldName_Year"], "publication" => $loc["DropDownFieldName_Publication"], "abbrev_journal" => $loc["DropDownFieldName_AbbrevJournal"], "editor" => $loc["DropDownFieldName_Editor"], "", "volume_numeric" => $loc["DropDownFieldName_Volume"], "issue" => $loc["DropDownFieldName_Issue"], "pages" => $loc["DropDownFieldName_Pages"], "", "series_title" => $loc["DropDownFieldName_SeriesTitle"], "abbrev_series_title" => $loc["DropDownFieldName_AbbrevSeriesTitle"], "series_editor" => $loc["DropDownFieldName_SeriesEditor"], "series_volume_numeric" => $loc["DropDownFieldName_SeriesVolume"], "series_issue" => $loc["DropDownFieldName_SeriesIssue"], "", "publisher" => $loc["DropDownFieldName_Publisher"], "place" => $loc["DropDownFieldName_Place"], "", "edition" => $loc["DropDownFieldName_Edition"], "medium" => $loc["DropDownFieldName_Medium"], "issn" => $loc["DropDownFieldName_Issn"], "isbn" => $loc["DropDownFieldName_Isbn"], "", "language" => $loc["DropDownFieldName_Language"], "summary_language" => $loc["DropDownFieldName_SummaryLanguage"], "", "keywords" => $loc["DropDownFieldName_Keywords"], "abstract" => $loc["DropDownFieldName_Abstract"], "", "area" => $loc["DropDownFieldName_Area"], "expedition" => $loc["DropDownFieldName_Expedition"], "conference" => $loc["DropDownFieldName_Conference"], "", "doi" => $loc["DropDownFieldName_Doi"], "url" => $loc["DropDownFieldName_Url"]); if (isset($_SESSION['loginEmail'])) { // we only include the 'file' field if the user is logged in $dropDownFieldNames1Array["file"] = $loc["DropDownFieldName_File"]; } $dropDownFieldNames1Array[] = ""; $dropDownFieldNames1Array["notes"] = $loc["DropDownFieldName_Notes"]; if (isset($_SESSION['loginEmail'])) { // we only include the 'location' field if the user is logged in $dropDownFieldNames1Array["location"] = $loc["DropDownFieldName_Location"]; } $dropDownFieldNames2Array = array("call_number" => $loc["DropDownFieldName_CallNumber"], "", "serial" => $loc["DropDownFieldName_Serial"], "type" => $loc["DropDownFieldName_Type"], "approved" => $loc["DropDownFieldName_Approved"], "", "created_date" => $loc["DropDownFieldName_CreatedDate"], "created_time" => $loc["DropDownFieldName_CreatedTime"]); if (isset($_SESSION['loginEmail'])) { // we only include the 'created_by' field if the user is logged in $dropDownFieldNames2Array["created_by"] = $loc["DropDownFieldName_CreatedBy"]; } $dropDownFieldNames2Array[] = ""; $dropDownFieldNames2Array["modified_date"] = $loc["DropDownFieldName_ModifiedDate"]; $dropDownFieldNames2Array["modified_time"] = $loc["DropDownFieldName_ModifiedTime"]; if (isset($_SESSION['loginEmail'])) { // we only include the 'modified_by' field if the user is logged in $dropDownFieldNames2Array["modified_by"] = $loc["DropDownFieldName_ModifiedBy"]; } $dropDownItems3 = buildSelectMenuOptions(array_merge($dropDownFieldNames1Array, $dropDownFieldNames2Array), "//", "\t\t\t", true); $dropDownConditionals3Array = array("html" => "html", "atom" => "Atom XML", "rss" => "RSS XML", "srw_dc" => "SRW_DC XML", "srw_mods" => "SRW_MODS XML"); $dropDownItems4 = buildSelectMenuOptions($dropDownConditionals3Array, "//", "\t\t\t", true); // Map CQL indexes to refbase field names: $indexNamesArray = mapCQLIndexes(); // function 'mapCQLIndexes()' is defined in 'webservice.inc.php' // -------------------------------------------------------------------- // TODO: when the simple CQL Query Builder interface is done, a call to 'opensearch.php' (or 'opensearch.php?operation=simple') // should activate that simple GUI-based interface (currently, it activates the advanced interface that you'd normally only // get via 'opensearch.php?operation=cql' or 'opensearch.php?operation=advanced') // if (preg_match("/^(advanced|CQL)$/i", $operation)) showQueryFormAdvanced($dropDownItems1, $dropDownItems2, $dropDownItems3, $dropDownItems4, $showRows, $rowOffset, $indexNamesArray, $viewType); // let's you enter a standard CQL query directly // else // showQueryFormSimple($dropDownItems1, $dropDownItems2, $dropDownItems3, $dropDownItems4, $showRows, $rowOffset, $indexNamesArray, $viewType); // let's you build a CQL query via dropdown menues // -------------------------------------------------------------------- // DISPLAY THE HTML FOOTER: // call the 'showPageFooter()' and 'displayHTMLfoot()' functions (which are defined in 'footer.inc.php') if (!preg_match("/^Mobile\$/i", $viewType) and !preg_match("/^inc/i", $client)) { // Note: we omit the visible footer in mobile view ('viewType=Mobile') and for include mechanisms! showPageFooter($HeaderString); } displayHTMLfoot(); }
// (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ // (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), // m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) // })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); // ga('create', 'UA-58136019-1', 'auto'); // ga('send', 'pageview'); // $(document).ajaxSuccess(function(){ga('send', 'pageview');}); // </script> // end; echo "</head>"; /////////////////////////////////////////////////////////////// echo "<body class='page'>"; echo "<a href='/site/mainbtc' style='display: none;'>main</a>"; showPageHeader(); showPageContent($content); showPageFooter(); echo "</body></html>"; return; ///////////////////////////////////////////////////////////////////// function showItemHeader($selected, $url, $name) { if ($selected) { $selected_text = "class='selected'"; } else { $selected_text = ''; } echo "<span><a {$selected_text} href='{$url}'>{$name}</a></span>"; echo " "; } function showPageHeader() {
function showMainPage($csrf, $content = NULL) { showPageHeader($csrf); showPageContent($content); showPageFooter(); }
function login_page($referer) { global $HeaderString; global $viewType; global $loginWelcomeMsg; global $loginStatus; global $loginLinks; global $officialDatabaseName; global $loc; // Show login status (should be logged out!) showLogin(); // (function 'showLogin()' is defined in 'include.inc.php') // If there's no stored message available: if (!isset($_SESSION['HeaderString'])) { $HeaderString = $loc['YouNeedToLoginInOrderToMakeChangesToTheDatabase']; } else { $HeaderString = $_SESSION['HeaderString']; // extract 'HeaderString' session variable (only necessary if register globals is OFF!) // Note: though we clear the session variable, the current message is still available to this script via '$HeaderString': deleteSessionVariable("HeaderString"); // function 'deleteSessionVariable()' is defined in 'include.inc.php' } // Call the 'displayHTMLhead()' and 'showPageHeader()' functions (which are defined in 'header.inc.php'): displayHTMLhead(encodeHTML($officialDatabaseName) . " -- User Login", "index,follow", "User login page. You must be logged in to the " . encodeHTML($officialDatabaseName) . " in order to add, edit or delete records", "", false, "", $viewType, array()); showPageHeader($HeaderString); // Build the login form: // Note: we use the fact here, that a page can have both, a GET and POST request. // (if you POST, but add ?blah=foo to the end of the action URL, the client will GET, then POST) ?> <form method="POST" action="user_login.php?referer=<?php echo rawurlencode($referer); ?> "> <div class="row"> <div class="small-12 column"> <div class="row"> <div class="small-2 columns"> <label for=""><?php echo $loc["EmailAddress"]; ?> :</label> </div> <div class="small-10 columns"> <input type="text" name="loginEmail" size="30"> </div> </div> </div> </div> <div class="row"> <div class="small-12 column"> <div class="row"> <div class="small-2 columns"> <label for=""><?php echo $loc["EmailAdressPassword"]; ?> :</label> </div> <div class="small-10 columns"> <input type="password" name="loginPassword" size="30"> </div> </div> </div> </div> <div class="row"> <div class="small-12 column"> <input class="button secondary right" style="margin-bottom: 15px" type="submit" value="Login"> </div> </div> <!--<table align="center" border="0" cellpadding="2" cellspacing="5" width="95%" summary="This table holds a login form for the --><?php //echo encodeHTML($officialDatabaseName); ?> <!--">--> <!-- <tr>--> <!-- <td width="174" valign="bottom">--> <!-- <b>--><?php //echo $loc["EmailAddress"]; ?> <!--:</b>--> <!-- </td>--> <!-- <td valign="bottom">--> <!-- <input type="text" name="loginEmail" size="30">--> <!-- </td>--> <!-- </tr>--> <!-- <tr>--> <!-- <td valign="bottom">--> <!-- <b>--><?php //echo $loc["EmailAdressPassword"]; ?> <!--:</b>--> <!-- </td>--> <!-- <td valign="bottom">--> <!-- <input type="password" name="loginPassword" size="30">--> <!-- </td>--> <!-- </tr>--> <!-- <tr>--> <!-- <td valign="bottom">--> <!-- --> <!-- </td>--> <!-- <td valign="bottom">--> <!-- <input class="button secondary" type="submit" value="Login">--> <!-- </td>--> <!-- </tr>--> <!--</table>--> </form><?php // -------------------------------------------------------------------- // DISPLAY THE HTML FOOTER: // call the 'showPageFooter()' and 'displayHTMLfoot()' functions (which are defined in 'footer.inc.php') showPageFooter($HeaderString); displayHTMLfoot(); // -------------------------------------------------------------------- }