📄 adminmain.pl
字号:
############################################################################### # Process Vistors Log open(LOG,"$StatsPath/Visitors.log"); flock(LOG,2) if ($FLock); @Visitors=<LOG>; close(LOG); ########################################################################### # Print Last 20 Vistors $HTML.= &BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"",""). &Tr("","",$HeaderBGColor). &Td("","","3","","","","","",""). &Font($FontFace,$HeaderTextSize,$HeaderTextColor). "<b>LAST 20 VISITORS</b>". "</font>". "</td>". "</tr>"; $EndLog=scalar(@Visitors); if ($EndLog>20) { $EndLog-=20; }else{ $EndLog=0; } $RowColor=$RowOddBGColor; for ($n=$#Visitors;$n>=$EndLog;$n--) { @LogInfo=split(/\|\^\|/,$Visitors[$n]); $LogInfo[4]=~s/\_/ /g; if (!$LogInfo[2]) { $Host=$LogInfo[1]; }else{ $Host=$LogInfo[2]; } $HTML.= &Tr("","",$RowColor). &Td("35%","","","","","","",$ColumnOddBGColor,""). &Font($FontFace,$TextSize,$TextColor). $LogInfo[0]. "</font>". "</td>". &Td("40%","","","","","","",$ColumnEvenBGColor,""). &Font($FontFace,$TextSize,$TextColor). $Host. "</font>". "</td>". &Td("25%","","","","","","",$ColumnOddBGColor,""). &Font($FontFace,$TextSize,$TextColor). $LogInfo[4]. "</font>". "</td>". "</tr>"; if ($RowColor eq $RowEvenBGColor) { $RowColor=$RowOddBGColor; }else{ $RowColor=$RowEvenBGColor; } } $HTML.= &Tr("","",$MenuBGColor). &Td("","","3","","RIGHT","","","",""). &Font($FontFace,$MenuTextSize,$MenuTextColor). &Link("UBAdmin.$Ext?Action=ShowStats&Type=LastVisitors&Session=$SessionID","",""). "more...". "</a>". "</font>". "</td>". "</tr>". "</table></td></tr></table>". "<p>"; ########################################################################### # Print Last 20 Referers URL $HTML.= &BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"",""). &Tr("","",$HeaderBGColor). &Td("","","2","","","","","",""). &Font($FontFace,$HeaderTextSize,$HeaderTextColor). "<b>LAST 20 REFFERING URLS</b>". "</font>". "</td>". "</tr>"; $EndLog=scalar(@Visitors); if ($EndLog>20) { $EndLog-=20; }else{ $EndLog=0; } $RowColor=$RowOddBGColor; for ($n=$#Visitors;$n>=$EndLog;$n--) { @LogInfo=split(/\|\^\|/,$Visitors[$n]); $LengthURL=length($LogInfo[3]); $ReferURL=$LogInfo[3]; if ($LengthURL >= 80) { $ReferURL=substr ($LogInfo[3],0,37)."...".substr ($LogInfo[3],$LengthURL-37,37); } $HTML.= &Tr("","",$RowColor). &Td("35%","","","","","","",$ColumnOddBGColor,""). &Font($FontFace,$TextSize,$TextColor). $LogInfo[0]. "</font>". "</td>". &Td("65%","","","","","","",$ColumnEvenBGColor,""). &Font($FontFace,$TextSize,$TextColor). &Link($LogInfo[3],"_blank",$LogInfo[3]). $ReferURL. "</a>". "</font>". "</td>". "</tr>"; if ($RowColor eq $RowEvenBGColor) { $RowColor=$RowOddBGColor; }else{ $RowColor=$RowEvenBGColor; } } $HTML.= &Tr("","",$MenuBGColor). &Td("","","2","","RIGHT","","","",""). &Font($FontFace,$MenuTextSize,$MenuTextColor). &Link("UBAdmin.$Ext?Action=ShowStats&Type=LastReferURL&Session=$SessionID","",""). "more...". "</a>". "</font>". "</td>". "</tr>". "</table></td></tr></table>". "<p>"; } if ($UseLog) { ############################################################################### # Process Vistors Log open(LOG,"$StatsPath/Action.log"); flock(LOG,2) if ($FLock); my (@Actions)=<LOG>; close(LOG); ########################################################################### # Print Last 20 Vistors $HTML.= &BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"",""). &Tr("","",$HeaderBGColor). &Td("","","3","","","","","",""). &Font($FontFace,$HeaderTextSize,$HeaderTextColor). "<b>LAST 20 ACTIONS</b>". "</font>". "</td>". "</tr>"; $EndLog=scalar(@Actions); if ($EndLog>20) { $EndLog-=20; }else{ $EndLog=0; } $RowColor=$RowOddBGColor; for ($n=$#Actions;$n>=$EndLog;$n--) { @LogInfo=split(/\|\^\|/,$Actions[$n]); if (!$LogInfo[2]) { $Host=$LogInfo[1]; }else{ $Host=$LogInfo[2]; } if ($LogInfo[4] eq "") { $Info = "$LogInfo[9] at the first page"; }elsif ($LogInfo[4] eq "SignIn") { $Info = "$LogInfo[9] at the sign in page"; }elsif ($LogInfo[4] eq "LostPassword") { $Info = "$LogInfo[9] at the lost password page"; }elsif ($LogInfo[4] eq "DoLostPassword") { $Info = "ub) sending password"; }elsif ($LogInfo[4] eq "SignOut") { $Info = "$LogInfo[9] sign out"; }elsif ($LogInfo[4] eq "SignUp") { $Info = "at sign up page"; }elsif ($LogInfo[4] eq "DoSignUp") { $Info = "ub) creating account"; }elsif ($LogInfo[4] eq "ModifyAccount") { $Info = "$LogInfo[9] at modify acount page"; }elsif ($LogInfo[4] eq "DoModifyAccount") { $Info = "ub) modifing $LogInfo[9] account"; }elsif ($LogInfo[4] eq "ShowCategory") { $Info = "$LogInfo[9] view $LogInfo[5] category"; }elsif ($LogInfo[4] eq "ShowBoard") { $Info = "$LogInfo[9] view $LogInfo[6] board"; }elsif ($LogInfo[4] eq "ShowPost") { $Info = "$LogInfo[9] view $LogInfo[7] ($LogInfo[6]) topic"; }elsif ($LogInfo[4] eq "PrintableTopic") { $Info = "$LogInfo[9] view $LogInfo[7] ($LogInfo[6]) printable version topic"; }elsif ($LogInfo[4] eq "ForwardTopic") { $Info = "$LogInfo[9] send $LogInfo[7] ($LogInfo[6]) topic to friend "; }elsif ($LogInfo[4] eq "DoForwardTopic") { $Info = "ub) sending $LogInfo[7] ($LogInfo[6]) topic"; }elsif ($LogInfo[4] eq "NewPost") { $Info = "$LogInfo[9] write a new topic at $LogInfo[6] board"; }elsif ($LogInfo[4] eq "DoNewPost") { $Info = "ub) posting a new topic at $LogInfo[6] board"; }elsif ($LogInfo[4] eq "NewReply") { $Info = "$LogInfo[9] reply the $LogInfo[7] ($LogInfo[6]) topic"; }elsif ($LogInfo[4] eq "DoNewReply") { $Info = "ub) posting the reply on $LogInfo[7] ($LogInfo[6])"; }elsif ($LogInfo[4] eq "ModifyPost") { $Info = "$LogInfo[9] modify topic($LogInfo[7]) at $LogInfo[6]"; }elsif ($LogInfo[4] eq "DoModifyPost") { $Info = "ub) modifing topic($LogInfo[7]) at $LogInfo[6]"; }elsif ($LogInfo[4] eq "ModifyReply") { $Info = "$LogInfo[9] modify reply($LogInfo[8]) at $LogInfo[7] ($LogInfo[6])"; }elsif ($LogInfo[4] eq "DoModifyReply") { $Info = "ub) modifing reply($LogInfo[8]) at $LogInfo[7] ($LogInfo[6])"; }elsif ($LogInfo[4] eq "ShowProfile") { $Info = "$LogInfo[9] view $LogInfo[8] profile"; }elsif ($LogInfo[4] eq "SearchThreads") { $Info = "$LogInfo[9] search thread"; }elsif ($LogInfo[4] eq "DoSearchThreads") { $Info = "ub) searching thread"; }elsif ($LogInfo[4] eq "DoRemoveMessages") { $Info = "$LogInfo[9] remove thread($LogInfo[7]) at $LogInfo[6]"; }elsif ($LogInfo[4] eq "DoCloseThread") { $Info = "$LogInfo[9] close/open thread($LogInfo[7]) at $LogInfo[6]"; }else{ $Info = "$LogInfo[9] do \"$LogInfo[4]\" Action"; } $HTML.= &Tr("","",$RowColor). &Td("30%","","","","","","",$ColumnOddBGColor,""). &Font($FontFace,"1",$TextColor). $LogInfo[0]. "</font>". "</td>". &Td("28%","","","","","","",$ColumnEvenBGColor,""). &Font($FontFace,"1",$TextColor). $Host. "</font>". "</td>". &Td("42%","","","","","","",$ColumnOddBGColor,""). &Font($FontFace,"1",$TextColor). $Info. "</font>". "</td>". "</tr>"; if ($RowColor eq $RowEvenBGColor) { $RowColor=$RowOddBGColor; }else{ $RowColor=$RowEvenBGColor; } } $HTML.= &Tr("","",$MenuBGColor). &Td("","","3","","RIGHT","","","",""). &Font($FontFace,$MenuTextSize,$MenuTextColor). &Link("UBAdmin.$Ext?Action=ShowStats&Type=ActionLog&Session=$SessionID","",""). "more...". "</a>". "</font>". "</td>". "</tr>". "</table></td></tr></table>". "<p>"; } ############################################################################### # Process Vistors Log open(LOG,"$StatsPath/Admin.log"); flock(LOG,2) if ($FLock); @Actions=<LOG>; close(LOG); ########################################################################### # Print Last 20 Vistors $HTML.= &BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"",""). &Tr("","",$HeaderBGColor). &Td("","","3","","","","","",""). &Font($FontFace,$HeaderTextSize,$HeaderTextColor). "<b>LAST 20 ADMINISTRATOR ACTIONS</b>". "</font>". "</td>". "</tr>"; $EndLog=scalar(@Actions); if ($EndLog>20) { $EndLog-=20; }else{ $EndLog=0; } $RowColor=$RowOddBGColor; for ($n=$#Actions;$n>=$EndLog;$n--) { @LogInfo=split(/\|\^\|/,$Actions[$n]); if (!$LogInfo[2]) { $Host=$LogInfo[1]; }else{ $Host=$LogInfo[2]; } $Info = "$LogInfo[5] do \"$LogInfo[4]\" Action"; $HTML.= &Tr("","",$RowColor). &Td("30%","","","","","","",$ColumnOddBGColor,""). &Font($FontFace,"1",$TextColor). $LogInfo[0]. "</font>". "</td>". &Td("28%","","","","","","",$ColumnEvenBGColor,""). &Font($FontFace,"1",$TextColor). $Host. "</font>". "</td>". &Td("42%","","","","","","",$ColumnOddBGColor,""). &Font($FontFace,"1",$TextColor). $Info. "</font>". "</td>". "</tr>"; if ($RowColor eq $RowEvenBGColor) { $RowColor=$RowOddBGColor; }else{ $RowColor=$RowEvenBGColor; } } $HTML.= &Tr("","",$MenuBGColor). &Td("","","3","","RIGHT","","","",""). &Font($FontFace,$MenuTextSize,$MenuTextColor). &Link("UBAdmin.$Ext?Action=ShowStats&Type=AdminLog&Session=$SessionID","",""). "more...". "</a>". "</font>". "</td>". "</tr>". "</table></td></tr></table>". "<p>"; &PrintTheme("$UBName Administrator Center",$HTML); exit; }###############################################################################1;# End of Main Function###############################################################################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -