-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreset.cgi
129 lines (104 loc) · 2.11 KB
/
reset.cgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
##############
# Reset Mode #
##############
sub RESET_MODE{
# MAIN DATA
$dir="./charalog/main";
opendir(dirlist,"$dir");
while($file = readdir(dirlist)){
if($file =~ /\.cgi/i){
unlink("$dir/$file");
}
}
closedir(dirlist);
# COMMAND DATA
$dir="./charalog/command";
opendir(dirlist,"$dir");
while($file = readdir(dirlist)){
if($file =~ /\.cgi/i){
unlink("$dir/$file");
}
}
closedir(dirlist);
# LOG DATA
$dir="./charalog/log";
opendir(dirlist,"$dir");
while($file = readdir(dirlist)){
if($file =~ /\.cgi/i){
unlink("$dir/$file");
}
}
closedir(dirlist);
# NEW DATA
@NEW_DATA = ();
# ACT LOG
$actfile = "$LOG_DIR/act_log.cgi";
open(OUT,">$actfile");
print OUT @NEW_DATA;
close(OUT);
# BBS LIST
open(OUT,">$BBS_LIST");
print OUT @NEW_DATA;
close(OUT);
# COUNTRY LIST
open(OUT,">$COUNTRY_LIST");
print OUT @NEW_DATA;
close(OUT);
# COUNTRY_LIST2 LIST
open(OUT,">$COUNTRY_LIST2");
print OUT @NEW_DATA;
close(OUT);
# DATE LIST
open(OUT,">$LOG_DIR/date_count.cgi");
print OUT @NEW_DATA;
close(OUT);
# DEF LIST
open(OUT,">$DEF_LIST");
print OUT @NEW_DATA;
close(OUT);
# MAP LOG LIST
open(OUT,">$MAP_LOG_LIST");
print OUT @NEW_DATA;
close(OUT);
# MAP LOG LIST2
open(OUT,">$MAP_LOG_LIST2");
print OUT @NEW_DATA;
close(OUT);
# MESSAGE LIST
open(OUT,">$MESSAGE_LIST");
print OUT @NEW_DATA;
close(OUT);
# MESSAGE2 LIST
open(OUT,">$MESSAGE_LIST2");
print OUT @NEW_DATA;
close(OUT);
# COUNTRY NO
open(OUT,">$COUNTRY_NO_LIST");
print OUT @NEW_DATA;
close(OUT);
# COUNTRY MES
open(OUT,">$COUNTRY_MES");
print OUT @NEW_DATA;
close(OUT);
# LOCAL_LIST
open(OUT,">$LOCAL_LIST");
print OUT @NEW_DATA;
close(OUT);
# UNIT_LIST
open(OUT,">$UNIT_LIST");
print OUT @NEW_DATA;
close(OUT);
open(IN,"$F_TOWN_LIST");
@F_T_DATA = <IN>;
close(IN);
# TOWN LIST
open(OUT,">$TOWN_LIST");
print OUT @F_T_DATA;
close(OUT);
# TOWN2 LIST
open(OUT,">$TOWN_LIST2");
print OUT @F_T_DATA;
close(OUT);
&MAP_LOG("全データを初期化しました。");
}
1;