검색결과 "제목 리스트"

검색결과 "제목 리스트"

QA

검색결과 "제목 리스트"

본문

 

검색하면 검색결과

 

예>

겨울연.....   이런식으로 글자수 제한 가능할까요?

 

 

<?=cut_str($list[$i][wr_1],8,'...')?>  이건 여분필더  글자수 제한 하는방법인데 연구해볼려고해도

잘 안되네요...

 

 


 <?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 
?>
<?
function remove_tags_($str) 
{ 
    $str = html_entity_decode($str); 
    $str = ereg_replace("<[^>]*>","",$str); 
    $str = strip_tags($str); 
    return $str; 
};
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="<?=$search_skin_path?>/css/style.css" />
<!-- 헤더 -->
<script language="JavaScript"> 
function errors() 
{ 
 return true; 
} 
window.onerror = errors; 
</script>
</head>
<div class="boardHeader">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50" style="padding-left:10"><table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="40"><img src="<?=$search_skin_path?>/img/search.png" alt="" /></td>
    <td><h3> Search</h3></td>
  </tr>
</table></td>
    <td align="left" style="padding-left:15">(<b><?=$board_count?></b>개의 게시판, <b><?=number_format($total_count)?></b>개의 
                    게시글, <?=number_format($page)?>/<b><?=number_format($total_page)?></b> 
                    페이지)</td>
  </tr>
</table>
    
</div>
<!-- 헤더 끝 --><br><br>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p><font color="blue"><span style="font-size:12pt;">비회원은 검색기능 사용안됨</span></font></p>
</body>
<table cellspacing="0" width=100%>
    <col />
    <tr>
        <td valign="top" align="left">
            <div class="search">
                <?
                if($_GET[stx] != "")
                {
                ?>
                <!--검색 결과 출력-->
                <!-- 출력-->
                <? 
                    $k=0;
                    for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) 
                    {    //테이블 루프 시작
                ?>
                <br class='clear' />
                <!-- 검색된 게시판 이름-->
                <div class="subheader">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="20" ><a href='./board.php?bo_table=<?=$search_table[$idx]?>&<?=$search_query?>'><p><?=$bo_subject[$idx]?> 
                    - 
                    검색 결과</p></a></td><font color="blue">
</body>
        
                    <td width="200"  align="right" style="padding-right:35">
                        <img src="<?=$search_skin_path?>/img/arrow_sch.gif" alt="" /> <a href="./board.php?bo_table=<?=$search_table[$idx]?>&<?=$search_query?>">검색 결과 더 보기</a></td>
                  </tr>
                </table>
                </div>
                
                <!-- 검색된 게시판 끝-->
                <!-- 검색된 데이터들 출력 -->
                    
<p>         <?
                            $comment_href = "";
                            for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++)
                               {    //데이터 루프
                                   //썸네일 코드 시작
                                $img = $list[$idx][$i][wr_id];
                                $roo = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$search_table[$idx]' and wr_id = '$img' and bf_no = '0' ");
                                $data_path = $g4['path'] . "/data/file/{$search_table[$idx]}";//라이브러리 파일 참조
                                $thumb_path = $data_path . '/thumbSearch';
                                $sch_w = 80; //썸네일 가로사이즈
                                $sch_h = 100; //썸네일 세로사이즈
                                $sch_q = 100; //썸네일 퀼리티
                                //디렉토리 생성
                                if (!is_dir($thumb_path)) {
                                    ($thumb_path, 0707);
                                    @chmod($thumb_path, 0707);
                                }
                                $filename = $roo[bf_file]; //파일명
                                //if($filename != "")
                                {
                                    $thumb = $thumb_path.'/'.$filename; //썸네일
                                    if (!file_exists($thumb))
                                    {
                                        $file = $data_path.'/'.$filename; //원본
                                        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
                                        {
                                            $size = getimagesize($file);
                                            if ($size[2] == 1)
                                                $src = imagecreatefromgif($file);
                                            else if ($size[2] == 2)
                                                $src = imagecreatefromjpeg($file);
                                            else if ($size[2] == 3)
                                                $src = imagecreatefrompng($file);
                                            else
                                                continue;
                                            $rate = $sch_w / $size[0];
                                            $height = (int)($size[1] * $rate);
                                            if ($height < $sch_h)
                                                $dst = imagecreatetruecolor($sch_w, $height);
                                            else
                                                $dst = imagecreatetruecolor($sch_w, $sch_h);
                                            imagecopyresampled($dst, $src, 0, 0, 0, 0, $sch_w, $height, $size[0], $size[1]);
                                            imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
                                            chmod($thumb_path.'/'.$filename, 0707);
                                        }
                                    }
                                }
                                //else
                                {
                                    //$thumb = "";
                                }
                                if (file_exists($thumb) && $filename != "")
                                    $img = $thumb;
                                else
                                    $img = "";
                                $iscmt = "";
                                if ($list[$idx][$i][wr_is_comment]) 
                                {
                                    $iscmt = "<font color=999999>[코멘트]</font> ";
                                    $comment_href = "#c_".$list[$idx][$i][wr_id];
                                }
                ?>
                <div class="item_text">
                    <table cellspacing="0">
                    <? if($img == ""){ ?>
                    <col width="0" />
                    <? } else { ?>
                    <col width="<?=$sch_w?>" />
                    <? } ?>
                    <col/>
                        <tr>
                            <td valign=top><? if ($img != "") { ?><table width="100%"  cellspacing="3" cellpadding="3" style="position:relative; border:1px solid #e4e4e4"; bgcolor="#ffffff">
  <tr>
    <td><a href='<?=$list[$idx][$i][href]?><?=$comment_href?>' target='_blank'><img src='<?=$img?>'></a></td>
  </tr>
</table><br><? } ?></td>
                            <td valign=top>
                                <? if ($img != "") { ?><img src="<?=$search_skin_path?>/img/pipe.png" alt="" /><? } ?>
                                <b><a href='<?=$list[$idx][$i][href]?><?=$comment_href?>' target='_blank'><?=$iscmt?><?=$list[$idx][$i][subject]?></a></b>   <font color=#999999><!-- <?=$list[$idx][$i][wr_datetime]?> --></font><br />
                                
 <br>
 
                                    <!-- <?=$list[$idx][$i][content]?> -->
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <?
                            }    //데이터 루프 끝
                            //검색 결과 더보기
                ?>
                <br class='clear' />
                <?
                    }    //테이블 루프 끝
                ?>
                <div class="clear">
                <?=$write_pages?>
                <div class="clear">
                <? } else { ?>
                <!--검색어 없음-->
                <div class="boardComment">
검색어를 입력해주세요.
                </div>
                <? } ?>
            </div>
        </td>
    </tr>
</table>
<br class='clear' />
<script language="javascript">
document.fsearch.sfl.value = "<?=$sfl?>";
function fsearch_submit(f)
{
    /*
    // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
    var cnt = 0;
    for (var i=0; i<f.stx.value.length; i++)
    {
        if (f.stx.value.charAt(i) == ' ')
            cnt++;
    }
    if (cnt > 1)
    {
        alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
        f.stx.select();
        f.stx.focus();
        return;
    }
    */
    f.action = "";
    f.submit();
};
function check_value()
{
    var s = document.all.stx.value.replace(" ", "");
    if(s.length == 1)
    {
        alert("2자 이상 입력해 주세요");
        document.all.stx.focus();
        return false;
    }
    return true;
};
</script>
<script language="javascript">document.all.stx.focus();</script>
 

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 0 | RSS
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT