Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Constructing the Interface for an Internet...
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

Constructing the Interface 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-02

    Table of Contents:
  • Constructing the Interface for an Internet Access Control Application
  • The Main Server Application
  • Code continued
  • Still More Code
  • Code Concluded

  • 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


    Constructing the Interface for an Internet Access Control Application - The Main Server Application


    (Page 2 of 5 )



    Listing 1: Main server application

    unit server;


    interface


    uses

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

    Dialogs, IdBaseComponent, IdComponent, IdCustomTCPServer, IdTCPServer,

    IdCmdTCPServer, Menus, ComCtrls,idcommandhandlers, ImgList, Buttons, ToolWin, StdCtrls,idcontext,idsync,idStack,

    ExtCtrls,dateutils, DB, ADODB;


    type

    TMyContext = class(TIdContext)

    public

    IP: String;

    Con: TDateTime;

    compname:string;

    // state:string;

    end;



    TLog = class(TIdSync)

    protected

    FMsg: String;

    procedure DoSynchronize; override;

    public

    constructor Create(const AMsg: String);

    class procedure AddMsg(const AMsg: String);

    end;



    TForm1 = class(TForm)

    lv: TListView;

    MainMenu1: TMainMenu;

    File1: TMenuItem;

    ImageList1: TImageList;

    ToolBar1: TToolBar;

    Exit1: TMenuItem;

    LogOff1: TMenuItem;

    Settings1: TMenuItem;

    ts: TIdTCPServer;

    newOp: TSpeedButton;

    btnExit: TSpeedButton;

    Memo1: TMemo;

    activate: TSpeedButton;

    Timer1: TTimer;

    PopupMenu1: TPopupMenu;

    AddClient1: TMenuItem;

    StatusBar1: TStatusBar;

    ado1: TADOTable;

    View1: TMenuItem;

    Stats1: TMenuItem;

    About1: TMenuItem;

    iCafeStation1: TMenuItem;

    shut_down: TSpeedButton;

    constructor Create(AOwner: TComponent);override;

    procedure Exit1Click(Sender: TObject);

    procedure Settings1Click(Sender: TObject);

    procedure LogOff1Click(Sender: TObject);

    procedure tsConnect(AContext: TIdContext);

    procedure tsDisconnect(AContext: TIdContext);

    procedure BitBtn2Click(Sender: TObject);

    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);

    procedure FormClose(Sender: TObject; var Action: TCloseAction);

    procedure tsExecute(AContext: TIdContext);

    procedure newOpClick(Sender: TObject);

    procedure btnExitClick(Sender: TObject);

    procedure FormCreate(Sender: TObject);

    procedure activateClick(Sender: TObject);

    procedure AddClient1Click(Sender: TObject);

    procedure lvDblClick(Sender: TObject);

    procedure shut_downClick(Sender: TObject);

    private

    { Private declarations }

    public

    { Public declarations }

    level:string;

    li:tlistitem;

    WStation,tcharge,mins:string;

    tAll:integer;

    td,endtime:tdatetime;

    uid:integer;

    procedure Timing(theStation,charge,thetime:string);

    procedure broadcastAll;

    end;


    var

    Form1: TForm1;

    theT:string;

    implementation


    uses Logon, adduser, settings, changepassword, newUser, addoperator;


    {$R *.dfm}


    procedure TForm1.broadcastAll;


    var

    List: TList;

    Context: TMyContext;

    I: Integer;

    begin

    // FContextList is inherited from TIdContext

    List := form1.ts.Contexts.LockList;

    try

    for I := 0 to List.Count-1 do

    begin

    Context := TMyContext(List[I]);

    try

    Context.Connection.IOHandler.WriteLn('shutdown:end@plchldr');


    except end;

    end;

    finally

    form1.ts.Contexts.UnlockList;

    end;

    end;

    More Delphi-Kylix Articles
    More By David Web


     

    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
    For more Enterprise Application Development news, visit eWeek