아이프레임 삽입 질문입니다. 채택완료
여행아
9년 전
조회 5,065
아이프레임을 사용하려고 하는데요.
검색을 해보니 이런 팁이 있더라구요.
저 소스를 그래도 붙여 넣었더니
에러가 나서요.
그냥 아무곳에 삽입했는데
삽입하는 방법이 틀렸는지.
조언 좀 부탁드립니다.
버전은 : 4.22.04 (08.06.11) 입니다.
Fatal error: Cannot redeclare conv_content() (previously declared in /home/hosting_users/0000000/www/lib/common.lib.php:17) in /home/hosting_users/0000000/www/lib/common.lib.php on line 564
[그누보드] 관리자와 그룹관리자만 아이프레임 사용하고자 할때
lib/common.lib.php 에서
<br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">+++++++++++++++++++++++++++++++++++++++</span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">function conv_content($content, $html) </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">{ </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> global $config, $board, $member, $view; </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> if ($html) </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> { </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $source = array(); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $target = array(); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $source[] = "//"; </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $target[] = ""; </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> if ($html == 2) { // 자동 줄바꿈 </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $source[] = "/\n/"; </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $target[] = "
"; </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> } </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> // 테이블 태그의 갯수를 세어 테이블이 깨지지 않도록 한다. </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $table_begin_count = substr_count(strtolower($content), "<table"); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $table_end_count = substr_count(strtolower($content), "</table"); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> for ($i=$table_end_count; $i<$table_begin_count; $i++) </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> { </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content .= "</table>"; </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> } </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content = preg_replace($source, $target, $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $adm=is_admin($view[mb_id]); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> if ($adm != 'super' && $adm != 'group') $content = bad_tag_convert($content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> // XSS (Cross Site script) 막기 </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> // 완벽한 XSS 방지는 없다. </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> // 081022 : CSRF 방지 </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> //$content = preg_replace("/(on)(abort|blur|change|click|dblclick|dragdrop|error|focus|keydown|keypress|keyup|load|mousedown|mousemove|mouseout|mouseover|mouseup|mouseenter|mouseleave|move|reset|resize|select|submit|unload)/i", "$1<!-- XSS Filter -->$2", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> //$content = preg_replace("/(on)([^\=]+)/i", "on$2", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> if ($adm != 'super' && $adm != 'group') $content = preg_replace("/(on)([a-z]+)([^a-z]*)(\=)/i", "on$2$3$4", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content = preg_replace("/(dy)(nsrc)/i", "dy$2", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content = preg_replace("/(lo)(wsrc)/i", "lo$2", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> if ($adm != 'super' && $adm != 'group') $content = preg_replace("/(sc)(ript)/i", "sc$2", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content = preg_replace("/(ex)(pression)/i", "ex$2", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> } </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> else // text 이면 </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> { </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> // & 처리 : & 등의 코드를 정상 출력함 </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content = html_symbol($content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> // 공백 처리 </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">//$content = preg_replace("/ /", " ", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">$content = str_replace(" ", " ", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">$content = str_replace("\n ", "\n ", $content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content = get_text($content, 1); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> $content = url_auto_link($content); </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> } </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"> return $content; </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">} </span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">+++++++++++++++++++++++++++++++++++++++</span><br style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);"><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">여기까지</span> </p><p><span style="font-family: gulim; font-size: 12px; line-height: 20px; background-color: rgb(248, 248, 249);">
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인