2008-12-30 02:05:03 +01:00
|
|
|
/*
|
|
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2009-04-21 22:50:55 +02:00
|
|
|
* Copyright (c) 2008-2009, Tomasz Sowa
|
2008-12-30 02:05:03 +01:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "templates.h"
|
2009-04-21 22:50:55 +02:00
|
|
|
#include "../core/data.h"
|
|
|
|
#include "../core/request.h"
|
|
|
|
#include "../core/misc.h"
|
2009-11-13 21:40:11 +01:00
|
|
|
#include "../core/plugin.h"
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
namespace TemplatesFunctions
|
|
|
|
{
|
|
|
|
Ezc::Pattern pat_index;
|
|
|
|
Ezc::Pattern pat_fun_cat;
|
|
|
|
Ezc::Pattern pat_fun_ls;
|
|
|
|
Ezc::Pattern pat_fun_emacs;
|
2008-12-31 14:36:46 +01:00
|
|
|
Ezc::Pattern pat_fun_mkdir;
|
2009-01-26 21:49:28 +01:00
|
|
|
Ezc::Pattern pat_fun_default;
|
|
|
|
Ezc::Pattern pat_fun_priv;
|
2008-12-30 02:05:03 +01:00
|
|
|
Ezc::Pattern pat_fun_rm;
|
2009-01-31 07:53:36 +01:00
|
|
|
Ezc::Pattern pat_fun_who;
|
2009-03-23 00:54:15 +01:00
|
|
|
Ezc::Pattern pat_fun_run;
|
2009-04-16 03:59:42 +02:00
|
|
|
Ezc::Pattern pat_fun_last;
|
2009-04-20 00:13:21 +02:00
|
|
|
Ezc::Pattern pat_fun_thread;
|
2009-11-16 18:43:23 +01:00
|
|
|
Ezc::Pattern pat_fun_reload;
|
2009-04-20 00:13:21 +02:00
|
|
|
Ezc::Pattern pat_fun_createthread;
|
2008-12-30 02:05:03 +01:00
|
|
|
Ezc::Pattern pat_err_item_required;
|
|
|
|
Ezc::Pattern pat_err_404;
|
|
|
|
Ezc::Pattern pat_err_per_denied;
|
|
|
|
Ezc::Pattern pat_err_others;
|
2009-03-23 00:54:15 +01:00
|
|
|
Ezc::Pattern pat_item_info;
|
2009-04-21 01:49:28 +02:00
|
|
|
Ezc::Pattern pat_item_tab_info;
|
2009-06-07 04:40:27 +02:00
|
|
|
Ezc::Pattern pat_dir_last_info;
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2009-10-01 00:31:20 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
Ezc::Functions functions;
|
|
|
|
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
PatternCacher pattern_cacher;
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-23 00:54:15 +01:00
|
|
|
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ezc::Pattern * content_for_function()
|
|
|
|
{
|
|
|
|
Ezc::Pattern * p = 0;
|
|
|
|
|
|
|
|
|
|
|
|
if( !request.pfunction )
|
|
|
|
{
|
|
|
|
log << log1 << "Templates: no function" << logend;
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
switch( request.pfunction->code )
|
|
|
|
{
|
2009-01-26 21:49:28 +01:00
|
|
|
case FUN_CAT:
|
2008-12-30 02:05:03 +01:00
|
|
|
p = &pat_fun_cat;
|
|
|
|
break;
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
case FUN_LS:
|
2008-12-30 02:05:03 +01:00
|
|
|
p = &pat_fun_ls;
|
|
|
|
break;
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
case FUN_RM:
|
2008-12-30 02:05:03 +01:00
|
|
|
p = &pat_fun_rm;
|
|
|
|
break;
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
case FUN_EMACS:
|
2008-12-30 02:05:03 +01:00
|
|
|
p = &pat_fun_emacs;
|
|
|
|
break;
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
case FUN_MKDIR:
|
2008-12-31 14:36:46 +01:00
|
|
|
p = &pat_fun_mkdir;
|
|
|
|
break;
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
case FUN_DEFAULT:
|
|
|
|
p = &pat_fun_default;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FUN_PRIV:
|
|
|
|
p = &pat_fun_priv;
|
2008-12-31 19:28:12 +01:00
|
|
|
break;
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
case FUN_RUN:
|
2009-03-23 00:54:15 +01:00
|
|
|
p = &pat_fun_run;
|
2008-12-30 02:05:03 +01:00
|
|
|
break;
|
|
|
|
|
2009-01-31 07:53:36 +01:00
|
|
|
case FUN_WHO:
|
|
|
|
p = &pat_fun_who;
|
|
|
|
break;
|
|
|
|
|
2009-04-16 03:59:42 +02:00
|
|
|
case FUN_LAST:
|
|
|
|
p = &pat_fun_last;
|
|
|
|
break;
|
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
case FUN_THREAD:
|
|
|
|
p = &pat_fun_thread;
|
|
|
|
break;
|
|
|
|
|
2009-11-16 18:43:23 +01:00
|
|
|
case FUN_RELOAD:
|
|
|
|
p = &pat_fun_reload;
|
|
|
|
break;
|
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
case FUN_CREATETHREAD:
|
|
|
|
p = &pat_fun_createthread;
|
|
|
|
break;
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void content(Info & i)
|
|
|
|
{
|
|
|
|
Ezc::Pattern * p = 0;
|
|
|
|
|
|
|
|
switch( request.status )
|
|
|
|
{
|
|
|
|
case Error::ok:
|
2009-12-09 01:42:40 +01:00
|
|
|
case Error::spam:
|
|
|
|
case Error::incorrect_rebus:
|
2008-12-30 02:05:03 +01:00
|
|
|
p = content_for_function();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Error::item_required:
|
|
|
|
p = &pat_err_item_required;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Error::permision_denied:
|
2009-06-05 22:29:06 +02:00
|
|
|
case Error::cant_change_user:
|
|
|
|
case Error::cant_change_group:
|
|
|
|
case Error::cant_change_privileges:
|
2008-12-30 02:05:03 +01:00
|
|
|
p = &pat_err_per_denied;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Error::db_no_item:
|
|
|
|
case Error::no_function:
|
2009-02-06 14:12:03 +01:00
|
|
|
case Error::unknown_param:
|
2008-12-30 02:05:03 +01:00
|
|
|
p = &pat_err_404;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
p = &pat_err_others;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( p )
|
|
|
|
{
|
|
|
|
Ezc::Generator gen(i.out, *p, functions);
|
|
|
|
gen.Generate();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i.out << "<!-- there are not any patterns -->";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace TemplatesFunctions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Templates::CreateFunctions()
|
|
|
|
{
|
|
|
|
using namespace TemplatesFunctions;
|
|
|
|
|
|
|
|
functions.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
sys
|
|
|
|
*/
|
|
|
|
functions.Insert("sys_ver_major", sys_ver_major);
|
|
|
|
functions.Insert("sys_ver_minor", sys_ver_minor);
|
|
|
|
functions.Insert("sys_ver_revision", sys_ver_revision);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
doc
|
|
|
|
*/
|
|
|
|
functions.Insert("doc_language", doc_language);
|
|
|
|
functions.Insert("doc_title", doc_title);
|
|
|
|
functions.Insert("doc_charset", doc_charset);
|
|
|
|
functions.Insert("doc_base_url", doc_base_url);
|
|
|
|
functions.Insert("doc_current_url", doc_current_url);
|
2009-12-09 01:42:40 +01:00
|
|
|
functions.Insert("doc_is_error", doc_is_error);
|
|
|
|
functions.Insert("doc_status", doc_status);
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
/*
|
|
|
|
item
|
|
|
|
*/
|
2009-04-21 01:49:28 +02:00
|
|
|
functions.Insert("item_is", item_is);
|
|
|
|
functions.Insert("item_id", item_id);
|
|
|
|
functions.Insert("item_subject", item_subject);
|
|
|
|
functions.Insert("item_subject_noescape", item_subject_noescape);
|
|
|
|
functions.Insert("item_content", item_content);
|
|
|
|
functions.Insert("item_content_noescape", item_content_noescape);
|
2009-06-05 22:29:06 +02:00
|
|
|
functions.Insert("item_print_content", item_print_content);
|
2009-04-21 01:49:28 +02:00
|
|
|
functions.Insert("item_privileges", item_privileges);
|
|
|
|
functions.Insert("item_dir", item_dir);
|
|
|
|
functions.Insert("item_url", item_url);
|
|
|
|
functions.Insert("item_link", item_link);
|
|
|
|
functions.Insert("item_can_read", item_can_read);
|
2009-06-05 22:29:06 +02:00
|
|
|
functions.Insert("item_can_write", item_can_write);
|
2009-04-21 01:49:28 +02:00
|
|
|
functions.Insert("item_info", item_info);
|
|
|
|
functions.Insert("item_user", item_user);
|
|
|
|
functions.Insert("item_date_creation", item_date_creation);
|
|
|
|
functions.Insert("item_date_modification", item_date_modification);
|
|
|
|
functions.Insert("item_dates_equal", item_dates_equal);
|
|
|
|
functions.Insert("item_run", item_run);
|
2009-11-17 00:36:38 +01:00
|
|
|
functions.Insert("item_guest_name", item_guest_name);
|
2009-04-21 01:49:28 +02:00
|
|
|
|
|
|
|
functions.Insert("item_old_id", item_old_id);
|
|
|
|
functions.Insert("item_old_subject", item_old_subject);
|
|
|
|
functions.Insert("item_old_subject_noescape", item_old_subject_noescape);
|
|
|
|
functions.Insert("item_old_content", item_old_content);
|
|
|
|
functions.Insert("item_old_content_noescape", item_old_content_noescape);
|
|
|
|
functions.Insert("item_old_privileges", item_old_privileges);
|
|
|
|
functions.Insert("item_old_dir", item_old_dir);
|
|
|
|
functions.Insert("item_old_url", item_old_url);
|
|
|
|
functions.Insert("item_old_link", item_old_link);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2009-04-21 01:49:28 +02:00
|
|
|
functions.Insert("item_tab", item_tab);
|
|
|
|
functions.Insert("item_tab_id", item_tab_id);
|
|
|
|
functions.Insert("item_tab_subject", item_tab_subject);
|
|
|
|
functions.Insert("item_tab_subject_noescape", item_tab_subject_noescape);
|
|
|
|
functions.Insert("item_tab_content", item_tab_content);
|
|
|
|
functions.Insert("item_tab_content_noescape", item_tab_content_noescape);
|
2009-06-05 22:29:06 +02:00
|
|
|
functions.Insert("item_tab_print_content", item_tab_print_content);
|
2009-04-21 01:49:28 +02:00
|
|
|
functions.Insert("item_tab_privileges", item_tab_privileges);
|
|
|
|
functions.Insert("item_tab_dir", item_tab_dir);
|
|
|
|
functions.Insert("item_tab_url", item_tab_url);
|
|
|
|
functions.Insert("item_tab_link", item_tab_link);
|
|
|
|
functions.Insert("item_tab_can_read", item_tab_can_read);
|
|
|
|
functions.Insert("item_tab_info", item_tab_info);
|
|
|
|
functions.Insert("item_tab_user", item_tab_user);
|
|
|
|
functions.Insert("item_tab_date_creation", item_tab_date_creation);
|
|
|
|
functions.Insert("item_tab_date_modification", item_tab_date_modification);
|
|
|
|
functions.Insert("item_tab_dates_equal", item_tab_dates_equal);
|
|
|
|
functions.Insert("item_tab_run", item_tab_run);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
dir
|
|
|
|
*/
|
2008-12-31 19:28:12 +01:00
|
|
|
functions.Insert("dir", dir);
|
2009-01-14 21:11:12 +01:00
|
|
|
functions.Insert("dir_can_read_exec", dir_can_read_exec);
|
2009-06-05 22:29:06 +02:00
|
|
|
functions.Insert("dir_can_write", dir_can_write);
|
|
|
|
functions.Insert("dir_can_remove", dir_can_remove);
|
|
|
|
functions.Insert("dir_can_use_emacs", dir_can_use_emacs);
|
|
|
|
functions.Insert("dir_can_use_mkdir", dir_can_use_mkdir);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2008-12-31 19:28:12 +01:00
|
|
|
functions.Insert("dir_childs_tab", dir_childs_tab);
|
|
|
|
functions.Insert("dir_childs_tab_url", dir_childs_tab_url);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2008-12-31 19:28:12 +01:00
|
|
|
functions.Insert("dir_tab", dir_tab);
|
|
|
|
functions.Insert("dir_tab_url", dir_tab_url);
|
|
|
|
functions.Insert("dir_tab_link", dir_tab_link);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2009-06-07 04:40:27 +02:00
|
|
|
functions.Insert("dir_last_default_item_dir", dir_last_default_item_dir);
|
|
|
|
functions.Insert("dir_last_default_item_url", dir_last_default_item_url);
|
|
|
|
functions.Insert("dir_last_subject", dir_last_subject);
|
|
|
|
functions.Insert("dir_last_info", dir_last_info);
|
|
|
|
functions.Insert("dir_last_user", dir_last_user);
|
|
|
|
functions.Insert("dir_last_date_creation", dir_last_date_creation);
|
|
|
|
functions.Insert("dir_last_date_modification", dir_last_date_modification);
|
|
|
|
functions.Insert("dir_last_dates_equal", dir_last_dates_equal);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2009-02-06 14:12:03 +01:00
|
|
|
functions.Insert("dir_old", dir_old);
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
/*
|
|
|
|
user
|
|
|
|
*/
|
|
|
|
functions.Insert("user_name", user_name);
|
|
|
|
functions.Insert("user_logged", user_logged);
|
|
|
|
functions.Insert("user_super_user", user_super_user);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
privileges
|
|
|
|
*/
|
|
|
|
functions.Insert("priv_user_tab", priv_user_tab);
|
|
|
|
functions.Insert("priv_user_tab_name", priv_user_tab_name);
|
|
|
|
functions.Insert("priv_user_tab_isdefault", priv_user_tab_isdefault);
|
|
|
|
|
|
|
|
functions.Insert("priv_group_tab", priv_group_tab);
|
|
|
|
functions.Insert("priv_group_tab_name", priv_group_tab_name);
|
|
|
|
functions.Insert("priv_group_tab_isdefault", priv_group_tab_isdefault);
|
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
functions.Insert("priv_privileges", priv_privileges);
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
done
|
|
|
|
*/
|
2009-12-09 01:42:40 +01:00
|
|
|
functions.Insert("done_is_error", done_is_error);
|
|
|
|
functions.Insert("done_status", done_status);
|
|
|
|
functions.Insert("done_status_no_item", done_status_no_item);
|
|
|
|
functions.Insert("done_status_incorrect_dir", done_status_incorrect_dir);
|
|
|
|
functions.Insert("done_status_incorrect_rebus", done_status_incorrect_rebus);
|
|
|
|
functions.Insert("done_status_spam", done_status_spam);
|
|
|
|
functions.Insert("done_added_item", done_added_item);
|
|
|
|
functions.Insert("done_edited_item", done_edited_item);
|
|
|
|
functions.Insert("done_deleted_item", done_deleted_item);
|
|
|
|
functions.Insert("done_privileged_item", done_privileged_item);
|
|
|
|
functions.Insert("done_loggedout", done_loggedout);
|
|
|
|
functions.Insert("done_added_dir", done_added_dir);
|
|
|
|
functions.Insert("done_deleted_dir", done_deleted_dir);
|
|
|
|
functions.Insert("done_defaulted_dir", done_defaulted_dir);
|
|
|
|
functions.Insert("done_reloaded_templates", done_reloaded_templates);
|
2008-12-31 14:36:46 +01:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
others
|
|
|
|
*/
|
|
|
|
functions.Insert("content", content);
|
|
|
|
|
|
|
|
|
2009-01-31 07:53:36 +01:00
|
|
|
/*
|
|
|
|
who
|
|
|
|
*/
|
2009-04-16 03:59:42 +02:00
|
|
|
functions.Insert("who_tab", who_tab);
|
|
|
|
functions.Insert("who_tab_lp", who_tab_lp);
|
|
|
|
functions.Insert("who_tab_user", who_tab_user);
|
|
|
|
functions.Insert("who_tab_time", who_tab_time);
|
|
|
|
functions.Insert("who_tab_last_time", who_tab_last_time);
|
|
|
|
|
2009-01-31 07:53:36 +01:00
|
|
|
|
2009-04-16 03:59:42 +02:00
|
|
|
/*
|
|
|
|
last
|
|
|
|
*/
|
|
|
|
functions.Insert("last_tab", last_tab);
|
|
|
|
functions.Insert("last_tab_name", last_tab_name);
|
|
|
|
functions.Insert("last_tab_ip", last_tab_ip);
|
|
|
|
functions.Insert("last_tab_start", last_tab_start);
|
|
|
|
functions.Insert("last_tab_end", last_tab_end);
|
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
thread
|
|
|
|
*/
|
2009-06-05 22:29:06 +02:00
|
|
|
functions.Insert("thread_is", thread_is);
|
|
|
|
functions.Insert("thread_tab", thread_tab);
|
|
|
|
functions.Insert("thread_tab_url", thread_tab_url);
|
|
|
|
functions.Insert("thread_tab_subject", thread_tab_subject);
|
|
|
|
functions.Insert("thread_tab_author", thread_tab_author);
|
|
|
|
functions.Insert("thread_tab_answers", thread_tab_answers);
|
|
|
|
functions.Insert("thread_tab_last_item_date_modification", thread_tab_last_item_date_modification);
|
|
|
|
functions.Insert("thread_tab_last_item_user", thread_tab_last_item_user);
|
|
|
|
functions.Insert("thread_can_create", thread_can_create);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
mount
|
|
|
|
*/
|
2009-06-07 04:40:27 +02:00
|
|
|
functions.Insert("mount_param_withheader", mount_param_withheader);
|
|
|
|
functions.Insert("mount_param_withinfo", mount_param_withinfo);
|
|
|
|
functions.Insert("mount_param_thread_with_header", mount_param_thread_with_header);
|
|
|
|
functions.Insert("mount_param_thread_with_info", mount_param_thread_with_info);
|
2009-10-01 00:31:20 +02:00
|
|
|
functions.Insert("mount_is_thread", mount_is_thread);
|
|
|
|
functions.Insert("mount_is_cms", mount_is_cms);
|
2009-04-16 03:59:42 +02:00
|
|
|
|
2009-01-31 07:53:36 +01:00
|
|
|
|
2009-11-17 00:36:38 +01:00
|
|
|
/*
|
|
|
|
rebus
|
|
|
|
*/
|
|
|
|
functions.Insert("rebus_question", rebus_question);
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-14 21:11:12 +01:00
|
|
|
|
2009-11-13 21:40:11 +01:00
|
|
|
plugin.Call(CMSLU_TEMPLATES_CREATEFUNCTIONS, &functions);
|
2008-12-30 02:05:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-16 18:43:23 +01:00
|
|
|
void Templates::ReadTemplates()
|
2008-12-30 02:05:03 +01:00
|
|
|
{
|
|
|
|
using namespace TemplatesFunctions;
|
|
|
|
|
|
|
|
pat_index.Directory(data.templates);
|
|
|
|
pat_index.ParseFile(data.default_index);
|
|
|
|
|
|
|
|
pat_err_404.Directory(data.templates);
|
|
|
|
pat_err_404.ParseFile("err_404.html");
|
|
|
|
|
|
|
|
pat_err_per_denied.Directory(data.templates);
|
|
|
|
pat_err_per_denied.ParseFile("err_per_denied.html");
|
|
|
|
|
|
|
|
pat_fun_cat.Directory(data.templates);
|
|
|
|
pat_fun_cat.ParseFile("fun_cat.html");
|
|
|
|
|
|
|
|
pat_fun_ls.Directory(data.templates);
|
|
|
|
pat_fun_ls.ParseFile("fun_ls.html");
|
|
|
|
|
|
|
|
pat_fun_rm.Directory(data.templates);
|
|
|
|
pat_fun_rm.ParseFile("fun_rm.html");
|
|
|
|
|
|
|
|
pat_err_item_required.Directory(data.templates);
|
|
|
|
pat_err_item_required.ParseFile("err_item_required.html");
|
|
|
|
|
|
|
|
pat_fun_emacs.Directory(data.templates);
|
|
|
|
pat_fun_emacs.ParseFile("fun_emacs.html");
|
|
|
|
|
2008-12-31 14:36:46 +01:00
|
|
|
pat_fun_mkdir.Directory(data.templates);
|
|
|
|
pat_fun_mkdir.ParseFile("fun_mkdir.html");
|
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
pat_fun_default.Directory(data.templates);
|
|
|
|
pat_fun_default.ParseFile("fun_default.html");
|
2008-12-31 19:28:12 +01:00
|
|
|
|
2009-01-26 21:49:28 +01:00
|
|
|
pat_fun_priv.Directory(data.templates);
|
|
|
|
pat_fun_priv.ParseFile("fun_priv.html");
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
pat_err_others.Directory(data.templates);
|
|
|
|
pat_err_others.ParseFile("err_others.html");
|
|
|
|
|
2009-01-31 07:53:36 +01:00
|
|
|
pat_fun_who.Directory(data.templates);
|
2009-02-06 14:12:03 +01:00
|
|
|
pat_fun_who.ParseFile("fun_who.html");
|
2009-01-31 07:53:36 +01:00
|
|
|
|
2009-03-23 00:54:15 +01:00
|
|
|
pat_fun_run.Directory(data.templates);
|
|
|
|
pat_fun_run.ParseFile("fun_run.html");
|
|
|
|
|
2009-04-16 03:59:42 +02:00
|
|
|
pat_fun_last.Directory(data.templates);
|
|
|
|
pat_fun_last.ParseFile("fun_last.html");
|
|
|
|
|
2009-03-23 00:54:15 +01:00
|
|
|
pat_item_info.Directory(data.templates);
|
|
|
|
pat_item_info.ParseFile("item_info.html");
|
|
|
|
|
2009-04-21 01:49:28 +02:00
|
|
|
pat_item_tab_info.Directory(data.templates);
|
|
|
|
pat_item_tab_info.ParseFile("item_tab_info.html");
|
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
pat_fun_thread.Directory(data.templates);
|
|
|
|
pat_fun_thread.ParseFile("fun_thread.html");
|
|
|
|
|
|
|
|
pat_fun_createthread.Directory(data.templates);
|
|
|
|
pat_fun_createthread.ParseFile("fun_createthread.html");
|
|
|
|
|
2009-06-07 04:40:27 +02:00
|
|
|
pat_dir_last_info.Directory(data.templates);
|
|
|
|
pat_dir_last_info.ParseFile("dir_last_info.html");
|
|
|
|
|
2009-11-16 18:43:23 +01:00
|
|
|
pat_fun_reload.Directory(data.templates);
|
|
|
|
pat_fun_reload.ParseFile("fun_reload.html");
|
2009-10-01 00:31:20 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Templates::Generate()
|
|
|
|
{
|
|
|
|
using namespace TemplatesFunctions;
|
|
|
|
|
|
|
|
|
|
|
|
Ezc::Generator generator(request.page, pat_index, functions);
|
|
|
|
|
|
|
|
generator.Generate();
|
|
|
|
}
|
|
|
|
|
2009-10-01 00:31:20 +02:00
|
|
|
|
|
|
|
|