1#!/usr/local/bin/perl 2# Save a manually edited cron job 3 4require './cron-lib.pl'; 5&ReadParseMime(); 6&error_setup($text{'manual_err'}); 7$access{'mode'} == 0 || &error($text{'manual_ecannot'}); 8 9# Validate the file and update it 10my @files = &list_cron_files(); 11&indexof($in{'file'}, @files) >= 0 || &error($text{'manual_efile'}); 12$in{'data'} =~ s/\r//g; 13$in{'data'} .= "\n" if ($in{'data'} !~ /\n$/); 14&open_lock_tempfile(FILE, ">$in{'file'}"); 15&print_tempfile(FILE, $in{'data'}); 16&close_tempfile(FILE); 17 18&webmin_log("manual", undef, $in{'file'}); 19&redirect("index.cgi?search=".&urlize($in{'search'})); 20