示例#1
0
$_SESSION["webname"] = $webname;
$_SESSION["baseref"] = $baseref;
include_once "{$docroot}/baselib/baselib.php";
include_once "{$docroot}/baselib/iconfig.php";
include_once "{$docroot}/sql/checktables.php";
include_once "{$docroot}/view.php";
// we are in $dev
$dev = true;
$debug = false;
$rnd = genkey(6);
$shandle = initi("{$docroot}", $modbase);
trackhit($shandle, $webname, $scriptname, "", "", "mysqli", false, $dev);
// now let's make sure all tables exist
check_tables($shandle, $docroot, $debug);
// now we'll make set visable css attribute based on browser
$btype = !isset($_SESSION["btype"]) ? strtolower(browsertype($browser)) : $_SESSION["btype"];
$block = $btype == "msie" ? "block" : "inline";
$_SESSION["browser"] = $btype;
$_SESSION["shandle"] = $shandle;
$_SESSION["debug"] = $debug;
// check for authentication
$logstate = (isset($_SESSION["logstate"]) and $_SESSION["logstate"] == "authenticated") ? "isauth" : "unauth";
$authtitle = (isset($_SESSION["logstate"]) and $_SESSION["logstate"] == "authenticated") ? "Login Authenticated" : "You must log in for access";
$nextact = getvardata("nextact", "home", 99);
$_SESSION["nextact"] = $nextact;
openpage($btype);
echo "<body class='bodydiv'>\n";
if ($dev) {
    echo "<div class='{$btype}' title=\"Browser type {$btype} detected\" onclick=\"go('home');\"></div>\n";
    echo "<div id='xquery' class='noquery' title=\"Javascript needs to be activated for ROAM to work\"></div>\n";
    echo "<div id='logstate' class='{$logstate}' title=\"{$authtitle}\"></div>\n";
示例#2
0
$webname = $_SERVER["SERVER_NAME"];
$scriptname = $_SERVER["PHP_SELF"];
$docroot = $_SERVER["DOCUMENT_ROOT"];
$browser = $_SERVER["HTTP_USER_AGENT"];
$protocol = isset($_SERVER["HTTPS"]) ? "https://" : "http://";
$baseref = "{$protocol}{$webname}";
$modbase = "{$docroot}/tracker";
include_once "{$docroot}/baselib/baselib.php";
include_once "{$docroot}/baselib/iconfig.php";
$gac = "UA-70162812-1";
if (session_id() == "") {
    session_start();
}
$shandle = initi("{$docroot}", $modbase);
trackhit($shandle, $webname, $scriptname, "", "", "mysqli");
$btype = !isset($_SESSION["btype"]) ? browsertype($browser) : $_SESSION["btype"];
$block = $btype == "msie" ? "block" : "inline";
echo "<!doctype html>\n";
echo "<html>\n";
echo "<head>\n";
echo "<title>{$webname}</title>\n";
echo "<meta name=\"browser\" content=\"{$btype}\">\n";
echo $btype == "msie" ? "<META HTTP-EQUIV=\"X-UA-Compatible\" CONTENT=\"IE=edge\"/>\n" : "";
echo $btype == "msie" ? "<meta name=\"msapplication-config\" content=\"none\"/>\n" : "";
echo "<link type='text/css' rel='stylesheet' href='{$baseref}/jquery/1.11.2-ui/jquery-ui.css'>\n";
echo "<link type='text/css' rel='stylesheet' href='{$baseref}/jquery/1.11.2-ui/jquery-ui.structure.css'>\n";
echo "<link type='text/css' rel='stylesheet' href='{$baseref}/jquery/1.11.2-ui/jquery-ui.theme.css'>\n";
echo "<script src='{$baseref}/jquery/1.11.2/jquery-1.11.2.js'></script>\n";
echo "<script src='{$baseref}/jquery/1.11.2-ui/jquery-ui.js'></script>\n";
setstyle('/', true);
gac($gac);
示例#3
0
// AddType text/css .css
// AddHandler application/x-httpd-php .css
// additionally, the httpd.conf file needs to set the VirtualHost to
// AllowOverride AuthConfig FileInfo (+ other options if required)
////////////////////////////////////////////////////////////////////
$css_rules = array();
if (session_id() == "") {
    session_start();
}
$webname = $_SERVER["SERVER_NAME"];
$docroot = $_SERVER["DOCUMENT_ROOT"];
$browser = $_SERVER["HTTP_USER_AGENT"];
$modbase = "{$docroot}/tracker";
include_once "{$docroot}/baselib/baselib.php";
include_once "{$docroot}/baselib/iconfig.php";
$btype = browsertype($browser);
$activesource = getvardata("activesource", "activecss", 99);
$theme = getvardata("theme", "default", 99);
$debug = getvardata("debug", false, 99);
$page = getvardata("page", "all", 99);
$shandle = !isset($_SESSSION["shandle"]) ? initi($docroot, $modbase) : $_SESSION["shandle"];
$sql = "select looking_for, css_name from {$activesource} where conditional=\"default\" limit 1";
if ($debug) {
    echo "<!-- sql[{$sql}] -->\n";
}
$sresult = mysqli_query($shandle, $sql) or die("cannot connect to activecss: " . mysqli_connect_error());
$sdata = mysqli_fetch_array($sresult);
$default_condition = $sdata["looking_for"];
$default_seeking = $sdata["css_name"];
if ($debug) {
    echo "<!-- result[{$default_seeking}]-->\n";