本文整理汇总了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;
}