/**
* zak_cgi_tag_img:
- * @name:
* @id:
*
* Returns:
/**
* zak_cgi_tag_text:
- * @name:
* @id:
*
* Returns:
/**
* zak_cgi_tag_file:
- * @name:
* @id:
*
* Returns:
return zak_cgi_tag_tag_attrs ("input", id, ar);
}
+
+/**
+ * zak_cgi_tag_submit:
+ * @id:
+ *
+ * Returns:
+ */
+gchar
+*zak_cgi_tag_submit (const gchar *id,
+ ...)
+{
+ GPtrArray *ar;
+ va_list ap;
+
+ va_start (ap, id);
+
+ ar = zak_cgi_tag_valist_to_gptrarray (ap);
+ g_ptr_array_add (ar, "type");
+ g_ptr_array_add (ar, "submit");
+
+ return zak_cgi_tag_tag_attrs ("input", id, ar);
+}
int
main (int argc, char *argv[])
{
- g_message ("%s", zak_cgi_tag_tag ("input", "text",
- "type", "textarea",
+ GString *str;
+
+ str = g_string_new ("");
+
+ g_string_append_printf (str, "%s<br/>\n", zak_cgi_tag_tag ("input", "text",
+ "type", "text",
"name", "myname",
+ "value", "the content of the text input",
+ NULL));
+
+ g_string_append_printf (str, "%s<br/>\n", zak_cgi_tag_tag ("textarea", "textarea",
"content", "the content of the text area",
NULL));
- g_message ("%s", zak_cgi_tag_img ("theimage", "src", "pippo.png", NULL));
+ g_string_append_printf (str, "%s<br/>\n", zak_cgi_tag_img ("theimage", "src", "pippo.png", NULL));
+
+ g_string_append_printf (str, "%s<br/>\n", zak_cgi_tag_text ("thetext", NULL));
+
+ g_string_append_printf (str, "%s<br/>\n", zak_cgi_tag_submit ("submit", NULL));
- g_message ("%s", zak_cgi_tag_text ("thetext", NULL));
+ zak_cgi_main_out (NULL, str->str);
return 0;
}