Please select a Specimen Database!";} else { if(!empty($formProviderIntern) and !empty($formProviderExtern)) { echo 'Please select either an "Internal" or "External" Specimen database!'; } else { if(!empty($formProviderIntern)) { $sql = mysql_query ("SELECT tabledataset.ID_Dataset AS ID_Dataset, " . " tableschema.QueryPart1 AS QueryPart1, " . " tableschema.QueryPart1_1 AS QueryPart1_1, " . " tableschema.QueryPart1_2 AS QueryPart1_2, " . " tableschema.QueryPart2 AS QueryPart2, " . " tableschema.QueryPart3 AS QueryPart3, " . " tableschema.QueryPart4 AS QueryPart4, " . " tabledataset.Digir_Resource AS Digir_Resource, " . " tabledataset.Digir_Source AS Digir_Source, " . " tableprovider.Provider AS Provider, " . " tableprovider.ID_Schema AS ID_Schema " . " FROM tabledataset " . " LEFT JOIN tableprovider ON tabledataset.ID_Provider = tableprovider.ID_Provider " . " LEFT JOIN tableschema ON tableprovider.ID_Schema = tableschema.ID_Schema " . " WHERE tabledataset.ID_Dataset = '$formProviderIntern'"); } if(!empty($formProviderExtern)) { $sql = mysql_query ("SELECT tabledataset.ID_Dataset AS ID_Dataset, " . " tableschema.QueryPart1 AS QueryPart1, " . " tableschema.QueryPart1_1 AS QueryPart1_1, " . " tableschema.QueryPart1_2 AS QueryPart1_2, " . " tableschema.QueryPart2 AS QueryPart2, " . " tableschema.QueryPart3 AS QueryPart3, " . " tableschema.QueryPart4 AS QueryPart4, " . " tabledataset.Digir_Resource AS Digir_Resource, " . " tabledataset.Digir_Source AS Digir_Source, " . " tableprovider.Provider AS Provider, " . " tableprovider.ID_Schema AS ID_Schema " . " FROM tabledataset " . " LEFT JOIN tableprovider ON tabledataset.ID_Provider = tableprovider.ID_Provider " . " LEFT JOIN tableschema ON tableprovider.ID_Schema = tableschema.ID_Schema " . " WHERE tabledataset.ID_Dataset = '$formProviderExtern'"); } while($row = mysql_fetch_object($sql)) { $ID_Dataset = $row->ID_Dataset; $Provider = $row->Provider; $QueryPart1 = $row->QueryPart1; $QueryPart1_1 = $row->QueryPart1_1; $QueryPart1_2 = $row->QueryPart1_2; $QueryPart2 = $row->QueryPart2; $QueryPart3 = $row->QueryPart3; $QueryPart4 = $row->QueryPart4; $Digir_Resource = $row->Digir_Resource; $Digir_Source = $row->Digir_Source; $ID_Schema = $row->ID_Schema; } $Digir_Resource1 = urlencode($Digir_Resource); $Digir_Source1 = urlencode($Digir_Source); if($ID_Dataset == '1') { include ("offline.php"); } else { $file = $Provider.$QueryPart1.$Digir_Resource1.$QueryPart1_1.$Digir_Source1.$QueryPart1_2.$SpecimenNumber.$QueryPart2; //echo $file."
"; include ("verify.php"); } } } } } $variable1 = $_POST[formUnitID]; $variable2 = $_POST[formSourceInstitutionID]; $variable3 = $_POST[formSourceID]; $variable4 = $_POST[formProviderExtern]; $variable5 = $_POST[formTest]; $variable6 = $_POST[formProviderIntern]; if($variable5 != "" and !$formSubmitVerify and !$formSubmitSave) { $mykey = key($variable5); if(isset($_REQUEST['NoSpecimenAvailable'])) { include ("offline.php"); } else { if(!empty($variable4)) { $sql = mysql_query ("SELECT tabledataset.ID_Dataset AS ID_Dataset, " . " tableschema.QueryPart1b AS QueryPart1b, " . " tableschema.QueryPart1_1 AS QueryPart1_1, " . " tableschema.QueryPart1_2b AS QueryPart1_2b, " . " tableschema.QueryPart2 AS QueryPart2, " . " tableschema.QueryPart3 AS QueryPart3, " . " tableschema.QueryPart4 AS QueryPart4, " . " tableschema.QueryPart5 AS QueryPart5, " . " tableprovider.Provider AS Provider, " . " tabledataset.Digir_Resource AS Digir_Resource, " . " tabledataset.Digir_Source AS Digir_Source, " . " tableprovider.Provider AS Provider, " . " tableprovider.ID_Schema AS ID_Schema " . " FROM tabledataset " . " LEFT JOIN tableprovider ON tabledataset.ID_Provider = tableprovider.ID_Provider " . " LEFT JOIN tableschema ON tableprovider.ID_Schema = tableschema.ID_Schema " . " WHERE tabledataset.ID_Dataset = '$variable4'"); } if(!empty($variable6)) { $sql = mysql_query ("SELECT tabledataset.ID_Dataset AS ID_Dataset, " . " tableschema.QueryPart1b AS QueryPart1b, " . " tableschema.QueryPart1_1 AS QueryPart1_1, " . " tableschema.QueryPart1_2b AS QueryPart1_2b, " . " tableschema.QueryPart2 AS QueryPart2, " . " tableschema.QueryPart3 AS QueryPart3, " . " tableschema.QueryPart4 AS QueryPart4, " . " tableschema.QueryPart5 AS QueryPart5, " . " tableprovider.Provider AS Provider, " . " tabledataset.Digir_Resource AS Digir_Resource, " . " tabledataset.Digir_Source AS Digir_Source, " . " tableprovider.Provider AS Provider, " . " tableprovider.ID_Schema AS ID_Schema " . " FROM tabledataset " . " LEFT JOIN tableprovider ON tabledataset.ID_Provider = tableprovider.ID_Provider " . " LEFT JOIN tableschema ON tableprovider.ID_Schema = tableschema.ID_Schema " . " WHERE tabledataset.ID_Dataset = '$variable6'"); } while($row = mysql_fetch_object($sql)) { $ID_Dataset = $row->ID_Dataset; $Provider = $row->Provider; $QueryPart1b = $row->QueryPart1b; $QueryPart1_1 = $row->QueryPart1_1; $QueryPart1_2b = $row->QueryPart1_2b; $QueryPart2 = $row->QueryPart2; $QueryPart3 = $row->QueryPart3; $QueryPart4 = $row->QueryPart4; $QueryPart5 = $row->QueryPart5; $Digir_Resource = $row->Digir_Resource; $Digir_Source = $row->Digir_Source; $ID_Schema = $row->ID_Schema; } $SourceUnitID = urlencode($variable1[$mykey]); $SourceInstitutionCode = urlencode($variable2[$mykey]); $SourceCode = urlencode($variable3[$mykey]); $Digir_Resource1 = urlencode($Digir_Resource); $Digir_Source1 = urlencode($Digir_Source); if($ID_Dataset == '1') { include ("offline.php"); } else { $file = $Provider.$QueryPart1b.$Digir_Resource1.$QueryPart1_1.$Digir_Source1.$QueryPart1_2b.$SourceUnitID.$QueryPart3.$SourceInstitutionCode.$QueryPart4.$SourceCode.$QueryPart5; //echo $file; include ("verify.php"); } } } ?>