當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Currency::deleteCurrency方法代碼示例

本文整理匯總了PHP中Currency::deleteCurrency方法的典型用法代碼示例。如果您正苦於以下問題:PHP Currency::deleteCurrency方法的具體用法?PHP Currency::deleteCurrency怎麽用?PHP Currency::deleteCurrency使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Currency的用法示例。


在下文中一共展示了Currency::deleteCurrency方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deleteCurrency

function deleteCurrency()
{
    $currency = new Currency();
    $currency->setCurrId($_REQUEST['id']);
    if ($currency->deleteCurrency()) {
        Common::jsonSuccess("Currency Deleted Successfully");
    } else {
        Common::jsonError("Error");
    }
}
開發者ID:jcodesdotme,項目名稱:pp,代碼行數:10,代碼來源:currency-controller.php

示例2: deleteEmailAddress

 /**
  * Delete an email address
  * @param null $currencyCode
  * @param null $emailAddress
  */
 public function deleteEmailAddress($currencyCode = null, $emailAddress = null)
 {
     if (!isset($currencyCode) || !isset($emailAddress)) {
         $this->sendError('INVALID_PARAMS', 400);
     }
     $email = Email::getEmailAddress($currencyCode, $emailAddress);
     if (!$email) {
         $this->sendError('EMAIL_NOT_FOUND', 404);
     }
     $result = Currency::deleteCurrency($currencyCode);
     if ($result) {
         $this->sendSuccess(ResponseMessages::CURRENCY_DELETED_SUCCESSFULLY);
     } else {
         $this->sendError('UNABLE_TO_DELETE_CURRENCY', 500);
     }
 }
開發者ID:ashleykleynhans,項目名稱:forex,代碼行數:21,代碼來源:EmailController.php

示例3: deleteCurrency

 /**
  * Delete a currency
  * @param null $currencyCode
  */
 public function deleteCurrency($currencyCode = null)
 {
     if (!isset($currencyCode)) {
         $this->sendError('INVALID_PARAMS', 400);
     }
     $currency = Currency::getCurrency($currencyCode);
     if (!$currency) {
         $this->sendError('CURRENCY_NOT_FOUND', 404);
     }
     $result = Currency::deleteCurrency($currencyCode);
     if ($result) {
         $this->sendSuccess(ResponseMessages::CURRENCY_DELETED_SUCCESSFULLY);
     } else {
         $this->sendError('UNABLE_TO_DELETE_CURRENCY', 500);
     }
 }
開發者ID:ashleykleynhans,項目名稱:forex,代碼行數:20,代碼來源:CurrencyController.php

示例4:

         $o->updatedby = $xoopsUser->getVar('uid');
         //get current uid
         if ($o->updateCurrency()) {
             //if data save successfully
             $cvr->save();
             redirect_header("currency.php?action=edit&currency_id={$o->currency_id}", $pausetime, "Your data is saved.");
         } else {
             redirect_header("currency.php?action=edit&currency_id={$o->currency_id}", $pausetime, "Warning! Can't save the data, please make sure all value is insert properly.");
         }
     } else {
         redirect_header("currency.php?action=edit&currency_id={$o->currency_id}", $pausetime, "Warning! Can't save the data, please make sure all value is insert properly.");
     }
     break;
 case "delete":
     if ($s->check(false, $token, "CREATE_WDW")) {
         if ($o->deleteCurrency($o->currency_id)) {
             redirect_header("currency.php", $pausetime, "Data removed successfully.");
         } else {
             redirect_header("currency.php?action=edit&currency_id={$o->currency_id}", $pausetime, "Warning! Can't delete data from database.");
         }
     } else {
         redirect_header("currency.php?action=edit&currency_id={$o->currency_id}", $pausetime, "Warning! Can't delete data from database.");
     }
     break;
 default:
     $token = $s->createToken(120, "CREATE_WDW");
     $o->countryctrl = $ctrl->getSelectCountry(0, 'N');
     //$o->orgctrl=$selectionOrg->selectionOrg($o->createdby,0);
     $o->getInputForm("new", 0, $token);
     $o->showCurrencyTable("WHERE currency_id>0", "ORDER BY cur.defaultlevel,cur.currency_name");
     break;
開發者ID:gauravsaxena21,項目名稱:simantz,代碼行數:31,代碼來源:currency+copy.php


注:本文中的Currency::deleteCurrency方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。