0% found this document useful (0 votes)
34 views57 pages

The Design Andimplementation Ade

The document describes the design and implementation of a secured cloud-based file sharing system. It discusses cloud computing concepts, reviews related studies, and proposes a system to allow users to securely share files via cloud networks. The proposed system is analyzed and a methodology is defined. The system is designed, implemented, and tested.

Uploaded by

adeyemi.b.david
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views57 pages

The Design Andimplementation Ade

The document describes the design and implementation of a secured cloud-based file sharing system. It discusses cloud computing concepts, reviews related studies, and proposes a system to allow users to securely share files via cloud networks. The proposed system is analyzed and a methodology is defined. The system is designed, implemented, and tested.

Uploaded by

adeyemi.b.david
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 57

Title Page

THE DESIGN ANDIMPLEMENTATION


OF A SECURED AND INTERACTIVE CLOUD BASED FILE SHARING
SYSTEM USING CLOUD COMPUTING

BY

ADEYEMI DAVID
18283055

PROJECT SUBMITTED TO THE DEPARTMENT OF COMPUTER


SCIENCE, FACULTY OF SCIENCE, UNIVERSITY OF ABUJA, IN
PARTIAL FULFILMENT FOR THE REQUIREMENTS FOR THE
AWARD OF THE BACHELOR OF SCIENCE IN COMPUTER SCIENCE

MAY, 2023
DECLARATION
I hereby declare that the project work titled, “The Design and Implementation of a Secured
Cloud Based File Sharing System” is a collection of my original research work and it has not
been presented for any qualification anywhere. Information from other sources (published or
unpublished) has been duly acknowledged.

ADEYEMI DAVID ____________________

18283055 Signature and Date

ii
CERTIFICATION
This is to certify that the projected titled, “The Design and Implementation of a Secured Cloud
Based File Sharing System” by Adeyemi David, 18283055 was carried out under my
supervision.

DR (MRS) ABIODUN ESTHER _______________________

Project Supervisor Signature & Date

iii
APPROVAL
The project titled, “The Design and Implementation of a Secured Cloud Based File Sharing
System” by Adeyemi David 18283055 meets the regulations governing the award of the degree
of Bachelor of Science in Computer Science of University of Abuja, and it is approved for its
contribution to scientific knowledge and literary presentation.

Dr(Mrs) Abiodun Esther _______________________

Project Supervisor Signature & Date

Professor Fransisca Nonyelum Ogwueleka _______________________

Head of Department Signature & Date

Professor Olubunmi Agarry _______________________

Dean of Faculty Signature & Date

Professor Afolayan Ayodele Obiniyi _______________________

External Examiner Signature & Date

iv
DEDICATION
I want to dedicate this project to God for his sustenance and provision throughout my pursuit of
bachelor of Computer Science’s degree and also, to my parent who were my major support
system.

v
ACKNOLEDGEMENT
I cannot fully express in words my gratitude to my project supervisor, Dr (Mrs) Abiodun Esther
for her invaluable patience and feedback to the success of this project work.
My special thanks to every of my departmental lecturers who have generously on the long run
provided knowledge that in one way or the other has contributed to the success of this project
work.
I must also acknowledge my parent for their unconditional support and love me, Daddy,
Mummy, thank you for your love.

vi
ABSTRACT
Recently, with the advancement in technology, there has been a drastic change in the way
information is shared over the internet. This involves the various channels in which files can be
stored and shared. Cloud sharing is a relatively new technology advancement which has been
steadily taking over more and more market share in the past three years. The cloud file sharing
technique makes users share files among each other with ease, easy to setup, and open-source.
Cloud file sharing is publicized as the next major step for all forms of typical information
technology use. From businesses, to non-profit organizations, to single users, there seems to be
various applications which can use cloud file sharing or storage in daily computer usage, to offer
a better, faster, and smarter way to share important document. This paper aims to build a cloud
based file sharing application, offering users the power to share files via cloud networks in the
palm of their hand.

vii
TABLE OF CONTENTS
THE DESIGN ANDIMPLEMENTATION i
OF A SECURED AND INTERACTIVE CLOUD BASED FILE SHARING SYSTEM USING
CLOUD COMPUTING i
DECLARATION ii
CERTIFICATION iii
APPROVAL iv
DEDICATION v
ACKNOLEDGEMENT vi
ABSTRACT vii
LIST OF TABLES xii
LIST OF ABBREVIATIONS xiii
CHAPTER ONE: INTRODUCTION 1
1.0 Background of Study 1
1.1 Statement of Problem 2
1.2 Aims and Objective of Study 2
1.3 Scope of Study 2
1.4 Limitations of Study 2
1.5 Definition of Terms 2
CHAPTER TWO: LITERATURE REVIEW 4
2.0 Cloud Computing Definition 4
2.1 History of Cloud Computing 4
2.2 Cloud Computing Predecessor Paradigm 5
2.3 Cloud Computing Service Models 5
2.4 Cloud Software as a Service (SaaS). 5
2.5 Cloud Platform as a Service (PaaS). 5
2.6 Cloud Infrastructure as a Service (IaaS). 5
2.7 Characteristics of cloud computing 6
2.8 Cloud Deployment Model 7
2.9 Benefits of Cloud Computing 8

viii
2.10 Online Cloud File Sharing 8
2.11 Review of Related Studies 9
2.12 Research Gap 11
CHAPTER THREE: SYSTEM ANALYSIS AND METHODOLOGY 13
3.0 Introduction 13
3.1 Limitations of the existing system 13
3.2 Justification of the new system 14
3.3 Methodology 14
3.3.1 System Requirement Specification 14
3.4 System Design 15
3.5 Logical Design 15
3.6 Input Design 15
3.7 Output Design 17
3.8 Menu Design 17
3.9 Use Case Diagram 17
3.11 Structure of Database Design 18
3.12 System Flowchart 20
CHAPTER FOUR: SYSTEM DESIGN, IMPLEMENTATION AND DISCUSSION 21
4.0 Introduction 21
4.1 Choice of programming language 21
4.2 System Testing Strategies 21
4.3 Unit Test 21
4.4 Integration Testing 22
4.5 Target Computer System Requirements 22
4.4 The Result of Implementation 24
4.6 Software Maintenance Issues 26
4.7 Corrective Maintenance 26
4.8 Preventive Maintenance 27
4.9 Adaptive Maintenance 27
CHAPTER FIVE: SUMMARY, CONCLUSION AND RECOMMENDATIONS 28
5.0 Introduction 28

ix
5.1 Constraints of the Study 28
5.2 Summary 28
5.3 Contribution to knowledge 28
5.4 Recommendations 29
5.5 Conclusion 29
REFERENCES 31
APPENDIX A – WEB BASED PRESENTATION APPLICATION 34
APPENDIX B – SOURCE CODE: 36

