mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Cleanup Script an Replace addslashes
This commit is contained in:
@@ -20,11 +20,9 @@
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ermoeglicht das Anmelden zu Freifaechern
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/basis_db.class.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
@@ -33,20 +31,19 @@ require_once('../../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
$db=false;
|
||||
$db = false;
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
$user = get_uid();
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<title><?php echo $p->t('freifach/freifaecherAnmeldungsuebersicht');?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<title><?php echo $p->t('freifach/freifaecherAnmeldungsuebersicht');?></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><?php echo $p->t('freifach/freifaecherAnmeldungsuebersicht');?></h1>
|
||||
<?php echo $p->t('freifach/bitteFreifachAuswaehlen');?>
|
||||
@@ -59,21 +56,21 @@ $stsem_obj = new studiensemester();
|
||||
$stsem = $stsem_obj->getaktorNext();
|
||||
|
||||
$lv_obj = new lehrveranstaltung();
|
||||
if($lv_obj->load_lva('0',null,null,true,null,'bezeichnung'))
|
||||
if ($lv_obj->load_lva('0',null,null,true,null,'bezeichnung'))
|
||||
{
|
||||
echo "<FORM method='POST' name='frmauswahl'>";
|
||||
echo "<SELECT name='lvid' onchange='window.document.frmauswahl.submit();'>";
|
||||
if($lvid=='')
|
||||
echo "\n<OPTION value='0' selected>--".$p->t('freifach/auswahl')."--</OPTION>";
|
||||
foreach($lv_obj->lehrveranstaltungen as $row)
|
||||
{
|
||||
if($lvid==$row->lehrveranstaltung_id)
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id' selected>$row->bezeichnung</OPTION>";
|
||||
else
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id'>$row->bezeichnung</OPTION>";
|
||||
echo "<FORM method='POST' name='frmauswahl'>";
|
||||
echo "<SELECT name='lvid' onchange='window.document.frmauswahl.submit();'>";
|
||||
if ($lvid == '')
|
||||
echo "\n<OPTION value='0' selected>--".$p->t('freifach/auswahl')."--</OPTION>";
|
||||
foreach ($lv_obj->lehrveranstaltungen as $row)
|
||||
{
|
||||
if ($lvid == $row->lehrveranstaltung_id)
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id' selected>$row->bezeichnung</OPTION>";
|
||||
else
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id'>$row->bezeichnung</OPTION>";
|
||||
}
|
||||
echo "\n</SELECT>";
|
||||
echo "\n</FORM>";
|
||||
echo "\n</SELECT>";
|
||||
echo "\n</FORM>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -81,9 +78,8 @@ else
|
||||
}
|
||||
|
||||
//Wenn das Formular abgeschickt wurde
|
||||
if($lvid!='')
|
||||
if ($lvid != '')
|
||||
{
|
||||
|
||||
$qry = "SELECT
|
||||
vorname,
|
||||
nachname,
|
||||
@@ -96,53 +92,49 @@ if($lvid!='')
|
||||
(public.tbl_student LEFT JOIN public.tbl_studiengang using (studiengang_kz)) ON (student_uid = uid)
|
||||
WHERE
|
||||
uid IN (SELECT uid FROM campus.tbl_benutzerlvstudiensemester
|
||||
WHERE lehrveranstaltung_id='".addslashes($lvid)."' AND studiensemester_kurzbz='".addslashes($stsem)."')
|
||||
WHERE lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." AND studiensemester_kurzbz=".$db->db_add_param($stsem).")
|
||||
ORDER BY
|
||||
nachname, vorname";
|
||||
|
||||
if($result=$db->db_query($qry))
|
||||
|
||||
if ($result = $db->db_query($qry))
|
||||
{
|
||||
$ff = array();
|
||||
$content='';
|
||||
|
||||
//$mailto= " <a href='mailto:";
|
||||
|
||||
$mailto=array();
|
||||
$mailto_idx=0;
|
||||
$content .= "<table>\n <tr class='liste'><th></th><th>".$p->t('global/nachname')."</th><th>".$p->t('global/vorname')."</th><th>".$p->t('global/mail')."</th><th>".$p->t('global/studiengang')."</th><th>".$p->t('global/semester')."</th></tr>";
|
||||
$i=0;
|
||||
while($row=$db->db_fetch_object($result))
|
||||
while ($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$i++;
|
||||
$content .= "\n<tr class='liste".($i%2)."'><td>$i</td><td>$row->nachname</td><td>$row->vorname</td><td><a href='mailto:$row->uid@technikum-wien.at'>$row->uid@technikum-wien.at</a></td><td align='center'>$row->kurzbzlang</td><td align='center'>$row->semester</td></tr>";
|
||||
|
||||
if(isset($mailto[$mailto_idx]) && mb_strlen($mailto[$mailto_idx])>450)
|
||||
|
||||
if (isset($mailto[$mailto_idx]) && mb_strlen($mailto[$mailto_idx])>450)
|
||||
$mailto_idx++;
|
||||
|
||||
if(isset($mailto[$mailto_idx]))
|
||||
|
||||
if (isset($mailto[$mailto_idx]))
|
||||
$mailto[$mailto_idx]=$mailto[$mailto_idx].',';
|
||||
else
|
||||
$mailto[$mailto_idx]='';
|
||||
$mailto[$mailto_idx]=$mailto[$mailto_idx].$row->uid.'@'.DOMAIN;
|
||||
}
|
||||
//$mailto.="'>".$p->t('freifach/MailAnAlleSenden')."</a>";
|
||||
|
||||
$content .= "</table>";
|
||||
|
||||
if($i==0)
|
||||
|
||||
if ($i == 0)
|
||||
{
|
||||
echo "<b>".$p->t('freifach/keineAnmeldungenFuerDiesesFreifach')."</b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo "Anzahl der Anmeldungen: ".$i;
|
||||
echo $content;
|
||||
echo "<br />";
|
||||
echo "<script>
|
||||
function openMail()
|
||||
{";
|
||||
if(count($mailto)>1)
|
||||
if (count($mailto) > 1)
|
||||
echo "alert('Aufgrund der großen Anzahl an Empfängern, muss die Nachricht auf mehrere E-Mails aufgeteilt werden!');";
|
||||
foreach($mailto as $val)
|
||||
foreach ($mailto as $val)
|
||||
echo "window.location.href='mailto:".$val."';\n";
|
||||
echo '
|
||||
}
|
||||
@@ -155,9 +147,5 @@ if($lvid!='')
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user