idea Steuerzeichen entfernen

This commit is contained in:
Manuel Weiser 2018-10-01 12:44:55 +02:00
parent 21904d826e
commit 62c462af59
4 changed files with 36 additions and 15 deletions

View File

@ -566,4 +566,28 @@ $timenow = date("G:i");
$timenowlong = date("G:i:s"); $timenowlong = date("G:i:s");
$useronlinetime = date("Y-m-d H:i:s", mktime(date("H"),date("i")-5,date("s"), date("m"),date("d"),date("Y"))); $useronlinetime = date("Y-m-d H:i:s", mktime(date("H"),date("i")-5,date("s"), date("m"),date("d"),date("Y")));
?> function remove_idea_codes($input) {
$toRemove = array(
"<DC1>",
"<DC2>",
"<DC3>",
"<ENQ>",
"<ETX>",
"<BS>",
"<ESC>",
"<ETB>",
"<RS>",
"<ACK>",
"<CAN>",
"<GS>",
"<HT>",
"<LF>",
"<US>",
"<DEL>",
"<SUB>",
"<DLE>"
);
return str_replace($toRemove, " ", $input);
//return $input;
}

View File

@ -215,7 +215,7 @@ else { //if( $show_filter != 1 ) {
$thisday .= ' $thisday .= '
<tr bgcolor="'.$row["bg_farbe_text"].'"> <tr bgcolor="'.$row["bg_farbe_text"].'">
<td colspan="5"> <td colspan="5">
<span style="color:'.$row["text_farbe_text"].';font-size:'.$row["text_groesse_text"].'">'.$row["text"].'</span> <span style="color:'.$row["text_farbe_text"].';font-size:'.$row["text_groesse_text"].'">'.remove_idea_codes($row["text"]).'</span>
</td> </td>
</tr> </tr>
'; ';

10
idea.php Normal file
View File

@ -0,0 +1,10 @@
<?php
function remove_idea_codes($input) {
$toRemove = array("<DC2>", "<ENQ>", "<ETX>", "<BS>", "<ESC>");
foreach ($toRemove as $value) {
$output = str_replace($value, "", $input);
}
return $output;
}

View File

@ -1,13 +0,0 @@
<?php
$body = ("--------------------------------------------------------\n"
."Testmail"
."--------------------------------------------------------\n"
."Dies ist eine automatische Info-EMail. \n"
."--------------------------------------------------------");
$xtra = "From: monitor@fire-devils.org (Monitor)\n";
$xtra .= "Content-Type: text/plain; charset=UTF-8\n";
$xtra .= "MIME-Version: 1.0\n";
$xtra .= "Content-Transfer-Encoding: 8bit\n";
$xtra .= "X-Mailer: PHP ". phpversion();
mail("manuelweiser@me.com", "Monitor Alarm Testmail ", $body, $xtra);