function login_receive() { login_check(); if (isset($_GET['lostpassword'])) { login_password_recovery_receive(); } if (isset($_GET['reg']) && isset($_POST['upsign'])) { user_register(); } }
function mw1() { $app = \Slim\Slim::getInstance(); $db = getConnection(); if (login_check($db) == true) { return true; } else { $app->halt(401, 'Token Requerido'); } }
public function __construct() { parent::__construct(); /* Load the libraries and helpers */ $this->load->model('admin/user_model'); $this->load->library('upload'); $this->load->library('pagination'); date_default_timezone_set('Asia/Kolkata'); $this->load->helper('login'); $this->load->library('encrypt'); login_check(); user_func_check(); }
function already_login() { if ($_SESSION['user']) { // print $_SESSION['user']; // header('Location: index.php'); // exit; return True; } return login_check(); // header('Location: login.php'); // exit; // return False; }
function login_new($auth_user, $auth_pass) { if (check_password($auth_user, $auth_pass)) { $user = login_check(); setcookie("aid", $auth_user, 60 * 60 * 10); //クッキー名、保存内容、時間を指定 redirect("/dev/top.php"); //print "ログイン成功"; //redirect("02-01.php3?" . SID); } else { $error_msg = array(); $error_msg[] = "パスワードが違います。"; return $error_msg; } }
<meta charset="UTF-8"> <title>Secure Login: Admin</title> <link rel="stylesheet" media="screen and (min-device-width: 668px)" type="text/css" href="css/style.css" /> <link rel="stylesheet" media="screen and (max-device-width: 667px)" type="text/css" href="css/mobile.css" /> <meta name="keywords" content="Arlen Education Tutoring" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=9" /> <meta name="viewport" content="user-scalable=no"/> <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/menu.js"></script> <link rel="shortcut icon" href="images/favicon.ico"> </head> <body> <?php if (login_check($mysql) == 1) { ?> <!--Open the page--> <div id="main"> <div id="header"> <div id="title"> <a href = "index.php"><img src="images/logo.png"/></a> </div> <div id="menubar"> <ul id="menu"> <li class="logout"><a href="includes/logout.php">LOG OUT</a></li> </ul> </div> <div id = "menubutton"> <img src="images/menuwhite.png" onmouseover="this.src='images/menublue.png'" onmouseout="this.src='images/menuwhite.png'"/>
include_once 'inc/functions.php'; sec_session_start(); if (login_check($conexion) == true) { $logged = 'in'; } else { $logged = 'out'; } if (isset($_GET['error'])) { echo '<p class="error">Error Logging In!</p>'; } ?> <br/> <form action="inc/process_login.php" method="post" name="login_form"> Usuario: <input type="text" name="usuario" /><br/> Password: <input type="password" name="password" id="password"/> <input type="button" value="Login" onclick="formhash(this.form, this.form.password);" /> </form> <?php if (login_check($conexion) == true) { echo '<p>Currently logged ' . $logged . ' as ' . htmlentities($_SESSION['usuario']) . '.</p>'; echo '<p>Do you want to change user? <a href="inc/logout.php">Log out</a>.</p>'; } else { echo '<p>Currently logged ' . $logged . '.</p>'; echo "<p>If you don't have a login, please <a href='register.php'>register</a></p>"; }
<?php include 'conexion.php'; include_once 'inc/functions.php'; sec_session_start(); $usuario = filter_input(INPUT_POST, 'usuario', $filter = FILTER_SANITIZE_STRING); $password = filter_input(INPUT_POST, 'psha', $filter = FILTER_SANITIZE_STRING); // The hashed password. if (!login_check($conexion)) { //no estas autorizado if (isset($usuario, $password)) { if (login($usuario, $password, $conexion) == true) { // Éxito $accion = "lista"; //acción por defecto echo "<div class=\"logout\"> <a href=\"index.php?accion=logout\"> logout {$_SESSION['usuario']} </a></div>"; } else { // Login error: no coinciden usuario y password $accion = "login"; } } else { //significa que aún no has valores para usuario y password $accion = "login"; } } else { //estás autorizado $accion = basename(filter_input(INPUT_GET, 'accion', $filter = FILTER_SANITIZE_STRING)); switch ($accion) { case 'login': $accion = $default_action; break;
include_once 'includes/register.inc.php'; include_once 'includes/functions.php'; sec_session_start(); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Registrera lärare</title> <link rel="stylesheet" type="text/css" href="css/style_register.css"> <script type="text/JavaScript" src="js/sha512.js"></script> <script type="text/JavaScript" src="js/forms.js"></script> </head> <body> <?php if (login_check($mysqli) == true && htmlentities($_SESSION['rank']) == 1) { // Kolla om man gjort något de senaste 40 min. Om inte, logga ut. if (isset($_SESSION['LAST_ACTIVITY']) && time() - $_SESSION['LAST_ACTIVITY'] > 2400) { session_unset(); // unset $_SESSION variable for the run-time header('Location: includes/logout.php'); } $_SESSION['LAST_ACTIVITY'] = time(); // updatera senaste aktivitet ?> <h1>Registrera ny lärare</h1> <hr> <?php if (!empty($error_msg)) { echo $error_msg;
$destination = INDEX_URL; // Remember search query across login if (!empty($_POST['searchQuery'])) { $destination .= '?' . $_POST['searchQuery']; } Header("Location: " . $destination); // Redirect authenticated member exit; } else { print "Error:{$error}"; } } elseif (defined('CERTAUTH_ENABLE') && CERTAUTH_ENABLE == TRUE) { $_POST['username'] = $_SERVER['SSL_CLIENT_S_DN']; $_POST['password'] = "******"; $_POST['authtype'] = "cert"; $error = login_check($_POST); if (trim($error) == "") { $_SESSION["member_id"] = login($_POST); if (stristr($_SESSION["member_id"], "Invalid") == TRUE || stristr($_SESSION["member_id"], "Sorry") == TRUE) { die($_SESSION["member_id"] . "<br><a href=" . INDEX_URL . ">Return</a>"); } // Cdukes: 3/20/08: Carry post variables through login // Ref: http://code.google.com/p/php-syslog-ng/issues/detail?id=35 // Header("Location: " .INDEX_URL); // Redirect authenticated member $destination = INDEX_URL; // Remember search query across login if (!empty($_POST['searchQuery'])) { $destination .= '?' . $_POST['searchQuery']; } Header("Location: " . $destination); // Redirect authenticated member
<?php require_once 'rl_init.php'; if ($options['auto_upload_disable']) { require_once 'deny.php'; exit; } error_reporting(0); ignore_user_abort(true); login_check(); $id = 1; require_once HOST_DIR . 'download/hosts.php'; require_once CLASS_DIR . 'http.php'; include TEMPLATE_DIR . 'header.php'; ?> <br /> <center> <?php // If the user submit to upload, go into upload page if ($_GET['action'] == 'upload') { // Define another constant if (!defined('CRLF')) { define('CRLF', "\r\n"); } // The new line variable $nn = "\r\n"; // Initialize some variables here $uploads = array(); $total = 0; $hostss = array(); // Get number of windows to be opened
<?php include_once 'includes/register.inc.php'; include_once 'includes/db_connect_functions.php'; sec_session_start(); if (login_check($mysqli) == false) { header('Location: signin.php'); } ?> <!doctype html> <html class="signup no-js" lang=""> <!-- Mirrored from sublime.nyasha.me/admin/signup.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 26 Aug 2014 15:26:35 GMT --> <head> <!-- meta --> <meta charset="utf-8"> <meta name="description" content="Flat, Clean, Responsive, application admin template built with bootstrap 3"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"> <!-- /meta --> <title>Sign Up</title> <!-- page level plugin styles --> <!-- /page level plugin styles --> <!-- core styles --> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="css/font-awesome.css"> <link rel="stylesheet" href="css/themify-icons.css">
<?php $pageTitle = "Twitter"; date_default_timezone_set('UTC'); include_once 'includes/session.php'; // TODO, verify what happens if we post over the tweet length limit // TODO, verify what happens if our tweet exceeds length limit yet contains a URL that will be shortened // TODO, verify CURL doesn’t have issues (apparently it will) // are we logged in? no → leave if (!login_check()) { header("Location: /"); exit; } else { $me = $_SESSION['u']; } // are we admin? no → leave if (in_array($me, getAdmins())) { } else { header("Location: /"); exit; } include_once 'includes/functions_events.php'; include_once 'includes/functions_cast.php'; include_once 'includes/functions_twitter.php'; $action = "Failure"; $body = ""; $style = " panel-success"; $nextGameEvent = getNextEvent(false, 3600); $nextCastEvent = getNextEvent(true, 3600); $latestCast = getLatestCast(); $recentTweets = getRecentTweets();
<?php include 'db_connect.php'; include 'functions.php'; sec_session_start(); //custom way of starting session, code inside functions.php // Login Check to guarantee user is logged in // -------------------------------------------------------------------------------------------------------------------------------------- if (!login_check($link)) { //Destroy session session_destroy(); header('Location: index.php'); } // -------------------------------------------------------------------------------------------------------------------------------------- //Query to get usertypename $query = "SELECT UPPER(ut.userType) AS userType FROM users u, usertype ut\n\t\t\t\tWHERE u.id = ?\n\t\t\t\tAND u.userTypeId = ut.userTypeId "; if ($stmt = $link->prepare($query)) { mysqli_stmt_bind_param($stmt, 'i', $_SESSION['user_id']); mysqli_stmt_execute($stmt); $usertype_results = mysqli_stmt_get_result($stmt); if ($usertype_results_rows = mysqli_fetch_assoc($usertype_results)) { $usertype = $usertype_results_rows["userType"]; } } if (!($usertype == 'ADMINISTRATOR' || $usertype == 'OPERATOR')) { // Destroy session session_destroy(); header('Location: index.php'); } // -------------------------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------------------------
<link rel="stylesheet" href="../includes/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="../includes/bootstrap/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="../includes/jquery-ui-1.11.4/jquery-ui.min.css"> <script type="text/javascript" src="../includes/jquery-ui-1.11.4/jquery-ui.min.js"></script> <script type="text/javascript" src="../includes/jquery-2.1.4.min.js"></script> <script src="../../bootstrap/js/bootstrap.min.js"></script> </head> <body> <?php include_once '../includes/functions.php'; include_once '../includes/connect.php'; sec_session_start(); if (!login_check($sql)) { ?> <div class="row"> <div class="col-xs-12 col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8"> <h1 style="text-align:center" class="page-header">Login</h1> <div class="row"> <div class="col-xs-offset-3 col-xs-6 col-sm-offset-4 col-sm-4 col-md-offset-4 col-md-4"> <?php if (isset($_GET['fehler'])) { echo "<div class='alert alert-danger' role='alert'><b>Oh nein!</b> Nutzername oder Passwort falsch. Bitte überprüfe deine Angaben!</div>"; } if (isset($_GET['anm'])) { echo "<div class='alert alert-danger' role='alert'><b>STOP!</b> Sie müssen sich zuerst anmelden!</div>"; }
<?php include_once '../includes/auth-functions.php'; require_once "../includes/api2.php"; if (!isset($_SESSION["login_string"])) { sec_session_start(); } // $db = db::getInstance(); if (!login_check($db)) { header("Location: /index.php"); exit; } $menu["list"] = array("last_projects" => "Проекты", "last_project_responds" => "Заявки", "last_member_responds" => "Отзывы", "members" => "Пользователи", "stats" => "Статистика", "transactions" => "Транзакции", "arbitrage" => "Арбитраж", "support" => "Тех. поддержка", "cashExchange" => "Заявки на вывод"); if (!isset($menu["active"])) { header("Location: /admin/last_projects.php"); } ?> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content=""> <meta name="author" content="Eugeny"> <link rel="icon" href="favicon.ico"> <title>admin weedo</title> <link href="/css/weedo-main3.css" rel="stylesheet"> <link href="/admin/css/main.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="/css/main.css" /> <link rel="stylesheet" type="text/css" href="css/navbar.css" /> <link rel="stylesheet" type="text/css" href="css/fund_list.css" /> <meta charset="UTF-8"> <title>Find a fund</title> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/scripts.js"></script> </head> <?php navbarfunction(login_check($mysqli)); ?> <body class='fund_list'> <div id="content"> <h2>Find the right fund for you</h2> <div id="listContainer"> <div class="listControl"> <!--<a id="expandList">Expand All</a> <a id="collapseList">Collapse All</a>--> </div> <ul id="expList"> <li id='first-level'> <img height = '50px' width = '80px' src="images/world-map.jpg"></img> <a class = 'fund-name'>World Fund</a><br><a id='invest-fund' href='hello'>INVEST</a> <ul>
<?php include_once '../index.php'; include_once '../connectDB.php'; if (login_check($mysqli) && $_SESSION['teamPriv'] == true) { if (isset($_POST['addMembers'])) { echo '<br><br>'; echo $_POST['membersNameArea']; echo '<br><br>'; echo $_POST['membersTextAreaHu']; echo '<br><br>'; echo $_POST['membersTextAreaEn']; if ($_FILES['pictureUpload']['error'] == 0) { if ($stmt = $mysqli->prepare("INSERT INTO GNDTeam (accountid, name, text, textEng, \n\t\t\tpic) VALUES (?, ?, ?, ?, ?)")) { $pic = '/gnd/pic/' . basename($_FILES["pictureUpload"]["name"]); $stmt->bind_param('issss', $_SESSION['userid'], $_POST['membersNameArea'], $_POST['membersTextAreaHu'], $_POST['membersTextAreaEn'], $pic); $stmt->execute(); } else { echo 'DATABASE ERROR'; $_SESSION['msg'] = 'DATABASE ERROR'; } } else { if ($stmt = $mysqli->prepare("INSERT INTO GNDTeam (accountid, name, text, textEng, \n\t\t\tpic) VALUES (?, ?, ?, ?, '/gnd/pic/default.jpg')")) { $stmt->bind_param('isss', $_SESSION['userid'], $_POST['membersNameArea'], $_POST['membersTextAreaHu'], $_POST['membersTextAreaEn']); $stmt->execute(); } else { echo 'DATABASE ERROR'; $_SESSION['msg'] = 'DATABASE ERROR'; } } }
<?php require_once 'common.php'; // check session first if (already_login()) { // print 'already login'; header('Location: index.php'); exit; } // print 'hehe'; $user = check_sql(trim($_POST['username'])); $pwd = check_sql(trim($_POST['password'])); // var_dump($_POST); // print('$user='******'<br>'); // print('$pwd='.$pwd.'<br>'); if (login_check($user, $pwd)) { // print 'login success'; header('Location: index.php'); exit; } ?> <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Login</title> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet">
<?php require_once 'functions.php'; require_once 'output_fns.php'; $db = db_connect(); // Start a secure session sec_session_start(); do_header('Power Manager'); // Make a header with the title in quote marks. if (login_check($db) == false) { // User is not logged in. do_login_page('Please login to use this site.'); exit; } do_nav_bar(); start_content(); ?> <script type="text/javascript"> $(document).ready(function() { // Set up AJAX requests $.ajaxSetup({ cache: false, beforeSend: function() { // Dim ajax_content div while content loads $("#ajax_content").fadeTo('fast', 0.25); // Fade overlay div in $('#overlay').fadeIn('fast') }, complete: function() { // Fade ajax_content div when content loads $("#ajax_content").fadeTo('fast', 1);
<?php include_once 'includes/session.php'; include_once 'includes/db_connect.php'; sec_session_start(); if (login_check($db) != true) { header('Location: /wcp/login.php?error=true'); //die(); } include_once 'includes/menu.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content="Eugeny" > <title>WeeDo Control Panel</title> <!-- Bootstrap Core CSS --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS --> <link href="css/font-awesome.min.css" rel="stylesheet"> <link href="css/wcp.css" rel="stylesheet"> <link href="css/fontawesome-iconpicker.min.css" rel="stylesheet">
<?php include_once 'includes/functions.php'; include_once 'includes/db_connect.php'; sec_session_start(); if (!login_check($mysqli)) { header('Location: index.php?error=login'); } $schools = getUsersSchools($mysqli, $_SESSION["user_id"]); $groups = getUsersGroups($mysqli, $_SESSION["user_id"]); ?> <!DOCTYPE html> <html> <head> <title>After School</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/main.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="js/schoolAjax.js"></script> <script src="js/memberAjax.js"></script> </head> <body> <a href="includes/logout.php">Logout</a> <a href="user.php?id=<?php echo $_SESSION["user_id"]; ?> ">Profile</a>
if (login_check($dbh) == true) { include 'modules/messaging/messages_view.php'; } else { include 'content/login_form.php'; } } elseif ($_GET['opt'] == 'back') { include 'content/back_project.php'; } elseif ($_GET['opt'] == 'wire_trans') { include 'content/wire_trans.php'; } elseif ($_GET['opt'] == 'conf') { include 'modules/user_management/confirm_user.php'; } elseif ($_GET['opt'] == 'login' && login_check($dbh) == false) { include 'content/login_form.php'; } elseif ($_GET['opt'] == 'res_pwd' && login_check($dbh) == false) { include 'content/reset_password.php'; } elseif ($_GET['opt'] == 'lost_pwd' && login_check($dbh) == false) { include 'content/new_password.php'; } elseif ($_GET['opt'] == 'how_it_works') { include 'content/akonato.php'; } elseif ($_GET['opt'] == 'about') { include 'content/about.php'; } elseif ($_GET['opt'] == 'contact') { include 'content/contact.php'; } elseif ($_GET['opt'] == 'coop') { include 'content/coop.php'; } else { include 'content/projects.php'; } ?> </div>
<?php include_once '../index.php'; include_once '../connectDB.php'; if (login_check($mysqli) && $_SESSION['newsPriv'] == true) { if (isset($_POST['editNews'])) { echo '<br><br>'; echo $_POST['newsTitleAreaHu']; echo '<br><br>'; echo $_POST['newsTextAreaHu']; echo '<br><br>'; echo $_POST['newsTitleAreaEn']; echo '<br><br>'; echo $_POST['newsTextAreaEn']; if ($_FILES['pictureUpload']['error'] == 0) { if ($stmt = $mysqli->prepare("UPDATE GNDDocs SET title = ?, titleEng = ?, text = ?, textEng = ?, pic = ?\n\t\tWHERE id = ?")) { $pic = '/gnd/pic/' . basename($_FILES["pictureUpload"]["name"]); $stmt->bind_param('sssssi', $_POST['newsTitleAreaHu'], $_POST['newsTitleAreaEn'], $_POST['newsTextAreaHu'], $_POST['newsTextAreaEn'], $pic, $_POST['article']); $stmt->execute(); } else { echo 'DATABASE ERROR'; $_SESSION['msg'] = 'DATABASE ERROR'; } } else { if ($stmt = $mysqli->prepare("UPDATE GNDDocs SET title = ?, titleEng = ?, text = ?, textEng = ? \n\t\t\tWHERE id = ?")) { $stmt->bind_param('ssssi', $_POST['newsTitleAreaHu'], $_POST['newsTitleAreaEn'], $_POST['newsTextAreaHu'], $_POST['newsTextAreaEn'], $_POST['article']); $stmt->execute(); } else { echo 'DATABASE ERROR'; $_SESSION['msg'] = 'DATABASE ERROR'; }
<?php include_once 'includes/db_connect_PDO.php'; include_once 'includes/functions2.php'; sec_session_start(); $db = db_connect(); if (login_check($db) == true) { $logged = 'in'; } else { $logged = 'out'; } if (login_check($db) == true) { // Add your protected page content here! if (isset($_POST['delete'])) { delete_addressBook($_POST['IDtoDelete']); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Your Brand here - Adress Book</title> <link href="styles/ssmcCSS.css" rel="stylesheet" type="text/css"> </head> <body class="no_col_2"> <div id="site">
<?php include_once '../includes/db_connect.php'; include_once '../includes/functions.php'; sec_session_start(); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Secure Login: Protected Page</title> <link rel="stylesheet" href="styles/main.css" /> </head> <body> <?php if (login_check($mysql) == 5) { ?> <p>Welcome <?php echo htmlentities($_SESSION['username']); ?> !</p> <p> This is an example protected page. To access this page, users must be logged in. At some stage, we'll also check the role of the user, so pages will be able to determine the type of user authorised to access the page. </p> <p>Return to <a href="login.php">login page</a></p> <?php } else { ?>
<?php ini_set('display_errors', 1); include_once 'includes/db_connect.php'; include_once 'includes/functions.php'; date_default_timezone_set("Europe/Moscow"); sec_session_start(); $db_global = $db_remote; if (!login_check($db_global)) { print_r($_SESSION); $urlreq = $_SERVER["REQUEST_URI"]; //echo $targetUrl; header('HTTP/1.0 403 Forbidden'); header('Location: /autoCaller/login.php?error=true&urlreq=' . $urlreq); //echo 'login failed <a href="login.php">login.php</a>'; die; } $sharedFilter = isset($_GET["ref"]) ? $_GET["ref"] : ""; //echo $_GET["ref"]. " / DD:" . $sharedFilter; $accessSQL = "select * from memberTemplatesSettings WHERE templateID = '" . $_SESSION['template'] . "'"; if ($accessParams = $db_global->query($accessSQL)) { while ($setting = $accessParams->fetch_object()) { $access[$setting->name] = $setting->value; } } //echo "targetUrl = ". $_SESSION["targetUrl"]; if (isset($_SESSION["urlreq"]) && $_SESSION["urlreq"] != "") { header('Location: ' . $_SESSION["urlreq"]); $_SESSION["urlreq"] = ""; } $callDir = "/var/www/html/autoCaller/call/";
<?php ini_set("display_errors", 0); include_once "db_connect.php"; include_once 'functions.php'; date_default_timezone_set('GMT'); sec_session_start(); if (login_check($db_CS) != true) { echo "Gou away"; //print_r($_SESSION); //header('HTTP/1.0 403 Forbidden'); die; //header('Location: /acp/login.php'); } $sharedFilter = isset($_GET["ref"]) ? $_GET["ref"] : ""; //echo $_GET["ref"]. " / PR:" . $sharedFilter; $accessSQL = "select * from memberTemplatesSettings WHERE templateID = '" . $_SESSION['template'] . "'"; if ($accessParams = $db_CS->query($accessSQL)) { while ($setting = $accessParams->fetch_object()) { $access[$setting->name] = $setting->value; } } ?> <m id="sharedFilterEncoded" value="<?php echo $sharedFilter; ?> "></m> <div class="row">
<?php include_once "config.php"; include_once "functions.php"; if (login_check($mysqli) == true) { function scheduleRow($ScheduleId, $WeekdayName, $TimeOn, $TimeOff, $Mode, $trClass) { $sReturn = ""; $sModeClass0 = $Mode == 0 ? 'btn-success' : 'btn-default'; $sModeClass1 = $Mode == 1 ? 'btn-success' : 'btn-default'; $sModeClass2 = $Mode == 2 ? 'btn-success' : 'btn-default'; $sReturn .= '<tr id="Schedule' . $ScheduleId . '" class="' . $trClass . '">'; $sReturn .= '<td class="visible-xs">'; $sReturn .= $WeekdayName . '<br />'; $sReturn .= $TimeOn . '<br />'; $sReturn .= $TimeOff; $sReturn .= '</td>'; $sReturn .= '<td class="hidden-xs">' . $WeekdayName . '</td>'; $sReturn .= '<td class="hidden-xs">' . $TimeOn . ':00</td>'; $sReturn .= '<td class="hidden-xs">' . $TimeOff . ':00</td>'; $sReturn .= '<td id="ScheduleModeButtons' . $ScheduleId . '">'; $sReturn .= '<div class="btn-group" role="group">'; $sReturn .= '<button type="button" name="0" class="btn ' . $sModeClass0 . ' ScheduleChangeMode" data-toggle="tooltip" data-placement="top" title="Inactive"><i class="fa fa-power-off"></i></button>'; $sReturn .= '<button type="button" name="1" class="btn ' . $sModeClass1 . ' ScheduleChangeMode" data-toggle="tooltip" data-placement="top" title="Active"><i class="fa fa-sun-o"></i></button>'; $sReturn .= '<button type="button" name="2" class="btn ' . $sModeClass2 . ' ScheduleChangeMode" data-toggle="tooltip" data-placement="top" title="Active when sun is down"><i class="fa fa-moon-o"></i></button>'; $sReturn .= '</div>'; $sReturn .= '</td>'; $sReturn .= '<td><button class="btn btn-danger ScheduleDelete"><i class="fa fa-trash-o"></i></button></td>'; $sReturn .= '</tr>'; return $sReturn; }
private function getMemberFromCookie() { global $db; if (!isset($_SESSION)) { sec_session_start(); } if (login_check($db) === true) { $sec_session_id_weedo = $_COOKIE["sec_session_id_weedo"]; if ($sec_session_id_weedo == "") { return false; } session_id($sec_session_id_weedo); session_name("sec_session_id_weedo"); if (isset($_SESSION["memberID"])) { $member = new Member($_SESSION["memberID"]); } else { $member = new Member(1); } return $member; } else { $member = new Member(1); return $member; } }