Coding Style Fix

This commit is contained in:
Andreas Österreicher
2010-09-20 15:23:38 +00:00
parent d2acc996c5
commit 93b1d9b194
2 changed files with 68 additions and 47 deletions
+56 -36
View File
@@ -1,4 +1,27 @@
<?php
/* Copyright (C) 2010 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
*/
require_once('../../config/cis.config.inc.php');
require_once('../../include/functions.inc.php');
function mail_id_generator()
{
mt_srand((double)microtime()*1000000);
@@ -34,57 +57,54 @@ function mail_id_generator()
}
return $mail_id;
}
require_once('../../config/cis.config.inc.php');
require_once('../../include/functions.inc.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
<title>&Ouml;ffnen eines Mailverteilers</title>
</head>
<title>&Ouml;ffnen eines Mailverteilers</title>
<body id="inhalt">
<?php
if(isset($_REQUEST['token']) && isset($_REQUEST['grp']))
{
?>
echo '
<table class="tabcontent">
<tr>
<td class="ContentHeader"><font class="ContentHeader">Mailverteiler</font></td>
<td class="ContentHeader"><font class="ContentHeader">Status</font></td>
</tr>
<?php
/* Generate an random String */
$mail_id=mail_id_generator();
</tr>';
/* Generate an random String */
$mail_id=mail_id_generator();
/* call the shellpart at polyxena */
$command = "ssh polyxena sudo /root/bin/mlistin.sh " . $_REQUEST['grp'] . " " . $mail_id . " 2>&1";
exec($command);
/* call the shellpart at polyxena */
$command = "ssh polyxena sudo /root/bin/mlistin.sh " . $_REQUEST['grp'] . " " . $mail_id . " 2>&1";
exec($command);
/* ffe, 20051020 - do a little logging */
$message= date("F j G:i:s") . " mailgroup: [" . $_REQUEST['grp'] . "] (using " . $mail_id . ") requested by [" . $_SERVER['PHP_AUTH_USER'] . "]\n";
/* ffe, 20051020 - do a little logging */
$message= date("F j G:i:s") . " mailgroup: [" . $_REQUEST['grp'] . "] (using " . $mail_id . ") requested by [" . $_SERVER['PHP_AUTH_USER'] . "]\n";
$filet = fopen(LOG_PATH.'.htmlistopen.log', "a");
fwrite($filet, $message, mb_strlen($message));
fclose($filet);
$filet = fopen(LOG_PATH.'.htmlistopen.log', "a");
fwrite($filet, $message, mb_strlen($message));
fclose($filet);
// for the users
echo "
<tr>
<td><a href='mailto:".$_REQUEST['grp'].$mail_id."@technikum-wien.at'>".$_REQUEST['desc']."</a></td>
<td>Ge&ouml;ffnet (Code: ".$mail_id.")</td>
</tr>
<tr>
<td colspan='2'>
<p>Um ein Mail an den Verteiler zu senden klicken Sie bitte auf den obigen Link. Ihr Mailprogramm &ouml;ffnet automatisch eine Vorlage f&uuml;r ein neues Mail, welche bereits die korrekte Adresse enth&auml;lt.</p>
// for the users
echo "
<tr>
<td><a href='mailto:".$_REQUEST['grp'].$mail_id."@technikum-wien.at'>".$_REQUEST['desc']."</a></td>
<td>Ge&ouml;ffnet (Code: ".$mail_id.")</td>
</tr>
<tr>
<td colspan='2'>
<p>Um ein Mail an den Verteiler zu senden klicken Sie bitte auf den obigen Link. Ihr Mailprogramm &ouml;ffnet automatisch eine Vorlage f&uuml;r ein neues Mail, welche bereits die korrekte Adresse enth&auml;lt.</p>
<p>Das Senden ist f&uuml;r den Zeitraum von <b>2 Stunden</b> bzw. f&uuml;r die <b>einmalige</b> Benutzung unter der Adresse <a href='mailto:".$_REQUEST['grp'].$mail_id."@technikum-wien.at'>".$_REQUEST['grp'].$mail_id."@technikum-wien.at</a> m&ouml;glich.</p>
</td>
</tr>
</table>
";
<p>Das Senden ist f&uuml;r den Zeitraum von <b>2 Stunden</b> bzw. f&uuml;r die <b>einmalige</b> Benutzung unter der Adresse <a href='mailto:".$_REQUEST['grp'].$mail_id."@technikum-wien.at'>".$_REQUEST['grp'].$mail_id."@technikum-wien.at</a> m&ouml;glich.</p>
</td>
</tr>
</table>
";
}
else
{
@@ -99,6 +119,6 @@ require_once('../../include/functions.inc.php');
echo"Bitte best&auml;tigen Sie das &Ouml;ffnen des Verteilers ".$_REQUEST['grp'].": <a href=\"".$_SERVER['SCRIPT_NAME']."?grp=".$_REQUEST['grp']."&desc=".$_REQUEST['desc']."&token=1\">Best&auml;tige</a>";
}
}
?>
</body></html>
?>
</body>
</html>
+12 -11
View File
@@ -24,10 +24,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
<title>Personen im Mailverteiler</title>
</head>
<title>Personen im Mailverteiler</title>
<body id="inhalt">
<?php
require_once('../../config/cis.config.inc.php');
@@ -49,13 +49,12 @@
$is_lector=false;
?>
<table class="tabcontent">
<tr>
<td class="ContentHeader"><font class="ContentHeader">Nachname</font></td>
<td class="ContentHeader"><font class="ContentHeader">Vorname</font></td>
<td class="ContentHeader"><font class="ContentHeader">E-Mail</font></td>
</tr>
<table class="tabcontent">
<tr>
<td class="ContentHeader"><font class="ContentHeader">Nachname</font></td>
<td class="ContentHeader"><font class="ContentHeader">Vorname</font></td>
<td class="ContentHeader"><font class="ContentHeader">E-Mail</font></td>
</tr>
<?php
//$sql_query = "SELECT vornamen AS vn,nachname AS nn,a.uid as uid FROM public.tbl_personmailgrp AS a, public.tbl_person AS b WHERE a.uid=b.uid AND a.mailgrp_kurzbz='$grp' ORDER BY nachname";
@@ -72,4 +71,6 @@
}
}
?>
</body></html>
</table>
</body>
</html>