You are on page 1of 62

Integration of Sound Signature in Graphical Password Authentication

System

A PROJECT REPORT
Submitted by

CB.EN.P3MCA10027

MOHAMED ASHRAF ALI.B

In partial fulfillment for the award of the degree


Of

MASTER OF COMPUTER APPLICATIONS

AMRITA SCHOOL OF ENGINEERING, COIMBATORE


AMRITA VISHWA VIDYAPEETHAM
COIMBATORE - 641 112
MAY 2013

AMRITA VISHWA VIDYAPEETHAM


AMRITA SCHOOL OF ENGINEERING, COIMBATORE - 641112

BONAFIDE CERTIFICATE
This is to certify that the project report entitled Integration of Sound Signature in

Graphical Password Authentication System submitted by Mohamed Ashraf Ali.B


(CB.EN.P3MCA10027) in partial fulfillment of the requirements for the award of the Degree
MASTER OF COMPUTER APPLICATIONS is a bonafide record of the work carried out
under our guidance and supervision at Amrita School of Engineering.

EXTERNAL SUPERVIOR

INTERNAL SUPERVIOR

Mr.K.M.Manesh,
Project Leader,
Bessel InfoTech,
Palakkad

Mr.S.Thangavelu
Associate Professor (SG),
Dept. Of Computer Science &
Engineering,
Amrita School of Engineering
Coimbatore

CHAIRPERSON
Prof. P. N. Kumar
Dept. of Computer Science and Engineering
This project report was evaluated by us on . . . . . . . . . . . . . . . . . . . . . .

INTERNAL EXAMINER

EXTERNAL EXAMINER

ACKNOWLEDGEMENT

I would like to express my gratitude to all who have helped us directly or indirectly in my
project
I express my sincere gratitude to Brahmachari Abhayamrita Chaitanya, Pro
Chancellor and Dr.P.Venkat Rangan, Vice Chancellor of Amrita Vishwa Vidyapeetham, for
providing us the opportunity to undergo this programme.
I express my sincere thanks to Prof. P.N.Kumar, Chairperson, Department of Computer
Science and Engineering, for his support and encouragement.
I extend my heartiest gratitude to my internal guide Mr.S.Thangavelu for her valuable
guidance. I also thank Ms.M.Prathilothamai and Ms.S.Souparnikan, the project coordinators,
for their co-operation.
I am also grateful to all other members of faculty for their valuable guidance.
I also express my deep gratitude to my External guide, Mr.K.M.Manesh, Project
Leader of Bessel InfoTech, for providing me the opportunity to work under his guidance as
well as for rendering help and support I required to complete this project successfully. I extend
special thanks to the staff and management of BESSEL INFOTECH, for all the support and
facilities that were provided me to complete my project on time.
Finally, I wish to express my sincere thanks to my parents and my friends who have
contributed a lot towards my project work and my mental wellbeing during this period.

CONTENTS
S.No

Particulars
ABSTRACT
LIST OF TABLES
LIST OF FIGURES

INTRODUCTION
1.1. Project Overview
1.2 Objective

ORGANIZATIONAL PROFILE
SYSTEM DESCRIPTION
3.1 Existing System
3.2 Proposed work

i
ii
ii

2
2

6
6

SYSTEM REQUIREMENTS
4.1 Functional Requirements
4.2 Non Functional Requirements

Page

8
8

SYSTEM SPECIFICATION
5.1 Hardware Specification
5.2 Software Specification
5.3 Database Used

10
10
10

SYSTEM ANALYSIS AND DESIGN


6.1 System Architecture
6.2 Entity relationship diagram
6.3 Use case Diagram
6.4 Sequence Diagram
6.5 Activity Diagram
6.6 Input Output Design

SYSTEM DEVELOPMENT

12
13
14
15
16
17

7.1 Module description

19

SYSTEM TESTING

21

8.1 Unit Testing: Test Cases and Results


9

24

CONCLUSION
10

25

FUTURE ENHANCEMENT
11
12

26

REFERENCES
APPENDICES
APPENDIX A : CODE SNIPPETS
APPENDIX B : SCREENSHOTS

28
41

ABSTRACT
A graphical password system with a supportive sound signature to increase the
remembrance of the password is discussed. In proposed work a click-based graphical password
scheme called Cued Click Points (CCP) is presented. In this system a password consists of
sequence of some images in which user can select one click-point per image. In addition user is
asked to select a sound signature corresponding to click point this sound signature will be used to
help the user to login.

