diff --git a/src/sbbs3/ctrl/MainFormUnit.cpp b/src/sbbs3/ctrl/MainFormUnit.cpp index c30a3a92790564cef30866175783bc5cb5f6053c..e7e882fdf98ff73714676d3f27ccc0d8683a2ae0 100644 --- a/src/sbbs3/ctrl/MainFormUnit.cpp +++ b/src/sbbs3/ctrl/MainFormUnit.cpp @@ -51,6 +51,7 @@ #include "EventsFormUnit.h" #include "ServicesFormUnit.h" #include "FtpFormUnit.h" +#include "WebFormUnit.h" #include "MailFormUnit.h" #include "NodeFormUnit.h" @@ -1102,7 +1103,12 @@ void __fastcall TMainForm::ViewFtpServerExecute(TObject *Sender) ViewFtpServer->Checked=FtpForm->Visible; } //--------------------------------------------------------------------------- - +void __fastcall TMainForm::ViewWebServerExecute(TObject *Sender) +{ + WebForm->Visible=!WebForm->Visible; + ViewWebServer->Checked=WebForm->Visible; +} +//--------------------------------------------------------------------------- void __fastcall TMainForm::FtpStartExecute(TObject *Sender) { if(!StartNTsvc(ftp_svc,&ftp_svc_status,ftp_svc_config,ftp_svc_config_size)) @@ -1580,8 +1586,8 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ,&SysAutoStart ,&bbs_startup ,&FtpAutoStart ,&ftp_startup ,&WebAutoStart ,&web_startup - ,&MailAutoStart ,&mail_startup - ,&ServicesAutoStart ,&services_startup + ,&MailAutoStart ,&mail_startup + ,&ServicesAutoStart ,&services_startup ); StatusBar->Panels->Items[4]->Text="Imported " + AnsiString(ini_file); fclose(fp); @@ -3514,3 +3520,4 @@ void __fastcall TMainForm::ViewFile(AnsiString filename, AnsiString Caption) } //--------------------------------------------------------------------------- + diff --git a/src/sbbs3/ctrl/MainFormUnit.dfm b/src/sbbs3/ctrl/MainFormUnit.dfm index 5a9d3ec7ea79404a9d52c6d8d832e2bc28d7020e..af75c73dcd2fb21f722e77e154875ccb24bba751 100644 --- a/src/sbbs3/ctrl/MainFormUnit.dfm +++ b/src/sbbs3/ctrl/MainFormUnit.dfm @@ -1,6 +1,6 @@ object MainForm: TMainForm - Left = 372 - Top = 353 + Left = 388 + Top = 356 Width = 640 Height = 400 Caption = 'Synchronet Control Panel' @@ -10,7 +10,7 @@ object MainForm: TMainForm DragMode = dmAutomatic Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText - Font.Height = -14 + Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] Icon.Data = { @@ -46,11 +46,11 @@ object MainForm: TMainForm OnCloseQuery = FormCloseQuery OnCreate = FormCreate OnShow = FormShow - PixelsPerInch = 120 - TextHeight = 16 + PixelsPerInch = 96 + TextHeight = 13 object HorizontalSplitter: TSplitter Left = 0 - Top = 195 + Top = 164 Width = 632 Height = 1 Cursor = crVSplit @@ -61,9 +61,9 @@ object MainForm: TMainForm end object Logo: TImage Left = 0 - Top = 196 + Top = 165 Width = 632 - Height = 131 + Height = 162 Align = alClient Center = True IncrementalDisplay = True @@ -1888,21 +1888,26 @@ object MainForm: TMainForm ParentShowHint = False ShowHint = True end - object ViewStatsButton: TToolButton + object ViewWebServerButton: TToolButton Left = 94 Top = 0 + Action = ViewWebServer + end + object ViewStatsButton: TToolButton + Left = 117 + Top = 0 Hint = 'View Statistics Window' Action = ViewStats ParentShowHint = False ShowHint = True end object ViewClientsButton: TToolButton - Left = 117 + Left = 140 Top = 0 Action = ViewClients end object ToolButton2: TToolButton - Left = 140 + Left = 163 Top = 0 Width = 8 Caption = 'ToolButton2' @@ -1910,19 +1915,19 @@ object MainForm: TMainForm Style = tbsSeparator end object SoundButton: TToolButton - Left = 148 + Left = 171 Top = 0 Action = SoundToggle ParentShowHint = False ShowHint = True end object SysopAvailButton: TToolButton - Left = 171 + Left = 194 Top = 0 Action = ChatToggle end object ToolButton1: TToolButton - Left = 194 + Left = 217 Top = 0 Width = 8 Caption = 'ToolButton1' @@ -1930,17 +1935,17 @@ object MainForm: TMainForm Style = tbsSeparator end object UserListButton: TToolButton - Left = 202 + Left = 225 Top = 0 Action = UserList end object EditUserButton: TToolButton - Left = 225 + Left = 248 Top = 0 Action = UserEdit end object ToolButton3: TToolButton - Left = 248 + Left = 271 Top = 0 Width = 8 Caption = 'ToolButton3' @@ -1948,7 +1953,7 @@ object MainForm: TMainForm Style = tbsSeparator end object ReloadConfigButton: TToolButton - Left = 256 + Left = 279 Top = 0 Action = ReloadConfig end @@ -1957,7 +1962,7 @@ object MainForm: TMainForm Left = 0 Top = 30 Width = 632 - Height = 165 + Height = 134 Align = alTop BevelOuter = bvNone Constraints.MinHeight = 100 @@ -1965,18 +1970,18 @@ object MainForm: TMainForm TabOrder = 1 Visible = False object TopVerticalSplitter: TSplitter - Left = 289 + Left = 235 Top = 0 - Width = 3 - Height = 165 + Width = 2 + Height = 134 Cursor = crHSplit MinSize = 1 end object UpperLeftPageControl: TPageControl Left = 0 Top = 0 - Width = 289 - Height = 165 + Width = 235 + Height = 134 Align = alLeft DockSite = True TabOrder = 0 @@ -1984,10 +1989,10 @@ object MainForm: TMainForm OnUnDock = PageControlUnDock end object UpperRightPageControl: TPageControl - Left = 292 + Left = 237 Top = 0 - Width = 340 - Height = 165 + Width = 395 + Height = 134 Align = alClient DockSite = True TabOrder = 1 @@ -1997,26 +2002,26 @@ object MainForm: TMainForm end object BottomPanel: TPanel Left = 0 - Top = 196 + Top = 165 Width = 632 - Height = 131 + Height = 162 Align = alClient BevelOuter = bvNone TabOrder = 2 Visible = False object BottomVerticalSplitter: TSplitter - Left = 289 + Left = 235 Top = 0 - Width = 3 - Height = 131 + Width = 2 + Height = 162 Cursor = crHSplit MinSize = 1 end object LowerLeftPageControl: TPageControl Left = 0 Top = 0 - Width = 289 - Height = 131 + Width = 235 + Height = 162 Align = alLeft DockSite = True TabOrder = 0 @@ -2024,10 +2029,10 @@ object MainForm: TMainForm OnUnDock = PageControlUnDock end object LowerRightPageControl: TPageControl - Left = 292 + Left = 237 Top = 0 - Width = 340 - Height = 131 + Width = 395 + Height = 162 Align = alClient DockSite = True TabOrder = 1 @@ -2599,6 +2604,10 @@ object MainForm: TMainForm object ViewFtpServerMenuItem: TMenuItem Action = ViewFtpServer end + object ViewWebServerMenuItem: TMenuItem + Action = ViewWebServer + Hint = 'View Web Server Window' + end object ViewEventsMenuItem: TMenuItem Action = ViewEvents end @@ -2663,7 +2672,6 @@ object MainForm: TMainForm end object TelnetRecycle: TAction Caption = 'Recycle' - Enabled = False Hint = 'Recycle Telnet Server' ImageIndex = 55 OnExecute = TelnetRecycleExecute @@ -2736,6 +2744,10 @@ object MainForm: TMainForm ImageIndex = 11 OnExecute = ViewFtpServerExecute end + object ViewWebServer: TAction + Caption = '&Web Server' + OnExecute = ViewWebServerExecute + end object FtpStart: TAction Hint = 'Start FTP Server' ImageIndex = 0 diff --git a/src/sbbs3/ctrl/MainFormUnit.h b/src/sbbs3/ctrl/MainFormUnit.h index c9120b1446795aca7317cbf4cd02ec151f1add15..2934ce21ca5c4fb89ffb7f6a71844468322baabc 100644 --- a/src/sbbs3/ctrl/MainFormUnit.h +++ b/src/sbbs3/ctrl/MainFormUnit.h @@ -275,6 +275,9 @@ __published: // IDE-managed Components TMenuItem *SpamBlockList; TTimer *LogTimer; TTimer *ServiceStatusTimer; + TMenuItem *ViewWebServerMenuItem; + TAction *ViewWebServer; + TToolButton *ViewWebServerButton; void __fastcall FileExitMenuItemClick(TObject *Sender); void __fastcall ViewToolbarMenuItemClick(TObject *Sender); void __fastcall FormClose(TObject *Sender, TCloseAction &Action); @@ -351,6 +354,7 @@ __published: // IDE-managed Components void __fastcall FileEditConfigFilesClick(TObject *Sender); void __fastcall BBSEditFileClick(TObject *Sender); void __fastcall ServiceStatusTimerTick(TObject *Sender); + void __fastcall ViewWebServerExecute(TObject *Sender); private: // User declarations public: // User declarations __fastcall TMainForm(TComponent* Owner); diff --git a/src/sbbs3/ctrl/WebFormUnit.cpp b/src/sbbs3/ctrl/WebFormUnit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b826e6c3b9634c52b88e56724c9a592ec58faf8 --- /dev/null +++ b/src/sbbs3/ctrl/WebFormUnit.cpp @@ -0,0 +1,61 @@ +/* $Id$ */ + +/**************************************************************************** + * @format.tab-size 4 (Plain Text/Source Code File Header) * + * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * + * * + * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * See the GNU General Public License for more details: gpl.txt or * + * http://www.fsf.org/copyleft/gpl.html * + * * + * Anonymous FTP access to the most recent released source is available at * + * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * + * * + * Anonymous CVS access to the development source and modification history * + * is available at cvs.synchro.net:/cvsroot/sbbs, example: * + * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login * + * (just hit return, no password is necessary) * + * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src * + * * + * For Synchronet coding style and modification guidelines, see * + * http://www.synchro.net/source.html * + * * + * You are encouraged to submit any modifications (preferably in Unix diff * + * format) via e-mail to mods@synchro.net * + * * + * Note: If this box doesn't appear square, then you need to fix your tabs. * + ****************************************************************************/ +//--------------------------------------------------------------------------- + +#include <vcl.h> +#pragma hdrstop + +#include "WebFormUnit.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TWebForm *WebForm; +//--------------------------------------------------------------------------- +__fastcall TWebForm::TWebForm(TComponent* Owner) + : TForm(Owner) +{ + MainForm=(TMainForm*)Application->MainForm; +} +//--------------------------------------------------------------------------- +void __fastcall TWebForm::FormShow(TObject *Sender) +{ + MainForm->ViewWebServerMenuItem->Checked=true; + MainForm->ViewWebServerButton->Down=true; +} +//--------------------------------------------------------------------------- +void __fastcall TWebForm::FormHide(TObject *Sender) +{ + MainForm->ViewWebServerMenuItem->Checked=false; + MainForm->ViewWebServerButton->Down=false; +} +//--------------------------------------------------------------------------- diff --git a/src/sbbs3/ctrl/WebFormUnit.dfm b/src/sbbs3/ctrl/WebFormUnit.dfm new file mode 100644 index 0000000000000000000000000000000000000000..ebe2aa7de8a536f2138924c329c380c1c8669496 --- /dev/null +++ b/src/sbbs3/ctrl/WebFormUnit.dfm @@ -0,0 +1,117 @@ +object WebForm: TWebForm + Left = 578 + Top = 571 + Width = 462 + Height = 229 + Caption = 'Web Server' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnHide = FormHide + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar: TToolBar + Left = 0 + Top = 0 + Width = 454 + Height = 25 + Caption = 'ToolBar' + EdgeBorders = [] + Flat = True + Images = MainForm.ImageList + ParentShowHint = False + ShowHint = True + TabOrder = 0 + object StartButton: TToolButton + Left = 0 + Top = 0 + Action = MainForm.TelnetStart + Grouped = True + ParentShowHint = False + ShowHint = True + end + object StopButton: TToolButton + Left = 23 + Top = 0 + Action = MainForm.TelnetStop + Grouped = True + ParentShowHint = False + ShowHint = True + end + object RecycleButton: TToolButton + Left = 46 + Top = 0 + Action = MainForm.TelnetRecycle + end + object ToolButton1: TToolButton + Left = 69 + Top = 0 + Width = 8 + Caption = 'ToolButton1' + ImageIndex = 1 + Style = tbsSeparator + end + object ConfigureButton: TToolButton + Left = 77 + Top = 0 + Action = MainForm.TelnetConfigure + ParentShowHint = False + ShowHint = True + end + object ToolButton2: TToolButton + Left = 100 + Top = 0 + Width = 8 + Caption = 'ToolButton2' + ImageIndex = 5 + Style = tbsSeparator + end + object Status: TStaticText + Left = 108 + Top = 0 + Width = 150 + Height = 22 + Hint = 'Telnet Server Status' + Align = alClient + AutoSize = False + BorderStyle = sbsSunken + Caption = 'Down' + TabOrder = 0 + end + object ToolButton3: TToolButton + Left = 258 + Top = 0 + Width = 8 + Caption = 'ToolButton3' + ImageIndex = 6 + Style = tbsSeparator + end + object ProgressBar: TProgressBar + Left = 266 + Top = 0 + Width = 75 + Height = 22 + Hint = 'Telnet Server Utilization' + Min = 0 + Max = 100 + Smooth = True + Step = 1 + TabOrder = 1 + end + end + object Log: TMemo + Left = 0 + Top = 25 + Width = 454 + Height = 176 + Align = alClient + ReadOnly = True + ScrollBars = ssBoth + TabOrder = 1 + end +end diff --git a/src/sbbs3/ctrl/WebFormUnit.h b/src/sbbs3/ctrl/WebFormUnit.h new file mode 100644 index 0000000000000000000000000000000000000000..928a71b55a98917a1289758f71e42c728c3bd8b0 --- /dev/null +++ b/src/sbbs3/ctrl/WebFormUnit.h @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------------- + +#ifndef WebFormUnitH +#define WebFormUnitH +//--------------------------------------------------------------------------- +#include <Classes.hpp> +#include <Controls.hpp> +#include <StdCtrls.hpp> +#include <Forms.hpp> +#include <ComCtrls.hpp> +#include <ToolWin.hpp> +#include "MainFormUnit.h" +//--------------------------------------------------------------------------- +class TWebForm : public TForm +{ +__published: // IDE-managed Components + TToolBar *ToolBar; + TToolButton *StartButton; + TToolButton *StopButton; + TToolButton *RecycleButton; + TToolButton *ToolButton1; + TToolButton *ConfigureButton; + TToolButton *ToolButton2; + TStaticText *Status; + TToolButton *ToolButton3; + TProgressBar *ProgressBar; + TMemo *Log; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormHide(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TWebForm(TComponent* Owner); + TMainForm* MainForm; + +}; +//--------------------------------------------------------------------------- +extern PACKAGE TWebForm *WebForm; +//--------------------------------------------------------------------------- +#endif diff --git a/src/sbbs3/ctrl/sbbsctrl.bpr b/src/sbbs3/ctrl/sbbsctrl.bpr index ee585a62877c30f63aa9b74dd06e41d623fbbd41..867aed42f83c55f56c6b7f88b46e71a1026312e7 100644 --- a/src/sbbs3/ctrl/sbbsctrl.bpr +++ b/src/sbbs3/ctrl/sbbsctrl.bpr @@ -12,8 +12,8 @@ EventsFormUnit.obj ConfigWizardUnit.obj ServicesFormUnit.obj TelnetCfgDlgUnit.obj MailCfgDlgUnit.obj FtpCfgDlgUnit.obj ServicesCfgDlgUnit.obj ..\sbbs_ini.obj ..\..\xpdev\ini_file.obj - ..\..\xpdev\dirwrap.obj - ..\..\xpdev\str_list.obj PreviewFormUnit.obj ..\..\xpdev\genwrap.obj"/> + ..\..\xpdev\str_list.obj PreviewFormUnit.obj ..\..\xpdev\genwrap.obj + WebFormUnit.obj"/> <RESFILES value="sbbsctrl.res"/> <IDLFILES value=""/> <IDLGENFILES value=""/> @@ -25,7 +25,7 @@ UserListFormUnit.dfm UserMsgFormUnit.dfm PropertiesDlgUnit.dfm EventsFormUnit.dfm ConfigWizardUnit.dfm ServicesFormUnit.dfm TelnetCfgDlgUnit.dfm MailCfgDlgUnit.dfm FtpCfgDlgUnit.dfm - ServicesCfgDlgUnit.dfm PreviewFormUnit.dfm"/> + ServicesCfgDlgUnit.dfm PreviewFormUnit.dfm WebFormUnit.dfm"/> <LIBFILES value="sbbs.lib mailsrvr.lib ftpsrvr.lib services.lib"/> <LIBRARIES value="bcb2kaxserver.lib indy.lib dbxcds.lib dclocx.lib soaprtl.lib bcbie.lib nmfast.lib dbexpress.lib inetdbxpress.lib inetdbbde.lib dsnapcon.lib @@ -57,9 +57,8 @@ <OTHERFILES value=""/> </MACROS> <OPTIONS> - <IDLCFLAGS value="-I..\. -IC:\Borland\CBuilder6\Projects -I.. -I..\..\xpdev - -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -DSBBS -D_DEBUG - -DRINGBUF_SEM -boa"/> + <IDLCFLAGS value="-I..\. -IC:\Borland\CBuilder6\Projects -I.. -I..\..\xpdev -I$(BCB)\include + -I$(BCB)\include\vcl -src_suffix cpp -DSBBS -D_DEBUG -DRINGBUF_SEM -boa"/> <CFLAG1 value="-Od -H=c:\borland\CBUILD~2\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM"/> <PFLAGS value="-$Y+ -$W -$O- -$A8 -v -JPHNE -M"/> @@ -111,6 +110,7 @@ <FILE FILENAME="..\..\xpdev\str_list.c" FORMNAME="" UNITNAME="str_list" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> <FILE FILENAME="PreviewFormUnit.cpp" FORMNAME="PreviewForm" UNITNAME="PreviewFormUnit" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> <FILE FILENAME="..\..\xpdev\genwrap.c" FORMNAME="" UNITNAME="genwrap" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="WebFormUnit.cpp" FORMNAME="WebForm" UNITNAME="WebFormUnit" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> </FILELIST> <BUILDTOOLS> </BUILDTOOLS> diff --git a/src/sbbs3/ctrl/sbbsctrl.cpp b/src/sbbs3/ctrl/sbbsctrl.cpp index efee989e309ac18d31c05ce6f5401eb7ed837543..65d330b029a98cefe382a8e75247f5c79e23d12a 100644 --- a/src/sbbs3/ctrl/sbbsctrl.cpp +++ b/src/sbbs3/ctrl/sbbsctrl.cpp @@ -60,6 +60,7 @@ USEFORM("MailCfgDlgUnit.cpp", MailCfgDlg); USEFORM("FtpCfgDlgUnit.cpp", FtpCfgDlg); USEFORM("ServicesCfgDlgUnit.cpp", ServicesCfgDlg); USEFORM("PreviewFormUnit.cpp", PreviewForm); +USEFORM("WebFormUnit.cpp", WebForm); //--------------------------------------------------------------------------- #include "MainFormUnit.h" #include "SpyFormUnit.h" @@ -75,17 +76,17 @@ WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR cmd, int) Application->Initialize(); Application->Title = "Synchronet Control Panel"; Application->CreateForm(__classid(TMainForm), &MainForm); - Application->CreateForm(__classid(TTelnetForm), &TelnetForm); - Application->CreateForm(__classid(TFtpForm), &FtpForm); - Application->CreateForm(__classid(TMailForm), &MailForm); - Application->CreateForm(__classid(TNodeForm), &NodeForm); - Application->CreateForm(__classid(TStatsForm), &StatsForm); - Application->CreateForm(__classid(TClientForm), &ClientForm); - Application->CreateForm(__classid(TUserListForm), &UserListForm); - Application->CreateForm(__classid(TEventsForm), &EventsForm); - Application->CreateForm(__classid(TServicesForm), &ServicesForm); - - if(cmd[0]) + Application->CreateForm(__classid(TTelnetForm), &TelnetForm); + Application->CreateForm(__classid(TFtpForm), &FtpForm); + Application->CreateForm(__classid(TMailForm), &MailForm); + Application->CreateForm(__classid(TNodeForm), &NodeForm); + Application->CreateForm(__classid(TStatsForm), &StatsForm); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->CreateForm(__classid(TUserListForm), &UserListForm); + Application->CreateForm(__classid(TEventsForm), &EventsForm); + Application->CreateForm(__classid(TServicesForm), &ServicesForm); + Application->CreateForm(__classid(TWebForm), &WebForm); + if(cmd[0]) SAFECOPY(MainForm->ini_file,cmd); else sbbs_get_ini_fname(MainForm->ini_file, MainForm->global.ctrl_dir, NULL /* auto-hostname */);