コード例 #1
0
<?php

include_once 'common/base.php';
if (isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) {
}
// define variables and set to empty values
$userNameErr = $passwordErr = "";
if (!empty($_POST['userName']) && !empty($_POST['password'])) {
    include_once "inc/class.users.inc.php";
    $users = new ToolUsers($db);
    echo $users->UserLogIn();
}
?>

<!DOCTYPE html>
<html >
  <head>
    <meta charset="UTF-8">
    <title>Production Schedule Tool</title>
    
    
        <link rel="stylesheet" href="login_addition/css/style.css">	
    
    
  </head>

  <body>

    <div class="wrapper">
	<div class="container">
		<h1>Welcome to Production Schedule Tool</h1>
コード例 #2
0
<?php

session_start();
include_once "../inc/constants.inc.php";
include_once "../inc/class.users.inc.php";
$ClusterObj = new ToolUsers();
if (!empty($_POST['action']) && isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) {
    switch ($_POST['action']) {
        case 'changeClusterName':
            $status = $ClusterObj->updateClusterName() ? "changed" : "failed";
            header("Location: /account.php?email={$status}");
            break;
        case 'changeAccountName':
            $status = $ClusterObj->updatechangeAccountName() ? "changed" : "nomatch";
            header("Location: /account.php?password={$status}");
            break;
        case 'deleteAccount':
            $ClusterObj->deleteAccount();
            break;
        default:
            header("Location: /");
            break;
    }
} else {
    header("Location: /");
    exit;
}
コード例 #3
0
<?php

