로그인하지 않은 회원 뽑기!! 정보
로그인하지 않은 회원 뽑기!!
본문
아래 코드중에서 포인트제거에 대한 주석을 지워주면 포인트가 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");
?>
코드중에서 닉네임과 아이디가 별표 생기는데, 이걸 지워주고 아이디와 닉네임을 모두 표시해주려면...
수정 전
<?=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
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);
희망레벨과 비출력레벨은 희망대로하시면 됩니다..비출력 레벨을 정하고 싶지 않을경우 공란으로 비워두시면 됩니다.
$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);
희망레벨과 비출력레벨은 희망대로하시면 됩니다..비출력 레벨을 정하고 싶지 않을경우 공란으로 비워두시면 됩니다.
감사합니다.