';
$trow = Array();
$trow[] = get_text('user');
$trow[] = get_text('forward_to');
@@ -337,14 +349,14 @@ if ($forward_active) {
// subject
$form[] = sprintf('%s*:', get_text('subject'));
$form[] = (
- '
');
// message
$form[] = sprintf('%s*:', get_text('message'));
$form[] = (
'
');
+ .' style="vertical-align: top;">' . htmlspecialchars($vacation_body, ENT_NOQUOTES, "UTF-8") . '
');
$form[] = ' ';
$form[] = (
@@ -355,7 +367,6 @@ if ($forward_active) {
// actions
$form[] = '
';
$form[] = ' ';
-$form[] = sprintf('', get_text('refresh'));
$form[] = sprintf('
', get_text('save'));
$form[] = '
';
@@ -374,7 +385,7 @@ pclose($vacation_ausgabe);
if (!empty ($vacation_list)) {
$form[] = shl(get_text('reply_history'));
- $form[] = '
';
+ // $form[] = '
';
$form[] = '';
$form[] = $vacation_list;
$form[] = '
';
@@ -382,7 +393,7 @@ if (!empty ($vacation_list)) {
$form[] = ' ';
$form[] = sprintf('
', get_text('delete'));
if ($is_admin) {
- echo ('
');
+ $form[] = ('
');
}
} else {
$form[] = shl(get_text('reply_history_empty'));
@@ -396,6 +407,7 @@ echo implode($form, "\n");
// --------------------------------------------------
if ($is_admin) {
+ echo shl(get_text('manual_headline'));
echo (sprintf('%s
'."\n", get_text('manual_link'), get_text('manual')));
}
diff --git a/lib/language.php b/lib/language.php
--- a/lib/language.php
+++ b/lib/language.php
@@ -49,6 +49,7 @@ Your message has been forwarded to a co-
'reply_history' => 'Autoreply History',
'delete' => 'Delete',
+ 'manual_headline' => 'Administrator Manual',
'manual' => 'Manual',
'manual_link' => 'doc/README.html',
// |:here:|
@@ -83,6 +84,7 @@ Ihre Mail wird zur Bearbeitung an meine
'reply_history' => 'Automatisch Beantwortete Emails',
'delete' => 'Löschen',
+ 'manual_headline' => 'Administratorhandbuch',
'manual' => 'Anleitung',
'manual_link' => 'doc/README-de.html',
// |:here:|
diff --git a/lib/util.php b/lib/util.php
--- a/lib/util.php
+++ b/lib/util.php
@@ -244,6 +244,71 @@ function error_msg($message)
echo sprintf('%s'."\n", $message);
}
+// --------------------------------------------------
+// |||:sec:||| vaccation(1) message
+// --------------------------------------------------
+
+function vacation_split($message, $decode)
+{
+ $lines = explode("\n", $message);
+ $subject = array_shift($lines);
+ $subject = preg_replace('/^[Ss]ubject: */', '', $subject);
+ $headers = Array();
+ // remove additional headers
+ while (True) {
+ $line = array_shift($lines);
+ if (empty($line)) {
+ break;
+ }
+ $headers[] = $line;
+ }
+ $headers = implode($headers, "\n");
+ $body = implode($lines, "\n");
+ if ( $decode )
+ {
+ if ( preg_match("/^=[?]/", $subject) )
+ {
+ $subject = preg_replace('/^=[?]utf-8[?]Q[?]/', '', $subject);
+ $subject = preg_replace('/[?]=$/', '', $subject);
+ $subject = quoted_printable_decode($subject);
+ }
+ $body = quoted_printable_decode($body);
+ }
+ return Array($subject, $headers, $body);
+}
+
+function vacation_join($subject, $body, $headers=Null)
+{
+ $subject = trim($subject);
+ $subjectq = quoted_printable_encode($subject);
+ if ( $subjectq != $subject )
+ {
+ $subject = sprintf('=?utf-8?Q?%s?=', $subjectq);
+ }
+ $subject = 'Subject: ' . $subject;
+ $headera = Array(
+ $subject,
+ 'Content-Type: text/plain;'."\n"
+ .' charset="utf-8"'."\n"
+ .'Content-Transfer-Encoding: quoted-printable');
+ if (!empty($headers))
+ {
+ $headers = trim($headers);
+ if (!empty($headers))
+ {
+ $headers = preg_replace("/\n\n+/", "\n", $headers);
+ $headera[] = $headers;
+ }
+ }
+ $headers = implode($headera, "\n");
+ if (empty($body))
+ {
+ $body = '';
+ }
+ return sprintf("%s\n\n%s\n",
+ $headers, quoted_printable_encode($body));
+}
+
//
// :ide-menu: Emacs IDE Menu - Buffer @BUFFER@
// . M-x `eIDE-menu' ()(eIDE-menu "z")