I
LIST OF TABLES

TABLE NO.
8.1

DESCRIPTION

PAGE NO.

UNIT TESTING

22

LIST OF FIGURES
Index

Title

Page Number

System Architecture

12

Entity relationship diagram

13

Use case diagram

14

Sequence diagram

15

Activity diagram

16

LIST OF ABBREVATIONS
1.

CCP: Cued Click Points.

ii

INTRODUCTION

1. INTRODUCTION
1.1 Project Overview

Here a graphical password system with a supportive sound signature to increase


the remembrance of the password is performed. In daily life we see various examples of
recalling an object by the sound related to that object. It is well know that the human
brain is better at recognizing and recalling images than text, graphical passwords exploit
this human characteristic.

1.2 Objective
To obtain High level authentication system and maintain confidentiality in
websites with respect to sound signature in the role of recalling password.

ORGANIZATION PROFILE

2. ORGANIZATION PROFILE

BESSEL INFOTECH SOLUTIONS is a global provider of information technology


services based in Palakkad, India. The company Established in 2003 and has its presence in
India and Europe. Bessel offers services of software development, website design, web
development and web hosting etc.

Mission
Mission is to deliver cost effective, quality-centred and expertise solutions.

Vision
To inspire change by continuous innovation in our relentless pursuit for excellence.

SYSTEM DESCRIPTION

3. SYSTEM DESCRIPTION
3.1 Existing System
In existing system graphical based password protection is available where
there are some issues. The user chooses several predefined regions in an image as user password.

To log in the user has to click on the same regions. The problem with this scheme is that the
number of predefined regions is small, perhaps a few dozens in a picture. The password may
have to be up to 12 clicks for adequate security, again tedious for the user. Another problem of
this system is the need for the predefined regions to be readily identifiable. In effect, this requires
artificial, cartoon-like images rather than complex, real world scenes.

3.2 Proposed Work


In the proposed work we have integrated sound signature to help in recalling the
password. No system has been devolved so far which uses sound signature in graphical password
authentication. The sound signature or tone can be used to recall facts like images, text etc. In
daily life we see various examples of recalling an object by the sound related to that object enters
User ID and select one sound frequency which user want to be played at login time, the sound is
selected will decide that the user is legitimate or an imposter.

SYSTEM REQUIREMENTS

4. SYSTEM REQUIREMENTS
4.1 Functional Requirements
4.1.1 Authentication.
The authentication system is based on images and sound signature.
4.1.2 Cued Click Points
User has to select images and click one point per image.
4.1.3 Sound Signature.
For each image user records a sound to identify during login time.
4.1.4 Calculate Distance Vector.
The User profile has different click points is calculated during authentication by
Euclidian Distance Vector.

4.2 Non-Functional Requirements


4.2.1 Usability
This application is mainly developed to provide usability and high level authentication
with sound signature.
4.2.2 Environmental Requirements
This application works on .net platform .The system should contain Speech Dynamic
Link Libraries.
4.2.3 Reliability
The reliability of the product is high. When failure occurs it can move to the force
to close mode to avoid the application crash.
4.2.4 Performance
System showed very good Performance in terms of speed, accuracy, and ease of use.
Users preferred CCP to Pass Points, saying that selecting and remembering only one point per
image was easier and sound signature helps considerably in recalling the click points.
8

SYSTEM SPECIFICATIONS

5. SYSTEM SPECIFICATIONS

5.1 Hardware Specification


RAM

: 2GB and above

Hard Disk

: 50 GB and above

Processor

: Intel Pentium Dual CPU T3400 @ 2.16GHz

5.2 Software Specification

Microsoft Visual Studio 2010 Ultimate.

JavaScript

5.3 Database Used

Microsoft SQL Server 2008

5.4 Web Browser and Server:


Any Web Browser preferably Mozilla Firefox.

10

SYSTEM ANALYSIS AND DESIGN

11

6. SYSTEM ANALYSIS AND DESIGN

6.1 System Architecture Diagram

12
6.2 Entity Relationship Diagram

13
6.3 Use Case Diagram

14
6.4 Sequence Diagram

15
6.5 Activity Diagram

16

6.6 INPUT OUTPUT DESIGN

6.6.1 Input Design


Graphical Password:
Here user Selects Image and click on points per image. The Image click point
is calculated by Euclidian Distance vector for different user profile vectors.
Sound Signature:
The sound signature is recorded for recalling the password during registration.
6.6.2 Output design
The System Authenticates when the CCP matches for the user profile and matches
the sound signature with respect to image clicks points. The Authentication takes into the
department website when user successfully logged in.

17

SYSTEM DEVELOPMENT

18

7. SYSTEM DEVELOPMENT
7.1 Module description

7.1.1User Authentication
In user authentication module, the user is initially registered by giving the user name and
password, if the user name is already present then the system does not allow to such user
name then the user must give some other user name. If the registered user name want to use,
then the user name and the password must be given if correct information is provided then he
is allowed to enter into the system. The user log keeps track of the entire user who logs in
and out of the database.

7.1.2Cued Click Point (CCP)


Here graphical Password authentication is performed. User has to select images and click
a point per image. The click point for each image is calculated by Euclidian Distance Vector
for different user profile vectors.
7.1.3Sound Signature
A sound is recorded for each image during registration. The sound signature plays the
role as recalling password for a particular image or click points; it acts as a password hint for
users. The authentication done by matching sound signature with the corresponding images
for Successful login.

19

TESTING

20

8. TESTING
Testing Objective
The main objective of software testing is to uncover errors. Testing is considered one of
the most tedious and time consuming activities. If it is conducted haphazardly, time is wasted,

unnecessary effort is expended, and even worse, errors sneak through undetected.
Types of testing performed

Unit testing

Unit testing
This is the most primitive testing wherein each and every module is tested to locate and
debug errors locally. This testing is carried out in programming stage itself. Unit testing is
performed to recover errors of the following type

Incorrect variable names


Inconsistent data type
In this project aspect the front end design consists of screens. They are tested for data

acceptance. Back end is tested for successful acceptance and data retrieval. Each module is tested
separately.

Test plan and test cases


The useful procedure in testing is to create test data for initial test and to use live data for
testing. Some of the constraints kept in mind while designing the test data are

Test data must cover all cases and should be exhaustive.


Test data should include known incorrect data in order to test the validation and control
procedure.

21

Test

Module

Module

Test steps

Test

Case
Id

Description Input

USER01

USER02

USER03

User
Checks the
Authenticat existing
ion
user by
username.
And Login
Process.

USER04
Cued Click
Points
USER05

Expected
output

Existing Username Username


and Master
Exists Page
Password given.

Step 1 Login

Username and
Master Password
Given

Step 1
Login

Step 1 Login

When invalid
username and
master password
given

Wrong
Credentials

Message box
Displayed.

Click on image1

Step 2
Login

Step 2 Login

Invalid
Image Page.

Final Step -

Click Point
for images.
Invalid Click on
Image2

Not
Authenticat
ed
USER06

USER07

Select Invalid
Sound For image1
Sound
Signature

Actual
output

Matches the
Sound For
Select Valid
Correspondi Sounds For All
ng Images
images
22

Successful

Successful

Successful

Successful

User
Authenticated

Error stating User


that Not
Authenticated
Authenticat .
ed.
Shows User
Authenticati
on.

Output

Shows User
Authenticatio
n.

Successful

Successful

Successful

CONCLUSION

23

9. CONCLUSION
Integration of Sound Signature in Graphical Password Authentication System
proposed a novel approach which uses sound signature to recall graphical password click points.
No previously developed system used this approach the system is helpful when user is logging
after a long time. Using Sound or tone as password hint possess a good role for any user who

logins through system. Since users cannot easily remember such random passwords. Number of
graphical password systems has been developed; Study shows that text-based passwords suffer
with both security and usability problems. Here graphical password system overcomes those
issues.

24

10. FUTURE ENHANCEMENT


In future systems other patterns may be used for recalling purpose. These patterns are
very useful in recalling the associated objects like image or text. In future the Authentication system

can maintain high level security when color code will be sent to user mobile and user has to say
the code which he/she received through mobile.

25

11. REFERENCES

Code snippets from www.stackoverflow.com


Asp.net programming basics from www.asp.net-tutorials.com
Birget, J.C., D. Hong, and N. Memon. Graphical Passwords Based on Robust
Discretization. IEEE Trans.Info. Forensics and Security, 1(3), September 2006 from

http://www.jiclt.com/index.php/jiclt/article/viewPDFInterstitial/94/93
R. N. Shepard, "Recognition memory for words, sentences, and pictures," Journal of Verbal
Learning and Verbal Behavior, vol. 6, pp. 156-163, 1967 from
http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1673401&url=http%3A%2F
%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1673401

26

