当前位置: 首页>>代码示例>>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;未经允许,请勿转载。