Project phase ii
Download
1 / 9

Project Phase II - PowerPoint PPT Presentation


  • 226 Views
  • Uploaded on

Project Phase II. Login New User Email UserName with Password Before Class Thursday. Login. Public Function Login( ByVal UserName As String, ByVal Password As String ) As String Return Value:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Project Phase II' - RexAlvis


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Project phase ii l.jpg

Project Phase II

Login

New User

Email UserName with Password

Before Class Thursday


Login l.jpg
Login

Public Function Login( ByVal UserName As String,

ByVal Password As String )

As String

Return Value:

“Admin” : Found admin in database

“User” : Found user in database

“NotFound” : Not found in database


Badger one two l.jpg
Badger One/Two

Dim UserName, Password, Role As String

‘ Check input to get UserName and Password

‘ Role = Login( UserName, Password )

Role = UserName

If Role = “Admin” Then

‘ Accessing all pages

Else If Role = “User” Then

‘ Accessing user pages only

Else

‘ Error message

‘ Cannot access any pages

End If


New user l.jpg
New User

Public Function NewUser( ByVal UserName As String, ByVal Password As String,

ByVal FirstName As String, ByVal LastName As String,

ByVal Email As String )

As String

Return Value:

“ExistingUser” : Same UserName found in database

“ExistingEmail”: Same Email found in database, optional

“UserCreated”: New user created

“Sorry” : Database down?


Badger one two5 l.jpg
Badger One/Two

‘ Check input to get UserName, Password,

FirstName, LastName, Email

UserName

6 – 10

Letters, Digits, _

Case sensitive: yes to save, no to compare

Password

6 - 20

Any chars, no: ‘ ‘ “ “ , . [ ] { } ( ) $ & SPACE !

Case sensitive: yes


Badger one two6 l.jpg
Badger One/Two

‘ Check input to get UserName, Password,

FirstName, LastName, Email

Dim Result As String

‘ Result = NewUser(UserName, Password, FirstName, LastName, Email)

Result = UserName

If Result = “ExistingUser” Then

‘ Error message

Else If Result = “ExistingEmail” Then

‘ Send username and password

Else If Result = “UserCreated” Then

‘ Go to user pages

Else

‘ Come back later

End If


Email username with password l.jpg
Email UserName with Password

Public Sub GetUser (ByVal Email As String,

ByRef UserName As String, ByRef Password As String )

If not found, set UserName and Password to “”


Badger one two8 l.jpg
Badger One/Two

‘ Check input to get Email

Dim UserName, Password As String

GetUser (Email, UserName, Password)

If UserName <> “” and Password <> “” Then

Send email

Else

‘ Email not found


Badger one two9 l.jpg
Badger One/Two

Ajax

Java Script

VB or C#?