Home arrow Delphi-Kylix arrow Page 4 - User Management for an Internet Access Control Application
DELPHI-KYLIX

User Management for an Internet Access Control Application


In this part of the Internet access control application, we are going to discuss the last section of the server application that deals with user management. The term "user management" is somewhat misleading in the context of our application because it is not actually users of the Internet cafť that we are referring to, but rather the staff members. This section will deal with how staff members allocate Internet sessions to users and also how staff members with administration level access can add, remove and change new staff member details.

Author Info:
By: David Web
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
September 22, 2008
TABLE OF CONTENTS:
  1. · User Management for an Internet Access Control Application
  2. · User Management Module
  3. · User Management Module Explained
  4. · Stats Page

print this article
SEARCH DEVARTICLES

User Management for an Internet Access Control Application - Stats Page
(Page 4 of 4 )

That covers the user management module. Next we will look at the stats page. Iíve not fully implemented this module because it is an optional extra. But I assume that if you wanted to see any kind of statistics, that you will want to see the running total, i.e. how much the business has made so far. So Iíve written some SQL queries that you can choose from to display the kind of information that you would want:

unit stats;


interface


uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls;


type

TForm8 = class(TForm)

StaticText1: TStaticText;

StaticText2: TStaticText;

StaticText3: TStaticText;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

StaticText4: TStaticText;

procedure FormShow(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;


var

Form8: TForm8;


implementation


{$R *.dfm}

uses logon;

procedure TForm8.FormShow(Sender: TObject);

var

inv,pending,paid:integer;

rtotal:real;

begin

rtotal:=0;

{

//get the total by this user

form3.q.Close;

form3.q.SQL.Text:='Select sum() from mula';

form3.q.Open;

inv:= form3.q.RecordCount;

label1.caption:= inttostr(inv);



//

form3.q.Close;

form3.q.SQL.Text:='Select * from mula WHERE status = :stat';

form3.q.Parameters.ParamByName('stat').Value:='paid';

form3.q.Open;

paid:=form3.q.RecordCount;

label3.caption:= inttostr(paid);

}


//runnning total

form3.q.Close;

form3.q.SQL.Text:='Select total from mula';

form3.q.Open;

form3.q.First;

while not form3.q.EOF do

begin

rtotal:=rtotal + form3.q.fieldbyname('total').AsFloat;

form3.q.Next;

end;

label3.caption:='$'+ floattostr(rtotal);

end;


end.

Conclusion

This concludes the discussion of the server part of the access control application. The next part of the series on Internet access control will focus on the client application.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

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