Source for file input.php

Documentation is available at input.php

  1. <?php
  2. /**
  3. * Input DNA data
  4. * <br/><br/>
  5. * Getting specimen data from original provider via wrapper
  6. * <br/><br/>
  7. * Entering new DNA data, setting reference to voucher/specimen
  8. * <br/><br/>
  9. * Access to all user except of guests
  10. @author Gabriele Droege, DNA Bank Network <contact@dnabank-network.org>
  11. @version 2.0
  12. @package Input
  13. @copyright Copyright © 2011 DNA Bank Network http://www.dnabank-network.org<br>The contents of this file are subject to the Mozilla Public License Version 1.1
  14. @filesource
  15. @license http://www.mozilla.org/MPL/ MPL
  16. */
  17.  
  18.     /**
  19.     * calling connection to database
  20.     */
  21.     include ("../config/head.php");
  22.  
  23.     /**
  24.     * calling authorisation script
  25.     */
  26.     include ("../auth.php");
  27. ?>
  28. <html>
  29.  
  30. <head>
  31. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  32. <title>DNA Module - Data input</title>
  33. <link rel="stylesheet" type="text/css" href="../format.css">
  34. <link rel="stylesheet" type="text/css" href="XSLT/Styles.css">
  35. <SCRIPT LANGUAGE="JavaScript1.1" src="../Functions.js"></SCRIPT>
  36. <NOSCRIPT>Please enable Javascript!</NOSCRIPT>
  37.  
  38. </head>
  39.  
  40. <body onLoad="document.form.formSpecimenNumber.focus();">
  41. <div align="center">
  42. <?php
  43.  
  44.   /**
  45.   * including navigation menu
  46.   */
  47.   include("../tablenavi.php")?>
  48. <form name="form" method="POST" action="input.php">
  49. <table id="tablemain" class="main">
  50.     <tr>
  51.   <td id="tdLogo"><a href="<?php echo $Path_Wiki."/Input_DNA_Data"?>" target="_blank"><img border="0" src="../images/Logo-Wiki.png" height="78"></a></td>
  52.         <td id="tdtitle">
  53.         <h1>DNA Data Input</h1></td>
  54.     <td id="tdLogo2"><?php echo $Path_Logo?></td>
  55.     </tr>
  56.   <tr>
  57.   <td colspan="3"><?php
  58.  
  59.     echo "Logged in as: ";
  60.     $log $_SESSION["log"];
  61.     echo $log;
  62.  
  63.     if(file_exists("../config/loadconfig.php")) 
  64.     /**
  65.     * calling general settings
  66.     */
  67.     include("../config/loadconfig.php")}
  68.     
  69.     ?></td></tr>
  70.  
  71. <?php if (isset($_SESSION['guest']|| $_SESSION['guest']{
  72.     /********************************************************************************************
  73.     * Guests don't have permission for entering new DNA data                                    *
  74.     *********************************************************************************************/
  75. echo "<tr><td colspan='3'><span class='error'>Sorry, as a guest you don't have permission for entering new DNA data! If you want to search for existing DNA data please use the Search function!</span></td></tr>"}
  76.  
  77. else ?>
  78.     
  79.     
  80.     <tr>
  81.         <td colspan="4">
  82.         <table id="table2">
  83.     <tr><td colspan="6"><hr /></td></tr>
  84.     <tr><td colspan="6"><h6>Specimen details (voucher)</h6></td></tr>
  85.         <tr>
  86.                 <td id="DescriptionGreen">
  87.                 Specimen Number/UnitID</td>
  88.                 <td colspan="4">
  89.         <input type="text" id="InputLong" name="formSpecimenNumber" value="<?php
  90.         
  91.         /********************************************************************************************
  92.         * $Validation is defined in script save.php                                             *
  93.         *********************************************************************************************/
  94.         if (isset($_REQUEST['formSubmitClear']or (isset($_REQUEST['formSubmitSave']and $Validation != "FALSE")) {
  95.             unset($_REQUEST['formSpecimenNumber']);
  96.               }
  97.         else echo $_POST['formSpecimenNumber']?>">
  98.                                 </td>
  99.             </tr>
  100.         <tr>
  101.         <td id="DescriptionGreen">
  102.         Specimen database 
  103.         </td>
  104.         <td>
  105.           <?php
  106.           if($formSubmitCarryForward or $formSubmitVerify or ($formSubmitSave and $Validation == "FALSE")) $echoProviderIntern $_POST['formProviderIntern']}
  107.            build_select_listProviderIntern("formProviderIntern",
  108.                       "SELECT ID_Dataset, Display FROM dataset " .
  109.                       "WHERE Internal_External = '1' " .
  110.                       "ORDER BY Display"$echoProviderIntern);       
  111.           ?>
  112.         </td>  
  113.         <td>or: </td>
  114.         <td>
  115.          <?php
  116.          if($formSubmitCarryForward or $formSubmitVerify or ($formSubmitSave and $Validation == "FALSE")) $echoProviderExtern $_POST['formProviderExtern']}
  117.                  build_select_listProviderExtern("formProviderExtern",
  118.                       "SELECT ID_Dataset, Display FROM dataset " .
  119.                       "WHERE Internal_External = '2' " .
  120.                       "ORDER BY Display"$echoProviderExtern);
  121.          ?>
  122.         </td>
  123.                 <td>    
  124.         <input type="submit" id="ButtonSmall" value="Verify" name="formSubmitVerify" onClick="return CheckVerify();">
  125.       </td>
  126.       <td><a href="new_dataset.php" target="_blank"><img src="../images/add.png" title="Add new specimen data provider" /></a></td>
  127.             </tr>
  128.       <tr><td colspan="6">
  129. <?php 
  130.     /**
  131.     * calling script for saving record
  132.     */ 
  133.     include ("save.php")
  134.     /**
  135.     * calling script for getting original specimen data via wrapper
  136.     */
  137.     include ("doQuery.php")
  138.     /**
  139.     * calling script for getting last enteredn DNA number
  140.     */
  141.     include ("../ajax/Ajax.html");
  142.    
  143.  ?>      
  144.       </td></tr>
  145.      <?php
  146.     /**
  147.     * calling form for entering and editing DNA data (scirpt is used for both)
  148.     */
  149.     include("inputdna.php")?>
  150.       
  151.               </td>
  152.     </tr>
  153.   
  154.   <?php }  //access for other than guests 
  155.   ?>
  156. </table>
  157. <?php
  158.     /**
  159.     * including footer
  160.     */
  161.     include("../footer.php")?> 
  162. </form>
  163. </div>
  164. </body>
  165.  
  166. </html>

Documentation generated on Tue, 29 Nov 2011 10:44:51 +0100 by phpDocumentor 1.4.3