File: setup_wizard.c

package info (click to toggle)
webcit 7.37-dfsg-7
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 6,972 kB
  • ctags: 2,344
  • sloc: ansic: 23,301; sh: 3,618; makefile: 239
file content (55 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * $Id: setup_wizard.c 5377 2007-08-10 20:41:22Z thierry $
 *
 * First-time setup wizard
 */

#include "webcit.h"


/*
 */
void do_setup_wizard(void)
{
	char *step;
	FILE *fp;

	step = bstr("step");

	if (!strcasecmp(step, "Finish")) {
		fp = fopen(wizard_filename, "w");
		if (fp != NULL) {
			fprintf(fp, "%d\n", serv_info.serv_rev_level);
			fclose(fp);
		}
		do_welcome();
		return;
	}

	output_headers(1, 1, 2, 0, 0, 0);

	wprintf("<div id=\"banner\">\n");
	wprintf("<img src=\"static/citadel-logo.gif\" WIDTH=64 HEIGHT=64");
	wprintf("<h1>&nbsp;First time setup</h1>");
	wprintf("</div>\n");

	wprintf("<div id=\"content\" class=\"service\">\n");

	wprintf("<div class=\"fix_scrollbar_bug\">"
		"<form method=\"post\" action=\"setup_wizard\">\n"
	);
	wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);

	wprintf("<div align=center>"
		"This is where the setup wizard will be placed.<br>\n"
		"For now, just click Finish.<br><br>\n"
	);

	wprintf("<INPUT TYPE=\"submit\" NAME=\"step\" VALUE=\"Next\">\n");
	wprintf("<INPUT TYPE=\"submit\" NAME=\"step\" VALUE=\"Finish\">\n");

	wprintf("</form></div></div>\n");
	wDumpContent(1);
}