<?php
	
	include_once("_dirinfo.php");
	include_once(PATH_TO_ROOT."init.php");
	include_once(PATH_TO_ROOT."_support/stringFunctions.php");

	
	if ($_POST['action'] == "save") {
		
		// ------------ CHECKING VARIABLES
		$CheckVariable = sf_CheckForMySQL($_POST);
		
		$sql = "UPDATE ".DB_WARPIT_WEBCATI_BASE."._Capi_interviewer_visits 
					SET 
						priimek_gosp = '".$CheckVariable['priimek_gosp']."',
						komentar = '".$CheckVariable['komentar']."',
						ponovni_dogovor = '".$CheckVariable['input_date']." ".$CheckVariable['input_time'].":00',
						status_obiska = 8
				 WHERE id = ".$_POST['id_visit'];
		
		$db->SQLexecute($sql);
	}
	echo "{ success: true }";
	
?>