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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/onesupportdemo.onesolution.hk//report2.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: report2.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="X-UA-Compatible" content="IE=8" />

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

		.page_break{
			page-break-after: always;
		}
	</style>

	<style>

		body {
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
			/*background-color: #FAFAFA;*/
			font: 12pt "arial";
		}
		* {
			box-sizing: border-box;
			-moz-box-sizing: border-box;
		}
		.page {
			width: 210mm;
			min-height: 297mm;
			padding: 20mm;
			margin: 10mm auto;
			border: 1px #D3D3D3 solid;
			/*border-radius: 5px;*/
			background: white;
			/*box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);*/

		}
		.subpage {
			/*padding: 1cm;
			border: 5px red solid;*/
			width: 185mm;
			height: 276mm;
			/*outline: 2cm #FFEAEA solid;*/
			position: relative;
		}

		@page {
			size: A4;
			margin: 0;
		}
		@media print {
			html, body {
				width: 210mm;
				height: 297mm;
			}
			.page {
				margin: 0;
				border: initial;
				border-radius: initial;
				width: initial;
				min-height: initial;
				box-shadow: initial;
				background: initial;
				page-break-after: always;
			}
		}

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

	</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()) > 1043){

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

			}

			var task_content_height = 0;
			$('.task_detail').each(function() {
				task_content_height += parseInt($(this).height());
				//console.log($(this).height());
				console.log(task_content_height);

				if(task_content_height > 260 && task_content_height < 285){
					//$(this).after("");
					$( "<div class='page_break'>123</div>" ).insertAfter( this );
					$(this).next('.task_detail').css("margin-top", "20px;");
				}
			});

		});
	</script>

<head>

<body>

<div class="book">
	<div class="page">
		<div class="subpage">


			<div id="head_info">
				<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-row; width: 100%;">
					<div style="display: table-cell; width: 395px;vertical-align: middle;">
						<img src="images/header_logo.png" />
					</div>

					<div style="display: table-cell;vertical-align: middle;font-size: 12px;
width: 355px;">
						One Solution Limited<br>
						Unit E, 6/F., Camelpaint Buildings Block 3,<br>
						60 Hoi Yuen Road, Kwun Tong, 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>


			<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: 86%;">
					<?= $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: 33%;margin-right: 94px;">
					<?php if(empty($job_info{"job_contact_person"})) echo "&nbsp;"; else echo $job_info{"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: 33%;margin-right: 94px;">
					<?= $job_info{"username"} ?>
				</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: 135px;">
					Services Time  &nbsp;
				</div>

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

				<div style="float: left; border-bottom: 1px solid #000000;width: 65px;margin-right: 50px;">
					<?= $job_info{"start_time"} ?>
				</div>

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

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

				<div style="float: left;">Date : &nbsp; </div>

				<div id="job_date">
					<?= $job_info{"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 $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 class="task_detail <?=$key?>" style="margin-top: 20px;">
						<div style="display: table-cell;width: 135px;">
							Job Symptoms :
						</div>

						<div style="display: table-cell;">
							<?=$this_task{"title"}?>
						</div>


					</div>



					<div class="task_detail" style="margin-top: 20px;">
						<div style="display: table-cell;width: 135px;">
							Action :
						</div>

						<div style="display: table-cell;">
							<?php if(empty($this_task{"remarks"})) echo "&nbsp;"; else echo $this_task{"remarks"}; ?>
						</div>

					</div>



					<div class="task_detail" style="margin-top: 20px;">
						<div style="display: table-cell;width: 135px;">
							Job Status :
						</div>

						<div style="display: table-cell;">

							<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>


				<?php } ?>


			<div style="margin-top: 20px;">

				Parts Service Status :<br>



					<table style="width: 100%; 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 id="footer" style="position: absolute;bottom: 0px;width: 100%;">
				<div style="margin-top: 20px; width: 100%;">
					<div style="float: left; text-align: center;width: 45%;">
						<div style="text-align: left;">
							Service confirmed, Accepted & product Received By<br>
						</div>

						<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><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>



		</div>
	</div>


</div>


</body>
</html>


Youez - 2016 - github.com/yon3zu
LinuXploit