게시판별 글쓰기, 추천 많은 회원 알아보기 > 그누3 팁자료실

그누3 팁자료실

게시판별 글쓰기, 추천 많은 회원 알아보기 정보

그누호환 게시판별 글쓰기, 추천 많은 회원 알아보기

본문

조만간 분석을 강좌란에 올리도록 하겠습니다.
<?
include "lib.inc.php";
function mb_contest($bn){
global $cfg;
$table=$cfg[write_table_prefix].$bn;
$query=mysql_query("select distinct mb_id from $table where wr_comment = '0' order by mb_id");

echo "<table width=800 border=0 cellspacing=0 cellpadding=0>";
echo "<tr><td colspan=2 height=50> &nbsp; 안내 입니다. 회원님께서 작성하신 모든글의 조회수, 쪽글수<br> 추천수, 비추천수를 합산한 내역입니다</td></tr>";

for($j=0;$row=mysql_fetch_array($query);$j++){

echo "<tr>";
$qry2=mysql_query("select * from $table where mb_id='$row[mb_id]' and wr_comment = '0'");
$hit="";
$cnt="";
$good="";
$nogood="";
for($i=0;$row2=mysql_fetch_array($qry2);$i++){
$hit=$hit+$row2[wr_hit];
$cnt=$cnt+$row2[wr_commentcnt];
$good=$good+$row2[wr_good];
$nogood=$nogood+$row2[wr_nogood];
$name=$row2[wr_name];
}
if($row[mb_id]=="") $name="손님";
$total_point=($hit+($cnt*2)+($good*2))-$nogood;
echo "<td width=120> $name $row[mb_id]</td>";
echo "<td> 조회 : $hit, 쪽글 : $cnt, 추천 : $good, 비추 : $nogood, 총합 : $total_point </td>";
echo "</tr>";
}

echo "</table>";
}


?>
<?
if(!$p_table) alert("게시판을 지정하여 주십시요"); // 임의로 지정하거나 혹은 값을 넘겨받는 방식중 택일
echo mb_contest("$p_table");?>
추천
3

댓글 전체

전체 6
그누3 팁자료실 내용 검색

회원로그인

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