묻고답하기

http://www.curriculum.or.kr/menu3-3.php게시물을 키워드로 검색을 하면 게시물이 찾아집니다. 페이지수가 정상적으로 보여지는데

두 번째 페이지 이후로는 클릭을 하면 보여지질 않습니다. ㅠㅠ;

검색방법이 "저자로 검색" 과 "키워드로 검색" 두 가지가 있는데요 키워드로 검색을 하면

예를 들어 "교사"라는 검색어를 이용하여 검색하면 검색된 게시물이 73개가 나오고

아래 페이지수가 15페이지가 나옵니다.  그런데 첫 번째 페이지 게시물만 정상적으로

보여지고 두 번째 페이지부터는 클릭을 하면 연결이 되지 않습니다. ㅠㅠ;

소스를 아무리 봐도 뭐가 잘못인지 잘 모르겠습니다.  고수님들의 도움 꼭...부탁드립니다.


아래 사이트입니다.

http://www.curriculum.or.kr/menu3-3.php



죄송합니다. ^^; 소스를 무식하게 올려봅니다.

<?php
if($menu33mode==get_file) {
        include("_head.php");
        if(!$member[no]) {
                echo "<script>alert('회원만 다운로드 가능합니다.'); history.go(-1);</script>";
                exit;
        }
        pr_get_file();        
        exit;
}else if($menu33mode==delete_file) {
        include("_head.php");
        if(($member[level]>3)||(!$member[level])) {
                echo "<script>alert('권한이 없습니다.'); history.go(-1);</script>";
                exit;
        }else {
                pr_delete_file();
                exit;
        }
}else if($menu33mode==up_file) {
        include("./_head.php");
        if(($member[level]>3)||(!$member[level])) {
                echo "<script> alert('권한이 없습니다!'); history.go(-1); </script>";
                exit;
        }
        ?>
        <style>
        <!-- @import url("./style.css"); -->
        </style>
        <script language="javascript">
        <!--
        function check_submits() {
                 if(!write.input_title.value) {alert("제목을 입력하여 주십시요.");write.input_title.focus(); return false;}
                 if(!write.input_file.value) {alert("파일을 입력하여 주십시요.");write.input_file.focus(); return false;}
                 if(!write.input_yearmade.value) {alert("연도를 입력하여 주십시요.");write.input_yearmade.focus(); return false;}
                 if(!write.input_monthmade.value) {alert("연도를 입력하여 주십시요.");write.input_monthmade.focus(); return false;}
        }
        -->
        </script>
        <center><br>
        새 글 등록<p>
        <table cellspacing=1 cellpadding=5 width=90% style="border-style:solid;border-width:1px;border-color:#C3822C;">
        <form name=write action=menu3-3publicationlist.php method=post enctype=multipart/form-data onsubmit="return check_submits();">
                <input type=hidden name=menu33mode value=up_file_ok>
        <tr>
                <td width=80 align=center bgcolor=#FFCB65>제목</td>
                <td bgcolor=#F9F6EF>  <input type=text name=input_title size=50 class=zv3_input></td>
        </tr>
        <tr>
                <td width=80 align=center bgcolor=#FFCB65>키워드</td>
                <td bgcolor=#F9F6EF>  <input type=text name=input_keywords size=50 class=zv3_input></td>
        </tr>
        <tr>
                <td align=center bgcolor=#FFCB65>저자</td>
                <td bgcolor=#F9F6EF>  <input type=text name=input_writer size=30 maxlength=100 class=zv3_input>
        </tr>
        <tr>
                <td align=center bgcolor=#FFCB65>간행물</td>
                <td bgcolor=#F9F6EF>  <select name=kan_publication class=zv3_input onChange="javascript:searchpublication(1);">
                <option value=1 <? if($kan==1) echo "selected"; ?>>교육과정연구</option>
                <option value=2 <? if($kan==2) echo "selected"; ?>>교육과정연구의 과제</option>
                <option value=3 <? if($kan==3) echo "selected"; ?>>연차학술대회 발표논문 토론집</option>
                </select>
        </tr>
        <tr>
                <td align=center bgcolor=#FFCB65>페이지 수</td>
                <td bgcolor=#F9F6EF>  <input type=text name=input_numofpages size=4 maxlength=4 class=zv3_input> 페이지
        </tr>
        <tr>
                <td align=center bgcolor=#FFCB65>권</td>
                <td bgcolor=#F9F6EF>  <input type=text name=input_kwon size=4 maxlength=4 class=zv3_input> 권
        </tr>
        <tr>
                <td align=center bgcolor=#FFCB65>호</td>
                <td bgcolor=#F9F6EF>  <input type=text name=input_ho size=4 maxlength=4 class=zv3_input> 호
        </tr>
        <tr>
                <td align=center bgcolor=#FFCB65>파일</td>
                <td bgcolor=#F9F6EF>  <input type=file name=input_file size=50 class=zv3_input></td>
        </tr>
        <tr>
                <td align=center bgcolor=#FFCB65>만들어진 연도</td>
                <td bgcolor=#F9F6EF>  <input type=text name=input_yearmade size=4 maxlength=4 class=zv3_input> 년
        </tr>
        <tr>
                <td colspan=2 align=center><input type=image src=./images/btn_writeok.gif> <a href="javascript:history.back();"> <img src=./images/btn_writecancel.gif border=0></a></td>
        </tr>
        </form>
        </table>
<?php        
        exit;
}else if($menu33mode==up_file_ok) {
        include("./_head.php");
        if(($member[level]>3)||(!$member[level])) {
                echo "<script> alert('권한이 없습니다!'); history.go(-1); </script>";
                exit;
        }

        $input_kwon=trim($input_kwon);
        $input_kan=trim($input_kan);
        $input_ho=trim($input_ho);
        if($input_file_size>10000000)
        {
                echo "<SCRIPT language="JavaScript">
                        <!--         
                                alert('+ '+ '10메가 파일까지만 올릴 수 있습니다.');         
                                history.go(-1);
                        //--> </script> ";
                exit;
        }
        $query="select no from curriculum_publication order by no DESC";
        $result=mysql_query($query);
        if(mysql_num_rows($result)>0) {         
                $row=mysql_fetch_row($result);
                $no=$row[0]+1;
        } else $no=1;
        
        $originalfilename=$input_file_name; $save_file=$no; // 데이터 자료실 경로 지정
        $datapath = "./publication/"; /* 업로드 파일 처리 */
        if ($input_file)
        {        // 파일 복사하기         
                if (!copy ($input_file,$datapath.$save_file)) {                 
                        echo "<SCRIPT language="JavaScript">                 
                        <!--                                 
                                        alert("파일 복사중 에러가 났습니다.");         
                                        history.go(-1);                         
                        //-->                 
                        </script>";                         
                        exit ;                 
                }
        }
        $time=time();
        $query="insert into curriculum_publication values($no,'$input_title','$input_writer','$time',0,$input_kwon,$input_ho,'$input_yearmade',$input_numofpages,$kan_publication,'$input_keywords','$input_file_name',$input_file_size)";
        if(mysql_query($query)) {
                echo "<SCRIPT language="JavaScript"> <!--         
                        alert('성공적으로 업로드하였습니다!!');
                          //-->
                         </script> ";
                movepage("./menu3-3publicationlist.php");
        }else {
                echo "<SCRIPT language="JavaScript"> <!--         
                        alert('파일 등록중 에러가 났습니다!!');
                         history.go(-1); //-->
                         </script> ";
        }
        
        exit;
}
include("_head.php");
$limit=5; // 한화면에 표시
if(!$searchword) {
        if(!$kan) $kan=1;
        if(!$kwon) {
                $result=mysql_query("select * from curriculum_publication where kan=$kan order by kwon DESC");
                $line=@mysql_fetch_array($result);
                $kwon=$line["kwon"];
        }
        if(!$ho) {
                $result=mysql_query("select * from curriculum_publication where kan=$kan and kwon=$kwon order by ho DESC");
                $line=@mysql_fetch_array($result);
                $ho=$line["ho"];
        }
        $result=mysql_query("select * from curriculum_publication where kan=$kan and kwon=$kwon and ho=$ho order by no DESC");
}else {
        if($searchmode=="keywordmode")
        $result=mysql_query("select * from curriculum_publication where (title like '%".$searchword."%') or (keywords  like '%".$searchword."%') order by no DESC");
        else
        $result=mysql_query("select * from curriculum_publication where  (writer  like '%".$searchword."%') order by no DESC");
}
if(!$pageno) $pageno=1;
?>

