|
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']."/conf/conf_dir.php";
if($sessionLevel !="15" && $sessionLevel !="25"){
echo "<script>alert('admin page');document.location='/admin/login.php';</script>";
}
if(!$mode || $mode == "search"){
/*
echo"검색어 : $new_text <br>";
echo"입금액 : $or_money <br>";
*/
//$query20 = mysql_query("SELECT uid, orderstep FROM shop_order WHERE orderid like '%".$new_text."%' AND price = '$or_money'",$db_con) or die (mysql_error());
$query20 = mysql_query("SELECT uid, orderid, orderstep, price FROM shop_order WHERE orderid like '%".$new_text."%'",$db_con) or die (mysql_error());
$total_result20 = mysql_affected_rows();
//echo"$total_result20 <br>";
if($total_result20 > 0){
while($result20 = mysql_fetch_array($query20)){
//echo"$result20[uid] <br>";
//echo"$result20[orderstep] <br>";
//상태값
switch($result20[orderstep]){
case "1":
$result20_flagName = "주문접수 ($result20[orderstep])";
break;
case "2":
$result20_flagName = "<font color='#FFFFFF'>입금완료 ($result20[orderstep]) </font>";
$flagColor="#FF0099";
break;
case "3":
$result20_flagName = "<font color='#FFFFFF'>배송준비 ($result20[orderstep]) </font>";
$flagColor="#FF9955";
break;
case "4":
$result20_flagName = "<font color='#FFFFFF'>상품발송 ($result20[orderstep]) </font>";
$flagColor="#F25745";
break;
case "5":
$result20_flagName = "<font color='#FFFFFF'>배송완료 ($result20[orderstep]) </font>";
$flagColor="#2457BD";
break;
case "6":
$result20_flagName = "<font color='#FFFFFF'>주문취소 ($result20[orderstep]) </font>";
$flagColor="#cccccc";
break;
case "7":
$result20_flagName = "<font color='#FFFFFF'>환불요청 ($result20[orderstep]) </font>";
$flagColor="#fff0";
break;
case "8":
$result20_flagName = "<font color='#FFFFFF'>환불완료 ($result20[orderstep]) </font>";
$flagColor="#865F00";
break;
default:
$result20_flagName = "<span style='background:#fec3c0;'>MISSING!!";
break;
}
$result_20 .= "<tr>
<td class='modal_td_ce'><strong>$result20[uid] </strong></td>
<td class='modal_td_ce'><strong>$result20[orderid] </strong></td>
<td class='modal_td_ce'><strong>$result20[price] </strong></td>
<td class='modal_td_ce' style='background-color:$flagColor;'><strong>$result20_flagName</strong></td>
<td class='modal_td_ce'><a href='bank_query.php?bank_no=$bank_no&result20_no=$result20[uid]'>입금완료</a></td>
</tr>";
}
}else{
$result_20 = "<tr>
<td class='modal_td_ce' colspan='5'> MISSING!! </td>
</tr>";
}
$query21 = mysql_query("SELECT id, userid, jcname, startdate, enddate, inning, reg_date, flag, admin_date FROM user_cash WHERE userid like '%".strtolower($new_text)."%' ORDER by flag ",$db_con) or die (mysql_error());
$total_result21 = mysql_affected_rows();
//echo"SELECT id, userid FROM user_cash WHERE userid like '%".strtolower($new_text)."%'";
//echo"$total_result21 <br>";
if($total_result21 > 0){
while($result21 = mysql_fetch_array($query21)){
switch($result21[flag]){
case("A"):
$result_21_flag = "<font color='#FFFFFF'>대기</font>";
$result_21_url = "<a href='bank_query.php?bank_no=$bank_no&result21_no=$result21[id]'>입금완료처리</a>";
break;
case("D"):
$result_21_flag= "<font color='#FFFFFF'>완료</font>";
$flagColor="#FF0099";
$result_21_url = "<a href='bank_query.php?bank_no=$bank_no&result21_no=$result21[id]'>입금완료처리</a>";
break;
case("C"):
$result_21_flag= "<font color='#FFFFFF'>환불</font>";
$flagColor="#865F00";
$result_21_url = "<a href='bank_query.php?bank_no=$bank_no&result21_no=$result21[id]'>입금완료처리</a>";
break;
default:
$result_21_flag= "ERROR!!";
break;
}
$admin_date = str_replace("-",".",substr($result21[admin_date], 0, 10));
$result_21 .= "<tr>
<td class='modal_td_ce'><strong>$result21[id] </strong></td>
<td class='modal_td_ce'><strong><span style='color:#ed1c24;'>$new_text <br><a href='memberlist1.php?act=4&key=userid&key_word=$result21[userid]' target='_blank'>$result21[userid]</a></strong></td>
<td class='modal_td_ce'><strong>$result21[jcname]</strong></td>
<td class='modal_td_ce'><strong>$result21[reg_date]</strong></td>
<td class='modal_td_ce'><strong>$result21[startdate] </strong></td>
<td class='modal_td_ce'><strong>$result21[enddate] </strong></td>
<td class='modal_td_ce'><strong>$admin_date </strong></td>
<td class='modal_td_ce'><strong>$result21[inning] </strong></td>
<td class='modal_td_ce' style='background-color:$flagColor;'><strong>$result_21_flag </strong></td>
<td class='modal_td_ce'>$result_21_url</td>
</tr>
";
}
}else{
$result_21 = "<tr>
<td class='modal_td_ce' colspan='10'> MISSING!! </td>
</tr>";
}
}else if($mode = "edit"){
if(!$bank_no){
$result_21 = "<tr>
<td class='modal_td_ce' colspan='10'> MISSING!! </td>
</tr>";
}else{
$query30 = mysql_query("SELECT no, or_date, new_text, or_money FROM bank_kwon WHERE no='$bank_no'",$db_con) or die (mysql_error());
$result30 = mysql_fetch_array($query30);
//$edit_text = "$result30[or_date]<br> $result30[new_text]<br> $result30[or_money] ";
$result_21 = "<tr>
<td class='modal_td_ce'><strong>$result30[no] </strong></td>
<td class='modal_td_ce'><strong>$result30[new_text]</strong></td>
<td class='modal_td_ce'><strong>$result30[or_money] </strong></td>
<td class='modal_td_ce'><strong>$result30[or_date] </strong></td>
<td class='modal_td_ce'><a href='bank_query.php?mode=edit&bank_no=$bank_no'><strong>환불</strong></a></td>
</tr>
";
}
}
?>
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/SimpleModal.min.js"></script>
<!--link href="/admin/css/style_bank.css" type="text/css" rel="stylesheet" /-->
<style>
span {height:23px; font-size:12px; background-color:#FFF; font-family:Verdana,Arial,'Helvetica Nenu','돋움','Dotum'; text-align:center;}
.modal_td_ce {height:23px; font-size:12px; background-color:#FFF; font-family:Verdana,Arial,'Helvetica Nenu','돋움','Dotum'; text-align:center;}
.modal_th_ce {height:23px; font-size:12px; background-color:#ececec; font-family:Verdana,Arial,'Helvetica Nenu','돋움','Dotum'; text-align:center;}
</style>
<script>
function SimpleModalClose(){
SimpleModal.close();
return;
}
</script>
<div style="width:95%; height:20px; text-align:right;"><a href="javascript:SimpleModal.close();">close</a></div>
<? if(!$mode || $mode == "search"){ ?>
<span><strong>검색조건</strong>
<table width="100%" cellpadding="0" cellspacing="1" style=" background-color:#CCC; font-size:12px;">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
</colgroup>
<thead>
<tr>
<td class='modal_th_ce'>DB번호</td>
<td class='modal_th_ce'>검색어</td>
<td class='modal_th_ce'>입금액</td>
<td class='modal_th_ce'>-</td>
<td class='modal_th_ce'>-</td>
</tr>
</thead>
<tbody>
<tr>
<td class="modal_td_ce"><strong><?=$bank_no?></strong></td>
<td class="modal_td_ce"><strong><span style='color:#ed1c24;'><?=$new_text?></strong></td>
<td class="modal_td_ce"><strong><?=$or_money?></strong> </td>
<td class="modal_td_ce">-</td>
<td class="modal_td_ce">-</td>
</tr>
</tbody>
</table>
<br /><br />
<span><strong>주문번호로 조회</strong> (Total:<?=$total_result20?>)
<table width="100%" cellpadding="0" cellspacing="1" style=" background-color:#CCC; font-size:12px;">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
</colgroup>
<thead>
<tr>
<td class='modal_th_ce'>DB번호</td>
<td class='modal_th_ce'>주문번호</td>
<td class='modal_th_ce'>청구액</td>
<td class='modal_th_ce'>상태</td>
<td class='modal_th_ce'>처리</td>
</tr>
</thead>
<tbody>
<?=$result_20 ?>
</tbody>
</table>
<br /><br />
<span><strong>ID 조회</strong> (Total:<?=$total_result21?>)
<table width="100%" cellpadding="0" cellspacing="1" style=" background-color:#CCC; font-size:12px;">
<colgroup>
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
</colgroup>
<thead>
<tr>
<td class='modal_th_ce'>DB번호</td>
<td class='modal_th_ce'>매칭ID</td>
<td class='modal_th_ce'>이름</td>
<td class='modal_th_ce'>신청일</td>
<td class='modal_th_ce'>유료시작</td>
<td class='modal_th_ce'>유료마감</td>
<td class='modal_th_ce'>입금완료</td>
<td class='modal_th_ce'>회차</td>
<td class='modal_th_ce'>상태</td>
<td class='modal_th_ce'>처리</td>
</tr>
</thead>
<tbody>
<?=$result_21 ?>
</tbody>
</table>
<? }else{ ?>
<table width="100%" cellpadding="0" cellspacing="1" style=" background-color:#CCC; font-size:12px;">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
</colgroup>
<thead>
<tr>
<td class='modal_th_ce'>DB번호</td>
<td class='modal_th_ce'>텍스트</td>
<td class='modal_th_ce'>입금</td>
<td class='modal_th_ce'>입금일</td>
<td class='modal_th_ce'>처리</td>
</tr>
</thead>
<tbody>
<?=$result_21 ?>
</tbody>
</table>
<? } ?>