Vous êtes sur la page 1sur 82

User Management System

Saurabh Bhandari
00113702014

CHAPTER 1: Introduction

1.1 Organization Description

User management system provides functionality to manage personal profiles and users.
Personal profiles contain information such as profile identification number, email, first and
last name, etc. Personal profiles are used for personal information such as names, addresses,
etc. In order to access personal profile for reading and modification PIN number is used for
authentication. User information contains user identification number, username, password
and session for authentication.

1.2 About the proposed system

1.2.1 Aim
The main aims of the system are:

To provide online user registration


To manage user database.
To edit users details.
To delete user form database.

1
User Management System
Saurabh Bhandari
00113702014

1.2.2 Block Diagram

2
User Management System
Saurabh Bhandari
00113702014

3
User Management System
Saurabh Bhandari
00113702014

Fig. 1.1

1.2.3 Modules

The Modules of the System are as follows: -

ADMIN

Login: Admin has to Login to manage the whole website.

Manage User- Admin manages all the users in the database.

Delete User- Admin can delete user from database.

USER

Login: User has to Login to listen and download the songs.

Edit Profile: User can view and edit their profile after registering and logging in
on the website.

Registration: This module is accessible by the user to register on the website to


access all the features.

1.3 Scope of the system

4
User Management System
Saurabh Bhandari
00113702014

This product provides a simple user management page that lets you view, search users, create
new user accounts, and edit existing ones. Also provides tools to disable or delete users,
manage permissions, and issue password resets.

1.4 Methodology for Data Collection

1.4.1 Primary Data Collection


This involves collecting data by means of direct interactions with the human
subject. No primary data collection method is used in making this system.

1.4.2 Secondary Data Collection

Secondary Data Collection is an existing data from a prior published study.

Books:
W. Keith, Extending Jquery,3rd edition
H. Brian P.,Html 5 & CSS3, 4th edition
G. Peter,The Book of CSS3,4th edition
J. Terry & T. Nicholas H., Learning JqueryDeferreds, 5th edition
Kaithey and Serra,Head First, 2nd edition
G. Jason, Charlton, Pure JavaScript,5th edition

Internet:

www.daniweb.com
www.techenclave.com
www.jsptut.com
www.w3schools.com
www.brookings.edu
www.redbooks.com
www.tutorialspoint.com
www.corewebprogramming.com

5
User Management System
Saurabh Bhandari
00113702014

1.5 Methodology for Analysis, Design and Development

1.5.1 Stages of Iterative Waterfall Model

Requirement Gathering and analysis: All possible requirements of the system to be


developed are captured in this phase and documented in a requirement specification
doc.

System Design: The requirement specifications from first phase are studied in this
phase and system design is prepared. System Design helps in specifying hardware and
system requirements and also helps in defining overall system architecture.

Implementation: With inputs from system design, the system is first developed in
small programs called units, which are integrated in the next phase. Each unit is
developed and tested for its functionality which is referred to as Unit Testing.

Integration and Testing: All the units developed in the implementation phase are
integrated into a system after testing of each unit. Post integration the entire system is
tested for any faults and failures.

Deployment of system: Once the functional and non-functional testing is done, the
product is deployed in the customer environment or released into the market.

Maintenance: There are some issues which come up in the client environment. To fix
those issues patches are released. Also, to enhance the product some better versions
are released. Maintenance is done to deliver these changes in the customer
environment.

All these phases are cascaded to each other in which progress is seen as flowing
steadily downwards (like a waterfall) through the phases. The next phase is started

6
User Management System
Saurabh Bhandari
00113702014

only after the defined set of goals are achieved for previous phase and it is signed off,
so the name "Waterfall Model". In this model phases do not overlap.

1.5.2 Block Diagram of Iterative Waterfall Model

7
User Management System
Saurabh Bhandari
00113702014

Fig 1.2 Block Diagram for Iterative Waterfall Model

1.5.3 Reasons for choosing Iterative Waterfall Model

The iterative waterfall development model allows for departmentalization and control.
A schedule can be set with deadlines for each stage of development and a product can
proceed through the development process model phases one by one.

Development moves from concept, through design, implementation, testing, and ends
up at operation and maintenance. Each phase of development proceeds in strict order.

Some other reasons for choosing the model are:

Requirements are very well documented, clear and fixed.

Product definition is stable.

Technology is understood and is not dynamic.

There are no ambiguous requirements.

Ample resources with required expertise are available to support the product.

The project is short.

1.5.4 System Tools Requirements

1.5.4.1 Software requirements:

8
User Management System
Saurabh Bhandari
00113702014

Operating System Microsoft Windows XP or Higher


Web Server XAMPP 5.6.3

Front-End Tech HTML, JavaScript, CSS


Back-End Tech PHP 5.6, MySQL 5.0

1.5.4.2 Hardware requirements:


RAM 256 MB
Processor Pentium(R) Dual Core CPU, 1.60 GHz
Hard Disk Drive(HDD) 2 GB

1.5.5 Project Planning Gantt Chart

9
User Management System
Saurabh Bhandari
00113702014

Table. 1.3

Table. 1.4

CHAPTER 2

SYSTEM REQUIREMENT ANALYSIS

2.1 Process and description

ADMIN

Login: Admin has to Login to manage the whole website.

Manage User- Admin manages all the users in the database.

Delete User- Admin can delete user from database.

USER

10
User Management System
Saurabh Bhandari
00113702014

Login: User has to Login to listen and download the songs.

Edit Profile: User can view and edit their profile after registering and logging in
on the website.

