묻고답하기

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 남기남
유니버스 게시판글을 정렬하는 SQL을 수정하려고합니다.  
zartin 추천 시 게시물이 다른 게시판으로 이동하는 게시판은? [1] 2013.07.31 by 쿨럭이
쿨럭이 if문 결과값 해결좀 부탁합니다... [1] 2013.07.31 by sejin7940
참치찌개 게시글 ip 출력 건 [1] 2013.07.31 by sejin7940
아기나옹이 파일 용량 제한을 관리자 제외가 아니고 싶습니다 [4] 2013.07.31 by 아기나옹이
안드로이더스스 위젯이 제대로뜨질않내요 [2] 2013.07.31 by sejin7940
루노서비스 게시판 가장 최근버전 받아서 설치했는데. [1] 2013.07.31 by sejin7940
xelomero 글 작성시 고정글을 보여줄 수 있나요? [1] 2013.07.31 by sejin7940
마도니 1.7.3.4에서 같은 모듈연결 [1] 2013.07.31 by sejin7940
궁굼자 탭형식 최신글 보기 위젯 궁금증 [1] file 2013.07.31 by sejin7940
착한부산남자 회원정보 볼때 이메일 전부 *로 처리 못하나요? [1] 2013.07.31 by sejin7940
궁굼자 PHP어드민을 이용한 백업 궁금증 [1] 2013.07.31 by sejin7940
오락실주인 확장변수 관리자 + 쓴사람 만 보게 할수있나요 ? [1] file 2013.07.31 by 심플XE
kinyenug 멀티미디어링크  
지수임 게시글 작성시 관리자에게 메일보내기 에서 from 값 설정관련-답변 부탁드려요~  
아싸로또1등맞고싶어 레이아웃스킨 우측 스크롤 질문 할게요(본문영역이짤려요)  
kinyenug 게시판 질문요! [1] file 2013.07.31
닌디 아파치 문서 우선순위를 html php 순서로 사용시 문제  
ㄱㄴㄷㄹ 글자수 제한 어떻게 하나요 [1] 2013.07.31 by 쿨럭이
Fidelity 바로 편집이 가능하게 하려면? [4] 2013.07.31 by 착한부산남자
BST1 플래쉬를 레이어로 띄우기  
Fidelity 확장변수 이렇게는 이용 못하나요? [1] file 2013.07.31
소소한감성 문서페이지에서 빈틈에 관련하여 질문올려요 file  
달에소년 xe 1.4.5.9 업데이트 질문드립니다. ㅠㅠ [2] 2013.07.31 by pentopen
klala 댓글에 meta가 따라 붙습니다 [1] 2013.07.31 by pentopen
pooh69 화일 손상? 복구 가능한지요.. [1] 2013.07.31
에키 413에러메세지 관련 질문 [1] 2013.07.31 by 참치.k
리게 수정해주시면 사례 하겠습니다. 분류 에러 [1] file 2013.07.30 by sejin7940
Goooooo IE8에서 로그인 에러....지정된 모듈을 찾을 수 없습니다. [1] file 2013.07.30
xe를 사용해 처음 홈을 만들어봤는데, 회원가입이 되지 않습니다ㅠㅠ