403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Old Sites/dastafiles/admin/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Old Sites/dastafiles/admin/functions/add-announcement-submit.php
<?php

$title=$_POST["title"];
$summary=$_POST["summary"];
$type=$_POST["type"];
$post_date=$_POST["post_date"];
$filename=$_FILES["file"]["name"];


if(trim($title)=="" || trim($summary)=="" || trim($type)=="" || trim($post_date)=="") {
	# Ελλιπή στοιχεία
	echo'<div class="error_box">Παρακαλώ συμπληρώστε όλα τα πεδία.</div>';
}
else {
	# Έγινε σωστή συμπλήρωση φόρμας
	$txt="<p>".$summary."</p>";

	if($filename!=NULL) {
		# Έλεγχος αρχείου
		$allowed=array("doc", "docx", "pdf", "zip", "rar");
		$ext=pathinfo($filename, PATHINFO_EXTENSION);
		if(!in_array($ext, $allowed)) {
			# Μη αποδεκτός τύπου αρχείου
			echo'<div class="error_box">Επιτρέπονται μόνο pdf, doc, docx, zip ή rar αρχεία.</div>';
		}
		else if($_FILES["file"]["size"]>(20*1024*1024)) {
			# Πολύ μεγάλο αρχείο
			echo'<div class="error_box">Δεν επιτρέπονται αρχεία μεγαλύτερα από 20ΜΒ.</div>';
		}
		$fileParts=pathinfo($_FILES["file"]["name"]);
		$target_file=date("Ymd")."_".substr(md5(date("YmdHis")."dasta-file"), 0, 10).".".$fileParts["extension"];
		move_uploaded_file($_FILES["file"]["tmp_name"], "../uploads/".$target_file);
		$txt.="<p>&raquo; <a href=\'http://www.teicm.gr/dastafiles/uploads/".$target_file."\'>Κατεβάστε την ανακοίνωση για περισσότερες πληροφορίες</a></p>";
	}

	mysql_query("INSERT INTO documents (name, sector, madeby, madeat, txt, typ, active) VALUES ('".$title."', 0, '".$_SESSION["user_logged"]."', '".$post_date."', '".$txt."', '".$type."', 1)");
	
	header("Location: index.php");
	if(mysql_affected_rows()>0) echo'<div class="valid_box">Η ανακοίνωση προστέθηκε επιτυχώς.</div>';
	else echo'<div class="error_box">Δεν προστέθηκε η ανακοίνωση.</div>';
}

require_once("manage-announcements.php");

?>

Youez - 2016 - github.com/yon3zu
LinuXploit