public function getDetail()
 {
     $pid = intval($_GET['pid']);
     if (!$pid) {
         $projectDB = new ProjectModelDB();
         $pid = $projectDB->getFirst('SELECT id FROM `' . $projectDB->getTableName() . '` WHERE name=?', array($_GET['pname']));
     }
     $pageId = max(intval($_GET['page']), 1);
     $limit = 50;
     $start = ($pageId - 1) * $limit;
     $stop = $start + $limit;
     $detail = MyRedis::getProjectDetail($pid, $start, $stop);
     $data = array();
     foreach ($detail['messages'] as $i => $v) {
         if (($msg = @unserialize($v)) && is_array($msg)) {
             $data[$i] = $msg;
         } else {
             $msg = explode(" ", $v);
             $data[$i]['time'] = str_replace(array('[', ']'), '', array_shift($msg) . ' ' . array_shift($msg));
             $data[$i]['name'] = array_shift($msg);
             $data[$i]['code'] = str_replace(array("错误号:", '{', '}'), '', array_shift($msg));
             $otherMsg = array_pop($msg);
             $otherMsgArr = explode(",", $otherMsg);
             if (count($otherMsgArr) == 4) {
                 $data[$i]['xhprofId'] = str_replace(array('xhprofId[', ']'), '', array_pop($otherMsgArr));
             }
             list($data[$i]['clientIp'], $data[$i]['serverIp']) = explode("/", str_replace(array("来自"), '', array_pop($otherMsgArr)));
             $data[$i]['email'] = str_replace(array("短信:", '第', '次'), '', array_pop($otherMsgArr));
             $data[$i]['sms'] = str_replace(array("邮件:", '第', '次'), '', array_pop($otherMsgArr));
             $data[$i]['message'] = str_replace(array("详细:"), '', implode(" ", $msg));
         }
     }
     Common::debug($data, 'Result');
     $pageModel = new Page($detail['count'], $limit);
     $this->setView('pageTitle', '详细信息');
     $this->setView('data', $data);
     $this->setView('pageStr', $pageModel->getPageStr());
     $this->display('Detail.html');
 }