묻고답하기

지금..제가 회사서버 db를 복사해서 제 컴퓨터에서 사용하고있는데요

 

부장님이 불러온 서버 db의 어디에서 메뉴를 보여주는지 , 어디서 그림 파일들을 뿌려주는지를 알아내라고 하셨어요..

 

근데 전혀 모르겠거든요..editplus로 보면 된다고 그러시는데 막막해요..이게 뭔가 싶고;;

 

저보다 위의 일하시는분이 저한테 어떻게 작업해야되는지 보여주시면서

 

코드부분에서 echo "aa"; 이런식으로 막아가면서 찾다보면

 

어느게 게시판을 보여주는건지 그림파일을 관리하는건지 알수있다고 하셧거든요..

 

근데 솔직히 저는 이해가 안됩니다.

 

어느 부분에서 echo "aa"; 라는 명렁어를 써서 막는건지도 모르겠구요 막는게 뭔지도 모르겠구요..

 

답답합니다; 그냥 이 지금 문제 자체를 설명해주실수 없을까요?

밑의 명령문은 참고용으로 한번 올려봅니다. 제발 봐주세요. 진심으로 짤릴거 같애요;

 

 맨처음 index.php 보니까..   

 

 $oContext = &Context::getInstance();
    $oContext->init();

    if($oContext->checkSSO()) {
        $oModuleHandler = new ModuleHandler();
        if($oModuleHandler->init()) {
            $oModule = &$oModuleHandler->procModule();
            $oModuleHandler->displayContent($oModule);
        }

    }

    $oContext->close();

 

 

이런식으로 되어있길래

Contex 보니까 아닌거 같구요..또 그다음에 oModuleHandler 보았거든요...근데 이것두 아닌거 같았어요;

 

지금 마지막으로 displayContent 보고 있는데 밑에 php문이거든요..

 

