formdir = $(datadir)/$(PACKAGE)/form
imagesdir = $(datadir)/$(PACKAGE)/images
-AM_CPPFLAGS = $(CONCORSIFE_CFLAGS) \
+AM_CPPFLAGS = $(ZAKJUKEBOX_CFLAGS) \
-DCONFIGDIR=\""$(configdir)"\" \
-DCTPLDIR=\""$(ctpldir)"\" \
-DFORMDIR=\""$(formdir)"\" \
bin_PROGRAMS = zakjukebox
zakjukebox_SOURCES = \
- commons.c \
+ commons.h \
index.c \
index.h \
main.c
void
index_index (GMatchInfo *minfo, gpointer user_data)
{
- CtplEnviron *env;
+ /* CtplEnviron *env; */
gchar *filename;
- gchar *contente;
+ gchar *content;
Commons *commons = (Commons *)user_data;
- env = ctpl_environ_new ();
+ /* env = ctpl_environ_new (); */
filename = g_build_filename (commons->ctpldir, "index_index.ctpl", NULL);
/* content = solipa_ctpl_get_filled (commons->solipa_ctpl, filename, env); */
g_free (filename);
- env = ctpl_environ_new ();
- ctpl_environ_push_string (env, "head", "");
- ctpl_environ_push_string (env, "body_tag", "");
- ctpl_environ_push_string (env, "body", content);
+ /* env = ctpl_environ_new (); */
+ /* ctpl_environ_push_string (env, "head", ""); */
+ /* ctpl_environ_push_string (env, "body_tag", ""); */
+ /* ctpl_environ_push_string (env, "body", content); */
filename = g_build_filename (commons->ctpldir, "template.ctpl", NULL);
/* g_string_printf (commons->out, "%s", */
commons->header = g_string_new ("");
commons->out = g_string_new ("");
+ commons->zcgi_session = zak_cgi_session_new (commons->zcgi_main, "/zakjukebox", NULL);
+
/* Routing */
zcgi_url = zak_cgi_url_new (commons->zcgi_main);
if (g_strcmp0 (commons->header->str, "") == 0)
{
g_string_printf (commons->header,
- "%s\n%s",
- ZAK_CGI_STANDARD_HEADER_HTML,
- zak_cgi_session_get_header (commons->zcgi_session));
+ "%s\n%s",
+ ZAK_CGI_STANDARD_HEADER_HTML,
+ zak_cgi_session_get_header (commons->zcgi_session));
}
zak_cgi_main_out_not_null_term (commons->header->str, commons->out->str, commons->out->len);