Registration: This module is accessible by the user to register on the website to


access all the features.

2. 2 System Processes and input/output identifications


2.2.1 System processes
Register
Login
Manage user
Edit user
Delete user

2.2.2 Input/output data description

11
User Management System
Saurabh Bhandari
00113702014

S
PROCESS INPUT OUTPUT
NO.
For Username, Password,
1. Registration Course, contact number, Login Id
Email Id, Address.
Users Login Id and
Login Confirmation.
2. Login Password, Admins Id and
password
Manage users and edit user
3. Manage User User Details updated
details
4. Delete User Delete existing user User removed

2.3 Use Case Diagram

The Use case describes what of a system not how. They only give functional
view of the system. Use cases are structured outline or templates for the
description of user requirement, model in a structured language like English.
Use case diagrams are graphical representation that may be decomposed into
further levels of the abstraction.

Actor

An Actor models a type of role played by an entity that interacts with the
subject (e.g., by exchanging signals and data), but which is external to the
subject (i.e., in the sense that an instance of an actor is not a part of the
instance of its corresponding subject). Actors may represent roles played by
human users, external hardware, or other subjects.

Association

An association specifies a semantic relationship that can occur between typed


instances. It has at least two ends represented by properties, each of which is

12
User Management System
Saurabh Bhandari
00113702014

connected to the type of the end. More than one end of the association may
have the same type.

System

If a subject (or system boundary) is displayed, the use case ellipse is visually
located inside the system boundary rectangle. Note that this does not necessarily
mean that the subject classifier owns the contained use cases, but merely that the
use case applies to that classifier.

Use Case

A use case is the specification of a set of actions performed by a system,


which yields an observable result that, is, typically, of value for one or more
actors or other stakeholders of the system.

13
User Management System
Saurabh Bhandari
00113702014

Fig. 2.1 USE CASE DIAGRAM

2.4 Identification and description of mathematical procedures.


NA

2.5 Identification and description of various security checks and validations


checks in the system.

14
User Management System
Saurabh Bhandari
00113702014

2.5.1 Registration Validations

Fields Description Security checks


User Name Full Name of the Student is Name should have only
mandatory. Alphabets. No numeric key
is allowed.
Password Security key of the person Cant be left blank and can
for future reference. have Alphanumeric keys.
Email Address Valid Email Id of the Email Id should have correct
Student. sequence of special
keywords used. Can be
Alphanumeric.
Contact Number Valid Number of the Student Must be of 10 Numeric keys

Table 2.1

2.5.2 Login Validations

Fields Description Security checks


User Name A valid User Id/Admin Id Should be same as
of the person. provided during the
registration. Matched from
the database.
Password A Valid Password of the Should be same as
person. provided during the
registration. Matched from
the database.

Table 2.2

CHAPTER 3

SYSTEM DESIGN

3.1. PHYSICAL DESIGN

15
User Management System
Saurabh Bhandari
00113702014

The physical design relates to the actual input and output processes of the system. This is
laid down in terms of how data is input into a system, how it is verified / authenticated,
how it is processed, and how it is displayed as output.

Physical design, in this context, does not refer to the tangible physical design of an
information system. To use an analogy, a personal computer's physical design involves
input via a keyboard, processing within the CPU, and output via a monitor, printer, etc. It
would not concern the actual layout of the tangible hardware, which for a PC would be a
monitor, CPU, motherboard, hard drive, modems, video/graphics cards, USB slots, etc.

3.1.1. CLASS DIAGRAM

In software engineering, a class diagram in the Unified Modeling Language (UML) is a


type of static structure diagram that describes the structure of a system by showing the
system's classes, their attributes, operations (or methods), and the relationships among
objects.

The class diagram is the main building block of object-oriented modelling. It is used both
for general conceptual modelling of the systematics of the application, and for detailed
modelling translating the models into programming code. Class diagrams can also be
used for data modeling. The classes in a class diagram represent both the main
elements, interactions in the application, and the classes to be programmed.

16
User Management System
Saurabh Bhandari
00113702014

Fig. 3.1

17
User Management System
Saurabh Bhandari
00113702014

18
User Management System
Saurabh Bhandari
00113702014

3.1.2.ER- Diagram
An Entity Relationship Diagram (ER-Diagram) is a model that identifies the concept or
entities that exist in a system and the relationships between those entities. An ERD is often used
as a way to visualize a relational database: each entity represents a database table and the
relationship lines represents the key in one table that point to specific records in related tables.

Advantages of ER Diagram

Professional and faster Development.

Productivity Improvement.

Fewer Faults in Development.

Maintenance becomes easy.

19
User Management System
Saurabh Bhandari
00113702014

Fig. 3.2

3.2 Processing Logic

3.2.1. Activity Diagram

20
User Management System
Saurabh Bhandari
00113702014

Fig. 3.3 Activity Diagram for User

3.2.2Sequence Diagram

21
User Management System
Saurabh Bhandari
00113702014

Fig. 3.4 Sequence Diagram for Login

22
User Management System
Saurabh Bhandari
00113702014

3.2.3 Flow Chart

Fig. 3.5

23
User Management System
Saurabh Bhandari
00113702014

3.3 Interface Design


3.3.1 Output Design
The output specifications of the existing information system include the detailed

characteristics of contents included in each Report. The description for each Visual Basic

Output Report has been mentioned

EXISTING SYSTEM DESIGN (Graphical User Interface)

1. Login Page

24
User Management System
Saurabh Bhandari
00113702014

2. Admin Login

3. Manage Users