x
LIST OF FIGURES
Figure Page
Figure 3.0 Login Form Interface 15
Figure 3.1 Create Account Form 16
Figure 3.2 User Profile Interface 16
Figure 3.3 Add File Interface 16
Figure 3.4 Cloud Based File Sharing System Menu Design 17
Figure 3.5 The Activity Diagram 18
Figure 3.6 System Flowcharts 20
Figure 4.0 Implementation of Source Code 23
Figure 4.1 Local Host Server 24
Figure 4.2 The Log in Section 24
Figure 4.3 The System Dash Board 25
Figure 4.4 The Add file Section 25
Figure 4.5 The Profile Section 26

xi
LIST OF TABLES
Table Page
Table 3.0 Post database structure 19
Table 3.1 Use Login database structure 19
Table 4.0 Software requirement for target computer system 22
Table 4.1 Hardware requirement for target computer system 23

xii
LIST OF ABBREVIATIONS
CPU Central Processing Unit
EC2 Elastic Cloud Computing
FTP File Transfer Protocol
Iaas Infrastructure as a Service
IBM International Business Machines Corporation
ICCASM International Confidence on Computers App and System Modeling
IT Information Technology
NIST National Institute of Standard and Technology
PaaS Platform as a Service
PKI Public Key Infrastructure
SaaS Software as a Service
SRS System Requirement Specification
UML Unified Modeling Language

xiii
CHAPTER ONE
INTRODUCTION

1.0 Background of Study


File sharing has been a means of distributing or providing access to digitally stored information,
these information could be computer programs, multimedia files like (audio, images and video),
documents, or digital books. The Phrase "cloud computing"is defined as a framework or sort of
programming application. Cloud computing is on high request and saves a lot of cost in
processing and adaptability, high-accessibility, and decreased data usage. Amazon's Elastic
Compute Cloud (EC2) is a case of IaaS (Infrastructure as a Service)stage. It offers fundamental
foundation segment, for example, CPUs, memory, and capacity. Google App Engine is acase of
PaaS (Platform as a Service) stage. In Distributed computing stage Cloud server is a physical
server. In light of IaaS and PaaS stages, a lot of time and money have been saved for start-up
companies, such as foursquare and dropbox.Cloud computing is a technology that utilizes the
web and central remote servers to keep up applications and data storage. One significant
challenge is the manner by which to move these conventional applications to the cloud. This
research focuses on the migration of specific flies of any size, from the local storage device to a
cloud based system with more security, and can be easily accessed at any part of the world.

The cloud computing is developing quickly for it offers on-demand computing power and
capacity. The power of cloud computingempowers dynamic adaptability of utilizations
confrontingdifferent methods of file transfer in our advanced technology age. However,
challenges emerge while considering the enormousamount of files to be shared. In this research,
we propose moving of flies, from the traditional FTP service to the cloud. We execute FTP file
transfer on Windows Azure Platform alongside the auto-scaling cloud feature. Furthermore, we
implement a benchmark to study the performance of our Cloudsharing system. This research
focuses on designing and implementing a cloud file sharing system,the potential benefits and
technical issues associated with sharing of files easily for easy retrieval.

1
1.1 Statement of Problem
The essential challenges faced with the conventional way of file sharing, management and
storage techniques (such as manual filing or sharing of images, documents etc) is that users have
little control over –or even knowledge the type of file being shared, if it contains a virus. Also,
users do not or sometimes don’t remember the names of these files, the files contents, and their
storage locations; this increases the risk of lost. (Gupta, 2021)

There may also be irregularities during file sharing; this could be lack of connectivity strength,
device compatibility and other human factors. The cloud based file sharing system will be an
effective way to share files over the internet and give other usage access to view or manage the
uploaded files easily at any part of the globe via the internet.

1.2 Aims and Objective of Study


The main aim of this research isthe implementation and designofa cloud based file sharing
system for easy sharing on a secured platform, with the following objectives:
i. Users can easily host, store and backup data with high-performance computing easy to
retrieve.
ii. Files can be accessed without any limiting factor, example device compatibilities.
iii. Availability of flies at any time. Cloud computing offers availability difficulties experienced
in the conventional way of file sharing.
1.3 Scope of Study
The scope of the research is focused on designing and implementing a Cloud based file sharing
system, which will represent as a platform for file sharing, information storage and
dissemination.
1.4 Limitations of Study
The major limitation of the study is - The internet, which is the only way to cloud computing.
When there is no internet connection, the internet path to the cloud file sharing system is in
trouble, automatically access to your cloud files can only be accessed when connected to the
internet, and in most part of the world, internet cost is high.
1.5 Definition of Terms
i. Cloud computing- the practice of using a network of remote servers hosted on the Internet to
store, manage, and process data, rather than a local server or a personal computer.

2
ii. Internet - an electronic communications network that connects computer networks and
organizational computer facilities around the world.
iii. File sharing - File sharing is the practice of distributing or providing access to digital media,
such as computer programs, multimedia, documents or electronic books.
iv. FTP - The File Transfer Protocol is a standard network protocol used for the transfer of
computer files between a client and server on a computer network.
v. Cloud server - A cloud server is a virtual server (rather than a physical server) running in
a cloud computing environment. It is built, hosted and delivered via a cloud computing
platform via the internet, and can be accessed remotely.
vi. Dropbox -Dropbox is a file hosting service operated by the American company Dropbox,
Inc., headquartered in San Francisco, California, that offers cloud storage, file
synchronization, personal cloud.

3
CHAPTER TWO
LITERATURE REVIEW

2.0 Cloud Computing Definition


The US Government’s National Institute of Standards and Technology (NIST)defines cloud
computing as a computing model for enabling ubiquitous, convenient, on-demand network
access to a shared pool of configurable computing resources(e.g., networks, servers, storage,
applications, and services) that can be rapidly provisioned and released with minimal
management effort or service provider interaction. (Mell and Grance, 2011).

Other attempts to define clouds computing which assist to have a broader perspective and
understanding of the technology are:-
i. Cyber infrastructure (cloud) is a collection of computing resources that increases efficiency,
quality and reliability by capturing commonality among application needs and felicitates the
efficient sharing of equipments and services (Vouk, 2004).
ii Cloud computing is not a new technology; it is a new business model wrapping round
technologies, such as server virtualization, to reduce the cost of using information technology
resources. It takes advantage of Web-based utility services that are accessed so frequently that
they need to be available whenever the consumer requires them at any time. Consumers are then
able to payservice providers based on their usage of these utility services. (Buyya et al.,
2009)This enables technology to allow scalable and virtualized IT resources to be provided as
aservice over the network. (SNIA, 2009)
iii. Cloud is a type of parallel and distributed system consisting of a collection ofinter-connected
and virtualized computers that are dynamically provisioned and presented as
2.1 History of Cloud Computing
Information technology has had a continuous evolution paradigm shifts, for example from Main
frames to the advent of personal computers and most recently mobile computing, from
standalone computing, peer–to-peer, client-server, distributed systems and the breakthrough of
all times the internet in the 1990 (David, 2009).
Cloud computing gained popularity in October 2007 when IMB and Google announced
collaboration in the domain. IBM followed up by announcing “BlueCloud”. (Vouk, 2004)

