Skip to content
Snippets Groups Projects
Commit 222daa3e authored by rswindell's avatar rswindell
Browse files

Added index files edit box to allow index filename list to be configured.

parent 0d4b927f
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ __fastcall TWebCfgDlg::TWebCfgDlg(TComponent* Owner)
void __fastcall TWebCfgDlg::FormShow(TObject *Sender)
{
char str[128];
char** p;
if(MainForm->web_startup.interface_addr==0)
NetworkInterfaceEdit->Text="<ANY>";
......@@ -80,6 +81,13 @@ void __fastcall TWebCfgDlg::FormShow(TObject *Sender)
EmbeddedJsExtEdit->Text=AnsiString(MainForm->web_startup.js_ext);
ServerSideJsExtEdit->Text=AnsiString(MainForm->web_startup.ssjs_ext);
IndexFileEdit->Text.SetLength(0);
for(p=MainForm->web_startup.index_file_name;*p;p++) {
if(p!=MainForm->web_startup.index_file_name)
IndexFileEdit->Text=IndexFileEdit->Text+",";
IndexFileEdit->Text=IndexFileEdit->Text+AnsiString(*p);
}
AnswerSoundEdit->Text=AnsiString(MainForm->web_startup.answer_sound);
HangupSoundEdit->Text=AnsiString(MainForm->web_startup.hangup_sound);
HackAttemptSoundEdit->Text=AnsiString(MainForm->web_startup.hack_sound);
......@@ -133,6 +141,10 @@ void __fastcall TWebCfgDlg::OKBtnClick(TObject *Sender)
SAFECOPY(MainForm->web_startup.ssjs_ext
,ServerSideJsExtEdit->Text.c_str());
strListFree(&MainForm->web_startup.index_file_name);
strListSplitCopy(&MainForm->web_startup.index_file_name,
IndexFileEdit->Text.c_str(),",");
SAFECOPY(MainForm->web_startup.answer_sound
,AnswerSoundEdit->Text.c_str());
SAFECOPY(MainForm->web_startup.hangup_sound
......
......@@ -3,69 +3,69 @@ object WebCfgDlg: TWebCfgDlg
Top = 403
BorderStyle = bsDialog
Caption = 'Web Server Configuration'
ClientHeight = 245
ClientWidth = 286
ClientHeight = 302
ClientWidth = 352
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -10
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnShow = FormShow
DesignSize = (
286
245)
PixelsPerInch = 96
TextHeight = 13
352
302)
PixelsPerInch = 120
TextHeight = 16
object PageControl: TPageControl
Left = 3
Top = 3
Width = 278
Height = 199
Left = 4
Top = 4
Width = 342
Height = 245
ActivePage = HttpTabSheet
TabIndex = 1
TabOrder = 0
object GeneralTabSheet: TTabSheet
Caption = 'General'
object MaxClientesLabel: TLabel
Left = 7
Top = 86
Width = 78
Height = 20
Left = 9
Top = 106
Width = 96
Height = 24
AutoSize = False
Caption = 'Max Clients'
end
object MaxInactivityLabel: TLabel
Left = 7
Top = 112
Width = 78
Height = 20
Left = 9
Top = 138
Width = 96
Height = 24
AutoSize = False
Caption = 'Max Inactivity'
end
object PortLabel: TLabel
Left = 7
Top = 60
Width = 78
Height = 20
Left = 9
Top = 74
Width = 96
Height = 24
AutoSize = False
Caption = 'Listening Port'
end
object InterfaceLabel: TLabel
Left = 7
Top = 34
Width = 78
Height = 20
Left = 9
Top = 42
Width = 96
Height = 24
AutoSize = False
Caption = 'Interface (IP)'
end
object AutoStartCheckBox: TCheckBox
Left = 7
Top = 10
Width = 117
Height = 20
Left = 9
Top = 12
Width = 144
Height = 25
Hint = 'Automatically start Web server'
Caption = 'Auto Startup'
ParentShowHint = False
......@@ -73,9 +73,9 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 0
end
object MaxClientsEdit: TEdit
Left = 85
Top = 86
Width = 39
Left = 105
Top = 106
Width = 48
Height = 24
Hint = 'Maximum number of simultaneous clients (default=10)'
ParentShowHint = False
......@@ -83,9 +83,9 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 4
end
object MaxInactivityEdit: TEdit
Left = 85
Top = 112
Width = 39
Left = 105
Top = 138
Width = 48
Height = 24
Hint =
'Maximum number of seconds of inactivity before disconnect (defau' +
......@@ -95,9 +95,9 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 5
end
object PortEdit: TEdit
Left = 85
Top = 60
Width = 39
Left = 105
Top = 74
Width = 48
Height = 24
Hint = 'TCP port to use for HTTP connections (default=80)'
ParentShowHint = False
......@@ -105,9 +105,9 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 3
end
object NetworkInterfaceEdit: TEdit
Left = 85
Top = 34
Width = 156
Left = 105
Top = 42
Width = 192
Height = 24
Hint = 'Your network adapter'#39's static IP address or blank for <ANY>'
ParentShowHint = False
......@@ -115,10 +115,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 2
end
object HostnameCheckBox: TCheckBox
Left = 148
Top = 10
Width = 119
Height = 20
Left = 182
Top = 12
Width = 147
Height = 25
Hint = 'Automatically lookup client'#39's hostnames via DNS'
Caption = 'Hostname Lookup'
ParentShowHint = False
......@@ -130,63 +130,71 @@ object WebCfgDlg: TWebCfgDlg
Caption = 'HTTP'
ImageIndex = 3
object HtmlDirLabel: TLabel
Left = 7
Top = 10
Width = 78
Height = 20
Left = 9
Top = 12
Width = 96
Height = 25
AutoSize = False
Caption = 'HTML Root'
end
object ErrorSubDirLabel: TLabel
Left = 7
Top = 36
Width = 78
Height = 20
Left = 9
Top = 44
Width = 96
Height = 25
AutoSize = False
Caption = 'Error SubDir'
end
object ServerSideJsExtLabel: TLabel
Left = 7
Top = 88
Width = 143
Height = 20
Left = 9
Top = 140
Width = 176
Height = 25
AutoSize = False
Caption = 'Server-Side JS File Extension'
end
object EmbeddedJsExtLabel: TLabel
Left = 7
Top = 62
Width = 143
Height = 20
Left = 9
Top = 108
Width = 176
Height = 25
AutoSize = False
Caption = 'Embedded JS File Extension'
Enabled = False
end
object IndexLabel: TLabel
Left = 9
Top = 76
Width = 96
Height = 25
AutoSize = False
Caption = 'Index Files'
end
object HtmlRootEdit: TEdit
Left = 85
Top = 10
Width = 156
Height = 21
Left = 105
Top = 12
Width = 192
Height = 24
Hint = 'Root directory for HTML files (off of CTRL directory)'
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object ErrorSubDirEdit: TEdit
Left = 85
Top = 36
Width = 156
Height = 21
Left = 105
Top = 44
Width = 192
Height = 24
Hint = 'Error sub-directory (off of HTML root)'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object ServerSideJsExtEdit: TEdit
Left = 156
Top = 88
Width = 85
Height = 21
Left = 192
Top = 140
Width = 105
Height = 24
Hint =
'File extension that denotes server-side JavaScript files (e.g. "' +
'.ssjs")'
......@@ -195,10 +203,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 2
end
object EmbeddedJsExtEdit: TEdit
Left = 156
Top = 62
Width = 85
Height = 21
Left = 192
Top = 108
Width = 105
Height = 24
Hint =
'File extension that denotes embedded JavaScript files (e.g. ".bb' +
's")'
......@@ -208,33 +216,40 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 3
end
object VirtualHostsCheckBox: TCheckBox
Left = 7
Top = 114
Width = 85
Height = 19
Left = 9
Top = 172
Width = 104
Height = 24
Hint = 'Support virtual host directories off the HTML root directory'
Caption = 'Virtual Hosts'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object IndexFileEdit: TEdit
Left = 104
Top = 76
Width = 193
Height = 24
TabOrder = 5
end
end
object LogTabSheet: TTabSheet
Caption = 'Log'
ImageIndex = 1
object LogBaseLabel: TLabel
Left = 7
Top = 88
Width = 78
Height = 20
Left = 9
Top = 108
Width = 96
Height = 25
AutoSize = False
Caption = 'Base Filename'
end
object DebugTxCheckBox: TCheckBox
Left = 7
Top = 34
Width = 156
Height = 20
Left = 9
Top = 42
Width = 192
Height = 24
Hint = 'Log (debug) transmitted HTTP responses'
Caption = 'Transmitted Responses'
ParentShowHint = False
......@@ -242,10 +257,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 1
end
object DebugRxCheckBox: TCheckBox
Left = 7
Top = 10
Width = 156
Height = 19
Left = 9
Top = 12
Width = 192
Height = 24
Hint = 'Log (debug) all received HTTP requests'
Caption = 'Received Requests'
ParentShowHint = False
......@@ -253,10 +268,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 0
end
object AccessLogCheckBox: TCheckBox
Left = 7
Top = 59
Width = 156
Height = 19
Left = 9
Top = 73
Width = 192
Height = 23
Hint = 'Create HTTP access log files'
Caption = 'Create Access Log Files'
ParentShowHint = False
......@@ -265,9 +280,9 @@ object WebCfgDlg: TWebCfgDlg
OnClick = AccessLogCheckBoxClick
end
object LogBaseNameEdit: TEdit
Left = 85
Top = 88
Width = 156
Left = 105
Top = 108
Width = 192
Height = 24
Hint = 'Base directory and filename for HTTP access log files'
ParentShowHint = False
......@@ -279,33 +294,33 @@ object WebCfgDlg: TWebCfgDlg
Caption = 'Sound'
ImageIndex = 2
object AnswerSoundLabel: TLabel
Left = 7
Top = 10
Width = 65
Height = 20
Left = 9
Top = 12
Width = 80
Height = 25
AutoSize = False
Caption = 'Connect'
end
object HangupSoundLabel: TLabel
Left = 7
Top = 36
Width = 65
Height = 20
Left = 9
Top = 44
Width = 80
Height = 25
AutoSize = False
Caption = 'Disconnect'
end
object HackAttemptSoundLabel: TLabel
Left = 7
Top = 62
Width = 65
Height = 20
Left = 9
Top = 76
Width = 80
Height = 25
AutoSize = False
Caption = 'Hack Attempt'
end
object AnswerSoundEdit: TEdit
Left = 85
Top = 10
Width = 156
Left = 105
Top = 12
Width = 192
Height = 24
Hint = 'Sound file to play when users connect'
ParentShowHint = False
......@@ -313,18 +328,18 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 0
end
object AnswerSoundButton: TButton
Left = 247
Top = 10
Width = 20
Height = 21
Left = 304
Top = 12
Width = 25
Height = 26
Caption = '...'
TabOrder = 1
OnClick = AnswerSoundButtonClick
end
object HangupSoundEdit: TEdit
Left = 85
Top = 36
Width = 156
Left = 105
Top = 44
Width = 192
Height = 24
Hint = 'Sound file to play when users disconnect'
ParentShowHint = False
......@@ -332,18 +347,18 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 2
end
object HangupSoundButton: TButton
Left = 247
Top = 36
Width = 20
Height = 21
Left = 304
Top = 44
Width = 25
Height = 26
Caption = '...'
TabOrder = 3
OnClick = HangupSoundButtonClick
end
object HackAttemptSoundEdit: TEdit
Left = 85
Top = 62
Width = 156
Left = 105
Top = 76
Width = 192
Height = 24
Hint = 'Sound file to play when users disconnect'
ParentShowHint = False
......@@ -351,10 +366,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 4
end
object HackAttemptSoundButton: TButton
Left = 247
Top = 62
Width = 20
Height = 21
Left = 304
Top = 76
Width = 25
Height = 26
Caption = '...'
TabOrder = 5
OnClick = HackAttemptSoundButtonClick
......@@ -362,10 +377,10 @@ object WebCfgDlg: TWebCfgDlg
end
end
object OKBtn: TButton
Left = 20
Top = 211
Width = 76
Height = 25
Left = 25
Top = 260
Width = 93
Height = 30
Anchors = [akLeft, akBottom]
Caption = 'OK'
Default = True
......@@ -374,10 +389,10 @@ object WebCfgDlg: TWebCfgDlg
OnClick = OKBtnClick
end
object CancelBtn: TButton
Left = 104
Top = 211
Width = 75
Height = 25
Left = 128
Top = 260
Width = 92
Height = 30
Anchors = [akLeft, akBottom]
Cancel = True
Caption = 'Cancel'
......@@ -385,10 +400,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 2
end
object ApplyBtn: TButton
Left = 189
Top = 211
Width = 76
Height = 25
Left = 233
Top = 260
Width = 93
Height = 30
Anchors = [akLeft, akBottom]
Cancel = True
Caption = 'Apply'
......
......@@ -55,6 +55,8 @@ __published: // IDE-managed Components
TEdit *LogBaseNameEdit;
TLabel *LogBaseLabel;
TOpenDialog *OpenDialog;
TLabel *IndexLabel;
TEdit *IndexFileEdit;
void __fastcall FormShow(TObject *Sender);
void __fastcall AnswerSoundButtonClick(TObject *Sender);
void __fastcall HangupSoundButtonClick(TObject *Sender);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment