ljr/livejournal/htdocs/support/faqpop.bml

41 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2019-02-05 21:49:12 +00:00
<?page
title=>Popular FAQs
body<=
<?h1 Popular Frequently Asked Questions h1?>
<?p
The following is a list of what questions people have been interested in during the past week, followed by the number of people that have read the answers:
p?>
<?_code
LJ::set_active_crumb('popfaqs');
my $dbr = LJ::get_db_reader();
$sth = $dbr->prepare("SELECT f.faqid, f.question, s.statval AS 'uses'".
"FROM faq f, stats s WHERE f.faqcat<>'int-abuse' AND s.statcat='popfaq' ".
"AND s.statkey=f.faqid ORDER BY s.statval DESC LIMIT 50");
$sth->execute;
$ret .= "<ul>";
while (my $f = $sth->fetchrow_hashref)
{
my $q = LJ::ehtml($f->{'question'});
$q =~ s/^\s+//; $q =~ s/\s+$//;
$q =~ s!\n!<br />!g;
$ret .= "<li><a href=\"faqbrowse.bml?faqid=$f->{'faqid'}\">$q</a> <i>($f->{'uses'})</i></li>\n";
}
$ret .= "</ul>\n";
return $ret;
_code?>
<?hr?>
<p>Back to <a href="./">the support area</a>.</p>
<=body
page?><?_c <LJDEP>
link: htdocs/support/faqbrowse.bml, htdocs/support/index.bml
</LJDEP> _c?>