while (get_func_usage($toks)) { } clean_code($path . $f, $toks); } } closedir($dir); /* optimize *.inc files */ $path = $WWW_ROOT_DISK . 'include/theme/' . $t_name; $dir = opendir($path); $path .= '/'; while ($f = readdir($dir)) { if ($f == '.' || $f == '..') { continue; } if (@is_file($path . $f) && substr($f, -4) == '.inc') { clean_code($path . $f, token_get_all(file_get_contents($path . $f))); } } closedir($dir); } } } } } } if (!$edit) { $tmp = new fud_theme(); $c = get_object_vars($tmp); foreach ($c as $k => $v) { ${'thm_' . $k} = ''; }
function conv_codage($txt, $d, $enc) { if ($d == 'utf8') { $ret = $enc ? utf8_encode(utf8_encode($txt)) : utf8_decode_b($txt); } elseif ($d == 'base64') { $ret = $enc ? base64_encode($txt) : base64_decode($txt); } elseif ($d == 'htmlentities') { $ret = $enc ? htmlentities($txt, ENT_QUOTES, 'ISO-8859-15', false) : html_entity_decode($txt); } elseif ($d == 'url') { $ret = $enc ? urlencode($txt) : urldecode($txt); } elseif ($d == 'unescape') { $ret = $enc ? $ret : unescape($txt, ""); } elseif ($d == 'ascii') { if ($enc) { $ret = ascii_encode($txt); } else { $ret = mb_convert_encoding($txt, 'ASCII') . "\r"; } } elseif ($d == 'binary') { $ret = $enc ? ascii2bin($txt) : bin2ascii($txt); } elseif ($d == 'bin/dec') { $ret = $enc ? decbin($txt) : bindec($txt); } elseif ($d == 'timestamp') { $ret = $enc ? strtotime($txt) : date('d/m/Y H:i:s', $txt); } elseif ($d == 'php') { $ret = clean_code($txt); } return stripslashes($ret); }
function imput_good($k, $v) { $v = clean_code($v); return goodarea_b($v, $k, '', '', 44, 20); }