|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/junsu/ |
Upload File : |
<?
require $_SERVER['DOCUMENT_ROOT']."/conf/conf_dir.php";
// =============================================== Query
$tableName = "user_point";
if($tmp_no=="undefined" || $tmp_no==""){
$tmp_no = get_db("SELECT inning FROM user_ranking order by inning desc");
}
//회차별로 포인트 보여주기 시작.
$QUERY_RANKING = "SELECT startdate,enddate FROM user_ranking where inning='$tmp_no'";
//echo "<br>";
$resultR= mysql_query($QUERY_RANKING,$db_con);
$rows = mysql_fetch_array($resultR);
$startdate =$rows[startdate];
$enddate =$rows[enddate];
$where = "and poi_datetime >= '$startdate' and poi_datetime <= '$enddate'";
$gigan = "<b>シーズン $tmp_no : $startdate ~ $enddate</b>";
//회차별로 포인트 보여주기 끝.
if(!$pageCount) $pageCount =10;
$show_one_page = $pageCount;
$show_view_page = 5;
$page = ( $page ) ? $page : 1;
$offset = ($page-1)*$show_one_page;
$order_by = ' ORDER BY poi_datetime desc';
$query_limit = "limit $offset,$show_one_page";
$pcLang = substr($_SERVER[HTTP_ACCEPT_LANGUAGE],0,2);
$QUERY_TOTAL = "SELECT count(*) FROM $tableName where mem_id = '$sessionIDX' $where $order_by";
$QUERY_PAGE = "SELECT * FROM $tableName where mem_id = '$sessionIDX' $where $order_by $query_limit";
$url_tail="&tmp_no=$tmp_no";
$total_count = get_db($QUERY_TOTAL);
$total_page = ceil( $total_count / $show_one_page);
$start_num = $total_count - $offset; //
$viewlist = ( !$total_count ) ? "" : Get_viewpage5($page,$total_count,$show_one_page,$show_view_page,$url_tail);
$result= mysql_query($QUERY_PAGE,$db_con);
if(!$result) {
error("DB_ERROR");
exit;
}
$total = mysql_affected_rows();
if(!$total)
{
$BRD_LIST = "
<tr class='bg_white'>
<td class='ls' colspan='5'>登録されたポイントはありません。</td>
</tr>
";
}
else
{
for($i=0; $i<$total; $i++)
{
$Num = $start_num - $i;
$row = mysql_fetch_array($result);
$regdate = substr($row[poi_datetime],0,10);
if($row[poi_type] == 'Y'){
$bgColor ="font_red";
$poi_YN ="登録";
$poi_mp ="+";
$poi_content = $row[poi_content];
}else{
$bgColor ="font_blue";
$poi_YN ="削除";
$poi_mp ="-";
$poi_content = "消去されました。";
}
$BRD_LIST .="
<tr class='bg_white'>
<td class='ls'>$row[poi_action]</td>
<td class='ls $bgColor'> $poi_YN </td>
<td class='ls_le'>$poi_content</td>
<td class='ls $bgColor font_bold'>".$poi_mp."".$row[poi_point]." FP</td>
<td class='ls'>$regdate</td>
</tr>
";
//$sum_point = $sum_point+$row[poi_point];
}
}
echo $gigan;
?>
<table width="100%" class="basic_table">
<colgroup>
<col width="10%">
<col width="10%">
<col width="*">
<col width="10%">
<col width="10%">
</colgroup>
<thead>
<th class="title_le">区分</th>
<th class="title_le">状態</th>
<th class="title_le">内容</th>
<th class="title_le">ポイント</th>
<th class="title_le">日付</th>
</thead>
<tbody>
<?=$BRD_LIST?>
</tbody>
</table>
<!-- RIGHT -->
<div class="pagination02">
<?=$viewlist?>
</div>