本文整理汇总了PHP中Output::getUserAgent方法的典型用法代码示例。如果您正苦于以下问题:PHP Output::getUserAgent方法的具体用法?PHP Output::getUserAgent怎么用?PHP Output::getUserAgent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Output
的用法示例。
在下文中一共展示了Output::getUserAgent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: installCert
private function installCert($authKey)
{
$ua = Output::getUserAgent();
$script = $this->ca->getCertDeploymentScript($authKey, $ua);
switch ($ua) {
case "chrome":
case "opera":
case "mozilla":
case "safari":
include 'file_download.php';
download_certificate($script, "install.crt");
break;
default:
$script .= "<noscript><b>" . $this->translateTag('l10n_noscript_notice', 'download') . "</b></noscript>";
$this->tpl->assign("script", $script);
break;
}
}
示例2: process
public function process()
{
if (CS::getSessionKey('hasAcceptedAUP') !== true) {
Framework::error_output($this->translateTag('l10n_err_aupagreement', 'processcsr'));
return;
}
$user_cert_enabled = $this->person->testEntitlementAttribute(Config::get_config('entitlement_user'));
$this->tpl->assign('user_cert_enabled', $user_cert_enabled);
$this->tpl->assign('finalDN', $this->ca->getFullDN());
$this->tpl->assign('dn', $this->ca->getBrowserFriendlyDN());
if ((int) Config::get_config('ca_mode') == CA_COMODO) {
$this->tpl->assign('dn', $this->ca->getBrowserFriendlyDN(true));
}
$this->tpl->assign('default_keysize', Config::get_config('default_key_length'));
$this->tpl->assign('min_keysize', Config::get_config('min_key_length'));
$ua = Output::getUserAgent();
switch ($ua) {
case "msie_post_vista":
$this->tpl->assign('content', $this->tpl->fetch('browser_csr/vista7.tpl'));
break;
case "msie_pre_vista":
$this->tpl->assign('content', $this->tpl->fetch('browser_csr/xp2003.tpl'));
break;
case "chrome":
case "safari":
case "opera":
case "mozilla":
$this->tpl->assign('content', $this->tpl->fetch('browser_csr/keygen.tpl'));
break;
case "other":
$this->tpl->assign('content', $this->tpl->fetch('browser_csr/unsupported.tpl'));
break;
default:
$this->tpl->assign('content', $this->tpl->fetch('browser_csr/unsupported.tpl'));
break;
}
}