本文整理汇总了PHP中browser_detection函数的典型用法代码示例。如果您正苦于以下问题:PHP browser_detection函数的具体用法?PHP browser_detection怎么用?PHP browser_detection使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了browser_detection函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MainPage
function MainPage($error = null)
{
$t = time();
$page = CurrentPageName();
$content = @file_get_contents("ressources/templates/endusers/logon.html");
$browser = browser_detection();
if ($browser == "ie") {
$content = @file_get_contents("ressources/templates/endusers/logon.ie.html");
}
$button = button("{logon}", "Loadjs('{$page}?js=yes')", "18px");
$content = str_replace("{TEMPLATE_TITLE_HEAD}", $_SERVER["SERVER_NAME"], $content);
$content = str_replace("{LOGON_BUTTON}", $button, $content);
$content = str_replace("{SCRIPTS}", "Loadjs('{$page}?js=yes&t={$t}');", $content);
$content = str_replace("<!-- ERROR -->", "<p class=text-error>{$error}</p>", $content);
$sublink = null;
if ($_SERVER["SERVER_PORT"] == 9000) {
if ($_SERVER["HTTPS"] == "on") {
$sublink = "<a href='https://{$_SERVER["SERVER_NAME"]}:9000/logon.php'>«{back_to_artica}»</a>";
}
}
$content = str_replace("{SUBLINKS}", $sublink, $content);
$tpl = new templates();
$content = $tpl->_ENGINE_parse_body($content);
echo $content;
}
示例2: __construct
/**
*/
public function __construct()
{
if (self::$browser !== NULL) {
return;
}
self::$browser = browser_detection('full_assoc', '1');
self::$browser[self::$browser['browser_name']] = (double) self::$browser['browser_math_number'];
switch (self::$browser['browser_name']) {
case 'gecko':
// add firefox alias
self::$browser['firefox'] = self::$browser['gecko'];
break;
}
}
示例3: addContactFormFields
/**
* Add new fields (1 shown + 1-5 hidden ones) to Special:Contact.
*
* @param $contactForm Object: instance of EmailContactForm class
* @param $form Sringt: HTML
* @return Boolean: true
*/
function addContactFormFields($contactForm, $form)
{
global $wgServer, $wgDBname;
$form .= '<tr>
<td class="mw-label">' . Xml::label(wfMsg('contactpage-wikiurl'), 'wpWikiURL') . '</td>
<td class="mw-input" id="mw-contactpage-address">' . Xml::input('wpWikiURL', 60, $wgServer, array('type' => 'text', 'maxlength' => 200)) . '</td>
</tr>
<tr>' . Html::Hidden('wpDBname', $wgDBname, array('maxlength' => 100)) . "</tr>\n\t\t\t";
if (class_exists('MyInfo')) {
$myinfo = new MyInfo();
$myinfo->browser = get_browser(null, true);
$myinfo->info = browser_detection('full');
$myinfo->info[] = browser_detection('moz_version');
$form .= '<tr>' . Html::Hidden('wpBrowser', $myinfo->getBrowser(), array('maxlength' => 255)) . '</tr>
<tr>' . Html::Hidden('wpOperatingSystem', $myinfo->getOs(), array('maxlength' => 255)) . '</tr>
<tr>' . Html::Hidden('wpSkinName', $myinfo->getSkin(), array('maxlength' => 35)) . '</tr>
<tr>' . Html::Hidden('wpUserAgent', $myinfo->getUAgent(), array('maxlength' => 500)) . '</tr>';
}
return true;
}
示例4: css
function css(){
include_once("ressources/class.browser.detection.inc");
$browser= browser_detection("browser");
$form=".form{
background: -moz-linear-gradient(center top , #F1F1F1 0px, #FFFFFF 45px) repeat scroll 0 0 transparent;
border: 1px solid #DDDDDD;
border-radius: 5px 5px 5px 5px;
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
margin: 5px;
padding: 5px;}";
if($browser=="ie"){
$form="
.form{
padding: 8px;
margin: 5px;
padding: 5px;
}";
}
header('Content-Type: text/css; charset=UTF-8');
$f[]="body {";
$f[]=" margin: 0;";
$f[]=" font-family:'Questrial',Tahoma,Arial";
$f[]="}";
$f[]="
$form
td.e{
font-weight:bold;
text-transform:capitalize;
text-align:right;
white-space: nowrap;
font-size:12px;
}
td.v{
font-weight:normal;
text-align:left;
font-size:12px;
}
tr.v{
font-weight:normal;
text-align:left;
font-size:8px;
}
tr.h{
font-weight:bold;
text-transform:capitalize;
text-align:left;
white-space: nowrap;
font-size:14px;
background-color:#CCCCCC;
}
h1.p{
font-weight:bold;
font-size:16px;
}
.center h1{
font-weight:bold;
text-align:left;
font-size:16px;
}
.center h2{
font-weight:bold;
text-align:left;
font-size:14px;
}
.center hr{
padding:0px;margin:0px;border:0px;
}
.center th{
font-weight:bold;
text-align:left;
font-size:11px;
background-color:#F0EDED;
}
#tablist{
border-bottom:1px solid #DEDEDE;
font-size:16px;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:normal;
margin-left:0px;
padding:3px 0px;
}
#tablist li {
background-image:none;
display:inline;
list-style-type:none;
margin:0px;
padding:0px;
}
//.........这里部分代码省略.........
示例5: listele
function listele($sonuclar, $itemIdStrOrj, $isProtokol, $protokolStr, $isGorus, $gorusStr)
{
//$standartAdi = $_POST['standart_adi'];// POST OLACAK
// echo $standartAdi;
// echo '<pre>';
// print_r($sonuclar);
// echo '</pre>';
if (empty($sonuclar)) {
echo '<div class="sonucBulunamadi">Uygun sonuç bulunamadı.</div>';
} else {
?>
<div class="tableWrapper">
<table cellspacing="0" class="paginate-10 sortable">
<tr class="tablo_header">
<th>#</th>
<!-- <th class="sortable-numeric">Standart Id</th> -->
<th class="sortable-text">Seviye</th>
<th class="sortable-text">Standart Adı</th>
<th class="sortable-text">Kurulus Adı</th>
<?php
if (isset($sonuclar[0]['PROFIL_GOREV_ADI'])) {
echo '<th class="sortable-text">Içerdigi Görev</th>';
}
?>
<?php
if ($isGorus) {
?>
<th class="sortable-text">Görüs Bildir</th>
<th>PDF</th>
<?php
}
?>
</tr>
<?php
$user_browser = browser_detection('browser');
$rowCount = 1;
$rowClass = "";
foreach ($sonuclar as $satir) {
if ($rowCount % 2 == 0) {
$rowClass = "even_row";
} else {
$rowClass = "odd_row";
}
if (strripos($user_browser, 'msie') !== FALSE) {
$clickHTML = 'target="_blank" href="index.php?option=com_meslek_std_taslak&task=indir&id=1&standart_id=' . $satir['STANDART_ID'] . '"';
} else {
$clickHTML = 'onclick="window.open(\'index.php?option=com_meslek_std_taslak&task=indir&id=1&standart_id=' . $satir['STANDART_ID'] . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
}
//$taslakUrl = generatePDFPathForYeterlilik($satir['YETERLILIK_ID']);
//$clickHTML = ' href="'.$taslakUrl.'"';
echo '<tr class="' . $rowClass . '">';
echo '<td>' . $rowCount . '</td>';
// echo '<td>'.$satir['STANDART_ID'].'</td>'; gerek yok
echo '<td>' . $satir['SEVIYE_ADI'] . '</td>';
echo '<td>' . FormFactory::toUpperCase($satir['STANDART_ADI']) . '</td>';
echo '<td>' . FormFactory::toUpperCase($satir['KURULUS_ADI']) . '</td>';
if (isset($satir['PROFIL_GOREV_ADI'])) {
echo '<td>' . $satir['PROFIL_GOREV_ADI'] . '</td>';
}
if ($isGorus) {
echo '<td><a href="index.php?option=com_meslek_std_taslak&view=gorus_bildir&standartId=' . $satir['STANDART_ID'] . '">Görüs Bildir</a></td>';
}
if ($isGorus) {
echo '<td><a ' . $clickHTML . ' rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png" /></a></td>';
}
echo '</tr>';
$rowCount++;
}
?>
</table>
</div>
<?php
}
?>
<br />
<a
href="index.php?option=com_meslek_std_taslak_ara<?php
echo $protokolStr;
echo $gorusStr;
echo $itemIdStrOrj;
?>
">Geri</a>
<?php
}
示例6: Stats_ParseUserAgent
function Stats_ParseUserAgent($ua_string)
{
$browser_name = array('op' => 'Opera', 'omni' => 'OmniWeb', 'ie' => 'Internet Explorer', 'konq' => 'Konqueror', 'saf' => 'Safari', 'moz' => 'Gecko', 'rv' => 'Mozilla', 'mozilla' => 'Mozilla', 'firebird' => 'Firebird', 'phoenix' => 'Phoenix', 'firefox' => 'Firefox', 'galeon' => 'Galeon', 'k-meleon' => 'K-Meleon', 'camino' => 'Camino', 'epiphany' => 'Epiphany', 'multizilla' => 'MultiZilla', 'ns' => 'Netscape', 'netscape6' => 'Netscape', 'netscape' => 'Netscape', 'lynx' => 'lynx', 'w3m' => 'w3m', 'amaya' => 'Amaya', 'dillo' => 'Dillo', 'ibrowse' => 'iBrowse', 'icab' => 'iCab');
$os_name = array('unixware' => 'UnixWare', 'solaris' => 'Solaris', 'sunos' => 'SunOS', 'sun4' => 'SunOS', 'sun5' => 'SunOS', 'suni86' => 'SunOS', 'sun' => 'SunOS', 'freebsd' => 'FreeBSD', 'openbsd' => 'OpenBSD', 'bsd' => 'BSD', 'irix5' => 'Irix', 'irix6' => 'Irix', 'irix' => 'Irix', 'hpux9' => 'HPUX', 'hpux10' => 'HPUX', 'hpux11' => 'HPUX', 'hpux' => 'HPUX', 'hp-ux' => 'HPUX', 'aix1' => 'AIX', 'aix2' => 'AIX', 'aix3' => 'AIX', 'aix4' => 'AIX', 'aix5' => 'AIX', 'aix' => 'AIX', 'sco' => 'SCO', 'mpras' => 'MPRAS', 'reliant' => 'Reliant', 'dec' => 'DEC', 'sinix' => 'Sinix', 'unix' => 'Unix', 'kanotix' => 'Kanotix', 'ubuntu' => 'Ubuntu', 'mepis' => 'Mepis', 'debian' => 'Debian', 'suse' => 'Suse', 'redhat' => 'RedHat', 'slackware' => 'Slackware', 'mandrake' => 'Mandrake', 'gentoo' => 'Gentoo', 'linux' => 'Linux', 'lin' => 'Linux', 'beos' => 'BeOS', 'os2' => 'OS2', 'amiga' => 'Amiga', 'webtv' => 'WebTV', 'mac' => 'Mac', 'nt' => 'Windows', 'win' => 'Windows', 'nt5.0' => 'Windows 2000', 'nt5.1' => 'Windows XP', 'nt5.2' => 'Windows Server 2003', 'nt5' => 'Windows 2000', 'nt4' => 'Windows NT', 'nt3' => 'Windows NT', 'nt6' => 'Windows Vista', 'nt6.0' => 'Windows Vista', 'nt6.1' => 'Windows 7', 'win5.0' => 'Windows 2000', 'win5.1' => 'Windows XP', 'win5.2' => 'Windows Server 2003', 'win4' => 'Windows NT', 'win3' => 'Windows NT', 'winme' => 'Windows ME', 'winCE' => 'Windows CE');
$user_agent = browser_detection("full", $ua_string);
$moz_version = browser_detection("moz_version", $ua_string);
$user_os = browser_detection("os", $ua_string);
$user_os_number = browser_detection("os_number", $ua_string);
$real_browser = $moz_version[0] ? $browser_name[$moz_version[0]] : $browser_name[$user_agent[0]];
if (!$real_browser) {
return array("", "");
}
$real_browser_ver = $moz_version[0] ? $moz_version[1] : $user_agent[1];
$ver = (double) $real_browser_ver;
$browser_info = $real_browser . ($ver ? " " . sprintf("%.1f", $ver) : $real_browser_ver);
$real_os = $os_name[$user_os . $user_os_number] ? $os_name[$user_os . $user_os_number] : $user_os . " " . $user_os_number;
return array(trim($browser_info), trim($real_os));
}
示例7: listele
function listele($sonuclar, $itemIdStrOrj)
{
if (empty($sonuclar)) {
echo '<div class="sonucBulunamadi">Uygun sonuç bulunamadı.</div>';
} else {
?>
<div class="tableWrapper">
<table cellspacing="0" class="paginate-10 sortable">
<tr class="tablo_header">
<th>#</th>
<th class="sortable-numeric">Yeterlilik Id</th>
<th class="sortable-text">Seviye</th>
<th class="sortable-text">Yeterlilik Adı</th>
<th class="sortable-text">Kuruluş Adı</th>
<th class="sortable-text">Görüş Bildir</th>
<th>PDF</th>
</tr>
<?php
$user_browser = browser_detection('browser');
$rowCount = 1;
$rowClass = "";
foreach ($sonuclar as $satir) {
if ($rowCount % 2 == 0) {
$rowClass = "even_row";
} else {
$rowClass = "odd_row";
}
if (strripos($user_browser, 'msie') !== FALSE) {
$clickHTML = 'target="_blank" href="index.php?option=com_yeterlilik_taslak&task=indir&id=1&yeterlilik_id=' . $satir['YETERLILIK_ID'] . '"';
} else {
$clickHTML = 'onclick="window.open(\'index.php?option=com_yeterlilik_taslak&task=indir&id=1&yeterlilik_id=' . $satir['YETERLILIK_ID'] . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
}
echo '<tr class="' . $rowClass . '">';
echo '<td>' . $rowCount . '</td>';
echo '<td>' . $satir['YETERLILIK_ID'] . '</td>';
echo '<td>' . $satir['SEVIYE_ADI'] . '</td>';
echo '<td>' . FormFactory::toUpperCase($satir['YETERLILIK_ADI']) . '</td>';
echo '<td>' . FormFactory::toUpperCase($satir['KURULUS_ADI']) . '</td>';
echo '<td><a href="index.php?option=com_yeterlilik_taslak&view=gorus_bildir&yeterlilikId=' . $satir['YETERLILIK_ID'] . '">Görüs Bildir</a></td>';
echo '<td><a ' . $clickHTML . ' rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png" /></a></td>';
echo '</tr>';
$rowCount++;
}
?>
</table>
</div>
<?php
}
?>
<br />
<a href="index.php?option=com_yeterlilik_taslak_ara<?php
echo $itemIdStrOrj;
?>
">Geri</a>
<?php
}
示例8: define
#
#
#
#
#
#
#
#
/*
* index.php :: Frames
*/
require "settings.php";
define("PRD_STATE_NOWARN", true);
#do the browser check
require "browser_detection.php";
if (browser_detection('browser') != "moz") {
print "\n\t\t\t<script>\n \t\t\t\twindow.open('browser_version.php','browser_version','height=160,width=430');\n\t\t\t</script>";
}
if (isset($_SESSION["USER_ID"])) {
#we cant use this with a print from the browser check...
//header("Location: index.xul.php");
#so rather redirect using some javascript
print "\n \t\t\t<script>\n \t\t\t\tdocument.location='index.xul.php';\n \t\t\t</script>";
exit;
}
// check to see if we should dock or undock the menu first, do so, and move on
if (isset($_GET["action"])) {
switch ($_GET["action"]) {
case "dock":
db_conn("cubit");
$rslt = db_exec("UPDATE users SET services_menu='T' ");
示例9: browser_detection
<?php
$browser = browser_detection('full');
$config = Zend_Registry::get('config');
define("BROWSER", $browser[0]);
define("BROWSER_VERSION", $browser[0]);
define('DOCUMENT_ROOT', $config->www->baseurl);
define('WWW_ROOT', $config->www->sitename);
define('IMAGES', WWW_ROOT . "public/images/");
define('CSS', WWW_ROOT . "css/");
define('JS', WWW_ROOT . "js/");
define('JSEXT', WWW_ROOT . "public/js/");
define('POST', $_SERVER['REQUEST_METHOD'] == 'POST');
define('MAX_ITEM_NAME_LENGTH', 16);
//For Mail
示例10: listele
function listele($sonuclar, $itemIdStrOrj, $user)
{
$aut = FormFactory::sektorSorumlusuMu($user);
if (empty($sonuclar)) {
echo '<div class="sonucBulunamadi">Başvuru bulunmamaktır.</div>';
} else {
?>
<div class="tableWrapper">
<table cellspacing="0" id="datatable">
<thead>
<tr class="tablo_header">
<th>#</th>
<th>Id</th>
<?php
if ($aut) {
?>
<th>Kuruluş Adı</th>
<?php
}
?>
<th>Başvuru Tipi</th>
<th>Başvuru Tarihi</th>
<th>Başvuru Durumu</th>
<?php
if ($aut) {
?>
<th>Başvuru Durum Güncelle</th>
<th>Başvuru Düzenle</th>
<?php
}
?>
<th>PDF</th>
</tr>
</thead>
<tbody>
<?php
$user_browser = browser_detection('browser');
$rowCount = 1;
$rowClass = "";
foreach ($sonuclar as $satir) {
$id = "";
$form = "";
$option = "";
$layout = "pdf";
$layout_ek = "ek_pdf";
if ($satir['BASVURU_TIP_ID'] == T1_BASVURU_TIP) {
$option = "com_meslek_std_basvur";
$form = T1_BASVURU_TIP;
} else {
if ($satir['BASVURU_TIP_ID'] == T2_BASVURU_TIP) {
$option = "com_yeterlilik_basvur";
$form = T2_BASVURU_TIP;
} else {
if ($satir['BASVURU_TIP_ID'] == T3_BASVURU_TIP) {
$option = "com_belgelendirme_basvur";
$layout = "pdf";
$form = T3_BASVURU_TIP;
} else {
if ($satir['BASVURU_TIP_ID'] == T4_BASVURU_TIP) {
$option = "com_akreditasyon_basvur";
$form = T4_BASVURU_TIP;
} else {
if ($satir['BASVURU_TIP_ID'] == YT1_BASVURU_TIP) {
$option = "com_meslek_std_taslak";
$form = YT1_BASVURU_TIP;
$id = "&standart_id=" . getStandartId($satir["EVRAK_ID"]);
$layout = "tum_basvuru";
//$layout2 = "ek_basvuru";
} else {
if ($satir['BASVURU_TIP_ID'] == YT2_BASVURU_TIP) {
$option = "com_yeterlilik_taslak";
$form = YT2_BASVURU_TIP;
$id = "&yeterlilik_id=" . getYeterlilikId($satir["EVRAK_ID"]);
}
}
}
}
}
}
if ($rowCount % 2 == 0) {
$rowClass = "even_row";
} else {
$rowClass = "odd_row";
}
if (strripos($user_browser, 'msie') !== FALSE) {
$clickHTML = 'target="_blank" href="index.php?option=' . $option . $id . '&layout=' . $layout . '&format=pdf&form=' . $form . '&id=' . $satir['EVRAK_ID'] . '"';
} else {
$clickHTML = 'onclick="window.open(\'index.php?option=' . $option . $id . '&layout=' . $layout . '&format=pdf&form=' . $form . '&id=' . $satir['EVRAK_ID'] . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
}
if (strripos($user_browser, 'msie') !== FALSE) {
$clickHTML2 = 'target="_blank" href="index.php?option=' . $option . $id . '&layout=' . $layout_ek . '&format=pdf&form=-5&id=' . $satir['EVRAK_ID'] . '"';
} else {
$clickHTML2 = 'onclick="window.open(\'index.php?option=' . $option . $id . '&layout=' . $layout_ek . '&format=pdf&form=-5&id=' . $satir['EVRAK_ID'] . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
}
if (strlen($satir['BASVURU_EK_DOSYASI_PATH']) == 0) {
$pdfLinkleri = '<td><table><tr><td>Tümü<a ' . $clickHTML . '><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png"></a></td></tr>
<tr><td>Ekler<a ' . $clickHTML2 . '><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png"></a></td></tr></table></td>';
//.........这里部分代码省略.........
示例11: modify
//.........这里部分代码省略.........
}
return $operatorValue = $color;
break;
case 'oc_shorten':
$search = array('@<script[^>]*?>.*?</script>@si', '@<style[^>]*?>.*?</style>@siU');
$operatorValue = preg_replace($search, '', $operatorValue);
$operatorValue = strip_tags($operatorValue, $namedParameters['allowable_tags']);
$operatorValue = preg_replace('!\\s+!', ' ', $operatorValue);
$operatorValue = str_replace(' ', ' ', $operatorValue);
$strlenFunc = function_exists('mb_strlen') ? 'mb_strlen' : 'strlen';
$operatorLength = $strlenFunc($operatorValue);
if ($operatorLength > $namedParameters['chars_to_keep']) {
if ($namedParameters['trim_type'] === 'middle') {
$appendedStrLen = $strlenFunc($namedParameters['str_to_append']);
if ($namedParameters['chars_to_keep'] > $appendedStrLen) {
$chop = $namedParameters['chars_to_keep'] - $appendedStrLen;
$middlePos = (int) ($chop / 2);
$leftPartLength = $middlePos;
$rightPartLength = $chop - $middlePos;
$operatorValue = trim($this->custom_substr($operatorValue, 0, $leftPartLength) . $namedParameters['str_to_append'] . $this->custom_substr($operatorValue, $operatorLength - $rightPartLength, $rightPartLength));
} else {
$operatorValue = $namedParameters['str_to_append'];
}
} else {
$chop = $namedParameters['chars_to_keep'] - $strlenFunc($namedParameters['str_to_append']);
$operatorValue = $this->custom_substr($operatorValue, 0, $chop);
$operatorValue = trim($operatorValue);
if ($operatorLength > $chop) {
$operatorValue = $operatorValue . $namedParameters['str_to_append'];
}
}
}
if ($namedParameters['allowable_tags'] !== '') {
$operatorValue = $this->force_balance_tags($operatorValue);
}
break;
case 'cookieset':
$key = isset($namedParameters['cookie_name']) ? $namedParameters['cookie_name'] : false;
$prefix = $ini->variable('CookiesSettings', 'CookieKeyPrefix');
$key = "{$prefix}{$key}";
// Get our parameters:
$value = $namedParameters['cookie_val'];
$expire = $namedParameters['expiry_time'];
// Check and calculate the expiry time:
if ($expire > 0) {
// It is a number of days:
$expire = time() + 60 * 60 * 24 * $expire;
}
setcookie($key, $value, $expire, '/');
eZDebug::writeDebug('setcookie(' . $key . ', ' . $value . ', ' . $expire . ', "/")', __METHOD__);
return $operatorValue = false;
break;
case 'cookieget':
$key = isset($namedParameters['cookie_name']) ? $namedParameters['cookie_name'] : false;
$prefix = $ini->variable('CookiesSettings', 'CookieKeyPrefix');
$key = "{$prefix}{$key}";
$operatorValue = false;
if (isset($_COOKIE[$key])) {
$operatorValue = $_COOKIE[$key];
}
return $operatorValue;
break;
case 'check_and_set_cookies':
$prefix = $ini->variable('CookiesSettings', 'CookieKeyPrefix');
$http = eZHTTPTool::instance();
$return = array();
if ($ini->hasVariable('Cookies', 'Cookies')) {
$cookies = $ini->variable('Cookies', 'Cookies');
foreach ($cookies as $key) {
$_key = "{$prefix}{$key}";
$default = isset($_COOKIE[$_key]) ? $_COOKIE[$_key] : $ini->variable($key, 'Default');
$value = $http->variable($key, $default);
setcookie($_key, $value, time() + 60 * 60 * 24 * 365, '/');
$return[$key] = $value;
}
}
$operatorValue = $return;
break;
case 'checkbrowser':
@(require 'extension/ocoperatorscollection/lib/browser_detection.php');
if (function_exists('browser_detection')) {
$full = browser_detection('full_assoc', 2);
$operatorValue = $full;
} else {
eZDebug::writeError("function browser_detection not found", __METHOD__);
}
break;
case 'is_deprecated_browser':
$browser = $namedParameters['browser_array'];
if ($browser['browser_working'] == 'ie' && $browser['browser_number'] > '7.0') {
$operatorValue = true;
}
$operatorValue = false;
break;
case 'slugize':
$operatorValue = $this->sanitize_title_with_dashes($operatorValue);
break;
}
return false;
}
示例12: page
function page()
{
$page = CurrentPageName();
unset($_SESSION["ProxyCategoriesPermissions"]);
$ie = browser_detection();
if ($ie == "ie") {
$tpl = new template_users("Fatal error", FATAL_ERROR_SHOW_128("{NOIEPLEASE_TEXT}"), $_SESSION, 0, 0, 0);
$html = $tpl->web_page;
echo $html;
return;
}
$title = "{categories}";
$html = "\n\t<div id='public_categories_div'></div>\n\t<script>\n\t\t{$alert}\n\t\tLoadAjax('public_categories_div','{$page}?tabs=yes');\n\t</script>";
$tpl = new template_users($title, $html, $_SESSION, 0, 0, 0);
$html = $tpl->web_page;
echo $html;
return;
}
示例13: dispSVG
function dispSVG($resource, $alt = NULL, $width = NULL, $height = NULL, $id = NULL, $class = NULL, $return = false)
{
require_once 'modular/browser.inc';
//object width
$ostyle = " ";
if (is_numeric($width)) {
$ostyle .= "width='{$width}" . "px'";
}
if (is_numeric($height)) {
$ostyle .= " height='{$height}" . "px'";
}
//CSS width
$cstyle = is_numeric($width) || is_numeric($height) ? " style='" : "";
if (is_numeric($width)) {
$cstyle .= "width:{$width}" . "px;";
}
if (is_numeric($height)) {
$cstyle .= "height:{$height}" . "px;";
}
if ($cstyle != "") {
$cstyle .= "' ";
}
//identifiers
if ($id != NULL) {
$ido = "id='{$id}'";
}
if ($class != NULL) {
$classo = "class='{$class}'";
}
// Check directory for gzip-svg.php
$subdir = dirname($resource);
if (file_exists($subdir . "/gzip-svg.php")) {
$resource_old = $resource;
$resource = $subdir . "/gzip-svg.php?name=" . basename($resource);
} else {
$resource_old = $resource;
}
// Detect browsers. IE falls back to Google's code, and FireFox falls back to <object> implementation.
if (browser_detection('browser') == 'moz' && browser_detection('number') < 17) {
$out = "<object data='{$resource}' type='image/svg+xml' {$ostyle} {$ido} {$classo}>\n{$alt}\n</object>";
if (!$return) {
echo $out;
return true;
} else {
return $out;
}
}
if (browser_detection('browser') == 'ie') {
if (browser_detection('number') < 9) {
// Check for a png
$pngfile = substr($resource_old, 0, -4) . ".png";
if (file_exists($pngfile)) {
// With a png, display that rather than call resource overhead for Flash display
$out = "<img src='{$pngfile}' alt='{$alt}' {$cstyle} {$ido} {$classo}/>";
if (!$return) {
echo $out;
return true;
} else {
return $out;
}
} else {
// Fallback to Flash SVG display.
if (!is_numeric($width)) {
$ostyle .= " width='100px'";
// IE requires a width and height. If not specified, default to 100x100.
$width = 100;
}
if (!is_numeric($height)) {
$ostyle .= " height='{$width}" . "px'";
}
$out = "<object data='{$resource}' type='image/svg+xml' {$ostyle} {$ido} {$classo}>";
if (browser_detection('number') >= 8) {
$out .= $alt;
}
$out .= "</object>";
if (!$return) {
echo $out;
return true;
} else {
return $out;
}
}
} else {
$out = "<img src='{$resource}' alt='{$alt}' {$cstyle} {$ido} {$classo}/>";
if (!$return) {
echo $out;
return true;
} else {
return $out;
}
}
} else {
$out = "<img src='{$resource}' alt='{$alt}' {$cstyle} {$ido} {$classo}/>";
if (!$return) {
echo $out;
return true;
} else {
return $out;
}
}
//.........这里部分代码省略.........
示例14: buildPage
function buildPage()
{
if ($GLOBALS["VERBOSE"]) {
echo "<H1>buildPage() function line " . __LINE__ . "</H1>";
}
include_once 'ressources/class.templates.inc';
include_once 'ressources/class.ldap.inc';
include_once 'ressources/class.user.inc';
include_once 'ressources/class.langages.inc';
include_once 'ressources/class.sockets.inc';
include_once 'ressources/class.mysql.inc';
include_once 'ressources/class.privileges.inc';
include_once 'ressources/class.browser.detection.inc';
include_once dirname(__FILE__) . "/ressources/class.langages.inc";
$page = CurrentPageName();
$users = new usersMenus();
$sock = new sockets();
unset($_SESSION);
unset($_COOKIE["artica-template"]);
$sslcert = null;
$GLOBALS["DEBUG_TEMPLATE"] = true;
if ($GLOBALS["VERBOSE"]) {
echo "<H1>articaLang() function line " . __LINE__ . "</H1>";
}
$langAutodetect = new articaLang();
$DetectedLanguage = $langAutodetect->get_languages();
if ($GLOBALS["VERBOSE"]) {
echo "<H1>DetectedLanguage = {$DetectedLanguage} line " . __LINE__ . "</H1>";
}
$GLOBALS["FIXED_LANGUAGE"] = $DetectedLanguage;
$TEMPLATE_INDEX = "logon.html";
if (!isset($GLOBALS["FixedLanguage"])) {
$GLOBALS["FixedLanguage"] = $sock->GET_INFO("FixedLanguage");
}
$ie = browser_detection();
if ($ie == "ie") {
FATAL_ERROR_SHOW_128_NO_IE();
return;
}
$logo = "logo.gif";
$logo_bg = "bg_header.gif";
$bg_color = "#005447";
$ProductName = "Artica";
$link_company_name = "http://www.articatech.com";
$OEM_CompanyName = "Artica Tech";
$template = null;
$MikrotikTransparent = intval($sock->GET_INFO('MikrotikTransparent'));
$SquidActHasReverse = $sock->GET_INFO("SquidActHasReverse");
$AsSquidLoadBalancer = $sock->GET_INFO("AsSquidLoadBalancer");
$SSlBumpAllowLogon = intval($sock->GET_INFO("SSlBumpAllowLogon"));
if (!is_numeric($SquidActHasReverse)) {
$SquidActHasReverse = 0;
}
if (!is_numeric($AsSquidLoadBalancer)) {
$AsSquidLoadBalancer = 0;
}
$LOCK_TEMPLATE = false;
$AsCategoriesAppliance = intval($sock->GET_INFO("AsCategoriesAppliance"));
$AsMetaServer = intval($sock->GET_INFO("AsMetaServer"));
$EnableNginx = intval($sock->GET_INFO("EnableNginx"));
$SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
if (!is_numeric($SQUIDEnable)) {
$SQUIDEnable = 1;
}
if ($SQUIDEnable == 0) {
if ($EnableNginx == 1) {
$SquidActHasReverse = 1;
}
}
$hostname = $sock->GET_INFO("myhostname");
if ($hostname == null) {
$hostname = $sock->getFrameWork("system.php?hostname-g=yes");
$sock->SET_INFO($hostname, "myhostname");
}
if ($hostname == null) {
$hostname = $users->hostname;
}
if ($GLOBALS["VERBOSE"]) {
echo "new templates() line:" . __LINE__ . "<br>\n";
}
$tpl2 = new templates();
if ($users->KASPERSKY_WEB_APPLIANCE) {
if ($GLOBALS["VERBOSE"]) {
echo "<div style='background-color:white;color:black'>" . __LINE__ . ": KASPERSKY_WEB_APPLIANCE DETECTED</div>\n";
}
$template = "Kav4Proxy";
$logo = "logo-kav.gif";
}
if ($users->ZARAFA_APPLIANCE) {
$template = "zarafa";
$logo = "logo-kav.gif";
}
if ($users->MYCOSI_APPLIANCE) {
$logo_bg = "bg_header_kavweb.gif";
$logo = "logo-mycosi.gif";
$bg_color = "#FFB683";
$ProductName = "MyCosi";
$template = "myCosi";
}
if ($users->APACHE_APPLIANCE) {
//.........这里部分代码省略.........
示例15: bilgiListele
function bilgiListele($sonuclar, $userId, $itemIdStrOrj)
{
if (empty($sonuclar)) {
echo '<div class="sonucBulunamadi">Uygun sonuç bulunamadı.</div>';
echo '<br /><a href="index.php?option=com_yetkilendirilmis_kurulus_ara' . $itemIdStrOrj . '">Geri</a>';
} else {
$user =& JFactory::getUser();
$aut = checkAuthorizationForDurum($user, $userId);
?>
<div class="tableWrapper">
<table cellspacing="0" class="paginate-10 sortable">
<tr class="tablo_header">
<th>#</th>
<?php
if (isset($sonuclar[0]['YETERLILIK_ADI'])) {
echo '<th class="sortable-text">Hazırlamakta Olduğu Yeterlilik</th>';
}
if (isset($sonuclar[0]['STANDART_ADI'])) {
echo '<th class="sortable-text">Hazırlamakta Olduğu Standart</th>';
}
?>
<th class="sortable-text">Seviye</th>
<th class="sortable-text">Sektör</th>
<?php
if ($aut) {
?>
<th class="sortable-text">Durum</th>
<th class="sortable-text">PDF</th>
<?php
}
?>
</tr>
<?php
$rowCount = 1;
$rowClass = "";
$user_browser = browser_detection('browser');
foreach ($sonuclar as $satir) {
if ($rowCount % 2 == 0) {
$rowClass = "even_row";
} else {
$rowClass = "odd_row";
}
echo '<tr class="' . $rowClass . '">';
echo '<td>' . $rowCount . '</td>';
if (isset($satir['YETERLILIK_ADI'])) {
if ($aut) {
echo '<td><a href="index.php?option=com_yeterlilik_taslak&layout=tanitim&id=' . $satir['EVRAK_ID'] . '&yeterlilik_id=' . $satir['YETERLILIK_ID'] . '">' . $satir['YETERLILIK_ADI'] . '</a></td>';
} else {
echo '<td>' . $satir['YETERLILIK_ADI'] . '</td>';
}
if (strripos($user_browser, 'msie') !== FALSE) {
$clickHTML = 'target="_blank" href="index.php?option=com_yeterlilik_taslak&layout=tanitim&format=pdf&form=5&id=' . $satir['EVRAK_ID'] . '&yeterlilik_id=' . $satir['YETERLILIK_ID'] . '"';
} else {
$clickHTML = 'onclick="window.open(\'index.php?option=com_yeterlilik_taslak&layout=tanitim&format=pdf&form=5&id=' . $satir['EVRAK_ID'] . '&yeterlilik_id=' . $satir['YETERLILIK_ID'] . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
}
}
if (isset($satir['STANDART_ADI'])) {
if ($aut) {
echo '<td><a href="index.php?option=com_meslek_std_taslak&layout=terim&id=' . $satir['EVRAK_ID'] . '&standart_id=' . $satir['STANDART_ID'] . '">' . $satir['STANDART_ADI'] . '</a></td>';
} else {
echo '<td>' . $satir['STANDART_ADI'] . '</td>';
}
if (strripos($user_browser, 'msie') !== FALSE) {
$clickHTML = 'target="_blank" href="index.php?option=com_meslek_std_taslak&layout=terim&format=pdf&form=5&id=' . $satir['EVRAK_ID'] . '&standart_id=' . $satir['STANDART_ID'] . '"';
} else {
$clickHTML = 'onclick="window.open(\'index.php?option=com_meslek_std_taslak&layout=terim&format=pdf&form=5&id=' . $satir['EVRAK_ID'] . '&standart_id=' . $satir['STANDART_ID'] . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
}
}
echo '<td>' . $satir['SEVIYE_ADI'] . '</td>';
echo '<td>' . $satir['SEKTOR_ADI'] . '</td>';
if (isset($satir['YETERLILIK_ADI']) && $aut) {
echo '<td>' . $satir['YETERLILIK_SUREC_DURUM_ADI'] . '</td>';
echo '<td><a ' . $clickHTML . ' rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png"></a></td>';
}
if (isset($satir['STANDART_ADI']) && $aut) {
echo '<td>' . $satir['STANDART_SUREC_DURUM_ADI'] . '</td>';
echo '<td><a ' . $clickHTML . ' rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png"></a></td>';
}
echo '</tr>';
$rowCount++;
}
?>
</table>
</div>
<br />
<a href="index.php?option=com_yetkilendirilmis_kurulus_ara<?php
echo $itemIdStrOrj;
?>
">Geri</a>
<?php
}
}