区域管理cgi程序在网页上设定一个区域内所有灯光设备的开关
area_con.c
#include<unistd.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<sys/types.h>
#include "html.h"
#include "config.h"
#include "ipc.h"
void table_tr(char * name,char sw,int type_id)
{
int i;
printf("<tr><td>%s</td>",name);
if(sw==1){
printf("<td class=\"center\"><input type=\"radio\" checked=\"checked\" value=\"1\" name=\"sw_sta%d\">开启<input type=\"radio\" value=\"0\" name=\"sw_sta%d\">关闭</td>",type_id,type_id);
}else{
printf("<td class=\"center\"><input type=\"radio\" value=\"1\" name=\"sw_sta%d\">开启<input type=