"Unanswered Questions Report", //TODO LAN
'function' => "unanswered",
'category' => "notify",
'description' => "Mails a report of unanswered questions to ".e107::pref('core','siteadminemail').'.' // TODO LAN
);
return $cron;
}
function unanswered()
{
$sql = e107::getDb();
$tp = e107::getParser();
$limit = 25;
$count = $sql->retrieve('faqs','faq_id',"faq_answer='' ", true);
$existing = $sql->retrieve('faqs','faq_id,faq_question,faq_datestamp',"faq_answer='' ORDER BY faq_datestamp DESC LIMIT ".$limit, true);
if(empty($existing))
{
return;
}
$questions = array();
foreach($existing as $row)
{
$questions[] = "".$row['faq_question']."
".$tp->toDate($row['faq_datestamp'],'short')."\n";
// $questions[] = $row['faq_question'];
}
//
// $questions = array( "Test Question
".$tp->toDate(time(),'short')."");
$name = SITENAME . " Automation";
$email = e107::pref('core','siteadminemail');
$name = e107::pref('core','siteadmin');
$link = $tp->replaceConstants("{e_PLUGIN}faqs/admin_config.php?mode=main&action=list&filter=pending", 'full');
$body = "