login. p?>"; return; } my $u = LJ::load_userid($remote->{'userid'}); $u->{'emailpref'} = $u->{'email'}; if ($LJ::USER_EMAIL && LJ::get_cap($u, "useremail")) { $u->{'emailpref'} = $u->{'user'} . '@' . $LJ::USER_DOMAIN; } unless ($u->{'status'} eq "A") { $body .= "{'email'}) isn't validated, so we can't let you use the \"Tell a Friend\" feature. To validate your email address, have the confirmation email resent at the lost information page, and then follow the instructions in it when you get it. p?>"; return; } my $err = sub { $title = "Error"; $body = ""; return; }; if ($FORM{'mode'} eq "mail") { my $email = $FORM{'toemail'}; my @errors; LJ::check_email($email, \@errors); push @errors, "" unless LJ::did_post(); if (@errors) { $title = "Error"; $body = LJ::bad_input(@errors); return; } LJ::send_mail({ 'to' => $FORM{'toemail'}, 'toname' => $FORM{'toname'}, 'from' => $u->{'emailpref'}, 'fromname' => $FORM{'fromname'}, 'charset' => 'utf-8', 'subject' => $FORM{'subject'}, 'body' => $FORM{'body'}, }); $body .= ""; return; } $body .= "
"; $body .= ""; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; my ($subject, $msg); $subject = "Check this out..."; if ($FORM{'itemid'} =~ /^\d+$/) { my $journal = $FORM{'journal'}; my $itemid = $FORM{'itemid'}+0; my $ditemid = $itemid; my $uj; $itemid = int($itemid / 256); $uj = LJ::load_user($journal); return $err->("Unknown journal") unless $uj; my $dbcr = LJ::get_cluster_reader($uj); my ($posterid, $subject) = $dbcr->selectrow_array("SELECT l.posterid, ls.subject ". "FROM log2 l, logtext2 ls ". "WHERE l.journalid=? AND ls.journalid=l.journalid ". "AND l.jitemid=? AND ls.jitemid=l.jitemid", undef, $uj->{'userid'}, $itemid); my $up; LJ::load_userids_multiple([ $posterid => \$up ], [ $uj, $u ]); my $base = LJ::journal_base($uj); my $url = "$base/$ditemid.html"; if ($up->{'user'} eq $u->{'user'}) { $msg .= "Hey,\n\nCheck out this journal entry of mine:\n\n"; } else { $msg .= "Hey,\n\nCheck this out... I saw this journal entry while reading " . $up->{'user'} . "'s journal:\n\n"; } $msg .= " $subject\n" if $subject; $msg .= " $url\n\n"; $msg .= "I thought you might be interested.\n\n"; } if ($FORM{'user'} =~ /^\w{1,15}$/) { my $user = $FORM{'user'}; my $uj = LJ::load_user($user); my $url; if (LJ::get_cap($uj, "userdomain")) { my $sub = $user; $sub =~ s/_/-/g; $url .= "http://$sub.$LJ::USER_DOMAIN/"; } else { $url .= "$LJ::SITEROOT/users/$user/"; } if ($user eq $u->{'user'}) { $msg .= "Hey,\n\nCheck out my journal that I'm keeping online:\n\n"; $msg .= " $url\n\n"; my $name = $u->{'name'}; $name =~ s/\s.+//; $msg .= "- $name\n"; } else { $msg .= "Hey,\n\nCheck out my friend's journal online:\n\n"; $msg .= " $url\n\n"; my $name = $u->{'name'}; $name =~ s/\s.+//; $msg .= "- $name\n"; } } my $subject = "Check it out..."; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "
From:{'name'} || "$LJ::SITENAME User") . "\">
 $u->{'emailpref'}
To (Name):
To (Email):
Subject:
Body:
 
"; $body .= "
"; return; _code?> body=> page?> lib: cgi-bin/emailcheck.pl link: htdocs/login.bml, htdocs/lostinfo.bml, htdocs/users, htdocs/talkread.bml form: htdocs/tools/tellafriend.bml _c?>