Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 4 - User Management for an Internet Access Con...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

User Management for an Internet Access Control Application
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-09-22

    Table of Contents:
  • User Management for an Internet Access Control Application
  • User Management Module
  • User Management Module Explained
  • Stats Page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

     

    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...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT