char cnode[SIZ];
FILE *fp;
- if (strlen(bstr("ok_button")) > 0) {
+ if (!IsEmptyStr(bstr("ok_button"))) {
strcpy(node, bstr("node") );
fp = tmpfile();
if (fp != NULL) {
{
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
+ wprintf("<TABLE class=\"netconf_banner\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
wprintf(_("Add a new node"));
wprintf("</SPAN>");
wprintf("</div>\n<div id=\"content\">\n");
wprintf("<FORM METHOD=\"POST\" action=\"edit_node\">\n");
+ wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
wprintf("<CENTER><TABLE border=0>\n");
wprintf("<TR><TD>%s</TD>", _("Node name"));
wprintf("<TD><INPUT TYPE=\"text\" NAME=\"node\" MAXLENGTH=\"16\"></TD></TR>\n");
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
+ wprintf("<TABLE class=\"netconf_banner\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
wprintf(_("Edit node configuration for "));
escputs(node);
if (!strcasecmp(node, cnode)) {
wprintf("<FORM METHOD=\"POST\" action=\"edit_node\">\n");
+ wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
wprintf("<CENTER><TABLE border=0>\n");
wprintf("<TR><TD>");
wprintf(_("Node name"));
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
+ wprintf("<TABLE class=\"netconf_banner\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
wprintf(_("Network configuration"));
wprintf("</SPAN>\n");
wprintf("</A><br />\n");
wprintf("</CENTER>");
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
+ wprintf("<TABLE class=\"netconf_banner\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
wprintf(_("Currently configured nodes"));
wprintf("</SPAN>\n");
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
+ wprintf("<TABLE class=\"netconf_banner\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
wprintf(_("Confirm delete"));
wprintf("</SPAN>\n");
strcpy(node, bstr("node"));
- if (strlen(bstr("add_button")) > 0) {
+ if (!IsEmptyStr(bstr("add_button"))) {
sprintf(buf, "NSET addnode|%s", node);
serv_puts(buf);
serv_getln(buf, sizeof buf);