本文整理汇总了PHP中Browser::getOpener方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::getOpener方法的具体用法?PHP Browser::getOpener怎么用?PHP Browser::getOpener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser::getOpener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showLeaveMessagePage
function showLeaveMessagePage()
{
$canChangeName = Visitor::getInstance()->canVisitorChangeName();
$TML = new SmartyClass();
$TML->assign('theme', Browser::getCurrentTheme());
$TML->assign('email', Visitor::getInstance()->getEmail());
$TML->assign('phone', Visitor::getInstance()->getPhone());
$page['message'] = '';
$v = GetVisitorFromRequestAndSetCookie();
$visitor_name = $v['name'];
$TML->assign('page_settings', $page);
$TML->assign('opener', htmlspecialchars(Browser::getOpener(), ENT_QUOTES));
$TML->assign('openertitle', isset($_REQUEST['openertitle']) ? htmlspecialchars($_REQUEST['openertitle'], ENT_QUOTES) : '');
$TML->assign('canChangeName', $canChangeName);
$TML->assignCompanyInfoAndTheme();
if ($canChangeName) {
$TML->assign('name', $visitor_name != Resources::Get('chat.default.visitorname') ? $visitor_name : '');
} else {
$TML->assign('name', $visitor_name);
}
$TML->display('leave-message.tpl');
exit;
}
示例2: getOpenerWithTitle
public function getOpenerWithTitle()
{
$opener = Browser::getOpener();
$openerText = '';
if (!empty($_REQUEST['openertitle'])) {
// TODO remove from here
$openerTitle = $_REQUEST['openertitle'];
if (strtoupper(WEBIM_ENCODING) != 'UTF-8') {
$openerTitle = smarticonv('UTF-8', WEBIM_ENCODING, $openerTitle);
}
return array($opener, $openerTitle);
}
return array($opener);
}