Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
egg.eemo.co.kr
/
public_html
/
super5
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/egg.eemo.co.kr/public_html/super5/sowon_jumsu_rank.php
<? include_once("inc_header.php"); $on_menu="ranking"; $on_sub_menu=5; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?=$_TITLE?></title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="font-awesome/css/font-awesome.css" rel="stylesheet"> <link href="css/plugins/iCheck/custom.css" rel="stylesheet"> <link href="css/animate.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet"> <link href="css/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet"> <link href="css/plugins/chosen/bootstrap-chosen.css" rel="stylesheet"> <link href="css/messagebox.css" rel="stylesheet"> </head> <body class="fixed-sidebar"> <div id="wrapper"> <? include_once("inc_sidemenu.php"); ?> <div id="page-wrapper" class="gray-bg"> <? include_once("inc_top.php"); include_once("inc_now_position.php"); include_once("navigation_post.php"); ?> <? class clevel { public $mlevel; public $name; public $re_name; } $result_cnf=mysql_query("select * from level_conf ") or die(); $arr=array(); while($rs_cnf=mysql_fetch_array($result_cnf)) { $vlevel=new clevel(); $vlevel->mlevel=$rs_cnf[mlevel]; $vlevel->name=$rs_cnf[name]; $vlevel->re_name=$rs_cnf[re_name]; $arr[$rs_cnf[mlevel]]=$vlevel; } if(!$v_num) { $v_num=100; } if(!$sel_sort) { $sel_sort="rank_asc"; } if(!$sel_mode) { $sel_mode="day"; } if(!$sel_jdate) { //$sel_jdate=date("Y-m-d"); } if(!$sel_week) { $nn_date=date("Y-m-d"); $rtn_date=get_startday_endday($nn_date); $exp_date=explode("~",$rtn_date); $start_date=$exp_date[0]; $end_date=$exp_date[1]; $league_code = getWeekInfo($start_date); $exp_ww=explode("/",$league_code); $YYYY=$exp_ww[0]; $MM=sprintf("%02d",$exp_ww[1]); $jucha=$exp_ww[2]; $sel_week=$YYYY."-".$MM."-".$jucha; } if(!$sel_month) { $sel_month=date("Ym"); } if(!$sel_app) { $sel_app="total"; } $sub_query=''; if($sel_mode=="day") { $query="select count(no) as cnt from sowonday_app where 1 "; if($sel_jdate) { $sub_query.=" and jdate='$sel_jdate' "; } if($sel_sdate) { $sub_query.=" and jdate >= '$sel_sdate' "; } if($sel_edate) { $sub_query.=" and jdate <= '$sel_edate' "; } } else if($sel_mode=="week") { $query="select count(no) as cnt from sowonweek_app where 1 "; if($sel_week) { $exp=explode("-",$sel_week); $sub_query.=" and jyear='{$exp[0]}' and jmonth='{$exp[1]}' and jweek='{$exp[2]}' "; } } else if($sel_mode=="month") { $query="select count(no) as cnt from sowonmonth_app where 1 "; if($sel_month) { $ey=substr($sel_month,0,4); $em=substr($sel_month,4,2); $sub_query.=" and jyear='$ey' and jmonth='$em' "; } } if($chk_qry==1) { $sub_query=stripslashes($prev_qry); } if($search) { $sub_query.=" and mem_no in (select no from member where $find like '%$search%' ) "; } if($sel_app) { $sub_query.=" and LOWER(appname)='$sel_app' "; } if($sub_query) {$query.=$sub_query;} $rs=RS($query); vari($rs[cnt],10,$v_num,$c_page); if($sel_mode=="day") { $query="select * from sowonday_app where 1 "; } else if($sel_mode=="week") { $query="select * from sowonweek_app where 1 "; } else if($sel_mode=="month") { $query="select * from sowonmonth_app where 1 "; } if($sub_query) {$query.=$sub_query;} if($sel_sort=='') { $sel_sort="rank_asc"; $query.=" order by wrank2 asc limit $offset, $limit "; } else { if($sel_sort=="rank_desc") { $query.=" order by wrank2 desc limit $offset, $limit "; } else if($sel_sort=="rank_asc") { $query.=" order by wrank2 asc limit $offset, $limit "; } else if($sel_sort=="calo_desc") { $query.=" order by calo desc limit $offset, $limit "; } else if($sel_sort=="calo_asc") { $query.=" order by calo asc limit $offset, $limit "; } else if($sel_sort=="dist_desc") { $query.=" order by dist desc limit $offset, $limit "; } else if($sel_sort=="dist_asc") { $query.=" order by dist asc limit $offset, $limit "; } else if($sel_sort=="exertime_desc") { $query.=" order by exertime desc limit $offset, $limit "; } else if($sel_sort=="exertime_asc") { $query.=" order by exertime asc limit $offset, $limit "; } else if($sel_sort=="wcnt_desc") { $query.=" order by wcnt desc limit $offset, $limit "; } else if($sel_sort=="wcnt_asc") { $query.=" order by wcnt asc limit $offset, $limit "; } } //echo $query; $result=mysql_query($query); $gita="&find=".urlencode($find)."&search=".urlencode($search)."&sel_sort=".urlencode($sel_sort)."&sel_app=".urlencode($sel_app)."&sel_jdate=".urlencode($sel_jdate)."&sel_week=".urlencode($sel_week)."&sel_month=".urlencode($sel_month)."&sel_mode=".urlencode($sel_mode)."&chk_qry=".urlencode($chk_qry)."&chk_tong=".urlencode($chk_tong)."&sel_sdate=".urlencode($sel_sdate)."&sel_edate=".urlencode($sel_edate)."&v_num=".urlencode($v_num); ?> <div class="wrapper wrapper-content animated fadeInRight"> <div class="row"> <div class="col-lg-12"> <div class="ibox "> <div class="ibox-title"> <h5>Custom responsive table </h5> <div class="ibox-tools"> <a class="collapse-link"> <i class="fa fa-chevron-up"></i> </a> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <i class="fa fa-wrench"></i> </a> <ul class="dropdown-menu dropdown-user"> <li><a href="#" class="dropdown-item">Config option 1</a> </li> <li><a href="#" class="dropdown-item">Config option 2</a> </li> </ul> <a class="close-link"> <i class="fa fa-times"></i> </a> </div> </div> <div class="ibox-content"> <form name='frm_search' method='get'> <div class="row"> <div class="col-sm-2 m-b-xs"> <div class="btn-group btn-group-toggle" data-toggle="buttons" > <label class="btn btn-white <?if($sel_mode=='day') echo "active";?>" onclick="$('#sel_mode').val('day');document.frm_search.submit()"> <input type="radio" name="chk_mode" id="sel_mode1" autocomplete="off" <?if($sel_mode=='day') echo "checked";?> value="day" > 일간 </label> <label class="btn btn-white <?if($sel_mode=='week') echo "active";?>" onclick="$('#sel_mode').val('week');document.frm_search.submit()"> <input type="radio" name="chk_mode" id="sel_mode2" autocomplete="off" <?if($sel_mode=='week') echo "checked";?> value="week" "> 주간 </label> <label class="btn btn-white <?if($sel_mode=='month') echo "active";?>" onclick="$('#sel_mode').val('month');document.frm_search.submit()"> <input type="radio" name="chk_mode" id="sel_mode3" autocomplete="off" <?if($sel_mode=='month') echo "checked";?> value="month" "> 월간 </label> </div> </div> <div class="col-sm-2 m-b-xs" <?if($sel_mode=="day") {echo "style='display:block'";}else{echo "style='display:none'";}?>> <div class="input-group date"> <span class="input-group-addon" style=""><i class="fa fa-calendar"></i></span><input type="text" class="form-control" name='sel_jdate' id='sel_jdate' value="<?=$sel_jdate?>" onchange="this.form.submit()" autocomplete="off"> </div> </div> <div class="col-sm-3 m-b-xs" <?if($sel_mode=="week") {echo "style='display:block'";}else{echo "style='display:none'";}?>> <select class="form-control-sm form-control input-s-sm inline" name="sel_week" onchange="this.form.submit()"> <option value=''>날짜 선택</option> <? $arr_jucha=array(); for($y=2015;$y<=date('Y');$y++) { for($m=1;$m<=12;$m++) { $LastDay=date("t",mktime(0,0,1,$m,1,$y)); for($d=1;$d<=$LastDay;$d++) { $v_date=date("Y-m-d",mktime(0,0,1,$m,$d,$y)); $jdate=$v_date; if($jdate < "2015-05-01") {continue;} if($jdate > date('Y-m-d')) {continue;} //주차 구하기 $rtn_date=get_startday_endday($jdate); $exp_date=explode("~",$rtn_date); $start_date=$exp_date[0]; $end_date=$exp_date[1]; $league_code = getWeekInfo($start_date); $exp_ww=explode("/",$league_code); $YYYY=$exp_ww[0]; $MM=sprintf("%02d",$exp_ww[1]); $jucha=$exp_ww[2]; $arr_jucha[$YYYY."-".$MM."-".$jucha]=$start_date."~".$end_date; } } } krsort($arr_jucha); foreach($arr_jucha as $ak => $av) { $exp_dd=explode("-",$ak); $YYYY=$exp_dd[0]; $MM=$exp_dd[1]; $jucha=$exp_dd[2]; $exp_dd2=explode("~",$av); ?><option value='<?=$YYYY."-".$MM."-".$jucha?>' <?if($sel_week==$YYYY."-".$MM."-".$jucha) echo "selected";?>><?=$YYYY?>년 <?=$MM?>월 <?=$jucha?>주차 (<?=$av?>)</option><? } ?> </select> </div> <div class="col-sm-3 m-b-xs" <?if($sel_mode=="month") {echo "style='display:block'";}else{echo "style='display:none'";}?>> <select class="form-control-sm form-control input-s-sm inline" name="sel_month" onchange="this.form.submit()"> <option value=''>날짜 선택</option> <? $arr_month=array(); for($y=2015;$y<=date('Y');$y++) { for($m=1;$m<=12;$m++) { $vdate=$y."-".sprintf("%02d",$m)."-01"; if(date('Ym',strtotime($vdate))>date('Ym')) { continue; } else if(date('Ym',strtotime($vdate))<"201505") { continue; } $arr_month[$y."-".sprintf("%02d",$m)]=$y."-".sprintf("%02d",$m); } } krsort($arr_month); foreach($arr_month as $ak => $av) { $exp_dd=explode("-",$av); $dy=$exp_dd[0]; $dm=$exp_dd[1]; $LastDay=date("t",strtotime($av."-01")); $gigan=date('Y-m',strtotime($av."-01"))."-01 - ".date('Y-m',strtotime($av."-01"))."-".$LastDay; ?><option value='<?=$dy.$dm?>' <?if($sel_month==$dy.$dm) echo "selected";?>><?=$dy?>년 <?=$dm?>월 (<?=$gigan?>)</option><? } ?> </select> </div> <div class="col-sm-2 m-b-xs"> <select class="form-control-sm form-control input-s-sm inline" name="find" id="select2"> <option value="" <?if($find=="") echo "selected";?>>선택</option> <option value="id" <?if($find=="id") echo "selected";?>>아이디</option> <option value="nick" <?if($find=="nick") echo "selected";?>>닉네임</option> <option value="tel" <?if($find=="tel") echo "selected";?>>연락처</option> </select> </div> <div class="col-sm-3 m-b-xs"> <div class="input-group"><input placeholder="Search" type="text" name='search' class="form-control form-control-sm" value="<?=$search?>"> <span class="input-group-append"> <button type="button" class="btn btn-sm btn-primary" onclick="this.form.submit()">Go! </button> </span></div> </div> <div class="col-sm-2 m-b-xs"> <select class="form-control-sm form-control input-s-sm inline" name="v_num" onchange='this.form.submit()'> <option value="10" <?if($v_num=="10") echo "selected";?>>10라인</option> <option value="20" <?if($v_num=="20") echo "selected";?>>20라인</option> <option value="30" <?if($v_num=="30") echo "selected";?>>30라인</option> <option value="50" <?if($v_num=="50") echo "selected";?>>50라인</option> <option value="100" <?if($v_num=="100") echo "selected";?>>100라인</option> <option value="500" <?if($v_num=="500") echo "selected";?>>500라인</option> <option value="1000" <?if($v_num=="1000") echo "selected";?>>1,000라인</option> </select> </div> </div> <div class="row"> <div class="col-sm-4 m-b-xs"> <div class="btn-group btn-group-toggle" data-toggle="buttons" > <label class="btn btn-white <?if($sel_app=='total') echo "active";?>" onclick="$('#sel_app').val('total');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app1" autocomplete="off" <?if($sel_app=='total') echo "checked";?> value="total" > 전체 </label> <label class="btn btn-white <?if($sel_app=='com.zoit.catsrun') echo "active";?>" onclick="$('#sel_app').val('com.zoit.catsrun');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app2" autocomplete="off" <?if($sel_app=='com.zoit.catsrun') echo "checked";?> value="com.zoit.catsrun" "> 캣츠런 </label> <label class="btn btn-white <?if($sel_app=='com.zoit.jikstar') echo "active";?>" onclick="$('#sel_app').val('com.zoit.jikstar');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app3" autocomplete="off" <?if($sel_app=='com.zoit.jikstar') echo "checked";?> value="com.zoit.jikstar" > 찍스타 </label> <label class="btn btn-white <?if($sel_app=='com.zoit.tourriding') echo "active";?>" onclick="$('#sel_app').val('com.zoit.tourriding');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app4" autocomplete="off" <?if($sel_app=='com.zoit.tourriding') echo "checked";?> value="com.zoit.tourriding" > 투어라이딩 </label> <label class="btn btn-white <?if($sel_app=='com.zoit.superpeng') echo "active";?>" onclick="$('#sel_app').val('com.zoit.superpeng');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app5" autocomplete="off" <?if($sel_app=='com.zoit.superpeng') echo "checked";?> value="com.zoit.superpeng" > 슈퍼팽 </label> <label class="btn btn-white <?if($sel_app=='com.zoit.fleefish') echo "active";?>" onclick="$('#sel_app').val('com.zoit.fleefish');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app6" autocomplete="off" <?if($sel_app=='com.zoit.fleefish') echo "checked";?> value="com.zoit.fleefish" > 플리피쉬 </label> <label class="btn btn-white <?if($sel_app=='com.zoit.kartcrash') echo "active";?>" onclick="$('#sel_app').val('com.zoit.kartcrash');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app7" autocomplete="off" <?if($sel_app=='com.zoit.kartcrash') echo "checked";?> value="com.zoit.kartcrash" > 카트크래쉬 </label> <label class="btn btn-white <?if($sel_app=='com.zoit.updownhills') echo "active";?>" onclick="$('#sel_app').val('com.zoit.updownhills');document.frm_search.submit()"> <input type="radio" name="chk_app" id="sel_app8" autocomplete="off" <?if($sel_app=='com.zoit.updownhills') echo "checked";?> value="com.zoit.updownhills" > 업다운힐즈 </label> </div> </div> <div class="col-sm-3 m-b-xs"> <div class="input-daterange input-group" id="datepicker"> <input type="text" class="form-control-sm form-control" name="sel_sdate" value="<?=$sel_sdate?>" autocomplete="off"> <span class="input-group-addon">to</span> <input type="text" class="form-control-sm form-control" name="sel_edate" value="<?=$sel_edate?>" autocomplete="off"> </div> </div> <div class="col-sm-2 m-b-xs"> <button class="btn btn-info " type="button" onclick="this.form.submit()"><i class="fa fa-search"></i> 검색실행</button> </div> </div> <div class="pull-left"></div> <input type='hidden' name='sel_gigan' id='sel_gigan' value="<?=$sel_gigan?>"> <input type='hidden' name='sel_mode' id='sel_mode' value="<?=$sel_mode?>"> <input type='hidden' name='sel_app' id='sel_app' value="<?=$sel_app?>"> <input type='hidden' name='c_page' id='c_page' value="<?=$c_page?>"> </form> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>no</th> <th>순위</th> <th>아이디</th> <th>닉네임</th> <th>나이</th> <th>성별</th> <th>년</th> <th>월</th> <th>주차</th> <th>날짜</th> <th>점수</th> <th>칼로리(kcal)</th> <th>운동거리(km)</th> <th>운동시간</th> <th>회전수</th> <th>UPDATE</th> </tr> </thead> <tbody> <? while($rs=mysql_fetch_array($result)) { $rsmem=RS("select * from member where no='{$rs[mem_no]}' "); $age=$rsmem[birth]?(date('Y')-$rsmem[birth]+1)."세":''; ?> <tr> <td><?=$i?></td> <td><?=$rs[wrank2]?></td> <td><a href='member.php?find=id&search=<?=$rs[id]?>'><?=$rsmem[id]?></a></td> <td><?=$rsmem[nick]?></td> <td><?=$age?></td> <td><?=$rsmem[gender]=='M'?'남':'여'?></td> <td><?=$rs[jyear]?></td> <td><?=$rs[jmonth]?></td> <td><?=$rs[jweek]?></td> <td><?=$rs[jdate]?></td> <td><?=number_format($rs[jumsu])?></td> <td><?=sprintf("%.1f",$rs[calo])?></td> <td><?=sprintf("%.1f",$rs[dist]/1000)?></td> <td><?=SecToTime($rs[exertime])?></td> <td><?=number_format($rs[wcnt])?></td> <td><?=str_replace(" ","<br>",$rs[uptime])?></td> <?$i--;}?> </tbody> </table> <?navi($_SERVER[PHP_SELF],$t_record,$limit,$pagelimit,$c_page,$gita);?> </div> </div> </div> </div> </div> </div> <? include_once("inc_footer.php"); ?> </div> </div> <!-- Mainly scripts --> <script src="js/jquery-3.1.1.min.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap.js"></script> <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script> <!-- Peity --> <script src="js/plugins/peity/jquery.peity.min.js"></script> <!-- Custom and plugin javascript --> <script src="js/inspinia.js"></script> <script src="js/plugins/pace/pace.min.js"></script> <!-- iCheck --> <script src="js/plugins/iCheck/icheck.min.js"></script> <!-- Peity --> <script src="js/demo/peity-demo.js"></script> <!-- Chosen --> <script src="js/plugins/chosen/chosen.jquery.js"></script> <!-- Data picker --> <script src="js/plugins/datapicker/bootstrap-datepicker.js"></script> <!-- Date range use moment.js same as full calendar plugin --> <script src="js/plugins/fullcalendar/moment.min.js"></script> <!-- Date range picker --> <script src="js/plugins/daterangepicker/daterangepicker.js"></script> <script src="css/messagebox.js"></script> <script> $(document).ready(function(){ $('.i-checks').iCheck({ checkboxClass: 'icheckbox_square-green', radioClass: 'iradio_square-green', }); $('#sel_jdate').datepicker({ keyboardNavigation: false, forceParse: false, autoclose: true, format: 'yyyy-mm-dd', }); $('.input-daterange').datepicker({ keyboardNavigation: false, forceParse: false, autoclose: true, format: 'yyyy-mm-dd', }); $('.chosen-select').chosen({width: "100%"}); }); </script> </body> </html>