<?php

//$hiddenTitleDiv = true;
$title = WxArticle::typeDesc($type);
include_once dirname(__FILE__) . '/_header.php';
?>

<?php 
foreach ($wxArticleList as $a) {
    ?>
<p><a href="/wx/wxarticlebycode?wxarticlecode=<?php 
    echo $a->code;
    ?>
"><?php 
    echo $a->title;
    ?>
</a></p>
<?php 
}
?>

<?php 
include_once dirname(__FILE__) . '/_footer.php';
 public function wxArticleUrlRedirectOfDailyPhoto($request, $response)
 {
     /*{{{*/
     $type = $request->type;
     $wxUserId = $request->wxuserid;
     $wxArticle = WxArticle::getDailyPhotoArticle($wxUserId, $type);
     if ($wxArticle instanceof WxArticle) {
         $code = $wxArticle->code;
         $response->setRedirect("/wx/wxarticlebycode?wxarticlecode=" . $code . "&wxUserId=" . $wxUserId);
     } else {
         $wxArticle = DAL::get()->find_by_type('WxArticle', $type);
         $Msg = "很抱歉,[" . $wxArticle->getTypeDesc() . "]知识池已空,感谢您一如以往的支持,工作人员会尽快添加更多知识,敬请期待。";
         $response->setRedirect("/wx/wxnotice?msg=" . $Msg);
     }
 }