|
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/www/admin/ |
Upload File : |
<?include $_SERVER['DOCUMENT_ROOT']."/admin/adminTopMenu.html";?>
<?
$time_start = microtime(true);
?>
<script type="text/JavaScript">
function goPage(page)
{
var f = document.form;
f.page.value = page;
f.action = '/admin/memberlist.php';
f.submit();
}
function StatusScript(status,id) {
var choose = confirm("修正しましょうか?");
if(choose){
document.form.idx.value = id;
document.form.mode.value = status;
document.form.action = "/admin/Proc/authcode_proc.php";
document.form.submit();
}
}
</script>
<script type="text/javascript">
function validate()
{
if(!chkDate(frm.startdate,"날짜 형식에 맞게 입력해 주세요\n\n예)2012-01-01")) {return false;}
if(!chkDate(frm.enddate,"날짜 형식에 맞게 입력해 주세요\n\n예)2012-01-01")) {return false;}
return true;
}
function go_View(member_srl) {
var f = document.form;
f.idx.value = member_srl;
f.action = 'member_detail.php';
f.submit();
}
function go_Delete(member_srl) {
if(confirm("등록된 회원정보가 삭제 됩니다.\n삭제하시겠습니까?")) {
var f = document.form;
f.mode.value = 'del';
f.idx.value = member_srl;
f.action = './Proc/member_proc.php';
f.submit();
}
}
function searchChk() {
//검색
document.form.action = "./memberlist.php";
document.form.submit();
}
</script>
<?
if(!$pageCount) $pageCount = 25;
$show_one_page = $pageCount;
$show_view_page = 10;
$page = ( $page ) ? $page : 1;
$offset = ($page-1)*$show_one_page;
if($key_word) {
if($key == "username" || $key == "jname" || $key == "jname2" || $key == "nickname"){
//$key_word = str_replace(" ","",$key_word);
$where = "AND $key like '%".$key_word."%' ";
}else{
$key_word = str_replace(" ","",$key_word);
$where = "AND UPPER(".$key.") like '%".strtoupper($key_word)."%' ";
}
}
if($act == 1){
if($sessionID =="cjesent" || $sessionID =="admin"){
$where .=" and (id not like '2%' and id not like '6%' and id not like '9%')";
//$where .=" and mbk=1 ";
}
}else if($act == 2){
$where .=" and auth_code = 10 and country='' ";
if($sessionID =="cjesent" || $sessionID =="admin"){
//$where .=" and id not like '7%' or id like '9%' ";
$where .=" and mbk=1 ";
}
}else if($act == 7){
$where .=" and country='cn' ";
}
if($tabs == 2){
$order_by = ' ORDER BY member_code desc ,m_startdate DESC';
}else{
$order_by = ' ORDER BY id desc';
}
/*if($sort == '1'){
$order_by = ' ORDER BY m_enddate asc';
}*/
$url_tail = "&act=$act&key=$key&key_word=$key_word&order_by=$order_by&LK=$LK&sort=$sort";
//총 회원;
$total_count = get_db("SELECT count(*) FROM user where activated = 1 $where $CoWhere $order_by");
$query_limit = "limit $offset,$show_one_page";
$QUERY_PAGE = "
SELECT
*,
(SELECT id FROM blacklist WHERE id=userid) as BLCNT
FROM
user
where
activated = 1 $where $CoWhere $order_by $query_limit";
//echo $QUERY_PAGE."<br>";
//echo $HTTP_SESSION_VARS[S_ID];
$total_page = ceil( $total_count / $show_one_page);
$viewlist2 = ( !$total_count ) ? "" : Get_viewpage2($page,$total_count,$show_one_page,$show_view_page,$url_tail);
$start_num = $total_count - $offset; //
$result= mysql_query($QUERY_PAGE,$db_con);
if(!$result) {
error("DB_ERROR");
exit;
}
$total = mysql_affected_rows();
?>
<div id="contents">
<h2>회원관리</h2>
<div id="content">
<?include "./membertab.html"?>
<form name="form" method="post" target="_self" onsubmit="return false;" >
<input type="hidden" name="idx">
<input type="hidden" name="mode">
<input type="hidden" name="act" value="<?=$act?>">
<fieldset>
<select name="key">
<option value="userid" <?if($key == "userid") echo "selected"; ?>>ID</option>
<option value="username" <?if($key == "username") echo "selected"; ?>>名前(ローマ字)</option>
<option value="jname2" <?if($key == "jname2") echo "selected"; ?>>名前 ( 漢字 )</option>
<option value="jname" <?if($key == "jname") echo "selected"; ?>>名前(カタカナ)</option>
<option value="nickname" <?if($key == "nickname") echo "selected"; ?>>닉네임</option>
<option value="email" <?if($key == "email") echo "selected"; ?>>mail</option>
</select>
<input type="text" name="key_word" class="type-text" size="20" maxlength="20" value="<?=$key_word?>" onKeyPress="if(event.keyCode==13) if(event.keyCode==13) searchChk();">
<input type="button" value="검색"class="btn_blue" onClick="searchChk();" />
<input type="button" value="취소" class="btn_blue" onClick="location.href='./memberlist.php?act=<?=$act?>';" />
</fieldset>
</form>
<?
if($sessionID == "cjesent" || $sessionID == "admin") $tmp_cjes = "_cjes";
else $tmp_cjes = "";
?>
<?//$tmp_cjes?>
<form name="frm" method="post" action="./member_excel<?=$tmp_cjes?>.php" onsubmit="return validate();"">
<fieldset>
엑셀로 다운 받기
<select name="group_srl">
<option value="10">정회원</option>
<option value="3">결제대기회원</option>
</select>
<!--input type="text" name="startdate"/> ~ <input type="text" name="enddate" /> ex)2012-01-01-->
<input type="submit" value="다운로드" class="btn_blue"/>
</fieldset>
</form>
<table class="member" summary="관리자모드 게시판입니다" cellspacing="0" >
<colgroup>
<col width="30"/>
<col width="150" />
<col width="80" />
<col />
<col width="100"/>
<col width="100" />
<col width="80"/>
<col width="100"/>
<col width="60" />
<col width="60" />
</colgroup>
<thead>
<tr>
<th>No</th>
<!--th>회원번호</th-->
<th>아이디</th>
<th>이름</th>
<th>핸드폰</th>
<th>가입일</th>
<th>최근 로그인</th>
<th>상태</th>
<th>유료 마감일</th>
<th>삭제</th>
</tr>
</thead>
<tbody>
<?
if(!$total){
echo "<tr><td colspan='9' align=center height='50px'>登録された情報がございません</td></tr>";
}else if(($sessionLevel == 3 || $sessionLevel == "") && ($tabs==4 || $tabs==6 || $tabs==7)){
//echo "<tr><td colspan='3' align=center height='50px'>유료회원 페이지 입니다.</td></tr>";
echo "<tr><td colspan='9' align=center height='50px'>$membersJapansName</td></tr>";
}else{
for($i=0; $i<$total; $i++) {
$Num = $start_num - $i;
$row = mysql_fetch_array($result);
$created = substr($row[created],0,10);
$tel = Get_db("select tel from user_profiles where user_id = '$row[id]'");
if($row[mChk] == 1){
$bgColor ="#dddddd";
}else{
$bgColor ="#ffffff";
}
if($row[auth_code] == '10'){
$stateColor ="#FF0099";
}else{
$stateColor ="#ffffff";
}
?>
<tr bgcolor="<?=$bgColor?>">
<td><?=$Num?></td>
<td><?if($row[BLCNT] == $row[userid]) echo"<img src='/images/jin.gif'/>";?><?=$row[userid]?></td>
<td><a href="javascript:go_View('<?=$row[id]?>');"><?=$row[username]?></a></td>
<td><?=$tel?></td>
<td><?=$row[created]?></td>
<td><?=$row[last_login]?></td>
<td bgcolor="<?=$stateColor?>">
<?
if($row[auth_code] == 15){
echo"管理者";
}
if($act==1){
if($row[auth_code] == '10'){
echo"유료회원";
}else{
echo"일반회원";
}
}else{
?>
<select name="status" onChange="javascript:StatusScript(this.value,'<?=$row[id]?>');" <?//if($_SERVER["REMOTE_ADDR"] != $remoteAddr){echo" disabled='true'";}?>>
<option <? if($row[auth_code] == '10') { echo 'selected'; } ?> value='10'><font color='red'>유료회원</font></option>
<option <? if($row[auth_code] == '3') { echo 'selected'; } ?> value='3'><font color='red'>일반회원</font></option>
</select>
<?}?>
</td>
<td><?=$row[m_enddate]?></td>
<td><a href="javascript:go_Delete('<?=$row[id]?>');"><img src="/admin/images/out.png"></a></td>
</tr>
<?
$Num--;
}
}
?>
</tbody>
</table>
<div class="page_list">
<!-- prev/next_std -->
<?=$viewlist2?>
<!-- prev/next_end -->
</div>
</div>
</div>
</div>
<p></p>
</body>
</html>
<?
//$time_end = microtime(true);
//$time = sprintf("%0.2f",$time_end - $time_start);
//echo "<center><br><br>$time sec<br><br>";
?>