Пример #1
0
void quickedit_event_form(struct event *x)
{
  printf("<form method='post' action='?action=quickedit'>");
  printf("<tr><td>");
  form_input(stdout, "summary", NULL, "text", "summary", x->summary);
  printf("</td><td>");
  form_input(stdout, "location", NULL, "text", "location", x->location);
  printf("</td><td>");
  form_input(stdout, "geo", NULL, "text", "geo", x->geo);
  printf("</td><td>");
  form_input(stdout, "from", NULL, "date", "from", x->from);
  printf("</td><td>");
  form_input(stdout, "to", NULL, "date", "to", x->to);
  printf("</td><td>");
  form_input(stdout, "start", NULL, "time", "start", x->start);
  printf("</td><td>");
  form_input(stdout, "end", NULL, "time", "end", x->end);
  printf("</td><td>");
  form_input(stdout, "byday", NULL, "text", "byday", x->byday);
  printf("</td><td>");
  form_input(stdout, "exdate", NULL, "text", "exdate", x->exdate);
  printf("</td><td>");
  printf("<div><input type='submit' value='Add Event'></div>");
  printf("</td></tr>");
  printf("</form>");
}
Пример #2
0
void edit_event_form(struct event *x)
{
  printf("<form method='post'>");
  form_input(stdout, "uid", NULL, "hidden", "uid", x->uid);
  form_input(stdout, "summary", "Summary", "text", "summary", x->summary);
  form_input(stdout, "location", "Location", "text", "location", x->location);
  form_input(stdout, "geo", "Geo", "text", "geo", x->geo);
  form_input(stdout, "from", "From", "date", "from", x->from);
  form_input(stdout, "to", "To", "date", "to", x->to);
  form_input(stdout, "start", "Start", "time", "start", x->start);
  form_input(stdout, "end", "End", "time", "end", x->end);
  form_input(stdout, "byday", "Days", "text", "byday", x->byday);
  form_input(stdout, "exdate", "Exdate", "text", "exdate", x->exdate);
  printf("<div><input type='submit'></div>");
  printf("</form>");
}
Пример #3
0
int main()
{
	char l[80] = "ex.txt";
	char t[80] = "ex1.txt";
	char output[80] = "output.txt";
	list ls,lt,u;
	form_list(l,&ls);
	form_list(t,&lt);
	summ_lists(&ls,&lt,&u);
	std::string out = form_input(&u);
    	std::ofstream f_output(output);
    	f_output << out;
    	f_output.close();
	return 0;
}