get_exception(); } } /* Request値の検証 */ if( $err_str === "" ) { if (isset($_POST) === true && empty($_POST) === false) { $rq = $_POST; } elseif (isset($_GET) === true && empty($_GET) === false) { $rq = $_GET; } if (!empty($rq)) { foreach ($rq AS $k => $v) { switch ($k) { case 's_01': $where['scene'] = $v; break; case 's_02': $where['end'] = $v; break; case 'y_01': $where['year'] = $v; break; case 'm_01': $where['month'] = $v; break; case 'd_01': $where['day'] = $v; break; case 't_01': $where['term'] = $v; break; default: $where[$k] = $v; break; } } } } $param = array(); foreach ($where AS $k => $v) { if (is_array($v)) { foreach ($v AS $val) { $param[] = sprintf('%s[]=%s', $k, urlencode($val)); } } else { $param[] = sprintf('%s=%s', $k, urlencode($v)); } } $url = '/event/search_result/index.shtml' . (!empty($param) ? '?'.join('&', $param):''); header( "HTTP/1.1 301 Moved Permanently" ); header('Location:'.$url); exit;