ACC SHELL

Path : /srv/www/vhosts/lps/
File Upload :
Current File : /srv/www/vhosts/lps/odeslat_prace.php

<?php   
  echo tu;
	include "./classes/classes.php";

	$pripojeni = new CDatabaze ( $conf_uzivatel, $conf_heslodb, $conf_server, $conf_databaze);

    

if( !( $_POST['secinp'] && $_POST['secinp'] === substr(md5($_POST['last_id']),3,5) && (abs((time()%10000)-$_POST['last_id'])<300)) ){
	$capcha_wrong = true;

	header("Location: /".$_REQUEST['return']."?capcha=wrong&jmeno=".$_REQUEST['jmeno']."&email=".$_REQUEST['email']."&text=".$_REQUEST['text']."#vysledek");
}
else{
	if ($_POST['odeslat']){ 
	  $trans= array(
	            "jmeno" => "Jméno",
	            "prijmeni" => "Příjmení",
	            "pozice" => "Pozice",
	            "email" => "E-mail",
	            "telefon" => "Telefon",
	            "text" => "Poznámka",
	            "soubor"=>"Soubor se životopisem"
	          ); 
	  
	  $set= $_REQUEST;
	  $body0= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\" />";
	  $body.= "Byla odeslana poptavka na pracovní místo z webu: ".$_SERVER['SERVER_NAME']."\n\n";

	                                    
	    $body.= $trans["jmeno"].": ".$set['jmeno']." \n";
	    $body.= $trans["prijmeni"].": ".$set['prijmeni']." \n";
	
	    $body.= $trans["email"].": ".$set['email']." \n";
	    $body.= $trans["telefon"].": ".$set['telefon']." \n";
	    $body.= $trans["text"].": ".$set['text']." \n";
	  if ($_FILES['soubor']['name']){
       $path="./upload/";
         $new_name=time()."_".$set['name']."_".$_FILES['soubor']['name'];
         $new_name_mail=$_FILES['soubor']['name'];
			if (!@file_exists($path.$new_name)){
				@copy($_FILES['soubor']['tmp_name'], $path.$new_name);
        		@copy($_FILES['soubor']['tmp_name'], $path.$new_name_mail);
			}
	    $body.= $trans["soubor"].": http://www.lps.cz/upload/".$new_name." \n";
  	} 
	
	  $body_utf = $body ."\n\n Tento email byl odeslán z formuláře umístěného zde: ".$_SERVER['SERVER_NAME']."/".$_REQUEST['return']."";  
	
	
	  $body.= "\n\n Na tento email neodpovídejte.";
	
	$body= (iconv("UTF-8", "CP1250", $body));

	  
	  
	  require_once('./classes/htmlMimeMail5/htmlMimeMail5.php');
	  
	  $mail = new htmlMimeMail5();
	  $mail->setFrom('<formular@lps.cz>');
	  $mail->setSubject('Dotaz z webu '.$_SERVER['SERVER_NAME']);
	  $mail->setPriority('normal');
	  $mail->setText($body);
	  $mail->setTextCharset("windows-1250");

	
	  $pripojeni->dotaz("INSERT INTO ".$GLOBALS['config_db_prefix']."odeslano (nazev, cas, text) VALUES ('Pracovní nabídka z webu', '".time()."', '".nl2br($body_utf)."')");
	
	$body = $body0.nl2br($body);
	
$mail->send(array('info@lps.cz'));	
	// $mail->send(array('programator@4g.cz'));
	//  $mail->send(array($set[email]));
	  
	  $return= $_REQUEST['return'];  
	  if ($mail) header("Location: /$return?result=ok#vysledek");
	  else header("Location: /$return?result=err#vysledek");

	}
}




	function seo_gen($title, $typ='')
	{
		static $convertTable = array (
			'á' => 'a', 'Á' => 'A', 'ä' => 'a', 'Ä' => 'A', 'č' => 'c',
			'Č' => 'C', 'ď' => 'd', 'Ď' => 'D', 'é' => 'e', 'É' => 'E',
			'ě' => 'e', 'Ě' => 'E', 'ë' => 'e', 'Ë' => 'E', 'í' => 'i',
			'Í' => 'I', 'i' => 'i', 'I' => 'I', 'ľ' => 'l', 'Ľ' => 'L',
			'l' => 'l', 'L' => 'L', 'ň' => 'n', 'Ň' => 'N', 'n' => 'n',
			'N' => 'N', 'ó' => 'o', 'Ó' => 'O', 'ö' => 'o', 'Ö' => 'O',
			'ř' => 'r', 'Ř' => 'R', 'r' => 'r', 'R' => 'R', 'š' => 's',
			'Š' => 'S', 's' => 's', 'S' => 'S', 'ť' => 't', 'Ť' => 'T',
			'ú' => 'u', 'Ú' => 'U', 'ů' => 'u', 'Ů' => 'U', 'ü' => 'u',
			'Ü' => 'U', 'ý' => 'y', 'Ý' => 'Y', 'y' => 'y', 'Y' => 'Y',
			'ž' => 'z', 'Ž' => 'Z', 'z' => 'z', 'Z' => 'Z', 
			':' => '-', '/' => '-',
		);
		$title = strtolower(strtr($title, $convertTable));
		$title = Str_Replace(Array(" ", "_"), "-", $title); //nahradí mezery a podtržítka pomlckami
		if ($typ=='file')
			$title = Str_Replace(Array("(",")","!",",","\"","'"), "", $title); //odstranĂ­ ().!,"'
		else
			$title = Str_Replace(Array("(",")",".","!",",","\"","'"), "", $title); //odstranĂ­ ().!,"'
		
		$title = ereg_replace('/[^a-zA-Z0-9]+/u', '-', $title);
		$title = str_replace('--', '-', $title);
		$title = trim($title, '-');
		return urlencode($title);
	}
?>

ACC SHELL 2018