-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.cgi
executable file
·60 lines (51 loc) · 1.5 KB
/
index.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
#!/usr/bin/perl
# トップ画面 2004/01/20 由來
use utf8;
use Encode qw(decode_utf8);
binmode(STDOUT, ':encoding(utf8)');
require './_config.cgi';
RequireFile('inc-func.cgi');
RequireFile('inc-version.cgi');
Turn();
GetQuery();
GetCookie();
SetCookieSession();
DataRead();
$username=$Q{nm} ? $Q{nm} : $COOKIE{USERNAME};
$password=$Q{pw} ? $Q{pw} : $COOKIE{PASSWORD};
$lform="";
if (!$MOBILE)
{
$lform.=GetTagA(l('【新規店舗オープン】<small>残り %1 名様</small>', $MAX_USER - $DTusercount),"action.cgi?key=new") if $MAX_USER>$DTusercount;
$lform.=l('【新規店舗オープン】<small>現在満員</small>') if $MAX_USER<=$DTusercount;
$lform.=($MAX_MOVE_USER>$DTusercount)?(l('<small>(移転:残り%1名様)</small>',($MAX_MOVE_USER-$DTusercount))):(l('<small>(移転:現在満員)</small>')) if $MOVETOWN_ENABLE;
$lform.="<br>";
}
$DISP{MENU} =~ s/#SKINNEW#/$lform/;
$DISP{MENU} =~ s/#SKINNAME#/$username/;
$DISP{MENU} =~ s/#SKINPW#/$password/;
$DISP{MENU} =~ s/#SKINCOMMENT#/$TITLE_COMMENT/;
$DT={};
$DT->{id}=-1;
$GUEST_USER=1;
RequireFile('inc-html-top.cgi') if (!$MOBILE);
$DISP{BOTTOM} =~ s/#SKINVER#/$BASE_VERSION/;
$DISP{BOTTOM} =~ s/#SKINEDIT#/$ITEM_VERSION/;
$DISP{BOTTOM} =~ s/#SKINMAIL#/$ADMIN_EMAIL/;
OutSkin();
exit;
sub GetCookie
{
$cookiebundle = decode_utf8($ENV{HTTP_COOKIE});
foreach(split(/\s*;\s*/,$cookiebundle))
{
@_=split(/=/);
$COOKIE{$_[0]}=$_[1];
next if $_[0] ne 'shop';
foreach(split(/,/,$_[1]))
{
@_=split(/:/);
$COOKIE{$_[0]}=$_[1];
}
}
}