_
_
||
[
]
.checked == 1
.checked == 1
printf("<script type=\"text/javascript\">
function document_
_
_check_dependencies() {if (
) {
document.
.
.disabled = false;} else {
document.
.
.disabled = true;}}
</script>");
onclick=\"
document_
_
_check_dependencies();
();
\"
/* WARNING: This C source code was generated from XML: DO NOT EDIT BY HAND! */
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <cgi-util.h>
void print_form (char *sidebar)
{
struct stat buf;
printf("
", sidebar);
printf("
");
}
void save_data(void)
{
FILE *outfile;
struct stat buf;
char *mode;
if ((mode = cgi_getentrystr("mode")) == NULL
|| *mode == 0x00) {
cgi_error ("Error: missing mode");
}
}
char *get_service_name(void)
{
return g_strdup("");
}
printf("<legend>");
printf("
");
printf("</legend>");
printf("<legend>");
printf("
");
printf("</legend>");
printf("<legend>");
printf("
");
printf("</legend>");
printf("<fieldset>");
printf("</fieldset>");
printf("<fieldset>");
printf("</fieldset>");
printf("<fieldset>");
printf("</fieldset>");
#define OUTFILE_
"
"
printf("<p><form name=\"
\" action=\"
\" method=\"post\">");
if (stat (OUTFILE_, &buf) == -1) {
} else { /* FIXME: need conf parser lib. Unfortunately, glib requires [GROUPS] */
FILE *outfile;
char buf[BUFSIZ];
if ((outfile = fopen (OUTFILE_, "r")) == NULL) {
cgi_error ("Error opening " OUTFILE_);
}
while (fgets (buf, sizeof (buf), outfile) != NULL) {
buf[strlen (buf) - 1] = 0x00; /* get rid of '\n' */
}
if (fclose (outfile) == EOF) {
cgi_error ("Error closing " OUTFILE_);
}
}
printf("<input name=\"mode\" type=\"hidden\" value=\"\"/>\n");
printf("</form><p>\n");
if (g_ascii_strcasecmp(mode, "") == 0) {
if (stat (OUTFILE_, &buf) == 0) {
/* Deleted by appliance-configd after running all scripts */
if (rename (OUTFILE_, OUTFILE_ ".old") == -1) {
cgi_error ("Error renaming old configuration");
}
}
if ((outfile = fopen (OUTFILE_, "w")) == NULL) {
cgi_error ("Error opening " OUTFILE_);
}
fprintf (outfile, "# Created by appliance-config, do not edit by hand\n");
fprintf (outfile, "\n");
printf("\n");
cgi_error ("Error: Invalid save-data-as value:");
if (fclose (outfile) == EOF) {
cgi_error ("Error closing " OUTFILE_);
}
}
char *
= NULL;
if ((
= cgi_getentrystr ("
")) == NULL || *
== 0x00) {
= "off";
}
fprintf (outfile, "
=%s\n",
);
if ((
= cgi_getentrystr ("
")) == NULL || *
== 0x00) {
= "off";
}
fprintf (outfile, "%s ",
);
printf("
<input name=\"
\" type=\"
\"
/>");
if (g_ascii_strncasecmp (buf, "
=", strlen ("
=")) == 0) {
= g_strdup (buf + strlen ("
="));
}
if (g_ascii_strcasecmp ("on",
) == 0) {
printf("
<input name=\"
\" type=\"
\"
checked=\"checked\" />");
} else {
printf("
<input name=\"
\" type=\"
\"
/>");
}
printf("
<select name=\"
\">");
printf("</select>");
printf("
<select name=\"
\">");
printf("</select>");
printf("<option value=\"
\">
</option>");
printf("<option value=\"
\">
</option>");
print_document_
_
_options ("document.
.
");
print_document_
_
_options ("document.
.
");
printf("<br/>");
printf("<br/>");
printf("<p><input name=\"submit\" type=\"submit\" value=\"
\"/><p>");