"", "table" => "", ); //---------------------------- // 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 ){ DAO::begin(); $objDAOBbs = DAO::instance("bbs"); if ( $result === RES_OK ){ $resDAOBbs = $objDAOBbs->get(NULL, $qProjectID); $result = $resDAOBbs["result"]; if ( $result === RES_OK ){ $dataBbs = $resDAOBbs["data"][0]; $bbsID = $dataBbs["t_bbs_id"]; } else if ( $result === RES_NO_DATA ){ $gResult->push("{$WORD($wk, 3)}"); } else { $gResult->push("{$WORD($wk, 4)}"); } } DAO::end($result); } //---------------------------- // html //---------------------------- { // title --------------------------------------------------------------- $title = "{$WORD($wk, 5)}"; // form ---------------------------------------------------------------- if ( $result === RES_OK ){ header("Location: ./detail.html?q_project_id={$qProjectID}&q_id={$bbsID}"); } else { // アクション(OK) $arrHtml["table"] = Printer::link("OK", "btn btn-default", NULL, NULL, "/content/project/"); } // result -------------------------------------------------------------- $arrHtml["result"] = $gResult->string(TRUE, $result); } ?>