1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/EN7526G_3.18Kernel_SDK/filesystem/boaroot/cgi-bin/getRomfileInfo.cgi
2024-07-22 01:58:46 -03:00

40 lines
1.4 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
echo -e "Content-Type: text/html\n"
echo "<html><head><meta http-equiv=Content-Script-Type content=text/javascript><meta http-equiv=Content-Style-Type content=text/css>"
echo "<meta http-equiv=Content-Type content=\"text/html; charset=gb2312\"></head>"
echo "<body leftmargin=0 topmargin=0><table cellspacing=0 cellPadding=0 border=0><tr><td>"
echo "<SELECT id='sel_romfile' size='1' name='sel_romfile' onChange='doVersionTypeChange();'>"
count=`/userfs/bin/tcapi get System_Entry romfileCount`
romfileSelect=`/userfs/bin/tcapi get System_Entry romfileSelect`
node_name="System_Entry"
while [ $count -gt 0 ]
do
attr_name="romfile$count"
attr_value=`/userfs/bin/tcapi get $node_name $attr_name`
show_value="${attr_value#*_}"
show_value="${show_value%.*}"
if [ "$attr_value" = "$romfileSelect" ] ;then
echo "<option value='$attr_value' selected>$show_value Version</option>"
else
echo "<option value='$attr_value'>$show_value Version</option>"
fi
count=`expr $count - 1`
done
echo "</SELECT>"
echo "<SCRIPT language=JavaScript type=text/javascript>
function doVersionTypeChange(){
if (confirm('变更Version Type设备将会重启。您是否确认') == false)
return;
var f = parent.document.ConfigForm;
if ( null != f )
{
f.romfileselect.value = document.getElementById('sel_romfile').value;
f.Register_CHANGE.value = '2';
f.submit();
}
}
</SCRIPT>"
echo "</td></tr></table></body></html>"