-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgd-o.cgi
95 lines (83 loc) · 2.96 KB
/
gd-o.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
use utf8;
# ギルド詳細 2004/01/20 由來
DataRead();
CheckUserPass(1);
RequireFile('inc-gd.cgi');
undef @guildDT;
my $Gcount=0;
my $idx=-1;
foreach(@DT)
{
$idx++;
next if ($_->{guild} ne $Q{g});
$guildDT[$Gcount]=$_;
$guildDT[$Gcount]->{count}=$idx; #順位情報を取得しておく
$Gcount++;
}
my ($page,$pagestart,$pageend,$pagenext,$pageprev,$pagemax)
=GetPage($Q{pg},$RANKING_PAGE_ROWS,$Gcount);
ReadLetterName();
my $lt=$GUILD_DETAIL{$Q{g}}->{leadt};
my $staff=$GUILD_DETAIL{$Q{g}}->{$MYDIR};
$disp.="<table width=520>";
$disp.=$TR.$TDB.l('正式名称').$TD."<b>".GetTagImgGuild($Q{g}).$GUILD_DETAIL{$Q{g}}->{name}."</b>";
if ($GUILD_DETAIL{$Q{g}}->{url})
{$disp.=qq| <a target="_blank" href="action.cgi?key=jump&guild=$Q{g}">[HP]</a>|;}
$disp.=$TRE;
$disp.=$TR.$TDB.l("団長").$TD.SearchLetterName($GUILD_DETAIL{$Q{g}}->{leader},$lt)." ($Tname{$lt})".$TRE;
$disp.=$TR.$TDB.l("街の軍師").$TD.(defined($id2idx{$staff}) ? $DT[$id2idx{$staff}]->{shopname} : l("不在")).$TRE;
$disp.=$TR.$TDB.l("活動紹介").$TD.$GUILD_DETAIL{$Q{g}}->{appeal}.$TRE;
$disp.=$TR.$TDB.l("入団条件").$TD.$GUILD_DETAIL{$Q{g}}->{needed}.$TRE;
$disp.=$TBE;
my $pagecontrol=GetPageControl($pageprev,$pagenext,"g=".$Q{g},"",$pagemax,$page);
$disp.=$pagecontrol."<BR>";
$disp.=$TB;
$disp.=$TR;
$disp.=$TDB.l("点数");
$disp.=$TDB.l("店長");
$disp.=$TDB.l("ジョブ");
$disp.=$TDB.l("肩書き 店名");
$disp.=$TDB.l("商品 【創業】 コメント");
$disp.=$TRE;
foreach my $idx ($pagestart..$pageend)
{
my $DT=$guildDT[$idx];
my $rankupdown=l("(新)");
if($DT->{rankingyesterday})
{
$rankupdown=$DT->{rankingyesterday}-$DT->{count}-1;
$rankupdown=$rankupdown==0 ? " → ": $rankupdown<0 ? "↓".(-$rankupdown) : "↑".$rankupdown;
$rankupdown="<small>($rankupdown)</small>";
}
my $itemtype=-1;
my $itempro="";
my $salelist="";
foreach(0..$DT->{showcasecount}-1)
{
my $no=$DT->{showcase}[$_];
$salelist.=GetTagImgItemType($no);
$itemtype=0,next if $itemtype!=-1 && $ITEM[$no]->{type}!=$itemtype;
$itemtype=$ITEM[$no]->{type};
}
$itempro=GetTagImgItemType(0,$itemtype,1)." " if $itemtype;
$disp.=$TR;
$disp.="<td align=right><b>No.".($DT->{count}+1)."</b>".$rankupdown;
$disp.="<br>".$DT->{point};
$disp.=$TDNW.$tdh_pt.GetTagImgKao($DT->{name},$DT->{icon});
$disp.="<td align=center>".GetTagImgJob($DT->{job},$DT->{icon});
$disp.=$TD.$tdh_nm;
$disp.="<SPAN>".$DT->{user}{_so_e}."</SPAN><br>" if ($DT->{user}{_so_e} ne '');
$disp.= "<a href=\"action.cgi?key=shop-b&ds=$DT->{id}&$USERPASSURL\">" if !$GUEST_USER;
$disp.= GetTagImgGuild($DT->{guild}).$job.$DT->{shopname};
$disp.= "</a>" if !$GUEST_USER;
$disp.=GetTopCountImage($DT->{rankingcount}+0) if $DT->{rankingcount};
$disp.=DignityDefine($DT->{dignity},1);
$disp.=$TD.$tdh_sc.$itempro.$salelist."<BR>";
$disp.=$tdh_fd."【".GetTime2found($NOW_TIME-$DT->{foundation})."】";
$disp.=$tdh_cm.$DT->{comment} if $DT->{comment};
$disp.=$TRE;
}
$disp.=$TBE;
$disp.=$pagecontrol;
OutSkin();
1;