当前位置: 首页>>代码示例>>PHP>>正文


PHP getBrowser函数代码示例

本文整理汇总了PHP中getBrowser函数的典型用法代码示例。如果您正苦于以下问题:PHP getBrowser函数的具体用法?PHP getBrowser怎么用?PHP getBrowser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getBrowser函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addMapView

 function addMapView($ip, $mapId, $mapName, $createdBy_id)
 {
     $details = (array) json_decode(file_get_contents("http://ipinfo.io/{$ip}/json"));
     $hostname = "";
     $city = "";
     $region = "";
     $country = "";
     $org = "";
     $postal = "";
     $phone = "";
     $loc = "0,0";
     if ($details['hostname']) {
         $hostname = $details['hostname'];
         $city = $details['city'];
         $region = $details['region'];
         $country = $details['country'];
         $org = $details['org'];
         $postal = $details['postal'];
         $phone = $details['phone'];
         $loc = $details['loc'];
     }
     $browser = getBrowser();
     $browser_name = $browser['name'];
     $browser_version = $browser['version'];
     $os = $browser['platform'];
     $user = getUserInfo($createdBy_id);
     $browser = $_SERVER['HTTP_USER_AGENT'];
     $res = pg_query($this->stats_db, "INSERT INTO statistics_maps_view (ip, maps_id, maps_name, apikey, hostname, city, region, country, loc, org, postal, phone, referer_url, browser_name, browser_version, os) \n\t\t\tVALUES('" . $ip . "', " . (int) $mapId . ", '" . pg_escape_string($map_name) . "', '" . pg_escape_string($user['apikey']) . "', '" . pg_escape_string($hostname) . "', '" . pg_escape_string($city) . "', '" . pg_escape_string($region) . "', '" . pg_escape_string($country) . "', '" . pg_escape_string($loc) . "', '" . pg_escape_string($org) . "', '" . pg_escape_string($postal) . "', '" . pg_escape_string($phone) . "', '" . pg_escape_string($_SERVER['HTTP_REFERER']) . "', '" . pg_escape_string($browser_name) . "', '" . pg_escape_string($browser_version) . "', '" . pg_escape_string($os) . "'); SELECT currval(pg_get_serial_sequence('statistics_maps_view','id')) as last_insert_id;") or die(pg_last_error());
     if ($d = pg_fetch_assoc($res)) {
         $id = $d['last_insert_id'];
     }
     return $id;
 }
开发者ID:MapFig,项目名称:mapfig-studio,代码行数:33,代码来源:statistics.class.php

示例2: get_downloadButton

function get_downloadButton()
{
    $version_number = get_field('version', 'option');
    $version_name = get_field('version_name', 'option');
    $version_date = get_field('version_date', 'option');
    $titleMac = '<a><b>Mac - Ultraschall Download</a></b> <br>
              <center>V.' . $version_number . ' - ' . $version_date . ' (' . $version_name . ')</center>';
    $titleWin = '<a>Windows - Ultraschall Download</a> <br>
              <center>V.' . $version_number . ' - ' . $version_date . ' (' . $version_name . ')</center>';
    // now try it
    $ua = getBrowser();
    $browserType = $ua['platform'];
    if ($browserType == "mac") {
        $type = 'apple';
        $hrefAttr = get_field('mac_url', 'option');
        $titleAttr = $titleMac;
    } elseif ($browserType == "win") {
        $type = 'windows';
        $hrefAttr = get_field('win_url', 'option');
        $titleAttr = $titleWin;
    } elseif ($browserType == "linux") {
        $type = 'windows';
        $hrefAttr = get_field('win_url', 'option');
        $titleAttr = $titleWin;
    } else {
        $type = 'apple';
        $hrefAttr = get_field('mac_url', 'option');
        $titleAttr = $titleMac;
    }
    echo '<a title="' . $titleAttr . '"
            class="uk-button uk-button-success" href="' . $hrefAttr . '" data-uk-tooltip="{pos:\'bottom\'}" >';
    echo 'Download ( <i class="uk-icon-' . $type . '"></i> ' . $version_number . ' )';
    echo '</a>';
}
开发者ID:McCouman,项目名称:ultraschall-plugin,代码行数:34,代码来源:user-agent.php