4
2.2 Cloud Computing Predecessor Paradigm
Buyya (2009) describes cluster computing and grid computing as the immediate building block
of cloud computing. He gives the following description:-

Cluster – the resources in a cluster are located in a single administrative domain and managed as
single entity.
Grid system- the resources are geographically distributed across multiple administrative
domains with their own management policies and goals
Cloud computing – the cloud platform possesses characteristic of cluster and grids plus its own
special attributes and capabilities such as virtualization, dynamic services with web services
interfaces, and support for creating 3rd party value added computing storage and application
services.
2.3 Cloud Computing Service Models
The models are based on NIST definition of cloud computing (Mell and Grance, 2011).
2.4 Cloud Software as a Service (SaaS).
SaaS provides the consumer the ability to use the provider’s applications running on a cloud
infrastructure. The applications are accessible from various client devices through a thin client
interface such as a web browser (e.g., web-based e-mail, Gmail, yahoo, cooperate email). The
implication of this consumer rents services from the provider rather than buying, installing and
running their own software.
2.5 Cloud Platform as a Service (PaaS).
PaaS Provides the consumer the ability to deploy onto the cloud infrastructure consumer-created
or acquired applications created using programming languages and tools supported by the
provider. It implies that customers can develop and execute application in abstraction of the
underlying infrastructure. E.g. Microsoft Azure and Google App Engine
2.6 Cloud Infrastructure as a Service (IaaS).
IaaS Provides the consumer the ability to process, store, use networks, and other fundamental
computing resources where the consumer is able to deploy and run arbitrary software, which can
include operating systems and applications. The provider gives a solution that offers computing
power and storage space on demand.
E.g. Rackspace and Amazon S3

5
2.7 Characteristics of cloud computing
2.7.1 On-demand self-service
A consumer can unilaterally get computing capabilities such as server time and network usage
automatically without human interaction (Mell and Grance, 2011).

2.7.2 Broad network access


This is very vital for it helps in giving high capacity connectivity where large amount of data can
be transmitted.

2.7.3 Resource pulling


The provider’s computing resources are pooled to serve multiple consumers using a multi-tenant
model, with different physical and virtual resources dynamically assigned and reassigned
according to consumer demand. (Mell and Grance, 2011).

2.7.4 Rapid elasticity/ infinite capacity / Dynamism


Capabilities can be rapidly and elastically provisioned, in some cases automatically, to quickly
scale out and rapidly released to quickly scale in. to the consumer the capabilities available for
provisioning often appear to be unlimited and can be purchased in an quantity at any time. (Mell
and Grance, 2011)

2.7.5 Measured services


This is where consumer is billed on what they spend. Resource usage can be monitored,
controlled and reported, providing transparency for both the provider and consumer of the
utilized service. (Mell and Grance, 2011)

2.7.6 Abstraction of infrastructure


Computer, network and storage infrastructure resources are abstracted from the application and
information resources as a function of service delivery this is made possible by high level of
virtualization (Beaker, 2009).

6
2.7.7 Resource Democratization
The abstraction of infrastructure yields the notion of resource democratization –whether
infrastructure, applications, or information – and provides the capability for pooled resources to
be made available and accessible to anyone or anything authorized to utilize them using
standardized methods for doing so. (Beaker, 2009)

2.7.8 Service oriented Architecture


As the abstraction of infrastructure from application and information yields well defined and
loosely-coupled resource democratization, the notion of utilizing these components in whole or
part, alone or with integration, provides a services oriented architecture where resources may be
accessed and utilized in a standard way. In this model, the focus is on the delivery of service and
not the management of infrastructure. (Beaker, 2009)

2.8 Cloud Deployment Model


According to NIST (Mell. et al, 2011) there are four cloud deployment models namely:-

2.8.1 Private cloud


Cloud infrastructure is operated solely for an organization. It may exist on or off organization’s
premise and management could be outsourced or not. Private cloud could be shared by several
organizations that are interrelated and has shared concern like mission, security requirement,
policy, and compliance consideration and business and client base.

2.8.2 Public
This is made available to the general public or a large industry group and is ownedby an
organization selling cloud service.

2.8.3 Hybrid
This could be composition of two or more clouds bounded together by stand ardizedor
proprietary technology that enable data and application portability.
Source: 2010 International Conference on Computer Application and System Modeling
(ICCASM 2010) (Jingyu, 2010)Figure 2.1 Conceptual Model of Cloud Computing

7
2.9 Benefits of Cloud Computing
According to (David, 2009) Cloud computing offers a number of benefits, including the potential
for:
i. Rapid scalability and deployment capabilities (providing just-in-time computing power and
infrastructure)
ii. Decreased maintenance/upgrades
iii. Improved resource utilization—elasticity, flexibility, efficiencies
iv. Improved economies of scale
v. Improved collaboration capabilities
vi. Ability to engage in usage-based pricing, making computing a variable expense, rather than a
fixed capital cost with high overhead12
vii. Reduced information technology (IT) infrastructure needs—both upfront and support costs
viii. Capacity for on-demand infrastructure and computational power
ix. Green-friendly—reduced environmental footprint
x. Improved disaster recovery capabilities
xi. Nein (2009) cites the following benefits cost reduction, increased flexibility, access
anywhere, easy to implement, service quality, delegate non-critical application, always the latest
software, sharing and group collaboration.

2.10 Online Cloud File Sharing


There are a lot of file sharing websites online. Some famous sites are www.rapidshare.com,
www.megaupload.com, www.xdrive.com, www.box.net etc. www.box.net is an AJAX enabled
website with a lot of cool features and is also very interactive. All the websites which serves the
purpose of online file storage/sharing usually have a size limit to upload files and some have size
limit to download files per hour due to space and bandwidth constraints. Other forms of file
sharing as described in the previous chapter are FTP and P2P. FTP or file transfer protocol is a
commonly used protocol for exchanging files over any network that supports the TCP/IP
protocol (such as the Internet or an intranet). The FTP server, running FTP server software,
listens on the network for connection requests from other computers. The client computer,
running FTP client software, initiates a connection to the server. Once connected, the client can
do a number of file manipulation operations such as uploading files to the server, download files

