0){ foreach($buff as $value){ $log_tmp=explode("<>",rtrim($value)); for($j=0;$j<=count($key_r);$j++){ if($log_tmp[$j])$log_put[$log_tmp[0]][$key_r[$j]]=$log_tmp[$j]; }$i++; } }return $log_put; } function load_log1($file_path,$type=''){ if(file_exists($file_path)){ $fp=@fopen($file_path,"r"); if(!$fp){$err_str='open err '.$file_path;}else{ while(!feof($fp)){ $temp = fgets($fp); if($temp!="")$buff[]=$temp; }fclose($fp); } }$i=0; if(isset($buff) && count($buff)>0){ foreach($buff as $value){ if($type=='html'){ $value= str_replace("<",'<',$value); $value= str_replace(">",'>',$value); $value= str_replace(""",'"',$value); $value= str_replace("&",'&',$value); }$log_put[$i]=$value;$i++; } }return $log_put; } function check($arr,$names='') { foreach($names as $name_key => $name_val){ if(!$arr[$name_key] && $name_val['hissu']=='on')$arr[$name_val['name']]=''; } foreach($arr as $key => $val) { if(is_array($val)){ $key = htmlspecialchars($key); foreach($val as $key2 => $val2) { if($key=='email' && $val2<>$val[0]){ $error_name[$key]='on'; }else if($key=='email' && !ereg("^[a-zA-Z0-9!$&*.=^`|~#%'+\/?_{}-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}$", $val2) ){ $error_name[$key]='on'; }else if($key==$names[$key]['name'] && $names[$key]['hissu']=='on' && !$val2)$error_name[$key]='on'; $val2 = htmlspecialchars($val2); $ret[$key][$key2] = strip_tags($val2); } }else{ if($names[$key]['hissu']=='on' && $val==''){ $error_name[$key]='on'; }else if($key=='email' && !ereg("^[a-zA-Z0-9!$&*.=^`|~#%'+\/?_{}-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}$", $val) ){ $error_name[$key]='on'; } $val = htmlspecialchars($val); $ret[$key] = strip_tags($val); } } $ret['error']=$error_name; return $ret; } if(ereg("^DoCoMo",$_SERVER['HTTP_USER_AGENT'])){$tanmatsu='i'; }else if(ereg("^J-PHONE|^Vodafone|^SoftBank|^iPhone",$_SERVER['HTTP_USER_AGENT'])){$tanmatsu='s'; }else if(ereg("^UP.Browser|^KDDI",$_SERVER['HTTP_USER_AGENT'])){$tanmatsu='au'; }else{$tanmatsu='pc';} switch($tanmatsu){ case 'i': case 's': case 'au': if(file_exists('./mb.html'))$html=load_log1('./mb.html','html'); if(file_exists('./data/res_mb.dat'))$res_tmp=load_log1('./data/res_mb.dat','html'); $table_s="