[g5] 회원 이름 검색후 아이디 불러오기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[g5] 회원 이름 검색후 아이디 불러오기

페이지 정보

본문

 

<script type='text/javascript'>
<!-- // 회원ID 찾기
function popup_id(frm_name, mb_id, top, left)
{
    url = '<?php echo G5_SHOP_URL?>/mb_id.php?frm_name='+frm_name+'&mb_id='+mb_id;
    opt = 'scrollbars=yes,width=300,height=400,top='+top+',left='+left;
    window.open(url, "mb_id", opt);
}
//-->
</script>

 

<a href="javascript:popup_id('forderform','mb_id',100 ,200);" class="btn02">회원검색</a> 

 

mb_id.php 파일생성 

<?php
include_once('./_common.php');

if($sname) {
    $sql = " select * from {$g5[member_table]} where mb_name like '%$sname%' order by mb_id ";
    $result = sql_query($sql);
    $search_count = mysql_num_rows($result);
    if($search_count > 0) {
        for ($i=0; $row=mysql_fetch_array($result); $i++) {
            $list[$i]->id = $row['mb_id'];
            $list[$i]->name = $row['mb_name'];
        }
    } else {
        alert("찾으시는 ID가 없습니다.");
    }
    mysql_free_result($result);
}

$g5['title'] = "사용자ID 검색";
include_once(G5_PATH."/head.sub.php");
?>

<h3 style="padding:20px 0 0 0"><?php echo $g5['title']?></h3>

<form name="frmid" method="get" autocomplete="off">
<input type="hidden" name="frm_name"        value="<?php echo $frm_name?>">
<input type="hidden" name="mb_id"    value="<?php echo $mb_id?>">
    <div style="padding:20px 20px 0px 20px">
    찾는 이름을 입력하세요. (두글자 이상)
    </div>
    <div style="padding:20px">
        <label for="sname">회원이름<strong class="sound_only"> 필수</strong></label>
        <input type="text" id="sname" name="sname" required class="frm_input required" value="<?php echo $sname?>">
        <input type="submit" value="확인" class="btn_submit">
    </div>
</form>
<!-- 검색결과 여기서부터 -->
    <script type='text/javascript'>
        document.frmid.sname.focus();
    </script>
    <div style="padding:20px">
        <?php if($search_count > 0) { ?>
        총 <?php echo $search_count?>건 가나다순
    <div>
<div>
    <ul>
    <?php
    for ($i=0; $i<count($list); $i++)
    {
    echo "<li><a href=javascript:setid('{$list[$i]->name}','{$list[$i]->id}')>{$list[$i]->name} - {$list[$i]->id}</a></li>\n";
    }
    ?>
    </ul>
    <br />[END]
</div>

<script type='text/javascript'>
    function setid(sname, sid)
    {
        var ov = top.opener.document.<?php echo $frm_name?>.<?php echo $mb_id?>.value;
        var of = top.opener.document.<?php echo $frm_name?>.<?php echo $mb_id?>;

        if(ov.length>0) {
            of.value = (ov + "," + sid);
        }else{
            of.value  = sid;
        }

        top.opener.focus();
        top.close();
        return false;
    }
</script>
<?php } ?>

<?php
include_once(G5_PATH."/tail.sub.php");
?>

추천0

댓글목록

등록된 댓글이 없습니다.

Total 825건 7 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
675 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18614 0 10-08
674 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16918 0 10-10
673 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 22830 0 10-10
672 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12187 0 10-15
671 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14775 0 10-27
670 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12872 0 10-27
669 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18180 0 10-28
668 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16759 0 10-29
667 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12770 0 11-03
666 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17282 0 11-05
665 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13568 0 11-07
664 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13313 0 11-13
663 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15245 1 11-14
662 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13587 0 11-18
661 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13734 0 11-18
660 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11693 0 11-18
659 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13411 0 11-28
658 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14990 0 11-28
657 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17094 0 11-28
656 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16341 0 11-28
655 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13589 0 11-28
654 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16064 0 11-28
653 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12958 0 11-28
652 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18733 0 11-29
651 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 23410 0 12-02

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
7,894
어제
7,612
최대
8,233
전체
1,625,079
Copyright (c) 株式会社YHPLUS. All rights reserved.