8
from the server, rename or delete files on the server and so on [16]. Most of the browsers present
now can act as a FTP client. Common FTP client software’s are CuteFTP, SmartFTP and
DirectFTP etc. FTP is a common standard for file sharing and is used by a lot of people today.
P2P or Peer-to-Peer network is a type of network in which each workstation has equivalent
capabilities and responsibilities. P2P file sharing network is usually used for
sharing content files containing audio, video, data or anything in digital format and real-time
data. BitTorrent is a famous peer-to-peer file distribution client application. P2P is best known
for sharing files online and is more popular than the others methods available.

2.11 Review of Related Studies

S/ Related Works Description Contributions Limitations


N

i (Alotaibi et al., 2015) Proposed a secure Implemented multi- Limited evaluation


cloud file sharing cloud architecture for scalability and
system based on increases security. performance.
multi-cloud
architecture.

ii (Weng et al., 2019) Designed a secure Decentralized Limited to


file sharing system architecture ensures blockchain-based
based on immutability of infrastructure.
blockchain. shared files.

iii (Moeller et al., 2016) Developed a Granular access Heavy


secure file sharing control and secure computation
system that uses sharing of sensitive overhead for
attribute-based data. attribute
encryption. encryption.

iv ( Mearns et al., 2018) Proposed a secure Enables secure Limited evaluation


file sharing system computations on for scalability and

9
based on encrypted data. performance.
homomorphic
encryption.

v (Y. Baldin et al., 2018) Designed a secure Provides strong Limited to


file sharing system security and privacy individual use, not
with end-to-end guarantees. suitable for
encryption. collaboration.

vi Kshetri, H. L. (2014) Security and The paper identifies The paper is a


privacy issues of security and privacy general overview
risks associated
cloud computing. with cloud and does not
computing and specifically focus
proposes different
on file sharing.
methods to mitigate
them.
vii Zawoad, M., & Hasan, Secure file sharing Identifies security The presented
R. (2015) in the cloud: threats and proposed method
requirements, challenges in cloud- still has the
challenges, and based file sharing. potential to be
mitigations. Offers solutions and attacked by a Man-
proposed shared in-The-Middle
key encryption for (MITM) attack.
securing files.

viii Jalali, A., & Meybodi, A Secure This paper proposed The proposed
M. R. (2015) Distributed File a secure file sharing method requires a
Sharing Protocol system based on a complex key
Based on Cloud distributed network exchange process.
Computing. and aimed to
address security
concerns associated
with centralization.

10
ix Villalba, L. A., & Exploring Secure Offers cloud-based The paper provides
Morrow, P. (2015) Cloud Data file sharing general advice
Storage and solutions for small rather than specific
Sharing for Small and medium-sized technical
and Medium businesses. implementation
Enterprises. Emphasizes security suggestions.
considerations and
offers
recommendations
for choosing a cloud
service provider.

x Khan, M. A., et al. A decentralized This paper proposed The proposed


(2017) file sharing system a decentralized file- system has the
based on the sharing model that potential to be
InterPlanetary File utilizes blockchain slow since it relies
System and technology to on the IPFS
blockchain. provide additional blockchain.
security and
reliability for
storing and sharing
data.

2.12 Research Gap


Although the project topic of designing and implementing a secured and interactive cloud-based
file sharing system is significant, there are still some research gaps that can be explored to
enhance the system's effectiveness. Here are some research gaps:

i. Development of a hybrid model: Currently, most file-sharing systems rely entirely on the
cloud. However, a hybrid model that combines the cloud and local resources may provide an
effective solution that leverages the strengths of both models, leading to more efficient file

11
sharing. Further research is needed to investigate the feasibility and effectiveness of a hybrid
model.
ii. Investigating different encryption methodologies: While some existing cloud-based file-
sharing systems have implemented encryption capabilities, not all of them are equally secure.
In-depth research is needed to compare different encrypted file-sharing techniques and to
develop a more secure file-sharing system.
iii. Development of a universal secure file-sharing protocol: Currently, each file-sharing system
has a different protocol, which makes it difficult to transfer files across systems. Therefore,
further research is needed to create a universal protocol that can be used across different file-
sharing systems.
iv. Integration with emerging technologies: With the rapid advancements in technology, there is
a need to integrate new technologies like edge computing, IoT, and block-chain to improve
the efficiency, security, and scalability of cloud-based file-sharing systems. Future research
could investigate how these technologies can be successfully integrated into file-sharing
systems.
v. Examination of user acceptance: Despite the features of an interactive, secured file-sharing
system, user acceptance might be a concern. Therefore, further research is needed to better
understand user behavior and preferences, facilitating the successful adoption of the designed
file-sharing system.
vi. Overall, addressing the above research gaps will enhance the effectiveness, security, and
usability of a cloud-based file-sharing system.

12
CHAPTER THREE
SYSTEM ANALYSIS AND METHODOLOGY
3.0 Introduction
This chapter describes in detail the system design methodology. It focuses on the system
structure and interactions. The proposed system is a cloud based file sharing system. It is created
to be deployed on the web which is aimed at enabling the users to access and share file through
links created automatically by the system. This chapter begins by examining the Systems
Requirement Specification (SRS) document which is majorly focused on only the functional
requirements to be provided by the system. It proceeds to the system design which consists of the
logic design. The logic design consists of various user interfaces and the chapter also explains
the system design using UML diagrams.

3.1 Limitations of the existing system


1. Limited Security Measures: One of the major limitations of the existing system for cloud-
based file sharing is its limited security measures. While cloud file hosting providers have started
offering advanced security features, such as encryption and multi-factor authentication, there is
still a risk of data breaches and cyber-attacks. According to a report by Crowd Research Partners,
90% of businesses using cloud services experienced a security incident in 2019.
2. Limited Control over Data: Another limitation of the existing system is the limited control
over data. Since the data is stored on the cloud, users do not have complete control over where
their data is stored, who has access to it, or how it can be used. This creates concerns around data
residency, privacy, and compliance, particularly for organizations in highly regulated industries.
3. Limited Integration with Existing Systems: The existing cloud-based file sharing systems have
limited integration capabilities with existing systems and tools used by businesses. This creates
challenges for organizations in terms of productivity, efficiency, and collaboration. For instance,
if employees are using different tools and systems to collaborate, it can create confusion,
duplication of efforts, and ultimately impact the productivity of the organization.
4. Dependence on Internet Connectivity: Cloud-based file sharing and collaboration systems are
heavily dependent on internet connectivity. This means that if there are issues with the internet
connection, the system may not function as expected, which can impact business operations. This

13
is particularly problematic for organizations that heavily rely on file sharing and collaboration
for their day-to-day activities.
5. Cost: Finally, cost is a significant limitation of the existing system for cloud-based file sharing
and collaboration. While cloud file hosting providers offer different pricing models, the costs can
quickly add up, particularly for businesses that require extensive functionalities and storage
capacity.

