Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
jlex
/
nahuatl
/
php4
/
Upload File :
New :
File
Dir
/home/cluster1/data/bu01/1121861/jlex/nahuatl/php4/nahuatl_pre_processor.php4
<? class nahuatl_pre_processor { function neutralize_vowels($s) { $s= preg_replace("/([aeiou]):/","$1",$s); $s= preg_replace("/([aeiou])/","$1:?",$s); return $s; } /******************************* process ****************************/ function process($form_vars,$defaults) { $project = $form_vars["project"]; $max_conditions = $defaults["max_conditions"]; for($i=0;$i<$max_conditions;$i++) { $neutralize_var = "neutralize_".$i; $neutralize = $form_vars[$neutralize_var]; $string_var = "string_".$i; $string = trim($form_vars[$string_var]); $string = ereg_replace("[+]","\\\+",$string); $db_cols_var = "db_cols_".$i; $db_cols = trim($form_vars[$db_cols_var]); if(($string != "") && ($neutralize == "on") && !ereg("sense",$db_cols)) { $string = $this->neutralize_vowels($string); $form_vars[$string_var] = $string; } } return $form_vars; } } $npp = new nahuatl_pre_processor(); $form_vars = $npp->process($form_vars,$defaults); ?>