"", "form" => "", ); //---------------------------- // request parameter //---------------------------- $qToken = isset($_REQUEST["q_token"]) ? $_REQUEST["q_token"] : REQ_NON; $qID = isset($_REQUEST["q_id"]) ? $_REQUEST["q_id"] : REQ_NON; //---------------------------- // judge post //---------------------------- //---------------------------- // set types //---------------------------- Util::setType($qToken, "string"); Util::setType($qID, "int"); //---------------------------- // Auth-Before validate //---------------------------- if ( $result === RES_OK ){ if ( ! Validate::isToken($qToken, "token_common") ){ $result = RES_NG; $gResult->push("{$WORD($wk, 1)}"); } if ( ! Validate::isNumeric($qID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 2)}"); } } //---------------------------- // Auth //---------------------------- if ( $result === RES_OK ){ $auth = Auth::instance("project"); if ( ! $auth->remove($qID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 3)}"); } } //---------------------------- // Auth-After validate //---------------------------- if ( $result === RES_OK ){ } //---------------------------- // function //---------------------------- //---------------------------- // process //---------------------------- if ( $result === RES_OK ){ DAO::begin(); $objDAOProject = DAO::instance("project"); //---------------------------- // 削除 //---------------------------- if ( $result === RES_OK ){ $resDAOProject = $objDAOProject->delete($qID); $result = $resDAOProject["result"]; } //---------------------------- // 結果 //---------------------------- if ( $result === RES_OK ){ $gResult->push("{$WORD($wk, 4)}"); } else { $gResult->push("{$WORD($wk, 5)}"); } DAO::end($result); } //---------------------------- // menu //---------------------------- { // title --------------------------------------------------------------- $title = "{$WORD($wk, 6)}"; // form ---------------------------------------------------------------- if ( $result === RES_OK ){ // アクション(OK) //$arrHtml["form"] = Printer::link("OK", "btn btn-default", NULL, NULL, "./"); header("Location: ./"); } else { // アクション(OK) $arrHtml["form"] = Printer::link("OK", "btn btn-default", NULL, NULL, "./"); } // result -------------------------------------------------------------- $arrHtml["result"] = $gResult->string(TRUE, $result); } ?>