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

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

팁앤테크

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

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 49,282회 작성일 15-03-03 13:40

본문

 

<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");
?>

댓글목록

등록된 댓글이 없습니다.

Total 779건 7 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
629 제로 42518 07-23
628 제로 40169 07-07
627 제로 40929 07-01
626 제로 45339 07-01
625 제로 38634 06-25
624 제로 41133 05-15
623 제로 47971 05-09
622 제로 36100 04-23
621 제로 41501 04-16
620 제로 52689 04-10
619 제로 54990 03-19
열람중 제로 49283 03-03
617 제로 51285 02-23
616 제로 39426 02-20
615 제로 44587 02-20
614 제로 37277 02-20
613 제로 39165 02-10
612 제로 51063 01-28
611 제로 33696 01-28
610 제로 40035 01-25
609 제로 39300 01-23
608 제로 58108 01-05
607 제로 35481 12-19
606 제로 39679 12-17
605 제로 54995 12-02

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
24,587
어제
11,101
최대
431,155
전체
6,724,627
Copyright (c) 株式会社YHPLUS. All rights reserved.