KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/www/admin/store_order_photobook_calculate.php
<?include $_SERVER['DOCUMENT_ROOT']."/admin/adminTopMenu.html";?>
<script type="text/javascript" src="./js/Calendar_x.js"></script>
<link href="/admin/css/order.css" type="text/css" rel="stylesheet" />
<div id="main"><script type="text/JavaScript">
function goPage(page)
{
	var f = document.form;
	f.page.value = page;
	f.action = '/admin/site_management/Calculate.asp';
	f.submit();
}

function searchChk() {
	//검색
	document.form.action = "<?=$php_self?>";
	document.form.submit();
}
</script>

<script src="/share/js/formcheck.js" type="text/javascript"></script>
<script type="text/javascript">
function go_Downxls() {
	var f = document.form;
	f.action = 'down_xls.asp';
	f.submit();
}
</script>
<?
	// =============================================== Query
	$tableName = "product";

	if(!$pageCount) $pageCount = 5;

	$show_one_page			= $pageCount;
	$show_view_page			= 10;

	$page     = ( $page ) ? $page : 1;
	$offset   = ($page-1)*$show_one_page;

	if($key_word) {
		$key_word = str_replace(" ","",$key_word);
		$where = "AND $key LIKE '%$key_word%'";
	}

	if($flag ==0){
		$where3 = "and orderstep not in(6,7,8)";
		$where2 = "and b.orderstep not in(6,7,8)";
		$titleName = "전체";
	}else if($flag ==2){
		$where3 = "and orderstep in (2,3,4,5)";
		$where2 = "and b.orderstep in (2,3,4,5)";
		$titleName = "입금완료";
	}else{
		$where3 = "and orderstep='1'";
		$where2 = "and b.orderstep='1'";
		$titleName = "주문접수";
	}

	if($start_date && $end_date){
		$where2 .=" and b.d_bank >='$start_date' and  b.d_bank <='$end_date'";
	}
	$shop_rate ="10";
	$price = "5940";

	$resub = Get_dbres("select sum(a.price) as sumprice,sum(b.buynum) as sumbuynum,sum(a.tack) as tackprice from shop_order_photobook as a  join shop_ordergoods_photobook as b on a.uid = b.parent where a.mbruid !=0 $where2");
				$rows	= mysql_fetch_array($resub);
				$goodsSumPrice = $price * $rows[sumbuynum];
				$wonprice = $goodsSumPrice * $shop_rate;

	?>



<div id="contents">
	<h2>재중 포토북 <?=$titleName?></h2>
	<!-- Search -->
	<div class="search">
		<fieldset>
			<p>
				<form name="form" method="post" target="_self" onsubmit="return false;" >
				<select name='flag'>
					<option value='0' <?if($flag == '0'){ echo "selected";}?>>전체</option>
					<option value='1' <?if($flag == '1'){ echo "selected";}?>>주문접수</option>
					<option value='2' <?if($flag == '2'){ echo "selected";}?>>입금완료</option>
				</select>
				<!--추가 날짜 선택-->
				<input type="text" name="start_date" size="17" value="<?echo $start_date?>" onclick="createCalendarDiv(document.all.start_date)">
				~
				<input type="text" name="end_date" size="17" value="<?echo $end_date?>" onclick="createCalendarDiv(document.all.end_date)">
				<!--추가 날짜 선택-->

				<input type="submit" value="검색" onclick="javascript:searchChk();" />
				</form>
			</p>
		</fieldset>
	</div>

	<table cellspacing="0" class="list">
		<thead>
			<tr >
				<th>상품</th>
				<th>가격(¥)</th>
				<!--<th>총수량</th>-->
				<th>수량</th>
				<!--<th>재고</th>-->
				<th>상품수익(¥)</th>
				<th>배송비(¥)</th>
				<th>총매출(¥)</th>
				<th>총매출(₩*rate)</th>
				<th>rate</th>
			</tr>
		</thead>
		<tbody>

			<tr>
				<td style="text-align:left;padding-left:20px;">재중 포토북</td>
				<td>5,940</td>
				<td><?=number_format($rows[sumbuynum])?></td>
				<td><?=number_format($goodsSumPrice)?></td>
				<td><?=number_format($rows[tackprice])?></td>
				<td><?=number_format($rows[sumprice])?></td>
				<td><?=number_format($wonprice)?></td>
				<td><?=$shop_rate?></td>
			</tr>
		</tbody>
	</table>
 <div class="page_list">
		<!--  prev/next_std -->
		<?=$viewlist2?>
		<!--  prev/next_end -->
		</div>
</div>
<!-- footer -->
</div>
</div>
</body>
</html>

Anon7 - 2021