[Affelio-cvs 19] CVS update: affelio/apps/Mixi

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 6月 17日 (金) 12:59:05 JST


Index: affelio/apps/Mixi/index.cgi
diff -u affelio/apps/Mixi/index.cgi:1.1.1.1 affelio/apps/Mixi/index.cgi:1.2
--- affelio/apps/Mixi/index.cgi:1.1.1.1	Tue Jun 14 12:53:30 2005
+++ affelio/apps/Mixi/index.cgi	Fri Jun 17 12:59:04 2005
@@ -58,6 +58,12 @@
 ###########################################################################
 #Retrieve Mixi HTML
 ###########################################################################
+my $err_mesg="";
+
+if(($userinfo->{username} eq "") || ($userinfo->{password} eq "")){
+    err_exit("Mixiユーザ情報が登録されていません。");
+}
+
 my $mixi = WWW::Mixi->new($userinfo->{username}, $userinfo->{password});
 if($@){
     error($cgi, $@);
@@ -135,3 +141,20 @@
 print $afap->get_HTML_footer();
 
 exit(1);
+
+
+sub err_exit{
+    my $err_mesg = shift;
+
+    my $tmpl = HTML::Template->new(filename => "./templates/error.tmpl",
+				   die_on_bad_params => 0);
+    $tmpl->param(install_title => $afap->get_app_info("install_title"));    
+    $tmpl->param(my_home_url => $my_home_url);
+    $tmpl->param(err_mesg => $err_mesg);
+
+    print $tmpl->output;
+
+     #HTML Footer Partを出力
+    print $afap->get_HTML_footer();
+    exit(1);
+}


Affelio-cvs メーリングリストの案内
Back to archive index