Tadashi Okoshi
slash****@users*****
2005年 11月 23日 (水) 13:00:20 JST
Index: affelio/lib/Affelio/App/Admin/AccessControl.pm
diff -u affelio/lib/Affelio/App/Admin/AccessControl.pm:1.4 affelio/lib/Affelio/App/Admin/AccessControl.pm:1.5
--- affelio/lib/Affelio/App/Admin/AccessControl.pm:1.4 Thu Oct 27 20:15:01 2005
+++ affelio/lib/Affelio/App/Admin/AccessControl.pm Wed Nov 23 13:00:19 2005
@@ -14,22 +14,56 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: AccessControl.pm,v 1.4 2005/10/27 11:15:01 slash5234 Exp $
+# $Id: AccessControl.pm,v 1.5 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::AccessControl;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../../lib/");
use Affelio;
use Affelio::misc::CGIError;
use Affelio::misc::Debug qw(debug_print);
use Affelio::misc::MyCrypt qw( msg_encrypt url_encode);
+ use Affelio::misc::WebInput;
use Exporter;
@Affelio::App::Admin::AccessControl::ISA = "Exporter";
- @Affelio::App::Admin::AccessControl::EXPORT = qw (show_GroupAttribute_table save_GroupAttribute_table);
+ @Affelio::App::Admin::AccessControl::EXPORT = qw (show_GroupAttribute_table save_GroupAttribute_table handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ debug_print("AccessControl::handler: start.");
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("mode2"));
+
+ try{
+ if($sub_mode eq "submit"){
+ debug_print("AccessControl::handler: before save...");
+ save_GroupAttribute_table($af, $cgi);
+ debug_print("AccessControl::handler: after save...");
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_accesscontrol.tmpl";
+
+ show_GroupAttribute_table($af, $out_ref);
+ debug_print("AccessControl::handler: end.");
+ }
+
#####################################################################
#save_GroupAttribute_table
Index: affelio/lib/Affelio/App/Admin/AccessLog.pm
diff -u affelio/lib/Affelio/App/Admin/AccessLog.pm:1.11 affelio/lib/Affelio/App/Admin/AccessLog.pm:1.12
--- affelio/lib/Affelio/App/Admin/AccessLog.pm:1.11 Tue Nov 8 16:01:44 2005
+++ affelio/lib/Affelio/App/Admin/AccessLog.pm Wed Nov 23 13:00:19 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.11 2005/11/08 07:01:44 slash5234 Exp $
+# $Id: AccessLog.pm,v 1.12 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::AccessLog;
{
@@ -31,8 +31,22 @@
use Exporter;
@Affelio::App::Admin::AccessLog::ISA = "Exporter";
- @Affelio::App::Admin::AccessLog::EXPORT = qw (show);
+ @Affelio::App::Admin::AccessLog::EXPORT = qw (show handler);
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_access_log.tmpl";
+
+ show($af,$cgi,$out_ref);
+ }
#######################################################################
#show
Index: affelio/lib/Affelio/App/Admin/ConfigAffelio.pm
diff -u affelio/lib/Affelio/App/Admin/ConfigAffelio.pm:1.1 affelio/lib/Affelio/App/Admin/ConfigAffelio.pm:1.2
--- affelio/lib/Affelio/App/Admin/ConfigAffelio.pm:1.1 Sun Nov 20 21:19:52 2005
+++ affelio/lib/Affelio/App/Admin/ConfigAffelio.pm Wed Nov 23 13:00:19 2005
@@ -14,13 +14,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: ConfigAffelio.pm,v 1.1 2005/11/20 12:19:52 slash5234 Exp $
+# $Id: ConfigAffelio.pm,v 1.2 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::ConfigAffelio;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -31,7 +32,35 @@
use Exporter;
@Affelio::App::Admin::ConfigAffelio::ISA = "Exporter";
- @Affelio::App::Admin::ConfigAffelio::EXPORT = qw (show configure);
+ @Affelio::App::Admin::ConfigAffelio::EXPORT = qw (handler show configure);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+ try{
+ if($sub_mode eq "submit" ){
+ configure($af, $cgi);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/"
+ . "$af->{site__template}/owner_side/admin_affelio_config.tmpl";
+
+ show($af,$out_ref);
+ }
+
#######################################################################
#configure
Index: affelio/lib/Affelio/App/Admin/ConfigApps.pm
diff -u affelio/lib/Affelio/App/Admin/ConfigApps.pm:1.2 affelio/lib/Affelio/App/Admin/ConfigApps.pm:1.3
--- affelio/lib/Affelio/App/Admin/ConfigApps.pm:1.2 Tue Nov 22 23:03:00 2005
+++ affelio/lib/Affelio/App/Admin/ConfigApps.pm Wed Nov 23 13:00:19 2005
@@ -14,13 +14,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: ConfigApps.pm,v 1.2 2005/11/22 14:03:00 slash5234 Exp $
+# $Id: ConfigApps.pm,v 1.3 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::ConfigApps;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -29,7 +30,34 @@
use Exporter;
@Affelio::App::Admin::ConfigApps::ISA = "Exporter";
- @Affelio::App::Admin::ConfigApps::EXPORT = qw (show install_app);
+ @Affelio::App::Admin::ConfigApps::EXPORT = qw (show install_app handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+ try{
+ if($sub_mode eq "install_app" ){
+ install_app($af, $cgi, $out_ref);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_apps_config.tmpl";
+
+ show($af,$out_ref);
+ }
#######################################################################
#install_app
@@ -37,6 +65,7 @@
sub install_app{
my $af= shift;
my $cgi = shift;
+ my $out_ref = shift;
debug_print("ConfigApps::install_app: start.");
my $wi = new Affelio::misc::WebInput;
@@ -47,11 +76,9 @@
$af->getAM->install_app($install_dir, $install_title);
- return("$install_dir is installed.");
+ $out_ref->{ret_msg} = "$install_dir is installed.";
}
-
-
#######################################################################
#show
#######################################################################
Index: affelio/lib/Affelio/App/Admin/EditProfile.pm
diff -u affelio/lib/Affelio/App/Admin/EditProfile.pm:1.5 affelio/lib/Affelio/App/Admin/EditProfile.pm:1.6
--- affelio/lib/Affelio/App/Admin/EditProfile.pm:1.5 Thu Oct 27 21:57:40 2005
+++ affelio/lib/Affelio/App/Admin/EditProfile.pm Wed Nov 23 13:00:19 2005
@@ -14,13 +14,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: EditProfile.pm,v 1.5 2005/10/27 12:57:40 slash5234 Exp $
+# $Id: EditProfile.pm,v 1.6 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::EditProfile;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
+ use Fcntl;
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -29,7 +31,51 @@
use Exporter;
@Affelio::App::Admin::EditProfile::ISA = "Exporter";
- @Affelio::App::Admin::EditProfile::EXPORT = qw (show_profileeditor show_profile save_profile);
+ @Affelio::App::Admin::EditProfile::EXPORT = qw (show_profileeditor show_profile save_profile handler);
+
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_editprofile.tmpl";
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("mode2"));
+
+ try{
+ if( $sub_mode eq "submit" ){
+ save_profile($af,$cgi);
+ }elsif( $sub_mode eq "uploadimage" ){
+
+ my $uploaded_filename
+ = $wi->PTN_jpg_filename($cgi->param("file"));
+ my $fh = $cgi->upload( "file" );
+
+ sysopen(OUT, "$af->{site__user_dir}/profile_face.jpg",
+ O_WRONLY|O_TRUNC|O_CREAT, 0755);
+ binmode $fh;
+ binmode OUT;
+ my $buffer="";
+ while (read ($fh, $buffer, 16384)){
+ print OUT $buffer;
+ }
+ close OUT;
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ show_profileeditor($af, $out_ref);
+ }
#######################################################################
Index: affelio/lib/Affelio/App/Admin/EditSkins.pm
diff -u affelio/lib/Affelio/App/Admin/EditSkins.pm:1.6 affelio/lib/Affelio/App/Admin/EditSkins.pm:1.7
--- affelio/lib/Affelio/App/Admin/EditSkins.pm:1.6 Tue Oct 25 03:41:21 2005
+++ affelio/lib/Affelio/App/Admin/EditSkins.pm Wed Nov 23 13:00:19 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: EditSkins.pm,v 1.6 2005/10/24 18:41:21 slash5234 Exp $
+# $Id: EditSkins.pm,v 1.7 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::EditSkins;
{
@@ -22,6 +22,7 @@
use Fcntl;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -30,7 +31,41 @@
use Exporter;
@Affelio::App::Admin::EditSkins::ISA = "Exporter";
- @Affelio::App::Admin::EditSkins::EXPORT = qw (show choose_skin backup upload save_css);
+ @Affelio::App::Admin::EditSkins::EXPORT = qw (show choose_skin backup upload save_css handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+
+ try{
+ if( $sub_mode eq "submitcss" ){
+ save_css($af, $cgi);
+ }elsif( $sub_mode eq "chooseskin" ){
+ choose_skin($af, $cgi);
+ }elsif( $sub_mode eq "backup"){
+ backup($af,$cgi);
+ }elsif( $sub_mode eq "upload"){
+ upload($af,$cgi);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_edit_skins.tmpl";
+
+ show($af, $out_ref);
+ }
#######################################################################
#choose_skin
Index: affelio/lib/Affelio/App/Admin/EditTemplates.pm
diff -u affelio/lib/Affelio/App/Admin/EditTemplates.pm:1.9 affelio/lib/Affelio/App/Admin/EditTemplates.pm:1.10
--- affelio/lib/Affelio/App/Admin/EditTemplates.pm:1.9 Thu Oct 27 21:06:34 2005
+++ affelio/lib/Affelio/App/Admin/EditTemplates.pm Wed Nov 23 13:00:19 2005
@@ -14,13 +14,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: EditTemplates.pm,v 1.9 2005/10/27 12:06:34 slash5234 Exp $
+# $Id: EditTemplates.pm,v 1.10 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::EditTemplates;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Fcntl;
use Affelio;
@@ -30,7 +31,41 @@
use Exporter;
@Affelio::App::Admin::EditTemplates::ISA = "Exporter";
- @Affelio::App::Admin::EditTemplates::EXPORT = qw (rebuild show_templates save_templates);
+ @Affelio::App::Admin::EditTemplates::EXPORT = qw (rebuild show_templates save_templates handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+
+ try{
+ if( $sub_mode eq "submit" ){
+ save_templates($af,$cgi);
+ rebuild($af);
+ }elsif( $sub_mode eq "rebuild" ){
+ rebuild($af);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_edit_templates.tmpl";
+
+ show_templates($af, $out_ref);
+ }
+
+
+
#######################################################################
#save_templates
Index: affelio/lib/Affelio/App/Admin/FriendsGraph.pm
diff -u affelio/lib/Affelio/App/Admin/FriendsGraph.pm:1.8 affelio/lib/Affelio/App/Admin/FriendsGraph.pm:1.9
--- affelio/lib/Affelio/App/Admin/FriendsGraph.pm:1.8 Thu Oct 27 20:15:01 2005
+++ affelio/lib/Affelio/App/Admin/FriendsGraph.pm Wed Nov 23 13:00:19 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: FriendsGraph.pm,v 1.8 2005/10/27 11:15:01 slash5234 Exp $
+# $Id: FriendsGraph.pm,v 1.9 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::FriendsGraph;
{
@@ -32,8 +32,35 @@
use Exporter;
@Affelio::App::Admin::FriendsGraph::ISA = "Exporter";
- @Affelio::App::Admin::FriendsGraph::EXPORT = qw (show_friendsgraph retrieve);
+ @Affelio::App::Admin::FriendsGraph::EXPORT = qw (show_friendsgraph retrieve handler);
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+
+ try{
+ if( $sub_mode eq "retrieve" ){
+ retrieve($af);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_friendsgraph.tmpl";
+
+ show_friendsgraph($af, $out_ref);
+ }
#######################################################################
#retrieve
Index: affelio/lib/Affelio/App/Admin/GroupMemberTable.pm
diff -u affelio/lib/Affelio/App/Admin/GroupMemberTable.pm:1.4 affelio/lib/Affelio/App/Admin/GroupMemberTable.pm:1.5
--- affelio/lib/Affelio/App/Admin/GroupMemberTable.pm:1.4 Thu Oct 27 20:15:01 2005
+++ affelio/lib/Affelio/App/Admin/GroupMemberTable.pm Wed Nov 23 13:00:19 2005
@@ -13,13 +13,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: GroupMemberTable.pm,v 1.4 2005/10/27 11:15:01 slash5234 Exp $
+# $Id: GroupMemberTable.pm,v 1.5 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::GroupMemberTable;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -28,8 +29,36 @@
use Exporter;
@Affelio::App::Admin::GroupMemberTable::ISA = "Exporter";
- @Affelio::App::Admin::GroupMemberTable::EXPORT = qw (show_GroupMember_table save_GroupMember_table);
+ @Affelio::App::Admin::GroupMemberTable::EXPORT = qw (show_GroupMember_table save_GroupMember_table handler);
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("mode2"));
+
+ try{
+ if( $sub_mode eq "submit" ){
+ save_GroupMember_table($af, $cgi);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_groupmember_table.tmpl";
+
+ show_GroupMember_table($af, $out_ref);
+ }
+
#####################################################################
#save_GroupMember_table
Index: affelio/lib/Affelio/App/Admin/MakeAffelioLink.pm
diff -u /dev/null affelio/lib/Affelio/App/Admin/MakeAffelioLink.pm:1.1
--- /dev/null Wed Nov 23 13:00:20 2005
+++ affelio/lib/Affelio/App/Admin/MakeAffelioLink.pm Wed Nov 23 13:00:19 2005
@@ -0,0 +1,186 @@
+# Copyright (C) 2005 FishGrove Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# $Id: MakeAffelioLink.pm,v 1.1 2005/11/23 04:00:19 slash5234 Exp $
+
+package Affelio::App::Admin::MakeAffelioLink;
+{
+ use strict;
+
+ use lib("../../../../extlib/");
+ use Error qw(:try);
+ use Crypt::DH;
+ use MIME::Base64::Perl;
+
+ use lib("../../../");
+ use Affelio;
+ use Affelio::misc::CGIError;
+ use Affelio::misc::Debug qw(debug_print);
+ use Affelio::misc::Encoding qw(db_encode db_decode);
+ use Affelio::misc::Time qw(timestamp2string get_timestamp);
+ use Affelio::misc::WebInput;
+ use Affelio::SNS::Handshaker_c;
+ use Affelio::SNS::Handshaker_tmpDB;
+ use Affelio::exception::CommunicationException;
+
+ use Exporter;
+ @Affelio::App::Admin::MakeAffelioLink::ISA = "Exporter";
+ @Affelio::App::Admin::MakeAffelioLink::EXPORT = qw (show send_request handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+
+ try{
+ if( $sub_mode eq "submit" ){
+ send_request($af, $cgi, $out_ref);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_makefriend.tmpl";
+
+ show($af,$cgi,$out_ref);
+ }
+
+ #######################################################################
+ #send_request
+ #######################################################################
+ sub send_request{
+ my $af = shift;
+ my $cgi = shift;
+ my $output_ref = shift;
+ my $wi = new Affelio::misc::WebInput;
+
+ debug_print("MakeAffelioLink::send_request: start.");
+
+ my $dest_uri = $wi->PTN_URL($cgi->param("dest_uri"));
+ my $my_mesg = $cgi->param("my_mesg");
+ debug_print("MakeAffelioLink::send_request: $dest_uri");
+ debug_print("MakeAffelioLink::send_request: $my_mesg");
+
+ _send_request($af, $dest_uri, $my_mesg);
+
+ $output_ref->{ret_msg} = "Affelio Link Request has been sent!";
+ return;
+ }
+
+
+
+ #######################################################################
+ #show
+ #######################################################################
+ sub show{
+ my $af= shift;
+ my $q=shift;
+ my $output_ref = shift;
+ my $wi = new Affelio::misc::WebInput;
+
+ debug_print("MakeAffelioLink::show start.");
+
+ my $dest_uri = $wi->PTN_URL($q->url_param("dest_url"));
+
+ $output_ref->{"dest_uri"} = $dest_uri;
+
+ debug_print("MakeAffelioLink::show end.");
+ }
+
+
+ sub _send_request{
+ my $af=shift;
+ my $dest_uri= shift;
+ my $my_mesg= shift;
+
+ ######################
+ #Remove "/" from the end of $dest_uri
+ ######################
+ $dest_uri =~ s/\/$//;
+ my $dest_xml_uri = $dest_uri . "/bin/xml-rpc-serv.cgi";
+ debug_print("MakeAffelioLink::send_request: $dest_xml_uri\n");
+
+ ###########################################
+ # Get current time;
+ my $cur_time = get_timestamp();
+
+ ###########################################
+ #DH key generation
+ my $mydh = Crypt::DH->new;
+ #RFC 2412 - The OAKLEY Key Determination Protocol
+ #Group 1: A 768 bit prime
+ my $DH_g="2";
+ my $DH_p="1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919";
+ $mydh->g($DH_g);
+ $mydh->p($DH_p);
+
+ #Step (1): create my public_key
+ $mydh->generate_keys;
+ my $my_DH_pub_key_str = $mydh->pub_key->bstr;
+ my $my_DH_pri_key_str = $mydh->priv_key->bstr;
+
+ debug_print("MakeAffelioLink::send_request: pri_key = $my_DH_pri_key_str [" . length($my_DH_pri_key_str) . "]digits");
+ debug_print("MakeAffelioLink::send_request: pub_key = $my_DH_pub_key_str [" . length($my_DH_pub_key_str) . "]digits");
+
+
+ ###########################################
+ # Send HandShake to the URL
+ ###########################################
+ my $ret="";
+ try{
+ $ret = send_HandShake(dest_uri => $dest_xml_uri,
+ timestamp => $cur_time,
+ my_nickname => $af->{user__nickname},
+ my_AFID => $af->{site__web_root},
+ DH_pub_key_str => $my_DH_pub_key_str,
+ mesg => $my_mesg);
+ }catch Affelio::exception::NetworkException with{
+ my $E = shift;
+ throw Affelio::exception::CommunicationException($E);
+ }catch Affelio::exception::Exception with{
+ my $E = shift;
+ throw Affelio::exception::CommunicationException($E);
+ };
+ if($ret->{flerror} == 1){
+ #XML-RPC communication was successful.
+ #But the peer returned error. denyetc...
+ throw Affelio::exception::CommunicationException($@);
+ }
+
+ ###########################################
+ # Save peer's info into pending_DB
+ ###########################################
+ my $tmpdb= new Affelio::SNS::Handshaker_tmpDB($af);
+ $tmpdb->add_sent_Handshake($cur_time,
+ $dest_xml_uri,
+ "",
+ $cur_time,
+ $my_DH_pri_key_str);
+ debug_print("MakeAffelioLink::send_request: wrote DB $dest_uri => $cur_time\n");
+ }
+
+}
+1;
Index: affelio/lib/Affelio/App/Admin/MakeFriend.pm
diff -u affelio/lib/Affelio/App/Admin/MakeFriend.pm:1.1 affelio/lib/Affelio/App/Admin/MakeFriend.pm:removed
--- affelio/lib/Affelio/App/Admin/MakeFriend.pm:1.1 Tue Nov 1 13:46:55 2005
+++ affelio/lib/Affelio/App/Admin/MakeFriend.pm Wed Nov 23 13:00:20 2005
@@ -1,57 +0,0 @@
-# Copyright (C) 2005 FishGrove Inc.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# $Id: MakeFriend.pm,v 1.1 2005/11/01 04:46:55 slash5234 Exp $
-
-package Affelio::App::Admin::MakeFriend;
-{
- use strict;
-
- use lib("../../../../extlib/");
- use lib("../../../");
- use Affelio;
- use Affelio::misc::CGIError;
- use Affelio::misc::Debug qw(debug_print);
- use Affelio::misc::Encoding qw(db_encode db_decode);
- use Affelio::misc::Time;
- use Affelio::misc::WebInput;
-
- use Exporter;
- @Affelio::App::Admin::MakeFriend::ISA = "Exporter";
- @Affelio::App::Admin::MakeFriend::EXPORT = qw (show);
-
-
- #######################################################################
- #show
- #######################################################################
- sub show{
- my $af= shift;
- my $q=shift;
- my $output_ref = shift;
- my $wi = new Affelio::misc::WebInput;
-
- debug_print("MakeFriend::show start.");
-
- my $dest_uri = $wi->PTN_URL($q->url_param("dest_url"));
-
- $output_ref->{"dest_uri"} = $dest_uri;
-
- debug_print("MakeFriend::show end.");
- }
-
-
-}
-1;
Index: affelio/lib/Affelio/App/Admin/ManageApplication.pm
diff -u affelio/lib/Affelio/App/Admin/ManageApplication.pm:1.5 affelio/lib/Affelio/App/Admin/ManageApplication.pm:1.6
--- affelio/lib/Affelio/App/Admin/ManageApplication.pm:1.5 Tue Nov 8 14:16:28 2005
+++ affelio/lib/Affelio/App/Admin/ManageApplication.pm Wed Nov 23 13:00:19 2005
@@ -14,13 +14,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: ManageApplication.pm,v 1.5 2005/11/08 05:16:28 slash5234 Exp $
+# $Id: ManageApplication.pm,v 1.6 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::ManageApplication;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -29,7 +30,43 @@
use Exporter;
@Affelio::App::Admin::ManageApplication::ISA = "Exporter";
- @Affelio::App::Admin::ManageApplication::EXPORT = qw (manage_top show_app save_permission);
+ @Affelio::App::Admin::ManageApplication::EXPORT = qw (manage_top show_app save_permission handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("mode2"));
+
+ try{
+ if($sub_mode eq "modify_app"){
+ save_permission($af, $cgi, $cgi->url_param("app_name"));
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ if( ($sub_mode eq "modify_app")
+ || ($sub_mode eq "show_app") ){
+
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_accesscontrol_apps_showapp.tmpl";
+ show_app($af, $cgi->url_param("app_name"), $out_ref);
+
+ }else{
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_accesscontrol_apps_top.tmpl";
+ manage_top($af, $out_ref);
+ }
+ }
+
#####################################################################
#save_permission
Index: affelio/lib/Affelio/App/Admin/ManageFriend.pm
diff -u affelio/lib/Affelio/App/Admin/ManageFriend.pm:1.6 affelio/lib/Affelio/App/Admin/ManageFriend.pm:1.7
--- affelio/lib/Affelio/App/Admin/ManageFriend.pm:1.6 Tue Nov 8 15:02:00 2005
+++ affelio/lib/Affelio/App/Admin/ManageFriend.pm Wed Nov 23 13:00:19 2005
@@ -14,13 +14,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: ManageFriend.pm,v 1.6 2005/11/08 06:02:00 slash5234 Exp $
+# $Id: ManageFriend.pm,v 1.7 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::ManageFriend;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -31,7 +32,60 @@
use Exporter;
@Affelio::App::Admin::ManageFriend::ISA = "Exporter";
- @Affelio::App::Admin::ManageFriend::EXPORT = qw (manage_top modify_member show_member subscribe_group unsubscribe_group remove_member);
+ @Affelio::App::Admin::ManageFriend::EXPORT = qw (manage_top modify_member show_member subscribe_group unsubscribe_group remove_member handler);
+
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("mode2"));
+
+ try{
+ if($sub_mode eq "modify_member"){
+ modify_member($af, $cgi->url_param("uid"), $cgi);
+
+ }elsif($sub_mode eq "unsubscribe_group"){
+ unsubscribe_group($af, $cgi->url_param("gid"),
+ $cgi->url_param("uid"));
+
+ }elsif($sub_mode eq "subscribe_group"){
+ my @add_group_inputs = $cgi->param("add_group");
+ foreach my $i (@add_group_inputs){
+ subscribe_group($af, $i, $cgi->url_param("uid"));
+ }
+
+ }elsif($sub_mode eq "delete"){
+ remove_member($af, $cgi->url_param("uid"), $cgi);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+
+ if( ($sub_mode eq "subscribe_group")
+ || ($sub_mode eq "unsubscribe_group")
+ || ($sub_mode eq "show_member")
+ || ($sub_mode eq "modify_member") ){
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_managefriends_showmember.tmpl";
+ show_member($af, $cgi->url_param("uid"), $out_ref);
+
+ }else{
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_managefriends_top.tmpl";
+ manage_top($af, $out_ref);
+ }
+
+ }
+
#####################################################################
#modify_member
Index: affelio/lib/Affelio/App/Admin/ManageGroup.pm
diff -u affelio/lib/Affelio/App/Admin/ManageGroup.pm:1.5 affelio/lib/Affelio/App/Admin/ManageGroup.pm:1.6
--- affelio/lib/Affelio/App/Admin/ManageGroup.pm:1.5 Tue Nov 8 14:16:28 2005
+++ affelio/lib/Affelio/App/Admin/ManageGroup.pm Wed Nov 23 13:00:19 2005
@@ -14,13 +14,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: ManageGroup.pm,v 1.5 2005/11/08 05:16:28 slash5234 Exp $
+# $Id: ManageGroup.pm,v 1.6 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::ManageGroup;
{
use strict;
use lib("../../../../extlib/");
+ use Error qw(:try);
use lib("../../../");
use Affelio;
use Affelio::misc::CGIError;
@@ -29,7 +30,44 @@
use Exporter;
@Affelio::App::Admin::ManageGroup::ISA = "Exporter";
- @Affelio::App::Admin::ManageGroup::EXPORT = qw (manage_top rename_group add_group remove_group);
+ @Affelio::App::Admin::ManageGroup::EXPORT = qw (manage_top rename_group add_group remove_group handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("mode2"));
+
+ try{
+ if($sub_mode eq "rename"){
+ rename_group($af, $cgi->url_param("gid"),
+ $cgi->param("new_name"));
+ }elsif($sub_mode eq "add_group"){
+ add_group($af, $cgi->param("new_group_name"));
+ }elsif($sub_mode eq "remove_group"){
+ remove_group($af, $cgi->url_param("gid"), $cgi);
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ if($sub_mode eq "show_group"){
+ $out_ref->{tmpl_file}= "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_managegroups_showgroup.tmpl";
+ show_group($af, $cgi->url_param("gid"), $out_ref);
+ }else{
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_managegroups_top.tmpl";
+ manage_top($af, $out_ref);
+ }
+ }
#####################################################################
#rename_group
Index: affelio/lib/Affelio/App/Admin/Messaging.pm
diff -u affelio/lib/Affelio/App/Admin/Messaging.pm:1.17 affelio/lib/Affelio/App/Admin/Messaging.pm:1.18
--- affelio/lib/Affelio/App/Admin/Messaging.pm:1.17 Tue Nov 1 13:03:57 2005
+++ affelio/lib/Affelio/App/Admin/Messaging.pm Wed Nov 23 13:00:19 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: Messaging.pm,v 1.17 2005/11/01 04:03:57 slash5234 Exp $
+# $Id: Messaging.pm,v 1.18 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::Messaging;
{
@@ -35,7 +35,63 @@
use Exporter;
@Affelio::App::Admin::Messaging::ISA = "Exporter";
- @Affelio::App::Admin::Messaging::EXPORT = qw (show_message_list show_message mark_as_read get_new compose send_message);
+ @Affelio::App::Admin::Messaging::EXPORT = qw (show_message_list show_message mark_as_read get_new compose send_message handler);
+
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ my $wi = new Affelio::misc::WebInput();
+
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+
+ if( $sub_mode eq "send_message" ){
+
+ try{
+ send_message($af, $cgi);
+ $out_ref->{ret_msg}
+ .= '<AF_M text="You message has been sent successfuly.">';
+ }catch Affelio::exception::CommunicationException with{
+ my $e = shift;
+ $out_ref->{err_msg}
+ .= '<AF_M text="Could not send message."><BR>' . $e;
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_showmessage_list.tmpl";
+
+ show_message_list($af, $out_ref);
+
+ }elsif( $sub_mode eq "compose" ){
+
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_composemessage.tmpl";
+
+ compose($af, $cgi, $out_ref);
+
+ }elsif( $sub_mode eq "show" ){
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_showmessage.tmpl";
+
+ mark_as_read($af, $cgi->url_param("mid"));
+ show_message($af, $cgi->url_param("mid"), $out_ref);
+
+ }else{
+ $out_ref->{tmpl_file} = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_showmessage_list.tmpl";
+
+ show_message_list($af, $out_ref);
+ }
+
+ }
+
+
#######################################################################
#send_message
Index: affelio/lib/Affelio/App/Admin/MyStatus.pm
diff -u affelio/lib/Affelio/App/Admin/MyStatus.pm:1.4 affelio/lib/Affelio/App/Admin/MyStatus.pm:1.5
--- affelio/lib/Affelio/App/Admin/MyStatus.pm:1.4 Thu Oct 27 20:15:01 2005
+++ affelio/lib/Affelio/App/Admin/MyStatus.pm Wed Nov 23 13:00:19 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: MyStatus.pm,v 1.4 2005/10/27 11:15:01 slash5234 Exp $
+# $Id: MyStatus.pm,v 1.5 2005/11/23 04:00:19 slash5234 Exp $
package Affelio::App::Admin::MyStatus;
{
@@ -31,21 +31,7 @@
@Affelio::App::Admin::MyStatus::ISA = "Exporter";
@Affelio::App::Admin::MyStatus::EXPORT = qw (post);
- #######################################################################
- #post
#######################################################################
- sub post{
- my $af = shift;
- my $currentstatus = shift;
-
- debug_print("MyStatus::post start [$currentstatus]");
-
- $af->{user__currentstatus} = $currentstatus;
-
- $af->getPM->save_profile();
-
- debug_print("MyStatus::post end");
- }
}
Index: affelio/lib/Affelio/App/Admin/SendHandshake.pm
diff -u affelio/lib/Affelio/App/Admin/SendHandshake.pm:1.3 affelio/lib/Affelio/App/Admin/SendHandshake.pm:removed
--- affelio/lib/Affelio/App/Admin/SendHandshake.pm:1.3 Fri Jul 1 11:00:07 2005
+++ affelio/lib/Affelio/App/Admin/SendHandshake.pm Wed Nov 23 13:00:20 2005
@@ -1,131 +0,0 @@
-# Copyright (C) 2005 FishGrove Inc.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# $Id: SendHandshake.pm,v 1.3 2005/07/01 02:00:07 slash5234 Exp $
-
-package Affelio::App::Admin::SendHandshake;
-{
- use strict;
-
- use lib("../../../../extlib/");
- use Error qw(:try);
- use Crypt::DH;
- use MIME::Base64::Perl;
- use lib("../../../");
- use Affelio;
- use Affelio::misc::CGIError;
- use Affelio::misc::Debug qw(debug_print);
- use Affelio::misc::Encoding qw(db_encode db_decode);
- use Affelio::misc::Time qw(timestamp2string get_timestamp);
- use Affelio::misc::WebInput;
- use Affelio::SNS::Handshaker_c;
- use Affelio::SNS::Handshaker_tmpDB;
- use Affelio::exception::CommunicationException;
-
- use Exporter;
- @Affelio::App::Admin::SendHandshake::ISA = "Exporter";
- @Affelio::App::Admin::SendHandshake::EXPORT = qw (send);
-
- #######################################################################
- #send
- #######################################################################
- sub send{
- my $af = shift;
- my $cgi = shift;
- my $output_ref = shift;
- my $wi = new Affelio::misc::WebInput;
-
- debug_print("SendHandshake::send: start.");
-
- my $dest_uri = $wi->PTN_URL($cgi->param("dest_uri"));
- my $my_mesg = $cgi->param("my_mesg");
-
- debug_print("SendHandshake::send: $dest_uri");
- debug_print("SendHandshake::send: $my_mesg");
-
- ######################
- #Remove "/" from the end of $dest_uri
- ######################
- $dest_uri =~ s/\/$//;
- my $dest_xml_uri = $dest_uri . "/bin/xml-rpc-serv.cgi";
- debug_print("SendHandshake::send: $dest_xml_uri\n");
-
- ###########################################
- # Get current time;
- my $cur_time = get_timestamp();
-
- ###########################################
- #DH key generation
- my $mydh = Crypt::DH->new;
- #RFC 2412 - The OAKLEY Key Determination Protocol
- #Group 1: A 768 bit prime
- my $DH_g="2";
- my $DH_p="1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919";
- $mydh->g($DH_g);
- $mydh->p($DH_p);
-
- #Step (1): create my public_key
- $mydh->generate_keys;
- my $my_DH_pub_key_str = $mydh->pub_key->bstr;
- my $my_DH_pri_key_str = $mydh->priv_key->bstr;
-
- debug_print("SendHandshake::send: pri_key = $my_DH_pri_key_str [" . length($my_DH_pri_key_str) . "]digits");
- debug_print("SendHandshake::send: pub_key = $my_DH_pub_key_str [" . length($my_DH_pub_key_str) . "]digits");
-
-
- ###########################################
- # Send HandShake to the URL
- ###########################################
- my $ret="";
- try{
- $ret = send_HandShake(dest_uri => $dest_xml_uri,
- timestamp => $cur_time,
- my_nickname => $af->{user__nickname},
- my_AFID => $af->{site__web_root},
- DH_pub_key_str => $my_DH_pub_key_str,
- mesg => $my_mesg);
- }catch Affelio::exception::NetworkException with{
- my $E = shift;
- throw Affelio::exception::CommunicationException($E);
- }catch Affelio::exception::Exception with{
- my $E = shift;
- throw Affelio::exception::CommunicationException($E);
- };
- if($ret->{flerror} == 1){
- #XML-RPC communication was successful.
- #But the peer returned error. denyetc...
- throw Affelio::exception::CommunicationException($@);
- }
-
- ###########################################
- # Save peer's info into pending_DB
- ###########################################
- my $tmpdb= new Affelio::SNS::Handshaker_tmpDB($af);
- $tmpdb->add_sent_Handshake($cur_time,
- $dest_xml_uri,
- "",
- $cur_time,
- $my_DH_pri_key_str);
- debug_print("SendHandshake::send: wrote DB $dest_uri => $cur_time\n");
-
- $output_ref->{target_url} = $dest_uri;
- $output_ref->{mypage_url} = "$af->{site__web_root}/admin.cgi";
-
- return;
- }
-
-}
-1;
Index: affelio/lib/Affelio/App/Admin/Top.pm
diff -u /dev/null affelio/lib/Affelio/App/Admin/Top.pm:1.1
--- /dev/null Wed Nov 23 13:00:20 2005
+++ affelio/lib/Affelio/App/Admin/Top.pm Wed Nov 23 13:00:19 2005
@@ -0,0 +1,107 @@
+# Copyright (C) 2005 FishGrove Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# $Id: Top.pm,v 1.1 2005/11/23 04:00:19 slash5234 Exp $
+
+package Affelio::App::Admin::Top;
+{
+ use strict;
+
+ use lib("../../../../extlib/");
+ use Error qw(:try);
+
+ use lib("../../../");
+ use Affelio;
+ use Affelio::misc::CGIError;
+ use Affelio::misc::Debug qw(debug_print);
+ use Affelio::misc::Time qw(timestamp2string get_timestamp);
+ use Affelio::misc::WebInput;
+ use Affelio::exception::CommunicationException;
+
+ use Exporter;
+ @Affelio::App::Admin::Top::ISA = "Exporter";
+ @Affelio::App::Admin::Top::EXPORT = qw (show post_mystatus handler);
+
+ #######################################################################
+ #handler
+ #######################################################################
+ sub handler{
+ my $cgi = shift;
+ my $af = shift;
+ my $out_ref = shift;
+
+ debug_print("Top::handler: start.");
+
+ my $wi = new Affelio::misc::WebInput();
+ my $sub_mode = $wi->PTN_mode($cgi->url_param("action"));
+
+ try{
+ if( $sub_mode eq "post_mystatus" ){
+ debug_print("Top::handler: before post_mystatus...");
+ post_mystatus($af, $cgi->param("my_currentstatus"));
+ debug_print("Top::handler: after post_mystatus...");
+ }
+ }catch Error with{
+ my $e = shift;
+ $out_ref->{err_msg} .= $e->stacktrace . '<BR>';
+ };
+
+ $out_ref->{tmpl_file}
+ = "$af->{site__fs_root}/templates/" .
+ "$af->{site__template}/owner_side/admin_top.tmpl";
+
+ show($af, $cgi, $out_ref);
+ debug_print("Top::handler: end.");
+ }
+
+ #######################################################################
+ #post_mystatus
+ #######################################################################
+ sub post_mystatus{
+ my $af = shift;
+ my $currentstatus = shift;
+
+ debug_print("Top::post_mystatus: start [$currentstatus]");
+
+ $af->{user__currentstatus} = $currentstatus;
+
+ $af->getPM->save_profile();
+
+ debug_print("MyStatus::post end");
+ }
+
+ #######################################################################
+ #show
+ #######################################################################
+ sub show{
+ my $af= shift;
+ my $q=shift;
+ my $out_ref = shift;
+ debug_print("Top::show start.");
+
+ use Affelio::App::Admin::AffelioNews;
+ Affelio::App::Admin::AffelioNews::getnews($af, $out_ref);
+
+ $out_ref->{my_currentstatus}= $af->{user__currentstatus};
+
+ debug_print("Top::show end.");
+ }
+
+
+}
+1;
+
+