25
User Management System
Saurabh Bhandari
00113702014

4. Edit User Details

26
User Management System
Saurabh Bhandari
00113702014

5. User Details Updated

6. Delete User

27
User Management System
Saurabh Bhandari
00113702014

7. User Removed

3.3.2 Input Design

28
User Management System
Saurabh Bhandari
00113702014

TABLE NAME COLUMN FIELD SIZE PRIMARY NULL DESCRIPTION


NAME TYPE KEY

USERS id int 11 YES NO Primary key

fname varchar 255 NO NO first name of


the user

lname Varchar 255 NO NO last name of


the user.

email Varchar 255 NO NO e-mail id of the


user.

password Varchar 300 NO NO password of


the user

contactno varchar 11 NO NO mobile number


of the user.

posting_date date NO NO joining date

Admin id int 11 NO NO Primary key

username varchar 255 NO NO user-id of


admin

password varchar 255 NO NO Password of


the admin

Table 3.1

3.2 Database and File Design

3.2.1 Admin Database

29
User Management System
Saurabh Bhandari
00113702014

3.2.2 User Database

CHAPTER 4

SYSTEM DEVELOPMENT

30
User Management System
Saurabh Bhandari
00113702014

4.1. SOURCE CODE

INDEX.PHP

<?php session_start();

$mysql_hostname ="localhost";

$mysql_user ="root";

$mysql_password ="";

$mysql_database ="loginsystem";

$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or


die("Could not connect database");

mysql_select_db($mysql_database, $bd) or die("Could not select database");

//Code for Registration

if(isset($_POST['signup']))

$fname=$_POST['fname'];

$lname=$_POST['lname'];

$email=$_POST['email'];

$password=$_POST['password'];

$contact=$_POST['contact'];

$enc_password=md5($password);

$a=date('Y-m-d');

31
User Management System
Saurabh Bhandari
00113702014

$msg=mysql_query("insert into
users(fname,lname,email,password,contactno,posting_date)
values('$fname','$lname','$email','$enc_password','$contact','$a')");

if($msg)

echo "<script>alert('Register successfully');</script>";

// Code for login system

if(isset($_POST['login']))

$password=$_POST['password'];

$dec_password=md5($password);

$ret= mysql_query("SELECT * FROM users WHERE email='".


$_POST['uemail']."' and password='$dec_password'");

$num=mysql_fetch_array($ret);

if($num>0)

$extra="welcome.php";

$_SESSION['login']=$_POST['uemail'];

$_SESSION['id']=$num['id'];

$_SESSION['name']=$num['fname'];

32
User Management System
Saurabh Bhandari
00113702014

$host=$_SERVER['HTTP_HOST'];

$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

header("location:http://$host$uri/$extra");

exit();

else

echo "<script>alert('Invalid username or password');</script>";

$extra="index.php";

$host = $_SERVER['HTTP_HOST'];

$uri = rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

//header("location:http://$host$uri/$extra");

exit();

//Code for Forgot Password

if(isset($_POST['send']))

$row1=mysql_query("select email,password from users where email='".


$_POST['femail']."'");

33
User Management System
Saurabh Bhandari
00113702014

$row2=mysql_fetch_array($row1);

if($row2>0)

$email = $row2['email'];

$subject = "Information about your password";

$password=$row2['password'];

$message = "Your password is ".$password;

mail($email, $subject, $message, "From: $email");

echo "<script>alert('Your Password has been sent Successfully');</script>";

else

echo "<script>alert('Email not register with us');</script>";

?>

<!DOCTYPE html>

<html>

<head>

<title>Login System</title>

<link href="css/style.css" rel='stylesheet' type='text/css' />

34
User Management System
Saurabh Bhandari
00113702014

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="keywords" content="Elegent Tab Forms,Login Forms,Sign up


Forms,Registration Forms,News latter Forms,Elements"./>

<script type="application/x-javascript"> addEventListener("load", function()


{ setTimeout(hideURLbar, 0); }, false); function hideURLbar()
{ window.scrollTo(0,1); } </script>

</script>

<script src="js/jquery.min.js"></script>

<script src="js/easyResponsiveTabs.js" type="text/javascript"></script>

<script type="text/javascript">

$(document).ready(function () {

$('#horizontalTab').easyResponsiveTabs({

type: 'default',

width: 'auto',

fit: true

});

});

</script>

<link href='http://fonts.googleapis.com/css?
family=Source+Sans+Pro:200,400,600,700,200italic,300italic,400italic,600italic|
Lora:400,700,400italic,700italic|Raleway:400,500,300,600,700,200,100'
rel='stylesheet' type='text/css'>

</head>

35
User Management System
Saurabh Bhandari
00113702014

<body>

<div class="main">

<h1>Registration and Login System</h1>

<div class="sap_tabs">

<div id="horizontalTab" style="display: block; width: 100%;


margin: 0px;">

<ul class="resp-tabs-list">

<li class="resp-tab-item" aria-controls="tab_item-0"


role="tab"><div class="top-img"><img src="images/top-note.png"
alt=""/></div><span>Register</span>

</li>

<li class="resp-tab-item" aria-controls="tab_item-1"


role="tab"><div class="top-img"><img src="images/top-lock.png"
alt=""/></div><span>Login</span></li>

<li class="resp-tab-item lost" aria-controls="tab_item-


2" role="tab"><div class="top-img"><img src="images/top-key.png"
alt=""/></div><span>Forgot Password</span></li>

<div class="clear"></div>

</ul>

<div class="resp-tabs-container">

<div class="tab-1 resp-tab-content" aria-


labelledby="tab_item-0">

<div class="facts">

36
User Management System
Saurabh Bhandari
00113702014

<div class="register">

<form name="registration"
method="post" action="" enctype="multipart/form-data">

<p>First Name </p>

<input type="text" class="text"


value="" name="fname" required >

<p>Last Name </p>

<input type="text" class="text"


value="" name="lname" required >

<p>Email Address </p>

<input type="text" class="text"


value="" name="email" >

<p>Password </p>

<input type="password"
value="" name="password" required>

<p>Contact No.
</p>

<input type="text" value=""


name="contact" required>

<div class="sign-up">

<input type="reset"
value="Reset">

<input type="submit"
name="signup" value="Sign Up" >

37
User Management System
Saurabh Bhandari
00113702014

<div class="clear">
</div>

</div>

</form>

</div>

</div>

</div>

<div class="tab-2 resp-tab-content" aria-labelledby="tab_item-


1">

<div class="facts">

<div class="login">

<div class="buttons">

</div>

<form name="login" action=""


method="post">

<input type="text" class="text"


name="uemail" value="" placeholder="Enter your registered email" ><a href="#"
class=" icon email"></a>

<input type="password"
value="" name="password" placeholder="Enter valid password"><a href="#"
class=" icon lock"></a>

38
User Management System
Saurabh Bhandari
00113702014

<div class="p-container">

<div class="submit
two">

<input type="submit"
name="login" value="LOG IN" >

</div>

<div class="clear">
</div>

</div>

</form>

</div>

</div>

</div>

<div class="tab-2 resp-tab-content" aria-


labelledby="tab_item-1">

<div class="facts">

<div class="login">

<div class="buttons">

</div>

39
User Management System
Saurabh Bhandari
00113702014

<form name="login" action=""


method="post">

<input type="text" class="text"


name="femail" value="" placeholder="Enter your registered email" required ><a
href="#" class=" icon email"></a>

<div
class="submit three">

<input
type="submit" name="send" onClick="myFunction()" value="Send Email" >

</div>

</form>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</body>

</html>

40
User Management System
Saurabh Bhandari
00113702014

CHECKLOGIN.PHP

<?php

function check_login()

if(strlen($_SESSION['login'])==0)

$host=$_SERVER['HTTP_HOST'];

$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');

$extra="index.php";

$_SESSION["login"]="";

header("Location: http://$host$uri/$extra");

?>

LOGIN.PHP

<?php

session_start();

include('dbconnection.php');

if(isset($_POST['login']))

$password=$_POST['password'];

$dec_password=$password;

41
User Management System
Saurabh Bhandari
00113702014

$ret= mysql_query("SELECT * FROM users WHERE email='".


$_POST['uemail']."' and password='$dec_password'");

$num=mysql_fetch_array($ret);

if($num>0)

$extra="welcome.php";

$_SESSION['login']=$_POST['uemail'];

$_SESSION['id']=$num['id'];

$host=$_SERVER['HTTP_HOST'];

$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

header("location:http://$host$uri/$extra");

exit();

else

$_SESSION['action1']="Invalid username or password";

$extra="index.php";

$host = $_SERVER['HTTP_HOST'];

$uri = rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

header("location:http://$host$uri/$extra");

exit();

}}?>
42
User Management System
Saurabh Bhandari
00113702014

