$value ) { if( is_array($value) ){ # $key => q5, $value = array() foreach ( $value as $key1 => $value1 ) { # $key1 => 2, $value1 = 1 $val[$key.'['.$key1.']'] = $value1; } } } $this->Tags = $this->split_tag($html); $count = array(); $select = ''; for($i = 0; $i < count($this->Tags); $i++){ if($this->Tags[$i][0] == 'ELEMENT'){ list($type, $tagname, $attr, $tag) = $this->Tags[$i]; $aname = $attr['name']; if(@array_key_exists($attr['name'], $val) || ($tagname == 'OPTION' && array_key_exists($select, $val)) ){ if($tagname == 'OPTION'){ $aname = $select; }else{ $count[$aname] ++; } $vv = ''; if(is_array($val[$aname])){ $vv = $val[$aname][$count[$aname] - 1]; }else{ $vv = $val[$aname]; } if($tagname == 'INPUT'){ $attype = strtolower($attr['type']); if($attype == 'text' || $attype == 'hidden' || $attype == 'password'){ # テキスト $value = ' value="' . htmlspecialchars($vv) . '"'; $tag = preg_replace('/\s+value\s*=\s*(?:(?:"(.*?)")|(?:'."'(.*?)'".')|(\w+))/i', '', $tag); $tag = preg_replace('/(<\w+)/', "\\1$value ", $tag); }else if($attype == 'radio'){ # ラジオ $tag = preg_replace('/\s+CHECKED/i', '', $tag); $ary = is_array($val[$aname]) ? $val[$aname] : array($val[$aname]); foreach($ary as $v){ if($v == $attr['value']) $tag = preg_replace('/>$/', " CHECKED>", $tag); } }else if($attype == 'checkbox'){ # チェックボックス $tag = preg_replace('/\s+CHECKED/i', '', $tag); $ary = is_array($val[$aname]) ? $val[$aname] : array($val[$aname]); foreach($ary as $v){ if($v == $attr['value']) $tag = preg_replace('/>$/', " CHECKED>", $tag); } } }else if($tagname == 'SELECT'){ # セレクト $select = $aname; }else if($tagname == 'OPTION'){ # オプション $tag = preg_replace('/\s+SELECTED/i', '', $tag); $ary = is_array($val[$aname]) ? $val[$aname] : array($val[$aname]); foreach($ary as $v){ if($v == $attr['value']) $tag = preg_replace('/>$/', " SELECTED>", $tag); } }else if($tagname == 'TEXTAREA'){ # テキストエリア $tag .= htmlspecialchars($vv) . ''; } } $this->Tags[$i] = array($type, $tagname, $attr, $tag); } } return $this->output(); } ### 出力 function output(){ $html = ''; foreach($this->Tags as $t){ if($t[0] == 'TEXT'){ $html .= $t[1]; }else if($t[0] == 'ELEMENT'){ $html .= $t[3]; } } return $html; } ### タグの切り分け function split_tag($html){ $tags = array(); $text = ''; while($html != ''){ if(preg_match('/\A<(?:INPUT|SELECT|OPTION|TEXTAREA)\s+(.+?)\s*>/i', $html, $m)){ $html = substr($html, strlen($m[0]), strlen($html)); $mm = $m[0]; if($text != ''){ $tags[] = array('TEXT', $text); $text =''; } preg_match('/<(\w+)/', $mm, $name); $name = strtoupper($name[1]); $attr = $this->parse_attr($mm); if($name == 'TEXTAREA'){ preg_match('/\A([^<]+)<\/TEXTAREA>/i', $html, $tx); $html = substr($html, strlen($tx[0]), strlen($html)); $attr['value'] = $tx[1]; } $tags[] = array('ELEMENT', $name, $attr, $mm); }else if(preg_match('/\A([^<]+)/', $html, $m)){ $html = substr($html, strlen($m[0]), strlen($html)); $text .= $m[0]; }else if(preg_match('/\A(.)/', $html, $m)){ $html = substr($html, 1, strlen($html)); $text .= $m[0]; }else if(preg_match('/\A(\s)/', $html, $m)){ $html = substr($html, 1, strlen($html)); $text .= $m[0]; }else{ print 'HTMLFillInForm : HTMLPARSE ERROR'; break; } } if($text != '') $tags[] = array('TEXT', $text); #header('Content-Type: text/plain;'); #var_dump($tags); return $tags; } ### タグオプション解析 function parse_attr($tag){ $attr = array(); while($tag != ''){ if(preg_match('/\A(\w+)\s*=\s*(?:(?:"(.*?)")|(?:'."'(.*?)'".')|(\w+))/', $tag, $op)){ $tag = substr($tag, strlen($op[0]), strlen($tag)); if($op[2] != ''){ $attr[strtolower($op[1])] = $op[2]; }else if($op[3] != ''){ $attr[strtolower($op[1])] = $op[3]; }else if($op[4] != ''){ $attr[strtolower($op[1])] = $op[4]; } }else{ $tag = substr($tag, 1, strlen($tag)); } } return $attr; } } ?> 潟劫綵潟潟鴻TOP | 潟劫綵篋堺腑

潟劫綵 潟潟鴻

潟潟鴻TOP 潟劫綵篏 綽 綽若 潟劫綵篋堺腑 莖
潟劫綵篏
  潟劫綵篋堺腑
  蕋鴻帥鐚c潟劫綵吾с鐚
腑絲糸<絲祉c潟劫綵潟潟鴻莖羆阪障泣c鐚

腑1篋1障сс
蕋鴻帥篏茲育吾吟с障
綣綵糸≦ぇ荀с障
腑篁鐚1210ワ鐚鐔14ワ鐚
絲紫肴;鐚綛恰23綛1 綵若若吾
 
             





激с罸吾篏純純綣綵

篏c篋削上涯潟(11)
蕋鴻篋削激с罸(35)
綣綵<ャ種絨顗ャ膠潟眼眼若莟潟若違若潟若...

篏泣綣綵

篏c篋削傑絏≦臼綛号碓篏ょヤ蹴蕭篋臂羌紊絨羇莠藏翫兄絖(11罩)
蕋鴻篋削吟у羂篏祉
綣綵<ャ種障羞激莨若帥帥鴻若罅祉窮若激ャ...

篌吾違綣綵

篏c篋削上井膣薈綵∵≪絏經純√臼箙箙篆薤篁e(11罩)
蕋鴻篋削4綛雁5綛雁
綣綵<ャ種罅羞激窮若薛純若祉若吾純若篋莟若<...

筝蕭綣綵

篏c篋削括亥膣絅筝狗沙茵c絏♂h絽絖絖箙篆(11罩)
蕋鴻篋削絖膺cс
綣綵<ャ種祉祉ゃ障莨若帥紂綣藪祉蚊窮若...

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

       





吟<ゃ綣綵

篏c篋削絛醇ャ(12)
蕋鴻篋削(43)
綣綵<ャ種鐚藪紙鐚藏ュ兄窮若祉帥主...

罸吾絖綣綵

篏c篋削罔絮援羌(12)
蕋鴻篋削罸(42)
綣綵<ャ種泣祉若祉糸ぇ脂≪鴻若潟喝兄窮若潟若違...

絎九梱潟綣綵

篏c篋削蕭筝莠(12)
蕋鴻篋削罸(40)
綣綵<ャ種腥膠潟上ャ鴻潟違若潟ゃ潟若...

絨純綣綵

篏c篋削筝(39)
蕋鴻篋削篋(39)
綣綵<ャ種∫絨罌∽蒔帥潟紊ц絖羞祉筝よャ...

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

       





膠恰祁蕋綣綵

篏c篋削ririmama(33)
蕋鴻篋削紲(5)
綣綵<ャ種膠恰祁鐚膠潟祉ゃ障脂莟紙紊蘂潟常蚊ャ窮若鐚蚊...

吟潟絮鐚紲

篏c篋削絅蕋吾с祉若違(19)
蕋鴻篋削(50)
綣綵<ャ種莟吟с若壕若阪窮若<...

帥違綣綵

篏c篋削ゃゃ(20)
蕋鴻篋削篋(20)
綣綵<ャ種ゃ障違帥c若違帥潟蚊ゃ...

紲綣綵

篏c篋削祉祉翠(27)
蕋鴻篋削(60)
綣綵<ャ種綏祉窮若若<潟宴蚊膩藥臥渇√...

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

       





薤違鐚≪若≪潟若綣綵

篏c篋削uzumi(41)
蕋鴻篋削紲(14)
綣綵<ャ種≪若≪潟若鐚渇※鰹紊ц莟綏祉ャ窮若祉...

腱紊激薑綽吓綵

篏c篋削胼医絲睡(18)
蕋鴻篋削絋(15)
綣綵<ャ種藪吾綏祉肴≧ゃ障眼絨...

欠綣綵

篏c篋削絎やゃ絖(50)
蕋鴻篋削(75)
綣綵<ャ種膤吾ャ膣藥膠潟球兄若罍蕷紫恰絽祉障藥∫膤若...

篋篋阪絋鴻蚊綣綵

篏c篋削篌怨我(28)
蕋鴻篋削筝∴Κ紮(42)
綣綵<ャ種障罌絮激守∵絨乗羃号潟蚊紊ф...

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

       





障 障潟鴻

篏c篋削膤梧羝臂(42)
蕋鴻篋削(50)
綣綵<ャ種絅や撮膠潟潟紂藪莟莟若違...

蚊∞絖激c激綣綵

篏c篋削ユ羆(38)
蕋鴻篋削絖(15)
綣綵<ャ種紊ф壕羞激鐚罅ャ鐚絨乗違帥渇※蚊ャ窮若...


篏c篋削偌筝羌(13)
蕋鴻篋削篋(13)
綣綵<ャ種莨若帥藏窮若潟潟潟眼泣ゃ≪≪括 ...

篁篋莢鐚鴻帥潟劫綵

篏c篋削茱水e臂(19)
蕋鴻篋削(22)
綣綵<ャ種鴻帥c激藏ャ綏祉泣若潟...

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

       





с祉綣綵

篏c篋削(51)
蕋鴻篋削30篁g傑
綣綵<ャ種2蚊括с若蕭莟喝篋眼...

≪渇鏁綵鐚藏馽帥守※喝ャ鐚

篏c篋削綏ヨょ絖
蕋鴻篋削2050篁eコ
綣綵<ャ種藏馽鐚帥守※鰹≪渇<泣絨閄綛蚊...

篏九綣綵

篏c篋削喝藝紫(34)
蕋鴻篋削2030篁g桁コ
綣綵<ャ種篋莨若帥鴻莟藥膤号羝...

絅喝墾up蘂若若祉

篏c篋削膃拷(37)
蕋鴻篋削30篁eコ
綣綵<ャ種ゃ鴻若若眼潟激ャ蚊泣綏祉鐚若...

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

       





絖蘂綣綵

篏c篋削荀sisters(19)
蕋鴻篋削3040篁eコ
綣綵<ャ種薇∞嘘吾鐚罅蕕鐚鐚筝蚊鐚筝臥e鐚筝峨e鐚藏...

紕ョ篋阪綵潟鴻

篏c篋削絏医羈(43)
蕋鴻篋削3040篁eコ
綣綵<ャ種с糸乗糸ぇ喝膕腴亥若絮沿ャ窮若...

筝蕋綣綵

篏c篋削篌ゅ鎀絖(44)
蕋鴻篋削2030篁eコ
綣綵<ャ種罌綛蚊紊цc激潟鐚莟祉肢箙鰹絨乗窮若綛蚊...

2蚊若綣綵

篏c篋削c25(26)
蕋鴻篋削20篁eコ
綣綵<ャ種腥若吾藏泣泣眼帥主...

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

蕋鴻帥鐚

 

篁膩障
腑障

莖膣剛    

 

若吾若吾

TOP>潟劫綵潟潟鴻