Changeset - r27:4d96cfceba10
[Not reviewed]
v0.7 default
0 2 0
Wolfgang Scherer (ws) - 13 years ago 2012-03-31 21:18:55
wolfgang.scherer@gmx.de
index.php: cut'n'paste error fixed.
2 files changed with 16 insertions and 2 deletions:
0 comments (0 inline, 0 general)
index.php
Show inline comments
 
@@ -439,49 +439,49 @@ if ( !$x_wsv_raw )
 
    $form[] = sprintf('<span class="label">%s<sup>*</sup>:</span>', get_text('body'));
 
    $form[] = (
 
        '<textarea name="body" cols="56" rows="'.$text_rows.'"'
 
        .' style="vertical-align: top; width: 440px;">' . htmlspecialchars($vacation_body, ENT_NOQUOTES, "UTF-8") . '</textarea><br />');
 

	
 
    // actions
 
    $form[] = '<hr class="sep"/>';
 
    $form[] = '<span class="label">&nbsp;</span>';
 
    $form[] = sprintf('<input type="submit" name="save" value="%s" />', get_text('save'));
 
    //$form[] = ' ' . get_text('enable_encoding');
 
    $form[] = '<hr class="sep"/>';
 
}
 

	
 
if ($x_wsv_raw || $EXPERT_ENABLED)
 
{
 
    if ( $x_wsv_raw ) {
 
        $text_rows = 15;
 
    } else {
 
        $text_rows = 5;
 
    }
 
    $form[] = sshl(get_text('expert_mode'));
 
    // raw message
 
    $form[] = sprintf('<span class="label">%s<sup>*</sup>:</span>', get_text('message'));
 
    $form[] = (
 
        '<textarea name="body" cols="56" rows="'.$text_rows.'"'
 
        '<textarea name="message" cols="56" rows="'.$text_rows.'"'
 
        .' style="vertical-align: top; width: 440px;">' . htmlspecialchars($vacation_msg, ENT_NOQUOTES, "UTF-8") . '</textarea><br />');
 

	
 
    $form[] = '<span class="label">&nbsp;</span>';
 
    $form[] = (
 
        '<span style="display: inline-block; width: 440px; margin-top: 5px; font-size: 8pt;">'
 
        . get_text('explain_expert')
 
        .'</span><br />');
 

	
 
    $form[] = '<hr class="sep"/>';
 
    $form[] = '<span class="label">&nbsp;</span>';
 
    $form[] = sprintf('<input type="submit" name="raw" value="%s" />', get_text('save'));
 
    //$form[] = ' ' . get_text('disable_encoding');
 
    $form[] = '<hr class="sep"/>';
 

	
 
}
 

	
 
//$form[] = '<span class="label">&nbsp;</span>';
 
$form[] = (
 
    '<span style="display: inline-block; width: 550px;"><sup>*</sup>'
 
    . get_text('explain_subject')
 
    .'</span><br />');
 

	
 
// --------------------------------------------------
 
// |||:sec:||| Vacation History
lib/util.php
Show inline comments
 
@@ -277,50 +277,64 @@ function message_split($message)
 
        $line = array_shift($lines);
 
        $tline = trim($line);
 
        if (empty($tline)) {
 
            break;
 
        }
 
        if ($check_from) {
 
            $check_from = False;
 
            if ( preg_match('/^From /', $line) ) {
 
                continue;
 
            }
 
        }
 
        $matches = Array();
 
        if ( preg_match('/(^[!-~]+):/', $line, $matches)) {
 
            $current_field = strtolower($matches[1]);
 
            $headers[$current_field] = $line;
 
            continue;
 
        }
 
        if (!empty($current_field))
 
        {
 
            $headers[$current_field] .= "\n" . $line;
 
            continue;
 
        }
 
        $headers[] = $line;
 
    }
 
    $body = implode($lines, "\n");
 

	
 
    $body = implode($lines, "\n");
 
    global $_debug;
 
    if ( $_debug ) {
 
        echo "<pre>\n";
 
        echo "--------------------------------------------------\n";
 
        echo "headers\n";
 
        echo "--------------------------------------------------\n";
 
        var_dump($headers);
 
        echo "--------------------------------------------------\n";
 
        echo "body\n";
 
        echo "--------------------------------------------------\n";
 
        var_dump($body);
 
        echo "</pre>\n";
 
    }
 

	
 
    return Array($headers, $body);
 
}
 

	
 
function message_join($headers, $body)
 
{
 
    return sprintf("%s\n\n%s", implode($headers, "\n"), $body);
 
}
 

	
 
function header_set(&$headers, $header)
 
{
 
    $matches = Array();
 
    if (preg_match('/^([!-~]+):/', $header, $matches)) {
 
        $headers[$matches[1]] = trim($header);
 
    }
 
}
 

	
 
function header_field_body(&$headers, $field_name)
 
{
 
    if (array_key_exists($field_name, $headers)) {
 
        $field = $headers[$field_name];
 
        $field_body = preg_replace('/^[^:]+: */', '', $field);
 
    } else {
 
        $field_body = '';
 
    }
0 comments (0 inline, 0 general)