예제 #1
0
function listPdpOverdues()
{
    $pdpobj = new TableManager("drivers");
    $pdpobj->setQueryColumns(array("drivers" => array("*")));
    //$userobj->setCustomIndex("personid");
    $pdpobj->setWhere("1=1");
    $pdplist = $pdpobj->selectMultiple();
    print "<pre style='font-family:verdana;font-size:13'>";
    print_r($pdplist);
    print "</pre>";
}
예제 #2
0
function maxineTop($title = "")
{
    // Prep {
    ## User Data
    $mycapsSegments = new TableManager("users");
    $mycapsSegments->setWhere($mycapsSegments->quoteString("`users`.`personid`=?", (int) $_SESSION["userid"]));
    $user = $mycapsSegments->selectSingle();
    //$user				= sqlPull(array("table"=>"users", "where"=>"personid=".$_SESSION["userid"], "select"=>"firstname, lastname, user_profiles_id", "onerow"=>1));
    $smsaccess = testRights($_SESSION["userid"], "sms001");
    ## myCAPS segment check
    if (isset($_SESSION["userid"]) && $_SESSION["userid"]) {
        $mycapsSegments = new TableManager("mycaps_segments");
        $mycapsSegments->setWhere($mycapsSegments->quoteString("`mycaps_segments`.`userid`=?", (int) $_SESSION["userid"]) . $mycapsSegments->quoteString(" AND `mycaps_segments`.`finalized`=?", 0));
        $segment = $mycapsSegments->selectSingle();
    }
    ## Profile Data
    if ($user) {
        $user_profiles = new TableManager("user_profiles");
        ## Test for fortune column
        $cols = $user_profiles->getColumns();
        if (in_array("fortune", $cols) === FALSE) {
            $sql = (string) "ALTER TABLE `user_profiles` ADD COLUMN `fortune` TINYINT(1) NOT NULL DEFAULT 0, ADD INDEX (`fortune`);";
            if ($user_profiles->runSql($sql) === FALSE) {
                $errors = $user_profiles->getErrors();
                echo "<div class=\"error\">mySQL statement encountered an error. Last error was:<br />" . $errors[count($errors) - 1] . "</div>";
                return FALSE;
            }
        }
        $user_profiles->setWhere($user_profiles->quoteString("`user_profiles`.`id`=?", $user["user_profiles_id"]));
        $profile = $user_profiles->selectSingle();
    }
    ## Alerts
    $manager = new TableManager("alerts");
    $manager->setWhere($manager->quoteString("`alerts`.`deleted`=?", (int) 0) . $manager->quoteString(" AND `alerts`.`time_start`<=?", strtotime(date("Y-m-d") . " 00:00")) . $manager->quoteString(" AND `alerts`.`time_end`>=?", strtotime(date("Y-m-d") . " 23:59")));
    $manager->setCustomIndex("id");
    $alerts = $manager->selectMultiple();
    ## Theme
    $themes = new TableManager("themes");
    $themes->setQueryColumns(array("themes" => array("*")));
    $themes->setQueryFrom(array("left join" => array(0 => array("table" => array("abbr" => "user_profiles", "table" => "user_profiles"), "on" => "`themes`.`id`=`user_profiles`.`theme_id`"), 1 => array("table" => array("abbr" => "users", "table" => "users"), "on" => "`user_profiles`.`id`=`users`.`user_profiles_id`"))));
    $where = (string) "(ISNULL(`themes`.`deleted`)";
    $where .= $themes->quoteString(" OR `themes`.`deleted`=?)", 0);
    if ($_SESSION["userid"]) {
        $where .= $themes->quoteString(" AND `users`.`personid`=?", (int) $_SESSION["userid"]);
    } else {
        $where .= $themes->quoteString(" AND `themes`.`id`=?", (int) 1);
    }
    $themes->setWhere($where);
    $theme = $themes->selectSingle();
    $backgroundImage = (string) BASE . "images/new/themes/" . $theme["background-image"];
    $_SESSION["backgroundRepeat"] = (string) BASE . "images/new/themes/" . $theme["background-repeater"];
    $size = getimagesize($backgroundImage);
    $_SESSION["bgImageSize"] = $size;
    // }
    print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>";
    print "<html>";
    // Header Info {
    print "<head>";
    print "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />" . PHP_EOL;
    print "<link href='" . BASE . "/images/favicon.ico' rel='SHORTCUT ICON' />" . PHP_EOL;
    //print("<link href='".BASE."/basefunctions/scripts/manlinecss.php' rel='stylesheet' type='text/css' />");
    print "<link href='" . BASE . "/basefunctions/scripts/manline.css' media='all' rel='stylesheet' type='text/css' />" . PHP_EOL;
    print "<script type='text/javascript' language='javascript' src='" . BASE . "/basefunctions/scripts/manline.js'></script>";
    $headTitle = (string) "Maxweb";
    if ($title) {
        $headTitle .= " - " . $title;
    }
    print "<title>" . $headTitle . "</title>" . PHP_EOL;
    print "</head>";
    // }
    print "<body id=\"windowBody\" style='background-image:url(\"" . $backgroundImage . "\");'>";
    //print("<form action='#' method='post'>");
    // Header 1 {
    print "<h1>";
    print "<img alt=\"Maxweb Logo\" id=\"maxwebLogo\" src='" . BASE . "/images/new/logo.png' style=\"height:58px;margin-top:2px;width:299px;\">";
    print "<span style='float:right; text-align:right;'>";
    $links = (array) array("Home" => array("class" => "headerA", "href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=home", "id" => "home"), "Documents" => array("class" => "headerA", "href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=viewdocuments", "id" => "Documents"), "Gallery" => array("class" => "headerA", "href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=viewgallery", "id" => "Gallery"), "InOut" => array("class" => "headerA", "href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=inoutboard", "id" => "InOut"), "Max" => array("class" => "headerA", "href" => "http://login.max.manline.co.za", "id" => "Max", "target" => "_blank"), "Zimbra" => array("class" => "headerA", "href" => "http://mail.manline.co.za", "id" => "Zimbra", "target" => "_blank"));
    foreach ($links as $text => $data) {
        echo "<a class=\"" . $data["class"] . "\" href=\"" . $data["href"] . "\" id=\"" . $data["id"] . "\" " . (isset($data["target"]) ? "target=\"" . $data["target"] . "\" " : "") . "title=\"" . $text . "\"></a>" . PHP_EOL;
    }
    print "</span>";
    print "</h1>";
    // }
    // Header 2 {
    $messages = (array) array();
    if (isset($profile) && $profile) {
        if (!$profile["staffno"] || !$profile["department_id"] || !$profile["jobtitle"] || !$profile["location"]) {
            $messages[] = "Your profile information is incomplete.";
        }
    }
    if (isset($segment)) {
        if (date("U") > (int) $segment["enddate"] + 86400) {
            $messages[] = "Your CAPS is overdue";
        }
    }
    if (isset($alerts) && $alerts) {
        foreach ($alerts as $val) {
            $messages[] = $val["message"];
        }
    }
    ## Profile Data
    if ($messages) {
        informationBar($messages);
    }
    print "<h2>";
    print "<span style='width:10px; height:51px; background-image:url(\"" . BASE . "/images/new/menubarleft.png\"); float:left;'></span>";
    print "<span style='width:850px; height:36px; background-image:url(\"" . BASE . "/images/new/menubarmid.png\"); float:left; padding-top:15px;'>";
    // Left Span - Quick Navigation {
    print "<span style='float:left; margin-top:-5px;'>";
    ## Menu
    // $items[] = array("href"=>"http://".$_SERVER["SERVER_NAME"]."/Maxine/", "text"=>"", "title"=>"");
    $items = (array) array();
    if ($user) {
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=mycapslist2", "text" => "myCAPS", "title" => "click to go to your CAPs");
    }
    $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=showm3", "text" => "Public M3", "title" => "View public M3 Graphs");
    $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=dockeeperfront", "text" => "Customer Documents", "title" => "View Documents required by Customers");
    if ($user) {
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=m3sys", "text" => "M3", "title" => "View M3 Graphs");
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=displaymydash", "text" => "Personal Dashboard", "title" => "Click to view your personal dashboard");
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=greenmileinput", "text" => "Green Mile Controls", "title" => "Click to update Green Mile Details");
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=ratescalc2", "text" => "Rates Calculator", "title" => "Click to view the rates calculator");
        if ($user["isit"] || $user["ismanager"]) {
            $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=nineblockinput", "text" => "9 Blocker", "title" => "Click to view your 9 Blocker");
            $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=listalerts", "text" => "Alerts", "title" => "Click to list all alerts");
            $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=edituserpool", "text" => "User Pools", "title" => "Click to view and edit User Pools");
        }
        $items[] = array("text" => "Faults System", "children" => array(array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=equipfaults", "text" => "Equipment Faults", "title" => "Click to view equipment faults"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=uflist", "text" => "Unit Faults", "title" => "Click to view unit faults"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=faultsys", "text" => "Fault Logging", "title" => "Log a new fault")));
        $items[] = array("text" => "Personnel Tools", "children" => array(array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=learnerlist", "text" => "Learner", "title" => "Click to view a list of learners"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=candmenu", "text" => "Candidates", "title" => "Click to view list of candidates"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=driverslist", "text" => "Drivers", "title" => "Click to view list of drivers"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=listusers", "text" => "Users", "title" => "Click to view user list")));
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=updateprofile", "text" => "Edit Your Profile", "title" => "Click to edit your profile");
    }
    /** Cameras link affects
    				  4 = > Jonathan Spencer
    				  5 = > Bradley Roberts
    				  141 = > Jerome Govender
    				  168 = > Lwazi Ally
    				  186 = > Ndumiso Langa
    				*/
    if (in_array($_SESSION["userid"], array(4, 5, 141, 168, 186))) {
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/cameras/", "text" => "Manline CCTV", "title" => "Click to view the cameras");
    }
    if ($_SESSION["isadmin"] || $smsaccess > 0) {
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=smssystem", "text" => "Send an SMS", "title" => "Click to use the SMS system");
    }
    if ($_SESSION["isit"] == 1) {
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=rightscontrol", "text" => "Access Rights", "title" => "Click to set user access rights");
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=loggingreport", "text" => "Logging Report", "title" => "Click to view the logging report");
        if ($_SESSION["isadmin"]) {
            $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=smssystem", "text" => "Send an SMS", "title" => "Click to use the SMS system");
        }
        $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=sandbox", "text" => "Sandbox", "title" => "Click to go to the coding sandbox");
        //$items[] = array("href"=>"http://".$_SERVER["SERVER_NAME"]."/Maxine/index.php?mode=maxine/index&action=encoder", "text"=>"Text Encoder", "title"=>"Click to view the text encoder");
        //$items[] = array("href"=>"http://".$_SERVER["SERVER_NAME"]."/Maxine/index.php?mode=maxine/index&action=truckfinder", "text"=>"Truck Finder", "title"=>"Click to view the truck finder");
        $items[] = array("text" => "Scaffolding", "children" => array(array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=documents", "text" => "Documents", "title" => "Click to list all items"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=gallery", "text" => "Gallery", "title" => "Click to list all items"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=galleryItems", "text" => "Gallery Items", "title" => "Click to list all items"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=newspaper_articles", "text" => "Newspaper Articles", "title" => "Click to list all items"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=pages", "text" => "Pages", "title" => "Click to list all items"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=themes", "text" => "Themes", "title" => "Click to list all items"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=type", "text" => "Type", "title" => "Click to list all items"), array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?mode=maxine/index&action=list&name=user_profiles", "text" => "User Profiles", "title" => "Click to list all items")));
    }
    /* $items[] = array("text"=>"Corporate Clothing", "children"=>array(
    				array("href"=>"http://".$_SERVER["SERVER_NAME"]."/Maxine/documents/Ladies Clothing Catalogue.pdf", "text"=>"Ladies", "title"=>"Click to download ladies clothing catalogue"),
    				array("href"=>"http://".$_SERVER["SERVER_NAME"]."/Maxine/documents/Mens Clothing Catalogue.pdf", "text"=>"Mens", "title"=>"Click to download mens clothing catalogue")
    			)); */
    $items[] = array("href" => "/Maxine/documents/ManlinePriceList.pdf", "text" => "Corporate Clothing", "title" => "Click to download");
    $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/documents/Map to Head Office.pdf", "text" => "Map to Head office", "title" => "Click to download map to head office");
    $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=maxexpress", "text" => "Max Express", "title" => "Click to view Max Express editions");
    $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=viewnews", "text" => "News", "title" => "Click to view newspaper articles");
    $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=monthlyvideos", "text" => "Monthly Videos", "title" => "Click to view Neil's monthly video updates");
    $sql = (string) "SELECT * FROM `m3_departments`";
    $departs = $themes->runSql($sql);
    $depts = (array) array();
    foreach ($departs as $dept) {
        $depts[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=listdepartment&department=" . urlencode($dept["name"]), "text" => $dept["name"], "title" => "Click to view department members");
    }
    $items[] = array("href" => "http://" . $_SERVER["SERVER_NAME"] . "/Maxine/index.php?action=listdepartment", "text" => "Staff Profiles", "title" => "Click to view all staff members", "children" => $depts);
    echo menu($items);
    print "</span>";
    // }
    // Right Span - Login Details {
    print "<span style='height:34px; float:right; margin-top:-5px; vertical-align:bottom;'>";
    if ($_SESSION["userid"] > 0) {
        print "<p class='standard' style='float:left; margin-right:10px; margin-top:8px;'>Logged in as " . $profile["firstname"] . " " . $profile["lastname"] . "</p>";
        echo "<a href=\"/Maxine/?logout\" id=\"logoutbutton\"></a>" . PHP_EOL;
    } else {
        $name = "";
        if ($_COOKIE["loggedname"]) {
            $name = $_COOKIE["loggedname"];
        }
        print "<form id=\"loginform\" name='loginform' action='index.php?mode=maxine/index&action=loginaction' method='post'>";
        print "<span style='width:16px; height:19px; background-image:url(\"" . BASE . "/images/new/loginicon.png\"); float:left; margin-top:5px;'></span>";
        print "<span style='width:10px; height:25px; background-image:url(\"" . BASE . "/images/new/loginleft.png\"); float:left; margin-left:10px; margin-top:4px; '></span>";
        print "<input id=\"username\" name='conf[username]' value='" . $name . "' class='loginmid' onKeyPress='submitenter(this,event);' />";
        print "<span style='width:10px; height:25px; background-image:url(\"" . BASE . "/images/new/loginright.png\"); float:left; margin-top:4px; '></span>";
        print "<span style='width:10px; height:25px; background-image:url(\"" . BASE . "/images/new/loginleft.png\"); float:left; margin-left:10px; margin-top:4px;'></span>";
        print "<input type='password' id='passbox' name='conf[password]' class='loginmid' onKeyPress='submitenter(this,event);' />";
        print "<span style='width:10px; height:25px; background-image:url(\"" . BASE . "/images/new/loginright.png\"); float:left; margin-top:4px; '></span>";
        echo "<a href=\"#\" id=\"loginbutton\" onclick=\"document.getElementById('loginform').submit();\"></a>" . PHP_EOL;
        print "</form>";
    }
    print "</span>";
    // }
    print $title;
    print "</span>";
    print "<span style='width:10px; height:51px; background-image:url(\"" . BASE . "/images/new/menubarright.png\"); float:left;'></span>";
    print "</h2>";
    if (isset($_SESSION["userid"]) && in_array($_SESSION["userid"], array(4, 23, 175)) || isset($profile["fortune"]) && $profile["fortune"]) {
        $fortune = shell_exec("fortune -s -n 100");
        echo "<div style=\"height:24px;margin:-14px auto 15px;position:relative;width:850px;\">";
        echo "<img alt=\"left corner\" src=\"" . BASE . "images/new/cookiebar_left.png\" style=\"height:24px;left:0px;position:absolute;top:0px;width:10px;\" />";
        echo "<div style=\"background-image:url(" . BASE . "images/new/cookiebar_mid.png);font-size:0.8em;height:24px;margin:-3px auto 0px;vertical-align:top;width:830px;\">" . $fortune . "</div>";
        echo "<img alt=\"right corner\" src=\"" . BASE . "images/new/cookiebar_right.png\" style=\"height:24px;position:absolute;right:0px;top:0px;width:10px;\" />";
        echo "</div>";
    }
    // }
}
예제 #3
0
function editUserForm()
{
    $users = new Users();
    // Data Prep {
    $isit = $_SESSION["isit"];
    if ($_POST["conf"]) {
        $conf = $_POST["conf"];
        $user = $users->getRow(array("where" => "personid=" . $conf["personid"], "children" => true));
        $passtip = "If nothing is entered, password will remain the same.";
    } else {
        $passtip = "This is a compulsory field";
        $user["oninout"] = 1;
    }
    if ($conf["personid"]) {
        $birthday = sqlPull(array("table" => "userdates", "where" => "userid=" . $conf["personid"] . " AND datetype='birthday'", "onerow" => "1"));
        $bday = date("d", $birthday["date"]);
        $bmonth = date("m", $birthday["date"]);
    }
    $depts = sqlPull(array("table" => "m3_departments", "where" => "1=1"));
    $rightsgroups = sqlPull(array("table" => "rights_groups", "where" => "1=1"));
    $profiles = new TableManager("user_profiles");
    $profiles->setWhere("deleted=0");
    $profiles->setOrderBy(array("column" => array("firstname", "lastname"), "direction" => array("ASC", "ASC")));
    $profiles->setQueryColumns(array("user_profiles" => array("id", "firstname", "lastname")));
    $profilelist = $profiles->selectMultiple();
    // }
    maxineTop("User Form");
    print "<form id='userform' name='userform' action='/Maxine/?commituser' method='post'>";
    // Buttons {
    openHeader();
    //print("<img src='".TOPBUTTONS."/buttonuserhistory.png' onClick='userform.action=\"index.php?mode=maxine/index&action=manageuserdates\"; userform.submit();'>");
    maxineButton("Submit", "testDetails(); userform.submit();", 2);
    maxineButton("Delete", "userform.action=\"/Maxine/?deleteuser\"; userform.submit();", 2);
    maxineButton("Back", "goTo(\"/Maxine/?listusers\");", 2);
    closeHeader();
    // }
    print "<div class='tray' style='height:600px;'>";
    // Input {
    print "<input type=hidden name='conf[personid]' value=" . $user["personid"] . ">";
    // Left Hand Side {
    print "<div style='width:400px; margin-left:20px; float:left;'>";
    // Personal Details {
    openSubbar(400);
    print "Personal Details";
    closeSubbar();
    print "<table class='standard content1' style='width:400px;'>";
    print "<tr><td width=30% align='center'>";
    print "User Name";
    print "</td><td width=70%>";
    print "<input name=conf[username] value='" . $user["username"] . "' style='width: 100%; background-color: " . MAXINEBACK . "; border-width: 1px;' title='This will automatically be convered to lower case.'>";
    print "</td></tr>";
    /*
    print("<tr><td align='center'>");
    print("First Name");
    print("</td><td>");
    print("<input name=conf[firstname] value='".$user["firstname"]."'  style='width: 100%; background-color: ".MAXINEBACKALT."; border-width: 1px;'>");
    print("</td></tr>");
    
    print("<tr><td align='center'>");
    print("Last Name");
    print("</td><td>");
    print("<input name=conf[lastname] value='".$user["lastname"]."' style='width: 100%; background-color: ".MAXINEBACK."; border-width: 1px;'>");
    print("</td></tr>");
    */
    print "<tr><td align='center'>";
    print "Position";
    print "</td><td>";
    print "<input name=conf[position] value='" . $user["position"] . "'  style='width: 100%; background-color: " . MAXINEBACKALT . "; border-width: 1px;'>";
    print "</td></tr>";
    print "</table>";
    // }
    // Contact Details {
    openSubbar(400);
    print "Contact Details";
    closeSubbar();
    print "<table class='standard content1' style='width:400px;'>";
    print "<tr><td align='center' width=30%>";
    print "Office Extension";
    print "</td><td width=70%>";
    print "<input name=conf[extension] value='" . $user["extension"] . "' style='width: 100%; background-color: " . MAXINEBACK . "; border-width: 1px;'>";
    print "</td></tr>";
    print "<tr><td align='center'>";
    print "Cell Number";
    print "</td><td>";
    print "<input name=conf[cell] value='" . $user["cell"] . "' style='width: 100%; background-color: " . MAXINEBACKALT . "; border-width: 1px;'>";
    print "</td></tr>";
    print "<tr><td align='center'>";
    print "Email";
    print "</td><td>";
    print "<input name=conf[email] value='" . $user["email"] . "' style='width: 100%; background-color: " . MAXINEBACK . "; border-width: 1px;' onblur=\"if (this.value && ((validateEmailAddress(this)) === false)) {alert('Please ensure that the email address you have entered is a valid email address.'); this.value='';}\">";
    print "</td></tr>";
    print "</table>";
    // }
    // Misc {
    openSubbar(400);
    print "Miscellaneous";
    closeSubbar();
    print "<table class='standard content1' style='width:400px;'>";
    // Password {
    print "<tr><td align='center' width=30%>";
    print "Password";
    print "</td><td width=70%>";
    print "<input type=password name='conf[password]' style='width:200px; margin-top:2px;' title='" . $passtip . "'>";
    print "</td></tr>";
    // }
    // Profile {
    print "<tr><td align='center' width=30%>";
    print "User Profile";
    print "</td><td width=70%>";
    print "<select name=\"conf[user_profiles_id]\">";
    print "<option value=\"0\">Please select...</option>";
    foreach ($profilelist as $profilekey => $profileval) {
        print "<option " . ($user["user_profiles_id"] == $profileval["id"] ? "selected" : "") . " value=\"" . $profileval["id"] . "\">";
        print $profileval["firstname"] . " " . $profileval["lastname"];
        print "</option>";
    }
    print "</select>";
    print "</td></tr>";
    // }
    print "</table>";
    // }
    print "</div>";
    // }
    // Right Hand Side {
    print "<div style='width:400px; margin-right:20px; float:right;'>";
    if ($isit == 1) {
        // Flags {
        openSubbar(400);
        print "Flags";
        closeSubbar();
        print "<table class='standard content1' style='width:400px;'>";
        print "<tr><td width=70% align='center'>";
        print "Allow Login";
        print "</td><td width=30% align='center'>";
        print "<input type=checkbox name=conf[canlogin] " . ($user["canlogin"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Show on In Out board";
        print "</td><td align='center'>";
        print "<input type=checkbox name=conf[oninout] " . ($user["oninout"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Manager";
        print "</td><td align='center'>";
        print "<input type=checkbox name=conf[ismanager] " . ($user["ismanager"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Supervisor";
        print "</td><td align='center'>";
        print "<input type=checkbox name=conf[issuper] " . ($user["issuper"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Fleet Manager";
        print "</td><td align='center'>";
        print "<input type='checkbox' name=conf[isfleetman] " . ($user["isfleetman"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "IT";
        print "</td><td align='center'>";
        print "<input type=checkbox name=conf[isit] " . ($user["isit"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Generic User";
        print "</td><td align='center'>";
        print "<input type=checkbox name=conf[isgeneric] " . ($user["isgeneric"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Place";
        print "</td><td align='center'>";
        print "<input type=checkbox name=conf[isplace] " . ($user["isplace"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Fleets Performance";
        print "</td><td align='center'>";
        print "<input type='checkbox' name=conf[isfleetper] " . ($user["isfleetper"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "<tr><td align='center'>";
        print "Damages, Shortages & Incidents";
        print "</td><td align='center'>";
        print "<input type='checkbox' name=conf[isdamage] " . ($user["isdamage"] == 1 ? "checked" : "") . ">";
        print "</td></tr>";
        print "</table>";
        // }
        // Groups {
        openSubbar(400);
        print "Access Groups";
        closeSubbar();
        print "<table class='standard content1' style='width:400px'>";
        foreach ($rightsgroups as $grpkey => $grpval) {
            // Individual preparation {
            $userrights = null;
            if ($conf["personid"]) {
                $userrights = $user['rights_users'][$grpval['id']];
            }
            $sel = (string) "";
            if ($userrights) {
                $sel = 'checked="checked"';
            }
            // }
            print "<tr><td align='center' width=70% title='" . $grpval["description"] . "'>";
            print $grpval["name"];
            print "</td><td width=30% align='center'>";
            print "<input type='checkbox' name=conf[groups][" . $grpval["id"] . "] value=1 " . $sel . ">";
            print "</td></tr>";
        }
        print "</table>";
        // }
    } else {
        print "Flags and Access Groups";
        print "Please contact IT to change these settings";
    }
    print "</div";
    // }
    // }
    print "</div";
    print "</form>";
    maxineBottom();
    // Javascript {
    print "<script type=\"text/javascript\">\n\t\t\t\t\tfunction testDetails() {return false;}\n\t\t\t\t\tfunction goThrough() {alert('20');}\n\t\t\t\t\t/** validateEmailAddress(obj)\n\t\t\t\t\t* @param obj object HTML element reference\n\t\t\t\t\t* @return true on success false otherwise\n\t\t\t\t\t*/\n\t\t\t\t\tfunction validateEmailAddress(obj) {\n\t\t\t\t\tvar val = obj.value;\n\t\t\t\t\tvar replaced = obj.value.toString().replace('/\\s/', '');\n\t\t\t\t\tif (!val || !replaced) {return false;}\n\t\t\t\t\tif (val.match(/^(.+)@([^@]+)\$/)) {return true;}\n\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t</script>";
    // }
}