묻고답하기

<?
//====================== 설정해주세요 =========================

// 제로보드 절대경로, 뒤에 반드시 / 붙이세요.
$_zb_path="/절대경로/bbs/";


// 제로보드 URL, 뒤에 반드시 / 붙이세요.
$_zb_url = "http://사이트주소/bbs/";


// 멤버리스트 열람 가능 레벨
$permission_level = "10";


// 로그인 회수/점수 최근로그인 시각을 사용하면 1, 사용 안하면 0
$apply_login_point = "0";


// 한화면에 몇명씩 보여줄 것인지....
$max_line = '20';


// 보여줄 페이지수 [이전] [1][2][3][4]....[8][9][10] [다음] 이런식으로...
$max_page = '10';

//======================= 설정 끝 =============================

include $_zb_path."lib.php";
if(!$connect) $connect=dbConn();
$member=member_info();
if($member[level]> $permission_level) Error("죄송합니다.<br>로그인한 회원(레벨:$permission_level)에게만 열람이 허용됩니다. ");

if(!$member[is_admin] == 1 && $member[level] == 1)
        $view_admin_menu = "on";

if($apply_login_point == 0){
        $hide_start = "<!--";
        $hide_end = "-->";
        $height = 530;
}else{
        $height = 610;
}
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>숙박업체 리스트</title>

