public function indexAction()
 {
     $month = $this->getRequest()->getQuery('month');
     if (preg_match('/^(\\d{4})-(\\d{2})$/', $month, $matches)) {
         $y = $matches[1];
         $m = max(1, min(12, $matches[2]));
     } else {
         $y = date('Y');
         $m = date('n');
     }
     $from = mktime(0, 0, 0, $m, 1, $y);
     $to = mktime(0, 0, 0, $m + 1, 1, $y) - 1;
     $options = array('user_id' => $this->identity->user_id, 'from' => date('Y-m-d H:i:s', $from), 'to' => date('Y-m-d H:i:s', $to), 'order' => 'p.ts_created desc');
     $recentPosts = DatabaseObject_BlogPost::GetPosts($this->db, $options);
     $totalPosts = DatabaseObject_BlogPost::GetPostsCount($this->db, array('user_id' => $this->identity->user_id));
     $this->view->month = $from;
     $this->view->recentPosts = $recentPosts;
     $this->view->totalPosts = $totalPosts;
 }