3.2 Justification of the new system


A secure and interactive cloud based file sharing system is needed to meet the needs of today's
users. Today's users are increasingly reliant on the internet for their daily needs, and as such,
they demand a system that is secure and easy to use. A cloud based file sharing system must be
secure, since it is a location where users store personal information. It must also be easy to use,
since users are likely to use it multiple times a day. A cloud based file sharing system must use
P2P technology to ensure that data is distributed evenly and securely. It must also use PKI
encryption to ensure that data is protected from unauthorized access. Finally, the system must be
implemented using local-host, PHP, and the cloud. This will allow the system to be accessed
from any device, and it will be easy to maintain.

3.3 Methodology

3.3.1 System Requirement Specification


The system requirement specification is a structured document that collects information which
encompasses the requirements of a system. This section would focus mainly on the functional
requirements of the proposed system and these include:

i. The system will work as a p2p cloud system.


ii. The system will use the Public Key Infrastructure (PKI) encryption technique to protect
the data.
iii. The database to be used for the system is Local server MYSQL database.
iv. Users register; upload a file to the system.
v. A link is generated for the file uploaded.
vi. The user shares the link with another user.
vii. The system should allow users to input data.

14
viii. When the user paste the link on a browser, the user can access the file shared.

3.4 System Design


This section explains the design methodology, data and modules for the proposed
system. The system design incorporates both UML diagrams and user interface designs.

3.5 Logical Design


The logical design of the system is concerned with the underlying logic of the
proposed system which would be abstracted from the various interfaces of the system.
The interfaces discussed would be the input design, output design and menu design.

3.6 Input Design


This section includes the various input design interfaces in the system. The input
design interfaces to be considered would be the login form interface, create account form,
Edit Profile form, and new presentation form.

Login Form (Input)


The Login form Interface allows the user to enter their login details in order to have an access to
the presentation.

Login Form
Username
Password

Login

Figure 3.0: Login Form Interface

15
Create Account Form

Name

Email

Username

Password

Retype

Password Register

This section shows the registration details and how users get registered.
Figure 3.1: Create Account Form
User Profile (Input)
This section shows the users profile details and how they can be changed.

Name

Email

Username

Change

Password
Save

Figure 3.2: User Profile Interface


Add File (Input)

Title

Upload File

Upload File

Figure 3.3: Add File Interface

16
3.7 Output Design
This section describes the various output of the system to the user. The format of output
for the system is majorly text. The output that would be discussed would be the Cloud based file
sharing Page
S/N Date Added File Name Download Link Action

This section views the cloud based file sharing listed in grid and the file link.

3.8 Menu Design


The menu design describes the various paths or menus available to the user of the
system. The menu design below shows the major options provided for a user:

Dashboard Form Views for each Menu and their tabs

Edit Profile

Add File

Logout

Figure 3.4: Cloud Based File Sharing System Menu Design

3.9 Use Case Diagram


The use case diagram is a UML diagram that shows the users of a system and the various
interactions that exists between the user and the system.

17
3.10 Activity Diagram
Activity diagrams are representative of step wise activities and actions in a system. They
describe the operational step-by-step work flow of components in a system.

Start

Web Start

Enter user name Login


and password Details

Yes No Invalid
User

Exit
Main Menu

Dashboard
Message
box

Are you sure Edit Profile Add File Logout


you want to
exit?

Yes
No Stop

Figure 3.5: The Activity Diagram

3.11 Structure of Database Design


The proposed system makes use of a relational database to store and maintain records. This
database will consist of three (3) relational tables discussed below:

18
TABLE
post
FIELD DATA TYPE

Id Varchar (200)

Title Varchar (200)

url Varchar (200)

Date_created Varchar (200)

Table 3.0: Post database structure


User_login
FIELD DATA TYPE

Id Varchar (200)

Name Varchar (200)

Email Varchar (200)

Username Varchar (200)

Password Varchar (200)

Date_created Varchar (200)

Table 3.1: Use Login database structure

19
3.12 System Flowchart

Cloud Based File system

Input From the


Keyboard
Control Unit

Result to Screen

Processor

Output (Report)
Disk
Storage

Figure 3.6: System Flowchart

20
CHAPTER FOUR
SYSTEM DESIGN, IMPLEMENTATION AND DISCUSSION

4.0 Introduction
This chapter shows and describe the designs used in the production of the system interface and
functions. The implementation activities are as well highlighted, in line with the various
subsystem employed in the development of the Cloud based file sharing system.

4.1 Choice of programming language


PHP is an open-source programming, making it is free to use, distribute and modify. It is
compatible with a wide range of web servers, including Apache which makes it easier to deploy
cloud-based file sharing system on different platforms.

4.2 System Testing Strategies


This section is concerned with testing and debugging of the programs and general processes
involved in achieving the objectives of the system requirement. System testing is conducted
on a complete integrated system to evaluate the system’s compliance with its specified
requirements. 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. During system testing, the focus is
on the software design, behavior and even the believed expectations of the customer. So we can
also refer to the system testing phase as investigatory testing phase of the software development
life cycle. The system testing strategies used in this system include the unit test and integration
test.

4.3 Unit Test


The primary goal of unit testing is to take the smallest piece of testable software in the
application, isolate it from the remainder of the code and determine whether it behaves exactly as
it is expected to behave. Each unit is tested separately before integrating them into modules to
test the interfaces between modules. Unit testing has proven its value in that a large percentage
of defects are identified during its use.

The most common approach to unit testing requires drivers and stubs to be written. The driver
simulates a calling unit and the stub simulates a called unit. The investment of developer time
in this activity sometimes results in demoting unit testing to a lower level of priority and that is

21
almost always a mistake. Even though the drivers and stubs cost time money, unit testing
provides some undeniable advantages. It allows for automation of the testing process, reduces
difficulties in discovering errors contained in complex pieces of the application. During the unit
testing of the application, errors uncovered by the researcher were rectified and the result was
satisfactory.

4.4 Integration Testing


Integration testing is a logical extension of unit testing. In its simplest form, the units that
have already been tested are combined into a component and the interface between them is
tested. A component, in this sense, refers to an integrated aggregate of more than one unit. In a
realistic scenario, many units are combined into components, which are in turn aggregated into
even larger parts of the program. The idea is to test combination of pieces and eventually expand
the process to test your modules with those of other groups. Integration testing can be done in a
variety of ways which include top-down approach, bottom-up approach and the umbrella
approach. In the integration testing of the software, satisfactory results were obtained from the
test using the bottom-up approach.

4.5 Target Computer System Requirements


This section considers the requirements that must be met by the target system to enable
the developed software application function as required.

Component Requirement

Operating system Windows 8.0, 8.1, 10

