2008-12-30 02:05:03 +01:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2008-12-30 02:05:03 +01:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2011-02-24 18:06:12 +01:00
|
|
|
* Copyright (c) 2008-2011, Tomasz Sowa
|
2008-12-30 02:05:03 +01:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-01-23 15:15:30 +01:00
|
|
|
#ifndef headerfile_winix_templates_templates
|
|
|
|
#define headerfile_winix_templates_templates
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
#include <iomanip>
|
2009-01-31 07:53:36 +01:00
|
|
|
#include <set>
|
2009-11-13 21:40:11 +01:00
|
|
|
#include "ezc.h"
|
2010-01-28 16:39:01 +01:00
|
|
|
#include "misc.h"
|
2010-09-29 23:24:34 +02:00
|
|
|
#include "patterncacher.h"
|
2010-06-22 01:53:19 +02:00
|
|
|
#include "indexpatterns.h"
|
2010-11-21 01:19:17 +01:00
|
|
|
#include "locale.h"
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
#include "htmltextstream.h"
|
2011-04-16 10:42:22 +02:00
|
|
|
#include "localefilter.h"
|
2010-08-10 18:12:50 +02:00
|
|
|
#include "core/config.h"
|
2011-01-23 15:15:30 +01:00
|
|
|
#include "core/cur.h"
|
2010-08-10 18:12:50 +02:00
|
|
|
#include "core/system.h"
|
|
|
|
#include "core/sessionmanager.h"
|
2011-04-16 10:42:22 +02:00
|
|
|
#include "core/htmlfilter.h"
|
|
|
|
#include "db/db.h"
|
2010-06-22 01:53:19 +02:00
|
|
|
|
2009-04-21 22:50:55 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
class Functions;
|
|
|
|
|
|
|
|
|
2010-06-30 20:42:50 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
namespace TemplatesFunctions
|
|
|
|
{
|
2009-11-17 00:36:38 +01:00
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
enum Pat
|
|
|
|
{
|
|
|
|
pat_index = 0, // first should be zero
|
2010-01-28 16:39:01 +01:00
|
|
|
pat_err_404,
|
|
|
|
pat_err_per_denied,
|
2010-09-29 23:24:34 +02:00
|
|
|
pat_last // should be last
|
2010-01-28 16:39:01 +01:00
|
|
|
};
|
|
|
|
|
2010-11-25 23:42:24 +01:00
|
|
|
extern IndexPatterns index_patterns; // patterns for main index template
|
|
|
|
extern Patterns patterns; // those patterns from enum Pat
|
|
|
|
extern Patterns patterns_fun; // patterns for winix functions
|
|
|
|
extern PatternCacher pattern_cacher; // patterns for user items (files with an executable bit set)
|
2010-07-04 22:27:14 +02:00
|
|
|
extern Locale locale;
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
extern EzcFun ezc_functions;
|
2010-12-02 02:02:02 +01:00
|
|
|
extern LocaleFilter locale_filter;
|
2011-04-16 10:42:22 +02:00
|
|
|
extern HTMLFilter html_filter;
|
2010-06-30 20:42:50 +02:00
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
extern Db * db;
|
2011-01-23 15:15:30 +01:00
|
|
|
extern Cur * cur;
|
|
|
|
extern Config * config;
|
2010-08-10 18:12:50 +02:00
|
|
|
extern System * system;
|
|
|
|
extern Functions * functions;
|
|
|
|
extern SessionManager * session_manager;
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
2010-02-28 01:08:10 +01:00
|
|
|
/*
|
|
|
|
adduser
|
|
|
|
*/
|
|
|
|
void adduser_last_login(Info & i);
|
|
|
|
void adduser_last_email(Info & i);
|
|
|
|
|
|
|
|
|
2011-08-18 01:09:47 +02:00
|
|
|
/*
|
|
|
|
config
|
|
|
|
*/
|
|
|
|
void config_use_ssl(Info & i);
|
|
|
|
void config_use_ssl_static(Info & i);
|
|
|
|
void config_use_ssl_common(Info & i);
|
|
|
|
void config_url_proto(Info & i);
|
|
|
|
void config_url_ssl_proto(Info & i);
|
|
|
|
void config_base_url(Info & i);
|
|
|
|
void config_base_url_static(Info & i);
|
|
|
|
void config_base_url_common(Info & i);
|
|
|
|
|
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
/*
|
|
|
|
dir
|
|
|
|
*/
|
|
|
|
void dir(Info & i);
|
|
|
|
void dir_without_slash(Info & i);
|
2011-01-05 22:24:11 +01:00
|
|
|
void dir_is_root(Info & i);
|
2010-09-29 23:24:34 +02:00
|
|
|
void dir_parent(Info & i);
|
|
|
|
void dir_parent_without_slash(Info & i);
|
|
|
|
void dir_can_read_exec(Info & i);
|
|
|
|
void dir_can_write(Info & i);
|
|
|
|
void dir_can_remove(Info & i);
|
|
|
|
void dir_can_use_emacs(Info & i);
|
|
|
|
void dir_can_use_mkdir(Info & i);
|
|
|
|
|
|
|
|
void dir_childs_tab(Info & i);
|
|
|
|
void dir_childs_is_parent(Info & i);
|
|
|
|
void dir_childs_tab_url(Info & i);
|
|
|
|
void dir_childs_tab_privileges(Info & i);
|
|
|
|
void dir_childs_tab_user(Info & i);
|
|
|
|
void dir_childs_tab_group(Info & i);
|
|
|
|
|
|
|
|
void dir_tab(Info & i);
|
|
|
|
void dir_tab_url(Info & i);
|
|
|
|
void dir_tab_link(Info & i);
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
void dir_last_link_to(Info &);
|
|
|
|
void dir_last_is_link_redirect(Info & i);
|
2010-09-29 23:24:34 +02:00
|
|
|
void dir_last_subject(Info & i);
|
|
|
|
void dir_last_user(Info & i);
|
|
|
|
void dir_last_url(Info & i);
|
|
|
|
void dir_last_url_is(Info & i);
|
|
|
|
void dir_last_date_creation(Info & i);
|
|
|
|
void dir_last_date_modification(Info & i);
|
2010-10-19 02:31:20 +02:00
|
|
|
void dir_last_date_creation_nice(Info & i);
|
|
|
|
void dir_last_date_modification_nice(Info & i);
|
2010-09-29 23:24:34 +02:00
|
|
|
void dir_last_dates_equal(Info & i);
|
2010-10-19 02:31:20 +02:00
|
|
|
void dir_last_users_different(Info & i);
|
|
|
|
void dir_last_modification_user(Info & i);
|
2010-09-29 23:24:34 +02:00
|
|
|
void dir_last_html_template(Info & i);
|
|
|
|
void dir_last_has_html_template(Info & i);
|
|
|
|
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
/*
|
|
|
|
doc
|
|
|
|
*/
|
|
|
|
void doc_title(Info & i);
|
2011-08-18 01:09:47 +02:00
|
|
|
void doc_proto(Info & i);
|
|
|
|
void doc_proto_static(Info & i);
|
|
|
|
void doc_proto_common(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
void doc_base_url(Info & i);
|
2009-12-30 21:46:12 +01:00
|
|
|
void doc_base_url_static(Info & i);
|
2010-02-22 23:52:09 +01:00
|
|
|
void doc_base_url_common(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
void doc_current_url(Info & i);
|
2011-06-24 22:53:21 +02:00
|
|
|
void doc_css_tab(Info & i);
|
|
|
|
void doc_css_tab_file(Info & i);
|
|
|
|
void doc_css_tab_file_is_global(Info & i);
|
|
|
|
void doc_css_tab_has_next(Info & i);
|
|
|
|
void doc_css_is_empty(Info & i);
|
|
|
|
void doc_css_is_one(Info & i);
|
|
|
|
void doc_css_more_than_one(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
2011-01-26 13:45:38 +01:00
|
|
|
/*
|
|
|
|
filters
|
|
|
|
*/
|
|
|
|
void fil_urlencode(Info & i);
|
|
|
|
void fil_qencode(Info & i);
|
|
|
|
void fil_capitalize(Info & i);
|
|
|
|
void fil_tosmall(Info & i);
|
2011-01-27 15:35:25 +01:00
|
|
|
void fil_firstup(Info & i);
|
2011-01-26 13:45:38 +01:00
|
|
|
|
2011-07-14 01:14:10 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
insert
|
|
|
|
*/
|
|
|
|
void insert_page(Info & i);
|
|
|
|
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
/*
|
|
|
|
item
|
|
|
|
*/
|
2010-01-25 05:52:17 +01:00
|
|
|
void item_is(Info & i); // !! change to is_item lub na item_defined
|
2008-12-30 02:05:03 +01:00
|
|
|
void item_id(Info & i);
|
|
|
|
void item_subject(Info & i);
|
|
|
|
void item_subject_noescape(Info & i);
|
|
|
|
void item_content(Info & i);
|
|
|
|
void item_content_noescape(Info & i);
|
2010-08-10 22:43:38 +02:00
|
|
|
void item_content_type_is(Item & item, Info & i);
|
2010-01-11 15:47:52 +01:00
|
|
|
void item_content_type_is(Info & i);
|
2010-02-13 00:16:13 +01:00
|
|
|
void item_content_is_empty(Info & i);
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
void item_print_content(HtmlTextStream & out, const std::wstring & content, Item::ContentType content_type);
|
2009-06-05 22:29:06 +02:00
|
|
|
void item_print_content(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
void item_privileges(Info & i);
|
2009-10-01 00:31:20 +02:00
|
|
|
void item_dir(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
void item_url(Info & i);
|
2010-02-08 21:02:16 +01:00
|
|
|
void item_url_is(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
void item_link(Info & i);
|
2010-12-10 22:07:01 +01:00
|
|
|
void item_filetype_is_none(Info & i);
|
|
|
|
void item_filetype_is_image(Info & i);
|
2011-01-05 22:24:11 +01:00
|
|
|
void item_has_static_file(Info & i);
|
2010-12-11 23:55:48 +01:00
|
|
|
void item_has_thumb(Info & i);
|
2009-01-14 21:11:12 +01:00
|
|
|
void item_can_read(Info & i);
|
2009-06-05 22:29:06 +02:00
|
|
|
void item_can_write(Info & i);
|
2010-02-11 21:56:52 +01:00
|
|
|
void item_can_remove(Info & i);
|
2009-03-23 00:54:15 +01:00
|
|
|
void item_user(Info & i);
|
2010-06-22 23:09:37 +02:00
|
|
|
void item_modification_user(Info & i);
|
|
|
|
void item_users_different(Info & i);
|
2009-03-23 00:54:15 +01:00
|
|
|
void item_date_creation(Info & i);
|
|
|
|
void item_date_modification(Info & i);
|
2010-02-15 01:31:14 +01:00
|
|
|
void item_date_creation_nice(Info & i);
|
|
|
|
void item_date_modification_nice(Info & i);
|
2009-03-23 00:54:15 +01:00
|
|
|
void item_dates_equal(Info & i);
|
|
|
|
void item_run(Info & i);
|
2009-11-17 00:36:38 +01:00
|
|
|
void item_guest_name(Info & i);
|
2010-08-13 22:04:57 +02:00
|
|
|
void item_html_template(Info & i);
|
|
|
|
void item_has_html_template(Info & i);
|
2011-01-05 22:24:11 +01:00
|
|
|
void item_type_is_dir(Info & i);
|
|
|
|
void item_type_is_file(Info & i);
|
|
|
|
void item_type_is_symlink(Info & i);
|
|
|
|
void item_is_link_to(Info & i);
|
|
|
|
void item_link_to(Info & i);
|
|
|
|
void item_is_link_redirect(Info & i);
|
2011-06-24 22:53:21 +02:00
|
|
|
void item_file_size(Info & i);
|
2011-08-02 02:10:45 +02:00
|
|
|
void item_sort(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
void item_tab(Info & i);
|
2011-08-02 02:10:45 +02:00
|
|
|
void item_tab_index(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
void item_tab_id(Info & i);
|
|
|
|
void item_tab_subject(Info & i);
|
|
|
|
void item_tab_subject_noescape(Info & i);
|
|
|
|
void item_tab_content(Info & i);
|
|
|
|
void item_tab_content_noescape(Info & i);
|
2009-06-05 22:29:06 +02:00
|
|
|
void item_tab_print_content(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
void item_tab_privileges(Info & i);
|
|
|
|
void item_tab_dir(Info & i);
|
|
|
|
void item_tab_url(Info & i);
|
|
|
|
void item_tab_link(Info & i);
|
2011-06-24 22:53:21 +02:00
|
|
|
void item_tab_filetype_is_none(Info & i);
|
|
|
|
void item_tab_filetype_is_image(Info & i);
|
2009-04-21 01:49:28 +02:00
|
|
|
void item_tab_can_read(Info & i);
|
2010-06-30 21:56:32 +02:00
|
|
|
void item_tab_can_write(Info & i);
|
2009-04-21 01:49:28 +02:00
|
|
|
void item_tab_user(Info & i);
|
2010-06-22 23:09:37 +02:00
|
|
|
void item_tab_modification_user(Info & i);
|
|
|
|
void item_tab_users_different(Info & i);
|
2010-02-22 23:52:09 +01:00
|
|
|
void item_tab_group(Info & i);
|
2009-04-21 01:49:28 +02:00
|
|
|
void item_tab_date_creation(Info & i);
|
|
|
|
void item_tab_date_modification(Info & i);
|
2010-02-15 01:31:14 +01:00
|
|
|
void item_tab_date_creation_nice(Info & i);
|
|
|
|
void item_tab_date_modification_nice(Info & i);
|
2009-04-21 01:49:28 +02:00
|
|
|
void item_tab_dates_equal(Info & i);
|
|
|
|
void item_tab_run(Info & i);
|
2010-06-30 21:56:32 +02:00
|
|
|
void item_tab_can_use_emacs(Info & i);
|
2011-01-05 22:24:11 +01:00
|
|
|
void item_tab_has_static_file(Info & i);
|
|
|
|
void item_tab_has_thumb(Info & i);
|
|
|
|
void item_tab_type_is_dir(Info & i);
|
|
|
|
void item_tab_type_is_file(Info & i);
|
|
|
|
void item_tab_type_is_symlink(Info & i);
|
|
|
|
void item_tab_is_link_to(Info & i);
|
|
|
|
void item_tab_link_to(Info & i);
|
|
|
|
void item_tab_is_link_redirect(Info & i);
|
2011-06-24 22:53:21 +02:00
|
|
|
void item_tab_file_size(Info & i);
|
2011-08-02 02:10:45 +02:00
|
|
|
void item_tab_sort(Info & i);
|
2011-06-24 22:53:21 +02:00
|
|
|
void item_tab_has_next(Info & i);
|
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
last
|
2008-12-30 02:05:03 +01:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void last_tab(Info & i);
|
|
|
|
void last_tab_name(Info & i);
|
|
|
|
void last_tab_ip(Info & i);
|
|
|
|
void last_tab_start(Info & i);
|
|
|
|
void last_tab_end(Info & i);
|
2010-08-13 22:04:57 +02:00
|
|
|
|
2009-02-06 14:12:03 +01:00
|
|
|
|
2011-08-18 01:09:47 +02:00
|
|
|
/*
|
|
|
|
login
|
|
|
|
*/
|
|
|
|
void login_path(Info & i);
|
|
|
|
|
|
|
|
|
2010-02-11 21:56:52 +01:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
mount
|
2010-02-11 21:56:52 +01:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void mount_type_is(Info & i);
|
|
|
|
void mount_page_arg_is(Info & i);
|
|
|
|
void mount_has_html_template(Info & i);
|
|
|
|
void mount_first_html_template(Info & i);
|
2011-06-24 22:53:21 +02:00
|
|
|
void mount_css_tab(Info & i);
|
|
|
|
void mount_css_tab_file(Info & i);
|
|
|
|
void mount_css_tab_file_is_global(Info & i);
|
|
|
|
void mount_css_tab_has_next(Info & i);
|
|
|
|
void mount_css_is_empty(Info & i);
|
|
|
|
void mount_css_is_one(Info & i);
|
|
|
|
void mount_css_more_than_one(Info & i);
|
2011-06-21 23:24:49 +02:00
|
|
|
void mount_cur_type(Info & i);
|
|
|
|
void mount_cur_dir(Info & i);
|
|
|
|
void mount_cur_fs(Info & i);
|
|
|
|
void mount_cur_parlist(Info & i);
|
|
|
|
void mount_tab(Info & i);
|
|
|
|
void mount_tab_type(Info & i);
|
|
|
|
void mount_tab_dir(Info & i);
|
|
|
|
void mount_tab_fs(Info & i);
|
|
|
|
void mount_tab_parlist(Info & i);
|
2010-02-11 21:56:52 +01:00
|
|
|
|
2011-06-24 22:53:21 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void ls_ckeditor_funnum_browse(Info & i);
|
|
|
|
|
2010-02-16 19:34:41 +01:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
/*
|
|
|
|
privileges
|
|
|
|
*/
|
|
|
|
void priv_user_tab(Info & i);
|
|
|
|
void priv_user_tab_name(Info & i);
|
|
|
|
void priv_user_tab_isdefault(Info & i);
|
|
|
|
|
|
|
|
void priv_group_tab(Info & i);
|
|
|
|
void priv_group_tab_name(Info & i);
|
|
|
|
void priv_group_tab_isdefault(Info & i);
|
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
void priv_privileges(Info & i);
|
2010-02-16 01:37:00 +01:00
|
|
|
void priv_privileges_for_files(Info & i);
|
|
|
|
void priv_privileges_for_dirs(Info & i);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2010-02-16 19:34:41 +01:00
|
|
|
void priv_show_form_chown(Info & i);
|
|
|
|
void priv_show_form_chmod(Info & i);
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
|
2009-01-31 07:53:36 +01:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
rebus
|
2009-01-31 07:53:36 +01:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void rebus_question(Info & i);
|
2009-01-31 07:53:36 +01:00
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
|
2011-06-19 22:59:58 +02:00
|
|
|
/*
|
|
|
|
slog
|
|
|
|
*/
|
|
|
|
void slog_tab(Info & i);
|
|
|
|
void slog_tab_is_info(Info & i);
|
|
|
|
void slog_tab_is_warning(Info & i);
|
|
|
|
void slog_tab_is_error(Info & i);
|
|
|
|
void slog_tab_print(Info & i);
|
|
|
|
|
|
|
|
|
2010-10-23 16:54:44 +02:00
|
|
|
/*
|
|
|
|
stat
|
|
|
|
*/
|
|
|
|
void stat_item_type_is_file(Info & i);
|
|
|
|
void stat_item_type_is_static_file(Info & i);
|
|
|
|
void stat_item_type_is_dir(Info & i);
|
|
|
|
void stat_item_inode(Info & i);
|
|
|
|
void stat_item_user(Info & i);
|
|
|
|
void stat_item_group(Info & i);
|
|
|
|
void stat_item_privileges(Info & i);
|
|
|
|
void stat_item_date_creation(Info & i);
|
|
|
|
void stat_item_date_modification(Info & i);
|
|
|
|
void stat_item_template(Info & i);
|
|
|
|
void stat_item_is_template_from_mount_point(Info & i);
|
|
|
|
|
|
|
|
|
2009-04-16 03:59:42 +02:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
sys
|
2009-04-16 03:59:42 +02:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void sys_ver_major(Info & i);
|
|
|
|
void sys_ver_minor(Info & i);
|
|
|
|
void sys_ver_revision(Info & i);
|
2011-06-27 23:38:19 +02:00
|
|
|
void sys_plugin_tab(Info & i);
|
|
|
|
void sys_plugin_tab_has_name(Info & i);
|
|
|
|
void sys_plugin_tab_name(Info & i);
|
|
|
|
void sys_user_tab(Info & i);
|
|
|
|
void sys_user_tab_is_current(Info & i);
|
|
|
|
void sys_user_tab_name(Info & i);
|
2009-01-31 07:53:36 +01:00
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
|
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
upload
|
2010-01-25 05:52:17 +01:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void upload_ckeditor_funnum(Info & i);
|
2010-01-25 05:52:17 +01:00
|
|
|
|
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
uptime
|
2009-06-05 22:29:06 +02:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void uptime_more_than_one_day(Info & i);
|
|
|
|
void uptime_days(Info & i);
|
|
|
|
void uptime_hours(Info & i);
|
2009-10-01 00:31:20 +02:00
|
|
|
|
2010-02-11 21:56:52 +01:00
|
|
|
|
2009-11-17 00:36:38 +01:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
user
|
2009-11-17 00:36:38 +01:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void user_name(Info & i);
|
|
|
|
void user_logged(Info & i);
|
|
|
|
void user_super_user(Info & i);
|
|
|
|
void user_is_in_group(Info & i);
|
2010-12-06 02:37:30 +01:00
|
|
|
void user_is_in_all_groups(Info & i);
|
2010-09-29 23:24:34 +02:00
|
|
|
void user_can_use_html(Info & i);
|
|
|
|
void user_can_use_bbcode(Info & i);
|
|
|
|
void user_can_use_raw(Info & i);
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2010-02-19 00:30:22 +01:00
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
template (html templates)
|
2010-02-19 00:30:22 +01:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void template_index(Info & i);
|
|
|
|
void template_tab(Info & i);
|
|
|
|
void template_tab_index(Info & i);
|
|
|
|
void template_tab_isdefault(Info & i);
|
|
|
|
void template_tab_file_name(Info & i);
|
2010-02-19 00:30:22 +01:00
|
|
|
|
|
|
|
|
2010-02-11 21:56:52 +01:00
|
|
|
/*
|
|
|
|
winix
|
|
|
|
*/
|
|
|
|
void winix_cur_time(Info & i);
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
void winix_how_many_sessions(Info & i);
|
2010-02-11 21:56:52 +01:00
|
|
|
void winix_users_logged(Info & i);
|
2010-02-16 19:34:41 +01:00
|
|
|
void winix_function(Info & i);
|
2010-02-11 21:56:52 +01:00
|
|
|
void winix_function_is(Info & i);
|
|
|
|
void winix_function_param_is(Info & i);
|
2011-02-22 05:14:26 +01:00
|
|
|
void winix_function_param_is_not(Info & i);
|
2011-02-11 22:37:28 +01:00
|
|
|
void winix_function_param_value(Info & i);
|
2010-10-11 22:42:49 +02:00
|
|
|
void winix_has_plugin(Info & i);
|
2010-02-13 21:12:15 +01:00
|
|
|
void winix_loadavg_now(Info & i);
|
|
|
|
void winix_loadavg_1(Info & i);
|
|
|
|
void winix_loadavg_5(Info & i);
|
|
|
|
void winix_loadavg_15(Info & i);
|
|
|
|
void winix_req_per_sec_now(Info & i);
|
|
|
|
void winix_req_per_sec_1(Info & i);
|
|
|
|
void winix_req_per_sec_5(Info & i);
|
|
|
|
void winix_req_per_sec_15(Info & i);
|
2010-02-28 01:08:10 +01:00
|
|
|
void winix_err_is(Info & i);
|
|
|
|
void winix_err_code(Info & i);
|
|
|
|
void winix_is_err_in_locales(Info & i);
|
|
|
|
void winix_err_msg_from_locales(Info & i);
|
2010-06-22 01:53:19 +02:00
|
|
|
void winix_show_content_in_full_window(Info & i);
|
2010-11-22 02:12:46 +01:00
|
|
|
void winix_false(Info & i);
|
|
|
|
void winix_true(Info & i);
|
2011-04-26 19:19:08 +02:00
|
|
|
void str(Info & i);
|
|
|
|
void strnc(Info & i);
|
2010-02-11 21:56:52 +01:00
|
|
|
|
2010-08-13 22:04:57 +02:00
|
|
|
|
|
|
|
/*
|
2010-09-29 23:24:34 +02:00
|
|
|
who
|
2010-08-13 22:04:57 +02:00
|
|
|
*/
|
2010-09-29 23:24:34 +02:00
|
|
|
void who_tab(Info & i);
|
|
|
|
void who_tab_lp(Info & i);
|
|
|
|
void who_tab_user(Info & i);
|
|
|
|
void who_tab_time(Info & i);
|
|
|
|
void who_tab_last_time(Info & i);
|
|
|
|
|
2010-08-13 22:04:57 +02:00
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
} // namespace TemplatesFunctions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
class Templates
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2010-01-28 16:39:01 +01:00
|
|
|
Templates();
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
void SetConfig(Config * pconfig);
|
2011-01-23 15:15:30 +01:00
|
|
|
void SetCur(Cur * pcur);
|
2010-08-10 18:12:50 +02:00
|
|
|
void SetDb(Db * pdb);
|
|
|
|
void SetSystem(System * psystem);
|
|
|
|
void SetFunctions(Functions * pfunctions);
|
|
|
|
void SetSessionManager(SessionManager * psession_manager);
|
|
|
|
|
2011-07-15 04:09:02 +02:00
|
|
|
void Init();
|
2010-01-28 16:39:01 +01:00
|
|
|
void ClearPatterns();
|
2011-07-15 04:09:02 +02:00
|
|
|
void RequestEnd();
|
2009-11-16 18:43:23 +01:00
|
|
|
void ReadTemplates();
|
2010-06-22 01:53:19 +02:00
|
|
|
void ReadNewIndexTemplates();
|
2010-08-13 22:04:57 +02:00
|
|
|
void ReadIndexFileNames(bool add_pattern = false);
|
2009-11-16 18:43:23 +01:00
|
|
|
void Generate();
|
2010-01-11 15:47:52 +01:00
|
|
|
void GenerateRunRaw();
|
2011-06-24 22:53:21 +02:00
|
|
|
void Generate(Ezc::Pattern & pattern);
|
2008-12-30 02:05:03 +01:00
|
|
|
|
2010-01-28 16:39:01 +01:00
|
|
|
private:
|
|
|
|
|
2010-11-21 01:19:17 +01:00
|
|
|
void ReadFile(TemplatesFunctions::Pat pat, const wchar_t * file);
|
|
|
|
void ReadFileFun(size_t index, const wchar_t * file);
|
2010-08-13 22:04:57 +02:00
|
|
|
void ReadFunctionsTemplates();
|
|
|
|
void SetLocale();
|
2011-04-16 10:42:22 +02:00
|
|
|
void SetHtmlFilter();
|
2011-02-24 18:06:12 +01:00
|
|
|
void ClearPatterns(TemplatesFunctions::Patterns & patterns, size_t len);
|
2011-07-15 04:09:02 +02:00
|
|
|
void CreateFunctions(); // should be called before reading patterns (patterns will cache ezc functions)
|
2010-02-15 01:31:14 +01:00
|
|
|
|
2011-01-26 13:45:38 +01:00
|
|
|
TemplatesFunctions::EzcGen generator;
|
2010-11-21 01:19:17 +01:00
|
|
|
std::wstring temp;
|
|
|
|
std::wstring fun_file;
|
2008-12-30 02:05:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|