Please enable Javascript!

Main Menu

"; } else { ?>
Sorry, you don't have permission for this site! If you want to search for existing DNA data please use the Search function!
Please select an aliquot!"; } else { foreach ($_POST['x'] as $index => $check) { if(isset($check)) { $IDRequestTest = $_POST['IDRequest'][$index]; $IDAliquotsTest = $_POST['IDAliquots'][$index]; $ShippingVolume = $_POST['Rest'][$index]; $NotesTest = $_POST['Notes'][$index]; $AgreementTest = $_POST['formAgreement'][$index]; $RequestDate = $_POST['Request'][$index]; $ShippingDate = $_POST['Ship_Date'][$index]; if(!isset($AgreementTest)) {echo "Please check the MTA box!";} else{ if($formAction == '1') { $sql1 = "SELECT ID_Aliquots, Rest_Quantity FROM aliquots WHERE ID_Aliquots = '$IDAliquotsTest'"; $result1 = mysqli_query($GLOBALS["___mysqli_ston"], $sql1); #######################################Error 1############################################################### if(!$result1) { $msg = $sql1."\n"; $msg .= "####Error 1####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); } ############################################################################################################# while($row = mysqli_fetch_object($result1)) { $Rest_Quantity = $row->Rest_Quantity; } $RestNew = $Rest_Quantity + $RestTest; $sql2 = "UPDATE aliquots SET Rest_Quantity = '$RestNew' WHERE ID_Aliquots = '$IDAliquotsTest'"; $result2 = mysqli_query($GLOBALS["___mysqli_ston"], $sql2); #######################################Error 2############################################################### if(!$result2) { $msg = $sql2."\n"; $msg .= "####Error 2####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); } ############################################################################################################# if($result1 and $result2) { $sql3 = "DELETE FROM request WHERE ID_Request = '$IDRequestTest'"; $result3 = mysqli_query($GLOBALS["___mysqli_ston"], $sql3); } #######################################Error 3############################################################### if(!$result3) { $msg = $sql3."\n"; $msg .= "####Error 3####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); } ############################################################################################################# if($result3) { echo "Orders have been deleted!"; } } if($formAction == '2') { if($ShippingDate > '0000-00-00 00:00:00' and $ShippingDate < $RequestDate) { echo "Shipping Date is older than Order Date!"; } else { $sql4 = "SELECT request.ID_Request, aliquots.ID_Aliquots, aliquots.Order_All, aliquots.Order_Partial, aliquots.Order_Rest, aliquots.Shipping_All, aliquots.Shipping_Partial, aliquots.Shipping_Rest FROM request LEFT JOIN aliquots ON request.FK_Aliquots = aliquots.ID_Aliquots WHERE request.ID_Request = '$IDRequestTest'"; $result4 = mysqli_query($GLOBALS["___mysqli_ston"], $sql4); while($row = mysqli_fetch_object($result4)) { $Order_All = $row->Order_All; $Order_Partial = $row->Order_Partial; $Order_Rest = $row->Order_Rest; $Shipping_All = $row->Shipping_All; $Shipping_Partial = $row->Shipping_Partial; $Shipping_Rest = $row->Shipping_Rest; $ID_Aliquots = $row->ID_Aliquots; } if($Order_All == 'Yes') { $OrderAll = ''; $ShipAll = 'Yes'; } if($Order_Partial == 'Yes') { $OrderPartial = ''; $ShipPartial = 'Yes'; } if($Order_Rest == 'Yes') { $OrderRest = ''; $ShipRest = 'Yes'; } $sql6 = "UPDATE request SET Request_Date = '$RequestDate', Shipping_Date = '$ShippingDate', Request_Notes = '$NotesTest', Request_Volume = '$ShippingVolume', Agreement = '$AgreementTest' WHERE ID_Request = '$IDRequestTest'"; $result6 = mysqli_query($GLOBALS["___mysqli_ston"], $sql6); $sql6a = "UPDATE aliquots SET Order_All = '$OrderAll', Order_Partial = '$OrderPartial', Order_Rest = '$OrderRest', Shipping_All = '$ShipAll', Shipping_Partial = '$ShipPartial', Shipping_Rest = '$ShipRest' WHERE ID_Aliquots = '$ID_Aliquots'"; $result6a = mysqli_query($GLOBALS["___mysqli_ston"], $sql6a); #######################################Error 6############################################################### if(!$result6) { $msg = $sql6."\n"; $msg .= "####Error 6####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); } ############################################################################################################# } } } } }} } ?> "; echo ""; //echo ""; } echo ""; echo ""; } ?>

