Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
We can use Campus Selection system for University and any Companies.
It is developed for smooth working of HR Department. Universities and
companies can get benefited through this system. This Software is fully
integrated with Student and Company Relationship Management and
developed in a manner that is easily manageable, time and cost saving
that shows relieving one from manual works. Online Campus Selection
provides automated technical screening, intellectual evaluation, electronic
mail integration to conduct recruitment. This feature’s helps in many
ways like saving cost, time and paper work, this shows the paperless
environment, unlimited Custom and reports.
PROJECT DESCRIPTION
2.1 Overview
The main objective of the project FILE HOSTING SERVER to user uploads his/her
personal information, important files and confidential files to be uploaded. Once user to login to
the website, files will be uploaded into the his/her drop box in database is files to maintained to
directory into username. Once files to uploaded user the files is download number of times and
1
deleted user own files to unnecessary files or un-important files. There are provisions in the site
for a user to become a registered member and administrator approval accepts.
File hosting services (FHS) were originally designed for file backup purposes and for
uploading files that were too big to be sent as email attachments. FHS allow their users to upload
a file to their servers in easy to follow steps. Once the file has been successfully uploaded, the
site generates a unique URL that can be used for downloading the file.
This web application maintains files uploaded to users into this website, user can also
view and downloaded these files. This module deals with the website user can registered first.
After to register the user should be waiting for approval to administrator with in registered 24
hours. Then approved to user can login to the user and files to be stored into this website, and
more over user to be download the uploaded file anywhere and anytime with the help of user id
and password. User can also change his personal details and unnecessary files to be deleted to his
account.
The administrator of this website will be able to create new users and remove any user.
Administrator view the details of all users in these website. He can also view the maintains of
these website. This module deals with major and crucial part which maintains the registered user
details, user can registered after the administrator is approved to that user, then the user personal
information and user uploaded files is also be maintained into the admin account, each user how
much of memory is to be used into be this site is also be observed. When some registered users
to uploaded files is very vulgar then that files and user account is also be removed administrator.
2
In an ever expanding internet, an increasing number of people utilize online services to
digital content. Most of the platforms that support file uploading operate in a broadcasting way.
For example, users of social networks can upload multimedia files which are then accessible to
their entire friend list. In traditional peer-to –peer networks, users can upload and sharing their
files with everyone connected to the same network.
Sometimes however, users may want to upload files only with a limited number of
people, such as their co-workers, spouses, or family members. In these situations, the all-or-
nothing approach of sharing files is not desired. While emailing digital content is still a popular
choice, most email providers do not usually allow attachments that exceed a few tens of
megabytes.
3
SYSTEM SPECIFICATIONS
System requirements are expressed in a software requirement document. The software
requirement specification is the official statement of what is required of the system developers.
This requirement document includes the requirements definition and the requirement
specification. The software requirement document is not a design document. It should set out
what the system should do without specifying how it should be done. The requirement set out in
this document is complete and consistent.
4
3.2 Software Specifications
Operating System : Windows Xp,7 for client, Windows Server 2008 for Server.
Framework : .Net Framework
Back- End : MS SQL SERVER
Front - End : Microsoft Visual studio
Web Technology : ASP.NET
Web Server : IIS
Languages : VB .NET, C#. NET
Project will be done in ASP. NET with VB as front end and SQL Server 2005 as back
end. Microsoft .NET is framework that connects information, people, systems and devices. It
spans clients, servers and developer tools and consists of:
The .NET Framework programming model that enables developers to build Web-based
applications which expose their functionality programmatically over a network using standard
protocols such as HTTP.
Developer tools such as Microsoft Visual Studio .NET, which provide a rapid application
integrated development environment for programming with the .NET Framework.
Client software such as Windows XP, Windows CE and Microsoft Office XP that helps
developers deliver a deep and compelling user experience across a family of devices and
existing products.
The .NET Framework is the programming model of the .NET environment for building,
deploying and running Web- based applications, smart client applications and XML Web
services. It manages much of the plumbing, enabling developers to focus on writing the business
logic code for their applications. The .NET Framework includes the common language runtime
and class libraries.
5
SYSTEM ANALYSIS
4.1 Definition
System analysis is the detailed study of the various operations performed by the system
their relationships within and outside the system. Analysis is the process of breaking something
into its parts so that the whole may be understood. System analysis is concerned with becoming
aware of the problem. Identifying the relevant and most decisional variables, analyzing and
synthesizing the various factors and determining an optimal or at least a satisfactory solution.
During this a problem is identified, alternate system solutions are studied made about committing
the resources used to design the system.
Existing System
Current system is data to be stored into physical devices, they physical devices are flops,
cd, dvd, hard disk, memory cards, pen drives etc., these physical devices are randomly stored
into and easily access data into that system only. But the physical devices are to be very sensitive
the data is damaged very easily and data will be loosed very fast. These type of system data to be
maintained, and transfer into one place to another place maintains cost very high and manually
data transfers this system, time will also be consumed into existing system.
6
Proposed System
Proposed system is a web application is used to data to be stored into the web server. This
application keep the files in a website and also available to anytime and anywhere. But this
application is accessed through internet and web browsers. These web application is used data
maintenance cost is very low and data damaged is very less. The data is transfer is very easy and
fast. It is very easy to manage very large data in database.
Accessibility: Stored files can be accessed from anywhere via internet connection.
Disaster Recovery: It is highly recommended that user have an emergency backup data
very easy. FHS can be used as a back-up plan by user providing a second copy of important
files. These files are stored at a remote location and can be accessed through an internet
connection.
Cost Saving: This web application can use data back-up cost and martial cost is very
low.
7
Technical Feasibility
Economic Feasibility
Behavioral Feasibility
Technical Feasibility
Technical feasibility includes whether the technology is available in the market for
development and its availability. The assessment of technical feasibility must be based on an
outline design of system requirements in terms of input, output, files, programs and procedures.
This can be qualified in terms of volumes of data, trends, frequency of updating, cycles of
activity etc, in order to give an introduction of technical system. Considering our project if is
technically feasible. Internal Management System with its emphasis on a more strategic decision
making is fast gaining ground as a popular outsourced function.
Economical Feasibility
This feasibility study present tangible and intangible benefits from the prefect by
comparing the development and operational cost. The technique of cost benefit analysis is often
used as a basis for assessing economic feasibility. This system needs some more initial
investment than the existing system, but it can be justifiable that it will improve quality of
service.
Our project is economically feasible. It does not require much cost to be involved in the
overall process. The overall objectives are in easing out the requirement processes.
8
Behavioral/ Operational Feasibility
This analysis involves how it will work when it is installed and the assessment of
political and managerial environment in which it is implemented. People are inherently resistant
to change and computers have been known to facilitate change. The new proposed system is very
much useful to the useful to the users and there for it will accept broad audience from around the
world.
Functional Requirements:
Inputs: The major inputs for Trans Service Net can be categorized module -wise. Basically all
the information is managed by the software and in order to access the information one has to
produce one's identity by entering the user-id and password.
Every user has his/ her own domain of access beyond which the access is dynamically
refrained rather denied.
Output: The major outputs of the system are tables and reports. Tables are created dynamically
to meet the requirements on demand. Reports, as it is obvious, carry the gist of the whole
information that flows across the institution.
9
SYSTEM DESIGN
The most creative and challenging phase of the life cycle is system design. The term
design describes a final system and the process by which it is developed. It refers to the technical
specifications that will be applied in implementations of the candidate system. The design may
be defined as “The process of applying various techniques and principles for the purpose of
defining a device, a process or a system with sufficient details to permit its physical realization”.
The logical characteristics of current systems data stores includes UserId, Faculty name,
Password, Designation, Department, HintQuestion, HintAnswer, DatrofJoining, approvalstatus,
email and user type identifies where the data are used and where immediate access to
information required serves as the basis for identifying database requirements during system
design.
10
Table: student Table(Registration table)
11
Table: jobmela Table
12
5.2 ENTITY RELATIONSHIP DIAGRAMS
Using the three schema approach to software engineering there are three levels of ER
models that may be developed.
A conceptual ER model may be used as the foundation for one or more logical data
models (see below). The purpose of the conceptual ER model is then to establish structural
metadata commonality for the master data entities between the set of logical ER models. The
conceptual data model may be used to form commonality relationships between ER models as a
basis for data model integration.
A logical ER model does not require a conceptual ER model, especially if the scope of
the logical ER model is to develop a single disparate information system. The logical ER model
contains more detail than the conceptual ER model. In addition to master data entities,
operational and transactional data entities are now defined. The details of each data entity are
developed and the entity relationships between these data entities are established. The logical ER
model is however developed independent of technology into which it will be implemented.
Physical model
One or more physical ER models may be developed from each logical ER model. The
physical ER model is normally developed to be instantiated as a database. Therefore, each
physical ER model must contain enough detail to produce a database and each physical ER
model is technology dependent since each database management system is somewhat different.
13
ER DIAGRAMS
Department HintQuestion
Designation HintAnswer
Password
DateofJoinin
Staf g
FacultyName
ApprovalStatus
UserId
Email
Sno
UserType
UserId
Uploads CourseMaster
FileId Link
CourseName
FileName FileSize DateUploaded
14
Admin Login
UserId Password
Admin
Login
succes
s
Request
15
Admin Handled Users
UserId Password
Admin
Login
succes
s
16
Admin verify User upload files
UserId Password
Admin
Login
succes
s
Files
17
User Operation after Login
UserId Password
User
Login
succes
s
Request
18
User Update Profile
UserId Password
User
Login
succes
s
19
5.3 Data Flow Diagrams
A data flow diagram (DFD) is a graphical representation of the "flow" of data through
an information system, modeling its process aspects. Often they are a preliminary step used to
create an overview of the system which can later be elaborated. DFDs can also be used for the
visualization of data processing (structured design).
A DFD shows what kinds of information will be input to and output from the system,
where the data will come from and go to, and where the data will be stored. It does not show
information about the timing of processes, or information about whether processes will operate
in sequence or in parallel.
A DFD is a structured analysis and design tool that can be used for flowcharting in place
of, or in association with information-oriented and process-oriented systems flowcharts. A DFD
is a network that describes the flow of data and the processes that change, or transform, data
throughout a system. This network is constructed by using a set of symbols that do not imply a
physical implementation. It has the purpose of clarifying system requirements and identifying
major transformations that will become programs in system design. So it is the starting point of
the design phase that functionality decomposes the requirement specifications down to the lowest
level of detail.
The symbols used to prepare DFD do not imply a physical implementation, a DFD can be
considered to an abstract of the logic of an information-oriented or a process-oriented system
flow-chart. For these reasons DFDs are often referred to as logical data flow diagrams. The four
basic symbols used to construct data flow diagrams are shown below:
20
A rectangle represents a data source or destination.
File Database
21
These are symbols that represent data flows, data sources, data transformations and data
storage. The points at which data are transformed are represented by enclosed figures, usually
circles, which are called nodes. The principle processes that take place at nodes are:
File
Hosting
ADMIN. User
server
22
Data Flow Diagram for Admin Module
User
Registration
Login Successfully Login approval
ADMIN. view
Data for Verification
New Registered
Verified data users for approvals
Staf/Login Table
User details in staf
View & View table
delete registered
user approved
Upload files
uploaded users
details
files details
Uploads Table
Users Delete
Memory
uses
details Logou users
memory
t
23
Data Flow Diagram for User Module
Successfully Login
Files
uploadin
g to
users.
User
uploading
View,
Logout download
uploaded
files
View & Delet
modify e files
user to Uploads Table
details user
Staf table
24
5.4 UML DIAGRAMS
Enter Details
Send Details
Successful
Waiting for
Approval
Approved
Successful
Registered
Successful
25
Admin Approved to User Registration
Enter Details
Send Details
Validate(uid,pwd)
Successful
Waiting for
Approval
Successful
Successful
26
User Upload and Download Files
Enter Details
Send Details
Validate user
details
Successful
File uploaded
Successful
File download
Successful
27
User Upload and Delete Files
File Upload
User Server Operation Delete Opeation
Enter Details
Send Details
Validate user
details
Successful
File uploaded
Successful
File deleted
Successful
28
Use Case Diagram for Admin
Login
Approval/Reject
Delete User
Delete Files
Admin
Logout
29
Use Case Diagram for User
Registration
Login
Upload files
Delete files
User
Update user
details
Logout
30
IMPLEMENTATION
First phase of implementation is coding. Coding can be done in two ways. One by
automatic program code and other by programmer’s manually written code. A code generator is
a suite of programs that matches the input to an appropriate code template and from these
produces modules of code. The code is made simple in such a way that another programmer can
easily understand and work on that in future. The crucial phase in the system development life
cycle is the successful implementation of the new system design. The process of converting as
new or revised system into an operational one is known as system implementation. This
includes all those activities that take place to convert from an old system to a new system. The
system can be implemented only after a through testing is done and if it is found to work
according to the specifications. The most crucial stage in achieving a new successful system and
giving confident on the new system for the users is that it will work effectively and efficiently. If
involves careful planning, investigation of the current system and its constraints on
implementation, design of methods to achieve the changeover.
Registration.aspx.vb
Imports System.Data.SqlClient
Imports System.Data
Imports System.IO
Partial Class Registration
Inherits System.Web.UI.Page
Public con As New
SqlConnection(ConfigurationManager.ConnectionStrings("cns1").ToString(
))
Public cmd As New SqlCommand()
Public da As New SqlDataAdapter
Public ds As DataSet
Public email, userid As String
Protected Sub btnRegister_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnRegister.Click
Dim b As Boolean = getdata()
If b = True Then
cmd = New SqlCommand("Insert into
Staff(UserId,FacultyName,Password,Designation,Department,HintQuestion,
HintAnswer,ApprovalStatus,Email,UserType) values('" & txtUserId.Text &
"','" & txtName.Text & "','" & txtPassword.Text & "','" &
ddlDesignation.SelectedValue.ToString() & "','" &
ddlDept.SelectedValue.ToString() & "','" &
31
ddlHintQuestion.SelectedValue.ToString() & "','" & txtHintAnswer.Text
& "','Not Approved','" & txtEmail.Text & "','GEN')", con)
If con.State.ToString() = "Closed" Then
con.Open()
End If
cmd.ExecuteNonQuery()
lblMessage.Text = "Registration Succeded. Your Account
will be Activated in 24 Hours."
Directory.CreateDirectory(Server.MapPath("~/Secure/") +
txtUserId.Text)
con.Close()
txtUserId.Text = ""
txtName.Text = ""
txtHintAnswer.Text = ""
txtEmail.Text = ""
Else
Page.RegisterStartupScript("msg1", "<script>alert('Please
Enter Valid Details')</script>")
End If
End Sub
Protected Sub lbtLogin_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles lbtLogin.Click
Response.Redirect("~/login.aspx")
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
da = New SqlDataAdapter("Select CourseName from CourseMaster
order by Sno", con)
ds = New DataSet()
da.Fill(ds, "course")
For i = 0 To ds.Tables("course").Rows.Count - 1
ddlDept.Items.Add(ds.Tables("course").Rows(i)
(0).ToString())
Next
da = New SqlDataAdapter("Select * from Staff", con)
da.Fill(ds, "users")
Dim l1 As Menu
l1 = Master.FindControl("menu1")
l1.Visible = False
End Sub
Protected Function Valid(ByVal s As String) As Boolean
Dim k As Integer = 0
For i As Integer = 0 To ds.Tables("users").Rows.Count - 1
If userid = ds.Tables("users").Rows(i)(1).ToString() Then
k = k + 1
End If
Next
If k = 0 Then
Return True
Else
lblMessage.Text = "User Id Already Exists. Choose Another"
32
Return False
End If
End Function
Protected Function Check(ByVal s As String) As Boolean
Dim k As Integer = 0
For i As Integer = 0 To ds.Tables("Users").Rows.Count - 1
If email = ds.Tables("Users").Rows(i)(10).ToString() Then
k = k + 1
End If
Next
If k = 0 Then
Return True
Else
lblMessage2.Text = "Email Already Exists."
Return False
End If
End Function
Protected Function getdata() As Boolean
userid = txtUserId.Text
If userid.Length > 8 Then
Dim s As String = txtPassword.Text
If s.Length >= 8 Then
email = txtEmail.Text
Dim b As Boolean = Valid(userid)
Dim c As Boolean = Check(email)
If b = True And c = True Then
Return True
Else
Return False
End If
Else
lblMessage.Text = "Password must be atleast 8
characters"
End If
Else
lblMessage.Text = "user id must be atleast 9 Characters"
Return False
End If
End Function
End Class
33
Login.aspx.vb
Imports System.Data.SqlClient
Imports System.Data
Partial Class logo
Inherits System.Web.UI.Page
Public con As New
SqlConnection(ConfigurationManager.ConnectionStrings("cns1").ToString(
))
Public da As New SqlDataAdapter
Public ds As DataSet
Public cmd As SqlCommand
Protected Sub btnSignIn_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSignIn.Click, txtPassword.TextChanged
cmd = New SqlCommand("select * from Staff where UserId='" &
txtUserId.Text & "'COLLATE SQL_Latin1_General_CP1_CS_AS and
Password='" & txtPassword.Text & "'COLLATE
SQL_Latin1_General_CP1_CS_AS and ApprovalStatus='Approved' ", con)
If con.State.ToString() = "Closed" Then
con.Open()
End If
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.HasRows = False Then
dr.Close()
lblPasswordMsg.Visible = True
lblPasswordMsg.Text = "Invalid User Id / Password"
Else
dr.Read()
FormsAuthentication.SetAuthCookie(txtUserId.Text, True)
Session("UserId") = txtUserId.Text
Session.Timeout = 20
If dr(11).ToString() = "GEN" Then
dr.Close()
con.Close()
Response.Redirect("Secure\upload.aspx")
ElseIf dr(11).ToString() = "ADMIN" Then
dr.Close()
con.Close()
Response.Redirect("Administrator\Approvals.aspx")
End If
End If
con.Close()
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
imgKrishna.Width = 1000
End Sub
Protected Sub lbtRegister_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles lbtRegister.Click
Response.Redirect("forgotpassword.aspx")
End Sub
34
Protected Sub lbtSingup_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles lbtSingup.Click
Response.Redirect("Registration.aspx")
End Sub
End Class
35
Forgotpassword.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class forgotpassword : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["cns1"].ToString(
));
SqlDataAdapter da;
int j;
DataSet ds=new DataSet();
SqlCommand cmd=new SqlCommand ();
protected void Page_Load(object sender, EventArgs e)
{
Menu m1 = (Menu)Master.FindControl("menu1");
m1.Visible = false;
Label2.Visible = false;
Label3.Visible = false;
txtHintQuestion.Visible = false;
txtHintAnswer.Visible = false;
btnSubmit.Visible = false;
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Select * From Staff Where UserId='" +
txtUserName .Text + "'";
if(con.State.ToString ()=="Closed")
{
con.Open();
}
SqlDataReader dr=cmd.ExecuteReader();
dr.Read();
if (txtHintAnswer.Text == dr[7].ToString())
{
lblUserId.Visible = true;
lblPassword.Visible = true;
36
Label2.Visible = false;
Label3.Visible = false;
txtHintQuestion.Visible = false;
txtHintAnswer.Visible = false;
btnSubmit.Visible = false;
lblStep1.Text = "STEP 3:";
lblUserId.Text = "Your User Id : " + dr[1].ToString();
lblPassword.Text = "Password : " +
dr[3].ToString();
}
else
{
lblUserId.Visible = true;
lblUserId.Text = "Sorry, You Entered Wrong Answer, Please
Try Again";
}
dr.Close();
con.Close();
}
protected void btnVerify_Click(object sender, EventArgs e)
{
da = new SqlDataAdapter("select * from Staff", con);
da.Fill(ds, "user");
for (int i = 0; i < ds.Tables["user"].Rows.Count; i++)
{
if (txtUserName.Text == ds.Tables["user"].Rows[i]
[1].ToString())
{
txtHintQuestion.Text = ds.Tables["user"].Rows[i]
[6].ToString();
j = i;
}
}
if (txtHintQuestion.Text != "")
{
Label2.Visible = true;
Label3.Visible = true;
txtHintQuestion.Visible = true;
txtHintAnswer.Visible = true;
btnSubmit.Visible = true;
lblStep1.Text = "STEP 2";
Label1.Visible = false;
txtUserName.Visible = false;
btnVerify.Visible = false;
lblUserId.Visible = false;
}
else
{
txtHintQuestion.Visible = false;
lblUserId.Visible = true;
37
lblUserId.Text = "You Have Entered Wrong User Name.
Please specify Correct User Name";
}
}
protected void lbtBack_Click(object sender, EventArgs e)
{
Response.Redirect("~/login.aspx");
}
}
38
CourseMaster.aspx.vb
Partial Class CourseMaster
Inherits System.Web.UI.MasterPage
End Select
End Sub
39
Secure/upload.aspx.vb
Imports System.Data.SqlClient
Imports System.Data
Imports System.IO
Partial Class Secure_Upload
Inherits System.Web.UI.Page
Public con As New
SqlConnection(ConfigurationManager.ConnectionStrings("cns1").ToString(
))
Public cmd As SqlCommand
Public da As New SqlDataAdapter()
Public ds As DataSet
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnUpload.Click
Dim user As String = Session("UserId").ToString()
user = user.Substring(0, 4)
If fupload1.HasFile() = True Then
If fupload1.PostedFile.ContentLength <= 104857600 Then
Dim filename As String = fupload1.FileName
Dim i As Double =
CDbl(fupload1.PostedFile.ContentLength)
i = i / 1024
i = i / 1024
If CInt(i) < 99 Then
cmd = New SqlCommand("select count(*) from Uploads
where UserId='" & Session("UserId").ToString() & "'", con)
If con.State.ToString() = "Closed" Then
con.Open()
End If
Dim count As Integer = CInt(cmd.ExecuteScalar())
con.Close()
count = count + 10
Dim fid As String = user & CStr(count) &
DateTime.Now.ToString()
fupload1.SaveAs(Server.MapPath("~/Secure/" +
Session("UserId").ToString() + "/") + filename)
cmd = New SqlCommand("Insert into
Uploads(UserId,FileId,FileName,FileSize,Link)
values(@p1,@p2,@p3,@p4,@p5)", con)
cmd.CommandType = CommandType.Text
cmd.Parameters.AddWithValue("@p1",
Session("UserId").ToString())
cmd.Parameters.AddWithValue("@p2", fid)
cmd.Parameters.AddWithValue("@p3", Trim(filename))
Dim link As String = Session("UserId").ToString()
& "/" & filename
cmd.Parameters.AddWithValue("@p4", i)
cmd.Parameters.AddWithValue("@p5", link)
If con.State.ToString() = "Closed" Then
con.Open()
40
End If
cmd.ExecuteNonQuery()
con.Close()
lblMessage2.Text = "upload Complete" &
CStr(CInt(i)) & "MB"
Else
Page.RegisterStartupScript("msg5",
"<script>alert('Limit Your File size to 100 MB only')</script>")
End If
Else
lblMessage2.Text = "File Size Exceeded Maximum Limit
(100MB)"
End If
Else
lblMessage2.Text = "Please Select a File"
End If
Page_Load(sender, e)
getdata()
gdrFiles_Load(sender, e)
End Sub
Protected Sub getdata()
da = New SqlDataAdapter("select * from Uploads where UserId='"
& Session("UserId").ToString() & "'", con)
ds = New DataSet()
da.Fill(ds, "uploads")
gdrFiles.DataSource = ds.Tables("uploads")
gdrFiles.DataBind()
Dim s(ds.Tables("uploads").Rows.Count - 1) As String
Dim f As Double = 0
For i As Integer = 0 To ds.Tables("uploads").Rows.Count - 1
f = f + CDbl(ds.Tables("uploads").Rows(i)(4).ToString())
Next
lblUsage.Text = CInt(f.ToString()) & " MB"
lblNo.Text = ds.Tables("uploads").Rows.Count
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
lblUserName.Text = Session("UserId").ToString()
If Session("UserID") Is Nothing Then
Response.Redirect("login.aspx")
End If
If Page.IsPostBack = False Then
If Session("UserID") Is Nothing Then
Response.Redirect("login.aspx")
End If
getdata()
End If
End Sub
Public WithEvents l As New LinkButton()
Public WithEvents l2 As New Label()
Public k As Integer = 0
41
Protected Sub gdrFiles_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles gdrFiles.Load
For Each r As GridViewRow In gdrFiles.Rows
l2 = r.Cells(2).Controls(0)
l2.Text = l2.Text.Substring(0, 5) & "MB"
Next
End Sub
42
Secure/EditProfile.aspx.vb
Imports System.Data.SqlClient
Imports System.Data
Partial Class Secure_EditProfile
Inherits System.Web.UI.Page
Public con As New
SqlConnection(ConfigurationManager.ConnectionStrings("cns1").ToString(
))
Public da As SqlDataAdapter
Public ds As New DataSet()
Public cmd As SqlCommand
Public dr As SqlDataReader
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
da = New SqlDataAdapter("select CourseName from
CourseMaster order by Sno", con)
da.Fill(ds, "course")
For i = 0 To ds.Tables("course").Rows.Count - 1
ddlDept.Items.Add(ds.Tables("course").Rows(i)
(0).ToString())
Next
da = New SqlDataAdapter("Select * from Staff", con)
da.Fill(ds, "users")
da = New SqlDataAdapter("select * from Staff where
UserId='" + Session("UserId").ToString() + "'", con)
da.Fill(ds, "staff")
txtEmail.Text = ds.Tables("staff").Rows(0)(10).ToString()
lblUser.Text = ds.Tables("staff").Rows(0)(1).ToString()
txtHintAnswer.Text = ds.Tables("staff").Rows(0)
(7).ToString()
Dim s As String
s = ds.Tables("Staff").Rows(0)(2).ToString()
txtName.Text = s
s = ds.Tables("Staff").Rows(0)(4).ToString()
ddlDesignation.SelectedValue = s
s = ds.Tables("Staff").Rows(0)(5).ToString()
ddlDept.SelectedValue = s
s = ds.Tables("Staff").Rows(0)(6).ToString()
ddlHintQuestion.SelectedValue = s
End If
End Sub
43
cmd.Parameters.AddWithValue("@p2",
ddlDesignation.SelectedValue.ToString())
cmd.Parameters.AddWithValue("@p3",
ddlDept.SelectedValue.ToString())
cmd.Parameters.AddWithValue("@p4", txtEmail.Text)
cmd.Parameters.AddWithValue("@p5",
ddlHintQuestion.SelectedValue.ToString())
cmd.Parameters.AddWithValue("@p6", txtHintAnswer.Text)
cmd.Parameters.AddWithValue("@p7", lblUser.Text)
If con.State.ToString() = "Closed" Then
con.Open()
End If
cmd.ExecuteNonQuery()
con.Close()
lblMessage.Visible = True
lblMessage.Text = "Update Completed Succesfully"
txtEmail.Text = ""
txtHintAnswer.Text = ""
txtName.Text = ""
End Sub
End Class
44
Secure/ChangePassword.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Secure_ChangePassword : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["cns1"].ToString(
));
SqlCommand cmd;
SqlDataReader dr;
int i;
45
{
con.Open();
}
cmd.ExecuteNonQuery();
lblMessage.Text = "Your Password Succesfully Saved";
}
else
{
lblMessage.Text = "Password shoulb be atleast 8
Characters";
}
}
else
{
lblMessage.Text = "Your Old Password is Wrong. Please Re-
Enter";
}
cmd.Dispose();
con.Close();
}
}
46
Administrator/Approvals.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;
public partial class Administrator_Approvals : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["cns1"].ToString(
));
SqlCommand cmd;
DataSet ds=new DataSet();
SqlDataAdapter da;
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
getdata();
}
if (GridView1.Rows.Count == 0)
{
Label1.Visible = true;
Label1.Text = "There Are No Users Waiting For Approval";
}
else
{
}
}
protected void getdata()
{
da = new SqlDataAdapter("Select
Sno,FacultyName,Designation,UserId,Department from Staff where
ApprovalStatus='Not Approved' order by Sno", con);
da.Fill(ds, "Approvals");
GridView1.DataSource = ds.Tables["Approvals"];
GridView1.DataBind();
foreach (GridViewRow R in GridView1.Rows)
{
LinkButton l1 = (LinkButton)R.Cells[0].Controls[0];
47
l1.Text = "Approve";
}
foreach (GridViewRow R in GridView1.Rows)
{
LinkButton l1 = (LinkButton)R.Cells[0].Controls[2];
l1.Text = "Reject";
}
}
protected void B1_Click(object sender, EventArgs e)
{
Response.Cookies.Remove(Session["UserId"].ToString());
Response.Clear();
FormsAuthentication.SignOut();
Session.Abandon();
Response.Redirect("login.aspx");
}
48
con.Close();
String[] st = Directory.GetFiles(Server.MapPath("~/Secure/" +
L1.Text));
for (int i = 0; i <= st.Length - 1; i++)
{
File.Delete(st[i]);
}
Directory.Delete(Server.MapPath("~/Secure/" + L1.Text));
LinkButton l1 = (LinkButton)R.Cells[0].Controls[2];
l1.Text = "Rejected";
l1.Enabled = false;
LinkButton l2 = (LinkButton)R.Cells[0].Controls[0];
l2.Visible = false;
Page_Load(sender, e);
}
protected void GridView1_SelectedIndexChanged(object sender,
EventArgs e)
{
}
}
49
Administrator/ChangePassword.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Administrator_ChangePassword : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["cns1"].ToString(
));
SqlCommand cmd;
SqlDataReader dr;
}
protected void btnSave_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("Select Password from Staff where
UserId='" + Session["UserId"].ToString() + "'COLLATE
SQL_Latin1_General_CP1_CS_AS", con);
if (con.State.ToString() == "Closed")
{
con.Open();
}
dr = cmd.ExecuteReader();
dr.Read();
string s = dr[0].ToString();
dr.Close();
if (txtOldPassword.Text == txtNewPassword.Text)
{
Page.RegisterStartupScript("msg", "<script>alert('Old and
New Password is same. Please choose different password')</script>");
}else
if (txtOldPassword.Text == s)
{
cmd.CommandText = "update Staff set Password='" +
txtNewPassword.Text + "' where UserId='" +
Session["UserId"].ToString() + "'";
50
if (con.State.ToString() == "Closed")
{
con.Open();
}
cmd.ExecuteNonQuery();
lblMessage.Text = Session["Userid"].ToString()+" Password
Succesfully Change";
}
else
{
lblMessage.Text = "Your Old Password is Wrong. Please Re-
Enter";
}
cmd.Dispose();
con.Close();
}
protected void btnCancel_Click(object sender, EventArgs e)
{
Response.Redirect("Approvals.aspx");
}
protected void lblSignOut_Click(object sender, EventArgs e)
{
FormsAuthentication.SignOut();
Response.Cookies.Remove(Session["UserId"].ToString());
Response.Clear();
Session.Abandon();
Response.Redirect("login.aspx");
}
51
Administrator/Uploaded.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;
public partial class Administrator_Uploaded : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["cns1"].ToString(
));
SqlDataAdapter da;
DataSet ds = new DataSet();
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
getdata("Select UserId,FileId,FileName,FileSize from
Uploads order by UserId");
}
}
protected void getdata(String s)
{
da = new SqlDataAdapter(s, con);
da.Fill(ds, "Uploads");
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
GridView1.Caption = "FILES UPLOADED TILL DATE " +
DateTime.Now.Date.ToString();
}
protected void B1_Click(object sender, EventArgs e)
{
FormsAuthentication.SignOut();
Response.Cookies.Remove(Session["UserId"].ToString());
Response.Clear();
Session.Abandon();
Response.Redirect("login.aspx");
}
protected void GridView1_RowDeleting(object sender,
GridViewDeleteEventArgs e)
52
{
GridViewRow r = GridView1.Rows[e.RowIndex];
String s1, s2;
s1 = r.Cells[1].Text;
s2 = r.Cells[3].Text;
cmd = new SqlCommand("Delete from uploads where UserId='" + s1
+ "' and FileName='" + s2 + "'", con);
if (con.State.ToString() == "Closed")
{
con.Open();
}
cmd.ExecuteNonQuery();
con.Close();
File.Delete(Server.MapPath("~/Secure/" + s1 + "/") + s2);
Page.RegisterStartupScript("msg5", "<script>alert('File Delete
Succesfully')</script>");
getdata("Select UserId,FileId,FileName,FileSize from Uploads
order by UserId");
}
}
53
Administrator/Usage.aspx.vb
Imports System.Data.SqlClient
Imports System.Data
Partial Class Administrator_Usage
Inherits System.Web.UI.Page
Public con As New
SqlConnection(ConfigurationManager.ConnectionStrings("cns1").ToString(
))
Public da As SqlDataAdapter
Public ds As DataSet
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Try
da = New SqlDataAdapter("select Upper(UserId) AS
USERNAME,Sum(FileSize) as MEMORYUSED from uploads group by UserId
order by UserID ", con)
ds = New DataSet()
da.Fill(ds, "usage")
If (ds.Tables("usage").Rows.Count = 0) Then
Page.RegisterStartupScript("msg4",
"<script>alert('There Are No Existing Users')</script>")
Else
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
End If
Catch ex As Exception
End Try
End Sub
End Sub
54
End Sub
55
Administrator/Users.aspx.vb
Imports System.Data.SqlClient
Imports System.Data
Imports System.IO
Partial Class Administrator_Users
Inherits System.Web.UI.Page
Public con As New
SqlConnection(ConfigurationManager.ConnectionStrings("cns1").ToString(
))
Public da As SqlDataAdapter
Public ds As New DataSet()
Public cmd As SqlCommand
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
griddata()
End Sub
Protected Sub lbtSignout_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles lbtSignout.Click
FormsAuthentication.SignOut()
Response.Cookies.Remove(Session("UserId").ToString())
Response.Clear()
Session.Abandon()
Response.Redirect("login.aspx")
End Sub
Protected Sub griddata()
ddlDeleteUser.Items.Clear()
da = New SqlDataAdapter("select
UserId,facultyname,dateofjoining,department from Staff where
UserType='GEN' and ApprovalStatus='Approved' order by DateofJoining ",
con)
da.Fill(ds, "Users")
For i As Integer = 0 To ds.Tables("Users").Rows.Count - 1
ddlDeleteUser.Items.Add(ds.Tables("Users").Rows(i)
(0).ToString())
Next
ddlDeleteUser.Height = btnDelete.Height
GridView1.DataSource = ds.Tables("Users")
GridView1.DataBind()
End Sub
56
End If
cmd.ExecuteNonQuery()
con.Close()
Dim f() As String =
System.IO.Directory.GetFiles(Server.MapPath("~/Secure/" & s & "/"))
If f.Length = 0 Then
Else
For i As Integer = 0 To f.Length - 1
System.IO.File.Delete(f(i))
Next
End If
System.IO.Directory.Delete(Server.MapPath("~/Secure/" & s))
Page.RegisterStartupScript("msg7", "<script>alert('User
Succesfully Deleted')</script>")
End Sub
End Class
57
SYSTEM TESTING
Testing is the process of evaluating a system or its component(s) with the intent to find
that whether it satisfies the specified requirements or not. This activity results in the actual,
expected and difference between their results.
In simple words testing is executing a system in order to identify any gaps, errors or
missing requirements in contrary to the actual desire or requirements.
In the IT industry, large companies have a team with responsibilities to evaluate the
developed software in the context of the given requirements. Moreover, developers also conduct
testing which is called Unit Testing. In most cases, following professionals are involved in
testing of a system within their respective capacities:
Software Tester
Software Developer
Project Lead/Manager
End User
An early start to testing reduces the cost, time to rework and error free software that is
delivered to the client. However in Software Development Life Cycle (SDLC) testing can be
started from the Requirements Gathering phase and lasts till the deployment of the software.
However it also depends on the development model that is being used.
For example in Water fall model formal testing is conducted in the Testing phase, but in
incremental model, testing is performed at the end of every increment/iteration and at the end the
whole application is tested.
58
Testing is done in different forms at every phase of SDLC like during Requirement
gathering phase, the analysis and verifications of requirements are also considered testing.
Reviewing the design in the design phase with intent to improve the design is also
considered as testing. Testing performed by a developer on completion of the code is also
categorized as Unit type of testing.
Unlike when to start testing it is difficult to determine when to stop testing, as testing is a
never ending process and no one can say that any software is 100% tested. Following are the
aspects which should be considered to stop the testing:
Testing Deadlines.
Completion of test case execution.
Bug rate falls below a certain level and no high priority bugs are identified.
Management decision.
Verification & Validation
Verification
59
Validation
The different types of testing which may be used to test Software during SDLC are
Manual testing
This type includes the testing of the Software manually i.e. without using any automated
tool or any script.
In this type the tester takes over the role of an end user and test the Software to identify
any un-expected behavior or bug.
There are different stages for manual testing like unit testing, Integration testing, System
testing and User Acceptance testing.
UNIT TESTING
Functional and reliability testing in an Engineering environment. Producing tests for the
behavior of components of a product to ensure their correct behavior prior to system integration.
INTEGRATION TESTING
Testing in which modules are combined and tested as a group. Modules are typically code
modules, individual applications, client and server applications on a network, etc. Integration
Testing follows unit testing and precedes system testing.
60
SYSTEM TESTING
System testing falls within the scope of black box testing, and as such, should require no
knowledge of the inner design of the code or logic.
ACCEPTANCE TESTING
Testers use test plan, test cases or test scenarios to test the Software to ensure the
completeness of testing.
Manual testing also includes exploratory testing as testers explore the software to
identify errors in it.
Automation testing
Automation testing which is also known as Test Automation is when the tester writes
scripts and uses another software to test the software. This process involves automation of a
manual process. Automation Testing is used to re-run the test scenarios that were performed
manually, quickly and repeatedly.
Apart from regression testing, Automation testing is also used to test the application from
load, performance and stress point of view. It increases the test coverage; improve accuracy,
saves time and money in comparison to manual testing.
REGRESSION TESTING
61
Though regression testing can be performed manually an automated test suite is often
used to reduce the time and resources needed to perform the required testing.
LOAD TESTING
Load testing is a generic term covering Performance Testing and Stress Testing.
PERFORMANCE TESTING
STRESS TESTING
A graceful degradation under load leading to non-catastrophic failure is the desired result.
Often Stress Testing is performed using the same process as Performance Testing but employing
a very high level of simulated load.
It is not possible to automate everything in the Software; however the areas at which user
can make transactions such as login form or registration forms etc, any area where large amount
of users can access the Software simultaneously should be automated.
Furthermore all GUI items, connections with databases, field validations etc can be
efficiently tested by automating the manual process.
Accessing the application for load and performance with many virtual users.
62
Stable Software with respect to manual testing.
Availability of time.
Following are the tools which can be use for Automation testing
63
Test case for Registration Form
Test case
Test case ID Expected Result Actual Result Test Case Result
Description
Enter Username
Username must
characters
Reg02 capital, small, Fail
without case
spatial character.
sensitive.
Password must be
Enter Password
Reg03 greater than 9 Fail
Less than 8.
character.
Don’t enter
characters in the
Reg06 fields then click Fill the all fields. Fail
on Registration
button.
64
Test case for Login
Test case
Test case ID Expected Result Actual Result Test Case Result
Description
Don’t fill
username &
User Id/Password
Login01 Password fields Fail
Mandatory
click on login
button
Enter valid
username and
Login04 password and Login successful Pass
click on login
button
65
Test case for Change Password
Test case
Test case ID Expected Result Actual Result Test Case Result
Description
Enter new
Confirm password
Chgpwd02 &confirm Fail
doesn’t match
password different
Empty fields to
Fill the fields to
Chgpwd03 click on to save Fail
first
button.
Test case
Test case ID Expected Result Actual Result Test Case Result
Description
Without select
Ad_Us_del02 Please select User Fail
username
66
Test case for Upload
Test case
Test case ID Expected Result Actual Result Test Case Result
Description
Please select
Select file to
Upld02 below 500 MB Fail
above 500 MB
file
Test case
Test case ID Expected Result Actual Result Test Case Result
Description
Don’t enter
characters in the
Prf03 Fill the all fields. Fail
fields then click
on Update button.
67
RESULTS
Home Page
68
User Registration Page
69
Login Page
70
Approval Page
71
Upload Page
72
After Uploading File
73
File Download
74
User Password Change Page
75
User Update Profile Page
76
Admin View User Details
77
Admin Delete User Page
78
Admin Password Change Page
79
Admin Observe and Delete Files
80
Admin View Memory Usage by User
81
Password Recovery Page
82
FUTURE ENHANCEMENTS
The project made here is just to ensure that file storage in cloud. Currently the system
works for limited number of administrators to works. In near future it will be extended for many
types of file storage policies so that efficiency can be improved.
The developed software handles the basic operations pertaining to File Hosting Server
System and the application can be enriched by incorporating additional functionalities like:
83
CONCLUSION
The main purpose of the proposed system is to build a web application the users to
file upload for any of the file types who are registered with the system. The users can upload
files, download available files his/her necessary files, and also unnecessary files to be deleted
user his/her self through online. The application allows users to register in the system and
perform basic operations like: select files, file upload Datetime, download and delete files.
The system to provide file access everywhere and every time through internet. The developed
package allows the administrator to handle the user details, files to observe to new users, old
users also. Administrator to approve to user registration to admin account to login.
84
BIBLIOGRAPHY
85