$vlname = strtoupper($_GET['vlname']); $fvisiting = strtoupper($_GET['fvisiting']); $lvisiting = strtoupper($_GET['lvisiting']); //create objects of visitor $newVisitor = new Visitor($vfname, $vlname); $newVisiting = new Visiting($fvisiting, $lvisiting); $clockedIn = new CurrDate(); //go to model that handles searching or logging visitors //to determine if we will be logging in a visitor or logging them out //this model only checks if someone is logged in or not. It returns boolean include "../models/is_in_or_out.php"; $loggedIn = isLoggedIn($vfname, $vlname, $fvisiting, $lvisiting, $clockedIn->theDate, $clockedIn->dbDate); if ($loggedIn) { //if they are logged in log them out include "../models/log_out.php"; $logVisOut = logInOut($vfname, $vlname, $fvisiting, $lvisiting, $clockedIn->theDate, $clockedIn->dbDate); include "../views/loggedOut.php"; } else { //if they are not logged in tell them they are not include "../views/not_logged_in.php"; } /* if($isLoggedIn) { include("../views/logging_in_out.php"); } else { include("../models/visitor_search.php"); include("../views/not_logged_in.php"); return $isLoggedIn; } */ }
require "./fav_strings.php"; function printAdmJs($id) { if (isset($_SESSION['isLogined'])) { return ' onmouseover="toggleAdmTool(\'adm' . $id . '\')" onmouseout="toggleAdmTool(\'adm' . $id . '\')"'; } else { return ''; } } function printAdmTools($id) { global $SidebarSuffix2, $admAppend, $MyFav_Edit, $MyFav_Delete; return '<a href="' . text2xml("fav_action.php?action=edit&id=" . $id . $SidebarSuffix2) . '" class="admtool" ' . $admAppend . '>' . $MyFav_Edit . '</a> <a href="' . text2xml("fav_action.php?action=delete&id=" . $id . $SidebarSuffix2) . '" class="admtool" ' . $admAppend . '>' . $MyFav_Delete . '</a>'; } if (isset($_POST['pwd']) || isset($_POST['logout'])) { logInOut(val($_POST, 'pwd'), isset($_POST['logout'])); } $conn = sqlite_popen($sqlite_file); $conn2 = sqlite_popen($sqlite_file); $qry = "SELECT * FROM Fav WHERE cat = 1 ORDER BY ord,id"; $rs = sqlite_query($conn, $qry); if (!($oldNetscape || $noXML)) { header('Content-type: application/xhtml+xml'); } echo '<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-tw" lang="zh-tw"> <head> <meta http-equiv="Content-Type" content="' . ($oldNetscape || $noXML ? 'text/html' : 'application/xhtml+xml') . '; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <!-- IE8 workaround --> <title>' . $MyFav_Title . '</title>
if ($iAction == "go" && !$iPass) { echo $MyFav_PasswdPrompt . '<form action="' . $_SERVER['PHP_SELF'] . '?action=go" method="post"> <input type="hidden" name="h_id" value="' . $_GET["id"] . '"> <input type="password" name="pwd"> <input type="submit" name="Submit" value="登入"> ' . $MyFav_BackHTML . ' </form>'; } else { if (!isset($_POST['pwd'])) { echo $MyFav_PasswdPrompt . '<form action="' . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . '" method="post"> <input type="password" name="pwd"> <input type="submit" name="Submit" value="登入"> ' . $MyFav_BackHTML . ' </form>'; } else { if (!logInOut(val($_POST, 'pwd'))) { echo $MyFav_AccessDeny . '<br><center>' . $MyFav_BackHTML . '</center>'; } } } } } if (isset($_SESSION['isLogined']) || viewAuth()) { switch ($iAction) { case "add": $_GET['url'] = urlencode($_GET['url']); // encodes url again $_GET['name'] = urlencode(jsUCEsc2utf8($_GET['name'])); // encodes name again header("Location: " . $BaseURL . "fav_add.php?" . toQueryString("catid", 'name', 'url') . $SidebarSuffix2); break;