If you want to add a new order please use this form.

Customer
DNA Extraction Numbers
Order Status outstanding > already shipped > show all >
Order date from " /> to" />
Shipping date from " /> to" />

="; $st = "<="; $parr = $_POST; array($parr); foreach ($parr as $var) { $i ++; if(!empty($var) and $var!="YYYY-MM-DD" and $var!="Check Data" and $var!="Action") { switch (key($parr)) { case 'formCustomer': $str = "request.FK_People ".$tr."'".$var."' AND "; $description = " Customer = "; $value = "hallo"; break; case 'formDnaBankNumber': $str = "dnabanknumbers.Dna_Bank_Number ".$tr."'".$var."' AND "; $description = " DNA Extraction Numer = "; $value = $formDnaBankNumber; break; case 'formOrderDateFrom': if ($formOrderDateFrom!="") { $str = "request.Request_Date ".$bt."'".$formOrderDateFrom."' AND "; $description = " Order Date >= "; if($_POST['formOrderDateFrom']) {$value = $formOrderDateFrom;} } break; case 'formOrderDateTo': if ($formOrderDateTo!="") { $str = "request.Request_Date ".$st."'".$formOrderDateTo."' AND "; $description = " Order Date <= "; if($_POST['formOrderDateTo']) {$value = $formOrderDateTo;} } break; case 'formShippingDateFrom': if ($formShippingDateFrom!="") { $str = "request.Shipping_Date ".$bt."'".$formShippingDateFrom."' AND "; $description = " Shipping Date >= "; if($_POST['formShippingDateFrom']) {$value = $formShippingDateFrom;} } break; case 'formShippingDateTo': if ($formShippingDateTo!="") { $str = "request.Shipping_Date ".$st."'".$formShippingDateTo."' AND "; $description = " Shipping Date <= "; if($_POST['formShippingDateTo']) {$value = $formShippingDateTo;} } break; case 'radioStatus': $description = " Order Status = "; if($radioStatus=="order") { $str = "(aliquots.Shipping_Partial ".$no."'Yes' AND "; $str .= "aliquots.Shipping_All ".$no."'Yes') AND "; $value = "outstanding orders"; } if($radioStatus=="shipping") { $str = "(aliquots.Shipping_Partial ".$tr."'Yes' OR "; $str .= "aliquots.Shipping_All ".$tr."'Yes') AND "; $value = "already shipped orders"; } if($radioStatus=="all") { $str = "(aliquots.Shipping_Partial ".$tr."'Yes' OR "; $str .= "aliquots.Shipping_All ".$tr."'Yes' OR "; $str .= "aliquots.Order_Partial ".$tr."'Yes' OR "; $str .= "aliquots.Order_All ".$tr."'Yes') AND "; $value = "all orders"; } break; } $where[$i] = $str; $descriptionall[$i] = $description; $valueall[$i] = $value; } next($parr); } if(empty($str)) { echo ""; echo "
No search key entered.
New Search.
"; } else { foreach($where AS $a) $string .= $a; $l=strlen ($string); $max = $l-4; $where_str = substr($string, 0, $max); $wherestr = ' WHERE ' . $where_str; $sql = "SELECT DISTINCT request.ID_Request, " . "request.FK_Aliquots, " . "dnabanknumbers.Dna_Bank_Number, " . "request.Request_Number_Aliquots, " . "aliquots.Shipping_All, " . "aliquots.Shipping_Partial, " . "aliquots.Shipping_Rest, " . "aliquots.Order_All, " . "aliquots.Order_Partial, " . "aliquots.Order_Rest, " . "aliquots.Aliquot_Barcode, " . "aliquots.Aliquot_Position, " . "aliquots_box.Aliquots_Box, " . "aliquots_rack.Aliquots_Rack, " . "aliquots_fridge.Aliquots_Fridge, " . "request.Request_Date, " . "request.Request_Volume, " . "request.Request_Notes, " . "request.Shipping_Date, " . "request.PriceAndCurrency, " . "request.Agreement, " . "request.Created_When, " . "request.Created_Who, " . "people.Name_All " . "FROM request LEFT JOIN aliquots ON request.FK_Aliquots = aliquots.ID_Aliquots LEFT JOIN dnabanknumbers ON request.FK_DNA = dnabanknumbers.ID_DNA LEFT JOIN aliquots_box ON aliquots.FK_Aliquots_Box = aliquots_box.ID_Aliquots_Box LEFT JOIN aliquots_rack ON aliquots.FK_Aliquots_Rack = aliquots_rack.ID_Aliquots_Rack LEFT JOIN aliquots_fridge ON aliquots.FK_Aliquots_Fridge = aliquots_fridge.ID_Aliquots_Fridge LEFT JOIN people ON request.FK_People = people.ID_People " . $wherestr.$sqllimit; $result = mysqli_query($GLOBALS["___mysqli_ston"], $sql); $sum = mysqli_num_rows($result); if(!mysqli_num_rows($result)) { echo "No hits found."; } else { echo ""; for ($i=1; $i<=$sum; $i++) { $row=mysqli_fetch_array($result); $Name_All = $row['Name_All']; $DnaBankNumber = $row['Dna_Bank_Number']; $Aliquot_Number = $row['Request_Number_Aliquots']; $Request_Volume = $row['Request_Volume']; $Box = $row['Aliquots_Box']; $Rack = $row['Aliquots_Rack']; $Fridge = $row['Aliquots_Fridge']; $Barcode = $row['Aliquot_Barcode']; $Position = $row['Aliquot_Position']; $OrderAll = $row['Order_All']; $OrderPartial = $row['Order_Partial']; $OrderRest = $row['Order_Rest']; $ShippingAll = $row['Shipping_All']; $ShippingPartial = $row['Shipping_Partial']; $ShippingRest = $row['Shipping_Rest']; $Request_Date = $row['Request_Date']; $Request_Notes = $row['Request_Notes']; $Shipping_Date = $row['Shipping_Date']; $Agreement = $row['Agreement']; $ID_Request = $row['ID_Request']; $ID_Aliquots = $row['ID_Aliquots']; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
SelectCustomerDNA NoAliquot NoShipping volumeFridgeRackBoxOrder DateMTAShipping DateNotesOrder-StatusShipping-Status
"; echo ""; echo "".$Name_All."".$DnaBankNumber."".$Aliquot_Number." µl".$Fridge."".$Rack."".$Box.""; echo ""; if($Agreement != 'Yes' and $Shipping_Date == '0000-00-00 00:00:00') { echo "MTA!"; } if($Aliquot_Number == 'No Aliquot made') {echo "".$OrderAll."";} echo ""; echo ""; echo ""; if($OrderAll == "Yes") { echo "Complete Aliquot ordered"; } if($OrderPartial == "Yes") { echo "Part of Aliquot ordered"; } if($OrderRest == "Yes") { echo "Rest of Aliquot ordered"; } echo ""; if($ShippingAll == "Yes") { echo "Complete Aliquot shipped";} if($ShippingPartial == "Yes") { echo "Part of Aliquot shipped"; } if($ShippingRest == "Yes") { echo "Rest of Aliquot shipped"; } if($ShippingAll == "" and $ShippingPartial == "" and $ShippingRest == "") { echo "Not shipped yet"; } echo "

Print Preview

Action