묻고답하기

아래 첨부한대로 xeAtoms.class.php를 만들어 보았습니다. 적색으로 표현한 부분을 지우면 에러가 없어지는데요.

그부분이 데이타를 가져오는 부분이라서리...

배열 구조를 잘못 짠 것 같은데... 어떻게 해야 하는지 조언부탁드립니다.

증상--------------------------

적색 부분을 제거하고 위젯을 첨부하면 첨부가 됩니다.

그 상태에서 코드에 적색 부분을 추가하면 문제없이 출력은 됩니다.

 

그러나 적색부분이 있는 상태에서 위젯을 첨부하려고 하면 unexpected error가 뜨네요.

---------------------------------------------------------------------------------------------

 

<?php

    class xeAtoms extends WidgetHandler {
 

       function proc($args) {

            $connect = mysql_connect('localhost','astere','anti2231');
            $selectdb = mysql_select_db("astere",$connect);
            $query = "select * from periodic_table";
            $result = mysql_query($query,$connect);
            $atoms = array();
            while($output = mysql_fetch_array($result)){
                $atom->Number = $output[No];
                $atom->Symbol = $output[Symbol];
                $atom->Name = $output[Name];
                $atom->Category = $output[Category];
                $atom->Weight = $output[Weight];
                $atom->Group = $output[Party];
                $atom->Period = $output[Period];
                $atom->Block = $output[Block];
                $atom->Electron = $output[Electron];
                $atom->Phase = $output[Phase];
                $atom->MP = str_replace("CCC", "℃", $output[MP]);
                $atom->BP = str_replace("CCC", "℃", $output[BP]);
                $atom->Density = str_replace("CCC", "℃", $output[Density]);
                $atom->Color = $output[Color];
                $atom->IE = $output[IE];
                $atom->EA = $output[EA];
                $atom->EN = $output[EN];
                $atom->CR = $output[CR];
                $atom->AR = $output[AR];
                $atom->IR = $output[AR];
                $atom->EF = $output[EF];
                $atom->EV = $output[EV];
                $atom->Discovery = $output[Discovery];
                $atoms[$output[No]] = $atom;
                unset($atom);
            }
            mysql_close($connect);
            Context::set('atoms', $atoms);

 

            $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
            Context::set('colorset',$args->colorset);

 

             $tpl_file = 'list';

 

            $oTemplate = &TemplateHandler::getInstance();
            return $oTemplate->compile($tpl_path, $tpl_file);
        }
    }
?>

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
최태현913 쪽지 보내기에서 배경 칼러 변경 [2] 2008.07.08 by 최태현
코보 배경색은 검은색, 폰트는 흰색으로 적용할렴  
럭셔리퀸 회원가입이 안됩니다. [1] 2008.07.08 by 덱스터
seojungh 하단메뉴 없이 사용하는 방법이 없나요? [1] 2008.07.08 by 덱스터
정연태363 windows 2003서버에 apm_setup으로 서버를 운영중입니다. 서버의 다른 폴더에는 업로드, 삭제 등 다 잘되는데 zbxe를 설치한 폴더에는 업로드,삭제, 덮어쓰기가 안되네요.. [1] 2008.07.08 by 백성찬
꼰미남 알 FTP에서 권한설정하는 방법좀 알려주세요 [2] 2008.07.08 by 꼰미남
제로꽝 플래시로 상단 메뉴바 만들고 싶은데 어디가야 강좌를 볼 수 있나요? [3] 2008.07.08 by 때린데 또때려
라디오의꿈 제로보드4용 레이아웃 게시판은 사라졌나요?? [2] 2008.07.08 by 라디오의꿈
피랜세이 전체글보기 : 게시판 여러개를 합하여, 하나의 게시판으로 할수 있을까요? [3] 2008.07.08 by 라르게덴
왜만지냐 본문내 이미지 조절 애드온 일반페이지 적용문제 [4] 2008.07.08 by 왜만지냐
사랑지킴이84 방명록 생성하는데 궁굼한게 있어서요... 답변좀 해주세요... [2] 2008.07.08 by 사랑지킴이84
미노기 캐시파일 재생성이 글꼴 깨지는 현상 [4] file 2008.07.08 by 미노기
마이무라 상단메뉴 없앨수있나요 [2] file 2008.07.08 by 백성찬
하이우리 이미지 출력이 안돼네요 답변점 부탁드립니다. [1] 2008.07.08 by 백성찬
seojungh 레이아웃에 어느 부분을 지워야 하는지? [2] 2008.07.08 by 때린데 또때려
장우136 비밀글 읽기 권한을 특정 그룹에게 부여하려면  
123 이부분을 지우고싶어요 ㅠㅠ (스샷첨부) [2] file 2008.07.08 by 123
123 게시판에서 로그인 버튼만 남기고 나머지 없애기.. ㄷㄷ [1] 2008.07.08 by 필로스
ZeroCool610 경로질문좀할께요 선배님들~~~~ [1] 2008.07.08 by 탑심
ㅈㄲㅎㅎㄹ ♥위젯사용 도와주세요~ [1] 2008.07.08 by 老姜君