WELCOME.PHP

<?php

session_start();

include("checklogin.php");

check_login();

?><!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="">

<title>Welcome </title>

<link href="css/bootstrap.min.css" rel="stylesheet">

<link href="css/heroic-features.css" rel="stylesheet">

</head>

43
User Management System
Saurabh Bhandari
00113702014

<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">

<div class="container">

<div class="navbar-header">

<button type="button" class="navbar-toggle" data-toggle="collapse"


data-target="#bs-example-navbar-collapse-1">

<span class="sr-only">Toggle navigation</span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a class="navbar-brand" href="#">Welcome !</a>

</div>

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<ul class="nav navbar-nav">

<li>

<a href="#"><?php echo $_SESSION['name'];?></a>

</li>

<li>

<a href="logout.php">Logout</a>

</li>

</ul>
44
User Management System
Saurabh Bhandari
00113702014

</div>

</div>

</nav>

<div class="container">

<header class="jumbotron hero-spacer">

<h1>A Warm Welcome!</h1>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa, ipsam,
eligendi, in quo sunt possimus non incidunt odit vero aliquid similique quaerat nam
nobis illo aspernatur vitae fugiat numquam repellat.</p>

<p><a href="logout.php" class="btn btn-primary btn-large">Logout </a>

</p>

</header>

<hr>

</div>

<hr>

45
User Management System
Saurabh Bhandari
00113702014

</div>

<script src="js/jquery.js"></script>

<script src="js/bootstrap.min.js"></script>

</body>

</html>

LOGOUT.PHP

<?php

session_start();

$_SESSION['login']=="";

session_unset();

$_SESSION['action1']="You have logged out successfully..!";

?>

<script language="javascript">

document.location="index.php";

</script>

46
User Management System
Saurabh Bhandari
00113702014

ADMIN LOGIN.PHP

<?php

session_start();

include("dbconnection.php");

if(isset($_POST['login']))

$ret=mysql_query("SELECT * FROM admin WHERE username='".


$_POST['username']."' and password='".$_POST['password']."'");

$num=mysql_fetch_array($ret);

if($num>0)

$extra="manage-users.php";

$_SESSION['login']=$_POST['username'];

$_SESSION['id']=$num['id'];