<style>
<!-- @import url("./style.css"); -->
</style>
<body>
<center><br>
<script language="javascript">
<!--
function check_submits() {
         if(!search.searchword.value) {alert("검색어를 입력하여 주십시요.");search.searchword.focus(); return false;}
}
-->
</script>
<table border=0 cellpadding=0 cellspacing=0 width=90%>
<tr><form method=post name=search action=./menu3-3publicationlist.php onsubmit="javascript:check_submits();">
        <td valign=middle align=right height=40 colspan=2><font color=#666666>검색 : <input type=text name=searchword size=30 maxlength=100 class=zv3_input align=absmiddle> <input type=image src=./images/btn_search.gif align=absmiddle><br><input type=radio name=searchmode value="namemode">저자 이름으로 검색 <input type=radio name=searchmode value="keywordmode" checked>키워드로 검색
        </td>
   </form>
</tr>
<tr><td align=left valign=top>
        <font color=#666666>검색된 글 수 : <font color=#990000><b><?
                $numofarticles=@mysql_num_rows($result);
                echo $numofarticles;
        ?></td><td align=right valign=top>
        <?
                if($searchword) {
                        echo "<font color=#666666>검색어 : <font color=red><b>".$searchword."</b></font><font color=#666666>  (<font color=#990000>";
                        if($searchmode=="namemode") echo "저자 이름으로 검색";
                        else echo "키워드로 검색";
                        echo "<font color=#666666>)";
                }
                @mysql_data_seek($result,($pageno-1)*5);
                for($i=0;$i<$limit;$i++) {
                        $line=@mysql_fetch_array($result);
                        if(!$line["no"]) break;
                        else {
        ?></td>
</tr>
<tr>
        <td align=center colspan=2>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
                <td style="BORDER-BOTTOM: #CCCCCC 1px solid; border-top:#CCCCCC 1px solid; ">
                <table cellpadding="0" cellspacing="1" width="100%" bgcolor="#f7f7f7">
                <tr>
                        <td nowrap valign="top" width="30">
                        <b><?=$line["no"] ?> </b>: </td>
                        <td><b><a href="./menu3-3publicationlist.php?menu33mode=get_file&article_no=<?=$line["no"] ?>" style='cursor:hand;color:0033CC' onmouseover="this.style.color='ff3300'" onmouseout="this.style.color='0033CC'" target=_self><?=$line["title"] ?> </a></b>
                        <?php
                                if(($member[level]<4)&&($member[level]!=0)) echo "[<a href=menu3-3publicationlist.php?menu33mode=delete_file&article_no=".$line["no"]." onclick="javascript:return confirm('정말 삭제하시겠습니까?'); " target=_self>삭제</a>]";
                        ?> 
                        </td>
                </tr>
                <tr>
                        <td nowrap valign="top" width="30"> </td>
                        <td><?=$line["writer"] ?></td>
                </tr>
                <tr>
                        <td nowrap valign="top" width="30" height="14"> </td>
                        <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                                <td width="62%"><? switch($line["kan"]) {
                                                        case 1:        echo "교육과정연구";break;
                                                        case 2:        echo "교육과정연구의 과제";break;
                                                        case 3:        echo "기타 간행물";break;
                                                        }
                                                 ?>  | <?=$line["yearmade"] ?>
                                </td>
                                <td width="38%">
                                <div align="right">
                                <span style="font-size:8pt;">
                                <a href="./menu3-3publicationlist.php?menu33mode=get_file&article_no=<?=$line["no"] ?>" target=_self>
                                
                                (<?=substr($line["originalfilename"],-3) ?> file / <?=$line["numofpages"] ?> pages / <?=$line["hits"] ?> hits) <?php
                                if(ereg("pdf$",strtolower($line["originalfilename"]))) {         
                                        echo "<img src=images/bulletpdf.gif border=0 align=absmiddle>";
                                }else if(ereg("hwp$",strtolower($line["originalfilename"]))) {         
                                        echo "<img src=images/bullethangul.gif border=0 align=absmiddle>";
                                }else if(ereg("doc$",strtolower($line["originalfilename"]))) {         
                                        echo "<img src=images/bulletword.gif border=0 align=absmiddle>";
                                }
                                ?>
                
                                </a>   
                                </span>
                                </div>
                                </td>
                        </tr>
                        </table>
                        </td>
                </tr>
                </table>
                </td>
        </tr>
        </table><br>
        <?php
                        }
                }
        ?>
        </td>
