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.

1878 lines
67 KiB

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