function __construct() { // Menciptakan session $salt = "beruangitunyata"; require_once "config/koneksi.php"; require_once 'controller/fungsilogin.php'; $login = new logmein(); if ($login->cek_login($mysqli) == true) { header("location: adminview/index.php"); exit; } elseif (isset($_POST['login'])) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['username']) and isset($_POST['password'])) { $username = addslashes($_POST['username']); # $_POST['username'] diambil dari name pada form login $password = addslashes(md5($_POST['password'] . $salt)); # $_POST['password'] diambil dari name pada form login. MD5 dibuat untuk encrypsi if ($login->login($username, $password, $mysqli) == true) { if ($_SESSION['status'] == '1') { header("location: adminview/index.php"); } else { if ($_SESSION['status_konfirmasi'] == '0') { header("location: index.php?key=aktivasi"); } else { header("location: index.php#caramendaftar"); } exit; } } else { // Gagal login echo "<script>alert('password anda salah'); document.location = 'index.php';</script>"; } } } } else { echo "<script>alert('anda harus login terlebih dahulu'); document.location = 'index.php';</script>"; } }
$password = md5($pass); $log = new logmein(); $log->create_login($username, $password); } } else { title('<img src="/img/info.png" height="32" width="32" > <font color="#990000">Vous avez rentré un mot de passe différent</font>'); } } ///////////////////////// //CREATE USER END //////////////////////// title("Utilisateurs"); ///////////////////////// //SHOW USER //////////////////////// $log = new logmein(); $result = $log->show_users(); echo "<table align=center><tr>"; while ($row = mysql_fetch_assoc($result)) { $username = $row["useremail"]; menu_usr($username); } ///////////////////////// //SHOW USER END //////////////////////// echo "</tr></table>"; title("Nouveau Utilisateur"); echo ' <form method="post"> <table align=center><tr><td> Identifiant :                        
<?php include 'func/class.login.php'; include 'func/func.php'; header_show("Accueil", "style"); // LOGIN START $log = new logmein(); $log->encrypt = true; //set encryption //parameters are(SESSION, name of the table, name of the password field, name of the username field) if ($log->logincheck($_SESSION['loggedin'], "logon", "password", "useremail") == false) { echo '<meta http-equiv="refresh" content="0; URL=index.php">'; } else { //LOGIN END $computername = script("getcomputername"); $windowsver = script("windows"); $windowsver = dosencode($windowsver); // INTERFACE echo '<form name="accform" action="confirm_computername.php" onsubmit="return validateForm()" method="post">'; // INFORMATIONS GENERALES echo "<table align=center>"; menu_img("logout", "logout", "Se déconnecter"); echo '<td><INPUT type="text" value="' . $computername . '" name="computername"></td>'; menu_img("shutdown", "shutdown", "Arrêter WebManage"); echo '</table>'; text($windowsver); // CONFIGURATION title('Configuration'); echo '<table align=center>'; menu("reseau", "network", "Configuration Réseau"); menu_popup("chat", "messagerie", "Messagerie");
<?php include "../../class.login.php"; $log = new logmein(); //Instentiate the class $log->dbconnect(); //Connect to the database $log->encrypt = true; //set to true if password is md5 encrypted. Default is false. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Log In</title> <meta name="Author" content="Ryan Kane" /> <link rel="stylesheet" href="<?php echo $css_header; ?> " type="text/css" /> <script type="text/javascript"> function forgotPass() { document.getElementById('showForm').style.display='block'; document.getElementById('hideLink').style.display='none'; } </script> </head> <body> <?php include '../includes/header.php'; ?>
<?php include "class.login.php"; $log = new logmein(); //Instentiate the class $log->dbconnect(); //Connect to the database $log->encrypt = true; //set to true if password is md5 encrypted. Default is false. if ($log->logincheck($_SESSION['loggedin']) == false) { header("Location:interface/login/login.php"); } else { if ($_SESSION['userlevel'] == 0) { header("Location:interface/admin/main.php"); } else { if ($_SESSION['userlevel'] == 1) { header("Location:interface/physician/main.php"); } else { if ($_SESSION['userlevel'] == 2) { header("Location:interface/receptionist/main.php"); } else { if ($_SESSION['userlevel'] == 3) { header("Location:interface/pharmacisit/main.php"); } } } } }
<?php //instantiate if needed include "class.login.php"; $log = new logmein(); $log->encrypt = true; //set encryption if ($_POST['action'] == "login") { if ($log->login("logon", $_POST['username'], $_POST['password']) == true) { //do something on successful login // CHECK USER LEVELS AND REDIRECT TO APPROPRIATE FILES //echo "Successful Login: "******"! You are now being redirected."; switch ($_SESSION['userlevel']) { case 0: // Admin header("Location:interface/admin/main.php"); break; case 1: // Physician header("Location:interface/physician/main.php"); break; case 2: // Receptionist header("Location:interface/receptionist/main.php"); break; case 3: // Pharmacist header("Location:interface/pharmacist/main.php"); break; default: // Unknown User
<?php include "../../class.login.php"; $log = new logmein(); //Instentiate the class $log->dbconnect(); //Connect to the database $log->encrypt = true; //set to true if password is md5 encrypted. Default is false. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Logged Out</title> <meta name="Author" content="Ryan Kane" /> <link rel="stylesheet" href="<?php echo $css_header; ?> " type="text/css" /> </head> <body> <?php include '../includes/header.php'; ?> <div id="wrapper"> <div style="clear:both;"></div> <div id="login"> <div style="text-align:center"> <h2>You have been logged off.</h2> <p><a href="login.php">Log In</a></p>
//////////////////////// // DELETE USER //////////////////////// if ($_GET["delete"] == 1) { $log = new logmein(); $log->delete_login($user); } ///////////////////////// /// UPDATE PASSWORD ///////////////////////// if ($_POST["pass"] == "") { // DO NOTHING } else { if ($_POST["pass"] == $_POST["pass_confirm"]) { $password = md5($_POST["pass"]); $log = new logmein(); $log->update_password($user, $password); } else { title('<img src="/img/info.png" height="32" width="32" > <font color="#990000">Vous avez rentré un mot de passe différent</font>'); } } header_show($user, "style2"); echo ' <form method="post"> '; title('<INPUT style="background-color:transparent; border:none; text-align:center; font-size:150%; color: #333333;" type="text" value="' . $user . '" name="username_box"><INPUT type="submit" value="OK" />'); echo ' </form> <form method="post"> <table align=center><tr>'; menu_img_get("delete", "user.php?user="******"&delete=1", "Supprimer l'utilisateur");
/* spl_autoload_register( function($className) { require($className.'.php'); } ); */ require fw_incPath . 'GENERAL/classLoader.inc'; spl_autoload_register(array(ClassLoader::getInstance(), 'loadClass')); require_once fw_incPath . 'GENERAL/Cvars.php'; /*if($_POST['log_out']){ unset($_SESSION['user']); session_destroy(); unset($_POST); }*/ $log = new logmein(dbHost, dbName, dbUser, dbPass); $log->encrypt = true; //set encryption if (isset($_POST['password'])) { if (strlen($_POST['password']) > 0) { if ($log->login("logon", $_POST['username'], $_POST['password']) == true) { $_SESSION['admin'] = 1; //echo '<p style="color:darkgreen; text-align:center; width:100%;">Logged in: '.$_SESSION['username'].'</p>'; } else { unset($_SESSION['admin']); echo '<p style="color:red; text-align:center; width:100%;">Login failed! What have you done?!</p>'; } } } if (isset($_GET['logOUT'])) { unset($_SESSION);
<?php session_start(); // Menciptakan session require_once "config/koneksi.php"; require_once 'controller/fungsilogin.php'; $login = new logmein(); if ($login->cek_login($mysqli) == true) { header("location: adminview/index.php"); exit; } elseif (isset($_POST['login'])) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['username']) and isset($_POST['password'])) { $username = addslashes($_POST['username']); # $_POST['username'] diambil dari name pada form login $password = addslashes(md5($_POST['password'])); # $_POST['password'] diambil dari name pada form login. MD5 dibuat untuk encrypsi if ($login->login($username, $password, $mysqli) == true) { header("location: adminview/index.php"); exit; } else { // Gagal login echo "<script>alert('password anda salah'); document.location = 'index.php';</script>"; } } } } else { echo "<script>alert('anda harus login terlebih dahulu'); document.location = 'index.php';</script>"; }
$log->update_log("in", $ip_admin); #CHECK LOGIN if (isset($_POST['password']) and isset($_POST['username'])) { $log = new logmein(); $log->encrypt = true; //set encryption if ($_REQUEST['action'] == "login") { if ($log->login("logon", $_REQUEST['username'], $_REQUEST['password']) == true) { $log = new logmein(); $log->update_log("OK", $ip_admin); echo '<meta http-equiv="refresh" content="0; URL=accueil.php">'; } else { $log = new logmein(); $log->update_log("FAIL", $ip_admin); notify("error", "Alerte Securité", "Mot de passe refusée depuis l'adresse IP: " . $ip_admin); title('<font color="#990000">Mot de passe incorrecte!</font>'); echo '<meta http-equiv="refresh" content="4; URL=index.php">'; } } } #CHECK LOGIN header_show("Mot de passe requis", "style2"); $computername = script("getcomputername"); title("WebManage sur " . $computername); echo '<table align=center><td>'; $log = new logmein(); $log->loginform("loginformname", "loginformid", "index.php"); echo '</td></table>'; title("Toutes tentatives d'intrusion sera loggué"); footer_show(); }
<?php include "func/class.login.php"; $log = new logmein(); $log->encrypt = true; //set encryption //Log out $log->logout(); $log = new logmein(); $log->update_log("out", $ip_admin); echo '<meta http-equiv="refresh" content="0; URL=index.php">';
<?php include 'func/class.login.php'; include 'func/func.php'; // LOGIN START $log = new logmein(); $log->encrypt = true; //set encryption //parameters are(SESSION, name of the table, name of the password field, name of the username field) if ($log->logincheck($_SESSION['loggedin'], "logon", "password", "useremail") == false) { echo '<meta http-equiv="refresh" content="0; URL=index.php">'; } else { //LOGIN END header_show("Historique des connexions", "style"); $log = new logmein(); $result = $log->show_logs(); title("Historique des connexions"); echo "<table align=center>"; while ($row = mysql_fetch_assoc($result)) { $type = $row["type"]; $date = $row["date"]; $ip = $row["ip"]; echo "<tr>"; echo "<td>" . $date . "</td>"; echo "<td>" . $type . "</td>"; echo "<td>" . $ip . "</td>"; echo "</tr>"; } echo "</table>"; back(); footer_show();
<?php include_once 'controller/fungsilogin.php'; $out = new logmein(); $out->logout(true);
<?php include "class.login.php"; $log = new logmein(); //Instentiate the class $log->dbconnect(); //Connect to the database $log->encrypt = true; //set to true if password is md5 encrypted. Default is false. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Log In</title> <meta name="Author" content="Ryan Kane"> <link rel=stylesheet href="<?php echo $css_header; ?> " type="text/css"> <script type="text/javascript"> function forgotPass() { document.getElementById('showForm').style.display='block'; document.getElementById('hideLink').style.display='none'; } </script> </head> <body> <?php include 'includes\\header.php'; ?>
<?php include "class.login.php"; $log = new logmein(); //Instentiate the class $log->dbconnect(); //Connect to the database $log->encrypt = true; //set to true if password is md5 encrypted. Default is false. if ($log->logincheck($_SESSION['loggedin']) == false || $_SESSION['userlevel'] != 2) { //do something if NOT logged in. For example, redirect to login page or display message. echo "Restricted Access: You are not logged in!"; } else { //do something if timeout occurs. if (isset($_SESSION['start'])) { $session_life = time() - $_SESSION['start']; if ($session_life > $inactive) { header("Location:logout.php"); } } $_SESSION['start'] = time(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Receptionist | Home</title> <meta name="Author" content="Ryan Kane"> <link rel=stylesheet href="<?php echo $css_header;
<?php $pagearray = array("home", "help", "about", "newpatient", "viewpatient", "account", "select", "messages"); $which = $_SERVER["QUERY_STRING"]; include "../../class.login.php"; $log = new logmein(); //Instentiate the class $log->dbconnect(); //Connect to the database $log->encrypt = true; //set to true if password is md5 encrypted. Default is false. if ($log->logincheck($_SESSION['loggedin']) == false || $_SESSION['userlevel'] != 1) { //do something if NOT logged in. For example, redirect to login page or display message. echo "Restricted Access: You are not logged in!"; } else { //do something if timeout occurs. if (isset($_SESSION['start'])) { $session_life = time() - $_SESSION['start']; if ($session_life > $inactive) { $log->timeout(); } } $_SESSION['start'] = time(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Physician | Home</title> <meta name="Author" content="Ryan Kane" />
<?php $pagearray = array("home", "help", "about", "newuser", "account"); $which = $_SERVER["QUERY_STRING"]; include "../../class.login.php"; $log = new logmein(); //Instentiate the class $log->dbconnect(); //Connect to the database $log->encrypt = true; //set to true if password is md5 encrypted. Default is false. if ($log->logincheck($_SESSION['loggedin']) == false || $_SESSION['userlevel'] != 0) { //do something if NOT logged in. For example, redirect to login page or display message. echo "Restricted Access: You are not logged in!"; } else { //do something if timeout occurs. if (isset($_SESSION['start'])) { $session_life = time() - $_SESSION['start']; if ($session_life > $inactive) { $log->timeout(); } } $_SESSION['start'] = time(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Admin | Home</title> <meta name="Author" content="Ryan Kane" />