本文整理汇总了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");
}
}
示例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);
}
}
示例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);
}
}
示例4:
$o->updatedby = $xoopsUser->getVar('uid');
//get current uid
if ($o->updateCurrency()) {
//if data save successfully
$cvr->save();
redirect_header("currency.php?action=edit¤cy_id={$o->currency_id}", $pausetime, "Your data is saved.");
} else {
redirect_header("currency.php?action=edit¤cy_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¤cy_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¤cy_id={$o->currency_id}", $pausetime, "Warning! Can't delete data from database.");
}
} else {
redirect_header("currency.php?action=edit¤cy_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;