-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
215 lines (214 loc) · 9.55 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Virtual Hosts</title>
<link rel="stylesheet" type="text/css" href="styles/SourceCodePro/SourceCodePro.css">
<link rel="stylesheet" type="text/css" href="styles/SourceSansPro/SourceSansPro.css">
<link rel="stylesheet" type="text/css" href="styles/SourceSerifPro/SourceSerifPro.css">
<link rel="stylesheet" type="text/css" href="styles/main.css">
<script type="text/javascript" src="resources/prism/prism.js" crossorigin></script>
<script>
document.addEventListener('DOMContentLoaded',init);
function init() {
// require('./renderer.js');
require('./scripts/utilities.js');
require('./scripts/virtual-hosts.js');
// require('./scripts/do-virtual-hosts.js');
// alert('hello')
}
</script>
</head>
<body>
<form id="controls">
<div id="tabs">
<button value="settings">Settings</button>
<button value="hosts-file">hosts File</button>
<button value="httpd-conf">httpd.conf</button>
<button value="virtual-hosts">Virtual Hosts</button>
<button value="generator">Generator</button>
<button value="php-ini">php.ini</button>
<button value="misc-text">File</button>
<button value="misc-actions">Actions</button>
<button value="php-runner">PHP Runner</button>
</div>
</form>
<div id="forms">
<form id="settings">
<div class="help">
<h3>Virtual Host Settings</h3>
<ol>
<li>Choose a Web Server Package</li>
<li>If you have installed the Web Server in a non-default location, select the folder.</li>
<li>If you prefer to use a different PHP Interpreter, choose the alternative interpreter executable.</li>
<li>Save the Settings for next time …</li>
</ol>
</div>
<div id="misc">
<h4>Choose a Web Server Package</h4>
<select name="server">
<option value="">Choose One …</option>
<option value="xampp">XAMPP</option>
<option value="mamp">MAMP</option>
<!--option value="ampps">AMPPS</option-->
</select>
<p>Note: When you select a server, the Web Server Root Folder and the PHP Interpreter below will be reset to the default for the server.</p>
</div>
<div id="choose-server-root">
<h4>Choose a Web Server Root Folder</h4>
<!--
<label for="server-root">Server Root</label>
<input type="text" id="server-root" name="server-root" value="" placeholder="Leave empty for default" title="Full Path to Server Folder">
-->
<output type="text" name="server-root" value="" placeholder="Leave empty for default" title="Full Path to Server Folder"></output>
<button name="server-path">Select Folder …</button>
<button name="server-path-default">Default</button>
</div>
<div id="choose-php-interpreter">
<h4>Choose a PHP Interpreter</h4>
<!--
<label for="php-interpreter">Server Root</label>
<input type="text" id="php-interpreter" name="php-interpreter" value="" placeholder="Leave empty for default" title="Full Path to PHP Interpreter">
-->
<output name="php-interpreter" value="" placeholder="Leave empty for default" title="Full Path to PHP Interpreter"></output>
<button name="php-interpreter-path">Select Interpreter …</button>
<button name="php-interpreter-path-default">Default …</button>
</div>
<div id="save-settings">
<button name="save-settings">Save</button>
</div>
</form>
<form id="hosts-file">
<div class="help">
<h3>Hosts File (etc/host)</h3>
<ol>
<li>Add:
<pre>127.0.0.1 www.example.com</pre>
or something like it to the bottom of the file</li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content" spellcheck="false">Open hosts file or Select Platform</textarea>
</div>
</form>
<form id="httpd-conf">
<div class="help">
<h3>Apache Configuration File (httpd.conf)</h3>
<ol>
<li>If you have installed in a non-standard location, enter it in the <strong>Server Root</strong></li>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>Find <a href="doit:find:httpd-vhosts.conf"><code>httpd-vhosts.conf</code></a> and remove the comment(<code>#</code>) at the beginning of the <code>Include</code> (if any). This gives:
<pre># Virtual hosts</pre>
<pre>Include etc/extra/httpd-vhosts.conf</pre>
</li>
<li class="macos">
(MacOS:) Find <a href="doit:find:User/Group"><code>User/Group</code></a> and change the User and Group to your own. Something like:
<pre>User fred</pre>
<pre>Group admin</pre>
</li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content" spellcheck="false">Open httpd.conf file or Select Platform</textarea>
</div>
</form>
<form id="virtual-hosts">
<div class="help">
<h3>Virtual Hosts File (httpd-vhosts.conf)</h3>
<ol>
<li>If you have installed in a non-standard location, enter it in the <strong>Server Root</strong></li>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>First, use the <strong>Generator</strong> tab and fill in the details.</li>
<li>Then copy the result and paste it below.</li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content" spellcheck="false">Open vhosts.conf file or Select Platform</textarea>
</div>
</form>
<form id="generator">
<div class="help">
<h3>Hosts Generator</h3>
<ol>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>Fill in the details blow and click <strong>Generate</strong></li>
</ol>
</div>
<div class="etc">
<p><label class="server xampp"><input type="checkbox" name="vhost-default" value="1" title="Short Project Name" checked> Include Default Host</label></p>
<p><label for="project">Project Name</label><input type="text" id="project" name="project" value="example" placeholder="Short Project Name" title="Short Project Name"></p>
<p><label for="domain">Virtual Domain</label><input type="text" id="domain" name="domain" value="www.example.com" placeholder="Site Domain Name" title="Virtual Domain Name"></p>
<p><label for="root">Document Root</label><input type="text" id="root" name="root" value="…/…/example" placeholder="…/…/example" title="Full Path to Root Folder"><button name="path">Select Folder …</button></p>
<button name="generate">Generate</button>
</div>
<div class="textarea"><textarea name="content" class="textarea" spellcheck="false">The cat sat on the mat</textarea></div>
</form>
<form id="php-ini">
<div class="help">
<h3>PHP Configuration File (php.ini)</h3>
<ol>
<li>If you have installed in a non-standard location, enter it in the <strong>Server Root</strong></li>
<li>Make sure that you have selected the server (XAMPP or MAMP) from the menu.</li>
<li>Set the <strong>sendmail path</strong>:
<ul>
<li>Find <a href="doit:find:sendmail_path"><code>sendmail_path</code></a> and remove the comment(<code>;</code>) at the beginning of the line(if any).</li>
<li>Select the part after <code>sendmail_path=</code></li>
<li>Locate your (fake) <a href="doit:open:Sendmail Path:clipboard">sendmail</a> program and add the path at the end inside "quotes".</li>
</ul>
This gives something like: <code>sendmail_path = "…/…/sendmail"</code>. Paste the resulting path.</li>
<li>While you’re at it, check <a href="doit:find:extension ?= ?.*gd"><code>extension=gd</code></a> and remove the comment(<code>;</code>) at the beginning of the line(if any). This will enable you to use image functions in PHP. </li>
</ol>
</div>
<div class="textarea etc">
<textarea name="content" spellcheck="false">Open php.ini file or Select Platform</textarea>
</div>
</form>
<form id="misc-text">
<div class="help">
<h3>Miscellaeous Text File</h3>
</div>
<div class="textarea etc">
<textarea name="content" spellcheck="false">Open any file</textarea>
</div>
</form>
<form id="misc-actions">
<div class="help">
<h3>Miscellaeous Actions</h3>
</div>
<div class="etc">
<p><button type="button" name="reset-mysql">Reset MySQL</button></p>
<p><button type="button" name="phpmyadmin-css">PHPMyAdmin CSS</button><button type="button" name="phpmyadmin-css-append">Append CSS Settings</button></p>
<p><button type="button" name="phpmyadmin-config">PHPMyAdmin Config</button><button type="button" name="phpmyadmin-config-append">Append Config Settings</button></p>
</div>
</form>
<form id="php-runner">
<div class="help" id="php-help">
<h3>PHP Runner</h3>
</div>
<div id="php-code">
<textarea name="code" placeholder="Enter your PHP" spellcheck="false"></textarea>
<code class="language-php" contenteditable="true">Content</code>
<div id="php-control">
<label><input type="checkbox" name="php-tags"> HTML Mode</label>
<button name="doit">Run</button>
</div>
</div>
<div id="php-result">
</div>
</form>
</div>
<form id="search">
<div><input type="text" name="text"><button name="find">Find</button></div>
<!--
<div><input type="text" name="replacement"><button name="replace">Replace</button></div>
-->
<input type="checkbox" name="case-sensitive" id="search-case-sensitive"><label for="search-case-sensitive">Match Case</label>
</form>
<footer>
<div id="info"><p id="path">Path</p><p id="message" data-status="">Message</p></div>
</footer>
<div id="about">
watch this space
</div>
</body>
</html>