public function detail()
 {
     $sid = intval($_GET['sub_mid']);
     if (md5(md5(md5(implode('|', array($sid, '!mrala', date('Y-m-d')))))) !== $_GET['sign']) {
         Message::showError('sign fail');
     } else {
         $submoduleDB = new SubmoduleModelDB();
         $submodule = $submoduleDB->getRow('SELECT mid, code, name FROM `' . $submoduleDB->getTableName() . '` WHERE id=?', array(intval($sid)));
         $moduleDB = new ModuleModelDB();
         $module = $moduleDB->getRow('SELECT sys_mid, pid FROM `' . $moduleDB->getTableName() . '` WHERE id=?', array(intval($submodule['mid'])));
         $sysmoduleDB = new SysmoduleModelDB();
         $sysmodule = $sysmoduleDB->getRow('SELECT `name` FROM `' . $sysmoduleDB->getTableName() . '` WHERE id=?', array(intval($module['sys_mid'])));
         $projectDB = new ProjectModelDB();
         $project = $projectDB->getRow('SELECT `name` FROM `' . $projectDB->getTableName() . '` WHERE id=?', array(intval($module['pid'])));
         $this->setView('project', $project);
         $this->setView('sysmodule', $sysmodule);
         $this->setView('submodule', $submodule);
         $this->setView('sub_mid', $sid);
         $this->display('mobile/details.html');
     }
 }
 public function delete()
 {
     $moduleDB = new ModuleModelDB();
     $whereArr = array();
     $whereArr['id'] = $_GET['id'];
     $sql = "SELECT * FROM `" . $moduleDB->getTableName() . "` WHERE `id` = ?";
     $row = $moduleDB->getRow($sql, array_values($whereArr));
     $rs = $moduleDB->delete($whereArr);
     Log::write($this->adminUserName, $this->ip, $_GET['id'], self::$state . "__" . self::$action, $rs, Log::arrayToLog($row));
     $rs ? Message::showSucc('删除成功') : Message::showError('删除失败:' . implode(" ", $moduleDB->getErrorInfo()));
 }