PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/da_catalog_edit_testSection.php

https://github.com/jmjamison/da_catalog_maintenance
PHP | 634 lines | 367 code | 178 blank | 89 comment | 72 complexity | 4208f476d982c584727f036ab848d2e8 MD5 | raw file
  1. <html>
  2. <head><title>Data Archive Catalog: Edit</title>
  3. <link rel="stylesheet" href="2col_leftNav.css" type="text/css">
  4. <!-- Javascript(s) to 1) paste PI names into text field, 2) clear the text fiels -->
  5. <script language="JavaScript" src="da_catalog.js" type="text/javascript"><!-- da_catalog scripts //--></script>
  6. <!-- end Javascript PI paste and clear -->
  7. </head>
  8. <body>
  9. <?php
  10. $sscnetHTTP = "http://www.sscnet.ucla.edu/issr/da/da_catalog/";
  11. $sscnetHTTP_maintenance_test = "http://www.sscnet.ucla.edu/issr/da/da_catalog_maintenance_test/";
  12. $sscnetHTTP_maintenance_live = "http://www.sscnet.ucla.edu/issr/da/da_catalog_maintenance/";
  13. $mydestopHTTP = "http://localhost/da_catalog/";
  14. $currentHTTP = $sscnetHTTP_maintenance_live;
  15. $sscnetInclude = "ISSRDATEST_login.php";
  16. $mydesktopInclude = "../db_login2.php";
  17. $currentInclude = $sscnetInclude;
  18. include($currentInclude);
  19. // for desktop test system
  20. //$db_name = "da_catalog";
  21. if (!empty($_POST['studynumber'])) {
  22. //echo "studynumber: " . $studynumber;
  23. $_SESSION['studynumber'] = $_POST['studynumber'];
  24. // something is selected
  25. $queryGetBaseRecord = "SELECT title.*, picode.ID as picode_id, picode.picode, picode.tisubsort, pifull.*, shcode.ID as shcode_id, shcode.subjectcode, shcode.subsort as subject_subsort, shfull.*, wwwlink_pi.wwwlink AS wwwlink_pi, wwwlink_pi.wwwtext AS wwwtext_pi, wwwlink_subject.wwwlink AS wwwlink_subject, wwwlink_subject.wwwtext AS wwwtext_subject, cite.cite, cite.subsort, pifull.picode FROM cite RIGHT JOIN ((((((title LEFT JOIN picode ON title.tisort = picode.tisort) LEFT JOIN pifull ON picode.picode = pifull.picode) LEFT JOIN shcode ON title.tisort = shcode.tisort) LEFT JOIN shfull ON shcode.subjectcode = shfull.subjectcode) LEFT JOIN wwwlink AS wwwlink_subject ON shfull.subjectcode = wwwlink_subject.subjectcode) LEFT JOIN wwwlink AS wwwlink_pi ON pifull.picode = wwwlink_pi.picode) ON cite.citenum = title.Cite WHERE (((title.StudyNum)='" . $studynumber ."'))";
  26. //echo "<br>" . $queryGetBaseRecord . "<br>";
  27. // PDO connect
  28. $PDO_string = "mysql:host=" . $db_host . ";port=" . $db_port . ";dbname=" . $db_name ;
  29. // echo "<br>" . $queryGetBaseRecord . "<br>";
  30. try {
  31. $PDO_connection = new PDO($PDO_string, $db_username, $db_password);
  32. } catch(PDOException $e) {
  33. echo "Could not connect to the database because: ". $e->getMessage()."<br>";
  34. die();
  35. }
  36. // PDO - create prepared statement: get the table.pifull
  37. // --------------------------------------------------------
  38. $PDO_query = $PDO_connection->prepare($queryGetBaseRecord);
  39. // PDO - execute the query
  40. $result = $PDO_query->execute();
  41. if (!$result) {
  42. die ("Could not query the database: <br />". mysql_error());
  43. }
  44. // complete record info
  45. $titleRecord = array(); // record - the title, sub# and restricted y/n
  46. // list of pi(s)
  47. $piList = array(); // list of pi(s)
  48. $piListFull = array();
  49. $current_pi = null;
  50. $temp = "";
  51. $subjectList = array(); // list of subjects
  52. $subjectListFull = array();
  53. $current_subject = null;
  54. $usefulLinks = array(); // linklist
  55. $row_index = 0;
  56. while ($row = $PDO_query->fetch(PDO::FETCH_ASSOC)) {
  57. //----------------------------------------------------------------------------------------------------------------------------
  58. //
  59. // there will only be one title record. these are essentially the fields from the title table
  60. // because the query grabs everything in one big swoop the title record items will appear more than once even though there can only be
  61. // one title record - the title record is the base record
  62. //
  63. // on the otherhand there can be multiple PIs, Subjects/Keywords and links. Those are handled separated. This note referes specifically to
  64. // the title record
  65. //
  66. //---------------------------------------------------------------------------------------------------------------------------
  67. // relevant fields from the title and cite tables
  68. $_SESSION['title'] = $row["Title"];
  69. $_SESSION['tisort'] = $row["tisort"]; // ID for title table, connecting field to the picode and shcode tables
  70. $_SESSION['restricted'] = $row[ "Restricted" ];
  71. $_SESSION['www'] = $row[ "WWW" ];
  72. $_SESSION['cite_title'] = $row[ "cite"];
  73. $_SESSION['cite_subsort'] = $row["subsort"];
  74. if ($_SESSION['cite_subsort'] <= 1) { $_SESSION['cite_subsort'] = 1; } // in the event that subsort is 0/not set, reset it to 1
  75. $_SESSION['sda'] = $row["SDA"];
  76. $_SESSION['varsrch'] = $row["Varsrch"];
  77. $_SESSION['justonCD'] = $row["JustOnCD"];
  78. $_SESSION['mobilityData'] = $row["mobilityData"];
  79. $_SESSION['eveFielderCollection'] = $row["eveFielderCollection"];
  80. $piList[$row_index] = $row[ "pi"];
  81. $temp_pi = $row["pi"];
  82. if ($temp_pi != $current_pi) {
  83. $piListFull[$row_index]["picode_id"] = $row["picode_id"];
  84. $piListFull[$row_index]["pi_tisubsort"] = $row["tisubsort"];
  85. $piListFull[$row_index]["pi"] = $temp_pi;
  86. $piListFull[$row_index]["picode"] = $row["picode"];
  87. $current_pi = $temp_pi;
  88. //echo "<br>" . $temp_pi . "<br>";
  89. }
  90. $subjectList[$row_index] = $row[ "subject"];
  91. $temp_subject = $row["subject"];
  92. if ($temp_subject != $current_subject) {
  93. $subjectListFull[$row_index]["shcode_id"] = $row["shcode_id"];
  94. $subjectListFull[$row_index]["subject_subsort"] = $row["subject_subsort"];
  95. $subjectListFull[$row_index]["subject"] = $temp_subject;
  96. $subjectListFull[$row_index]["subjectcode"] = $row["subjectcode"];
  97. $current_subject = $temp_subject;
  98. //echo "<br>" . $temp_subject . "<br>";
  99. }
  100. $row_index++;
  101. }
  102. //print_r($subjectListFull);
  103. //echo "<br>";
  104. sort($piListFull); // this will sort and re-number
  105. sort($subjectListFull);
  106. //print_r($piListFull);
  107. //echo "<br><br>";
  108. $piListFullCount = count($piListFull);
  109. $subjectListFullCount = count($subjectListFull);
  110. $piList = array_unique($piList);
  111. sort($piList);
  112. $piListCount = count($piList);
  113. //echo "<br>unique pi rows: " . $piListCount;
  114. //print_r($piList);
  115. if ($piListCount <= 1) { // just one pi
  116. $row_index = 0;
  117. $pi = $piList[$row_index];
  118. // I'm still using both of these
  119. $piTempList = $piList[$row_index];
  120. $_SESSION['pi'] = $piList[$row_index];
  121. } elseif ($piListCount > 1) { // there will be a list of PIs
  122. $piTempList = "";
  123. for ($row_index = 0; $row_index < $piListCount-1; $row_index++) { // minus 1 so the last item won't have a ;
  124. $piTempList .= $piList[$row_index] . "; ";
  125. }
  126. $piTempList .= $piList[$row_index];
  127. //echo $piTempList . "<br>";
  128. $_SESSION["pi"] = $piTempList;
  129. }
  130. //echo $piTempList . "<br>";
  131. //$subjectListCount = count($piList);
  132. $subjectList = array_unique($subjectList);
  133. sort($subjectList);
  134. $subjectListCount = count($subjectList);
  135. if ($subjectListCount <= 1) { // just one subject/keyword
  136. $row_index = 0;
  137. $_SESSION['subject'] = $subjectList[$row_index];
  138. } elseif ($subjectListCount > 1) { // there will be a list of PIs
  139. $subjectTempList = "";
  140. for ($row_index = 0; $row_index < $subjectListCount-1; $row_index++) { // minus 1 so the last item won't have a ;
  141. $subjectTempList .= $subjectList[$row_index] . "; ";
  142. }
  143. $subjectTempList .= $subjectList[$row_index];
  144. //echo $subjectTempList . "<br>";
  145. $_SESSION["subject"] = $subjectTempList;
  146. }
  147. //echo "<br>" . $subjectTempList . "<br>";
  148. // close connection
  149. $PDO_connection = null;
  150. //
  151. } else
  152. $studynumber = '';
  153. // add session variables so the pages stays populated
  154. //session_start();
  155. if (isset($_SESSION['studynumber']))
  156. $studynumber = $_SESSION['studynumber'];
  157. else
  158. $studynumber = '';
  159. if (isset($_SESSION['title']))
  160. $title = $_SESSION['title'];
  161. else
  162. $title = '';
  163. if (isset($_SESSION['tisort']))
  164. $tisort = $_SESSION['tisort'];
  165. else
  166. $tisort = '';
  167. if (isset($_SESSION['pi']))
  168. $pi = $_SESSION['pi'];
  169. else
  170. $pi = '';
  171. if (isset($_SESSION['subject']))
  172. $subject = $_SESSION['subject'];
  173. else
  174. $subject = '';
  175. if (isset($_SESSION['cite_title']))
  176. $cite_title = $_SESSION['cite_title'];
  177. else
  178. $cite_title = '';
  179. if (isset($_SESSION['cite_subsort']))
  180. $cite_subsort = $_SESSION['cite_subsort'];
  181. else
  182. $cite_subsort = '';
  183. if (isset($_SESSION['wwwtext']))
  184. $wwwtext = $_SESSION['wwwtext'];
  185. else
  186. $wwwtext = '';
  187. if (isset($_SESSION['wwwlink']))
  188. $wwwlink = $_SESSION['wwwlink'];
  189. else
  190. $wwwlink = '';
  191. if (isset($_SESSION['sda']))
  192. $sda = $_SESSION['sda'];
  193. else
  194. $sda = '';
  195. if (isset($_SESSION['varsrch']))
  196. $varsrch = $_SESSION['varsrch'];
  197. else
  198. $varsrch = '';
  199. if (isset($_SESSION['restricted']))
  200. $restricted = $_SESSION['restricted'];
  201. else
  202. $restricted = '';
  203. if (isset($_SESSION['justonCD']))
  204. $justonCD = $_SESSION['justonCD'];
  205. else
  206. $justonCD = '';
  207. if (isset($_SESSION['mobilityData']))
  208. $mobilityData = $_SESSION['mobilityData'];
  209. else
  210. $mobilityData = '';
  211. if (isset($_SESSION['eveFielderCollection']))
  212. $eveFielderCollection = $_SESSION['eveFielderCollection'];
  213. else
  214. $eveFielderCollection = '';
  215. //echo "<br>" . $title . ", " . $sda . ", " . $justonCD . ", " . $varsrch . ", " . $mobilityData . ", " . $eveFielderCollection . "<br>";
  216. //$queryFileTypes = "SELECT distinct FileType FROM fileinfo where FileType != '' ORDER BY FileType";
  217. $queryFileTypes = "SELECT DISTINCT fileinfo.FileType FROM fileinfo WHERE ((Not (fileinfo.FileType)='')) OR (((fileinfo.FileType) Is Not Null)) ORDER BY fileinfo.FileType";
  218. $queryTitleStudyNumFileType = "SELECT title.StudyNum, fileinfo.FileType, fileinfo.DTAfile FROM title LEFT JOIN fileinfo ON title.StudyNum = fileinfo.StudyNum ORDER BY title.StudyNum";
  219. // PDO connect
  220. $PDO_string = "mysql:host=" . $db_host . ";port=" . $db_port . ";dbname=" . $db_name ;
  221. try {
  222. $PDO_connection = new PDO($PDO_string, $db_username, $db_password);
  223. } catch(PDOException $e) {
  224. echo "Could not connect to the database because: ". $e->getMessage()."<br>";
  225. die();
  226. }
  227. // PDO - create prepared statement: get the table.pifull
  228. // --------------------------------------------------------
  229. $PDO_query = $PDO_connection->prepare($queryTitleStudyNumFileType);
  230. // PDO - execute the query
  231. $result = $PDO_query->execute();
  232. if (!$result) {
  233. die ("Could not query the database: <br />". mysql_error());
  234. }
  235. $fileTypeList = array();
  236. $studynumberList = array();
  237. $titleList = array();
  238. $dtafileList = array();
  239. $result = $PDO_query->fetch(PDO::FETCH_ASSOC);
  240. $row_index = 0;
  241. while ($row = $PDO_query->fetch(PDO::FETCH_ASSOC)) {
  242. $studynumberList[$row_index] = $row["StudyNum"];
  243. if (!is_null($row["FileType"])) { $fileTypeList[$row_index] = $row["FileType"]; } // others won't have nulls
  244. $dtafileList[$row_index] = $row["DTAfile"];
  245. $row_index++;
  246. }
  247. $fileTypeList = array_unique($fileTypeList);
  248. sort($fileTypeList);
  249. $fileTypeTotal = count($fileTypeList);
  250. $dtafileList = array_unique($dtafileList);
  251. sort($dtafileList);
  252. $studynumberList = array_unique($studynumberList);
  253. sort($studynumberList);
  254. $studynumberListTotal = count($studynumberList);
  255. $fileTypeListText = implode("','", $fileTypeList);
  256. $fileTypeListText = "'" . $fileTypeListText . "'";
  257. //--------------------------------------------------------------------
  258. // Section: populate the PI listbox
  259. // used for authority control, javascript select_PIs will paste in selected fields
  260. //----------------------------------------------------------------------
  261. $queryPI_list = "SELECT DISTINCT * FROM pifull ORDER BY pi";
  262. // echo text for debugging purposes only
  263. // PDO connect
  264. $PDO_string = "mysql:host=" . $db_host . ";port=" . $db_port . ";dbname=" . $db_name ;
  265. try {
  266. $PDO_connection = new PDO($PDO_string, $db_username, $db_password);
  267. } catch(PDOException $e) {
  268. echo "Could not connect to the database because: ". $e->getMessage()."<br>";
  269. die();
  270. }
  271. // PDO - create prepared statement: get the table.pifull
  272. // --------------------------------------------------------
  273. $PDO_query = $PDO_connection->prepare($queryPI_list);
  274. // PDO - execute the query
  275. $result = $PDO_query->execute();
  276. if (!$result) {
  277. die ("Could not query the database: <br />". mysql_error());
  278. }
  279. $PI_list = array();
  280. $result = $PDO_query->fetch(PDO::FETCH_ASSOC);
  281. $row_index = 0;
  282. while ($row = $PDO_query->fetch(PDO::FETCH_ASSOC)) {
  283. $PI_list[$row_index]["picode"] = $row["picode"];
  284. $PI_list[$row_index]["pi"] = $row["pi"];
  285. $row_index++;
  286. }
  287. $PI_list_count = count($PI_list);
  288. echo "PI count: " . $PI_list_count . " ";
  289. //--------------------------------------------------------------
  290. // end populate PI section
  291. //-------------------------------------------------------------
  292. //--------------------------------------------------------------------
  293. // Section: populate the Subject/Index-term listbox
  294. // used for authority control, javascript to copy and paste in selected fields
  295. //----------------------------------------------------------------------
  296. $querySubject_list = "SELECT DISTINCT subject FROM shfull ORDER BY subject";
  297. // echo for debugging purposes only
  298. // PDO connect
  299. $PDO_string = "mysql:host=" . $db_host . ";port=" . $db_port . ";dbname=" . $db_name ;
  300. try {
  301. $PDO_connection = new PDO($PDO_string, $db_username, $db_password);
  302. } catch(PDOException $e) {
  303. echo "Could not connect to the database because: ". $e->getMessage()."<br>";
  304. die();
  305. }
  306. // PDO - create prepared statement: get the table.pifull
  307. // --------------------------------------------------------
  308. $PDO_query = $PDO_connection->prepare($querySubject_list);
  309. // PDO - execute the query
  310. $result = $PDO_query->execute();
  311. if (!$result) {
  312. die ("Could not query the database: <br />". mysql_error());
  313. }
  314. $Subject_list = array();
  315. $result = $PDO_query->fetch(PDO::FETCH_ASSOC);
  316. $row_index = 0;
  317. while ($row = $PDO_query->fetch(PDO::FETCH_ASSOC)) {
  318. $Subject_list[$row_index]["subject"] = $row["subject"];
  319. $row_index++;
  320. }
  321. $Subject_list_count = count($Subject_list);
  322. echo "Subject count: " . $Subject_list_count . "<br>";
  323. //--------------------------------------------------------------
  324. // end populate Subject section
  325. //-------------------------------------------------------------
  326. ?>
  327. <div id="masthead">
  328. <h1 id="siteName">UCLA Institute for Social Research Data Archives</h1>
  329. <h2 id="siteName"><a href="index.php" target="_self">Maintenance Menu</a>&nbsp;/&nbsp;Edit Base Record</h2>
  330. </div> <!--end masthead--><!--end masthead-->
  331. <div style="margin: 1% 5% 2% 2%;line-height: 1.5; ">
  332. <form <?php
  333. if (isset($_SESSION['studynumber'])) { // a study has been chose so post means go to updateCheck
  334. echo " action='da_catalog_updateCheck.php'";
  335. } else { // a study HAS NOT been chosen so post the study info back to the input page when you do choose a study
  336. echo " action=''";
  337. }
  338. ?> method="post" name="updateRecord" target="_self">
  339. <p><label>Studynumber:
  340. <?php
  341. if (isset($_SESSION['studynumber'])) {
  342. $studynumber = $_SESSION['studynumber'];
  343. echo '<input name="studynumber" type="text" id="studynumber" value="' . $studynumber . '" size="30" maxlength="255">';
  344. echo '</select>';
  345. } else {
  346. echo '<select name="studynumber" id="studynumber">';
  347. echo '<option value="">choose studynumber</option>';
  348. foreach ($studynumberList as $key => $value) {
  349. echo '<option value="' . $value . '">' . $value;
  350. }
  351. echo " <input name='getbaserecord' type='submit' id='getbaserecord' value='Get this Studynumber'>";
  352. }
  353. ?></label>
  354. <input name="updateTitle" type="submit" id="updateTitle" value="save/update record">
  355. <input name="reset form" type="reset" value="reset">
  356. <input type="button" onClick="history.go(0)" value="Reload page">
  357. <br><br>
  358. <input name="title" type="hidden" value="title">
  359. <label>Title: <input name="title" type="text" value="<?php echo $title ?>" size="100" maxlength="225">
  360. </label><input name="tisubsort" type="hidden" value="1">
  361. <br><br>
  362. <label>Title level citation: (Subsort number: <?php echo $cite_subsort ?>) <textarea name="cite_title" type="text" cols="200"><?php echo $cite_title ?></textarea></label>
  363. <input name="cite_subsort" type="hidden" value="<?php echo $cite_subsort ?>">
  364. <label>Restricted:<input name="restricted" type="checkbox" value="*" <?php if ($restricted == "*") { echo "CHECKED"; } ?> >
  365. </label>
  366. <label>SDA:<input name="sda" type="checkbox" value="*" <?php if ($sda == "*") { echo "CHECKED"; } ?> >
  367. </label>
  368. &nbsp;&nbsp;
  369. <label>Varsrch:<input name="varsrch" type="checkbox" value="*" <?php if ($varsrch == "*") { echo "CHECKED"; } ?> >
  370. </label>
  371. &nbsp;&nbsp;
  372. <label>CD Only:
  373. <input name="justonCD" type="checkbox" id="justonCD" value="*" <?php if ($justonCD == "*") { echo "CHECKED"; } ?> >
  374. </label>
  375. &nbsp;&nbsp;
  376. <label>
  377. <input name="article" type="hidden" value="">
  378. </label>
  379. &nbsp;&nbsp;
  380. <label>Mobility Data:<input name="mobilityData" type="checkbox" id="mobilityData" value="*" <?php if ($mobilityData == "*") { echo "CHECKED"; } ?> >
  381. </label> <label>Eve Fielder Collection:<input name="eveFielderCollection" type="checkbox" id="eveFielderCollection" value="*" <?php if ($eveFielderCollection == "*") { echo "CHECKED"; } ?> >
  382. </label></p>
  383. </form>
  384. <form action="da_catalog_processFormCheck.php" method="post" name="editSubject" target="_self">
  385. <br><label>Subject/Index Term List: <input name="subject" type="text" value="<?php echo $subjectTempList; ?> " size="200" maxlength="255"></label>
  386. <label>Select Subject/Keyword(s) from list:</label>
  387. <input name="pickSubjects" type="button" id="pickSubjects" onClick="selectPasteCopy('editSubject', 'subject_list','subject')" value="Select and Paste to Subject List">
  388. <input name="clearOutSubject_list" type="button" id="clearOutSubject_list" onClick="clearoutTextElement('addRecord', 'subject')" value="clear out Subject list">
  389. <br>
  390. <strong>Note</strong>: It is possible to select <em>MULTIPLE</em> subject/keyword terms but in order to add terms in a <strong>specific order</strong>, select and paste <em>each term Individually</em>. <br>
  391. <select name="subject_list" size="10" multiple id="subject_list">
  392. <!--
  393. //--------------------------------------------------------------------------
  394. // dropdown box that is populated with Subject/Keyword terms
  395. // used as authority control
  396. // pick from list and paste into text box/pi with javscript (da_catalog.js library) selectPasteCopy and clearoutTextElement scripts functions
  397. //--------------------------------------------------------------------------
  398. -->
  399. <?php
  400. for ($row_index=0; $row_index < $Subject_list_count; $row_index++) {
  401. $subject = $Subject_list[$row_index]["subject"];
  402. echo '<option value="' . $subject . '">' .$subject;
  403. }
  404. ?>
  405. <!--
  406. //---------------------------------------------------------------------------------
  407. // end of suybject list box
  408. //------------------------------------------------
  409. -->
  410. </select>
  411. <label>Subject(s)/Keywords(s) currently linked to <?php echo $studynumber; ?></label>
  412. <?php if (isset($_SESSION['studynumber'])) {
  413. //echo "<br>";
  414. $studynumber = $_SESSION['studynumber'];
  415. //sort($subjectListFull);
  416. //$subjectListFull = array_unique($subjectListFull);
  417. sort($subjectListFull);
  418. $subjectListFullCount = count($subjectListFull);
  419. //echo "<br>unique subject rows: " . $subjectListFullCount . "<br>";
  420. for ($row_index = 0; $row_index < $subjectListFullCount; $row_index++) {
  421. $subject = $subjectListFull[$row_index]["subject"];
  422. $shcode_id = $subjectListFull[$row_index]["shcode_id"];
  423. $subjectcode = $subjectListFull[$row_index]["subjectcode"];
  424. $subject_subsort = $subjectListFull[$row_index]["subject_subsort"];
  425. $currentSubject = null;
  426. if ($subjectcode != $currentSubjectCode) {
  427. echo "<input name='subject' type='text' value='" . $subject . "' size='100' maxlength='255'>";
  428. echo "<input name='studynumber' type='hidden' value='" . $studynumber . "' >";
  429. echo "<input name='tisort' type='hidden' value='" . $tisort . "' >";
  430. echo "<input name='subjectcode' type='text' value='subjectcode: " . $subjectcode . "' >";
  431. echo "<input name='shcode_id' type='text' value='shcode_id: " . $shcode_id . "' >";
  432. echo "<input name='item_id' type='hidden' value='" . $shcode_id . "' >";
  433. echo "<input name='requestCategory' type='hidden' value='subject'>";
  434. // name below is the connecting table for the subjects
  435. //
  436. echo "<input name='subject_subsort' type='hidden' value='" . $subject_subsort . "' size='3' maxlength='3'>";
  437. echo "<input name='item_subsort' type='text' value='" . $subject_subsort . "' size='3' maxlength='3'>";
  438. //
  439. echo "<input name='table_name' type='hidden' value='shcode'>";
  440. echo "<input name='item_subsort_fieldname' type='hidden' value='subsort'>";
  441. echo "<input name='requestType' type='submit' value='Update sort number'> <input name='requestType' type='submit' value='Delete link'>";
  442. //echo " " . $row_index;
  443. $currentSubjectCode = $subjectcode;
  444. }
  445. }
  446. }
  447. ?>
  448. </form>
  449. <br>
  450. <?php
  451. // close the connection
  452. // mysql_close($connection);
  453. $PDO_connection = null;
  454. ?>
  455. </div> <!-- end content-->
  456. </body></html>