"", "result" => "", "detail" => "", "dialog" => "", ); //---------------------------- // request parameter //---------------------------- $qID = isset($_REQUEST["q_id"]) ? $_REQUEST["q_id"] : REQ_NON; //---------------------------- // judge post //---------------------------- //---------------------------- // set types //---------------------------- Util::setType($qID, "int"); //---------------------------- // Auth-Before validate //---------------------------- if ( $result === RES_OK ){ if ( ! Validate::isNumeric($qID) ){ $qID = User::get("organization_id"); } } //---------------------------- // Auth //---------------------------- if ( $result === RES_OK ){ $authOrg = Auth::instance("organization"); $authUser = Auth::instance("user"); if ( ! $authOrg->read($qID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 1)}"); } } //---------------------------- // Auth-After validate //---------------------------- if ( $result === RES_OK ){ } //---------------------------- // function //---------------------------- //---------------------------- // process //---------------------------- if ( $result === RES_OK ){ $objDAOOrganization = DAO::instance("organization"); $objViewOrganization = View::instance("organization"); $objViewUser = View::instance("user"); // 情報取得 -------------------- if ( $result === RES_OK ){ $objDAOOrganization->setAuth($authOrg); $resDAOOrganization = $objDAOOrganization->get($qID); $result = $resDAOOrganization["result"]; if ( $result === RES_OK ){ $arrHtml["detail"] = $objViewOrganization->detail($resDAOOrganization["data"][0]); } else { $result = RES_NG; $gResult->push("{$WORD($wk, 2)}"); } } } //---------------------------- // html //---------------------------- { // menu ---------------------------------------------------------------- if ( $result !== RES_NG ){ $arrMenu = array(); //----- $arrMenu[0] = $objViewOrganization->tab(View_organization::TAB_LIST, $authOrg); $arrMenu[1] = $objViewOrganization->tab(View_organization::TAB_DETAIL_EDIT, $authOrg, $qID); $arrMenu[2] = $objViewUser->tab(View_user::TAB_LIST, $authUser, $qID); $arrMenu[3] = $objViewUser->tab(View_user::TAB_NEW, $authUser, $qID); //----- $arrHtml["menu"] = Printer::menuTab($arrMenu, 1); } // title --------------------------------------------------------------- $title = "{$WORD($wk, 3)}"; // form ---------------------------------------------------------------- if ( $result !== RES_OK ){ // アクション(OK) $arrHtml["detail"] = Printer::link("OK", "btn btn-default", NULL, NULL, "./"); } // result -------------------------------------------------------------- $arrHtml["result"] = $gResult->string(TRUE, $result); } ?>