APPENDICES

27

12. APPENDICES
APPENDIX A: CODE SNIPPETS

Part I
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.VisualBasic.Devices;
using Microsoft.VisualBasic;
using System.Runtime.InteropServices;
using System.Speech;
using System.Speech.Recognition;
using System.Text;
using System.IO;
using System.Data;
using System.Data.SqlClient;
public partial class Signup2_4 : System.Web.UI.Page
{
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi,
SetLastError = true, ExactSpelling = true)]
private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int
uReturnLength, int hwndCallback);
Class1 c = new Class1();
protected void Page_Load(object sender, EventArgs e)

{
Computer computer = new Computer();
computer.Audio.Stop();
c.getcon();
string s = "select imgurl1,imgurl2,imgurl3 from Image_Table where uname='" +
Session["username"] + "'";
SqlDataReader dr = c.exdr(s);
while (dr.Read())
{
28
ImageButton2.ImageUrl = dr["imgurl2"].ToString();
ImageButton1.ImageUrl = dr["imgurl1"].ToString();
ImageButton3.ImageUrl = dr["imgurl3"].ToString();
}
c.conclose();
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
}
protected void ImageButton15_Click(object sender, ImageClickEventArgs e)
{
}
protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
{
}
protected void ImageButton16_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Signup2_1.aspx");
}
protected void ImageButton17_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Signup2_2.aspx");
}
protected void ImageButton18_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Signup2_3.aspx");
}
protected void ImageButton19_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Signup2_4.aspx");
}

protected void Button1_Click(object sender, EventArgs e)