정말 하나도 모르겠습니다..그냥 제가 보고 있는 이걸 분석하면 원하는걸 얻을수 있는지 알고싶어요

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<?php
    /**
    * @class DisplayHandler
    * @author zero (zero@nzeo.com)
    * @brief 데이터 출력을 위한 class (XML/HTML 데이터를 구분하여 출력)
    *
    * Response Method에 따라서 html or xml 출력방법을 결정한다
    * xml : oModule의 variables를 simple xml 로 출력
    * html : oModule의 template/variables로 html을 만들고 contents_html로 처리
    *        widget이나 layout의 html과 연동하여 출력
    **/

    class DisplayHandler extends Handler {

        var $content_size = 0; ///< 출력하는 컨텐츠의 사이즈

        var $gz_enabled = false; ///< gzip 압축하여 컨텐츠 호출할 것인지에 대한 flag변수

        /**
         * @brief 모듈객체를 받아서 content 출력
         **/
        function printContent(&$oModule) {

            // gzip encoding 지원 여부 체크
            $this->gz_enabled = Context::isGzEnabled();

            // header 출력
            $this->_printHeader();
            // request method에 따른 처리
            if(Context::getRequestMethod() == 'XMLRPC') $content = $this->_toXmlDoc($oModule);
            else if(Context::getRequestMethod() == 'JSON') $content = $this->_toJSON($oModule);
            else $content = $this->_toHTMLDoc($oModule);

            // 요청방식에 따라 출력을 별도로
            if(Context::getResponseMethod()=="HTML") {

                // 관리자 모드일 경우 #xeAdmin id를 가지는 div 추가
                if(Context::get('+ '+ 'module')!='admin' && strpos(Context::get('act'),'Admin'+ ')>0) $content = '<div id="xeAdmin">'.$content.'</div>';

                // 내용을 content라는 변수로 설정 (layout에서 {$content}에서 대체됨)
                Context::set('content', $content);

                // 레이아웃을 컴파일
                if(__DEBUG__==3) $start = getMicroTime();
                $oTemplate = &TemplateHandler::getInstance();

                // layout이라는 변수가 none으로 설정되면 기본 레이아웃으로 변경
                if(Context::get('layout') != 'none') {
                    $layout_path = $oModule->getLayoutPath();
                    $layout_file = $oModule->getLayoutFile();
                    $edited_layout_file = $oModule->getEditedLayoutFile();
                }
                if(!$layout_path) $layout_path = './common/tpl/';
                if(!$layout_file) $layout_file = 'default_layout.html';

                // 현재 요청된 레이아웃 정보를 구함
                $oLayoutModel = &getModel('layout');
                $current_module_info = Context::get('current_module_info');
                $layout_srl = $current_module_info->layout_srl;

                // 생성된 레이아웃과 연결되어 있으면 처리
                if($layout_srl > 0){
                    $layout_info = Context::get('layout_info');

                    // faceoff 레이아웃일 경우 별도 처리
                    if($layout_info && $layout_info->type == 'faceoff') {
                        $oLayoutModel->doActivateFaceOff($layout_info);
                    }

                    // 관리자 레이아웃 수정화면에서 변경된 CSS가 있는지 조사
                    $edited_layout_css = $oLayoutModel->getUserLayoutCss($layout_srl);


                    if(file_exists($edited_layout_css)) Context::addCSSFile($edited_layout_css,true,'all','',100);
                }
                Context::set('layout_info', $layout_info);

                $zbxe_final_content = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file);
                if(__DEBUG__==3) $GLOBALS['__layout_compile_elapsed__'] = getMicroTime()-$start;


                // 각 위젯, 에디터 컴포넌트의 코드 변경
                if(__DEBUG__==3) $start = getMicroTime();

                $oContext = &Context::getInstance();
                $zbxe_final_content= $oContext->transContent($zbxe_final_content);

                if(__DEBUG__==3) $GLOBALS['__trans_widget_editor_elapsed__'] = getMicroTime()-$start;

                // 최종 결과를 common_layout에 넣어버림
                Context::set('zbxe_final_content', $zbxe_final_content);

                $output = $oTemplate->compile('./common/tpl', 'common_layout');

                // 사용자 정의 언어 변경
                $oModuleController = &getController('module');
                $oModuleController->replaceDefinedLangCode($output);


            } else {
                $output = $content;
            }

            // 애드온 실행
            $called_position = 'before_display_content';
            $oAddonController = &getController('addon');
            $addon_file = $oAddonController->getCacheFilePath();
            if(file_exists($addon_file)) @include($addon_file);

            $this->content_size = strlen($output);

            // 컨텐츠 출력
            $this->display($output);
        }

        /**
         * @brief 최종 결과물의 출력
         **/
        function display($content) {
            $content .= $this->_debugOutput();

            // 출력하기 전에 trigger 호출 (after)
            ModuleHandler::triggerCall('display', 'after', $content);

            if($this->gz_enabled) print ob_gzhandler($content, 5);
            else print $content;

        }

        /**
         * @brief RequestMethod가 JSON이면 JSON 데이터로 컨텐츠 생성
         **/
        function _toJSON(&$oModule) {
            $variables = $oModule->getVariables();
            $variables['error'] = $oModule->getError();
            $variables['message'] = $oModule->getMessage();
            //if(function_exists('json_encode')) return json_encode($variables);
            //else return json_encode2($variables);
            $json = str_replace("\r\n",'\n',json_encode2($variables));
            return $json;
        }


        /**
         * @brief RequestMethod가 XML이면 XML 데이터로 컨텐츠 생성
         **/
        function _toXmlDoc(&$oModule) {
            $variables = $oModule->getVariables();

            $xmlDoc  = "<response>\n";
            $xmlDoc .= sprintf("<error>%s</error>\n",$oModule->getError());
            $xmlDoc .= sprintf("<message>%s</message>\n",str_replace(array('<','>','&'),array('&lt;','&gt;','&amp;'),$oModule->getMessage()));

            $xmlDoc .= $this->_makeXmlDoc($variables);

            $xmlDoc .= "</response>";

            return $xmlDoc;
        }

        function _makeXmlDoc($obj) {
            if(!count($obj)) return;

            $xmlDoc = '';

            foreach($obj as $key => $val) {
                if(is_numeric($key)) $key = 'item';

                if(is_string($val)) $xmlDoc .= sprintf('<%s><![CDATA[%s]]></%s>%s', $key, $val, $key,"\n");
                else if(!is_array($val) && !is_object($val)) $xmlDoc .= sprintf('<%s>%s</%s>%s', $key, $val, $key,"\n");
                else $xmlDoc .= sprintf('<%s>%s%s</%s>%s',$key, "\n", $this->_makeXmlDoc($val), $key, "\n");
            }


            return $xmlDoc;
        }

        /**
         * @brief RequestMethod가 XML이 아니면 html 컨텐츠 생성
         **/
        function _toHTMLDoc(&$oModule) {
            // template handler 객체 생성
            $oTemplate = &TemplateHandler::getInstance();

            // module tpl 변환
            $template_path = $oModule->getTemplatePath();
            $tpl_file = $oModule->getTemplateFile();
            return $oTemplate->compile($template_path, $tpl_file);
        }

        /**
         * @brief content size return
         **/
        function getContentSize() {
            return $this->content_size;
        }

        /**
         * @brief 디버그 모드일 경우 디버깅 메시지 출력
         *
         * __DEBUG__ 값이 1 이상이면 __DEBUG_OUTPUT__ 값에 따라 메시지 출력.
         * __DEBUG__를 세팅하고, __DEBUG_OUTPUT__ == 0 이면
         * tail -f ./files/_debug_message.php로 하여 console로 확인하면 편리함
         **/
        function _debugOutput() {
            if(!__DEBUG__) return;

            $end = getMicroTime();

            // Firebug 콘솔 출력
            if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '5.2.0', '>=')) {
                static $firephp;
                if(!isset($firephp)) $firephp = FirePHP::getInstance(true);

                if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
                    $firephp->fb('Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php', 'The IP address is not allowed.');
                    return;
                }

                // 전체 실행 시간 출력, Request/Response info 출력
                if(__DEBUG__ & 2) {
                    $firephp->fb(
                        array('Request / Response info >>> '.$_SERVER['REQUEST_METHOD'].' / '.Context::getResponseMethod(),
                            array(
                                array('Request URI', 'Request method', 'Response method', 'Response contents size'),
                                array(
                                    sprintf("%s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']),
                                    $_SERVER['REQUEST_METHOD'],
                                    Context::getResponseMethod(),
                                    $this->getContentSize().' byte'
                                )
                            )
                        ),
                        'TABLE'
                    );
                    $firephp->fb(
                        array('Elapsed time >>> Total : '.sprintf('%0.5f sec', $end - __StartTime__),
                            array(array('+ 'DB queries', 'class file load', 'Template compile', 'XmlParse compile', 'PHP', 'Widgets', 'Trans widget&editor'),
                                array(
                                    sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']),
                                    sprintf('%0.5f sec', $GLOBALS['__elapsed_class_load__']),
                                    sprintf('%0.5f sec (%d called)', $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']),
                                    sprintf('%0.5f sec', $GLOBALS['__xmlparse_elapsed__']),
                                    sprintf('%0.5f sec', $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']),
                                    sprintf('%0.5f sec', $GLOBALS['__widget_excute_elapsed__']),
                                    sprintf('%0.5f sec', $GLOBALS['__trans_widget_editor_elapsed__'])
                                )
                            )
                        ),
                        'TABLE'
                    );
                }

                // DB 쿼리 내역 출력
                if((__DEBUG__ & 4) && $GLOBALS['__db_queries__']) {
                    $queries_output = array(array('Query', 'Elapsed time', 'Result'));
                    foreach($GLOBALS['__db_queries__'] as $query) {
                        array_push($queries_output, array($query['query'], sprintf('%0.5f', $query['elapsed_time']), $query['result']));
                    }


                    $firephp->fb(
                        array(
                            'DB Queries >>> '.count($GLOBALS['__db_queries__']).'+ ' Queries, '.sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']),
                            $queries_output
                        ),
                        'TABLE'
                    );
                }


            // 파일 및 HTML 주석으로 출력
            } else {

                // 전체 실행 시간 출력, Request/Response info 출력
                if(__DEBUG__ & 2) {
                    // Request/Response 정보 작성
                    $buff .= "\n- Request/ Response info\n";
                    $buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']);
                    $buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']);
                    $buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod());
                    $buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->getContentSize());

                    // 전체 실행 시간
                    $buff .= sprintf("\n- Total elapsed time : %0.5f sec\n", $end-__StartTime__);

                    $buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']);
                    $buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']);
                    $buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']);
                    $buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']);

                    // 위젯 실행 시간 작성
                    $buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']);

                    // 레이아웃 실행 시간
                    $buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']);

                    // 위젯, 에디터 컴포넌트 치환 시간
                    $buff .= sprintf("\n\tTrans widget&editor elapsed time: %0.5f sec\n", $GLOBALS['__trans_widget_editor_elapsed__']);
                }


                // DB 로그 작성
                if(__DEBUG__ & 4) {
                    if($GLOBALS['__db_queries__']) {
                        $buff .= sprintf("\n- DB Queries : %d Queries. %0.5f sec\n", count($GLOBALS['__db_queries__']), $GLOBALS['__db_elapsed_time__'+ ']);
                        $num = 0;

                        foreach($GLOBALS['__db_queries__'] as $query) {
                            $buff .= sprintf("\t%02d. %s\n\t\t%0.6f sec. ", ++$num, $query['query'], $query['elapsed_time']);
                            if($query['result'] == 'Success') {
                                $buff .= "Query Success\n";
                            } else {
                                $buff .= sprintf("Query $s : %d\n\t\t\t   %s\n", $query['result'], $query['errno'], $query['errstr']);
                            }
                        }
                    }
                }

                // HTML 주석으로 출력
                if(__DEBUG_OUTPUT__ == 1 && Context::getResponseMethod() == 'HTML') {
                    $buff = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true));

                    if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
                        $buff = 'The IP address is not allowed. Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php';
                    }

                    return "<!--\r\n".$buff."\r\n-->";
                }

                // 파일에 출력
                if(__DEBUG_OUTPUT__ == 0) {
                    $debug_file = _XE_PATH_.'files/_debug_message.php';
                    $buff = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true));

                    $buff = str_repeat('=', 40)."\n".$buff.str_repeat('-', 40);
                    $buff = "\n<?php\n/*".$buff."*/\n?>\n";

                    if(@!$fp = fopen($debug_file, 'a')) return;
                    fwrite($fp, $buff);
                    fclose($fp);
                }
            }
        }


        /**
         * @brief RequestMethod에 맞춰 헤더 출력
         ***/
        function _printHeader() {
            if($this->gz_enabled) header("Content-Encoding: gzip");
            if(Context::getResponseMethod() == 'JSON') return $this->_printJSONHeader();
            else if(Context::getResponseMethod() != 'HTML') return $this->_printXMLHeader();
            else return $this->_printHTMLHeader();
        }

        /**
         * @brief xml header 출력 (utf8 고정)
         **/
        function _printXMLHeader() {
            header("Content-Type: text/xml; charset=UTF-8");
            header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
            header("Cache-Control: no-store, no-cache, must-revalidate");
            header("Cache-Control: post-check=0, pre-check=0", false);
            header("Pragma: no-cache");
        }

        /**
         * @brief html header 출력 (utf8 고정)
         **/
        function _printHTMLHeader() {
            header("Content-Type: text/html; charset=UTF-8");
            header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
            header("Cache-Control: no-store, no-cache, must-revalidate");
            header("Cache-Control: post-check=0, pre-check=0", false);
            header("Pragma: no-cache");
        }

        /**
         * @brief JSON header 출력 (utf8 고정)
         **/
        function _printJSONHeader() {
            header("Content-Type: text/html; charset=UTF-8");
            header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
            header("Cache-Control: no-store, no-cache, must-revalidate");
            header("Cache-Control: post-check=0, pre-check=0", false);
            header("Pragma: no-cache");
        }
    }