echo "<script>window.location.href='".$extra."'</script>";

exit();

else

$_SESSION['action1']="*Invalid username or password";

$extra="index.php";

echo "<script>window.location.href='".$extra."'</script>";

47
User Management System
Saurabh Bhandari
00113702014

exit();

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="">

<meta name="author" content="Dashboard">

<meta name="keyword" content="Dashboard, Bootstrap, Admin, Template,


Theme, Responsive, Fluid, Retina">

<title>Admin | Login</title>

<link href="assets/css/bootstrap.css" rel="stylesheet">

<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />

<link href="assets/css/style.css" rel="stylesheet">

<link href="assets/css/style-responsive.css" rel="stylesheet">

</head>

<body>

48
User Management System
Saurabh Bhandari
00113702014

<div id="login-page">

<div class="container">

<form class="form-login" action="" method="post">

<h2 class="form-login-heading">sign in now</h2>

<p style="color:#F00; padding-top:20px;" align="center"><?php echo


$_SESSION['action1'];?><?php echo $_SESSION['action1']="";?></p>

<div class="login-wrap">

<input type="text" name="username" class="form-control"


placeholder="User ID" autofocus>

<br>

<input type="password" name="password" class="form-


control" placeholder="Password"><br >

<input name="login" class="btn btn-theme btn-block"


type="submit">

</div>

</form>

</div>

</div>

<script src="assets/js/jquery.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script type="text/javascript" src="assets/js/jquery.backstretch.min.js"></script>

<script>

49
User Management System
Saurabh Bhandari
00113702014

$.backstretch("assets/img/login-bg.jpg", {speed: 500});

</script> </body> </html>

MANAGE-USERS.PHP

<?php

session_start();

$mysql_hostname ="localhost";

include'dbconnection.php';

include("checklogin.php");

check_login();

if(isset($_GET['id']))

$msg=mysql_query("delete from users where id='".$_GET['id']."'");

if($msg)

echo "<script>alert('Data deleted');</script>";

}}

?><!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="">

50
User Management System
Saurabh Bhandari
00113702014

<meta name="author" content="Dashboard">

<meta name="keyword" content="Dashboard, Bootstrap, Admin, Template,


Theme, Responsive, Fluid, Retina">

<title>Admin | Manage Users</title>

<link href="assets/css/bootstrap.css" rel="stylesheet">

<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />

<link href="assets/css/style.css" rel="stylesheet">

<link href="assets/css/style-responsive.css" rel="stylesheet">

</head>

<body> <section id="container" >

<header class="header black-bg">

<div class="sidebar-toggle-box">

<div class="fa fa-bars tooltips" data-placement="right" data-original-


title="Toggle Navigation"></div>

</div>

<a href="#" class="logo"><b>Admin Dashboard</b></a>

<div class="nav notify-row" id="top_menu">

</ul>

</div>

<div class="top-menu">

<ul class="nav pull-right top-menu">

<li><a class="logout" href="logout.php">Logout</a></li>

</ul>

51
User Management System
Saurabh Bhandari
00113702014

</div>

</header>

<aside>

<div id="sidebar" class="nav-collapse ">

<ul class="sidebar-menu" id="nav-accordion">

<p class="centered"><a href="#"><img src="assets/img/ui-sam.jpg"


class="img-circle" width="60"></a></p>

<h5 class="centered"><?php echo $_SESSION['login'];?></h5>

<li class="mt">

<a href="change-password.php">

<i class="fa fa-file"></i>

<span>Change Password</span>

</a>

</li>

<li class="sub-menu">

<a href="manage-users.php" >

<i class="fa fa-users"></i>

<span>Manage Users</span>

</a>

</li>

</ul>
52
User Management System
Saurabh Bhandari
00113702014

</div>

</aside>

<section id="main-content">

<section class="wrapper">

<h3><i class="fa fa-angle-right"></i> Manage Users</h3>

<div class="row">

<div class="col-md-12">

<div class="content-panel">

<table class="table table-striped table-advance table-hover">

<h4><i class="fa fa-angle-right"></i> All User Details


</h4>

<hr>

<thead>

<tr>

<th>Sno.</th>

<th class="hidden-phone">First Name</th>

<th> Last Name</th>

<th> Email Id</th>

<th>Contact no.</th>

<th>Reg. Date</th>

</tr>

</thead>

53
User Management System
Saurabh Bhandari
00113702014

<tbody>

<?php $ret=mysql_query("select * from users");

$cnt=1;

while($row=mysql_fetch_array($ret))

{?>

<tr>

<td><?php echo $cnt;?></td>

<td><?php echo $row['fname'];?></td>

<td><?php echo $row['lname'];?></td>

<td><?php echo $row['email'];?></td>

<td><?php echo $row['contactno'];?></td> <td><?php echo


$row['posting_date'];?></td>

<td>

<a href="update-profile.php?uid=<?php echo $row['id'];?>">

<button class="btn btn-primary btn-xs"><i class="fa fa-


pencil"></i></button></a>

<a href="manage-users.php?id=<?php echo $row['id'];?>">

<button class="btn btn-danger btn-xs" onClick="return


confirm('Do you really want to delete');"><i class="fa fa-trash-o
"></i></button></a>

</td>

</tr>

<?php $cnt=$cnt+1; }?>

54
User Management System
Saurabh Bhandari
00113702014

</tbody>

</table>

</div>

</div>

</div>

</section>

</section

></section>

<script src="assets/js/jquery.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script class="include" type="text/javascript"


src="assets/js/jquery.dcjqaccordion.2.7.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

