You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1874 lines
67 KiB

  1. <?php
  2. // Project: Web Reference Database (refbase) <http://www.refbase.net>
  3. // Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
  4. // original author(s).
  5. //
  6. // This code is distributed in the hope that it will be useful,
  7. // but WITHOUT ANY WARRANTY. Please see the GNU General Public
  8. // License for more details.
  9. //
  10. // File: ./advanced_search.php
  11. // Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/advanced_search.php $
  12. // Author(s): Matthias Steffens <mailto:refbase@extracts.de>
  13. //
  14. // Created: 29-Jul-02, 16:39
  15. // Modified: $Date: 2013-09-25 13:52:53 +0000 (Wed, 25 Sep 2013) $
  16. // $Author: pnault $
  17. // $Revision: 1380 $
  18. // Search form providing access to all fields of the database.
  19. // It offers some output options (like how many records to display per page)
  20. // and let's you specify the output sort order (up to three levels deep).
  21. // Incorporate some include files:
  22. include 'initialize/db.inc.php'; // 'db.inc.php' is included to hide username and password
  23. include 'includes/header.inc.php'; // include header
  24. include 'includes/footer.inc.php'; // include footer
  25. include 'includes/include.inc.php'; // include common functions
  26. include 'initialize/ini.inc.php'; // include common variables
  27. // --------------------------------------------------------------------
  28. // START A SESSION:
  29. // call the 'start_session()' function (from 'include.inc.php') which will also read out available session variables:
  30. start_session(true);
  31. // --------------------------------------------------------------------
  32. // Initialize preferred display language:
  33. // (note that 'locales.inc.php' has to be included *after* the call to the 'start_session()' function)
  34. include 'includes/locales.inc.php'; // include the locales
  35. // --------------------------------------------------------------------
  36. if (!isset($_SESSION['loginEmail'])) // if NO user is logged in
  37. $loginUserID = ""; // set '$loginUserID' to "" so that 'selectDistinct()' function can be executed without problems
  38. // --------------------------------------------------------------------
  39. // (1) Open the database connection and use the literature database:
  40. connectToMySQLDatabase(); // function 'connectToMySQLDatabase()' is defined in 'include.inc.php'
  41. // If there's no stored message available:
  42. if (!isset($_SESSION['HeaderString']))
  43. $HeaderString = $loc["SearchAll"].":"; // Provide the default message
  44. else
  45. {
  46. $HeaderString = $_SESSION['HeaderString']; // extract 'HeaderString' session variable (only necessary if register globals is OFF!)
  47. // Note: though we clear the session variable, the current message is still available to this script via '$HeaderString':
  48. deleteSessionVariable("HeaderString"); // function 'deleteSessionVariable()' is defined in 'include.inc.php'
  49. }
  50. // Extract the view type requested by the user (either 'Mobile', 'Print', 'Web' or ''):
  51. // ('' will produce the default 'Web' output style)
  52. if (isset($_REQUEST['viewType']))
  53. $viewType = $_REQUEST['viewType'];
  54. else
  55. $viewType = "";
  56. // Get the default number of records per page preferred by the current user:
  57. $showRows = $_SESSION['userRecordsPerPage'];
  58. // Get the user's preference for displaying auto-completions:
  59. $showAutoCompletions = $_SESSION['userAutoCompletions'];
  60. // Show the login status:
  61. showLogin(); // (function 'showLogin()' is defined in 'include.inc.php')
  62. // (2a) Display header:
  63. // call the 'displayHTMLhead()' and 'showPageHeader()' functions (which are defined in 'header.inc.php'):
  64. displayHTMLhead(encodeHTML($officialDatabaseName) . " -- " . $loc["AdvancedSearch"], "index,follow", "Search the " . encodeHTML($officialDatabaseName), "", false, "", $viewType, array());
  65. showPageHeader($HeaderString);
  66. // Define variables holding common drop-down elements, i.e. build properly formatted <option> tag elements:
  67. $dropDownConditionals1Array = array("contains" => $loc["contains"],
  68. "does not contain" => $loc["contains not"],
  69. "is equal to" => $loc["equal to"],
  70. "is not equal to" => $loc["equal to not"],
  71. "starts with" => $loc["starts with"],
  72. "ends with" => $loc["ends with"]);
  73. $dropDownItems1 = buildSelectMenuOptions($dropDownConditionals1Array, "//", "\t\t\t", true); // function 'buildSelectMenuOptions()' is defined in 'include.inc.php'
  74. $dropDownConditionals2Array = array("is greater than" => $loc["is greater than"],
  75. "is less than" => $loc["is less than"],
  76. "is within range" => $loc["is within range"],
  77. "is within list" => $loc["is within list"]);
  78. $dropDownItems2 = buildSelectMenuOptions($dropDownConditionals2Array, "//", "\t\t\t", true); // function 'buildSelectMenuOptions()' is defined in 'include.inc.php'
  79. // TODO: if possible, we should use function 'mapFieldNames()' here (see also below)
  80. $dropDownFieldNames1Array = array("author" => $loc["DropDownFieldName_Author"],
  81. "address" => $loc["DropDownFieldName_Address"],
  82. "corporate_author" => $loc["DropDownFieldName_CorporateAuthor"],
  83. "thesis" => $loc["DropDownFieldName_Thesis"],
  84. "", // empty array elements function as spacers between groups of drop-down menu items
  85. "title" => $loc["DropDownFieldName_Title"],
  86. "orig_title" => $loc["DropDownFieldName_OrigTitle"],
  87. "",
  88. "year" => $loc["DropDownFieldName_Year"],
  89. "publication" => $loc["DropDownFieldName_Publication"],
  90. "abbrev_journal" => $loc["DropDownFieldName_AbbrevJournal"],
  91. "editor" => $loc["DropDownFieldName_Editor"],
  92. "",
  93. "volume_numeric" => $loc["DropDownFieldName_Volume"], // 'volume_numeric' is used instead of 'volume' in the sort dropdown menus
  94. "issue" => $loc["DropDownFieldName_Issue"],
  95. "pages" => $loc["DropDownFieldName_Pages"],
  96. "",
  97. "series_title" => $loc["DropDownFieldName_SeriesTitle"],
  98. "abbrev_series_title" => $loc["DropDownFieldName_AbbrevSeriesTitle"],
  99. "series_editor" => $loc["DropDownFieldName_SeriesEditor"],
  100. "series_volume_numeric" => $loc["DropDownFieldName_SeriesVolume"], // 'series_volume_numeric' is used instead of 'series_volume' in the sort dropdown menus
  101. "series_issue" => $loc["DropDownFieldName_SeriesIssue"],
  102. "",
  103. "publisher" => $loc["DropDownFieldName_Publisher"],
  104. "place" => $loc["DropDownFieldName_Place"],
  105. "",
  106. "edition" => $loc["DropDownFieldName_Edition"],
  107. "medium" => $loc["DropDownFieldName_Medium"],
  108. "issn" => $loc["DropDownFieldName_Issn"],
  109. "isbn" => $loc["DropDownFieldName_Isbn"],
  110. "",
  111. "language" => $loc["DropDownFieldName_Language"],
  112. "summary_language" => $loc["DropDownFieldName_SummaryLanguage"],
  113. "",
  114. "keywords" => $loc["DropDownFieldName_Keywords"],
  115. "abstract" => $loc["DropDownFieldName_Abstract"],
  116. "",
  117. "area" => $loc["DropDownFieldName_Area"],
  118. "expedition" => $loc["DropDownFieldName_Expedition"],
  119. "conference" => $loc["DropDownFieldName_Conference"],
  120. "",
  121. "doi" => $loc["DropDownFieldName_Doi"],
  122. "url" => $loc["DropDownFieldName_Url"]);
  123. if (isset($_SESSION['loginEmail'])) // we only include the 'file' field if the user is logged in
  124. $dropDownFieldNames1Array["file"] = $loc["DropDownFieldName_File"];
  125. $dropDownFieldNames1Array[] = "";
  126. $dropDownFieldNames1Array["notes"] = $loc["DropDownFieldName_Notes"];
  127. if (isset($_SESSION['loginEmail'])) // we only include the 'location' field if the user is logged in
  128. $dropDownFieldNames1Array["location"] = $loc["DropDownFieldName_Location"];
  129. $dropDownFieldNames2Array = array("call_number" => $loc["DropDownFieldName_CallNumber"],
  130. "",
  131. "serial" => $loc["DropDownFieldName_Serial"],
  132. "type" => $loc["DropDownFieldName_Type"],
  133. "approved" => $loc["DropDownFieldName_Approved"],
  134. "",
  135. "created_date" => $loc["DropDownFieldName_CreatedDate"],
  136. "created_time" => $loc["DropDownFieldName_CreatedTime"]);
  137. if (isset($_SESSION['loginEmail'])) // we only include the 'created_by' field if the user is logged in
  138. $dropDownFieldNames2Array["created_by"] = $loc["DropDownFieldName_CreatedBy"];
  139. $dropDownFieldNames2Array[] = "";
  140. $dropDownFieldNames2Array["modified_date"] = $loc["DropDownFieldName_ModifiedDate"];
  141. $dropDownFieldNames2Array["modified_time"] = $loc["DropDownFieldName_ModifiedTime"];
  142. if (isset($_SESSION['loginEmail'])) // we only include the 'modified_by' field if the user is logged in
  143. $dropDownFieldNames2Array["modified_by"] = $loc["DropDownFieldName_ModifiedBy"];
  144. $dropDownItems3 = buildSelectMenuOptions(array_merge($dropDownFieldNames1Array,$dropDownFieldNames2Array), "//", "\t\t\t", true); // function 'buildSelectMenuOptions()' is defined in 'include.inc.php'
  145. // (2b) Start <form> and <table> holding the form elements:
  146. // NOTE: Internet Explorer (at least XP IE v7.0.5730.11) chokes on the length of the GET request,
  147. // so (unless we apply some browser agent sniffing) the request method should remain POST
  148. ?>
  149. <form action="search.php" method="POST" name="queryForm">
  150. <input type="hidden" name="formType" value="advancedSearch">
  151. <input type="hidden" name="showQuery" value="0">
  152. <table align="center" border="0" cellpadding="0" cellspacing="10" width="95%" summary="This table holds the search form">
  153. <tr>
  154. <th align="left"><?php echo $loc["Show"]; ?></th>
  155. <th align="left"><?php echo $loc["Field"]; ?></th>
  156. <th align="left">&nbsp;</th>
  157. <th align="left"><?php echo $loc["That..."]; ?></th>
  158. <th align="left"><?php echo $loc["Searchstring"]; ?></th>
  159. </tr>
  160. <tr>
  161. <td width="20" valign="middle"><input type="checkbox" name="showAuthor" value="1" checked></td>
  162. <td width="40"><b><?php echo $loc["Author"]; ?>:</b></td>
  163. <td width="10">&nbsp;</td>
  164. <td width="125">
  165. <select name="authorSelector"><?php echo $dropDownItems1; ?>
  166. </select>
  167. </td>
  168. <td><input type="text" name="authorName" size="42"></td>
  169. </tr>
  170. <tr>
  171. <td valign="middle"><input type="checkbox" name="showAddress" value="1"></td>
  172. <td><b><?php echo $loc["Address"]; ?>:</b></td>
  173. <td>&nbsp;</td>
  174. <td>
  175. <select name="addressSelector"><?php echo $dropDownItems1; ?>
  176. </select>
  177. </td>
  178. <td><input type="text" name="addressName" size="42"></td>
  179. </tr>
  180. <tr>
  181. <td valign="middle"><input type="checkbox" name="showCorporateAuthor" value="1"></td>
  182. <td><b><?php echo $loc["CorporateAuthor"]; ?>:</b></td>
  183. <td>&nbsp;</td>
  184. <td>
  185. <select name="corporateAuthorSelector"><?php echo $dropDownItems1; ?>
  186. </select>
  187. </td>
  188. <td><input type="text" name="corporateAuthorName" size="42"></td>
  189. </tr>
  190. <tr>
  191. <td valign="middle"><input type="checkbox" name="showThesis" value="1"></td>
  192. <td><b><?php echo $loc["Thesis"]; ?>:</b></td>
  193. <td align="center"><input type="radio" name="thesisRadio" value="1" checked></td>
  194. <td>
  195. <select name="thesisSelector"><?php echo $dropDownItems1; ?>
  196. </select>
  197. </td>
  198. <td><?php
  199. // (3) Run the query on the literature database through the connection:
  200. // (here by use of the 'selectDistinct' function)
  201. // Produce the select list
  202. // Parameters:
  203. // 1: Database connection
  204. // 2. Table that contains values
  205. // 3. The field name of the table's primary key
  206. // 4. Table name of the user data table
  207. // 5. The field name within the user data table that corresponds to the field in 3.
  208. // 6. The field name of the user ID field within the user data table
  209. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  210. // 8. Attribute that contains values
  211. // 9. <SELECT> element name
  212. // 10. An additional non-database value (display string)
  213. // 11. String that gets submitted instead of the display string given in 10.
  214. // 12. Optional <OPTION SELECTED>
  215. // 13. Restrict query to field... (keep empty if no restriction wanted)
  216. // 14. ...where field contents are...
  217. // 15. Split field contents into substrings? (yes = true, no = false)
  218. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  219. echo selectDistinct($connection,
  220. $tableRefs,
  221. "serial",
  222. $tableUserData,
  223. "record_id",
  224. "user_id",
  225. $loginUserID,
  226. "thesis",
  227. "thesisName",
  228. $loc["All"],
  229. "All",
  230. $loc["All"],
  231. "",
  232. "",
  233. false,
  234. "");
  235. ?>
  236. </td>
  237. </tr>
  238. <tr>
  239. <td>&nbsp;</td>
  240. <td align="right"><?php echo $loc["or"]; ?>:</td>
  241. <td align="center"><input type="radio" name="thesisRadio" value="0"></td>
  242. <td>
  243. <select name="thesisSelector2"><?php echo $dropDownItems1; ?>
  244. </select>
  245. </td>
  246. <td><input type="text" name="thesisName2" size="42"></td>
  247. </tr>
  248. <tr>
  249. <td>&nbsp;</td>
  250. <td>&nbsp;</td>
  251. <td>&nbsp;</td>
  252. <td>&nbsp;</td>
  253. <td>&nbsp;</td>
  254. </tr>
  255. <tr>
  256. <td valign="middle"><input type="checkbox" name="showTitle" value="1" checked></td>
  257. <td><b><?php echo $loc["Title"]; ?>:</b></td>
  258. <td>&nbsp;</td>
  259. <td>
  260. <select name="titleSelector"><?php echo $dropDownItems1; ?>
  261. </select>
  262. </td>
  263. <td><input type="text" name="titleName" size="42"></td>
  264. </tr>
  265. <tr>
  266. <td valign="middle"><input type="checkbox" name="showOrigTitle" value="1"></td>
  267. <td><b><?php echo $loc["TitleOriginal"]; ?>:</b></td>
  268. <td>&nbsp;</td>
  269. <td>
  270. <select name="origTitleSelector"><?php echo $dropDownItems1; ?>
  271. </select>
  272. </td>
  273. <td><input type="text" name="origTitleName" size="42"></td>
  274. </tr>
  275. <tr>
  276. <td>&nbsp;</td>
  277. <td>&nbsp;</td>
  278. <td>&nbsp;</td>
  279. <td>&nbsp;</td>
  280. <td>&nbsp;</td>
  281. </tr>
  282. <tr>
  283. <td valign="middle"><input type="checkbox" name="showYear" value="1" checked></td>
  284. <td><b><?php echo $loc["Year"]; ?>:</b></td>
  285. <td>&nbsp;</td>
  286. <td>
  287. <select name="yearSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  288. </select>
  289. </td>
  290. <td><input type="text" name="yearNo" size="42"></td>
  291. </tr>
  292. <tr>
  293. <td valign="middle"><input type="checkbox" name="showPublication" value="1" checked></td>
  294. <td><b><?php echo $loc["Publication"]; ?>:</b></td>
  295. <td align="center"><input type="radio" name="publicationRadio" value="1" checked></td>
  296. <td>
  297. <select name="publicationSelector"><?php echo $dropDownItems1; ?>
  298. </select>
  299. </td>
  300. <td><?php
  301. // (3) Run the query on the literature database through the connection:
  302. // (here by use of the 'selectDistinct' function)
  303. // Produce the select list
  304. // Parameters:
  305. // 1: Database connection
  306. // 2. Table that contains values
  307. // 3. The field name of the table's primary key
  308. // 4. Table name of the user data table
  309. // 5. The field name within the user data table that corresponds to the field in 3.
  310. // 6. The field name of the user ID field within the user data table
  311. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  312. // 8. Attribute that contains values
  313. // 9. <SELECT> element name
  314. // 10. An additional non-database value (display string)
  315. // 11. String that gets submitted instead of the display string given in 10.
  316. // 12. Optional <OPTION SELECTED>
  317. // 13. Restrict query to field... (keep empty if no restriction wanted)
  318. // 14. ...where field contents are...
  319. // 15. Split field contents into substrings? (yes = true, no = false)
  320. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  321. echo selectDistinct($connection,
  322. $tableRefs,
  323. "serial",
  324. $tableUserData,
  325. "record_id",
  326. "user_id",
  327. $loginUserID,
  328. "publication",
  329. "publicationName",
  330. $loc["All"],
  331. "All",
  332. $loc["All"],
  333. "type",
  334. "\"journal\"",
  335. false,
  336. "");
  337. ?>
  338. </td>
  339. </tr>
  340. <tr>
  341. <td>&nbsp;</td>
  342. <td align="right"><?php echo $loc["or"]; ?>:</td>
  343. <td align="center"><input type="radio" name="publicationRadio" value="0"></td>
  344. <td>
  345. <select name="publicationSelector2"><?php echo $dropDownItems1; ?>
  346. </select>
  347. </td>
  348. <td><input type="text" name="publicationName2" size="42"></td>
  349. </tr>
  350. <tr>
  351. <td valign="middle"><input type="checkbox" name="showAbbrevJournal" value="1"></td>
  352. <td><b><?php echo $loc["JournalAbbr"]; ?>:</b></td>
  353. <td align="center"><input type="radio" name="abbrevJournalRadio" value="1" checked></td>
  354. <td>
  355. <select name="abbrevJournalSelector"><?php echo $dropDownItems1; ?>
  356. </select>
  357. </td>
  358. <td><?php
  359. // (3) Run the query on the literature database through the connection:
  360. // (here by use of the 'selectDistinct' function)
  361. // Produce the select list
  362. // Parameters:
  363. // 1: Database connection
  364. // 2. Table that contains values
  365. // 3. The field name of the table's primary key
  366. // 4. Table name of the user data table
  367. // 5. The field name within the user data table that corresponds to the field in 3.
  368. // 6. The field name of the user ID field within the user data table
  369. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  370. // 8. Attribute that contains values
  371. // 9. <SELECT> element name
  372. // 10. An additional non-database value (display string)
  373. // 11. String that gets submitted instead of the display string given in 10.
  374. // 12. Optional <OPTION SELECTED>
  375. // 13. Restrict query to field... (keep empty if no restriction wanted)
  376. // 14. ...where field contents are...
  377. // 15. Split field contents into substrings? (yes = true, no = false)
  378. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  379. echo selectDistinct($connection,
  380. $tableRefs,
  381. "serial",
  382. $tableUserData,
  383. "record_id",
  384. "user_id",
  385. $loginUserID,
  386. "abbrev_journal",
  387. "abbrevJournalName",
  388. $loc["All"],
  389. "All",
  390. $loc["All"],
  391. "type",
  392. "\"journal\"",
  393. false,
  394. "");
  395. ?>
  396. </td>
  397. </tr>
  398. <tr>
  399. <td>&nbsp;</td>
  400. <td align="right"><?php echo $loc["or"]; ?>:</td>
  401. <td align="center"><input type="radio" name="abbrevJournalRadio" value="0"></td>
  402. <td>
  403. <select name="abbrevJournalSelector2"><?php echo $dropDownItems1; ?>
  404. </select>
  405. </td>
  406. <td><input type="text" name="abbrevJournalName2" size="42"></td>
  407. </tr>
  408. <tr>
  409. <td valign="middle"><input type="checkbox" name="showEditor" value="1"></td>
  410. <td><b><?php echo $loc["Editor"]; ?>:</b></td>
  411. <td>&nbsp;</td>
  412. <td>
  413. <select name="editorSelector"><?php echo $dropDownItems1; ?>
  414. </select>
  415. </td>
  416. <td><input type="text" name="editorName" size="42"></td>
  417. </tr>
  418. <tr>
  419. <td>&nbsp;</td>
  420. <td>&nbsp;</td>
  421. <td>&nbsp;</td>
  422. <td>&nbsp;</td>
  423. <td>&nbsp;</td>
  424. </tr>
  425. <tr>
  426. <td valign="middle"><input type="checkbox" name="showVolume" value="1" checked></td>
  427. <td><b><?php echo $loc["Volume"]; ?>:</b></td>
  428. <td>&nbsp;</td>
  429. <td>
  430. <select name="volumeSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  431. </select>
  432. </td>
  433. <td><input type="text" name="volumeNo" size="42"></td>
  434. </tr>
  435. <tr>
  436. <td valign="middle"><input type="checkbox" name="showIssue" value="1"></td>
  437. <td><b><?php echo $loc["Issue"]; ?>:</b></td>
  438. <td>&nbsp;</td>
  439. <td>
  440. <select name="issueSelector"><?php echo $dropDownItems1; ?>
  441. </select>
  442. </td>
  443. <td><input type="text" name="issueNo" size="42"></td>
  444. </tr>
  445. <tr>
  446. <td valign="middle"><input type="checkbox" name="showPages" value="1" checked></td>
  447. <td><b><?php echo $loc["Pages"]; ?>:</b></td>
  448. <td>&nbsp;</td>
  449. <td>
  450. <select name="pagesSelector"><?php echo $dropDownItems1; ?>
  451. </select>
  452. </td>
  453. <td><input type="text" name="pagesNo" size="42"></td>
  454. </tr>
  455. <tr>
  456. <td>&nbsp;</td>
  457. <td>&nbsp;</td>
  458. <td>&nbsp;</td>
  459. <td>&nbsp;</td>
  460. <td>&nbsp;</td>
  461. </tr>
  462. <tr>
  463. <td valign="middle"><input type="checkbox" name="showSeriesTitle" value="1"></td>
  464. <td><b><?php echo $loc["TitleSeries"]; ?>:</b></td>
  465. <td align="center"><input type="radio" name="seriesTitleRadio" value="1" checked></td>
  466. <td>
  467. <select name="seriesTitleSelector"><?php echo $dropDownItems1; ?>
  468. </select>
  469. </td>
  470. <td><?php
  471. // (3) Run the query on the literature database through the connection:
  472. // (here by use of the 'selectDistinct' function)
  473. // Produce the select list
  474. // Parameters:
  475. // 1: Database connection
  476. // 2. Table that contains values
  477. // 3. The field name of the table's primary key
  478. // 4. Table name of the user data table
  479. // 5. The field name within the user data table that corresponds to the field in 3.
  480. // 6. The field name of the user ID field within the user data table
  481. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  482. // 8. Attribute that contains values
  483. // 9. <SELECT> element name
  484. // 10. An additional non-database value (display string)
  485. // 11. String that gets submitted instead of the display string given in 10.
  486. // 12. Optional <OPTION SELECTED>
  487. // 13. Restrict query to field... (keep empty if no restriction wanted)
  488. // 14. ...where field contents are...
  489. // 15. Split field contents into substrings? (yes = true, no = false)
  490. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  491. echo selectDistinct($connection,
  492. $tableRefs,
  493. "serial",
  494. $tableUserData,
  495. "record_id",
  496. "user_id",
  497. $loginUserID,
  498. "series_title",
  499. "seriesTitleName",
  500. $loc["All"],
  501. "All",
  502. $loc["All"],
  503. "",
  504. "",
  505. false,
  506. "");
  507. ?>
  508. </td>
  509. </tr>
  510. <tr>
  511. <td>&nbsp;</td>
  512. <td align="right"><?php echo $loc["or"]; ?>:</td>
  513. <td align="center"><input type="radio" name="seriesTitleRadio" value="0"></td>
  514. <td>
  515. <select name="seriesTitleSelector2"><?php echo $dropDownItems1; ?>
  516. </select>
  517. </td>
  518. <td><input type="text" name="seriesTitleName2" size="42"></td>
  519. </tr>
  520. <tr>
  521. <td valign="middle"><input type="checkbox" name="showAbbrevSeriesTitle" value="1"></td>
  522. <td><b><?php echo $loc["TitleSeriesAbbr"]; ?>:</b></td>
  523. <td align="center"><input type="radio" name="abbrevSeriesTitleRadio" value="1" checked></td>
  524. <td>
  525. <select name="abbrevSeriesTitleSelector"><?php echo $dropDownItems1; ?>
  526. </select>
  527. </td>
  528. <td><?php
  529. // (3) Run the query on the literature database through the connection:
  530. // (here by use of the 'selectDistinct' function)
  531. // Produce the select list
  532. // Parameters:
  533. // 1: Database connection
  534. // 2. Table that contains values
  535. // 3. The field name of the table's primary key
  536. // 4. Table name of the user data table
  537. // 5. The field name within the user data table that corresponds to the field in 3.
  538. // 6. The field name of the user ID field within the user data table
  539. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  540. // 8. Attribute that contains values
  541. // 9. <SELECT> element name
  542. // 10. An additional non-database value (display string)
  543. // 11. String that gets submitted instead of the display string given in 10.
  544. // 12. Optional <OPTION SELECTED>
  545. // 13. Restrict query to field... (keep empty if no restriction wanted)
  546. // 14. ...where field contents are...
  547. // 15. Split field contents into substrings? (yes = true, no = false)
  548. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  549. echo selectDistinct($connection,
  550. $tableRefs,
  551. "serial",
  552. $tableUserData,
  553. "record_id",
  554. "user_id",
  555. $loginUserID,
  556. "abbrev_series_title",
  557. "abbrevSeriesTitleName",
  558. $loc["All"],
  559. "All",
  560. $loc["All"],
  561. "",
  562. "",
  563. false,
  564. "");
  565. ?>
  566. </td>
  567. </tr>
  568. <tr>
  569. <td>&nbsp;</td>
  570. <td align="right"><?php echo $loc["or"]; ?>:</td>
  571. <td align="center"><input type="radio" name="abbrevSeriesTitleRadio" value="0"></td>
  572. <td>
  573. <select name="abbrevSeriesTitleSelector2"><?php echo $dropDownItems1; ?>
  574. </select>
  575. </td>
  576. <td><input type="text" name="abbrevSeriesTitleName2" size="42"></td>
  577. </tr>
  578. <tr>
  579. <td valign="middle"><input type="checkbox" name="showSeriesEditor" value="1"></td>
  580. <td><b><?php echo $loc["SeriesEditor"]; ?>:</b></td>
  581. <td>&nbsp;</td>
  582. <td>
  583. <select name="seriesEditorSelector"><?php echo $dropDownItems1; ?>
  584. </select>
  585. </td>
  586. <td><input type="text" name="seriesEditorName" size="42"></td>
  587. </tr>
  588. <tr>
  589. <td valign="middle"><input type="checkbox" name="showSeriesVolume" value="1"></td>
  590. <td><b><?php echo $loc["SeriesVolume"]; ?>:</b></td>
  591. <td>&nbsp;</td>
  592. <td>
  593. <select name="seriesVolumeSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  594. </select>
  595. </td>
  596. <td><input type="text" name="seriesVolumeNo" size="42"></td>
  597. </tr>
  598. <tr>
  599. <td valign="middle"><input type="checkbox" name="showSeriesIssue" value="1"></td>
  600. <td><b><?php echo $loc["SeriesIssue"]; ?>:</b></td>
  601. <td>&nbsp;</td>
  602. <td>
  603. <select name="seriesIssueSelector"><?php echo $dropDownItems1; ?>
  604. </select>
  605. </td>
  606. <td><input type="text" name="seriesIssueNo" size="42"></td>
  607. </tr>
  608. <tr>
  609. <td>&nbsp;</td>
  610. <td>&nbsp;</td>
  611. <td>&nbsp;</td>
  612. <td>&nbsp;</td>
  613. <td>&nbsp;</td>
  614. </tr>
  615. <tr>
  616. <td valign="middle"><input type="checkbox" name="showPublisher" value="1"></td>
  617. <td><b><?php echo $loc["Publisher"]; ?>:</b></td>
  618. <td align="center"><input type="radio" name="publisherRadio" value="1" checked></td>
  619. <td>
  620. <select name="publisherSelector"><?php echo $dropDownItems1; ?>
  621. </select>
  622. </td>
  623. <td><?php
  624. // (3) Run the query on the literature database through the connection:
  625. // (here by use of the 'selectDistinct' function)
  626. // Produce the select list
  627. // Parameters:
  628. // 1: Database connection
  629. // 2. Table that contains values
  630. // 3. The field name of the table's primary key
  631. // 4. Table name of the user data table
  632. // 5. The field name within the user data table that corresponds to the field in 3.
  633. // 6. The field name of the user ID field within the user data table
  634. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  635. // 8. Attribute that contains values
  636. // 9. <SELECT> element name
  637. // 10. An additional non-database value (display string)
  638. // 11. String that gets submitted instead of the display string given in 10.
  639. // 12. Optional <OPTION SELECTED>
  640. // 13. Restrict query to field... (keep empty if no restriction wanted)
  641. // 14. ...where field contents are...
  642. // 15. Split field contents into substrings? (yes = true, no = false)
  643. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  644. echo selectDistinct($connection,
  645. $tableRefs,
  646. "serial",
  647. $tableUserData,
  648. "record_id",
  649. "user_id",
  650. $loginUserID,
  651. "publisher",
  652. "publisherName",
  653. $loc["All"],
  654. "All",
  655. $loc["All"],
  656. "",
  657. "",
  658. false,
  659. "");
  660. ?>
  661. </td>
  662. </tr>
  663. <tr>
  664. <td>&nbsp;</td>
  665. <td align="right"><?php echo $loc["or"]; ?>:</td>
  666. <td align="center"><input type="radio" name="publisherRadio" value="0"></td>
  667. <td>
  668. <select name="publisherSelector2"><?php echo $dropDownItems1; ?>
  669. </select>
  670. </td>
  671. <td><input type="text" name="publisherName2" size="42"></td>
  672. </tr>
  673. <tr>
  674. <td valign="middle"><input type="checkbox" name="showPlace" value="1"></td>
  675. <td><b><?php echo $loc["PublisherPlace"]; ?>:</b></td>
  676. <td align="center"><input type="radio" name="placeRadio" value="1" checked></td>
  677. <td>
  678. <select name="placeSelector"><?php echo $dropDownItems1; ?>
  679. </select>
  680. </td>
  681. <td><?php
  682. // (3) Run the query on the literature database through the connection:
  683. // (here by use of the 'selectDistinct' function)
  684. // Produce the select list
  685. // Parameters:
  686. // 1: Database connection
  687. // 2. Table that contains values
  688. // 3. The field name of the table's primary key
  689. // 4. Table name of the user data table
  690. // 5. The field name within the user data table that corresponds to the field in 3.
  691. // 6. The field name of the user ID field within the user data table
  692. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  693. // 8. Attribute that contains values
  694. // 9. <SELECT> element name
  695. // 10. An additional non-database value (display string)
  696. // 11. String that gets submitted instead of the display string given in 10.
  697. // 12. Optional <OPTION SELECTED>
  698. // 13. Restrict query to field... (keep empty if no restriction wanted)
  699. // 14. ...where field contents are...
  700. // 15. Split field contents into substrings? (yes = true, no = false)
  701. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  702. echo selectDistinct($connection,
  703. $tableRefs,
  704. "serial",
  705. $tableUserData,
  706. "record_id",
  707. "user_id",
  708. $loginUserID,
  709. "place",
  710. "placeName",
  711. $loc["All"],
  712. "All",
  713. $loc["All"],
  714. "",
  715. "",
  716. true,
  717. " *[,;()] *");
  718. ?>
  719. </td>
  720. </tr>
  721. <tr>
  722. <td>&nbsp;</td>
  723. <td align="right"><?php echo $loc["or"]; ?>:</td>
  724. <td align="center"><input type="radio" name="placeRadio" value="0"></td>
  725. <td>
  726. <select name="placeSelector2"><?php echo $dropDownItems1; ?>
  727. </select>
  728. </td>
  729. <td><input type="text" name="placeName2" size="42"></td>
  730. </tr>
  731. <tr>
  732. <td>&nbsp;</td>
  733. <td>&nbsp;</td>
  734. <td>&nbsp;</td>
  735. <td>&nbsp;</td>
  736. <td>&nbsp;</td>
  737. </tr>
  738. <tr>
  739. <td valign="middle"><input type="checkbox" name="showEdition" value="1"></td>
  740. <td><b><?php echo $loc["Edition"]; ?>:</b></td>
  741. <td>&nbsp;</td>
  742. <td>
  743. <select name="editionSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  744. </select>
  745. </td>
  746. <td><input type="text" name="editionNo" size="42"></td>
  747. </tr>
  748. <tr>
  749. <td valign="middle"><input type="checkbox" name="showMedium" value="1"></td>
  750. <td><b><?php echo $loc["Medium"]; ?>:</b></td>
  751. <td>&nbsp;</td>
  752. <td>
  753. <select name="mediumSelector"><?php echo $dropDownItems1; ?>
  754. </select>
  755. </td>
  756. <td><input type="text" name="mediumName" size="42"></td>
  757. </tr>
  758. <tr>
  759. <td valign="middle"><input type="checkbox" name="showISSN" value="1"></td>
  760. <td><b><?php echo $loc["ISSN"]; ?>:</b></td>
  761. <td>&nbsp;</td>
  762. <td>
  763. <select name="issnSelector"><?php echo $dropDownItems1; ?>
  764. </select>
  765. </td>
  766. <td><input type="text" name="issnName" size="42"></td>
  767. </tr>
  768. <tr>
  769. <td valign="middle"><input type="checkbox" name="showISBN" value="1"></td>
  770. <td><b><?php echo $loc["ISBN"]; ?>:</b></td>
  771. <td>&nbsp;</td>
  772. <td>
  773. <select name="isbnSelector"><?php echo $dropDownItems1; ?>
  774. </select>
  775. </td>
  776. <td><input type="text" name="isbnName" size="42"></td>
  777. </tr>
  778. <tr>
  779. <td>&nbsp;</td>
  780. <td>&nbsp;</td>
  781. <td>&nbsp;</td>
  782. <td>&nbsp;</td>
  783. <td>&nbsp;</td>
  784. </tr>
  785. <tr>
  786. <td valign="middle"><input type="checkbox" name="showLanguage" value="1"></td>
  787. <td><b><?php echo $loc["Language"]; ?>:</b></td>
  788. <td align="center"><input type="radio" name="languageRadio" value="1" checked></td>
  789. <td>
  790. <select name="languageSelector"><?php echo $dropDownItems1; ?>
  791. </select>
  792. </td>
  793. <td><?php
  794. // (3) Run the query on the literature database through the connection:
  795. // (here by use of the 'selectDistinct' function)
  796. // Produce the select list
  797. // Parameters:
  798. // 1: Database connection
  799. // 2. Table that contains values
  800. // 3. The field name of the table's primary key
  801. // 4. Table name of the user data table
  802. // 5. The field name within the user data table that corresponds to the field in 3.
  803. // 6. The field name of the user ID field within the user data table
  804. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  805. // 8. Attribute that contains values
  806. // 9. <SELECT> element name
  807. // 10. An additional non-database value (display string)
  808. // 11. String that gets submitted instead of the display string given in 10.
  809. // 12. Optional <OPTION SELECTED>
  810. // 13. Restrict query to field... (keep empty if no restriction wanted)
  811. // 14. ...where field contents are...
  812. // 15. Split field contents into substrings? (yes = true, no = false)
  813. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  814. echo selectDistinct($connection,
  815. $tableRefs,
  816. "serial",
  817. $tableUserData,
  818. "record_id",
  819. "user_id",
  820. $loginUserID,
  821. "language",
  822. "languageName",
  823. $loc["All"],
  824. "All",
  825. $loc["All"],
  826. "",
  827. "",
  828. true,
  829. " *[,;()] *");
  830. ?>
  831. </td>
  832. </tr>
  833. <tr>
  834. <td>&nbsp;</td>
  835. <td align="right"><?php echo $loc["or"]; ?>:</td>
  836. <td align="center"><input type="radio" name="languageRadio" value="0"></td>
  837. <td>
  838. <select name="languageSelector2"><?php echo $dropDownItems1; ?>
  839. </select>
  840. </td>
  841. <td><input type="text" name="languageName2" size="42"></td>
  842. </tr>
  843. <tr>
  844. <td valign="middle"><input type="checkbox" name="showSummaryLanguage" value="1"></td>
  845. <td><b><?php echo $loc["LanguageSummary"]; ?>:</b></td>
  846. <td align="center"><input type="radio" name="summaryLanguageRadio" value="1" checked></td>
  847. <td>
  848. <select name="summaryLanguageSelector"><?php echo $dropDownItems1; ?>
  849. </select>
  850. </td>
  851. <td><?php
  852. // (3) Run the query on the literature database through the connection:
  853. // (here by use of the 'selectDistinct' function)
  854. // Produce the select list
  855. // Parameters:
  856. // 1: Database connection
  857. // 2. Table that contains values
  858. // 3. The field name of the table's primary key
  859. // 4. Table name of the user data table
  860. // 5. The field name within the user data table that corresponds to the field in 3.
  861. // 6. The field name of the user ID field within the user data table
  862. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  863. // 8. Attribute that contains values
  864. // 9. <SELECT> element name
  865. // 10. An additional non-database value (display string)
  866. // 11. String that gets submitted instead of the display string given in 10.
  867. // 12. Optional <OPTION SELECTED>
  868. // 13. Restrict query to field... (keep empty if no restriction wanted)
  869. // 14. ...where field contents are...
  870. // 15. Split field contents into substrings? (yes = true, no = false)
  871. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  872. echo selectDistinct($connection,
  873. $tableRefs,
  874. "serial",
  875. $tableUserData,
  876. "record_id",
  877. "user_id",
  878. $loginUserID,
  879. "summary_language",
  880. "summaryLanguageName",
  881. $loc["All"],
  882. "All",
  883. $loc["All"],
  884. "",
  885. "",
  886. true,
  887. " *[,;()] *");
  888. ?>
  889. </td>
  890. </tr>
  891. <tr>
  892. <td>&nbsp;</td>
  893. <td align="right"><?php echo $loc["or"]; ?>:</td>
  894. <td align="center"><input type="radio" name="summaryLanguageRadio" value="0"></td>
  895. <td>
  896. <select name="summaryLanguageSelector2"><?php echo $dropDownItems1; ?>
  897. </select>
  898. </td>
  899. <td><input type="text" name="summaryLanguageName2" size="42"></td>
  900. </tr>
  901. <tr>
  902. <td>&nbsp;</td>
  903. <td>&nbsp;</td>
  904. <td>&nbsp;</td>
  905. <td>&nbsp;</td>
  906. <td>&nbsp;</td>
  907. </tr>
  908. <tr>
  909. <td valign="middle"><input type="checkbox" name="showKeywords" value="1"></td>
  910. <td><b><?php echo $loc["Keywords"]; ?>:</b></td>
  911. <td>&nbsp;</td>
  912. <td>
  913. <select name="keywordsSelector"><?php echo $dropDownItems1; ?>
  914. </select>
  915. </td>
  916. <td><input type="text" name="keywordsName" size="42"></td>
  917. </tr>
  918. <tr>
  919. <td valign="middle"><input type="checkbox" name="showAbstract" value="1"></td>
  920. <td><b><?php echo $loc["Abstract"]; ?>:</b></td>
  921. <td>&nbsp;</td>
  922. <td>
  923. <select name="abstractSelector"><?php echo $dropDownItems1; ?>
  924. </select>
  925. </td>
  926. <td><input type="text" name="abstractName" size="42"></td>
  927. </tr>
  928. <tr>
  929. <td>&nbsp;</td>
  930. <td>&nbsp;</td>
  931. <td>&nbsp;</td>
  932. <td>&nbsp;</td>
  933. <td>&nbsp;</td>
  934. </tr>
  935. <tr>
  936. <td valign="middle"><input type="checkbox" name="showArea" value="1"></td>
  937. <td><b><?php echo $loc["Area"]; ?>:</b></td>
  938. <td align="center"><input type="radio" name="areaRadio" value="1" checked></td>
  939. <td>
  940. <select name="areaSelector"><?php echo $dropDownItems1; ?>
  941. </select>
  942. </td>
  943. <td><?php
  944. // (3) Run the query on the literature database through the connection:
  945. // (here by use of the 'selectDistinct' function)
  946. // Produce the select list
  947. // Parameters:
  948. // 1: Database connection
  949. // 2. Table that contains values
  950. // 3. The field name of the table's primary key
  951. // 4. Table name of the user data table
  952. // 5. The field name within the user data table that corresponds to the field in 3.
  953. // 6. The field name of the user ID field within the user data table
  954. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  955. // 8. Attribute that contains values
  956. // 9. <SELECT> element name
  957. // 10. An additional non-database value (display string)
  958. // 11. String that gets submitted instead of the display string given in 10.
  959. // 12. Optional <OPTION SELECTED>
  960. // 13. Restrict query to field... (keep empty if no restriction wanted)
  961. // 14. ...where field contents are...
  962. // 15. Split field contents into substrings? (yes = true, no = false)
  963. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  964. echo selectDistinct($connection,
  965. $tableRefs,
  966. "serial",
  967. $tableUserData,
  968. "record_id",
  969. "user_id",
  970. $loginUserID,
  971. "area",
  972. "areaName",
  973. $loc["All"],
  974. "All",
  975. $loc["All"],
  976. "",
  977. "",
  978. true,
  979. " *[,;()] *");
  980. ?>
  981. </td>
  982. </tr>
  983. <tr>
  984. <td>&nbsp;</td>
  985. <td align="right"><?php echo $loc["or"]; ?>:</td>
  986. <td align="center"><input type="radio" name="areaRadio" value="0"></td>
  987. <td>
  988. <select name="areaSelector2"><?php echo $dropDownItems1; ?>
  989. </select>
  990. </td>
  991. <td><input type="text" name="areaName2" size="42"></td>
  992. </tr>
  993. <tr>
  994. <td valign="middle"><input type="checkbox" name="showExpedition" value="1"></td>
  995. <td><b><?php echo $loc["Expedition"]; ?>:</b></td>
  996. <td>&nbsp;</td>
  997. <td>
  998. <select name="expeditionSelector"><?php echo $dropDownItems1; ?>
  999. </select>
  1000. </td>
  1001. <td><input type="text" name="expeditionName" size="42"></td>
  1002. </tr>
  1003. <tr>
  1004. <td valign="middle"><input type="checkbox" name="showConference" value="1"></td>
  1005. <td><b><?php echo $loc["Conference"]; ?>:</b></td>
  1006. <td>&nbsp;</td>
  1007. <td>
  1008. <select name="conferenceSelector"><?php echo $dropDownItems1; ?>
  1009. </select>
  1010. </td>
  1011. <td><input type="text" name="conferenceName" size="42"></td>
  1012. </tr>
  1013. <tr>
  1014. <td>&nbsp;</td>
  1015. <td>&nbsp;</td>
  1016. <td>&nbsp;</td>
  1017. <td>&nbsp;</td>
  1018. <td>&nbsp;</td>
  1019. </tr>
  1020. <tr>
  1021. <td valign="middle"><input type="checkbox" name="showDOI" value="1"></td>
  1022. <td><b><?php echo $loc["DOI"]; ?>:</b></td>
  1023. <td>&nbsp;</td>
  1024. <td>
  1025. <select name="doiSelector"><?php echo $dropDownItems1; ?>
  1026. </select>
  1027. </td>
  1028. <td><input type="text" name="doiName" size="42"></td>
  1029. </tr>
  1030. <tr>
  1031. <td valign="middle"><input type="checkbox" name="showURL" value="1"></td>
  1032. <td><b><?php echo $loc["URL"]; ?>:</b></td>
  1033. <td>&nbsp;</td>
  1034. <td>
  1035. <select name="urlSelector"><?php echo $dropDownItems1; ?>
  1036. </select>
  1037. </td>
  1038. <td><input type="text" name="urlName" size="42"></td>
  1039. </tr><?php
  1040. // show a text entry form to search for any files if one of the following conditions is met:
  1041. // - the variable '$fileVisibility' (defined in 'ini.inc.php') is set to 'everyone'
  1042. // - the variable '$fileVisibility' is set to 'login' AND the user is logged in
  1043. // - the variable '$fileVisibility' is set to 'user-specific' AND the 'user_permissions' session variable contains 'allow_download'
  1044. if ($fileVisibility == "everyone" OR ($fileVisibility == "login" AND isset($_SESSION['loginEmail'])) OR ($fileVisibility == "user-specific" AND (isset($_SESSION['user_permissions']) AND preg_match("/allow_download/", $_SESSION['user_permissions']))))
  1045. {
  1046. ?>
  1047. <tr>
  1048. <td valign="middle"><input type="checkbox" name="showFile" value="1"></td>
  1049. <td><b><?php echo $loc["File"]; ?>:</b></td>
  1050. <td>&nbsp;</td>
  1051. <td>
  1052. <select name="fileSelector"><?php echo $dropDownItems1; ?>
  1053. </select>
  1054. </td>
  1055. <td><input type="text" name="fileName" size="42"></td>
  1056. </tr><?php
  1057. }
  1058. ?>
  1059. <tr>
  1060. <td>&nbsp;</td>
  1061. <td>&nbsp;</td>
  1062. <td>&nbsp;</td>
  1063. <td>&nbsp;</td>
  1064. <td>&nbsp;</td>
  1065. </tr>
  1066. <tr>
  1067. <td valign="middle"><input type="checkbox" name="showNotes" value="1"></td>
  1068. <td><b><?php echo $loc["Notes"]; ?>:</b></td>
  1069. <td>&nbsp;</td>
  1070. <td>
  1071. <select name="notesSelector"><?php echo $dropDownItems1; ?>
  1072. </select>
  1073. </td>
  1074. <td><input type="text" name="notesName" size="42"></td>
  1075. </tr><?php
  1076. // we only show a text entry form for the 'location' field if the user is logged in:
  1077. if (isset($_SESSION['loginEmail']))
  1078. {
  1079. ?>
  1080. <tr>
  1081. <td valign="middle"><input type="checkbox" name="showLocation" value="1"></td>
  1082. <td><b><?php echo $loc["Location"]; ?>:</b></td>
  1083. <td align="center"><input type="radio" name="locationRadio" value="1" checked></td>
  1084. <td>
  1085. <select name="locationSelector"><?php echo $dropDownItems1; ?>
  1086. </select>
  1087. </td>
  1088. <td><?php
  1089. // (3) Run the query on the literature database through the connection:
  1090. // (here by use of the 'selectDistinct' function)
  1091. // Produce the select list
  1092. // Parameters:
  1093. // 1: Database connection
  1094. // 2. Table that contains values
  1095. // 3. The field name of the table's primary key
  1096. // 4. Table name of the user data table
  1097. // 5. The field name within the user data table that corresponds to the field in 3.
  1098. // 6. The field name of the user ID field within the user data table
  1099. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  1100. // 8. Attribute that contains values
  1101. // 9. <SELECT> element name
  1102. // 10. An additional non-database value (display string)
  1103. // 11. String that gets submitted instead of the display string given in 10.
  1104. // 12. Optional <OPTION SELECTED>
  1105. // 13. Restrict query to field... (keep empty if no restriction wanted)
  1106. // 14. ...where field contents are...
  1107. // 15. Split field contents into substrings? (yes = true, no = false)
  1108. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  1109. echo selectDistinct($connection,
  1110. $tableRefs,
  1111. "serial",
  1112. $tableUserData,
  1113. "record_id",
  1114. "user_id",
  1115. $loginUserID,
  1116. "location",
  1117. "locationName",
  1118. $loc["All"],
  1119. "All",
  1120. $loc["All"],
  1121. "",
  1122. "",
  1123. true,
  1124. " *[,;()] *");
  1125. ?>
  1126. </td>
  1127. </tr>
  1128. <tr>
  1129. <td>&nbsp;</td>
  1130. <td align="right"><?php echo $loc["or"]; ?>:</td>
  1131. <td align="center"><input type="radio" name="locationRadio" value="0"></td>
  1132. <td>
  1133. <select name="locationSelector2"><?php echo $dropDownItems1; ?>
  1134. </select>
  1135. </td>
  1136. <td><input type="text" name="locationName2" size="42"></td>
  1137. </tr><?php
  1138. }
  1139. ?>
  1140. <tr>
  1141. <td valign="middle"><input type="checkbox" name="showCallNumber" value="1"></td>
  1142. <td><b><?php echo $loc["CallNumber"]; ?>:</b></td>
  1143. <td>&nbsp;</td>
  1144. <td>
  1145. <select name="callNumberSelector"><?php echo $dropDownItems1; ?>
  1146. </select>
  1147. </td>
  1148. <td><input type="text" name="callNumberName" size="42"></td>
  1149. </tr>
  1150. <tr>
  1151. <td>&nbsp;</td>
  1152. <td>&nbsp;</td>
  1153. <td>&nbsp;</td>
  1154. <td>&nbsp;</td>
  1155. <td>&nbsp;</td>
  1156. </tr>
  1157. <tr>
  1158. <td valign="middle"><input type="checkbox" name="showSerial" value="1"></td>
  1159. <td><b><?php echo $loc["Serial"]; ?>:</b></td>
  1160. <td>&nbsp;</td>
  1161. <td>
  1162. <select name="serialSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  1163. </select>
  1164. </td>
  1165. <td><input type="text" name="serialNo" size="42"></td>
  1166. </tr>
  1167. <tr>
  1168. <td valign="middle"><input type="checkbox" name="showType" value="1"></td>
  1169. <td><b><?php echo $loc["Type"]; ?>:</b></td>
  1170. <td align="center"><input type="radio" name="typeRadio" value="1" checked></td>
  1171. <td>
  1172. <select name="typeSelector"><?php echo $dropDownItems1; ?>
  1173. </select>
  1174. </td>
  1175. <td><?php
  1176. // (3) Run the query on the literature database through the connection:
  1177. // (here by use of the 'selectDistinct' function)
  1178. // Produce the select list
  1179. // Parameters:
  1180. // 1: Database connection
  1181. // 2. Table that contains values
  1182. // 3. The field name of the table's primary key
  1183. // 4. Table name of the user data table
  1184. // 5. The field name within the user data table that corresponds to the field in 3.
  1185. // 6. The field name of the user ID field within the user data table
  1186. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  1187. // 8. Attribute that contains values
  1188. // 9. <SELECT> element name
  1189. // 10. An additional non-database value (display string)
  1190. // 11. String that gets submitted instead of the display string given in 10.
  1191. // 12. Optional <OPTION SELECTED>
  1192. // 13. Restrict query to field... (keep empty if no restriction wanted)
  1193. // 14. ...where field contents are...
  1194. // 15. Split field contents into substrings? (yes = true, no = false)
  1195. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  1196. echo selectDistinct($connection,
  1197. $tableRefs,
  1198. "serial",
  1199. $tableUserData,
  1200. "record_id",
  1201. "user_id",
  1202. $loginUserID,
  1203. "type",
  1204. "typeName",
  1205. $loc["All"],
  1206. "All",
  1207. $loc["All"],
  1208. "",
  1209. "",
  1210. false,
  1211. "");
  1212. ?>
  1213. </td>
  1214. </tr>
  1215. <tr>
  1216. <td>&nbsp;</td>
  1217. <td align="right"><?php echo $loc["or"]; ?>:</td>
  1218. <td align="center"><input type="radio" name="typeRadio" value="0"></td>
  1219. <td>
  1220. <select name="typeSelector2"><?php echo $dropDownItems1; ?>
  1221. </select>
  1222. </td>
  1223. <td><input type="text" name="typeName2" size="42"></td>
  1224. </tr>
  1225. <tr>
  1226. <td valign="middle"><input type="checkbox" name="showApproved" value="1"></td>
  1227. <td><b><?php echo $loc["Approved"]; ?>:</b></td>
  1228. <td>&nbsp;</td>
  1229. <td><input type="radio" name="approvedRadio" value="1">&nbsp;&nbsp;<?php echo $loc["Yes"]; ?>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="approvedRadio" value="0">&nbsp;&nbsp;<?php echo $loc["No"]; ?></td>
  1230. <td>&nbsp;</td>
  1231. </tr>
  1232. <tr>
  1233. <td>&nbsp;</td>
  1234. <td>&nbsp;</td>
  1235. <td>&nbsp;</td>
  1236. <td>&nbsp;</td>
  1237. <td>&nbsp;</td>
  1238. </tr>
  1239. <tr>
  1240. <td valign="middle"><input type="checkbox" name="showCreatedDate" value="1"></td>
  1241. <td><b><?php echo $loc["CreationDate"]; ?>:</b></td>
  1242. <td>&nbsp;</td>
  1243. <td>
  1244. <select name="createdDateSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  1245. </select>
  1246. </td>
  1247. <td><input type="text" name="createdDateNo" size="42"></td>
  1248. </tr>
  1249. <tr>
  1250. <td valign="middle"><input type="checkbox" name="showCreatedTime" value="1"></td>
  1251. <td><b><?php echo $loc["CreationTime"]; ?>:</b></td>
  1252. <td>&nbsp;</td>
  1253. <td>
  1254. <select name="createdTimeSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  1255. </select>
  1256. </td>
  1257. <td><input type="text" name="createdTimeNo" size="42"></td>
  1258. </tr><?php
  1259. // we only show a text entry form for the 'created_by' field if the user is logged in:
  1260. if (isset($_SESSION['loginEmail']))
  1261. {
  1262. ?>
  1263. <tr>
  1264. <td valign="middle"><input type="checkbox" name="showCreatedBy" value="1"></td>
  1265. <td><b><?php echo $loc["Creator"]; ?>:</b></td>
  1266. <td align="center"><input type="radio" name="createdByRadio" value="1" checked></td>
  1267. <td>
  1268. <select name="createdBySelector"><?php echo $dropDownItems1; ?>
  1269. </select>
  1270. </td>
  1271. <td><?php
  1272. // (3) Run the query on the literature database through the connection:
  1273. // (here by use of the 'selectDistinct' function)
  1274. // Produce the select list
  1275. // Parameters:
  1276. // 1: Database connection
  1277. // 2. Table that contains values
  1278. // 3. The field name of the table's primary key
  1279. // 4. Table name of the user data table
  1280. // 5. The field name within the user data table that corresponds to the field in 3.
  1281. // 6. The field name of the user ID field within the user data table
  1282. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  1283. // 8. Attribute that contains values
  1284. // 9. <SELECT> element name
  1285. // 10. An additional non-database value (display string)
  1286. // 11. String that gets submitted instead of the display string given in 10.
  1287. // 12. Optional <OPTION SELECTED>
  1288. // 13. Restrict query to field... (keep empty if no restriction wanted)
  1289. // 14. ...where field contents are...
  1290. // 15. Split field contents into substrings? (yes = true, no = false)
  1291. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  1292. echo selectDistinct($connection,
  1293. $tableRefs,
  1294. "serial",
  1295. $tableUserData,
  1296. "record_id",
  1297. "user_id",
  1298. $loginUserID,
  1299. "created_by",
  1300. "createdByName",
  1301. $loc["All"],
  1302. "All",
  1303. $loc["All"],
  1304. "",
  1305. "",
  1306. true,
  1307. " *[,;()] *");
  1308. ?>
  1309. </td>
  1310. </tr>
  1311. <tr>
  1312. <td>&nbsp;</td>
  1313. <td align="right"><?php echo $loc["or"]; ?>:</td>
  1314. <td align="center"><input type="radio" name="createdByRadio" value="0"></td>
  1315. <td>
  1316. <select name="createdBySelector2"><?php echo $dropDownItems1; ?>
  1317. </select>
  1318. </td>
  1319. <td><input type="text" name="createdByName2" size="42"></td>
  1320. </tr><?php
  1321. }
  1322. ?>
  1323. <tr>
  1324. <td>&nbsp;</td>
  1325. <td>&nbsp;</td>
  1326. <td>&nbsp;</td>
  1327. <td>&nbsp;</td>
  1328. <td>&nbsp;</td>
  1329. </tr>
  1330. <tr>
  1331. <td valign="middle"><input type="checkbox" name="showModifiedDate" value="1"></td>
  1332. <td><b><?php echo $loc["ModifiedDate"]; ?>:</b></td>
  1333. <td>&nbsp;</td>
  1334. <td>
  1335. <select name="modifiedDateSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  1336. </select>
  1337. </td>
  1338. <td><input type="text" name="modifiedDateNo" size="42"></td>
  1339. </tr>
  1340. <tr>
  1341. <td valign="middle"><input type="checkbox" name="showModifiedTime" value="1"></td>
  1342. <td><b><?php echo $loc["ModifiedTime"]; ?>:</b></td>
  1343. <td>&nbsp;</td>
  1344. <td>
  1345. <select name="modifiedTimeSelector"><?php echo $dropDownItems1 . $dropDownItems2; ?>
  1346. </select>
  1347. </td>
  1348. <td><input type="text" name="modifiedTimeNo" size="42"></td>
  1349. </tr><?php
  1350. // we only show a text entry form for the 'modified_by' field if the user is logged in:
  1351. if (isset($_SESSION['loginEmail']))
  1352. {
  1353. ?>
  1354. <tr>
  1355. <td valign="middle"><input type="checkbox" name="showModifiedBy" value="1"></td>
  1356. <td><b><?php echo $loc["Modifier"]; ?>:</b></td>
  1357. <td align="center"><input type="radio" name="modifiedByRadio" value="1" checked></td>
  1358. <td>
  1359. <select name="modifiedBySelector"><?php echo $dropDownItems1; ?>
  1360. </select>
  1361. </td>
  1362. <td><?php
  1363. // (3) Run the query on the literature database through the connection:
  1364. // (here by use of the 'selectDistinct' function)
  1365. // Produce the select list
  1366. // Parameters:
  1367. // 1: Database connection
  1368. // 2. Table that contains values
  1369. // 3. The field name of the table's primary key
  1370. // 4. Table name of the user data table
  1371. // 5. The field name within the user data table that corresponds to the field in 3.
  1372. // 6. The field name of the user ID field within the user data table
  1373. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  1374. // 8. Attribute that contains values
  1375. // 9. <SELECT> element name
  1376. // 10. An additional non-database value (display string)
  1377. // 11. String that gets submitted instead of the display string given in 10.
  1378. // 12. Optional <OPTION SELECTED>
  1379. // 13. Restrict query to field... (keep empty if no restriction wanted)
  1380. // 14. ...where field contents are...
  1381. // 15. Split field contents into substrings? (yes = true, no = false)
  1382. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  1383. echo selectDistinct($connection,
  1384. $tableRefs,
  1385. "serial",
  1386. $tableUserData,
  1387. "record_id",
  1388. "user_id",
  1389. $loginUserID,
  1390. "modified_by",
  1391. "modifiedByName",
  1392. $loc["All"],
  1393. "All",
  1394. $loc["All"],
  1395. "",
  1396. "",
  1397. true,
  1398. " *[,;()] *");
  1399. ?>
  1400. </td>
  1401. </tr>
  1402. <tr>
  1403. <td>&nbsp;</td>
  1404. <td align="right"><?php echo $loc["or"]; ?>:</td>
  1405. <td align="center"><input type="radio" name="modifiedByRadio" value="0"></td>
  1406. <td>
  1407. <select name="modifiedBySelector2"><?php echo $dropDownItems1; ?>
  1408. </select>
  1409. </td>
  1410. <td><input type="text" name="modifiedByName2" size="42"></td>
  1411. </tr><?php
  1412. }
  1413. // --------------------------------------------------------------------
  1414. if (isset($_SESSION['loginEmail'])) // if a user is logged in, display user specific fields:
  1415. {
  1416. ?>
  1417. <tr>
  1418. <td>&nbsp;</td>
  1419. <td>&nbsp;</td>
  1420. <td>&nbsp;</td>
  1421. <td>&nbsp;</td>
  1422. <td>&nbsp;</td>
  1423. </tr>
  1424. <tr>
  1425. <td valign="middle"><input type="checkbox" name="showMarked" value="1"></td>
  1426. <td><b><?php echo $loc["Marked"]; ?>:</b></td>
  1427. <td>&nbsp;</td>
  1428. <td><input type="radio" name="markedRadio" value="1">&nbsp;&nbsp;<?php echo $loc["Yes"]; ?>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="markedRadio" value="0">&nbsp;&nbsp;<?php echo $loc["No"]; ?></td>
  1429. <td>&nbsp;</td>
  1430. </tr>
  1431. <tr>
  1432. <td valign="middle"><input type="checkbox" name="showCopy" value="1"></td>
  1433. <td><b><?php echo $loc["Copy"]; ?>:</b></td>
  1434. <td>&nbsp;</td>
  1435. <td>
  1436. <select name="copySelector">
  1437. <option value="is equal to" selected><?php echo $loc["equal to"]; ?></option>
  1438. <option value="is not equal to"><?php echo $loc["equal to not"]; ?></option>
  1439. </select>
  1440. </td>
  1441. <td>
  1442. <select name="copyName">
  1443. <option value="All" selected><?php echo $loc["All"]; ?></option>
  1444. <option value="true"><?php echo $loc["true"]; ?></option>
  1445. <option value="fetch"><?php echo $loc["fetch"]; ?></option>
  1446. <option value="ordered"><?php echo $loc["ordered"]; ?></option>
  1447. <option value="false"><?php echo $loc["false"]; ?></option>
  1448. </select>
  1449. </td>
  1450. </tr>
  1451. <tr>
  1452. <td valign="middle"><input type="checkbox" name="showSelected" value="1"></td>
  1453. <td><b><?php echo $loc["Selected"]; ?>:</b></td>
  1454. <td>&nbsp;</td>
  1455. <td><input type="radio" name="selectedRadio" value="1">&nbsp;&nbsp;<?php echo $loc["Yes"]; ?>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="selectedRadio" value="0">&nbsp;&nbsp;<?php echo $loc["No"]; ?></td>
  1456. <td>&nbsp;</td>
  1457. </tr>
  1458. <tr>
  1459. <td valign="middle"><input type="checkbox" name="showUserKeys" value="1"></td>
  1460. <td><b><?php echo $loc["UserKeys"]; ?>:</b></td>
  1461. <td align="center"><input type="radio" name="userKeysRadio" value="1" checked></td>
  1462. <td>
  1463. <select name="userKeysSelector"><?php echo $dropDownItems1; ?>
  1464. </select>
  1465. </td>
  1466. <td><?php
  1467. // (3) Run the query on the literature database through the connection:
  1468. // (here by use of the 'selectDistinct' function)
  1469. // Produce the select list
  1470. // Parameters:
  1471. // 1: Database connection
  1472. // 2. Table that contains values
  1473. // 3. The field name of the table's primary key
  1474. // 4. Table name of the user data table
  1475. // 5. The field name within the user data table that corresponds to the field in 3.
  1476. // 6. The field name of the user ID field within the user data table
  1477. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  1478. // 8. Attribute that contains values
  1479. // 9. <SELECT> element name
  1480. // 10. An additional non-database value (display string)
  1481. // 11. String that gets submitted instead of the display string given in 10.
  1482. // 12. Optional <OPTION SELECTED>
  1483. // 13. Restrict query to field... (keep empty if no restriction wanted)
  1484. // 14. ...where field contents are...
  1485. // 15. Split field contents into substrings? (yes = true, no = false)
  1486. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  1487. echo selectDistinct($connection,
  1488. $tableRefs,
  1489. "serial",
  1490. $tableUserData,
  1491. "record_id",
  1492. "user_id",
  1493. $loginUserID,
  1494. "user_keys",
  1495. "userKeysName",
  1496. $loc["All"],
  1497. "All",
  1498. $loc["All"],
  1499. "",
  1500. "",
  1501. true,
  1502. " *[,;()] *");
  1503. ?>
  1504. </td>
  1505. </tr>
  1506. <tr>
  1507. <td>&nbsp;</td>
  1508. <td align="right"><?php echo $loc["or"]; ?>:</td>
  1509. <td align="center"><input type="radio" name="userKeysRadio" value="0"></td>
  1510. <td>
  1511. <select name="userKeysSelector2"><?php echo $dropDownItems1; ?>
  1512. </select>
  1513. </td>
  1514. <td><input type="text" name="userKeysName2" size="42"></td>
  1515. </tr>
  1516. <tr>
  1517. <td valign="middle"><input type="checkbox" name="showUserNotes" value="1"></td>
  1518. <td><b><?php echo $loc["UserNotes"]; ?>:</b></td>
  1519. <td>&nbsp;</td>
  1520. <td>
  1521. <select name="userNotesSelector"><?php echo $dropDownItems1; ?>
  1522. </select>
  1523. </td>
  1524. <td><input type="text" name="userNotesName" size="42"></td>
  1525. </tr>
  1526. <tr>
  1527. <td valign="middle"><input type="checkbox" name="showUserFile" value="1"></td>
  1528. <td><b><?php echo $loc["UserFile"]; ?>:</b></td>
  1529. <td>&nbsp;</td>
  1530. <td>
  1531. <select name="userFileSelector"><?php echo $dropDownItems1; ?>
  1532. </select>
  1533. </td>
  1534. <td><input type="text" name="userFileName" size="42"></td>
  1535. </tr>
  1536. <tr>
  1537. <td valign="middle"><input type="checkbox" name="showUserGroups" value="1"></td>
  1538. <td><b><?php echo $loc["UserGroups"]; ?>:</b></td>
  1539. <td align="center"><input type="radio" name="userGroupsRadio" value="1" checked></td>
  1540. <td>
  1541. <select name="userGroupsSelector"><?php echo $dropDownItems1; ?>
  1542. </select>
  1543. </td>
  1544. <td><?php
  1545. // (3) Run the query on the literature database through the connection:
  1546. // (here by use of the 'selectDistinct' function)
  1547. // Produce the select list
  1548. // Parameters:
  1549. // 1: Database connection
  1550. // 2. Table that contains values
  1551. // 3. The field name of the table's primary key
  1552. // 4. Table name of the user data table
  1553. // 5. The field name within the user data table that corresponds to the field in 3.
  1554. // 6. The field name of the user ID field within the user data table
  1555. // 7. The user ID of the currently logged in user (which must be provided as a session variable)
  1556. // 8. Attribute that contains values
  1557. // 9. <SELECT> element name
  1558. // 10. An additional non-database value (display string)
  1559. // 11. String that gets submitted instead of the display string given in 10.
  1560. // 12. Optional <OPTION SELECTED>
  1561. // 13. Restrict query to field... (keep empty if no restriction wanted)
  1562. // 14. ...where field contents are...
  1563. // 15. Split field contents into substrings? (yes = true, no = false)
  1564. // 16. POSIX-PATTERN to split field contents into substrings (in order to obtain actual values)
  1565. echo selectDistinct($connection,
  1566. $tableRefs,
  1567. "serial",
  1568. $tableUserData,
  1569. "record_id",
  1570. "user_id",
  1571. $loginUserID,
  1572. "user_groups",
  1573. "userGroupsName",
  1574. $loc["All"],
  1575. "All",
  1576. $loc["All"],
  1577. "",
  1578. "",
  1579. true,
  1580. " *[,;()] *");
  1581. ?>
  1582. </td>
  1583. </tr>
  1584. <tr>
  1585. <td>&nbsp;</td>
  1586. <td align="right"><?php echo $loc["or"]; ?>:</td>
  1587. <td align="center"><input type="radio" name="userGroupsRadio" value="0"></td>
  1588. <td>
  1589. <select name="userGroupsSelector2"><?php echo $dropDownItems1; ?>
  1590. </select>
  1591. </td>
  1592. <td><input type="text" name="userGroupsName2" size="42"></td>
  1593. </tr>
  1594. <tr>
  1595. <td valign="middle"><input type="checkbox" name="showCiteKey" value="1"></td>
  1596. <td><b><?php echo $loc["CiteKey"]; ?>:</b></td>
  1597. <td>&nbsp;</td>
  1598. <td>
  1599. <select name="citeKeySelector"><?php echo $dropDownItems1; ?>
  1600. </select>
  1601. </td>
  1602. <td><input type="text" name="citeKeyName" size="42"></td>
  1603. </tr><?php
  1604. } // end if (a user is logged in, display user specific fields)
  1605. // --------------------------------------------------------------------
  1606. ?>
  1607. <tr>
  1608. <td>&nbsp;</td>
  1609. <td>&nbsp;</td>
  1610. <td>&nbsp;</td>
  1611. <td>&nbsp;</td>
  1612. <td>&nbsp;</td>
  1613. </tr>
  1614. <tr>
  1615. <td>&nbsp;</td>
  1616. <td valign="top"><b><?php echo $loc["DisplayOptions"]; ?>:</b></td>
  1617. <td>&nbsp;</td>
  1618. <td valign="middle"><input type="checkbox" name="showLinks" value="1" checked>&nbsp;&nbsp;&nbsp;<?php echo $loc["ShowLinks"]; ?></td>
  1619. <td valign="middle"><?php echo $loc["ShowRecordsPerPage_Prefix"]; ?>&nbsp;&nbsp;&nbsp;<input type="text" name="showRows" value="<?php echo $showRows; ?>" size="4" title="<?php echo $loc["DescriptionShowRecordsPerPage"]; ?>">&nbsp;&nbsp;&nbsp;<?php echo $loc["ShowRecordsPerPage_Suffix"]; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php echo $loc["ButtonTitle_Search"]; ?>"></td>
  1620. </tr>
  1621. <tr>
  1622. <td>&nbsp;</td>
  1623. <td>&nbsp;</td>
  1624. <td>&nbsp;</td>
  1625. <td>&nbsp;</td>
  1626. <td>&nbsp;</td>
  1627. </tr><?php
  1628. if (isset($_SESSION['loginEmail'])) // if a user is logged in, add user specific fields to the sort menus:
  1629. {
  1630. // TODO: if possible, we should use function 'mapFieldNames()' here (see also above)
  1631. $userSpecificSortFieldsNameArray = array("",
  1632. "marked" => $loc["DropDownFieldName_Marked"],
  1633. "copy" => $loc["DropDownFieldName_Copy"],
  1634. "selected" => $loc["DropDownFieldName_Selected"],
  1635. "user_keys" => $loc["DropDownFieldName_UserKeys"],
  1636. "user_notes" => $loc["DropDownFieldName_UserNotes"],
  1637. "user_file" => $loc["DropDownFieldName_UserFile"],
  1638. "user_groups" => $loc["DropDownFieldName_UserGroups"],
  1639. "cite_key" => $loc["DropDownFieldName_CiteKey"]);
  1640. $dropDownItems4 = buildSelectMenuOptions($userSpecificSortFieldsNameArray, "//", "\t\t\t", true); // function 'buildSelectMenuOptions()' is defined in 'include.inc.php'
  1641. }
  1642. else
  1643. {
  1644. $dropDownItems4 = "";
  1645. }
  1646. ?>
  1647. <tr>
  1648. <td>&nbsp;</td>
  1649. <td>1.&nbsp;<?php echo $loc["sort by"]; ?>:</td>
  1650. <td>&nbsp;</td>
  1651. <td>
  1652. <select name="sortSelector1"><?php
  1653. $sortSelector1DropDownItems = preg_replace("/<option([^>]*)>$loc[DropDownFieldName_Author]/i", "<option\\1 selected>" . $loc["DropDownFieldName_Author"], $dropDownItems3); // select the 'author' menu entry ...
  1654. echo $sortSelector1DropDownItems . $dropDownItems4;
  1655. ?>
  1656. </select>
  1657. </td>
  1658. <td>
  1659. <input type="radio" name="sortRadio1" value="0" checked>&nbsp;&nbsp;&nbsp;<?php echo $loc["ascending"]; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  1660. <input type="radio" name="sortRadio1" value="1">&nbsp;&nbsp;&nbsp;<?php echo $loc["descending"]; ?>
  1661. </td>
  1662. </tr>
  1663. <tr>
  1664. <td>&nbsp;</td>
  1665. <td>2.&nbsp;<?php echo $loc["sort by"]; ?>:</td>
  1666. <td>&nbsp;</td>
  1667. <td>
  1668. <select name="sortSelector2"><?php
  1669. $sortSelector2DropDownItems = preg_replace("/<option([^>]*)>$loc[DropDownFieldName_Year]/i", "<option\\1 selected>" . $loc["DropDownFieldName_Year"], $dropDownItems3); // select the 'year' menu entry ...
  1670. echo $sortSelector2DropDownItems . $dropDownItems4;
  1671. ?>
  1672. </select>
  1673. </td>
  1674. <td>
  1675. <input type="radio" name="sortRadio2" value="0">&nbsp;&nbsp;&nbsp;<?php echo $loc["ascending"]; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  1676. <input type="radio" name="sortRadio2" value="1" checked>&nbsp;&nbsp;&nbsp;<?php echo $loc["descending"]; ?>
  1677. </td>
  1678. </tr>
  1679. <tr>
  1680. <td>&nbsp;</td>
  1681. <td>3.&nbsp;<?php echo $loc["sort by"]; ?>:</td>
  1682. <td>&nbsp;</td>
  1683. <td>
  1684. <select name="sortSelector3"><?php
  1685. $sortSelector3DropDownItems = preg_replace("/<option([^>]*)>$loc[DropDownFieldName_Publication]/i", "<option\\1 selected>" . $loc["DropDownFieldName_Publication"], $dropDownItems3); // select the 'publication' menu entry ...
  1686. echo $sortSelector3DropDownItems . $dropDownItems4;
  1687. ?>
  1688. </select>
  1689. </td>
  1690. <td>
  1691. <input type="radio" name="sortRadio3" value="0" checked>&nbsp;&nbsp;&nbsp;<?php echo $loc["ascending"]; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  1692. <input type="radio" name="sortRadio3" value="1">&nbsp;&nbsp;&nbsp;<?php echo $loc["descending"]; ?>
  1693. </td>
  1694. </tr>
  1695. </table>
  1696. </form><?php
  1697. // (5) Close the database connection:
  1698. disconnectFromMySQLDatabase(); // function 'disconnectFromMySQLDatabase()' is defined in 'include.inc.php'
  1699. // --------------------------------------------------------------------
  1700. // DISPLAY THE HTML FOOTER:
  1701. // call the 'showPageFooter()' and 'displayHTMLfoot()' functions (which are defined in 'footer.inc.php')
  1702. showPageFooter($HeaderString);
  1703. displayHTMLfoot();
  1704. // --------------------------------------------------------------------
  1705. ?>