[Affelio-cvs 909] CVS update: affelio/bin

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 12月 18日 (日) 13:20:36 JST


Index: affelio/bin/loginexec.cgi
diff -u affelio/bin/loginexec.cgi:1.12 affelio/bin/loginexec.cgi:1.13
--- affelio/bin/loginexec.cgi:1.12	Fri Dec 16 23:41:00 2005
+++ affelio/bin/loginexec.cgi	Sun Dec 18 13:20:36 2005
@@ -16,7 +16,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: loginexec.cgi,v 1.12 2005/12/16 14:41:00 slash5234 Exp $
+# $Id: loginexec.cgi,v 1.13 2005/12/18 04:20:36 slash5234 Exp $
 
 use strict;
 
@@ -194,6 +194,24 @@
 
 
 ############################################################################
+#Check if forward_URL is my friend
+############################################################################
+my $passAB="";
+try{
+   $passAB = $af->getFM->get_attribute_by_afid($forward_URL, "password");
+}catch Error with{
+    my $e = shift;
+    error($q, "Error from FriendManager.\n" . $e);
+};
+
+if($passAB eq ""){
+    show_askmakefriend_screen();
+    exit;
+}
+
+
+
+############################################################################
 #Output
 ############################################################################
 
@@ -213,6 +231,20 @@
 
 
 
+sub show_askmakefriend_screen{
+    my $TMPL_FILE = "$af->{site__fs_root}/templates/$af->{site__template}/owner_side/ask_makefriend.tmpl";
+    my $tmpl = new HTML::Template( filename => $TMPL_FILE,
+				   die_on_bad_params => 0);
+    $tmpl->param("owner_nickname" => $af->{user__nickname});
+    $tmpl->param("tmpl_path" => "$af->{site__web_root}/templates/$af->{site__template}");
+    $tmpl->param("admin_path" => "$af->{site__web_root}/admin.cgi?mode=makefriend&dest_url=$forward_URL");
+    $tmpl->param("dest_affelio_URL" => $forward_URL);
+
+    print "Content-type: text/html; charset=UTF-8\n\n";
+    print $af->translate_templateL10N($tmpl->output);
+}
+
+
 sub show_checkpassword_screen{
     my %args = @_;
 


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