아이프레임 삽입 질문입니다.

아이프레임 삽입 질문입니다.

QA

아이프레임 삽입 질문입니다.

답변 1

본문

아이프레임을 사용하려고 하는데요.

검색을 해보니 이런 팁이 있더라구요.


저 소스를 그래도 붙여 넣었더니

에러가 나서요.

 

그냥 아무곳에 삽입했는데

삽입하는 방법이 틀렸는지.


조언 좀 부탁드립니다.


버전은 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 에서


+++++++++++++++++++++++++++++++++++++++
function conv_content($content, $html) 
{ 
    global $config, $board, $member, $view; 
    if ($html) 
    { 
        $source = array(); 
        $target = array(); 
        $source[] = "//"; 
        $target[] = ""; 
        if ($html == 2) { // 자동 줄바꿈 
            $source[] = "/\n/"; 
            $target[] = "<br/>"; 
        } 
        
        // 테이블 태그의 갯수를 세어 테이블이 깨지지 않도록 한다. 
        $table_begin_count = substr_count(strtolower($content), "<table"); 
        $table_end_count = substr_count(strtolower($content), "</table"); 
        for ($i=$table_end_count; $i<$table_begin_count; $i++) 
        { 
            $content .= "</table>"; 
        } 
        $content = preg_replace($source, $target, $content); 
        $adm=is_admin($view[mb_id]); 
        if ($adm != 'super' && $adm != 'group')  $content = bad_tag_convert($content); 
        // XSS (Cross Site script) 막기 
        // 완벽한 XSS 방지는 없다. 
        // 081022 : CSRF 방지 
        //$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); 
        //$content = preg_replace("/(on)([^\=]+)/i", "on$2", $content); 
        if ($adm != 'super' && $adm != 'group') $content = preg_replace("/(on)([a-z]+)([^a-z]*)(\=)/i", "on$2$3$4", $content); 
        $content = preg_replace("/(dy)(nsrc)/i", "dy$2", $content); 
        $content = preg_replace("/(lo)(wsrc)/i", "lo$2", $content); 
        if ($adm != 'super' && $adm != 'group') $content = preg_replace("/(sc)(ript)/i", "sc$2", $content); 
        $content = preg_replace("/(ex)(pression)/i", "ex$2", $content); 
        
    } 
    else // text 이면 
    { 
        // & 처리 : &   등의 코드를 정상 출력함 
        $content = html_symbol($content); 
        // 공백 처리 
//$content = preg_replace("/  /", "  ", $content); 
$content = str_replace("  ", "  ", $content); 
$content = str_replace("\n ", "\n ", $content); 
        $content = get_text($content, 1); 
        $content = url_auto_link($content); 
    } 
    return $content; 
} 
+++++++++++++++++++++++++++++++++++++++
여기까지 

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로