db->queryAllRecords("SELECT * FROM sys_filesync WHERE active = 1"); if(is_array($filesync_list)) { foreach($filesync_list as $filesync) { $ftp_host = escapeshellcmd($filesync['ftp_host']); $ftp_path = escapeshellcmd($filesync['ftp_path']); $ftp_username = escapeshellcmd($filesync['ftp_username']); $ftp_password = escapeshellcmd($filesync['ftp_password']); $local_path = escapeshellcmd($filesync['local_path']); $wput_options = escapeshellcmd($filesync['wput_options']); if(substr($ftp_path,0,1) == "/") $ftp_path = substr($ftp_path,1); $exec_string = $conf["programs"]["wput"] ." $wput_options $local_path ftp://$ftp_username:$ftp_password@$ftp_host/$ftp_path"; $handle = popen($exec_string, 'r'); echo "
";
		while($read = fread($handle, 2096)) { 
			echo $read;
		}
		echo "
"; pclose($handle); } } ?>