Changeset 18514 for trunk/FACT++/www


Ignore:
Timestamp:
05/27/16 09:46:22 (9 years ago)
Author:
tbretz
Message:
Avoid a log message in the error log if PHP_* was not set; Removed browscap - wasn't working anymore.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/smartfact/index.php

    r17681 r18514  
    1616    global $groupDN;
    1717
     18    if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']))
     19        return "Unauthorized";
     20
    1821    $username = $_SERVER['PHP_AUTH_USER'];
    1922    $password = $_SERVER['PHP_AUTH_PW'];
    20 
    21     if (!isset($username) || !isset($password))
    22         return "Unauthorized";
    2323
    2424    $con = @ldap_connect($ldaphost);
     
    101101if (isset($_GET['load']))
    102102{
    103     require_once('log/Browscap.php');
     103    //require_once('log/Browscap.php');
    104104
    105105    $d = date("Y/m");
     
    117117    $dns  = gethostbyaddr($addr);
    118118
    119     $bcap = new phpbrowscap\Browscap('log/cache');
    120     $info = $bcap->getBrowser();
     119    //$bcap = new phpbrowscap\Browscap('log/cache');
     120    //$info = $bcap->getBrowser();
    121121
    122122    $file = fopen($path."/smartfact.log", "a");
    123123    fwrite($file,
    124124           date("Y-m-d H:i:s\t").$addr.
    125            "\t".$info->Platform.
    126            "\t".$info->Browser.
    127            "\t".$info->Version.
    128            "\t".($info->isMobileDevice?"mobile":"").
     125           "\t".//$info->Platform.
     126           "\t".//$info->Browser.
     127           "\t".//$info->Version.
     128           "\t".//($info->isMobileDevice?"mobile":"").
    129129           "\t".$user.
    130130           "\t".$dns."\n");
Note: See TracChangeset for help on using the changeset viewer.