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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/onesupportsys.onesolution.hk/report_old.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();

	// Number Encode/Decode class By Axer 991208
	class NumDEnCrypt
	{
		var $code = "HsIroMnNmVeJqfAzGtKpLWdCxDwXcYbZByEvFuaOlPkQjRiShTgU"; // A character string without dupl. char.
		var $shift = 3; //shift value : no shift 0-10 largely shift

		public function NumEncode($v)
		{
			$code    = $this->code;
			$shift   = $this->shift;
			$len     = strlen($code); //62
			$vs      = (string)$v;
			$segment = floor(log10(PHP_INT_MAX >> $shift)); //7
			$segnum  = ceil(strlen($vs) / $segment);
			$out     = "";
			for ($ii = 0; $ii < $segnum; $ii++) {
				$seg = substr($vs, $ii * $segment, $segment);
				$v   = (int)$seg << $shift;
				if ($v === 0) {
					$zeronum = strlen($seg);
					$out .= "." . $code[$zeronum];
				} else
					do {
						$r = $v % $len;
						$out .= $code[$r];
						$v = ($v - $r) / $len;
					} while ($v > 0);
			}
			// Add check char.
			$c = 0;
			for ($ii = 0; $ii < strlen($out); $ii++) if ($out[$ii] !== '.') $c += strpos($code, $out[$ii]);
			$out .= $code[$c % $len];
			return $out;
		}


		public function NumDecode($s)
		{
			$code  = $this->code;
			$shift = $this->shift; //6
			//check decoded string
			$len  = strlen($code);
			$slen = strlen($s) - 1;
			if ($slen <= 1) return -1;
			$c = 0;
			for ($ii = 0; $ii < $slen; $ii++) if ($s[$ii] !== '.') $c += strpos($code, $s[$ii]);
			if ($code[$c % $len] !== $s[$slen]) return -2; //Validate Err
			$segment = ceil(log(PHP_INT_MAX >> $shift) / log($len)); //5
			$out     = "";
			$ii      = 0;
			$index   = 0;
			$v       = 0;
			do {
				if ($s[$index] !== ".") {
					$r = strpos($code, $s[$index]);
					$v += $r * pow($len, $ii);
					if ($ii == $segment - 1 || $index == $slen - 1) {
						$ii = 0;
						$v >>= $shift;
						$out .= $v;
						$v = 0;
					}
				} else { //ZERO
					$pos = strpos($code, $s[$index + 1]);
					$out .= str_repeat("0", $pos);
					$ii = 0;
					$index++;
					$v = 0;
				}
				$ii++;
				$index++;
			} while ($index < $slen);
			return $out;
		} //End Class
	}


	$numDEnCrypt = new NumDEnCrypt();
	/*	$encode_int = $numDEnCrypt->NumEncode($_GET["id"]);

		$decode_int = $numDEnCrypt->NumDecode("p4I9");
		echo $encode_int."<br>".$decode_int;
		exit;*/
	if (is_numeric($_GET["id"])) { //encrypt
		$encode_int = $numDEnCrypt->NumEncode($_GET["id"]);

		header("Location: report.php?id=" . $encode_int);
	} else { //decrypt
		$decode_int = $numDEnCrypt->NumDecode($_GET["id"]);

		$decode_int = substr($decode_int, 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", $decode_int);

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

		/*		$sql2       = "select * from sup_job_pending where deleted =? and job_id = ?";
				$parameters2 = array("0", $job_info{"job_id"});

				if (!($sth2 = $dbh->prepare($sql2))) {
					throw new Exception("sql prepare statement failure: $sql2");
				}
				$sth2->setFetchMode(PDO::FETCH_ASSOC);
				if (!$sth2->execute($parameters2)) {
					throw new Exception("sql execute statement failure: $sql2");
				}
				$pending_task = $sth2->fetchAll();*/

	}

?>

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=8" />

	<style type="text/css" media="print">

		#print_btn{
			display: none;
		}

		body{
			height: 297mm;
		}

	</style>

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

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

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

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

		});
	</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 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 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{"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;">
		<?= $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: 130px;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: 130px;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", $decode_int))) {
		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 $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 style="margin-top: 20px;">

	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