Example #1
0
<?php

// Resource Overview and Management (ROAM)
// date_default_timezone_set("America/Vancouver");
// dastabase driver is MYSQLI
$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";
$subroot = subroot(__FILE__, $scriptname);
if (session_id() == "") {
    session_start();
}
//$shandle = initi( "$docroot", $modbase );
//trackhit($shandle,$webname,$scriptname,"","","mysqli");
$gac = "UA-70162812-1";
$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";
Example #2
0
<?php

$debug = true;
$docroot = $_SESSION["docroot"];
$subroot = subroot(__FILE__, $_SESSION["scriptname"]);
if ($debug) {
    echo "<!-- subroot[{$subroot}] -->\n";
}
setstyle(subroot(__FILE__, $_SESSION["scriptname"]), true);
require "{$docroot}{$subroot}/objects.php";
require "{$docroot}{$subroot}/view.php";
$inaction = getvardata("inaction", "view", 99);
$activetab = getvardata("activetab", "client", 99);
echo "<input type=hidden name='inaction' id='inaction' value='{$inaction}'>\n";
echo "<input type=hidden name='activetab' id='activetab' value='{$activetab}'>\n";
// we are not included in top scope, look for values in $_SESSION
$nextact = $_SESSION["nextact"];
$tablist = getActiveTabs($activetab);
showActiveTabs($tablist);
$thisclient = new actor("WRO001", $debug);
$thisclient->getActorData();
showActorData($thisclient);
getActorJava();
/////////////////////////////////////////////////////////
// functions from here to eof
/////////////////////////////////////////////////////////
function getActiveTabs($tabtype, $debug = false)
{
    $roles = array();
    $counter = 0;
    $shandle = $_SESSION["shandle"];