本文整理匯總了PHP中CBPTXT::jsAddSlashes方法的典型用法代碼示例。如果您正苦於以下問題:PHP CBPTXT::jsAddSlashes方法的具體用法?PHP CBPTXT::jsAddSlashes怎麽用?PHP CBPTXT::jsAddSlashes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CBPTXT
的用法示例。
在下文中一共展示了CBPTXT::jsAddSlashes方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _outputInstructions
/**
* Private method to output the payment instructions
* @param cbpaidPaymentBasket $paymentBasket
* @return bool|string
*/
private function _outputInstructions($paymentBasket)
{
if ($paymentBasket->payment_method == 'offline' || $paymentBasket->payment_method == null) {
if ($paymentBasket->payment_method == null) {
$paymentBasket->payment_method = $this->getPayName();
$paymentBasket->gateway_account = $this->getAccountParam('id');
$paymentBasket->store();
}
// Generate URLs for payment slip:
$slip_popup_window = $this->getAccountParam('slip_popup_window', 1);
$slip_urlHtmlSpecialchared = $this->_getSlipUrlHtmlSpecialchared($paymentBasket, $slip_popup_window);
$slip_link_text = CBPTXT::Th($this->getAccountParam('slip_link_text', "Click here to confirm that you are paying off-line and to display the Payment slip to print"));
$areYouSureText = CBPTXT::T($this->getAccountParam('slip_link_areyousure_text', "This will lock this transaction for offline payment. Please continue now only if you are preparing the payment now. Are you paying now ?"));
$ret = "<div class=\"cbpaidInstructions\">" . CBPTXT::Th($this->getAccountParam('regOfflineInstructions')) . "</div>\n";
$ret .= '<div class="cbpaySlip"><a ';
if ($areYouSureText || $slip_popup_window) {
$ret .= 'onclick="';
if ($areYouSureText) {
$ret .= 'if ( confirm( \'' . CBPTXT::jsAddSlashes(htmlspecialchars($areYouSureText)) . '\' ) ) ';
}
if ($slip_popup_window) {
$ret .= 'window.open(\'' . $slip_urlHtmlSpecialchared . '\', \'payslip\', \'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no\'); return false;" ' . 'target="_blank" ';
} else {
$ret .= ' return true else return false;" ';
}
}
$ret .= 'href="' . $slip_urlHtmlSpecialchared . '">' . $slip_link_text . "</a></div>\n";
} else {
$this->_setErrorMSG(CBPTXT::T("Another payment method has already been choosen to pay."));
$ret = false;
}
return $ret;
}