?>

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
namsman 추천수로 이미지를 링크해서 불러오는데요, 추천없을시 이미지를.... [1] 2010.08.27 by guny
ACLNHOM 페이지/게시판 생성이 안됩니다 도와주세요 file  
mizz416 아이피 차단을 코멘트에도 적용시킬 수 없나요? [1] 2010.08.27 by ilovesyr
헐Rank 게시판 상에서 회원가입이 안되요 file  
빛의바다 모듈 스킨중에 온라인견적문의를 할 수 있는 스킨이 있을까요?? [1] 2010.08.27 by 디자이너리군
시나브로74 텍스타일 생성에 대해서 [1] 2010.08.27 by 디자이너리군
불고구미 비회원 댓글권한 문제! 급합니다. ㅠ.ㅠ  
뺑두비쌈2 다락방서버 설치가 안됩니다. file  
BST1 로그인 후에 나타나는 정보 없애기 [1] 2010.08.27 by 롤리^^
Migguragi 카운터 불일치 [1] 2010.08.27
dorudoru 제로보드xe에서 자기 포인트 확인은 어떻게 하나요? [1] 2010.08.27 by mindpainter
purunbada 홈페이지와 게시판 배경색, 글자색? [1] 2010.08.27 by mindpainter
소울개구리 XE 설치 오류 file  
인형의기사 이게 가능할까요?  
jeni660 게시판 Rewrite모드 [2] 2010.08.27 by jeni660
닌데 접속표시...위젯 file  
전수용701 홈페이지가 이상해요..  
InDesign "XE Official Ver2" 레이아웃에서 카테고리로 이동시 오류 수정하는 방법 좀이요. [1] 2010.08.26 by 문양호
나그네138 나모에서 제작된 페이지...  
mae Naver Syndication 서버 등록을 아예 안하는듯합니다 .. !? file  
하나로45 글쓰기가 안됩니다.  
쿠호인 xe1.2.0 버젼 메뉴관련 php 해석좀 해주실수 없나요..?  
하람비 우편번호 관리  
REGOLITH 갑자기 이상하네요...  
최종기485 버전업 후에 레이아웃 적용이 안되고 로그인 안됨 [3] 2010.08.26 by 라르게덴
글로벌 메인페이지 우측상단 로그인위젯 글자색변경 [1] 2010.08.26 by 오르막
Happiness 1.4.3.1로 업데이트 후 완전 백지..  
야고비 다시 부탁드립니다. 최근 글(Content) 위젯이 안됩니다. 부디 절 좀 도와주세요.. 감사합니다. [1] 2010.08.26 by 로이lee
세상의지배자 인쇄영역에 수정된 회원정보 불러오기 방법 file  
헤르메스­ 모바일뷰로 홈페이지 볼때 이미지 사이즈 [1] 2010.08.26 by 백성찬