>>> Help <<<
|
Changes accepted!"; }
}
if ($formSubmitSaveInstitut)
{
$result14 = "INSERT INTO tableinstitut (University, Division, Address, Postal_Code, City, Country, Homepage, Created_Who) VALUES " .
"('$formInstitut','$formDivision','$formAddress','$formPostal_Code','$formCity','$formCountry','$formHomepage','$log')";
$sql14 = mysql_query($result14);
#######################################Error 14###############################################################
if(!$sql14)
{ $msg = $result14."\n";
$msg .= "####Error 14####";
trigger_error($msg, E_USER_ERROR);
include ("Errorreport.php"); }
#############################################################################################################
else {
echo "Changes accepted!"; }
}
if($formEditPersons)
{
if($_POST['x']=="")
{ unset($x); }
else
{
echo "Back to overview. |
| ";
echo "Title | Forname | Surname | Phone | Email | Institut | ";
foreach ($_POST['x'] as $index)
{
$View = $_POST['formPeople'][$index];
$result1= mysql_query ("SELECT tablepeople.Title, " .
" tablepeople.ID_People, ".
" tablepeople.Forename, " .
" tablepeople.Surname, " .
" tablepeople.Phone, " .
" tablepeople.Email, " .
" tablepeople.ID_Institut, " .
" tableinstitut.University, " .
" tableinstitut.Division, " .
" tableinstitut.Address, " .
" tableinstitut.Postal_Code, " .
" tableinstitut.City, " .
" tableinstitut.Country, " .
" tableinstitut.Homepage " .
"FROM tablepeople " .
"LEFT JOIN tableinstitut ON tablepeople.ID_Institut = tableinstitut.ID_Institut " .
"WHERE tablepeople.ID_People = '$View'");
$resultUniversity = mysql_query("SELECT ID_Institut, University FROM tableinstitut " .
"ORDER BY University");
$result2 = mysql_query("SELECT tablepeople_rank.ID_People, " .
"tablerank.Rank AS Rank " .
"FROM tablepeople_rank, tablerank " .
"WHERE tablerank.ID_Rank = tablepeople_rank.ID_Rank " .
" AND tablepeople_rank.ID_People = '$View'");
while($row = mysql_fetch_object($result1))
{
echo ""." | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo "\n";
mysql_free_result($resultUniversity);
while ($row2 = mysql_fetch_object($result2))
{
if(isset($Rank[$row2->ID_People]))
{$Rank[$row2->ID_People] .= ",";
//$Test123 .= $roww->Rank.$roww->ID_People . ", ";
}
else
{$Rank[$row2->ID_People] = ""; }
$tmp = $row2->Rank;
$Rank[$row2->ID_People] .= $tmp;
$View1 = $Rank[$row2->ID_People];
$array = explode(",", $View1);
$Part1 = $array[0];
$Part2 = $array[1];
$Part3 = $array[2]; }
echo " | ";
echo "";
echo "Internal Staff: Provider: Customer: | ";
echo "Details for ".$row->University.": | ";
if ($row->ID_Institut != 0) { echo "Edit Institut/University details (öffnet in neuem Fenster)"; } else {}
echo " | ";
echo "Division: ",
$row->Division ? $row->Division."" : "?";
echo " Address: ",
$row->Address ? $row->Address."" : "?";
echo " Postal Code: ",
$row->Postal_Code ? $row->Postal_Code."" : "?";
echo " City: ",
$row->City ? $row->City."" : "?";
echo " Country: ",
$row->Country ? $row->Country."" : "?";
echo " Homepage: ",
$row->Homepage ? $row->Homepage."" : "?";
echo " | ";
echo "
| ";
} // while
} //foreach ['x']
echo " | ";
echo "";
} //else
} //if ($formEditPersons)
if (!$formEditPersons)
{
if ($formSubmitEditDataset)
{
$Current_Date = date('Y-m-d H:i:s');
foreach ($_POST['formPeoplehidden'] as $index => $value)
{
// $UpdateID_People = $formPeoplehidden[$index];
$UpdateTitle = $formTitle[$index];
$UpdateForename = $formForename[$index];
$UpdateSurname = $formSurname[$index];
$UpdatePhone = $formPhone[$index];
$UpdateEmail = $formEmail[$index];
$UpdateUniversity = $formUniversity[$index];
$UpdateIntern = $formIntern[$index];
$UpdateProvider = $formProvider[$index];
$UpdateCustomer = $formCustomer[$index];
$result = "UPDATE tablepeople SET Title = '$UpdateTitle', " .
"Forename = '$UpdateForename', " .
"Surname = '$UpdateSurname', " .
"Phone = '$UpdatePhone', " .
"Email = '$UpdateEmail', " .
"ID_Institut = '$UpdateUniversity', " .
"Updated_Who = '$log', " .
"Updated_When = '$Current_Date' " .
"WHERE ID_People = '$value'";
$sql = mysql_query($result);
$result2 = "DELETE FROM tablepeople_rank WHERE ID_People = '$value'";
$sql2 = mysql_query($result2);
#######################################Error 7###############################################################
if(!$sql2)
{ $msg = $result2."\n";
$msg .= "####Error 7####";
trigger_error($msg, E_USER_ERROR);
include ("Errorreport.php"); }
#############################################################################################################
if($UpdateIntern == 'intern')
{
$result3 = "INSERT INTO tablepeople_rank (ID_Rank, ID_People, Created_Who) VALUES (1,'$value','$log')";
$sql3 = mysql_query($result3);
#######################################Error 8###############################################################
if(!$sql3)
{ $msg = $result3."\n";
$msg .= "####Error 8####";
trigger_error($msg, E_USER_ERROR);
include ("Errorreport.php"); }
#############################################################################################################
}
if($UpdateProvider == 'provider')
{
$result4 = "INSERT INTO tablepeople_rank (ID_Rank, ID_People, Created_Who) VALUES (2,'$value','$log')";
$sql4 = mysql_query($result4);
#######################################Error 9###############################################################
if(!$sql4)
{ $msg = $result4."\n";
$msg .= "####Error 9####";
trigger_error($msg, E_USER_ERROR);
include ("Errorreport.php"); }
#############################################################################################################
}
if($UpdateCustomer == 'customer')
{
$result5 = "INSERT INTO tablepeople_rank (ID_Rank, ID_People, Created_Who) VALUES (3,'$value','$log')";
$sql5 = mysql_query($result5);
#######################################Error 10###############################################################
if(!$sql5)
{ $msg = $result5."\n";
$msg .= "####Error 10####";
trigger_error($msg, E_USER_ERROR);
include ("Errorreport.php"); }
#############################################################################################################
}
}
#######################################Error 6###############################################################
if(!$sql)
{ $msg = $result."\n";
$msg .= "####Error 6####";
trigger_error($msg, E_USER_ERROR);
include ("Errorreport.php"); }
#############################################################################################################
else {
echo "Changes accepted!"; }
}
?>
| In der Tabelle sind alle gefundenen Personen mit ihren Rängen nach "Nachname" sortiert aufgelistet. Bitte prüfen Sie zuerst, ob die gesuchte Person schon in der Liste steht und nur der Rang geändert werden muss oder ob Sie sie neu hinzufügen müssen. Sie können auch die sonstigen Angaben zu den Personen editieren. Bitte markieren Sie alle zu ändernden Personen und klicken auf "Edit Persons". |
Erläuterungen: | "Internal Staff" - erscheint in "Extraction Staff" und "Amplification Staff"
"Provider" - erscheint in "DNA sample provided by"
"Customer" - erscheint in "Requests" (nur in Suchmaske und Suchausgabe sichtbar, nicht in der Eingabemaske) |
| Edit | Title | Forename | Surname | Phone | Email | Institut | Rank | ";
$gesamt = mysql_num_rows($result1);
for ($i=1; $i<=$gesamt; $i++) {
$row=mysql_fetch_array($result1);
$people[] = $row['ID_People'];
foreach ($people as $Test)
{
$result2 = mysql_query("SELECT tablepeople.ID_People, " .
"tablerank.Rank AS Rank " .
"FROM tablepeople_rank, tablepeople, tablerank " .
"WHERE tablerank.ID_Rank = tablepeople_rank.ID_Rank " .
" AND tablepeople_rank.ID_People = tablepeople.ID_People " .
" AND tablepeople.ID_People = '$Test' " .
"ORDER BY tablepeople.Surname");
while ($roww = mysql_fetch_object($result2))
{
if(isset($Rank[$roww->ID_People]))
{$Rank[$roww->ID_People] .= ", ";
//$Test123 .= $roww->Rank.$roww->ID_People . ", ";
}
else
{$Rank[$roww->ID_People] .= ""; }
$tmp = $roww->Rank;
$Rank[$roww->ID_People] .= $tmp;
$View = $Rank[$roww->ID_People]; }}
echo " | ".$row['Title']." | ".$row['Forename']." | ".$row['Surname']." | ".$row['Phone']." | ".$row['Email']." | ".$row['University']." | ".$View." | ";
}
echo " ";
?>
|