Tadashi Okoshi
slash****@users*****
2005年 11月 21日 (月) 03:54:46 JST
Index: affelio/apps/Mixi/README
diff -u affelio/apps/Mixi/README:1.2 affelio/apps/Mixi/README:1.3
--- affelio/apps/Mixi/README:1.2 Fri Jul 1 11:16:34 2005
+++ affelio/apps/Mixi/README Mon Nov 21 03:54:46 2005
@@ -3,6 +3,8 @@
Install
1. Put this "Mixi" directory under "apps" directory in your Affelio.
+ 2. From owner-mode menu, choose "Config Apps".
+ Install this application from the menu.
Configuration
1. Go to "Mixi" application tab.
Index: affelio/apps/Mixi/index.cgi
diff -u affelio/apps/Mixi/index.cgi:1.6 affelio/apps/Mixi/index.cgi:1.7
--- affelio/apps/Mixi/index.cgi:1.6 Fri Jul 1 01:26:41 2005
+++ affelio/apps/Mixi/index.cgi Mon Nov 21 03:54:46 2005
@@ -1,36 +1,37 @@
#!/usr/bin/perl
-use lib("./extlib/"); #WWW:Mixi
-use WWW::Mixi;
-
+#AFFELIOãã£ã¬ã¯ããªã«ããå¤é¨ã¢ã¸ã¥ã¼ã«
use lib("../../extlib"); #general
use HTML::Template;
use CGI;
use Cwd;
use Jcode;
-#
+
+#AffelioAPIå©ç¨ã®ãã
use lib("../../lib"); #Affelio
use AffelioApp;
use Affelio::misc::CGIError;
-#
-use lib("./extlib/"); #WWW:Mixi
+
+#æ¬ã¢ããªä»¥ä¸ã®ã¢ã¸ã¥ã¼ã«
+use lib("./extlib/");
use WWW::Mixi;
use HTTP::Cookies;
use HTTP::Request::Common;
-#
use lib("./lib/");
use AffelioApp::SNSGateway;
###########################################################################
-#init
+#åæå
###########################################################################
my $cgi = new CGI();
+my $page = $cgi->url_param("page");
-#AffelioAppãåæå
+#######################
+#Affelio APIãåæå
+#######################
my $afap = new AffelioApp(ConfigDir => Cwd::getcwd(),
cgi => $cgi);
-my $page = $cgi->url_param("page");
###########################################################################
#Output
@@ -39,10 +40,14 @@
print "Content-type: text/html; charset=UTF-8\n";
print "Pragma: no-cache", "\n\n";
+#######################
#HTML Header Partãåºå
+#######################
print $afap->get_HTML_header("Affelio Mixi Gateway");
-# èªã¿è¾¼ã¿ã¢ã¯ã»ã¹æ¨©éããã§ãã¯ããå
容表示
+#######################
+# èªã¿è¾¼ã¿ã¢ã¯ã»ã¹æ¨©éããã§ãã¯
+#######################
unless ($afap->check_access("DF_access")) {
print "ããªãã«ã¯ãã®ãã¼ã¸ã®èªã¿è¾¼ã¿æ¨©éãããã¾ãã";
@@ -52,16 +57,21 @@
exit(1);
}
+#######################
+#ã¢ã¯ã»ã¹ã¦ã¼ã¶ã®ã¦ã¼ã¶ã¿ã¤ããåå¾
+#######################
+my $visitor_type = $afap->get_visitor_info("type");
+
+
###########################################################################
-#Read configuration file
+#è¨å®ãã¡ã¤ã«ãèªã¿è¾¼ã
###########################################################################
+#Mixiã¸ã®èªè¨¼æ
å ±ãä¿åããã¦ããconfigãã¡ã¤ã«ãèªã¿è¾¼ã
my $userinfo = read_config($afap);
-my $visitor_type = $afap->get_visitor_info("type");
-
###########################################################################
-#Retrieve Mixi HTML
+#Mixiã®HTMLãåå¾
###########################################################################
my $err_mesg="";
@@ -90,7 +100,6 @@
if(!($response->is_success)){
err_exit("Could not get list_friend.pl");
}
-#print "<PRE>" . $response->content . "</PRE>";
#Parse
my @friends = $mixi->parse_list_friend( $response );
@@ -102,7 +111,7 @@
}
###########################################################################
-#Processing
+#HTMLåå¾å¾ã®å¦ç
###########################################################################
$num_friends = @friends;
@@ -117,9 +126,6 @@
}
}
-
-
-
my $next_message="";
my $next_link="";
my $next = $mixi->parse_list_friend_next( $response );
@@ -138,7 +144,13 @@
$prev_link = "./index.cgi?page=$2";
}
+###########################################################################
+#ç»é¢ãåºå
+###########################################################################
+###############################
+#HTML::Templateãèµ·å
+###############################
my $tmpl = HTML::Template->new(filename => "./templates/index.tmpl",
die_on_bad_params => 0);
@@ -151,14 +163,20 @@
$tmpl->param(prev_link => $prev_link);
$tmpl->param(prev_message => $prev_message);
+###############################
+#ã¢ããªæ¬ä½ã®HTMLåºå
+###############################
print $tmpl->output;
+###############################
#HTML Footer Partãåºå
+###############################
print $afap->get_HTML_footer();
exit(1);
+##########################################################################
sub err_exit{
my $err_mesg = shift;
@@ -174,3 +192,4 @@
print $afap->get_HTML_footer();
exit(1);
}
+##########################################################################