2 title=><?_ml .title _ml?>
9 LJ::set_active_crumb('birthdays');
11 my $remote = LJ::get_remote();
12 return "<?needlogin?>" unless $remote;
16 $u = LJ::load_user($GET{user});
17 return BML::ml('.error.invaliduser', { user => LJ::ehtml($GET{user}) })
19 return BML::ml('.error.badstatus', { user => LJ::ljuser($u->{user}) })
20 if $u->{statusvis} ne 'V';
28 $body .= BML::ml('.description.others', { user => LJ::ljuser($u) });
30 $body .= $ML{'.description'};
34 $body .= "<?p $ML{'.findothers'} p?>";
35 $body .= "<form method='get' action='$LJ::SITEROOT/birthdays.bml'>";
36 $body .= LJ::html_text({ name => 'user', maxlength => 15, size => 15 });
37 $body .= LJ::html_submit(undef, $ML{'.view'});
43 @bdays = $u->get_friends_birthdays(full => 1);
45 @bdays = $remote->get_friends_birthdays(full => 1);
48 foreach my $bday (@bdays) {
49 LJ::text_out(\$bday->[2]);
51 if ($bday->[0] != $lastmon) {
52 if ($lastmon) { $body .= "</ul>\n"; }
53 $lastmon = $bday->[0];
54 $body .= "<?h1 " . LJ::Lang::month_long($lastmon) . " h1?><ul>\n";
57 my $day = sprintf("%2s", $bday->[1]);
60 my $friendu = LJ::load_user($bday->[2]);
61 my $name = LJ::ehtml($friendu->{'name'});
62 $body .= "<b><tt>$day</tt></b>: " . LJ::ljuser($friendu) . " - $name<br />\n";
68 $body .= "<?p $ML{'.nobirthdays'} p?>";
76 link: htdocs/login.bml