<script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script>

<script src="assets/js/common-scripts.js"></script>

<script>

$(function(){

$('select.styled').customSelect();

});

</script>

</body>

</html>

55
User Management System
Saurabh Bhandari
00113702014

UPDATE-PROFILE.PHP

<?php

session_start();

include'dbconnection.php';

include("checklogin.php");

check_login();

if(isset($_POST['Submit']))

$fname=$_POST['fname'];

$lname=$_POST['lname'];

$contact=$_POST['contact'];

mysql_query("update users set fname='$fname' ,lname='$lname' ,


contactno='$contact' where id='".$_GET['uid']."'");

$_SESSION['msg']="Profile Updated successfully";

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

56
User Management System
Saurabh Bhandari
00113702014

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="">

<meta name="author" content="Dashboard">

<meta name="keyword" content="Dashboard, Bootstrap, Admin, Template,


Theme, Responsive, Fluid, Retina">

<title>Admin | Update Profile</title>

<link href="assets/css/bootstrap.css" rel="stylesheet">

<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />

<link href="assets/css/style.css" rel="stylesheet">

<link href="assets/css/style-responsive.css" rel="stylesheet">

</head>

<body>

<section id="container" >

<header class="header black-bg">

<div class="sidebar-toggle-box">

<div class="fa fa-bars tooltips" data-placement="right" data-original-


title="Toggle Navigation"></div>

</div>

<a href="#" class="logo"><b>Admin Dashboard</b></a>

<div class="nav notify-row" id="top_menu">

57
User Management System
Saurabh Bhandari
00113702014

</ul>

</div>

<div class="top-menu">

<ul class="nav pull-right top-menu">

<li><a class="logout" href="logout.php">Logout</a></li>

</ul>

</div>

</header>

<aside>

<div id="sidebar" class="nav-collapse ">

<ul class="sidebar-menu" id="nav-accordion">

<p class="centered"><a href="#"><img src="assets/img/ui-sam.jpg"


class="img-circle" width="60"></a></p>

<h5 class="centered"><?php echo $_SESSION['login'];?></h5>

<li class="mt">

<a href="change-password.php">

<i class="fa fa-file"></i>

<span>Change Password</span>

58
User Management System
Saurabh Bhandari
00113702014

</a>

</li>

<li class="sub-menu">

<a href="manage-users.php" >

<i class="fa fa-users"></i>

<span>Manage Users</span>

</a>

</li>

</ul>

</div>

</aside>

<?php $ret=mysql_query("select * from users where id='".$_GET['uid']."'");

while($row=mysql_fetch_array($ret))

{?>

<section id="main-content">

<section class="wrapper">

<h3><i class="fa fa-angle-right"></i> <?php echo $row['fname'];?>'s


Information</h3>

59
User Management System
Saurabh Bhandari
00113702014

<div class="row">

<div class="col-md-12">

<div class="content-panel">

<p align="center" style="color:#F00;"><?php echo


$_SESSION['msg'];?><?php echo $_SESSION['msg']=""; ?></p>

<form class="form-horizontal style-form" name="form1"


method="post" action="" onSubmit="return valid();">

<p style="color:#F00"><?php echo $_SESSION['msg'];?><?php


echo $_SESSION['msg']="";?></p>

<div class="form-group">

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">First Name </label>

<div class="col-sm-10">

<input type="text" class="form-control" name="fname"


value="<?php echo $row['fname'];?>" >

</div>

</div>

<div class="form-group">

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">Last Ename</label>

60
User Management System
Saurabh Bhandari
00113702014

<div class="col-sm-10">

<input type="text" class="form-control" name="lname"


value="<?php echo $row['lname'];?>" >

</div>

</div>

<div class="form-group">

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">Email </label>

<div class="col-sm-10">

<input type="text" class="form-control" name="email"


value="<?php echo $row['email'];?>" readonly >

</div>

</div>

<div class="form-group">

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">Contact no. </label>

<div class="col-sm-10">

<input type="text" class="form-control" name="contact"


value="<?php echo $row['contactno'];?>" >

</div>

</div>

<div class="form-group">

61
User Management System
Saurabh Bhandari
00113702014

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">Registration Date </label>

<div class="col-sm-10">

<input type="text" class="form-control" name="contact"


value="<?php echo $row['posting_date'];?>" readonly >

</div>

</div>

<div style="margin-left:100px;">

<input type="submit" name="Submit" value="Update" class="btn


btn-theme"></div>

</form>

</div>

</div>

</div>

</section>

<?php } ?>

</section></section>

<script src="assets/js/jquery.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script class="include" type="text/javascript"


src="assets/js/jquery.dcjqaccordion.2.7.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

<script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script>

62
User Management System
Saurabh Bhandari
00113702014

<script src="assets/js/common-scripts.js"></script>

<script>

$(function(){

$('select.styled').customSelect();

});

</script>

</body>

</html>

CHANGE-PASSWORD.PHP
<?php

session_start();

include'dbconnection.php';

include("checklogin.php");

check_login();

if(isset($_POST['Submit']))

$sql=mysql_query("SELECT password FROM admin where password='".


$_POST['oldpass']."'");

$num=mysql_fetch_array($sql);

if($num>0)

$con=mysql_query("update admin set password='".$_POST['newpass']."'where


id='".$_SESSION['id']."'");

63
User Management System
Saurabh Bhandari
00113702014

$_SESSION['msg']="Password Changed Successfully !!";

//header('location:user.php');

else

$_SESSION['msg']="Old Password not match !!";

?>

<script language="javascript" type="text/javascript">

function valid()

if(document.form1.oldpass.value=="")

alert(" Old Password Field Empty !!");

document.form1.oldpass.focus();

return false;

else if(document.form1.newpass.value=="")

alert(" New Password Field Empty !!");

document.form1.newpass.focus();

64
User Management System
Saurabh Bhandari
00113702014

return false;

else if(document.form1.confirmpassword.value=="")

alert(" Re-Type Password Field Empty !!");

document.form1.confirmpassword.focus();

return false;

else if(document.form1.newpass.value.length<6)

alert(" Password Field length must be atleast of 6 characters !!");

document.form1.newpass.focus();

return false;

else if(document.form1.confirmpassword.value.length<6)

alert(" Re-Type Password Field less than 6 characters !!");

document.form1.confirmpassword.focus();

return false;

else if(document.form1.newpass.value!= document.form1.confirmpassword.value)

65
User Management System
Saurabh Bhandari
00113702014

alert("Password and Re-Type Password Field do not match !!");

document.form1.newpass.focus();

return false;

return true;

</script>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="">

<meta name="author" content="Dashboard">

<meta name="keyword" content="Dashboard, Bootstrap, Admin, Template,


Theme, Responsive, Fluid, Retina">

<title>Admin | Change Password</title>

<link href="assets/css/bootstrap.css" rel="stylesheet">

<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />

<link href="assets/css/style.css" rel="stylesheet">

<link href="assets/css/style-responsive.css" rel="stylesheet">

66
User Management System
Saurabh Bhandari
00113702014

</head>

<body>

<section id="container" >

<header class="header black-bg">

<div class="sidebar-toggle-box">

<div class="fa fa-bars tooltips" data-placement="right" data-original-


title="Toggle Navigation"></div>

</div>

<a href="#" class="logo"><b>Admin Dashboard</b></a>

<div class="nav notify-row" id="top_menu">

</ul>

</div>

<div class="top-menu">

<ul class="nav pull-right top-menu">

<li><a class="logout" href="logout.php">Logout</a></li>

</ul>

</div>

</header>

67
User Management System
Saurabh Bhandari
00113702014

<aside>

<div id="sidebar" class="nav-collapse ">

<ul class="sidebar-menu" id="nav-accordion">

<p class="centered"><a href="#"><img src="assets/img/ui-sam.jpg"


class="img-circle" width="60"></a></p>

<h5 class="centered"><?php echo $_SESSION['login'];?></h5>

<li class="mt">

<a href="change-password.php">

<i class="fa fa-file"></i>

<span>Change Password</span>

</a>

</li>

<li class="sub-menu">

<a href="manage-users.php" >

<i class="fa fa-users"></i>

<span>Manage Users</span>

</a>

</li>

68
User Management System
Saurabh Bhandari
00113702014

</ul>

</div>

</aside>

<section id="main-content">

<section class="wrapper">

<h3><i class="fa fa-angle-right"></i> Change Password </h3>

<div class="row">

<div class="col-md-12">

<div class="content-panel">

<form class="form-horizontal style-form" name="form1"


method="post" action="" onSubmit="return valid();">

<p style="color:#F00"><?php echo $_SESSION['msg'];?><?php


echo $_SESSION['msg']="";?></p>

<div class="form-group">

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">Old Password</label>

<div class="col-sm-10">

<input type="password" class="form-control"


name="oldpass" value="" >

</div>

69
User Management System
Saurabh Bhandari
00113702014

</div>

<div class="form-group">

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">New Password</label>

<div class="col-sm-10">

<input type="password" class="form-control"


name="newpass" value="" >

</div>

</div>

<div class="form-group">

<label class="col-sm-2 col-sm-2 control-label" style="padding-


left:40px;">Confirm Password</label>

<div class="col-sm-10">

<input type="password" class="form-control"


name="confirmpassword" value="" >

</div>

</div>

<div style="margin-left:100px;">

<input type="submit" name="Submit" value="Change" class="btn


btn-theme"></div>

</form>

</div>

70
User Management System
Saurabh Bhandari
00113702014

</div>

</div>

</section>

</section></section>

<script src="assets/js/jquery.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script class="include" type="text/javascript"


src="assets/js/jquery.dcjqaccordion.2.7.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

<script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script>

<script src="assets/js/common-scripts.js"></script>

<script>

$(function(){

$('select.styled').customSelect();

});

</script>

</body>

</html>

DATABASE>SQL

-- phpMyAdmin SQL Dump

71
User Management System
Saurabh Bhandari
00113702014

-- version 4.4.14

-- http://www.phpmyadmin.net

--

-- Host: 127.0.0.1

-- Generation Time: Nov 12, 2015 at 05:27 AM

-- Server version: 5.6.26

-- PHP Version: 5.5.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";

SET time_zone = "+00:00";

/*!40101 SET
@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET
@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8mb4 */;

--

-- Database: `loginsystem`

--

72
User Management System
Saurabh Bhandari
00113702014

-- --------------------------------------------------------

--

-- Table structure for table `admin`

--

CREATE TABLE IF NOT EXISTS `admin` (

`id` int(11) NOT NULL,

`username` varchar(255) NOT NULL,

`password` varchar(255) NOT NULL

) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--

-- Dumping data for table `admin`

--

INSERT INTO `admin` (`id`, `username`, `password`) VALUES

(1, 'admin', '123456');

-- --------------------------------------------------------

--

-- Table structure for table `users`

73
User Management System
Saurabh Bhandari
00113702014

--

CREATE TABLE IF NOT EXISTS `users` (

`id` int(11) NOT NULL,

`fname` varchar(255) NOT NULL,

`lname` varchar(255) NOT NULL,

`email` varchar(255) NOT NULL,

`password` varchar(300) NOT NULL,

`contactno` varchar(11) NOT NULL,

`posting_date` date NOT NULL

) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;

--

-- Dumping data for table `users`

--

INSERT INTO `users` (`id`, `fname`, `lname`, `email`, `password`, `contactno`,


`posting_date`) VALUES

(9, 'Demo', 'User', 'demouser@gmail.com', 'fe01ce2a7fbac8fafaed7c982a04e229',


'1254568756', '2017-04-04');

--

-- Indexes for dumped tables

--

--

-- Indexes for table `admin`

--

74
User Management System
Saurabh Bhandari
00113702014

ALTER TABLE `admin`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `users`

--

ALTER TABLE `users`

ADD PRIMARY KEY (`id`);

--

-- AUTO_INCREMENT for dumped tables

--

--

-- AUTO_INCREMENT for table `admin`

--

ALTER TABLE `admin`

MODIFY `id` int(11) NOT NULL


AUTO_INCREMENT,AUTO_INCREMENT=2;

--

-- AUTO_INCREMENT for table `users`

--

ALTER TABLE `users`

MODIFY `id` int(11) NOT NULL


AUTO_INCREMENT,AUTO_INCREMENT=10;

75
User Management System
Saurabh Bhandari
00113702014

/*!40101 SET
CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET
CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET
COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

4.2 Testing & Debugging

Types of testing;

1. White Box Testing

White-box testing (also known as clear box testing, glass box testing, transparent box
testing, and structural testing) is a method of testing software that tests internal structures
or workings of an application, as opposed to its functionality (i.e. black-box testing). In
white-box testing an internal perspective of the system, as well as programming skills, are
used to design test cases. The tester chooses inputs to exercise paths through the code and
determine the appropriate outputs. This is analogous to testing nodes in a circuit, e.g. in-
circuit testing (ICT). White-box testing can be applied at
the unit, integration and system levels of the software testing process.

76
User Management System
Saurabh Bhandari
00113702014

77
User Management System
Saurabh Bhandari
00113702014

2. Black Box Testing

Black-box testing is a method of software testing that examines the functionality of an


application without peering into its internal structures or workings. This method of test can
be applied to virtually every level of software
testing: unit, integration, system and acceptance. It typically comprises most if not all
higher-level testing, but can also dominate unit testing as well.

3. Acceptance Testing

Acceptance Testing is a level of the software testing where a system is tested for
acceptability. The purpose of this test is to evaluate the system's compliance with the
business requirements and assess whether it is acceptable for delivery.

Formal testing with respect to user needs, requirements, and business processes conducted
to determine whether or not a system satisfies the acceptance criteria and to enable the user,
customers or other authorized entity to determine whether or not to accept the system.

78
User Management System
Saurabh Bhandari
00113702014

4. Alpha-Beta Testing

Alpha testing
Alpha testing is a type of acceptance testing; performed to identify all possible issues/bugs
before releasing the product to everyday users or public. The focus of this testing is to
simulate real users by using black box and white box techniques. The aim is to carry out the
tasks that a typical user might perform. Alpha testing is carried out in a lab environment
and usually the testers are internal employees of the organization.

Beta Testing
Beta Testing of a product is performed by "real users" of the software application in a "real
environment" and can be considered as a form of external user acceptance testing.
Beta version of the software is released to a limited number of end-users of the product to
obtain feedback on the product quality. Beta testing reduces product failure risks and
provides increased quality of the product through customer validation.
It is the final test before shipping a product to the customers. Direct feedback from
customers is a major advantage of Beta Testing. This testing helps to tests the product in
real time environment.

5. Validation Testing

79
User Management System
Saurabh Bhandari
00113702014

The process of evaluating software during the development process or at the end of the
development process to determine whether it satisfies specified business requirements.
Validation Testing ensures that the product actually meets the client's needs. It can also be
defined as to demonstrate that the product fulfils its intended use when deployed on
appropriate environment.

80
User Management System
Saurabh Bhandari
00113702014

CHAPTER 5
SUMMARY & CONCLUSION

5.1 CONCLUSION
Computer has got clear advantage over the manual system. The computerized system is
more reliable, efficient and fast at the end of the project, I can say that computer play a very
crucial role in the development of firm. All the daily reports generated by the system are to
be checked by the concerned official so as to ensure that all the transactions have been put
through in appropriate accounts and this is tallied with the new vouchers.

Computer does maximum work with in minimum time. Because it is used in every field so
that it provides comfort and suitability to everyone. Providing maximum facilities and
comfort to customers to customers is main goal of the firm. To achieve this goal, other
modern facilities relating to computer should have to be provided.

5.2. FUTURE SCOPE


The scope of the proposed project is to provide a simple user management page that lets you
view, search users, create new user accounts, and edit existing ones. Also provides tools to
disable or delete users, manage permissions, and issue password resets. Adding up, our
system will also help in upgrading the already existing system to a new automated one which
has the following benefits-

Secure

The data which will be accessed such as the personal details of a customer will be safe
and secure.

Cost reduction

Due to the new automated system, reduction of paper work will definitely save expenses
of the company as compared to the manual systems

Less time Consuming

Since user wont have to go to different websites and then determine the best deal itd be
less time consuming and much easier for them.

81

Vous aimerez peut-être aussi