$h = 24*2; //3일간
if($mygameroom) {
$Query = "select A.uid,A.name,A.tip,A.screenshot,A.assess_score,A.assess_applicant,A.total_hit,A.today_hit,A.save_num,A.total_comment,A.reg_date,A.thumb,A.age from flashgame_game as A, flashgame_game_save as B where A.serv='1' $sqlWhere $limit_str";
} else {
$Query = "select uid,name,tip,screenshot,assess_score,assess_applicant,total_hit,today_hit,save_num,total_comment,reg_date,A.thumb,A.age from flashgame_game as A where serv='1' $sqlWhere $limit_str";
}
$res = mysql_query($Query) or die();
$num = mysql_num_rows($res);
$cnt =1;
if($num >0) {
while($row = mysql_fetch_array($res)) {
$star_icon="";
$game_subject = str_cutting($row[1],30);
$game_subject = str_replace("$searchword","$searchword",$game_subject);
$gameUrl = "/fg/game_detail.html?game_id=$row[uid]&category=$category&order=$order&tm1=$tm1&mygameroom=$mygameroom&cp=$cp&p=$p";
$Gamehitnum = number_format($row[total_hit]);
$todayHitNum = number_format($row[today_hit]);
//$Gamesavenum = number_format($row[save_num]);
if($row[assess_applicant]) {
$GameRating = $row[assess_score]/$row[assess_applicant];
} else {
$GameRating = 0;
}
$CommentCnt = $row[total_comment];
if($CommentCnt > 0) {
//$CommentCnt = "[".number_format($CommentCnt)."]";
$CommentCnt = "[".number_format($CommentCnt)."]";
} else {
$CommentCnt = "";
}
//for($i=0;$i<(int)$GameRating;$i++) {
for($i=0;$i<5;$i++) {
if($i<$GameRating) {
$star_icon.="";
} else {
$star_icon.="";
}
}
if($GameRating>=3.5) {
$game_grade_txt = "";
} else if($GameRating>2.5 && $GameRating < 3.5) {
$game_grade_txt = "";
} else {
$game_grade_txt = "";
}
$d = $row[reg_date];
if( ( mktime()- strtotime($d) ) < $h*60*120 ){
$new = " ";
//$new = "";
}else{
$new = "";
}
if($row[age] == "2") {
$fg_icon = "";
} else if($row[age] == "3") {
$fg_icon = "";
} else {
// $fg_icon = " ";
$fg_icon = "";
}
?>
|
if(!($cnt%6)) { ?>
} ?>
$cnt ++;
}
} else {
echo " ";
if($mygameroom) {
if($userID != "") {
echo "저장된 게임 리스트가 없습니다. .";
} else {
echo "로그인 하셔야 내게임방을 사용하실 수 있습니다. .";
}
} else {
echo "게임 리스트가 없습니다. .";
}
}
mysql_free_result($res);
?>
$pgsel->Write($tp, $cp, 10, $url, True, True);?> |
|