1) The first question I don't know how to answer other than setting the
$auth_time to a lower value. But gauging an "automatic" kill session would be problematic and you would have to re-write the
sub auth_logging and
sub auth_cleanup routines in the
auth.pl file.
2) You would have to edit the
sub get_date and
sub date_to_unix routines in your
db.cgi file, like the following:
Code:
sub get_date {
# --------------------------------------------------------
# Returns the date in the format "dd-mmm-yy".
# Warning: If you change the default format, you must also modify the &date_to_unix
# subroutine below which converts your date format into a unix time in seconds for sorting
# purposes.
$time1 = @_;
($time1) | | ($time1 = time());
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $daylight) = localtime($time1);
my (@months) = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
($day < 10) and ($day = "0$day");
$year = $year + 1900;
return "$day\.$months[$mon]\.$year"; }
AND
Code:
sub date_to_unix {
# --------------------------------------------------------
# This routine must take your date format and return the time a la UNIX time().
# Some things to be careful about..
# int your values just in case to remove spaces, etc.
# catch the fatal error timelocal will generate if you have a bad date..
# don't forget that the month is indexed from 0!
#
my ($date) = $_[0];
my (%months) = ("Jan" => 0, "Feb" => 1, "Mar" => 2, "Apr" => 3, "May" => 4, "Jun" => 5,
"Jul" => 6, "Aug" => 7, "Sep" => 8, "Oct" => 9, "Nov" => 10,"Dec" => 11);
my ($time);
my ($day, $mon, $year) = split(/
\./, $_[0]);
unless ($day and $mon and $year) { return undef; }
unless (defined($months{$mon})) { return undef; }
use Time::Local;
eval {
$day = int($day); $year = int($year) - 1900;
$time = timelocal(0,0,0,$day, $months{$mon}, $year);
};
if ($@) { return undef; } # Could return 0 if you want.
return ($time);
}
Note: The bolded codes are the edits you have to make.
3) Add a new field in your
db_def hash in your
default.cfg file, like the following:
Code:
LastModified => [19, 'date', 12, 15, 1, &get_date, ''],
Make sure that you change
19 to the last field number in your
db_def file.
Then you can use the
Upgrade.cgi file that is located at the following URL to add this field automatically to your existing database:
Then add the field to your
sub html_record_form and
sub html_record and/or
sub_html_record_long. You would only add this field to the latter two sub-routines if you want this field publicly listed in your search results.
Hope this helps.
Good luck.
Regards,
------------------
Eliot Lee Anthro TECH,L.L.C
www.anthrotech.com ----------------------