</tr>
<tr>
        <td align=center colspan=2>
<?php
/////////////////////// 페이지 수 시작
if(@mysql_num_rows($result)>0) {
        if((@mysql_num_rows($result)%$limit)==0) {
                $totalpagenum=@mysql_num_rows($result)/$limit;        
        }else {
                $totalpagenum=ceil(@mysql_num_rows($result)/$limit);
        }
}else $totalpagenum=0;
for($i=1;$i<=$totalpagenum;$i++) {
        if($pageno!=$i) {
                if($searchword) {
                        echo "<a href=./menu3-3publicationlist.php?pageno=".$i."&searchword=".$searchword." target=_self>$i</a> ";
                }else {
                        echo "<a href=./menu3-3publicationlist.php?pageno=".$i."&kan=".$kan."&kwon=".$kwon."&ho=".$ho." target=_self>$i</a> ";
                }

        }else {
                echo "<font color=#9CA2CF><b>$i</b></font> ";
        }
}
/////////////////////// 페이지 수 끝
?>
        </td>
</tr>
<tr>
        <td align=right colspan=2>
                <?php
                        if(($member[level]<4)&&($member[level]!=0)) echo "<a href=menu3-3publicationlist.php?menu33mode=up_file&pageno=".$i."&kan=".$kan."&kwon=".$kwon."&ho=".$ho." target=_self>새 글 등록</a>";
                ?> 
        </td>
