コード例 #1
0
ファイル: program.cpp プロジェクト: panoti/TH201204-PT-PJGK
void createIndex(STS sts, char *outpath)
{
	char *filename = new char[strlen(outpath)+12];
	sprintf(filename, "%s/index.html", outpath);
	
	HTML html = html_create(filename);
	if (html == NULL) {
		log("createIndex", "Khong the tao file 'index.html' duoc!");
		return;
	}

	html_header(html, "HCMUS Students");
	html_body_navigation(html);
	html_body_content(html, 1);
	html_body_content_header(html, "", "", 1);
	html_idxlist_begin(html);
	for (int i = 0; sts[i] != NULL; i++) {
		char year[5];
		itoa(sts[i]->Nam, year, 10);
		html_idxlist_element(html, sts[i]->MSSV, sts[i]->HoTen, year);
	}
	html_idxlist_end(html);
	html_footer(html, "HungryBirds");
	html_close(html);
	delete filename;
}
コード例 #2
0
ファイル: program.cpp プロジェクト: panoti/TH201204-PT-PJGK
void createSVS(STS sts, char *outpath)
{
	char *filename;
	HTML html;

	for (int i = 0; sts[i] != NULL; i++)
	{
		filename = new char[strlen(outpath)+14];
		sprintf(filename, "%s/%s.html", outpath, sts[i]->MSSV);
		html = html_create(filename);
		if (html == NULL) {
			printf("%s -> Khong the tao file '%s.html' duoc!\n", "createSV", sts[i]->MSSV);
			continue;
		}

		createSVPage(html, sts, i);

		html_footer(html, "HungryBirds");
		html_close(html);
		delete filename;
	}
}
コード例 #3
0
ファイル: html.hpp プロジェクト: boostan/CISR-ODE
 ~CHTML()
 {
     html_close();
     close();
 }