1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
4 Copyright (C) 2006-2010 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: Upgrade
</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>
20 <style type='text/css'
>
31 <script type='text/javascript' src='debug.js'
></script>
33 <script type='text/javascript'
>
35 // <% nvram("jffs2_on"); %>
39 var t
= ((new Date()).getTime() - startTime
) / 1000;
40 elem
.setInnerHTML('afu-time', Math
.floor(t
/ 60) + ':' + Number(Math
.floor(t
% 60)).pad(2));
47 var fom
= document
.form_upgrade
;
50 name
= fom
.file
.value
;
51 if (name
.search(/\.(bin|trx)$/i) == -1) {
52 alert('Expecting a ".bin" or ".trx" file.');
55 if (!confirm('Are you sure you want to upgrade using ' + name
+ '?')) return;
57 E('afu-upgrade-button').disabled
= true;
59 elem
.display('afu-input', false);
60 E('content').style
.verticalAlign
= 'middle';
61 elem
.display('afu-progress', true);
62 elem
.display('navi', false)
63 elem
.display('ident', false)
65 startTime
= (new Date()).getTime();
66 setInterval('clock()', 800);
68 fom
.action
+= '?_http_id=' + nvram
.http_id
;
75 <table id='container' cellspacing=
0>
76 <tr><td colspan=
2 id='header'
>
77 <div class='title'
>Tomato
</div>
78 <div class='version'
>Version <%
version(); %></div>
80 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
82 <div id='ident'
><%
ident(); %></div>
87 <div class='section-title'
>Upgrade Firmware
</div>
89 <form name='form_upgrade' method='post' action='upgrade.cgi' encType='multipart/form-data'
>
91 Select the file to use:
<br>
92 <input type='file' name='file' size='
50' style='height:
20px'
> <input type='button' value='Upgrade' id='afu-upgrade-button' onclick='upgrade()' style='height:
20px'
>
98 <tr><td>Current Version:
</td><td> <%
version(1); %></td></tr>
99 <script type='text/javascript'
>
101 W('<tr><td>Free Memory:</td><td> ' + scaleSize(sysinfo
.totalfreeram
) + ' <small>(aprox. size that can be buffered completely in RAM)</small></td></tr>');
108 <div class='note-disabledw' style='display:none' id='jwarn'
>
109 <b>Cannot upgrade if JFFS2 is enabled.
</b><br><br>
110 An upgrade may overwrite the JFFS2 partition currently in use. Before upgrading,
111 please backup the contents of the JFFS2 partition, disable it, then reboot the router.
<br><br><br>
112 <a href='admin-jffs2.asp'
>Disable
»</a>
115 <div id='afu-progress' style='display:none;margin:auto'
>
116 <img src='spin.gif' style='vertical-align:baseline'
> <span id='afu-time'
>0:
00</span><br>
117 Please wait while the firmware is uploaded
& flashed.
<br>
118 <b>Warning:
</b> Do not interrupt this browser or the router!
<br>
124 <tr><td id='footer' colspan=
2> </td></tr>
126 <script type='text/javascript'
>
127 if (nvram
.jffs2_on
!= '0') {
128 E('jwarn').style
.display
= '';
129 E('afu-input').style
.display
= 'none';