/[suikacvs]/test/suika-accounts/add.cgi
Suika

Diff of /test/suika-accounts/add.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Thu Oct 30 11:57:07 2008 UTC revision 1.5 by wakaba, Thu Nov 6 14:51:54 2008 UTC
# Line 10  require Message::CGI::Carp; Line 10  require Message::CGI::Carp;
10  require 'users.pl';  require 'users.pl';
11  require 'texts.pl';  require 'texts.pl';
12    
13    our $subject_prefix;
14    
15  require Message::CGI::HTTP;  require Message::CGI::HTTP;
16  require Encode;  require Encode;
17  my $cgi = Message::CGI::HTTP->new;  my $cgi = Message::CGI::HTTP->new;
# Line 53  if (@path == 1 and $path[0] eq 'new-user Line 55  if (@path == 1 and $path[0] eq 'new-user
55      my $user_prop = {id => $user_id, pass_crypted => $pass_crypted};      my $user_prop = {id => $user_id, pass_crypted => $pass_crypted};
56      set_user_prop ($user_id, $user_prop);      set_user_prop ($user_id, $user_prop);
57    
58        send_mail ("$subject_prefix User $user_id created",
59                   "User: $user_id\nStatus: User registered\n");
60    
61      regenerate_htpasswd_and_htgroup ();      regenerate_htpasswd_and_htgroup ();
62      commit ();      commit ();
63    
# Line 63  Location: $user_url Line 68  Location: $user_url
68  Content-Type: text/html; charset=utf-8  Content-Type: text/html; charset=utf-8
69    
70  <!DOCTYPE HTML>  <!DOCTYPE HTML>
71  <html lang=en>  <html lang=en class=account-user-misc>
72  <title>];  <title>];
73      print_text ('User %s registered', sub { print '', htescape ($user_id) });      print_text ('User %s registered', sub { print '', htescape ($user_id) });
74      print q[</title>      print q[</title>
75  <link rel=stylesheet href="/www/style/html/xhtml">  <link rel=stylesheet href="/admin/style/common">
76  <h1>];  <h1>];
77      print_text ('User %s registered', sub { print '', htescape ($user_id) });      print_text ('User %s registered', sub { print '', htescape ($user_id) });
78      print q[</h1><p>];      print q[</h1><p>];
79      print_text ('Your user account is created successfully.');      print_text ('Your user account is created successfully.');
80      print q[<p>];      print q[<p>];
81      print_text ('See %s.', sub {      print_text ('See %s.', sub {
82        print q[<a href="@{[htescape ($user_url)]}">];        print qq[<a href="@{[htescape ($user_url)]}">];
83        print_text ('your user account information page');        print_text ('your user account information page');
84        print q[</a>];        print q[</a>];
85      });      });
# Line 84  Content-Type: text/html; charset=utf-8 Line 89  Content-Type: text/html; charset=utf-8
89      print q[Content-Type: text/html; charset=utf-8      print q[Content-Type: text/html; charset=utf-8
90    
91  <!DOCTYPE HTML>  <!DOCTYPE HTML>
92  <html lang=en>  <html lang=en class=account-user-misc>
93  <title>];  <title>];
94      print_text ('Create a new user account');      print_text ('Create a new user account');
95      print q[</title>      print q[</title>
96  <link rel=stylesheet href="/www/style/html/xhtml">  <link rel=stylesheet href="/admin/style/common">
97  <h1>];  <h1>];
98      print_text ('Create a new user account');      print_text ('Create a new user account');
99      print q[</h1>      print q[</h1>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24