"", "result" => "", "detail" => "", "dialog" => "", ); //---------------------------- // request parameter //---------------------------- $qProjectID = isset($_SESSION["project_id"]) ? $_SESSION["project_id"] : REQ_NON; //---------------------------- // judge post //---------------------------- //---------------------------- // set types //---------------------------- Util::setType($qProjectID, "int"); //---------------------------- // Auth-Before validate //---------------------------- if ( $result === RES_OK ){ if ( ! Validate::isNumeric($qProjectID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 1)}"); } } //---------------------------- // Auth //---------------------------- if ( $result === RES_OK ){ $auth = Auth::instance("project"); if ( ! $auth->read($qProjectID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 2)}"); } } //---------------------------- // Auth-After validate //---------------------------- if ( $result === RES_OK ){ } //---------------------------- // function //---------------------------- //---------------------------- // process //---------------------------- if ( $result === RES_OK ){ $objDAOProject = DAO::instance("project"); $objDAOProjectUser = DAO::instance("project_user"); $objViewProject = View::instance("project"); // 情報取得 -------------------- if ( $result === RES_OK ){ $objDAOProject->setAuth($auth); $resDAOProject = $objDAOProject->get($qProjectID); $result = $resDAOProject["result"]; if ( $result === RES_OK ){ $resDAOProjectUser = $objDAOProjectUser->get($qProjectID, NULL, Task::ROLE_RPMG); if ( $resDAOProjectUser["result"] === RES_OK ){ $arrHtml["detail"] = $objViewProject->detail($resDAOProject["data"][0], $resDAOProjectUser["data"]); } else { $arrHtml["detail"] = $objViewProject->detail($resDAOProject["data"][0]); } $arrHtml["dialog"] = $objViewProject->dictionaryDialog($resDAOProject["data"][0]["t_project_lang_s"], $resDAOProject["data"][0]["t_project_lang_t"]); } else { $result = RES_NG; $gResult->push("{$WORD($wk, 3)}"); } } } //---------------------------- // html //---------------------------- { // menu ---------------------------------------------------------------- if ( $result !== RES_NG ){ $arrMenu = array(); //----- $arrMenu[0] = $objViewProject->tab(View_project::TAB_DETAIL_EDIT, $auth, $qProjectID); $arrMenu[1] = $objViewProject->tab(View_project::TAB_STRUCTURE, $auth, $qProjectID); $arrMenu[2] = $objViewProject->tab(View_project::TAB_IMPORT, $auth, $qProjectID); $arrMenu[3] = $objViewProject->tab(View_project::TAB_EXPORT, $auth, $qProjectID); //----- $arrHtml["menu"] = Printer::menuTab($arrMenu, 0); } // title --------------------------------------------------------------- $title = "{$WORD($wk, 4)}"; // form ---------------------------------------------------------------- if ( $result !== RES_OK ){ // アクション(OK) $arrHtml["detail"] = Printer::link("OK", "btn btn-default", NULL, NULL, "./"); } // result -------------------------------------------------------------- $arrHtml["result"] = $gResult->string(TRUE, $result); } ?>