1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
4 Copyright (C) 2006-2009 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
7 For use with Tomato Firmware only.
8 No part of this file may be used without permission.
12 <meta http-equiv='content-type' content='text/html;charset=utf-
8'
>
13 <meta name='robots' content='noindex,nofollow'
>
14 <title>[<%
ident(); %>] Admin: Configuration
</title>
15 <link rel='stylesheet' type='text/css' href='tomato.css'
>
16 <link rel='stylesheet' type='text/css' href='color.css'
>
17 <script type='text/javascript' src='tomato.js'
></script>
21 <script type='text/javascript' src='debug.js'
></script>
23 <script type='text/javascript'
>
25 // <% nvram("et0macaddr,t_features,t_model_name"); %>
30 if (((i
= name
.lastIndexOf('/')) > 0) || ((i
= name
.lastIndexOf('\\')) > 0))
31 name
= name
.substring(i
+ 1, name
.length
);
35 function backupButton()
39 name
= fix(E('backup-name').value
);
40 if (name
.length
<= 1) {
41 alert('Invalid filename');
44 location
.href
= 'cfg/' + name
+ '.cfg?_http_id=' + nvram
.http_id
;
47 function restoreButton()
51 name
= fix(E('restore-name').value
);
52 name
= name
.toLowerCase();
53 if ((name
.indexOf('.cfg') != (name
.length
- 4)) && (name
.indexOf('.cfg.gz') != (name
.length
- 7))) {
54 alert('Incorrect filename. Expecting a ".cfg" file.');
57 if (!confirm('Are you sure?')) return;
58 E('restore-button').disabled
= 1;
60 f
= E('restore-form');
65 function resetButton()
69 i
= E('restore-mode').value
;
71 if ((i
== 2) && (features('!nve'))) {
72 if (!confirm('WARNING: Erasing the NVRAM on a ' + nvram
.t_model_name
+ ' router may be harmful. It may not be able to re-setup the NVRAM correctly after a complete erase. Proceeed anyway?')) return;
74 if (!confirm('Are you sure?')) return;
75 E('reset-button').disabled
= 1;
76 form
.submit('aco-reset-form');
81 <table id='container' cellspacing=
0>
82 <tr><td colspan=
2 id='header'
>
83 <div class='title'
>Tomato
</div>
84 <div class='version'
>Version <%
version(); %></div>
86 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
88 <div id='ident'
><%
ident(); %></div>
92 <div class='section-title'
>Backup Configuration
</div>
95 <script type='text/javascript'
>
96 W("<input type='text' size='40' maxlength='64' id='backup-name' value='tomato_v" + ('<% version(); %>'.replace(/\./g, '')) + "_m" + nvram
.et0macaddr
.replace(/:/g
, '').substring(6, 12) + "'>");
99 <input type='button' name='f_backup_button' onclick='backupButton()' value='Backup'
>
105 <div class='section-title'
>Restore Configuration
</div>
106 <div class='section'
>
107 <form id='restore-form' method='post' action='cfg/restore.cgi' encType='multipart/form-data'
>
108 Select the configuration file to restore:
<br>
109 <input type='file' size='
40' id='restore-name' name='filename'
> <input type='button' name='f_restore_button' id='restore-button' value='Restore' onclick='restoreButton()'
>
116 <div class='section-title'
>Restore Default Configuration
</div>
117 <div class='section'
>
118 <form id='aco-reset-form' method='post' action='cfg/defaults.cgi'
>
119 <select name='mode' id='restore-mode'
>
120 <option value=
0>Select...
</option>
121 <option value=
1>Restore default router settings (normal)
</option>
122 <option value=
2>Erase all data in NVRAM memory (thorough)
</option>
124 <input type='button' value='OK' onclick='resetButton()' id='reset-button'
>
131 <tr><td id='footer' colspan=
2> </td></tr>