#!/usr/bin/perl # Creator Koyama # Copyright (c) Telecom Wakayama. All rights reserved. #--------------------------------------------------------------------------------------------------- use strict; use Jcode; use Meditation; use Inscription; require './Mage.pl'; my $boundary = ','; my $upfldir = '../systems'; my $lkpdir = './temp'; my $ctlk = 'linklock'; my $sysdir = './sysfiles'; my $acclogna = 'acc_'; my $bnnlogna = 'bnnlog.cgi'; my $topurl = 'http://www.city.kinokawa.lg.jp/'; #my $topurl = 'http://119.10.161.142/'; my @temp_a = new Meditation('sjis','euc'); &CommonExport($topurl) if $temp_a[0] eq '1'; my $instm = $temp_a[0]; my $prt = $instm->UseParam('prt'); my $sid = $instm->UseParam('sid'); &CommonExport($topurl) if ('si93393870447' ne $prt || $sid =~ /\D/); if(-e "$sysdir\/$acclogna$sid\.log") { my @gtime = &Mage::GetTime1; my $ins_alog = new Inscription("$sysdir\/$acclogna$sid\.log",$lkpdir); my $ins_ctlk = new Inscription($ctlk,$lkpdir); @temp_a = $ins_ctlk->FileLock; die 'Killed prosess is E-Code:100.' if shift @temp_a; @temp_a = $ins_alog->FileRead; die 'Killed prosess is E-Code:110.' if shift @temp_a; my $ref_alog = $temp_a[0]; push(@$ref_alog, join($boundary, $gtime[5],$gtime[4],$gtime[3],$gtime[2],$gtime[1],$gtime[0])); @temp_a = $ins_alog->FileWrite('>'); die 'Killed prosess is E-Code:120.' if shift @temp_a; @temp_a = $ins_ctlk->RemoveFolder; die 'Killed prosess is E-Code:130.' if shift @temp_a; &CommonExport($instm->UseParam('say')); } else { &CommonExport($topurl); } sub CommonExport { $_[0] =~ s/\*\*\*\*\*/\=/g; $_[0] =~ s/\-\-\-\-\-/\&/g; print "Location: " . $_[0] . "\n\n"; exit; } exit;