Tadashi Okoshi
slash****@users*****
2005年 11月 8日 (火) 16:01:44 JST
Index: affelio/lib/Affelio/App/Admin/AccessLog.pm
diff -u affelio/lib/Affelio/App/Admin/AccessLog.pm:1.10 affelio/lib/Affelio/App/Admin/AccessLog.pm:1.11
--- affelio/lib/Affelio/App/Admin/AccessLog.pm:1.10 Thu Oct 27 20:15:01 2005
+++ affelio/lib/Affelio/App/Admin/AccessLog.pm Tue Nov 8 16:01:44 2005
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: AccessLog.pm,v 1.10 2005/10/27 11:15:01 slash5234 Exp $
+# $Id: AccessLog.pm,v 1.11 2005/11/08 07:01:44 slash5234 Exp $
package Affelio::App::Admin::AccessLog;
{
@@ -49,24 +49,38 @@
$output_ref->{"access_log"} = \@access_log;
###############################
- #start and end time
+ #begin and end
###############################
- #my $start_time = get_today();
- my $start_time = "20050620000000";
- my $cur_time = get_timestamp();
+ my $t_begin= $wi->PTN_num( $q->url_param("t_begin") );
+ my $t_end= $wi->PTN_num( $q->url_param("t_end") );
+
+ if($t_begin == 0){
+ $t_begin = "20050620000000";
+ }
+ if($t_end == 0){
+ $t_end = get_timestamp();
+ }
+
+ ###############################
+ #View
+ ###############################
+ my $view= $wi->PTN_mode( $q->url_param("view") );
###############################
- #Today's date
+ #Create link URLs
###############################
- #my $t_year = substr ($start_time, 0, 4);
- #my $t_mon = substr ($start_time, 4, 2);
- #my $t_mday = substr ($start_time, 6, 2);
- #$output_ref->{"log_date"} = "$t_year/$t_mon/$t_mday";
+ $output_ref->{"f1_log_URL"} = "admin.cgi?mode=accesslog&view=f1";
+ $output_ref->{"f2_log_URL"} = "admin.cgi?mode=accesslog&view=f2";
+ $output_ref->{"affelio_log_URL"} = "admin.cgi?mode=accesslog&view=affelio";
+ $output_ref->{"pb_log_URL"} = "admin.cgi?mode=accesslog&view=pb";
+ $output_ref->{"all_log_URL"} = "admin.cgi?mode=accesslog";
###############################
#Access to AccessLog Manager
###############################
- my $result = $af->getALM->get_log($start_time, $cur_time);
+ my $result = $af->getALM->get_log(t_begin => $t_begin,
+ t_end => $t_end,
+ view => $view);
###############################
#Parse result
Index: affelio/lib/Affelio/App/Admin/AffelioNews.pm
diff -u affelio/lib/Affelio/App/Admin/AffelioNews.pm:1.7 affelio/lib/Affelio/App/Admin/AffelioNews.pm:1.8
--- affelio/lib/Affelio/App/Admin/AffelioNews.pm:1.7 Fri Jul 1 11:00:07 2005
+++ affelio/lib/Affelio/App/Admin/AffelioNews.pm Tue Nov 8 16:01:44 2005
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: AffelioNews.pm,v 1.7 2005/07/01 02:00:07 slash5234 Exp $
+# $Id: AffelioNews.pm,v 1.8 2005/11/08 07:01:44 slash5234 Exp $
package Affelio::App::Admin::AffelioNews;
{
@@ -57,7 +57,7 @@
if($@){
}else{
$updated_time = <IN>;
- if($cur_time < $updated_time + 010000){
+ if($cur_time < $updated_time + 10000){ #1h
return;
}
}
@@ -81,13 +81,31 @@
my @elements = split('\n', $data);
my $size = @elements;
my $index=0;
+ my $hot_flg=0;
while($index < $size){
+ my $datetime_row = $elements[$index];
+
+ if($cur_time < ($datetime_row*100 + 3000000) ){ #3days :P
+ $hot_flg=1;
+ }else{
+ $hot_flg=0;
+ }
+
my $datetime = timestamp2string($elements[$index++]);
my $type = $elements[$index++];
my $title = $elements[$index++];
my $url = $elements[$index++];
- print OUT "<TR><TH>$datetime</TH><TD><A HREF=\"$url\" target=\"_blank\">$title</A></TD></TR>";
+ print OUT "<TR><TH>$datetime</TH><TD><A HREF=\"$url\" target=\"_blank\">";
+ if($hot_flg == 1){
+ print OUT '<FONT color="red"><B>';
+ }
+ print OUT "$title";
+ if($hot_flg == 1){
+ print OUT '</B></FONT>';
+ }
+ print OUT "</A></TD></TR>";
+
}
print OUT "\n\0";