페이스북 처럼 친구 쪽지보내기 기능 > 그누보드5 플러그인

그누보드5 플러그인

그누보드는 다양한 기능을 추가하기 쉽습니다.

페이스북 처럼 친구 쪽지보내기 기능 정보

페이스북 처럼 친구 쪽지보내기 기능

첨부파일

note.php (4.3K) 7회 다운로드 2021-02-24 18:11:01 포인트 차감1,000
테스트한 버전5.4.5.1
호환 가능 버전5.4.5

본문

페이스북 처럼 친구 쪽지보내기 기능

 

<!-- group_board_menu end-->

<?if($bo_table || $mb_id ){

switch($mode){
    case "woman": $select=" and mb_sex ='F' ";  $select2="1"; break;    
    case "man": $select=" and mb_sex ='M' "; $select2="1"; break;
    case "total": $select=""; $select2="1"; break;

    default : $select=" and mb_sex ='F' "; $select2="1"; break;
}

?>
<!-- Owl Carousel Assets -->   

    <form name="friend_add">

    <input type="hidden" name="fr_id" id="fr_id">
    <input type="hidden" class="ed" name="mb_id" value="<?=$member[mb_id]?>" />
    <input type="hidden" class="ed" name="fr_type" value="online" />
    <input type="hidden" id="chk_fr_no" name="chk_fr_no[]" value="" />
    <input type="hidden" id="mode" name="mode" value="insert" />

      <div id="demo">
        <div id="owl-demo2" class="owl-carousel">

<?

/*랭킹순서*/
//echo $rank_sql2="select DISTINCT mb_id, mb_name,mb_3,mb_sex,mb_2,mb_open from $g5[member_table] where mb_open='1' and mb_2='".$select2."' order by rand() limit 20";
$rank_sql2="select DISTINCT mb_id, mb_name,mb_3,mb_sex,mb_2,mb_open from {$g5['member_table']} where mb_open=1 and mb_2=1 and mb_leave_date=0 order by rand() limit 4";

$result_rank2=sql_query($rank_sql2);
$rank_list2 = array();
$frid = array();

$k=0;
$photo = array();

while ($rank_mb2 = sql_fetch_array($result_rank2)){
$rank_list2[] = $rank_mb2;

//echo $myphoto=mb_photo($rank_list2[$k][mb_id]);
$profile_rank_path2 = "{$g5[path]}/data/member/profile/{$rank_list2[$k][mb_id]}.jpg";

$photo_filename='';

$dest_path = G5_DATA_PATH.'/member/profile/';
$dest_url = G5_DATA_URL.'/member/profile/';
    
        $photo_name = $rank_list2[$k][mb_id].'.jpg';
        $photo_file = $dest_path.$photo_name;

        // 사진이 있다면 변수 넘김
        if(file_exists($photo_file)){
            $photo[$k] = '<img class="user-photo" src="'.$dest_url.$photo_name.'" height=100 >';
            //img-responsive

            $frid[$k]=$rank_list2[$k][mb_id];
            $rank2[$k]="<a href=\"{$g5[path]}/g5/plugin/test-maker/automatch.php?mb_id={$rank_list2[$k][mb_id]}\" target='_blank'>{$photo[$k]}</a>";

        }else{
            $photo[$k] = '<img class="user-photo" src="'.$dest_url.'noimg.jpg" height=100 >';
            $frid[$k]=$rank_list2[$k][mb_id];
            $rank2[$k]="<a href=\"{$g5[path]}/g5/plugin/test-maker/automatch.php?mb_id={$rank_list2[$k][mb_id]}\" target='_blank'>{$photo[$k]}</a>";
        }

        $k=$k+1;
        
    }

?>

            <?for($s=0;$s<4;$s++){?>
                    <div class="item"><?=$rank2[$s]?>
                    <a class="btn btn-primary" href="<?=$g5[path]?>/g5/bbs/memo_form.php?me_recv_mb_id=<?=$frid[$s]?>" target="_blank" style="color:#000;margin-top:10px">쪽지보내기</a>
                    </div>
            <?}?>
        </div>
    </div>
    </form>    


    <style>
    #owl-demo2 .item{
        margin: 5px;
        color: #FFF;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        text-align: center;
    }
    </style>


<script type="text/javascript">

 $(document).ready(function() {

      var owl2 = $("#owl-demo2");

      owl2.owlCarousel({

        // Define custom and unlimited items depending from the width
        // If this option is set, itemsDeskop, itemsDesktopSmall, itemsTablet, itemsMobile etc. are disabled
        // For better preview, order the arrays by screen size, but it's not mandatory
        // Don't forget to include the lowest available screen size, otherwise it will take the default one for screens lower than lowest available.
        // In the example there is dimension with 0 with which cover screens between 0 and 450px
        
        itemsCustom : [
          [0, 2],
          [450, 4],
          [600, 7],
          [700, 9],
          [1000, 10],
          [1200, 12],
          [1400, 13],
          [1600, 15]
        ],
        navigation : true

      });
    });

    function frined_add(id){
    
    if(!g5_is_member){
        alert("로그인후 이용하여주세요."); 
        location.replace('<?=$g5[path]?>/g5/bbs/login.php');
        return;
    }

     var f = document.friend_add;

     f.chk_fr_no.value=id;
     f.fr_id.value=id;

    var str = "추가";   

    if (!confirm("선택한 친구를 정말 "+str+" 하시겠습니까?\n\n"))
        return;


    f.action = "<?=$g5[path]?>/g5/bbs/friend_update.php?kind=online&fr_type=online";
    f.target="hiddenframe"
    f.submit();
    }

    </script>
<?}?>

추천
5

댓글 전체

전체 504
그누보드5 플러그인 내용 검색

회원로그인

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