{
Response.Write("<script LANGUAGE='JavaScript' >alert('Registered
Successfully');document.location='" + ResolveClientUrl("~/Home.aspx") + "';</script>");
}
protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
{
29

Label13.Text = "Recording...";
}
mciSendString("open new Type waveaudio Alias recsound", " ", 0, 0);
mciSendString("record recsound", "", 0, 0);
protected void ImageButton7_Click(object sender, ImageClickEventArgs e)
{
try
{
Computer c1 = new Computer();
c1.Audio.Stop();
mciSendString("save recsound D:\\man\\FinalMainProject\\user\\"+Session ["username"]
+"\\1.wav", " ", 0, 0);
mciSendString("close recsound ", "", 0, 0);
c.getcon();
string v1 = "D:\\man\\FinalMainProject\\user\\" + Session["username"] + "\\1.wav";
string query = "insert into sound values('" + Session["username"] + "','" + v1 + "',0,0)";
c.exnon(query);
c.conclose();
Label13.Text = "Saved!!";
}
catch (Exception ex)
{
Label13 .Text ="Saved";
}
}
protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
{
try
{
Label13.Text = "Playing...";
Computer computer = new Computer();

computer.Audio.Play("D:\\man\\FinalMainProject\\user\\"+Session ["username"]
+"\\1.wav", AudioPlayMode.Background);
}
catch (Exception ex)
{
protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
{
30
Computer computer = new Computer();
Label13.Text = "Error in recording. Try again..";
}
}
computer.Audio.Stop();
Label13.Text = "Stopped...";
}
protected void ImageButton8_Click(object sender, ImageClickEventArgs e)
{
mciSendString("open new Type waveaudio Alias recsound", " ", 0, 0);
mciSendString("record recsound", "", 0, 0);
Label14.Text = "Recording...";
}
protected void ImageButton9_Click(object sender, ImageClickEventArgs e)
{
try
{
Label14.Text = "Playing...";
Computer computer = new Computer();
computer.Audio.Play("D:\\man\\FinalMainProject\\user\\" + Session["username"] +
"\\2.wav", AudioPlayMode.Background);
}
catch (Exception ex)
{
Label14.Text = "Error in recording. Try again..";
}
}
protected void ImageButton10_Click(object sender, ImageClickEventArgs e)
{
Computer computer = new Computer();
computer.Audio.Stop();
Label14.Text = "Stopped...";
}

protected void ImageButton11_Click(object sender, ImageClickEventArgs e)


{
try
{
Computer c1 = new Computer();
c1.Audio.Stop();
31
mciSendString("close recsound ", "", 0, 0);
ss = "D:\\man\\FinalMainProject\\user\\";
mciSendString("save recsound D:\\man\\FinalMainProject\\user\\" + Session["username"] +
"\\2.wav", " ", 0, 0);
string v2 = "D:\\man\\FinalMainProject\\user\\" + Session["username"] + \\2.wav;
string query = "update sound set v2= '" + v2 + "' where uname='" + Session["username"] + "'";
c.exnon(query);
c.conclose();
Label14.Text = "Saved!!";
}
catch (Exception ex)
{
Label14.Text = "Saved";
}
}
protected void ImageButton12_Click(object sender, ImageClickEventArgs e)
{
mciSendString("open new Type waveaudio Alias recsound", " ", 0, 0);
mciSendString("record recsound", "", 0, 0);
Label15.Text = "Recording...";
}
protected void ImageButton13_Click(object sender, ImageClickEventArgs e)
{
try
{
Label15.Text = "Playing...";
Computer computer = new Computer();
computer.Audio.Play("D:\\man\\FinalMainProject\\user\\" + Session["username"] +
"\\3.wav", AudioPlayMode.Background);
}
catch (Exception ex)
{
Label15.Text = "Error in recording. Try again..";

}
}
protected void ImageButton14_Click(object sender, ImageClickEventArgs e)
{
protected void ImageButton15_Click1(object sender, ImageClickEventArgs e)
32
Computer computer = new Computer();
computer.Audio.Stop();
Label15.Text = "Stopped...";
}
try
Computer c1 = new Computer();
c1.Audio.Stop();
ss = "D:\\man\\FinalMainProject\\user\\";
mciSendString("save recsound D:\\man\\FinalMainProject\\user\\" + Session["username"] +
"\\3.wav", " ", 0, 0);
mciSendString("close recsound ", "", 0, 0);
c.getcon();
string v3 = "D:\\man\\FinalMainProject\\user\\" + Session["username"] + "\\3.wav";
string query = "update sound set v3= '" + v3 + "' where uname='" + Session["username"] +
"'";
c.exnon(query);
c.conclose();
Label15.Text = "Saved!!";
}
catch (Exception ex)
{
Label15.Text = "Saved";
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class selectimage1 : System.Web.UI.Page


{
Class1 c = new Class1();
string[] asd = new string[19];
33
static Random rmd;
static List<string > list=new List<string>();
public void ssss<T>(T[] array)
{
var ram = rmd;
for (int z = array.Length; z > 1; z--)
{
int j = ram.Next(z);
T tmp = array[j];
array[j] = array[z - 1];
array[z - 1] = tmp;
}
}
protected void Page_Load(object sender, EventArgs e)
{
c.getcon();
int i=0;
string s = "select imgurl1,x1,y1 from Image_Table where uname='" + Session["username"]
+ "'";
SqlDataReader dr = c.exdr(s);
while (dr.Read())
{
asd[19] = dr["imgurl1"].ToString();
// p1 = Convert.ToInt32(dr["x1"].ToString());
// p2 = Convert.ToInt32(dr["y1"].ToString());
}
c.conclose();
c.getcon();
string s1 = "select * from img_Table";
SqlDataReader dr1 = c.exdr(s1);
while (dr1.Read())
{
ImageButton1.ImageUrl = dr1["imgurl"].ToString();
ImageButton3.ImageUrl = dr1["imgurl"].ToString();
ImageButton4.ImageUrl = dr1["imgurl"].ToString();
ImageButton5.ImageUrl = dr1["imgurl"].ToString();

ImageButton6.ImageUrl = dr1["imgurl"].ToString();
ImageButton7.ImageUrl = dr1["imgurl"].ToString();
ImageButton8.ImageUrl = dr1["imgurl"].ToString();
ImageButton9.ImageUrl = dr1["imgurl"].ToString();
ImageButton10.ImageUrl = dr1["imgurl"].ToString();
34
ImageButton11.ImageUrl = dr1["imgurl"].ToString();
ImageButton12.ImageUrl = dr1["imgurl"].ToString();
ImageButton13.ImageUrl = dr1["imgurl"].ToString();
ImageButton14.ImageUrl = dr1["imgurl"].ToString();
ImageButton15.ImageUrl = dr1["imgurl"].ToString();
ImageButton16.ImageUrl = dr1["imgurl"].ToString();
ImageButton17.ImageUrl = dr1["imgurl"].ToString();
ImageButton18.ImageUrl = dr1["imgurl"].ToString();
asd[i] = dr1["imgurl"].ToString();
i ++;
}
c.conclose();
ssss(asd);
foreach (string vlaue in asd)
{
list.Add(vlaue);
}
ImageButton1.ImageUrl = list[0].ToString();
ImageButton3.ImageUrl = list[1].ToString();
ImageButton4.ImageUrl = list[2].ToString();
ImageButton5.ImageUrl = list[3].ToString();
ImageButton6.ImageUrl = list[4].ToString();
ImageButton7.ImageUrl = list[5].ToString();
ImageButton8.ImageUrl = list[6].ToString();
ImageButton9.ImageUrl = list[7].ToString();
ImageButton10.ImageUrl = list[8].ToString();
ImageButton11.ImageUrl = list[9].ToString();
ImageButton12.ImageUrl = list[10].ToString();
ImageButton13.ImageUrl = list[11].ToString();
ImageButton14.ImageUrl = list[12].ToString();
ImageButton15.ImageUrl = list[13].ToString();
ImageButton16.ImageUrl = list[14].ToString();

ImageButton17.ImageUrl = list[15].ToString();

35
ImageButton18.ImageUrl = list[16].ToString();
ImageButton2.ImageUrl = list[17].ToString();
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton1.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton2.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton3.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton4.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton5.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton6.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton7_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton7.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton8_Click(object sender, ImageClickEventArgs e)
{

Session["img1"] = ImageButton8.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
36
protected void ImageButton9_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton9.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton10_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton10.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton11_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton11.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton12_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton12.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton13_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton13.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton14_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton14.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton15_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton15.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton16_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton16.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}

protected void ImageButton17_Click(object sender, ImageClickEventArgs e)


{
37
Session["img1"] = ImageButton17.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
protected void ImageButton18_Click(object sender, ImageClickEventArgs e)
{
Session["img1"] = ImageButton18.ImageUrl;
Response.Redirect("Signin2_1.aspx");
}
}
PART II
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.VisualBasic.Devices;
using Microsoft.VisualBasic;
using System.Runtime.InteropServices;
using System.Speech;
using System.Speech.Recognition;
using System.Text;
using System.IO;
using System.Data;
using System.Data.SqlClient;
public partial class Default2 : System.Web.UI.Page
{
Class1 c = new Class1();
public int x=0, y=0, p1, p2;
public string s1, s2, s3;
protected void Page_Load(object sender, EventArgs e)
{
c.getcon();

38
string s = "select imgurl2,x2,y2 from Image_Table where uname='" + Session["username"] +
"'";
SqlDataReader dr = c.exdr(s);
while (dr.Read())
{
ImageButton6.ImageUrl = dr["imgurl2"].ToString();
p1 = Convert.ToInt32(dr["x2"].ToString());
p2 = Convert.ToInt32(dr["y2"].ToString());
}
c.conclose();
c.getcon();
string a = "select v1,v2,v3 from sound where uname='" + Session["username"] + "'";
SqlDataReader dr1 = c.exdr(a);
while (dr1.Read())
{
s1 = dr1["v1"].ToString();
s2 = dr1["v2"].ToString();
s3 = dr1["v3"].ToString();
}
c.conclose();
}
protected void Button4_Click(object sender, EventArgs e)
{
x = int.Parse(TextBox1.Text);
y = int.Parse(TextBox2.Text);
if (((p1-5<=x)&& (x<=p1+5)) && ((p2-5<=y) &&(y<=p2+5)))
{
Response.Redirect("Signin2_3.aspx");
}
else
{

39
Response.Redirect("InvalidImage1.aspx");
}
}
protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
{
TextBox1.Text = e.X.ToString();
TextBox2.Text = e.Y.ToString();
x = int.Parse(TextBox1.Text);
y = int.Parse(TextBox2.Text);
}
protected void ImageButton11_Click(object sender, ImageClickEventArgs e)
{
if (RadioButtonList1.SelectedIndex == 0)
{
Label5.Text = "Playing...";
Computer computer = new Computer();
computer.Audio.Play(s1, AudioPlayMode.Background);
}
if (RadioButtonList1.SelectedIndex == 1)
{
Label5.Text = "Playing...";
Computer computer = new Computer();
computer.Audio.Play(s2, AudioPlayMode.Background);
}
if (RadioButtonList1.SelectedIndex == 2)
{
Label5.Text = "Playing...";
Computer computer = new Computer();
computer.Audio.Play(s3, AudioPlayMode.Background);
}
}
}

40

APPENDIX B: SNAPSHOTS
24

242

441

42244442

422444

43

4224

4444

45

846

47

2229

28

2848

2849

2850

2851

13

You might also like