</tr>
</table><?php
function pr_delete_file() {
        global $article_no;
        if(!unlink("./publication/".$article_no)) echo "<script>alert('삭제중 잘못되었습니다.'); history.go(-1);</script>";
        if(!mysql_query("delete from curriculum_publication where no=".$article_no)) echo "<script>alert('삭제중 잘못되었습니다.'); history.go(-1);</script>";
        else echo "<script>alert('삭제되었습니다.'); </script>";
        movepage("./menu3-3publicationlist.php");
}

function pr_get_file(){
        global $article_no;
        $fp=fopen("./config.php","r");
        fgets($fp);
        $DBhost=trim(fgets($fp));  
        $DBid=trim(fgets($fp));  
        $DBpasswd=trim(fgets($fp));  
        $DBname=trim(fgets($fp));  
        fclose($fp);
        $link=mysql_connect($DBhost,$DBid,$DBpasswd);
        if(mysql_select_db($DBname,$link)!=TRUE) die("데이터베이스 설정이 잘못되었습니다.");  

        $query="select originalfilename,ufs from curriculum_publication where no=".$article_no; // 쿼리스트링에서의 번호와 일치하는 레코드 선택..
        $result=mysql_query($query);         
        list($originalfilename,$ufs)=mysql_fetch_array($result);

        $path="./publication/".$article_no;

        $bfp = fopen($path, "rb");
        Header("Content-type: application1/newslettern");
        Header("Content-disposition: attachment; filename=$originalfilenamenn");
        $buf = fread($bfp, $ufs);
        printf("%s", $buf);
        flush();
        fclose($bfp);
        mysql_query("update curriculum_publication set hits=hits+1 where no=$article_no");
        exit(0);
} // 파일 다운로드할 때 프로시져
?>
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
박상배 제가 mysql4 버전을 깔았는데요...  
왕초보 고수님들 부탁드립니다. ㅠㅠ  
해피파로스 곱하기나 나누기 덧셈 뺄셈 태그 혹시 있는지요? [2] 2007.08.10
정일영 웹호스팅 PHP UPload 파일용량의 제한에 대해. [2] 2007.08.10
조영호 zboard 에러 [1] 2007.08.10
이태호 클릭해서 다음 사진 넘기기... [1] 2007.08.10
채영민 띄워지는 창크기를 임의대로 고정하고 싶습니다[급질문] [1] 2007.08.10
로엘 이미지 랜덤하게 바뀌는 스크립트를 쓰는데 중간에 자꾸 엑박이 나옵니다 [1] 2007.08.10
로카웹 끙...노프레임 홈페이지 만드려는데 테이블생성이 -_-  
servant 셀렉트매뉴의 타깃설정 [3] 2007.08.10
php,cgi 어렵네 스타일시트의 링크색 관련 질문입니다 [4] 2007.08.10
김기태 팝업창 한번뜨면 안뜨게하기  
김장수 질문 드립니다.  
해피파로스 곱하기나 나누기 덧셈 뺄셈 태그에 특정값을 주어 계산하는 방법 부탁합니다.. ^^ [1] 2007.08.10
park embed태그말고 멀티미디어(swf)불러오는 태그 부탁드립니다. [2] 2007.08.10
박정환 플래시 MX2004에서 메뉴를 만들때.. [1] 2007.08.10
초류향 이미지와 텍스트를 모두 loading 한 후에 페이지를 보여주는 태그가 뭐죠..답변 감사드립니다. [1] 2007.08.10
이하나 항상 이미지를 맨 아래에 뜨게 하는 방법 좀 가르쳐주세요 ㅠㅡㅠ [1] 2007.08.10
서형준 이 게시판 자료좀 얻을수 있을까요 ?  
MILDSKY mysql ...SQL쿼리좀 봐주세요 [1] 2007.08.10
나진호 윈도우 APM 관련 질문입니다.  
어서가세 포토샵 고수님들께 질문드립니다  
이태준 플래쉬 동영상에 대해서 [급질문]  
로카웹 홈페이지 스크롤이 안됨 ㅜㅜ  
김기정 노프레임, 아이프레임 구성하는 방법과 몇가지만 질문하겠습니다. [1] 2007.08.10
stylebiz 급하구 간단한 질문 하나만 할께요 ㅠㅠ [2] 2007.08.10
홀스 영어, 숫자만 되는 검색엔진 - 한글도 검색되게 할 순 없나요  
정종명 php 에서 필드에 값이 있나 확인하는방법... [1] 2007.08.10
DeificatioN PHP에 Class는 어느때 쓰는건가요??  
김용종 키워드로 검색된 게시물이 열리지 않습니다. ㅠㅠ