Memory 128MB or higher

Database MY SQL

Web server LOCALHOST

PROGRAMMING LANGUAGE PHP

Table 4.0: software requirement for target computer system

Component Requirement

22
RAM 256MB of RAM

Hard disk 10GB of hard disk space

Processor 333Hz or higher

Table 4.1: hardware requirements for target computer system

4.4 Implementation of Codes

Running of

Figure 4.0: Implementation of Codes

23
Running Local HOST Server

Figure 4.1: Local Host Server

4.4 The Result of Implementation

Login
Users registered on the platform can access their account via the login interface. And
unregistered users can use the “Create Account” button.

Figure 4.2: The Log in Section

24
Dashboard

Figure 4.3: The System Dash Board

Add File
Users who will like to share their files with others can do that via the “Add file” section
provided. Users upload the file, a link is generated, and the link generated can then be shared.

Figure 4.2: The Add file Section

25
Profile

Figure 4.4: The Profile Section

4.6 Software Maintenance Issues


This section focuses on software maintenance issues. Software maintenance is the modification
of a software product after delivery to correct faults, improve performance or other product
attributes or to adapt the product to a new or changing environment. It also serves as an
opportunity to improve the performance of the software to suit the needs of the users if it
becomes necessary for the user requirements to be improved upon or changed.

Maintenance would be seen in three areas in this research; corrective maintenance, preventive
maintenance and adaptive maintenance.

4.7 Corrective Maintenance


Corrective maintenance is a maintenance task performed to identify, isolate and rectify a fault so
that the failed system can be restored to an operational condition within the tolerances or limits
established for in-service operations. Necessary corrections in the form of removal, modification
or addition of program modules should be permitted by the software to allow for optimal use of
the application.

26
4.8 Preventive Maintenance
This is a schedule of planned maintenance actions aimed at the prevention of breakdowns and
failures. The primary goal of preventive maintenance is to prevent the failure of software before
it actually occurs. It is designed to preserve and enhance software reliability by replacing error-
prone components before they actually fail. Recent technological advances in tools for inspection
and diagnosis have enabled more accurate and effective software maintenance. Measures like
regular diagnosis, database backups, creating system mirrors preserve the integrity of
information stored in the application. If these are strictly followed, limited instances of such
occurrences would be noticed in the use of the software application.

4.9 Adaptive Maintenance


This involves enhancing the system by adding features, capabilities and functions in response to
new technology, upgrades, new requirements or new problems. Since the environment in which
the application would be running is dynamic, it should be made to suit whatever requirements
that may change in the long run.

27
CHAPTER FIVE
SUMMARY, CONCLUSION AND RECOMMENDATIONS

5.0 Introduction
This chapter focuses on summary, conclusion and recommendations.
Here, the entire summary of the research from the problem stage to the implementation stage, the
relevant conclusion and recommendations are discussed.

5.1 Constraints of the Study


The problems encountered during the course of carrying out this research project include:
i. Time: Time for the research project was too short coupled with researcher’s academic time
table.
ii. Fund:There was limited fund to take care of the research properly in terms of transportation
and other expenses especially when visiting attraction sites.
iii. Research Materials: Lack of access to research materials on the topic in the school library
and even public libraries were also major constraint in the cause of this project.
iv. Web based presentation system: Access to existing recycle bin system pose a great
challenge as industries and other business around were a bit discrete with their manual
recycle system.

5.2 Summary
Implementation of a Cloud based File Sharing system that would enable users to upload and
share files through a link that is automatically created by the system.
The existing method of sharing files neither storing files has been eliminated by the system. The
new system would be very easy to use because of its accuracy and reliability. Information about
the users and his mode of uploading and sharing file for a particular period of time can be
promptly assessed easily.

5.3 Contribution to knowledge


The design and implementation of a secured and interactive cloud-based file sharing system can
contribute to knowledge in various ways:

28
1. Security: Developing a secure file sharing system will contribute to knowledge by aiding in
the identification and implementation of best practices in information security and cloud
computing. This will help in preventing unauthorized access and data breaches, which are
increasingly becoming common in the cloud computing landscape.

2. Collaborative Work: The implementation of an interactive cloud-based file sharing system


will contribute to knowledge by exploring approaches to enable secure collaboration within and
across organizations. This will enhance communication and productivity in collaborative work
environments, such as virtual teams, across different regions and among different organizations.

3. Scalability: The development of a scalable cloud-based file sharing system will contribute to
knowledge by developing approaches to optimize resource utilization, reduce latency, and
enhance response time. These are knowledge areas that are relevant for the development of
scalable cloud applications.

4. User Experience: The design and implementation of an interactive cloud-based file sharing
system can contribute to knowledge by exploring ways to enhance user experience, such as
providing a user-friendly interface, streamlining workflows, and optimizing system performance.

Overall, the implementation of a secured and interactive cloud-based file sharing system will
contribute to knowledge in various knowledge areas such as security, collaborative work, user
experience, and scalability – facilitating further development of modern cloud computing
systems.

5.4 Recommendations
Having designed, tested and implemented the new system, the following must be put in place to
fully achieve the objective of which the software is designed.
i. Maintenance: The system needs to be maintained. This implies that any fault detected
should be reported to the programmer for correction at any point in time.
ii. Research: More research should be conducted on the topic to assess it effectively.

5.5 Conclusion
Accessing, running and sharing applications and data at present face many challenges. Cloud
based file sharing technologies have the potential to simplify or eliminate many of these

29
challenges. Cloud based file sharing technologies provide a means for easily sharing applications
and data. Now a day’s people want to be connected 24x7 to the world around them. Networking
and Communication have come together to make the world a small place to live in. People want
to be in constant touch with their subordinates where ever they are and avail emergency services
whenever needed. In this paper we present an on-line/on-demand interactive application service
(Software as a Service). The service is built on a cloud computing basement that provisions
virtualized application servers based on user demand. An open source file sharing platform is
leveraged to establish a portal front-end that enables applications and results to be easily shared
between users. In the proposed system users can access the documents uploaded into the cloud
by others and provide any data they have in hand to other users through the same cloud. This
also permits the users to have an interactive session through the chat screens present in the cloud.
The paper also highlights some major security issues existing in current cloud computing
environment.

30
REFERENCES
Alotaibi, S., Al-Rakhami, M. S., & Al-Dhelaan, A. M. (2015). Secure cloud file sharing multi-
cloud architecture. International Journal of Computer Applications, 127(1), 38-44.

Baldin, Y., Allen, M., & Trossen, D. (2018). SEDF: A secure end-to-end distributed file-sharing
system. Future Internet, 10(2), 10.

Beaker. (2009). Cloud Computing security architechural framework, rationalsurvivability.


