mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
This commit is contained in:
@@ -12,9 +12,6 @@ include('../../vilesci/config.inc.php');
|
||||
$conn=pg_connect(CONN_STRING) or die("Connection zur Portal Datenbank fehlgeschlagen");
|
||||
$conn_fas=pg_connect(CONN_STRING_FAS) or die("Connection zur FAS Datenbank fehlgeschlagen");
|
||||
|
||||
$adress='ruhan@technikum-wien.at';
|
||||
//$adress='fas_sync@technikum-wien.at';
|
||||
|
||||
$error_log='';
|
||||
$text = '';
|
||||
$anzahl_quelle=0;
|
||||
@@ -23,10 +20,10 @@ $anzahl_fehler=0;
|
||||
$i=0;
|
||||
$k=0;
|
||||
$qry1='';
|
||||
$zweitbetreuer='';
|
||||
$combobox[]="";
|
||||
$valuebox[]="";
|
||||
$nachname[]="";
|
||||
$zweitbetreuer='';
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
@@ -73,7 +70,7 @@ if(isset($_POST['da']))
|
||||
}
|
||||
if(isset($_POST['top5']) AND trim($_POST['top5'])!='')
|
||||
{
|
||||
$qry1= "UPDATE diplomarbeit SET vilesci_vorsitzdender='".$_POST['top5']."' WHERE diplomarbeit_pk='".$_POST['da']."';";
|
||||
$qry1= "UPDATE diplomarbeit SET vilesci_vorsitzender='".$_POST['top5']."' WHERE diplomarbeit_pk='".$_POST['da']."';";
|
||||
}
|
||||
if(isset($_POST['top6']) AND trim($_POST['top6'])!='')
|
||||
{
|
||||
@@ -86,18 +83,11 @@ if(isset($_POST['da']))
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
/*$qryvilesci="SELECT titelpre, nachname, vorname, titelpost, person_id FROM public.tbl_person WHERE person_id NOT IN (
|
||||
SELECT person_id FROM public.tbl_prestudent)
|
||||
AND trim(nachname)!='Account' AND trim(nachname)!='Lektor' AND trim(vorname)!='Lektor'
|
||||
ORDER BY nachname;";*/
|
||||
|
||||
$qryvilesci="SELECT titelpre, nachname, vorname, titelpost, person_id FROM public.tbl_person WHERE
|
||||
(person_id IN (SELECT person_id FROM public.tbl_benutzer, public.tbl_mitarbeiter WHERE public.tbl_benutzer.uid=public.tbl_mitarbeiter.mitarbeiter_uid)
|
||||
OR trim(updatevon)='Administrator')
|
||||
AND trim(nachname)!='Account' AND trim(nachname)!='Lektor' AND trim(vorname)!='Lektor'
|
||||
ORDER BY nachname;";
|
||||
//AND public.tbl_mitarbeiter.lektor=TRUE
|
||||
|
||||
if($resultvilesci = pg_query($conn, $qryvilesci))
|
||||
{
|
||||
while($rowvilesci = pg_fetch_object($resultvilesci))
|
||||
@@ -108,10 +98,10 @@ if($resultvilesci = pg_query($conn, $qryvilesci))
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
echo "<table class='liste'><tr><th></th><th>FAS</th><th>Vilesci</th><th></th></tr>";
|
||||
|
||||
$qry="SELECT * FROM diplomarbeit
|
||||
WHERE
|
||||
$qry="SELECT * FROM diplomarbeit WHERE
|
||||
((vilesci_zweitbegutachter IS NULL AND trim(zweitbegutachter)!='') OR
|
||||
(vilesci_betreuer IS NULL AND trim(betreuer)!='') OR
|
||||
(vilesci_firmenbetreuer IS NULL AND trim(firmenbetreuer)!='') OR
|
||||
@@ -121,15 +111,17 @@ $qry="SELECT * FROM diplomarbeit
|
||||
ORDER BY diplomarbeit_pk
|
||||
LIMIT 10;";
|
||||
|
||||
|
||||
|
||||
|
||||
if($result = pg_query($conn_fas, $qry))
|
||||
{
|
||||
while($row = pg_fetch_object($result))
|
||||
{
|
||||
$qryselect="SELECT trim(substring(trim(zweitbegutachter) from ' [A-ü]*$')) as zweit, trim(substring(trim(betreuer) from ' [A-ü]*$')) as dritt,
|
||||
trim(substring(trim(firmenbetreuer) from ' [A-ü]*$')) as viert, trim(substring(trim(pruefer) from ' [A-ü]*$')) as fuenft,
|
||||
trim(substring(trim(vorsitzender) from ' [A-ü]*$')) as sechst, trim(substring(trim(pruefer1) from ' [A-ü]*$')) as siebent
|
||||
FROM diplomarbeit WHERE diplomarbeit_pk='".$row->diplomarbeit_pk."';";
|
||||
$resultselect = pg_query($conn_fas, $qryselect);
|
||||
$rowselect = pg_fetch_object($resultselect);
|
||||
|
||||
|
||||
$k++;
|
||||
if($row->vilesci_zweitbegutachter=='' AND $row->zweitbegutachter!='')
|
||||
{
|
||||
@@ -139,17 +131,13 @@ if($result = pg_query($conn_fas, $qry))
|
||||
echo "<td>'".$row->zweitbegutachter."'";
|
||||
echo "<input type='hidden' name='da' value='".$row->diplomarbeit_pk."'>";
|
||||
echo "</td>";
|
||||
$qryselect="SELECT trim(substring(zweitbegutachter from ' [A-ü]*$')) as zweit
|
||||
FROM diplomarbeit WHERE diplomarbeit_pk='".$row->diplomarbeit_pk."';";
|
||||
$resultselect = pg_query($conn_fas, $qryselect);
|
||||
$rowselect = pg_fetch_object($resultselect);
|
||||
echo "<td><select name=\"top1\">";
|
||||
echo"<option value=\"\"></option>";
|
||||
for($j=0;$j<$i;$j++)
|
||||
{
|
||||
if($nachname[$j]==$rowselect->zweit)
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected>".$combobox[$j]."</option>";
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected=\"selected\">".$combobox[$j]."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -158,7 +146,6 @@ if($result = pg_query($conn_fas, $qry))
|
||||
}
|
||||
echo"</select>";
|
||||
echo "</td>";
|
||||
//echo "<td>'".$row->diplomarbeit_pk."'</td>";
|
||||
echo "<td><input type='submit' value='Speichern'></td>";
|
||||
echo "</form>";
|
||||
echo "</tr>";
|
||||
@@ -171,24 +158,19 @@ if($result = pg_query($conn_fas, $qry))
|
||||
echo "<td>'".$row->betreuer."'";
|
||||
echo "<input type='hidden' name='da' value='".$row->diplomarbeit_pk."'>";
|
||||
echo "</td>";
|
||||
$qryselect="SELECT trim(substring(betreuer from ' [A-ü]*$')) as zweit
|
||||
FROM diplomarbeit WHERE diplomarbeit_pk='".$row->diplomarbeit_pk."';";
|
||||
$resultselect = pg_query($conn_fas, $qryselect);
|
||||
$rowselect = pg_fetch_object($resultselect);
|
||||
echo "<td><select name=\"top2\">";
|
||||
echo"<option value=\"\"></option>";
|
||||
for($j=0;$j<$i;$j++)
|
||||
{
|
||||
if($nachname[$j]==$rowselect->zweit)
|
||||
if($nachname[$j]==$rowselect->dritt)
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected>".$combobox[$j]."</option>";
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected=\"selected\">".$combobox[$j]."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\">".$combobox[$j]."</option>";
|
||||
}
|
||||
}
|
||||
//<option value=\"".$row->firma_id."\" ".($row->firma_id==$firma_id?'selected':'')." >".$firma."</option>
|
||||
}
|
||||
echo"</select>";
|
||||
echo "</td>";
|
||||
echo "<td><input type='submit' value='Speichern'></td>";
|
||||
@@ -203,29 +185,24 @@ if($result = pg_query($conn_fas, $qry))
|
||||
echo "<td>'".$row->firmenbetreuer."'";
|
||||
echo "<input type='hidden' name='da' value='".$row->diplomarbeit_pk."'>";
|
||||
echo "</td>";
|
||||
$qryselect="SELECT trim(substring(firmenbetreuer from ' [A-ü]*$')) as zweit
|
||||
FROM diplomarbeit WHERE diplomarbeit_pk='".$row->diplomarbeit_pk."';";
|
||||
$resultselect = pg_query($conn_fas, $qryselect);
|
||||
$rowselect = pg_fetch_object($resultselect);
|
||||
echo "<td><select name=\"top3\">";
|
||||
echo"<option value=\"\"></option>";
|
||||
for($j=0;$j<$i;$j++)
|
||||
{
|
||||
if($nachname[$j]==$rowselect->zweit)
|
||||
if($nachname[$j]==$rowselect->viert)
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected>".$combobox[$j]."</option>";
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected=\"selected\">".$combobox[$j]."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\">".$combobox[$j]."</option>";
|
||||
}
|
||||
}
|
||||
//<option value=\"".$row->firma_id."\" ".($row->firma_id==$firma_id?'selected':'')." >".$firma."</option>
|
||||
}
|
||||
echo"</select>";
|
||||
echo "</td>";
|
||||
echo "<td><input type='submit' value='Speichern'></td>";
|
||||
echo "</tr>";
|
||||
echo "</form>";
|
||||
echo "</tr>";
|
||||
}
|
||||
if(($row->vilesci_pruefer=='' OR $row->vilesci_pruefer==NULL) AND trim($row->pruefer)!='')
|
||||
{
|
||||
@@ -235,29 +212,24 @@ if($result = pg_query($conn_fas, $qry))
|
||||
echo "<td>'".$row->pruefer."'";
|
||||
echo "<input type='hidden' name='da' value='".$row->diplomarbeit_pk."'>";
|
||||
echo "</td>";
|
||||
$qryselect="SELECT trim(substring(pruefer from ' [A-ü]*$')) as zweit
|
||||
FROM diplomarbeit WHERE diplomarbeit_pk='".$row->diplomarbeit_pk."';";
|
||||
$resultselect = pg_query($conn_fas, $qryselect);
|
||||
$rowselect = pg_fetch_object($resultselect);
|
||||
echo "<td><select name=\"top4\">";
|
||||
echo"<option value=\"\"></option>";
|
||||
for($j=0;$j<$i;$j++)
|
||||
{
|
||||
if($nachname[$j]==$rowselect->zweit)
|
||||
if($nachname[$j]==$rowselect->fuenft)
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected>".$combobox[$j]."</option>";
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected=\"selected\">".$combobox[$j]."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\">".$combobox[$j]."</option>";
|
||||
}
|
||||
}
|
||||
//<option value=\"".$row->firma_id."\" ".($row->firma_id==$firma_id?'selected':'')." >".$firma."</option>
|
||||
}
|
||||
echo"</select>";
|
||||
echo "</td>";
|
||||
echo "<td><input type='submit' value='Speichern'></td>";
|
||||
echo "</tr>";
|
||||
echo "</form>";
|
||||
echo "</tr>";
|
||||
}
|
||||
if(($row->vilesci_vorsitzender=='' OR $row->vilesci_vorsitzender==NULL) AND trim($row->vorsitzender)!='')
|
||||
{
|
||||
@@ -267,29 +239,25 @@ if($result = pg_query($conn_fas, $qry))
|
||||
echo "<td>'".$row->vorsitzender."'";
|
||||
echo "<input type='hidden' name='da' value='".$row->diplomarbeit_pk."'>";
|
||||
echo "</td>";
|
||||
$qryselect="SELECT trim(substring(vorsitzender from ' [A-ü]*$')) as zweit
|
||||
FROM diplomarbeit WHERE diplomarbeit_pk='".$row->diplomarbeit_pk."';";
|
||||
$resultselect = pg_query($conn_fas, $qryselect);
|
||||
$rowselect = pg_fetch_object($resultselect);
|
||||
echo "<td><select name=\"top5\">";
|
||||
echo"<option value=\"\"></option>";
|
||||
for($j=0;$j<$i;$j++)
|
||||
{
|
||||
if($nachname[$j]==$rowselect->zweit)
|
||||
if($nachname[$j]==$rowselect->sechst)
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected>".$combobox[$j]."</option>";
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected=\"selected\">".$combobox[$j]."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\">".$combobox[$j]."</option>";
|
||||
}
|
||||
}
|
||||
//<option value=\"".$row->firma_id."\" ".($row->firma_id==$firma_id?'selected':'')." >".$firma."</option>
|
||||
echo"</select>";
|
||||
echo "</td>";
|
||||
echo "<td><input type='submit' value='Speichern'></td>";
|
||||
echo "</tr>";
|
||||
echo "<td></td>";
|
||||
echo "</form>";
|
||||
echo "</tr>";
|
||||
}
|
||||
if(($row->vilesci_pruefer1=='' OR $row->vilesci_pruefer1==NULL) AND trim($row->pruefer1)!='')
|
||||
{
|
||||
@@ -299,29 +267,25 @@ if($result = pg_query($conn_fas, $qry))
|
||||
echo "<td>'".$row->pruefer1."'";
|
||||
echo "<input type='hidden' name='da' value='".$row->diplomarbeit_pk."'>";
|
||||
echo "</td>";
|
||||
$qryselect="SELECT trim(substring(pruefer1 from ' [A-ü]*$')) as zweit
|
||||
FROM diplomarbeit WHERE diplomarbeit_pk='".$row->diplomarbeit_pk."';";
|
||||
$resultselect = pg_query($conn_fas, $qryselect);
|
||||
$rowselect = pg_fetch_object($resultselect);
|
||||
echo "<td><select name=\"top6\">";
|
||||
echo"<option value=\"\"></option>";
|
||||
for($j=0;$j<$i;$j++)
|
||||
{
|
||||
if($nachname[$j]==$rowselect->zweit)
|
||||
if($nachname[$j]==$rowselect->siebent)
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected>".$combobox[$j]."</option>";
|
||||
echo"<option value=\"".$valuebox[$j]."\" selected=\"selected\">".$combobox[$j]."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo"<option value=\"".$valuebox[$j]."\">".$combobox[$j]."</option>";
|
||||
}
|
||||
}
|
||||
//<option value=\"".$row->firma_id."\" ".($row->firma_id==$firma_id?'selected':'')." >".$firma."</option>
|
||||
}
|
||||
echo"</select>";
|
||||
echo "</td>";
|
||||
echo "<td><input type='submit' value='Speichern'></td>";
|
||||
echo "</tr>";
|
||||
echo "<td></td>";
|
||||
echo "</form>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user