include_once "../common/base.php";
$pageTitle = "Register";
// check user is logged in and is certified to add new user to the system
if (isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1 && $_SESSION['Role'] != 'OPS') {
    // define variables and set to empty values
    $realNameErr = $userNameErr = $passwordErr = $mailErr = $phoneErr = $roleErr = "";
    //include_once "scripts/showHide.php";
    if (!empty($_POST['realName']) && !empty($_POST['userName']) && !empty($_POST['password']) && !empty($_POST['mail'])) {
        include_once "../inc/class.users.inc.php";
        $users = new ToolUsers(db);
        echo $users->CreateUser();
    }
    ?>

<!DOCTYPE HTML> 
<html>
<head>
  <link href='http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css' rel='stylesheet' type='text/css'>
  <link href='//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.2.0/css/datepicker.min.css' rel='stylesheet' type='text/css'>
  <link href='//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/1.8/css/bootstrap-switch.css' rel='stylesheet' type='text/css'>
  <link href='http://davidstutz.github.io/bootstrap-multiselect/css/bootstrap-multiselect.css' rel='stylesheet' type='text/css'>
  <script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js' type='text/javascript'></script>
  <script src='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0/js/bootstrap.min.js' type='text/javascript'></script>
  <script src='//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.2.0/js/bootstrap-datepicker.min.js' type='text/javascript'></script>
  <script src='//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/1.8/js/bootstrap-switch.min.js' type='text/javascript'></script>
  <script src='http://davidstutz.github.io/bootstrap-multiselect/js/bootstrap-multiselect.js' type='text/javascript'></script>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
コード例 #4
0
<?php

include_once "common/base.php";
if (isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) {
    $pageTitle = "Your Account";
    //include_once "common/header.php";
    include_once 'inc/class.users.inc.php';
    $users = new ToolUsers($db);
    if (isset($_GET['email']) && $_GET['email'] == "changed") {
        echo "<div class='message good'>Your email address " . "has been changed.</div>";
    } else {
        if (isset($_GET['email']) && $_GET['email'] == "failed") {
            echo "<div class='message bad'>There was an error " . "changing your email address.</div>";
        }
    }
    if (isset($_GET['password']) && $_GET['password'] == "changed") {
        echo "<div class='message good'>Your password " . "has been changed.</div>";
    } elseif (isset($_GET['password']) && $_GET['password'] == "nomatch") {
        echo "<div class='message bad'>The two passwords " . "did not match. Try again!</div>";
    }
    if (isset($_GET['delete']) && $_GET['delete'] == "failed") {
        echo "<div class='message bad'>There was an error " . "deleting your account.</div>";
    }
    list($userID, $v) = $users->retrieveAccountInfo();
    ?>

        <h2>Your Account</h2>
        <form method="post" action="db-interaction/users.php">
            <div>
                <input type="hidden" name="userid"
                    value="<?php 
コード例 #5
0
<?php

include_once '../common/base.php';
// if user is logged in
if (isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) {
    header('Location: ../cssmenu/mainPage.php');
}
// define variables and set to empty values
$userNameErr = $passwordErr = "";
if (!empty($_POST['userName']) && !empty($_POST['password'])) {
    include_once "../inc/class.users.inc.php";
    $users = new ToolUsers(db);
    echo $users->LogInUser();
}
?>

<!DOCTYPE html>
<html >
  <head>
    <meta charset="UTF-8">
    <title>Production Schedule Tool</title>
    
    
        <link rel="stylesheet" href="../login_addition/css/style.css">	
    
    
  </head>

  <body>

    <div class="wrapper">
コード例 #6
0
<?php

include_once "common/base.php";
if (isset($_GET['v']) && isset($_GET['e'])) {
    include_once "inc/class.users.inc.php";
    $users = new ToolUsers($db);
    $ret = $users->verifyAccount();
} elseif (isset($_POST['v'])) {
    include_once "inc/class.users.inc.php";
    $users = new ToolUsers($db);
    $status = $users->updatePassword() ? "changed" : "failed";
    header("Location: /account.php?password={$status}");
    exit;
} else {
    header("Location: /login.php");
    exit;
}
$pageTitle = "Reset Your Password";
//include_once "common/header.php";
if (isset($ret[0])) {
    echo isset($ret[1]) ? $ret[1] : NULL;
    if ($ret[0] < 3) {
        ?>

        <h2>Reset Your Password</h2>

        <form method="post" action="accountverify.php">
            <div>
                <label for="p">Choose a New Password:</label>
                <input type="password" name="p" id="p" /><br />
                <label for="r">Re-Type Password:</label>
コード例 #7
0
<?php

include_once "common/base.php";
$pageTitle = "Home";
//include_once "common/header.php";
if (!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username'])) {
    ?>

        <p>You are currently <strong>logged in.</strong></p>
        <p><a href="/logout.php">Log out</a></p>
<?php 
} elseif (!empty($_POST['username']) && !empty($_POST['password'])) {
    include_once 'inc/class.users.inc.php';
    $users = new ToolUsers($db);
    if ($users->accountLogin() === TRUE) {
        echo "<meta http-equiv='refresh' content='0;/'>";
        exit;
    } else {
        ?>

        <h2>Login Failed&mdash;Try Again?</h2>
        <form method="post" action="login.php" name="loginform" id="loginform">
            <div>
                <input type="text" name="username" id="username" />
                <label for="username">Email</label>
                <br /><br />
                <input type="password" name="password" id="password" />
                <label for="password">Password</label>
                <br /><br />
                <input type="submit" name="login" id="login" value="Login" class="button" />
            </div>
コード例 #8
0
.error {color: #00FF00;}
</style>
</head>
<body> 


<?php 
include_once "common/base.php";
// define variables and set to empty values
$clusterErr = "";
$cluster_name = "";
//include_once "common/myFiles/header.php";
//include_once "scripts/showHide.php";
if (!empty($_POST['usersData'])) {
    include_once "inc/class.users.inc.php";
    $users = new ToolUsers(db);
    echo $users->RemoveUser();
}
?>


<script language="javascript" type="text/javascript">
	function changeTest ( form ) 
	{
		form.userName.value = form.realName.value
	}				
</script>

<h2>Remove user</h2>
<form class="form-remove" role="form" method="post" action="removeuser.php"> 
   <table style="width:120%" cellspacing="20px">
コード例 #9
0
<?php

include_once "common/base.php";
$pageTitle = "Verify Your Account";
//include_once "common/header.php";
if (isset($_GET['v']) && isset($_GET['e'])) {
    include_once "inc/class.users.inc.php";
    $users = new ToolUsers($db);
    $ret = $users->verifyAccount();
} elseif (isset($_POST['v'])) {
    include_once "inc/class.users.inc.php";
    $users = new ToolUsers($db);
    $ret = $users->updatePassword();
} else {
    header("Location: /signup.php");
    exit;
}
if (isset($ret[0])) {
    echo isset($ret[1]) ? $ret[1] : NULL;
    if ($ret[0] < 3) {
        ?>

        <h2>Choose a Password</h2>

        <form method="post" action="accountverify.php">
            <div>
                <label for="p">Choose a Password:</label>
                <input type="password" name="p" id="p" /><br />
                <label for="r">Re-Type Password:</label>
                <input type="password" name="r" id="r" /><br />
                <input type="hidden" name="v" value="<?php 
コード例 #10
0
<?php

include_once "common/base.php";
$pageTitle = "Register";
// define variables and set to empty values
$realNameErr = $userNameErr = $mailErr = $phoneErr = $roleErr = "";
$oldPasswordErr = $newPasswordErr = $verifyPasswordErr = "";
include_once "common/myFiles/header.php";
//include_once "scripts/showHide.php";
// collecting userData from table.
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    include_once "inc/class.users.inc.php";
    $users = new ToolUsers(db);
    echo $users->UpdateUser();
}
?>
        <h2 aligment="center">Update User Information</h2>
		<form class="form-signin" method="post" action="addnewuser.php" id="registerform">
			<table style="width:300%" cellspacing="40px">
				<tr>
					<td width="100"><label for="realName">Real Name: </label></td>
					<td width="150"><input type="text" name="realName" id="realName" size="25" maxlength="30" 
						value="<?php 
if (isset($_POST['realName'])) {
    echo $_POST['realName'];
}
?>
" required/></td>
					<td><span class="error"><?php 
echo $realNameErr;
?>
コード例 #11
0
<?php

session_start();
include_once "../inc/constants.inc.php";
include_once "../inc/class.users.inc.php";
$userObj = new ToolUsers();
if (!empty($_POST['action']) && isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) {
    switch ($_POST['action']) {
        case 'changeemail':
            $status = $userObj->updateEmail() ? "changed" : "failed";
            header("Location: /account.php?email={$status}");
            break;
        case 'changepassword':
            $status = $userObj->updatePassword() ? "changed" : "nomatch";
            header("Location: /account.php?password={$status}");
            break;
        case 'deleteaccount':
            $userObj->deleteAccount();
            break;
        default:
            header("Location: /");
            break;
    }
} elseif ($_POST['action'] == "resetpassword") {
    if ($resp = $userObj->resetPassword() === TRUE) {
        header("Location: /resetpending.php");
    } else {
        echo $resp;
    }
    exit;
} else {