\n"; echo " document.location.href='./?noLogIn".$additional."';\n"; echo "\n"; exit(); } if (array_key_exists("dropAutoLogIn", $_REQUEST)) { setcookie("alii[loginName]", "", time() - 3600); setcookie("alii[passwrd]", "", time() - 3600); } if (!array_key_exists("dropAutoLogIn", $_REQUEST) and !array_key_exists("noLogIn", $_REQUEST) and empty($_SESSION['user'])) { // autologin by cookie if (!empty($_REQUEST['loginName']) and !empty($_REQUEST['passwrd']) and array_key_exists("saveLogIn", $_REQUEST)) { // save cookie - "alii" = "Aspin Log In Information" setcookie("alii[loginName]", $_REQUEST['loginName'], time() + 2592000, "/"); setcookie("alii[passwrd]", $_REQUEST['passwrd'], time() + 2592000, "/"); } else if (empty($_REQUEST['loginName']) and empty($_REQUEST['passwrd']) and isset($_COOKIE['alii'])) { // if there is a cookie, load details foreach ($_COOKIE['alii'] as $name => $value) $_REQUEST[$name] = $value; setcookie("alii[loginName]", $_REQUEST['loginName'], time() + 2592000, "/"); setcookie("alii[passwrd]", $_REQUEST['passwrd'], time() + 2592000, "/"); } } $defaults = array ( "myaspin" => "news", "orders" => "search", "calendar" => "calendar", "reports" => "timesheets", "inventory" => "receive", "management" => "createclient", "scheduling" => "scheduling", "help" => "about", "update" => "updates" ); if ($_SESSION['user']['empNo'] == 3) // I prefer to start on 'accountable labor' $defaults['reports'] = "labortimes"; $screenWidth = 1000; if (!empty($_REQUEST['archive'])) { $oldPath = pathinfo($_REQUEST['archive']); $newPatchName = "archive/".$oldPath['dirname']."/".$oldPath['filename'].".".date("YmdHis").".".$oldPath['extension']; rename($_REQUEST['archive'], $newPatchName); unset($_REQUEST['archive']); } //----- attempt to fix ' in REQUEST ----- $arrayValues[0]['v'] = $_REQUEST; $idx = 0; while ($idx < count($arrayValues)) { foreach ($arrayValues[$idx]['v'] as $k => $v) { if (is_array($v)) { //$nv = count($arrayValues); //$arrayValues[$nv]['v'] = $v; //$arrayValues[$nv]['k'] = $arrayValues[$idx]['k']."[$k]"; } else if ($k != "SC035") { //echo $head.$arrayValues[$idx]['k']."[$k] => $v".$tail."\n"; if (strpos($v, "\'") !== false) { //echo "\n"; $_REQUEST[$k] = str_replace("\'", "´", $v); //echo "\n"; } } } $idx++; } //----- end fix ----- include_once 'header.html'; include_once 'preprocess.php'; // preprocessing for "closed call" search and "message left" search if (in_array($_SESSION['user']['empNo'], array( 2, 3))) { $todayStr = date("Ymd"); if (empty($_REQUEST['targetFromDate'])) { if (empty($_SESSION['wDate'])) { $_REQUEST['targetFromDate'] = $todayStr; $_REQUEST['targetToDate'] = $todayStr; } else { $_REQUEST['targetFromDate'] = $_SESSION['wDate']; $_REQUEST['targetToDate'] = $_SESSION['w2Date']; } } $nwDate = str_replace(array("-",".","/","\\"), "", $_REQUEST['targetFromDate']); $nw2Date = str_replace(array("-",".","/","\\"), "", $_REQUEST['targetToDate']); if ($nw2Date < $nwDate) { if ($nwDate == $_SESSION['wDate']) { $wDate = $nw2Date; $w2Date = $nw2Date; } else { $wDate = $nwDate; $w2Date = $nwDate; } } else { $wDate = $nwDate; $w2Date = $nw2Date; } $_SESSION['wDate'] = $wDate; $_SESSION['w2Date'] = $w2Date; if ($_REQUEST['targetFromDate'] == $todayStr) $targetDateIsToday = true; else $targetDateIsToday = false; } if ($_SESSION['user']['empNo'] and $_SESSION['user']['empNo'] != 3) $stale = " onLoad = \"setTimeout('document.location.href=\'./?p=stale\'', ".($_SESSION['GLOBAL_TIMEOUT'] * 60000).");\""; echo "\n"; echo "
\n"; echo ""; echo " \n\n"; echo "\t\t\t | \n"; echo "\t\t
\n"; echo "\t\t\t\t"; echo "\t\t\t | \n"; echo "\t\t