#!/bin/sh . /www/cgi-bin/functions.sh lock_cgiwait qos_totalnum=`nvram get qos_rule_count` qosmac_totalnum=`nvram get qos_mac_count` #local_pc_set=`nvram get local_pc_set` #if [ "$local_pc_set" = "0" ]; then # show_local=0 #else # show_local=1 #fi attach_device_list=`[ -f /tmp/netscan/attach_device ] && cat /tmp/netscan/attach_device || echo ""` attach_device_list=$(echo -n $attach_device_list) print_cgi_header print_http_header "/funcs.js" "/qos.js" print_body_header "_qos_add" print_table_header "" echo "" cat < var cf = document.forms[0]; var attach_device_list="$attach_device_list"; var attach_array=attach_device_list.split(' @#$&*! '); var attach_ip_array = new Array(); var attach_mac_array = new Array(); var attach_name_array = new Array(); var attach_mac_show = new Array(); var p=0,attach_show_num=0,mac_show_num=0,dup=0; if(attach_device_list != "") for(i=0;i2) { attach_ip_array[p]=each_info[0]; attach_mac_array[p]=each_info[1]; if (each_info[2].length>0) attach_name_array[p]=each_info[2]; else attach_name_array[p]="----"; } else { attach_ip_array[p]=each_info[0]; attach_mac_array[p]=each_info[1]; attach_name_array[p]="----"; } if(attach_ip_array[p] == "") attach_ip_array[p]="<unknown>" if(attach_mac_array[p] == "") attach_mac_array[p]="<unknown>" if(attach_name_array[p] == "") attach_name_array[p]="<unknown>" p++; } if( attach_device_list != "" ) { for(i=0;i   : : : : :                  EOF print_http_footer