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/alliancealliance/webadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

	$messgae = "";

	if(empty($_POST["code"])){
		$messgae .= "Please enter code.\\n\\n";
	}

	if(empty($_POST["start_date"])){
		$messgae .= "Please enter start date.\\n\\n";
	}else{
		if(!validateDate($_POST["start_date"], "Y-m-d")){
			$messgae .= "Invalid start date format.\\n\\n";
		}
	}

	if(empty($_POST["end_date"])){
		$messgae .= "Please enter end date.\\n\\n";
	}else{
		if(!validateDate($_POST["end_date"], "Y-m-d")){
			$messgae .= "Invalid end date format.\\n\\n";
		}
	}

	if(empty($_POST["fee"])){
		$messgae .= "Please enter fee.\\n\\n";
	}else{
		if(!is_numeric($_POST["fee"]) || (float)($_POST["fee"] <= 0)){
			$messgae .= "Fee should be in digital format and larger than 0.\\n\\n";
		}
	}

	if(empty($_POST["training_center_id"])){
		$messgae .= "Please select a venue.\\n\\n";
	}

	if(empty($_POST["time"])){
		$messgae .= "Please enter time.\\n\\n";
	}

	if(empty($_POST["medium_of_instruction_en"])){
		$messgae .= "Please enter medium of instruction.\\n\\n";
	}

	if(empty($_POST["stop_applying_text_en"])){
		$messgae .= "Please enter stop applying text.\\n\\n";
	}

	if(!empty($messgae)){
		echo "<script>alert('".$messgae."'); history.back();</script>";
		exit;
	}

	if(isset($_POST["valid_apply"]) && $_POST["valid_apply"] == 1){
		$valid_apply = 1;
	}else{
		$valid_apply = 0;
	}

	$sql        = "insert into course set course_category_id=?, code =?, start_date=?, end_date=?, fee=?, training_center_id=?, time=?, valid_apply=?, createdate=?, createby=?, lastupdate=?, lastupby=?, ";
	$parameters = array($_POST["course_category_id"], $_POST["code"], $_POST["start_date"], $_POST["end_date"], $_POST["fee"], implode(",",$_POST["training_center_id"]), $_POST["time"], $valid_apply, $nowdate, $_SESSION['cmsloginid'], $nowdate, $_SESSION['cmsloginid']);

	foreach ($arraylangcode as $langcode => $langname) {
		$sql .= "medium_of_instruction_" . $langcode . "=?, stop_applying_text_" . $langcode . "=?, ";
		$parameters[] = $_POST["medium_of_instruction_" . $langcode];
		$parameters[] = $_POST["stop_applying_text_" . $langcode];
	}

	$sql = substr_replace($sql, "", -2);
	bind_pdo($sql, $parameters);

	$dbh = null;

	header("Location: course_index.php?msg=1");


Youez - 2016 - github.com/yon3zu
LinuXploit