<STYLE type=text/css>
A:link    {COLOR: #000000; TEXT-DECORATION: none}
A:visited {COLOR: #000000; TEXT-DECORATION: none}
A:hover   {COLOR: #cc0000; TEXT-DECORATION: none}
A:active  {COLOR: #cc0000; TEXT-DECORATION: none}
body,td,select,input,div,form,textarea,center,option,pre,blockquote {font-size:9pt; font-family:굴림;color:424040;line-height:160%}

.input {border:solid 1;border-color:739BAB;font-size:9pt;color:042330;background-color:white;height:19px}
.submit {border:solid 1;border-color:1F556A;font-size:9pt;color:white;background-color:50889F;height:19px}
.f1 {font-size:9pt;font-family:굴림;font-weight:bold;color:13485D}
</STYLE>
</head>
<body onLoad=document.search_member.keyword.focus();>

<?
if($search == "on"){
        
        $keyword=stripslashes($keyword);
        $keyword=str_replace("`","",$keyword);
        $keyword=str_replace(""","",$keyword);
        $keyword=str_replace("'","",$keyword);
        $keyword=str_replace(".","",$keyword);
        $keyword=str_replace("<","",$keyword);
        $keyword=str_replace(">","",$keyword);
        if(!isblank($keyword)) {                
                $keyword=addslashes($keyword);                
                $where = "where house_name like '%$keyword%' ";

                if($s_id)
                        $where .= "or houseimg like '%$keyword%' ";
                if($s_em)
                        $where .= "or email like '%$keyword%'+ '+ ' ";
                if($s_no)
                        $where .= "or no like '%$keyword%' ";
                if($s_hp)
                        $where .= "or handphone like '%$keyword%' ";
                $res_count = mysql_num_rows(mysql_query("select no from zetyx_member_table $where "));
                $total_member = mysql_num_rows(mysql_query("select no from zetyx_member_table"));
                $member_search_result = "검색인원 <font color=blue>$res_count</font> 명    ";
        }                        
}else{
        $res_count = mysql_num_rows(mysql_query("select * from zetyx_member_table"));
        $total_member = $res_count;
}


if(!$page){
        $page = 1;
}
$start = ($page-1)*$max_line;
$end = $start+$max_line;
$over_page = floor($start/($max_line*$max_page));
$total_page = floor($res_count/$max_line+1);

if($end > $res_count){
        $end=$res_count;
}
if($page>$total_page){
        $page=$total_page;
}
echo("<div align=center>
<table align=center border=0 cellpadding=0 cellspacing=0 height=50>
        <tr>
                <td colspan=3 align=left>
                            <a href=$PHP_SELF><font color=blue>전체회원 <b>$total_member</b> 명</font>  ($member_search_result$page / $total_page Pages)</a>
                </td>
        </tr>
</table>");
?>
<table align="center" border="1" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="white" bordercolorlight="#CCCCCC">
        <tr>
                <td align=center background=images/tb_back.gif>
                        <b> </b>
                <td align=center background=images/tb_back.gif>
                        <b>이름</b>
                </td>
        </tr>                        
<?
for($i= $start ; $i <$end ; $i++){


        if(!$code && $apply_login_point == 1)
                $code = "lastlogin";
        elseif(!$code && $apply_login_point == 0)
                $code = "no";
        else
                $code = $code;

        if(!$desc && $apply_login_point == 1)
                $desc = "desc";
        elseif(!$desc && $apply_login_point == 0)
                $desc = "asc";
        else
                $desc = $desc;

        if($code == "house_name"){
                $code = "house_name";
                $result = mysql_query("SELECT * FROM zetyx_member_table $where order by $code $desc limit $i, 1");
                $rows = mysql_num_rows($result);
                $code = "house_name";
        }else{
                $result = mysql_query("SELECT * FROM zetyx_member_table $where order by $code $desc limit $i, 1");
                $rows = mysql_num_rows($result);
        }

        if($rows){
                while($row = mysql_fetch_array($result)){
                        $point1 = $row["point1"];
                        $point2 = $row["point2"];
                        $point = $point1 * 10 + $point2;
        
                        if($apply_login_point == 1){
                                $point3 = $row["point3"];
                                $point4 = $row["point4"];        
                                $lastlogin = $row["lastlogin"];
                                if($lastlogin != "" && $lastlogin != "0")
                                        $lastlogin = date("m/d H:i",$lastlogin);
                                else
                                        $lastlogin = "<font color=gray>없음</font>";
                        }
                        $no = $row["no"];
                        $house_name = $row["house_name"];
                        $id = $row["houseimg"];
                        $email = $row["email"];                                        
                        $handphone = $row["handphone"];
                        if($handphone =="")
                                $handphone = " ";
                        $homepage = $row["homepage"];
                        if($homepage)
                                $homepage = "<a href=$homepage target=_blank>home</a>";
                        elseif($homepage =="")
                                $homepage = " ";
                        $birth = date('y-m-d',$row["birth"]);        
                        $reg_date = date("y-m-d",$row["reg_date"]);

                        if($keyword){
                                $keyword_pattern = "/$keyword/i";
                                $no_search = preg_replace($keyword_pattern, "<font color=000000 style=background-color:000000;>$keyword</font>", $no);
                                $name_search = preg_replace($keyword_pattern, "<font color=000000>$keyword</font>", $house_name);
                                $id_search = preg_replace($keyword_pattern, "<font color=000000 style=background-color:FFF000;>$keyword</font>", $id);
                                $email_search = preg_replace($keyword_pattern, "<font color=000000 style=background-color:FFF000;>$keyword</font>", $email);
                                $handphone_search = preg_replace($keyword_pattern, "<font color=000000 style=background-color:FFF000;>$keyword</font>", $handphone);
                        }
                        if(!$keyword){
                                $no_search = $no;
                                $name_search = $house_name;
                                $id_search = $houseimg;
                                $email_search = $email;
                                $handphone_search = $handphone;
                        }
                        $email_search = "<a href=mailto:$email>$email_search</a>";
                        $num = $i + 1;                
                        echo("        <tr>
                                        <td align=center>
                                                $num
                                        </td>
                                        <td align=center>
                                                <a href=javascript:void(window.open('".$_zb_url."view_info.php?member_no=$no','info','width=400,height=510,statusbar=no,scrollbars=yes,toolbar=no'))><font color=000000>$name_search</font></a>
                                        </td>
                        ");                
                }// while문 끝
        }// if문 끝        
}// for문 끝


                echo("</table>");


//================= 페이지 이동 리스트 표시 ====================
if($page > $max_page){
        $prev = $over_page * $max_page;
        echo("<a href='$PHP_SELF?code=$code&desc=$desc&page=$prev&search=$search&keyword=$keyword&s_id=$s_id&s_em=$s_em&s_no=$s_no&s_hp=$s_hp'>[이전]</a>  ");
}else{
        echo("[이전]  ");
}


for($j=0 ; $j < 10 ;$j++){
        $link = $j+$max_page*$over_page+1;
        $vlink= $over_page*$max_page+$j+1;
        if($link <= $total_page){
                if($vlink == $page){
                        echo("<font color=red>$vlink</font>  ");
                }else{
                        echo("<a href='$PHP_SELF?code=$code&desc=$desc&page=$link&search=$search&keyword=$keyword&s_id=$s_id&s_em=$s_em&s_no=$s_no&s_hp=$s_hp'>[$vlink]</a>  ");
                }
        }
}

if($total_page > ($over_page+1)*$max_page){
        $next = $over_page*$max_page+$max_page+1;
        echo("<a href='$PHP_SELF?code=$code&desc=$desc&page=$next&search=$search&keyword=$keyword&s_id=$s_id&s_em=$s_em&s_no=$s_no&s_hp=$s_hp'>[다음]</a>");
}else{
        echo("[다음]<br>");
}
?>


<table border=0>
        <tr>
                <form name=search_member method=get action=<?=$PHP_SELF?>>
                <td valign=middle>                        
                        <input type=hidden name=code value=<?=$code?>>
                        <input type=hidden name=desc value=<?=$desc?>>                        
                        <input type=hidden name=search value=on>                        
                        <input type=checkbox name=s_hp value=on <?if($s_hp)echo("checked");?>>휴대폰
                        <input type=checkbox name=s_no value=on <?if($s_no)echo("checked");?>>회원번호
                        <input type=checkbox name=s_em value=on <?if($s_em)echo("checked");?>>이메일
                        <input type=checkbox name=s_id value=on <?if($s_id)echo("checked");?>>아이디
                </td>
                <td valign=top>
                        <input type=text name=keyword class=input value='<?=$keyword?>'>
                        <input type=submit class=submit value="찾아줘!!!">
                </td>
                </form>
        </tr>
</table>
<?
echo ("</div></body></html>");
mysql_close($connect);
?>


위소스를 보면 아시겠는지 모르지만....특정필드값을 찾아 회원데이터에서 회원정보를 봅아올수 있게 하는 방법으로 하고 싶은데 안되네요...

특정필드 즉 house_name이라는 필드의 값의 존재여부를 확인하여 필드값이 있을 경우 회원데이터를 뽑아오려고 합니다..

house_name이라는 필드의 값이 있을 경우에만 회원정보를 구할수 있는 방법이 없을까요...
위 소스에서 어디부분에 수정해야 특정필드값의 확인여부를 알수 있는지 알려주시기 바랍니다....

이거 급하거든요..제발 부탁드립니다..
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
장바닥 웹페이지의 업데이트된 날자 알려주기에 대한..  
아름 폼메일 [2] 2007.08.10
띠엠므 드림위버MX에서 작업할 때 Design view 에 그림들? [1] 2007.08.10
R 클릭하면 팝업으로 새 창이 뜨게 하려면 어떻게 하나요? [2] 2007.08.10
한승진 고수님들.. 리눅스 소스컴파일에서 이게 무슨 뜻인지... [1] 2007.08.10
CityBoys-Life 멤버리스트 소스 좀 봐주세요.. [1] 2007.08.10
kusanaki 프레임에서 전체 스크롤로 할라믐 어떠케 해야하지요?... [2] 2007.08.10
네오보이 초보인데 궁금한게 있습니다^^; [3] 2007.08.10
MyLena 한 HTML 내의 특정 부분에만 스타일시트 적용이 가능한가요? [1] 2007.08.10
초우 노프레임 홈페이지에서 문서 속성이 게시판에... [3] 2007.08.10
삭수있는 사람 만들자 계정별 용량 확인 [1] 2007.08.10
김태영 그림이나 사진의 외각선만 추출할수는 없나요? [3] 2007.08.10
박군의그녀 게시판 위에요 [1] 2007.08.10
남기목 포토샵에서 색깔이 바꾸지가 않습니다... [2] 2007.08.10
유얼 DB 접근 거부... 라고 그러네요.; [1] 2007.08.10
카ol 이거 문제 잇나요??? [5] 2007.08.10
꼬마 도저히 검색이 안되서 질문합니다. [2] 2007.08.10
김선미 이거는 어케 만들었을까요?? [7] 2007.08.10
바인 [php] *.sql파일을 php로 DB에 테이블만들기 [2] 2007.08.10
Agape 일반 dvd 씨디를..? [3] 2007.08.10
이재원 폰트다운받기....어떻게 하는거죠....? [4] 2007.08.10
꼬마 선그리기 질문요...ㅡㅡ;; [1] 2007.08.10
박준영 프리챌이나..기타 검색엔진에서 자주 볼수 있는 것 입니다. [1] 2007.08.10
하얀두부 제 아웃로그인에 글자가 깨져보이는데요.. [1] 2007.08.10
레니크 [질문]PHP변수와 문자 추가 [1] 2007.08.10
민이아빠 초보 서버 운영(?)입니다. 서버 운영시... [7] 2007.08.10
미나미 질문이요...빨른 답변 기다리겠습니다!! [2] 2007.08.10
이원섭 db에 int형으로 저장된 날짜중 월일만 검색.  
이일재 한번만 더 새로고침..  
최민철 이미지가 [3] 2007.08.10