Buyya, R., Yeo, Venugopal, S., Broberg, J., &Brandic, I. (2009). Cloud Computingand
Emerging IT Platform: Vision, Hype and reality for Delivering
Computing as a 5th utility. Future generation computer system .
Cater-Steel and Al-Hakim. (2008). Information Systems Research Methods,Epistemology, and
Applications
Creswell, J.W (1994). Research Design: Quantitative and Qualitative Approaches. 5(3), 102-105
David, C. W. (2009). 2010-07 IBM Business of Goverment Cloud Computing in Goverment .
David, C. W. (2010). A model Based approach to Implement Cloud Computing in Goverment.
International Journal of Computer Applications IJCA.
Gay and Airasian. (2000). Selecting a Quantitative or Qualitative Research.
https://www.andrews.edu/~rbailey/Chapter%20two/7592665.pdf
Gupta, R. (2021). Challenges of conventional file sharing, management and storage techniques.
International Journal of Computer Science and Mobile Computing, 10(2), 231-237.
HP. (2011). Consulting Services for Cloud Computing. HP.
http://www.hp.com/hpinfo/newsroom/press_kits/2011/HPatVMworld2011/Cloud_Comp
uting_ENW_Bro_TS.pdf
Jalali, A., & Meybodi, M. R. (2015). A secure distributed file sharing protocol based on cloud
computing. International Journal of Security and Its Applications, 9(7), 293-302.
Jingyu, D., Jiajin, L., Rui, X., and Yaohui, J. (2010). Data center consolidation withvirtualized
Private Network : A step towards Enterprise Cloud.
Khajeh, H., Sommerville, I., and Sriram, I. (2010). Research challanges forenterprise cloud
computing.

31
Khan, M. A., Salah, K., Naeem, M., Alghazzawi, D., & Madani, S. A. (2017). A decentralized
file sharing system based on interplanetary file system and blockchain. Future Generation
Computer Systems, 76, 105-115.
Kshetri, H. L. (2014). Cloud computing security: From single to multi-clouds. International
Journal of Computing and Business Research, 5(2), 1-11.
Kundra, V. (2010). State of public sector cloud computing. Washington, DC: CIOCouncil.
Kundra, V. (2011). Federal cloud computing strategy. February.
Mearns, N., Abdelmotaleb, A., & Jassim, S. (2018). A homomorphic encryption-based secure
cloud storage service. Journal of Cloud Computing, 7(1), 1-14.

Mell, P., &Grance, T. (2011). The NIST definition of cloud computing (draft). NISTSpecial
Publication, 800, 14568
Michael, P., and Grance, T. (2011). The NISTdefinition of Cloud Computing . NISTSpecial
Publication .
Michael, R. N. (2009). The Cloud,Crowd and Public policy. EBSCO Host.
https://issues.org/25.4/nelson.html
Mirzaei, N. (2008). Cloud Computing. Pervasive Technology Institute Report,Community Grids
Lab, Indiana University.
Moeller, B., Reichle, R., & Camp, L. J. (2016). Design and implementation of a secure attribute-
based file sharing system. Computers & Security, 58, 221-235.

Motahari, N., Stephenson, & Singhal. (2009). Outsorcing business to computingservices:


Opportunities and Challanges . IEEE Internet Computing .
Mugenda and Mugenda.(2003). Research Methods – Quantitative & QualitativeApproaches.
Nein. (2009). Analysis of conversion from Legacy "Client Based" solution to a Cloud computing
model .
Nelson. (2009). The cloud, the crowd, and public policy issues in science andtechology.
Paul, T. J., Jimmy, L., Justin, M., Grimes, & Shannon Simmons, N. (2009). Where isthe cloud?
Geography,economics,environment and jurisdiction in cloudcomputing .
Rajkumar, B., & Karthik, S. (2011). Deploying Application for cloud Computing. International
Journal of Applied Information System.
https://www.ijais.org/archives/volume4/number4/294-0697

32
Saunders, M., Lewis, P. and Thornhill, A. (2009). Research Methods for Business Students.
https://www.scirp.org/(S(351jmbntvnsjt1aadkposzje))/reference/ReferencesPapers.aspx?
ReferenceID=1903646
Snia. (2009). Managing Data Public Cloud, 30(14), 1456-1461.
Srivastava (1993). Sequential monte carlo methods.
https://bpb-us-e1.wpmucdn.com/blogs.rice.edu/dist/e/8375/files/2018/01/SMC-Liu-
Chen-98-pj0li1.pdf
Tharam, D., Chen, W., and Elizabeth, C. (2010). Cloud Computing: Issues and Challanges.
Academia.
https://www.academia.edu/6544442/Cloud_Computing_Issues_and_Challenges
Villalba, L. A., & Morrow, P. (2015). Exploring secure cloud data storage and sharing for small
and medium enterprises. Journal of Business Research, 68(11), 2331-2339.
Vouk, M. A. (2004). Cloud computing-issues, research and implementations. Journalof
Computing and Information Techology.
Weinhardt, C., Anandasivam, Blau, Borissov, Meinl, Michalk, et al. (2009). CloudComputing -
A classification, Business Models, and Research Directions.Business and Information
Systems Engineering .
Weng, P., Wu, X., Zhu, Y., Ma, J., & Liu, F. (2019). Decentralized and securely sharing large-
scale file based on blockchain. Future Generation Computer Systems, 98, 374-382.
Yin. (2002). Case Study Research : Design and Methods

Zawoad, M., & Hasan, R. (2015). Secure file sharing in the cloud: Requirements, challenges, and
mitigations. Security and Communication Networks, 8(18), 3827-3844.

33
APPENDIX A – WEB BASED PRESENTATION APPLICATION
1. LOGIN

2. DASHBOARD

3. ADD FILE

34
4. PROFILE