示例3: script_header

 function script_header()
 {
     $this->_header->addJavaScript('/scripts/elementSwapper.js', 'element_swap_library');
     #$script = '<script type="text/javascript" src = "/scripts/elementSwapper.js"></script>'."\n";
     #$script .= '<script type = "text/javascript">'."\n";
     $script = '';
     foreach ($this->swappers as $swapper_name => $swapper_set) {
         $script .= 'function loadSwapper_' . $swapper_name . '() {' . "\n" . 'window.' . $swapper_name . ' = new ElementSwapper("' . $this->getFormName($swapper_name) . "\");\n" . $swapper_name . ".visibleStyle = \"" . (getBrowser() == "win/ie" ? "inline" : "table-row") . "\";\n";
         foreach ($swapper_set as $setkey => $fieldset) {
             $script .= $swapper_name . ".addSwapSet( '{$setkey}' );\n";
             foreach ($fieldset as $fieldkey => $fDef) {
                 if (is_string($fDef)) {
                     $fieldname = $fDef;
                 }
                 if (!is_numeric($fieldkey)) {
                     $fieldname = $fieldkey;
                 }
                 $script .= $swapper_name . ".addSwapElement( '{$fieldname}', '{$setkey}' );\n";
             }
         }
         $script .= $this->js_ActivateInitial($swapper_name) . "} \n";
         $this->_header->addJavascriptOnLoad("loadSwapper_" . $swapper_name . "();");
     }
     #$script .= "</script>";
     $this->_header->addJavascriptDynamic($script, 'element_swap_dynamic');
     return false;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:27,代码来源:ElementSwapScript.inc.php

示例4: process

function process($data)
{
    $data = json_decode($data, true);
    if ($data['csp-report']) {
        $data = $data['csp-report'];
        if (isset($data["document-uri"])) {
            $parsed_url = parse_url($data["document-uri"]);
            $parsed_url = array_merge(array("host" => "", "path" => "", "query" => ""), $parsed_url);
        } else {
            return;
        }
        $violated = explode(" ", $data["violated-directive"]);
        if (sizeof($violated) > 0) {
            $violated = $violated[0];
        } else {
            $violated = '';
        }
        $browser = getBrowser();
        if ($browser) {
            $browser = $browser['name'] . ", " . $browser['version'] . ", " . $browser['platform'];
        }
        $data = array_merge(array("document-uri" => "", "referrer" => "", "blocked-uri" => "", "violated-directive" => "", "original-policy" => "", "source-file" => "", "script-sample" => "", "line-number" => ""), $data);
        DB::add($parsed_url["host"], $parsed_url["path"], $parsed_url["query"], $data["document-uri"], $data["referrer"], $data["blocked-uri"], $violated, $data["violated-directive"], $data["original-policy"], $data["source-file"], $data["script-sample"], $data["line-number"], $browser);
    }
}
开发者ID:beejhuff,项目名称:csp-report,代码行数:25,代码来源:report.php

示例5: get_ip_location

 function get_ip_location($ipaddress)
 {
     $location['browser'] = getBrowser();
     $location['countrycode'] = '';
     $location['country'] = '';
     $location['zipcode'] = '';
     $location['city'] = '';
     $location['region'] = '';
     $location['isp'] = '';
     $location['latitude'] = '';
     $location['longitude'] = '';
     #TODO: Upgrade IP address locator to be independent using:
     #http://pecl.php.net/package/geoip
     #http://www.maxmind.com/app/php
     #>>>http://ipinfodb.com/ip_location_api.php
     #Requires azziwa's API key with ipinfodb.com
     $this->iplocator->setKey('a0eb7ac4688fbf30a813868ddcbccb74106c43a54b192e5d30be0740a94e144d');
     //Get errors and locations
     $dlocation = $this->iplocator->getCity($ipaddress);
     $errors = $this->iplocator->getError();
     #Use backup server if cannot make a connection
     #stripos(BASE_URL, '/localhost') === FALSE &&
     if (!empty($dlocation)) {
         $location['countrycode'] = $dlocation['countryCode'];
         $location['country'] = $dlocation['countryName'];
         $location['zipcode'] = $dlocation['zipCode'];
         $location['city'] = $dlocation['cityName'];
         $location['region'] = $dlocation['regionName'];
         $location['isp'] = $dlocation['ipAddress'];
         $location['latitude'] = $dlocation['latitude'];
         $location['longitude'] = $dlocation['longitude'];
     }
     return $location;
 }
开发者ID:nwtug,项目名称:academia,代码行数:34,代码来源:users.php

示例6: __construct

 public function __construct()
 {
     $guest['user'] = array('id' => 0, 'username' => 'Guest', 'theme' => $this->config('site', 'theme'), 'timezone' => isset($_SESSION['user']) ? doArgs('timezone', $this->config('time', 'timezone'), $_SESSION['user']) : $this->config('time', 'timezone'), 'userkey' => doArgs('userkey', null, $_SESSION['user']));
     // Get the Page Object
     $objPage = Core_Classes_coreObj::getPage();
     self::addConfig(array('global' => array('user' => isset($_SESSION['user']['id']) ? $_SESSION['user'] : $guest['user'], 'ip' => Core_Classes_User::getIP(), 'useragent' => doArgs('HTTP_USER_AGENT', null, $_SERVER), 'browser' => getBrowser($_SERVER['HTTP_USER_AGENT']), 'platform' => $objPage->getCSSSelectors($_SERVER['HTTP_USER_AGENT']), 'language' => 'en', 'secure' => isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === true ? true : false, 'referer' => doArgs('HTTP_REFERER', null, $_SERVER), 'realPath' => realpath('') . '/', 'rootPath' => '/' . root(), 'fullPath' => $_SERVER['REQUEST_URI'], 'rootUrl' => (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === true ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/' . root(), 'url' => (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === true ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])), 'user');
     $user = $this->config('global', 'user');
     $this->setIsOnline(!($user['id'] == 0 ? true : false));
     $this->initPerms();
 }
开发者ID:richard-clifford,项目名称:CSCMS,代码行数:10,代码来源:class.user.php

示例7: loadEveryTime

 public static function loadEveryTime($RemoveSUBURL = false)
 {
     $ua = \getBrowser();
     $SKT_Header = \CmsDev\Header\Make::instance();
     $loadEveryTimeVars = '' . 'var SKTServerURL = "' . \SERVER_DIR . \SUBSITE . '";' . 'var SKTImageSized = "' . \SERVER_DIR . \SUBSITE . 'SKTSize/";' . 'var SKTGoTo = "' . \SERVER_DIR . \SUBSITE . 'SKTGoTo/";' . 'var SKTURL_BASE = "' . \SKTURL_BASE . '";' . 'var URL_VERSION = "' . \URL_VERSION . '";' . 'var SKT_VERSION = "' . \SKT_VERSION . '";' . 'var SKTURL_TemplateSite = "' . \SKTURL_TemplateSite . '";' . 'var SUBURL = "' . \SUBURL . '";' . 'var ASSETS = "' . \ASSETS . '"; ' . 'var SUBSITE = "' . \SUBSITE . '";' . 'var SKT_SECTION_ID = "' . \SKT_SECTION_ID . '";' . 'var Language = "' . \THIS_LANG . '";' . 'var LanguageFromFile = "' . \LanguageFromFile . '";' . 'var SKTURL_REQUEST_URI = "' . addslashes(\SKTURL_REQUEST_URI) . '";' . 'var SKTURL_REQUEST_PARAMS = "' . \SKTURL_REQUEST_PARAMS . '";' . 'var SKTURL_Here = "' . addslashes(\SKTURL_Here) . '";' . 'var SKT_TEMPLATE = "' . addslashes(\SKT_TEMPLATE) . '";' . 'var SKTPATH = "' . addslashes(\SKTPATH) . '";' . 'var SKTPATH_CmsDev = "' . addslashes(\SKTPATH_CmsDev) . '";' . 'var SKTPATH_FileSystems = "' . addslashes(\SKTPATH_FileSystems) . '";' . 'var SKTPATH_TemplateSite = "' . addslashes(\SKTPATH_TemplateSite) . '";' . 'var SKTURL = "' . \SKTURL . '";' . 'var TOTAL_REQUEST = "' . \TOTAL_REQUEST . '";' . 'var TOTAL_REQUEST = "' . \TOTAL_REQUEST . '";' . 'var TOTAL_REQUEST = "' . \TOTAL_REQUEST . '";' . 'var SERVER_DIR = "' . \SERVER_DIR . '";' . 'var SKT_BROWSER = "' . $ua['name'] . '";' . 'var EditorLayoutsBox = "' . addslashes(\EditorLayoutsBox) . '";' . 'var URL_docCSSFile = "' . \SKTURL_TemplateSite . '/EditorStyles.css";' . 'var SKT_ADMIN_Message_Update_OK = "' . \SKT_ADMIN_Message_Update_OK . '";' . 'var SKT_ADMIN_Message_Update_Error = "' . \SKT_ADMIN_Message_Update_Error . '";' . 'var SKT_ADMIN_Message_Validating = "' . \SKT_ADMIN_Message_Validating . '"; ' . 'var SKT_ADMIN_Message_Delete_Image = "' . \SKT_ADMIN_Message_Delete_Image . '";' . 'var SKT_ADMIN_Message_Upload_Image = "' . \SKT_ADMIN_Message_Upload_Image . '";' . 'var Msg_RefreshIn = "' . \SKT_ADMIN_Reloading . '";' . 'var SKT_ADMIN_Btn_Delete = "' . \SKT_ADMIN_Btn_Delete . '";' . 'var SKT_ADMIN_Btn_RestartCancel = "' . \SKT_ADMIN_Btn_RestartCancel . '";' . 'var SKT_ADMIN_Btn_Acept = "' . \SKT_ADMIN_Btn_Acept . '"; ' . 'var SKT_ADMIN_Btn_Create = "' . \SKT_ADMIN_Btn_Create . '"; ' . 'var SKT_ADMIN_Btn_Save = "' . \SKT_ADMIN_Btn_Save . '";' . 'var SKT_ADMIN_Btn_Edit = "' . \SKT_ADMIN_Btn_Edit . '";' . 'var SKT_ADMIN_Btn_Activate = "' . \SKT_ADMIN_Btn_Activate . '";' . 'var URL_CheckURLName = "' . \URL_CheckURLName . '";' . 'var ExtraColorsEditor = SKT_EDITOR_COLORS = "' . \SKT_EDITOR_COLORS . '";' . 'var ExtraFontEditor = SKT_EDITOR_FONTS = "' . \SKT_EDITOR_FONTS . '";' . 'var EditorLayoutsBox = "' . addslashes(\EditorLayoutsBox) . '";' . 'var SKT_EDITOR_BODY = SKT_EDITOR_BODY = "' . \SKT_EDITOR_BODY . '";' . \GoToURLJS . ';';
     $appPack = new \CmsDev\JavaScriptPacker($loadEveryTimeVars);
     $SKT_Header->addCss(\ASSETS . 'css/skt.let.styles.combined.php');
     $SKT_Header->addScript(\ASSETS . 'js/jquery.js', 'text/javascript', true, 'jquery');
     $SKT_Header->addScript(\ASSETS . 'js/jquery-ui.min.js', 'text/javascript', true, 'jquery-ui');
     $SKT_Header->custom('<script type="text/javascript">' . $appPack->pack() . '</script>', true, 'loadEveryTime css + vars');
     $SKT_Header->addScript(\ASSETS . 'skt.let.script.combined.php', 'text/javascript', false, 'bootstrap, bootstrap-switch, bootstrap-select,' . 'jquery.cookie, scrollspy, store, jquery.tmpl, jquery.tmplPlus,' . 'prettyPhoto, easytabs, cleditor, resizableColumns, classie, gnmenu,' . 'highlight, slidebars, easyTooltip');
 }
开发者ID:neruruguay,项目名称:neru,代码行数:12,代码来源:LoadHeader.php

示例8: logEntry

 public function logEntry($id)
 {
     $browser_info = getBrowser();
     $model = new Log;
     $model->user_id = $id;
     $model->ip_address = $_SERVER['REMOTE_ADDR'];
     $model->browser = $browser_info['name']; 
     $model->platform = $browser_info['platform']; 
     $model->os = $browser_info['platform'];
     $model->user_agent = $browser_info['userAgent'];
     $model->save();
 }        
开发者ID:priyranjansingh,项目名称:donation,代码行数:12,代码来源:DefaultController.php

示例9: geraXLS

function geraXLS($exibir, $criterios)
{
    $campos = "cred.*, c.nome, reg.desc_regional, c.cod_grupo";
    $tabela = "credenciados cred INNER JOIN consultor c ON (c.cod_consultor = cred.cod_consultor) " . "INNER JOIN regional reg ON (reg.cod_regional = cred.cod_regional)";
    $query = "SELECT " . $campos . " FROM " . $tabela . " WHERE " . $criterios . " ORDER BY c.cod_grupo, c.nome, cred.cod_regional, cred.desc_empresa";
    $resultado = mysql_query($query);
    // Nome do arquivo que será exportado
    $arquivo = 'lista_empresas.xls';
    //Constroi o HTML
    $html = '<style>td{font-size:12px;text-align:center;white-space:nowrap;} ' . 'table{border:1px black solid; width:100%} ' . 'td.head{background-color:#cc6;font-weight:bold} ' . 'td{padding:2px} ' . 'tr{background-color:#fff} ' . '</style>';
    $html .= '<table>';
    $html .= '<tr>';
    $html .= '<td class="head">#</td>';
    $html .= '<td class="head">GESTOR</td>';
    $html .= '<td class="head">CONSULTOR</td>';
    $html .= '<td class="head">PDV</td>';
    $html .= '<td class="head">EMPRESA</td>';
    $html .= '<td class="head">REGIONAL</td>';
    $html .= '<td class="head">PERIODICIDADE</td>';
    $html .= '</tr>';
    $contador = 1;
    while ($coluna = mysql_fetch_array($resultado)) {
        $html .= '<tr onMouseOver="this.style.backgroundColor=\'#ff0\';this.style.cursor=\'pointer\';" onMouseOut="this.style.backgroundColor=\'#fff\';" ' . 'onClick="window.open(\'edita_credenciado.php?cod_tipo_empresa=' . $coluna['cod_tipo_empresa'] . '&nome=' . $coluna['nome'] . '&pdv_empresa=' . $coluna['pdv_empresa'] . '&desc_empresa=' . $coluna['desc_empresa'] . '&desc_regional=' . $coluna['desc_regional'] . '&periodicidade=' . $coluna['periodicidade'] . '&nvl=' . $_SESSION['nivel_acesso'] . '\',\'_blank\',\'fullscreen=no,toolbar=no,scrollbars=no,resizable=no,location=no,top=\'+((screen.height/2)-150)+\',left=\'+((screen.width/2)-175)+\',width=350,height=' . ($coluna['cod_tipo_empresa'] == 2 ? $_SESSION['nivel_acesso'] < 3 ? 380 : 200 : 200) . '\')">';
        $html .= '<td>' . $contador++ . '</td>';
        $html .= '<td>' . buscaCampo("nome", "SELECT", "consultor c INNER JOIN grupo grp ON (grp.cod_consultor = c.cod_consultor)", "c.nome", "grp.cod_grupo = " . (int) $coluna['cod_grupo']) . '</td>';
        $html .= '<td>' . $coluna['nome'] . '</td>';
        $html .= '<td>' . $coluna['pdv_empresa'] . '</td>';
        $html .= '<td>' . $coluna['desc_empresa'] . '</td>';
        $html .= '<td>' . $coluna['desc_regional'] . '</td>';
        $html .= '<td>' . $coluna['periodicidade'] . '</td>';
        $html .= '</tr>';
    }
    $html .= '</table>';
    //Acesso ao BD - FIM
    if (!$exibir) {
        // Configurações header para forçar o download
        header("Content-type: application/x-msexcel");
        header("Content-Disposition: attachment; filename=\"{$arquivo}\"");
        header("Pragma: no-cache");
        header("Expires: 0");
        header("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");
        header("Cache-Control: no-cache, must-revalidate");
        header("Content-Description: PHP Generated Data");
        // Detecta o Browser e Plataforma e Envia o conteúdo do arquivo no formato correto
        $ua = getBrowser();
        echo $ua['platform'] == 'windows' ? utf8_decode($html) : $html;
    } else {
        echo "<center>";
        echo $html;
        echo "</center>";
    }
}
开发者ID:engcampo,项目名称:engcampo,代码行数:52,代码来源:lista_empresas.php

示例10: onBeforeWrite

 public function onBeforeWrite()
 {
     parent::onBeforeWrite();
     $browser = getBrowser();
     $this->UserAgent = $browser['user_agent'];
     $this->Browser = $browser['name'];
     $this->BrowserVersion = $browser['version'];
     $this->Platform = $browser['platform'];
     $this->ViewDay = date('d');
     $this->ViewDayName = date('l');
     $this->ViewMonth = date('F');
     $this->ViewYear = date('Y');
 }
开发者ID:rodneyway,项目名称:silverstripe-advancedreports,代码行数:13,代码来源:PageView.php

示例11: indeed_job_sync

 public function indeed_job_sync($search_str)
 {
     $publisher = $this->get_publisher_id();
     if (function_exists('getBrowser')) {
         $useragent = getBrowser();
         $useragent = $useragent['name'];
     } else {
         $useragent = '';
     }
     $userip = $_SERVER['REMOTE_ADDR'];
     $url = "http://api.indeed.com/ads/apisearch?publisher={$publisher}&format=xml&v=2&userip={$userip}&{$search_str}";
     // echo $url;
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     //return the transfer as a string
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
     $response = curl_exec($ch);
     curl_close($ch);
     $job_data = simplexml_load_string($response);
     return $job_data;
 }
开发者ID:linniepinski,项目名称:perssistant,代码行数:22,代码来源:index.php

示例12: printPHP_SELF

?>
" />
						<input type="hidden" name="url_withpw"    value="<?php 
echo printPHP_SELF("bookmark_withpw");
?>
" />
						<input type="hidden" name="url_withoutpw" value="<?php 
echo printPHP_SELF("bookmark_withoutpw");
?>
" />
						<input type="hidden" name="text"          value="net2ftp <?php 
echo $net2ftp_globals["ftpserver"];
?>
" />
<?php 
if ($net2ftp_globals["state"] != "bookmark") {
    printActionIcon("bookmark", "document.forms['StatusbarForm'].state.value='bookmark';document.forms['StatusbarForm'].submit();");
}
if (getBrowser("agent") != "Chrome") {
    printActionIcon("refresh", "window.location.reload();");
}
printActionIcon("help", "void(window.open('" . $net2ftp_globals["application_rootdir_url"] . "/modules/help/help-user.html','Help','location,menubar,resizable,scrollbars,status,toolbar'));");
printActionIcon("logout", "document.forms['StatusbarForm'].state.value='logout';document.forms['StatusbarForm'].submit();");
?>
						</form>
					</div>
				</div>
				<!-- ENDS title -->

<!-- Template /skins/shinra/header.template.php end -->
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:30,代码来源:header.template.php

示例13: recent_users

function recent_users()
{
    global $user;
    // Check to see if $user has the administrator role.
    if (!in_array('administrator', array_values($user->roles))) {
        if ($user->uid) {
            echo "You need to be an Administrator to see this page.";
        }
        exit;
    }
    //Counting Views
    $path = $_GET['q'];
    $differential = $_GET['uid'];
    $path_alias = drupal_get_path_alias($_GET["q"]);
    /* Pie Graph JS */
    echo "<script type='text/javascript' src='https://www.google.com/jsapi'></script>";
    echo "<script type='text/javascript'>";
    echo "  google.load('visualization', '1', {packages: ['corechart']});";
    echo "</script>";
    if ($differential) {
        $counter = 0;
        $total_downloads = 0;
        //Main Title and miscellaneous Information
        $result_user = db_query("\n\t\t  \tSELECT\n\t\t\t  f.field_full_n_value AS fullname, \n\t\t\t  u.name AS username,\n\t\t\t  u.mail AS email, \n\t\t\t  u.created AS joindate,\n\t\t\t  u.login AS lastlogin\n\t\t\tFROM\n\t\t\t  {field_data_field_full_n} f, {users} u where f.entity_id = u.uid AND u.uid = :uid\n\t\t\t", array(':uid' => $_GET['uid']))->fetchAll();
        // Finding all the Browsers Used
        $query_all_browsers = db_select('login_activity', 'a')->condition('a.uid', $_GET['uid'], '=')->distinct()->fields('a', array('host_user_agent'));
        $result_b = $query_all_browsers->execute();
        /*
        $result = db_query("
          	SELECT
        	  a.url, a.title, a.uid,
        	  COUNT(*) AS times
        	FROM
        	  {accesslog} a where a.uid = :uid
        	GROUP BY
        	  a.url",
        	array(':uid'=>$_GET['uid'])) -> fetchAll();
        */
        $result = db_query("\n\t\t  \tSELECT\n\t\t\t  n.title, n.nid,\n\t\t\t  COUNT(*) AS times\n\t\t\tFROM\n\t\t\t  {node_view_count} a, {node} n where a.nid = n.nid AND a.uid = :uid\n\t\t\tGROUP BY\n\t\t\t  n.title\n\t\t\tORDER BY\n\t\t\t  times desc", array(':uid' => $_GET['uid']))->fetchAll();
        echo "<div class='data-container' id='profile-info'>";
        echo "<span><a href=" . $GLOBALS['base_url'] . "/" . "user-statistics>&larr; Back to Main Analytics Page</a></span>";
        echo "</div>";
        echo "<div class='data-container'>";
        echo "<div class='left' style='width: 40%';>";
        foreach ($result_user as $r) {
            $date = date('Y-m-d H:i:s', $r->joindate);
            $dtz = 'America/New_York';
            $joinTimestamp = getNoteDateTimeZone($date, 'US/Central', $dtz);
            $ldate = date('Y-m-d H:i:s', $r->lastlogin);
            $loginTimestamp = getNoteDateTimeZone($ldate, 'US/Central', $dtz);
            echo "<h1>" . $r->fullname . "</h1>";
            echo "<span> Username: </span><span class='content-span'>" . $r->username . "</span><br />";
            echo "<span> Joining Date: </span><span class='content-span'>" . date("F jS, Y  \\( h:i a \\)", strtotime($joinTimestamp)) . "</span><br />";
            echo "<span> Last Login: </span><span class='content-span'>" . date("F jS, Y  \\( h:i a \\)", strtotime($loginTimestamp)) . "</span><br /><br />";
            echo "<span style='border-bottom: 1px solid #adadad; padding-bottom:5px; margin-bottom: 8px;'> Browsing History: </span><span class='content-span'><br />";
            echo "<table id='ver-minimalist' summary='Browsing History'>";
            echo "<tbody>";
            while ($record_all_browsers = $result_b->fetchAssoc()) {
                $detail_arr = getBrowser($record_all_browsers['host_user_agent']);
                echo "<tr>";
                echo "<td><img src ='" . $detail_arr['icon'] . "' width='20' height='20' />" . " | " . "<img src ='" . $detail_arr['os_icons'] . "' width='24' height='24' /> (" . $detail_arr['name'] . ", Version " . $detail_arr['version'] . " on " . $detail_arr['os'] . ")  </td>";
                echo "</tr>";
            }
            echo "</tbody>";
            echo "</table>";
            echo "</span>";
        }
        echo "</div>";
        /* <Pie Graph JS */
        echo "<script type='text/javascript'>";
        echo "function drawVisualization_pages_visited() {";
        echo "var options = { ";
        echo "\t  width: 550,";
        echo "    height: 550,";
        echo "    chartArea:{left:7,top:5, width:'100%'},";
        echo "    fontName: 'Open Sans',";
        echo "    tooltip: { textStyle: { fontName: 'Tahoma', fontSize: 11 } },";
        echo "    colors: [ '#d8b71a', '#193153', '#9c2b11', '#e5760a', '#1d83ae', '#919b02', '#097092', '#ddb928', '#890c0c', '#5c6677', '#0fa7ad', '#ad560f', '#d41473' ]";
        echo "};";
        //echo "var options = {'title':'asdasdasd asd asd ','width':500,'height':450,'chartArea':{left:0,top:10,width:'100%'}}";
        echo "var data = google.visualization.arrayToDataTable([";
        echo "['Pages Visited', 'No. of Visits'],";
        foreach ($result as $r) {
            //echo "['".$r->title."', ".$r->times."],";
            $resultstr_pages_visited[] = "['" . $r->title . "', " . $r->times . "]";
        }
        echo implode(",", $resultstr_pages_visited);
        echo "]);";
        echo "new google.visualization.PieChart(document.getElementById('visualization_visit_graph')).";
        echo "draw(data, options); ";
        echo " }";
        echo "google.setOnLoadCallback(drawVisualization_pages_visited);";
        echo "</script>";
        /* </Pie Graph JS */
        echo "<div class='right' style='width: 50%';>";
        echo "<div id='holder'>";
        /* Pie Graph Code */
        echo "<div id='visualization_visit_graph'></div>";
        echo "</div>";
        echo "</div>";
//.........这里部分代码省略.........
开发者ID:ibevamp,项目名称:t30,代码行数:101,代码来源:customfunctions.php

示例14: getBrowser

.top_bar.fixed
{
	position: fixed;
	animation-name: fadeIn;
	-webkit-animation-name: fadeIn;	
	animation-duration: 0.5s;	
	-webkit-animation-duration: 0.5s;
	visibility: visible !important;
}
<?php 
}
?>

<?php 
//Hack animation CSS for Safari
$current_browser = getBrowser();
//If enable animation
$pp_animation = get_option('pp_animation');
if ($pp_animation && isset($current_browser['name']) && $current_browser['name'] != 'Internet Explorer') {
    ?>
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:0.99; } }
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:0.99; } }
@-ms-keyframes fadeIn { from { opacity:0; } to { opacity:0.99; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:0.99; } }
 
.fade-in {
    animation-name: fadeIn;
	-webkit-animation-name: fadeIn;
	-ms-animation-name: fadeIn;	

	animation-duration: 0.7s;	
开发者ID:rsantellan,项目名称:wordpress-ecommerce,代码行数:31,代码来源:animated-css.php

示例15: validateSkin

function validateSkin($skin)
{
    // --------------
    // This function validates the skin
    // --------------
    global $net2ftp_settings;
    $skinArray = getSkinArray();
    if (isset($skinArray[$skin]) == true) {
        return $skin;
    } elseif (isset($_COOKIE["net2ftpcookie_skin"]) == true && isset($skinArray[$_COOKIE["net2ftpcookie_skin"]]) == true) {
        return $_COOKIE["net2ftpcookie_skin"];
    } else {
        if (defined("_VALID_MOS") == true) {
            return "mambo";
        } elseif (defined("CACHE_PERMANENT") == true) {
            return "drupal";
        } elseif (defined("XOOPS_ROOT_PATH") == true) {
            return "xoops";
        } elseif (getBrowser("platform") == "Mobile") {
            return "mobile";
        } elseif (getBrowser("platform") == "iPhone") {
            return "iphone";
        } elseif (isset($skinArray[$net2ftp_settings["default_skin"]]) == true) {
            return $net2ftp_settings["default_skin"];
        } else {
            return "india";
        }
    }
}
开发者ID:jamiebatch452,项目名称:Open-Game-Panel,代码行数:29,代码来源:registerglobals.inc.php


注:本文中的getBrowser函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。