2012-02-22 19:09:46 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2012-05-21 20:23:41 +00:00
|
|
|
source /mod/webif/lib/setup
|
2012-02-22 19:09:46 +00:00
|
|
|
|
|
|
|
puts "Content-Type: text/html"
|
|
|
|
puts ""
|
|
|
|
|
|
|
|
header
|
|
|
|
|
|
|
|
cgi_input
|
|
|
|
#cgi_dump
|
|
|
|
set file [cgi_get file "/tmp/hosts"]
|
|
|
|
|
|
|
|
puts {
|
|
|
|
<script type=text/javascript src=/js/enadis.js></script>
|
|
|
|
<script type=text/javascript src=/js/tabsupport.js></script>
|
|
|
|
<script type=text/javascript src=/js/jqueryFileTree.js></script>
|
|
|
|
<link rel=stylesheet type=text/css href=/css/jqueryFileTree.css />
|
|
|
|
<script type=text/javascript src=script.js></script>
|
|
|
|
<link rel=stylesheet href=style.css type=text/css />
|
|
|
|
|
|
|
|
<fieldset class=cleft>
|
|
|
|
<legend>File Editor</legend>
|
|
|
|
|
|
|
|
<div id=msg class=blood style="padding-bottom: 0.7em">
|
|
|
|
Use the <i>Open</i> button below to begin.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<textarea cols=80 rows=20 id=editor></textarea>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<button class=xeditactive id=open>Open</button>
|
|
|
|
<button class=editactive id=save>Save</button>
|
|
|
|
<button class=editactive id=revert>Revert</button>
|
2012-05-21 20:23:41 +00:00
|
|
|
<button class=xeditactive id=create>Create File</button>
|
2012-02-22 19:09:46 +00:00
|
|
|
|
|
|
|
<div id=result class="blood hidden" />
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<div class=cleft>
|
|
|
|
<button id=back>Back to diagnostics</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id=chooserd>
|
|
|
|
<i>Humax Filesystem</i>
|
|
|
|
<div id=chooser></div>
|
|
|
|
</div>
|
|
|
|
|
2012-05-21 20:23:41 +00:00
|
|
|
<div id=createf title="Create new file" style="display: none">
|
|
|
|
<form id=createf_form>
|
|
|
|
<table border=0>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
<label for="createf_name">
|
|
|
|
<b>Filename</b>
|
|
|
|
</label>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<input type=text name="createf_name"
|
|
|
|
id="createf_name"
|
|
|
|
value="/mod/" size=70 maxlength=255
|
|
|
|
class="text ui-widget-content ui-corner-all">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2012-02-22 19:09:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
footer
|
|
|
|
|