35
APPENDIX B – SOURCE CODE:
1. login.php
<?phprequire_once ("landing_header.php") ?>
<section id="main">
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<?php
try{
if($_SERVER['REQUEST_METHOD']=="POST"){
if(isset($_POST['btnLogin'])) {
login($_POST['txtUsername'],$_POST['txtPassword']);
}
if($flagp==true){
echo " <div class=\"alert alert-warning\">
<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>
Invalid Username or Password!!!
</div>";}
}
}catch(Exception $e) {}
?>
<form id="login" action="login.php" method="post" enctype="multipart/form-data"
class="well">
<div class="form-group">
<label>Username</label>
<input type="text" class="form-control" name="txtUsername" placeholder="Enter Username">
</div>
<div class="form-group">
<label>Password</label>
<input type="password" class="form-control" name="txtPassword" placeholder="Enter
Password">

36
</div>
<button type="submit" name="btnLogin" class="btnbtn-default btn-block">Login</button>
<br>
<a href="createaccount.php" class="text-center">Create Account</a>
</form>
</div>
</div>
</div>
</section>
<?phprequire_once ("landing_footer.php") ?>

2. add-file.php
<?phprequire_once('profile_header.php'); ?>
<?php try{
if($_SERVER['REQUEST_METHOD']=="POST"){
if(isset($_POST['btnUploadFile'])) {
$target_dir = "file/";
$target_file = $target_dir .
basename($_FILES["btnDocument"]["name"]);
$file_nameimage = $_FILES["btnDocument"]["name"];
if (move_uploaded_file($_FILES["btnDocument"]["tmp_name"], $target_file))
{
uploadFile1($_POST['txtTitle'],$file_nameimage);
} else {
echo "<script>alert(\"Sorry your Video was not Uploaded. Try
Again\")</script>";
}
}

}
}catch(Exception $e) {}

37
?>
<form id="presentation" action="new-profile.php" method="post" enctype="multipart/form-
data">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">New File</h3>
</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label">Title</label>
<input class="form-control" name="txtTitle" placeholder="Enter File Title">
</div>
<div class="form-group">
<label class="control-label">Upload File</label><br>
<input type="file" name="btnDocument">
</div>
<div class="form-group">
<button class="btnbtn-primary form-control" name="btnUploadFile">Upload File</button>
</div>
</div>

</div></form>
<?phprequire_once('profile_footer.php'); ?>
3. Index.php
<?phprequire_once('profile_header.php'); ?>
<!-- Latest Users -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">File List</h3>
</div>
<div class="panel-body table-responsive">

38
<table class="table table-striped table-hover">
<tr>
<th>S/N</th>
<th>Date Added</th>
<th>File Name</th>
<th>Download Link</th>
<th>Action</th>
</tr>
<?php
try{
$DetailUser = $_COOKIE["userdetails"];
$sql = "SELECT * FROM post WHERE username='$DetailUser'";
$result = $conn->query($sql);
$count=1;
if ($result->num_rows> 0) {
// output data of each row
while ($row = $result->fetch_assoc()) {
?>
<tr>
<td><?php echo $count++; ?></td>
<td><?php echo $row["date_created"]; ?></td>
<td><?php echo $row["title"]; ?></td>
<td><a target="_blank" href="<?php echo 'http://' . $_SERVER['HTTP_HOST'] .
$_SERVER['REQUEST_URI']; ?>file.php?fileid=<?php echo $row["id"]; ?>"><?php echo
'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>file.php?fileid=<?php
echo $row["id"]; ?></a></td>
<td>
<a href="index.php?deletefile1=<?php echo $row["id"]; ?>" class="btnbtn-danger">Delete
File</a>
</td>
</tr>

39
<?php
}
}
}catch(Exception $e) {}
?>
</table>
</div>
</div>
<?phprequire_once('profile_footer.php'); ?>
4. Db-connect.php
<?php
/**
* Created by PhpStorm.
* User: Udobong
* Date: 4/24/2020
* Time: 5:22 PM
*/
$servername = "localhost";
$username = "root";
$password = "";
$database = "cloudbase";
// Create connection
$conn = new mysqli($servername, $username, $password, $database);
if ($conn->connect_error) {
echo "<script>alert('echo \"Error: \"<br>\" . $conn->error;')</script>";
}
$flagp=false;$userdetails=false;$postID="";$txtFullname="";
$txtEmailaddress="";
$txtUsername="";
$txtID="";$txtUrl="";
function create_account($Name,$Email,$Username,$Password,$RetypePassword){

40
try{
$Name= str_replace("'", "''", $Name);
$Email= str_replace("'", "''", $Email);
$Username= str_replace("'", "''", $Username);
$Password= str_replace("'", "''", $Password);
$RetypePassword= str_replace("'", "''", $RetypePassword);
global $conn,$flagp,$userdetails; $date = date("Y/m/d");
if($Password==$RetypePassword) {
$sql = "select * from user_login where username='$Username' or
user_email='$Email'";
$result = $conn->query($sql);
if ($result->num_rows> 0) {
$userdetails = true;
} else {
$userdetails = false;
$sql = "INSERT INTO user_login (name,email,username,password,date_created)
VALUES ('$Name','$Email','$Username',sha1('$Password'), '$date')";

if ($conn->query($sql) === TRUE) {


setcookie("userdetails", $Username, time() + 3600, '/');
header('location: index.php');
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
$flagp= false;
}else{
$flagp=true;
}

}catch(Exception $e) {}

41
}
function login($Username,$Password){
try{
$Username= str_replace("'", "''", $Username);
$Password= str_replace("'", "''", $Password);
global $conn,$flagp;
$sql = "select * from user_login where username='$Username' and
password=sha1('$Password')";
$result = $conn->query($sql);
if ($result->num_rows> 0) {
while($row = $result->fetch_assoc()) {
$username = $row["username"];
$role = $row["role"];
}
$flagp = false;
setcookie("userdetails", $username, time() + 3600, '/');
header('location: ./');
} else {
$flagp = true;
} }catch(Exception $e) {}
}
function uploadFile1($txtDocumentName, $file_nameimage){
try{
$txtDocumentName= str_replace("'", "''", $txtDocumentName);
$file_nameimage= str_replace("'", "''", $file_nameimage);
global $conn; $dUsername=$_COOKIE["userdetails"];
$date = date("Y/m/d");
$sql = "insert into post(title,url,date_created,username)
VALUES('$txtDocumentName','$file_nameimage','$date','$dUsername') ";

if ($conn->query($sql) === TRUE) {header('location: index.php');

42
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}catch(Exception $e) {}
}
if (isset($_GET['deletefile1'])) {
try{
$id = $_GET['deletefile1'];
$sql = "delete from post where id='$id'";

if ($conn->query($sql) === TRUE) {


header('location: ./');
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}catch(Exception $e) {}
}
function userprofile($fullName,$emailAddress,$username,$ChangePassword,$id)
{
global $conn;
$sql = "select * from user_login where id='$id'";
$result = $conn->query($sql);
if ($result->num_rows> 0) {
$sql = "update user_login set
name='$fullName',email='$emailAddress',username='$username',password=sha1('$ChangePass
word') where id='$id'";

if ($conn->query($sql) === TRUE) {


header('location: logout.php');
} else {
echo "Error: " . $sql . "<br>" . $conn->error;

43
}
}
}
if (isset($_GET['status'])) {
$id = $_GET['status'];
$sql = "select * from user_login WHERE username='$id'";
$result = $conn->query($sql);
if ($result->num_rows> 0) {
// output data of each row
while ($row = $result->fetch_assoc()) {
$txtFullname=$row['name'];
$txtEmailaddress=$row['email'];
$txtUsername=$row['username'];
$txtID=$row['id'];
}
}
}

44

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy