"", "form" => "", ); //---------------------------- // request parameter //---------------------------- $qProjectID = isset($_SESSION["project_id"]) ? $_SESSION["project_id"] : REQ_NON; $qToken = isset($_REQUEST["q_token"]) ? $_REQUEST["q_token"] : REQ_NON; $qKind = isset($_REQUEST["q_kind"]) ? $_REQUEST["q_kind"] : REQ_NON; $qID = isset($_REQUEST["q_id"]) ? $_REQUEST["q_id"] : REQ_NON; //---------------------------- // judge post //---------------------------- //---------------------------- // set types //---------------------------- Util::setType($qProjectID, "int"); Util::setType($qToken, "string"); Util::setType($qKind, "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::inKeyArray($qKind, Term::KIND_TABLE()) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 2)}"); } if ( ! Validate::isNumeric($qID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 3)}"); } if ( ! Validate::isNumeric($qProjectID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 4)}"); } } //---------------------------- // Auth //---------------------------- if ( $result === RES_OK ){ $auth = Auth::instance("term_root", $qKind); if ( ! $auth->processImportDelete($qID, $qProjectID) ){ $result = RES_NG; $gResult->push("{$WORD($wk, 5)}"); } } //---------------------------- // Auth-After validate //---------------------------- if ( $result === RES_OK ){ } //---------------------------- // process //---------------------------- if ( $result === RES_OK ){ DAO::begin(); $objDAOExterm = DAO::instance("exterm"); //---------------------------- // 削除 //---------------------------- if ( $result === RES_OK ){ $resDAOExterm = $objDAOExterm->delete($qID); $result = $resDAOExterm["result"]; } //---------------------------- // 結果 //---------------------------- if ( $result === RES_OK ){ $gResult->push("{$WORD($wk, 6)}"); } else { $gResult->push("{$WORD($wk, 7)}"); } DAO::end($result); } //---------------------------- // menu //---------------------------- { // title --------------------------------------------------------------- $title = "{$WORD($wk, 8)}"; // form ---------------------------------------------------------------- if ( $result === RES_OK ){ // アクション(OK) //$arrHtml["form"] = Printer::link("OK", "btn btn-default", NULL, NULL, "/content/term_root/?q_kind={$qKind}&q_project_id={$qProjectID}"); header("Location: /content/term_root/?q_kind={$qKind}&q_project_id={$qProjectID}"); } else { // アクション(OK) $arrHtml["form"] = Printer::link("OK", "btn btn-default", NULL, NULL, "/content/term_root/?q_kind={$qKind}&q_project_id={$qProjectID}"); } // result -------------------------------------------------------------- $arrHtml["result"] = $gResult->string(TRUE, $result); } ?>