$value)
{
if ($name == "repa_rules_tpl_tsu" OR $name == "repa_ban_desc")
{
include_once SYSTEM_DIR.'/classes/parse.class.php';
$parse = new ParseFilter();
$value = $db->safesql( $parse->BB_Parse( $parse->process( $value ), false ));
$value = preg_split( '((>)|(<))', $value, - 1, PREG_SPLIT_DELIM_CAPTURE );
$n = count( $value );
for($i = 0; $i < $n; $i ++)
{
if( $value[$i] == "<" )
{
$i ++;
continue;
}
$value[$i] = preg_replace( "#([^\s\n\r]{" . intval( 50 ) . "})#i", "\\1
", $value[$i] );
}
$value = join( "", $value );
}
elseif ($name == "bl_period" OR $name == "res_site" OR $name == "res_cp" OR $name == "sp_num")
{
$value = intval($value);
}
elseif ($name == "adm_minus" OR $name == "repa_stop_change_min")
{
$value = intval($value);
if ($value > 0 AND $value != 0)
$value = 0 - $value;
}
elseif ($name == "adm_plus")
{
$value = intval($value);
if ($value < 0 AND $value != 0)
$value = 0 - $value;
}
else
{
$value = stripslashes ($value);
$value = addslashes($value);
$value = preg_replace($find, $replace, $value);
}
fwrite($handler, "'{$name}' => \"{$value}\",\r\n");
}
fwrite($handler, ");\r\n?>");
fclose($handler);
$cache->clear();
msg("info", $langms['sea_info'], "{$lang_repa['opt_saved']}
", "");
}
?>