Home arrow Delphi-Kylix arrow Building a Server Application for an Internet Cafe
DELPHI-KYLIX

Building a Server Application for an Internet Cafe


If you're building an Internet access control application, such as you might find in an Internet cafe, you can't do it without some way to keep track of the staff members who log users into the computers. This article, the second part of a six-part series that covers the entire application, will deal with user authentication, including the setting up of a database to track the important information.

Author Info:
By: David Web
Rating: 5 stars5 stars5 stars5 stars5 stars / 3
August 25, 2008
TABLE OF CONTENTS:
  1. · Building a Server Application for an Internet Cafe
  2. · User Authentication
  3. · Code Explained
  4. · Code explanation continued

print this article
SEARCH DEVARTICLES

Building a Server Application for an Internet Cafe
(Page 1 of 4 )

Introduction

The server application is at the heart of the Internet access control application. It quite literally is the beating heart of the entire set up. All session allocations will be made from here; when a staff member is successfully authenticated, he or she is redirected to this application. Basically, all important settings are also made here. The server application offers a user management module that has the following options:

  • Add new user - This option enables you to add new staff members. In this form you will enter the details for the new user such as the username, password and access level.

  • Reset user password - This option lets you change the password of the user concerned

  • View user profile - Here you will be able to view the user's details, provided you have administration level clearance.


Below is a screen of the user management module:

 

The server application has two sections: the authentication application and the main server application. I've put in an authentication application because it gives you a record of who logged on to the Internet access control application and how much money that person made for you that day. I've also included it for security reasons. The authentication application is basically an optional extra that you can implement, as opposed to it being compulsory one.

The server application, as I mentioned, is the beating heart of the entire access control program. It sends commands to the clients and processes the responses from them. It basically implements a communications protocol between the clients and the server. It also handles the registration process that the clients will go through when they first start up.

The authentication application

The purpose of this application is to authenticate staff members that use the access control program. There are many reasons why you would want to authenticate staff members that use this program. For the purposes of the Internet access control application, there are only two: profit and monitoring. Because this application is designed for use in an Internet café environment, it is more feasible that the owner of such a business would want to know how much money she makes on a per month or per year basis or how long the average client spends on the Internet. This kind of information is vital for the business to survive. The authentication application provides a way to get all this information by:

  • Recording the name and id of the currently logged in staff member, thereby enabling the manager to see how much money each staff member brings in. 

  • Recording the total amount of money earned with each session allocation.

The Database

In order to authenticate users and to record the total amount of money brought in on a periodic basis, the application requires a database that will store all of that information. To accommodate the information, I've created three database tables. I'm using Microsoft Access as the database backend, because it is ideally suited for an application of this size, and because it is easy to manage. The database itself is called icafe, and features the following tables:

users - holds information about staff members of the access control application.

The table has the following fields:

id - holds a unique id for each staff member; the number is auto created.

name - holds the name of staff members.

username - holds the username of staff members.

password - holds the password of staff members.

Alevel - holds the access level of staff members.


mula - stores information about how much money a staff member made per session.

The table has the following fields:


id - holds a unique id for each session that a staff member allocates; the number is auto created.

uid - stores the user id (generated in the users table above) of the staff member who allocated this session.

Total - stores the total amount of money that a staff member made for that given session.


levels - stores information about the different levels of access to the application. It currently stores only two levels: Administrator and Normal.

The table has the following fields:

id - stores a unique id for each level of access

level - stores the names of the access levels.

For more functionality, you could add a date field to the mula table, so that you can have more accurate information about which user was logged on when and on what date. The date field can include the time as well. The other benefit of adding a date/time column to this table is that you will be able to easily tell if a particular employee was at work on a given day and for how long that employee was working. All of this can aid the manager when deciding if a particular employee can go on vacation or not. It all just depends on your requirements.


blog comments powered by Disqus
DELPHI-KYLIX ARTICLES

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials