[Affelio-cvs 202] CVS update: affelio

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 6月 28日 (火) 00:29:19 JST


Index: affelio/admin.cgi
diff -u affelio/admin.cgi:1.10 affelio/admin.cgi:1.11
--- affelio/admin.cgi:1.10	Mon Jun 27 16:14:18 2005
+++ affelio/admin.cgi	Tue Jun 28 00:29:19 2005
@@ -6,12 +6,13 @@
 #    http://affelio.jp/ (Japan)
 #    http://affelio.jp/ (USA and other area)
 #
-# $Id: admin.cgi,v 1.10 2005/06/27 07:14:18 slash5234 Exp $
+# $Id: admin.cgi,v 1.11 2005/06/27 15:29:19 slash5234 Exp $
 
 use strict;
 
 use lib("./extlib");
 use CGI qw(-unique_headers);
+use Error qw(:try);
 $CGI::DISABLE_UPLOADS = 0;
 $CGI::POST_MAX = 1024_000;
 use CGI::Session qw(-ip_match);
@@ -25,6 +26,7 @@
 use Affelio::misc::Time;
 use Affelio::misc::NetMisc;
 use Affelio::misc::WebInput;
+use Affelio::exception::CommunicationException; 
 
 ############################################################################
 #Load Affelio
@@ -94,9 +96,10 @@
 		   "new_messages", Affelio::App::Admin::Messaging::get_new($af)
 		   );
 
-my $err="";
 my $HTTP_forward_flag = 0;
 my $forward_URL = "";
+my $ret_msg="";
+my $err_msg="";
 
 ####################
 #admin_mode
@@ -162,7 +165,30 @@
     #######################
     use Affelio::App::Admin::Messaging;
 
-    if( $q->url_param("action") eq "show" ){
+    if( $q->url_param("action") eq "send_message" ){
+
+	try{
+	    $ret_msg=Affelio::App::Admin::Messaging::send_message($af, $q);
+	}catch Affelio::exception::CommunicationException with{
+	    $err_msg='<AF_M text="Could not send message.">';
+	};
+
+	$TMPL_FILE = "$af->{site__fs_root}/templates/" .
+	    "$af->{site__template}/owner_side/admin_showmessage_list.tmpl";
+
+	Affelio::App::Admin::Messaging::show_message_list($af, 
+							  \%output_data);
+
+
+    }elsif( $q->url_param("action") eq "compose" ){
+	$TMPL_FILE = "$af->{site__fs_root}/templates/" .
+	    "$af->{site__template}/owner_side/admin_composemessage.tmpl";
+
+	Affelio::App::Admin::Messaging::compose($af,
+						\%output_data);
+
+
+    }elsif( $q->url_param("action") eq "show" ){
 	$TMPL_FILE = "$af->{site__fs_root}/templates/" .
 	    "$af->{site__template}/owner_side/admin_showmessage.tmpl";
 
@@ -542,7 +568,7 @@
 	$tmpl->param($data_key => $output_data{$data_key});
 	#debug_print("$data_key ... $output_data{$data_key}");
     } 
-    $tmpl->param("err_msg" => $err);
+    $tmpl->param("err_msg" => $err_msg);
     $tmpl->param("site__locale" => $af->{site__locale});
     
     print $af->translate_templateL10N($tmpl->output);


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