로그인하지 않은 회원 뽑기!! > 그누4 팁자료실

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.

로그인하지 않은 회원 뽑기!! 정보

로그인하지 않은 회원 뽑기!!

본문

아래 코드중에서 포인트제거에 대한 주석을 지워주면 포인트가 0으로 됩니다. ^ ^
코드중에서 닉네임과 아이디가 별표 생기는데, 이걸 지워주고 아이디와 닉네임을 모두 표시해주려면...

수정 전
<?=substr($nologin[mb_nick],0,-2);?>**(<?=substr($nologin[mb_id],0,-2);?>**)

수정 후
<?=$nologin[mb_nick]?>(<?=$nologin[mb_id]?>)

코드
=======================================
<?
include_once("./_common.php");
$g4[title] = "죽음이 갈라놓을 때까지, 모르솔라";
include_once("$g4[path]/head.sub.php");

$login_time = "30"; //지난 몇일 동안?
$today_login_time = date("Y-m-d H:i:s", $g4['server_time'] - ($login_time * 86400));

//페이지
$nologin_sql = " select count(*) as cnt from $g4[member_table] where mb_today_login < '$today_login_time' ";
$nologin_row = sql_fetch($nologin_sql);

$total_count = $nologin_row[cnt];

//$nologin_rows = $config[cf_page_rows]; //환경설정에 있는 페이지
$nologin_rows = 15; //수동으로 페이지
$total_page  = ceil($total_count / $nologin_rows);  // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $nologin_rows; // 시작 열을 구함

//처음 출력
$nologin_sql2 = " select * from $g4[member_table] where mb_today_login < '$today_login_time' order by mb_today_login desc limit $from_record, $nologin_rows ";
$nologin_result2 = sql_query($nologin_sql2);

$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
?>

<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr height="30">
<td width="30%" align="center">닉네임(아이디)</td>
<td width="30%" align="center">마지막로그인</td>
<td width="40%" align="center">포인트</td>
</tr>
<?
for ($i=0; $nologin = sql_fetch_array($nologin_result2); $i++) {

//포인트 제거
//insert_point($nologin[mb_id], -$nologin[mb_point], "비로그인", "@No-login", $nologin[mb_id], $g4[time_ymd]);
?>
<tr>
<td bgcolor="#EEEEEE" width="100%" height="1" colspan="3"></td>
</tr>
<tr height="30">
<td width="30%" align="center"><?=substr($nologin[mb_nick],0,-2);?>**(<?=substr($nologin[mb_id],0,-2);?>**)</td>
<td width="30%" align="center"><?=$nologin[mb_today_login]?></td>
<td width="40%" align="center"><?=$nologin[mb_point]?></td>
</tr>
<? } ?>
</table>
<p>
<?=$pagelist?>

<?
include_once("$g4[path]/tail.sub.php");
?>
추천
0

댓글 3개

//처음 출력
$nologin_sql2 = " select * from $g4[member_table] where mb_today_login < '$today_login_time'  and mb_level = '희망레벨' and mb_level <> '비출력레벨' order by mb_today_login desc limit $from_record, $nologin_rows ";
$nologin_result2 = sql_query($nologin_sql2);

희망레벨과 비출력레벨은 희망대로하시면 됩니다..비출력 레벨을 정하고 싶지 않을경우 공란으로 비워두시면 됩니다.
전체 3,309 |RSS
그누4 팁자료실 내용 검색

회원로그인

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