diff options
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 47 |
1 files changed, 46 insertions, 1 deletions
@@ -311,4 +311,49 @@ function notice($s) { $_SESSION['sysmsg'] .= $s; -}}
\ No newline at end of file +}} + + +if(! function_exists('xmlify')) { +function xmlify($str) { + $buffer = ''; + + for($x = 0; $x < strlen($str); $x ++) { + $char = $str[$x]; + + switch( $char ) { + + case "\r" : + break; + case "&" : + $buffer .= '&'; + break; + case "'" : + $buffer .= '''; + break; + + case "\"" : + $buffer .= '"'; + break; + case '<' : + $buffer .= '<'; + break; + case '>' : + $buffer .= '>'; + break; + case "\n" : + $buffer .= ' '; + break; + default : + $buffer .= $char; + break; + } + } + $buffer = trim($buffer); + return($buffer); +}} + + +function hex2bin($s) { + return(pack("H*",$s)); +}
\ No newline at end of file |