changed: rename cmslu to winix

changed: html templates are a part of winix now
         and the user can provide special html templates for its site
added:   locales
added:   html templates are using HtmlFilter now (locales)
changed: now we have html templates for each language



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@560 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2010-01-28 15:39:01 +00:00
parent 5dac8af300
commit 09d427b4ba
65 changed files with 1949 additions and 848 deletions

View File

@ -9,19 +9,19 @@ export CXXFLAGS
export CXXFLAGSMAIN export CXXFLAGSMAIN
all: cmslu all: winix
cmslu: FORCE winix: FORCE
@cd core ; $(MAKE) -e @cd core ; $(MAKE) -e
@cd content ; $(MAKE) -e @cd content ; $(MAKE) -e
@cd confparser ; $(MAKE) -e @cd confparser ; $(MAKE) -e
@cd templates ; $(MAKE) -e @cd templates ; $(MAKE) -e
@cd templatesnotify ; $(MAKE) -e @cd templatesnotify ; $(MAKE) -e
@cd ../ezc/src ; $(MAKE) -e @cd ../ezc/src ; $(MAKE) -e
$(CXX) -shared -o cmslu.so $(CXXFLAGS) core/*.o content/*.o templates/*.o templatesnotify/*.o confparser/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz $(CXX) -shared -o winix.so $(CXXFLAGS) core/*.o content/*.o templates/*.o templatesnotify/*.o confparser/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz
@cd main ; $(MAKE) -e @cd main ; $(MAKE) -e
# use the full path with cmslu.so # use the full path with winix.so
$(CXX) -o cmslu $(CXXFLAGSMAIN) main/*.o /home/tomek/roboczy/cmslu/cmslu.so $(CXX) -o winix $(CXXFLAGSMAIN) main/*.o /home/tomek/roboczy/winix/winix.so
clean: clean:
@ -32,8 +32,8 @@ clean:
@cd templatesnotify ; $(MAKE) -e clean @cd templatesnotify ; $(MAKE) -e clean
@cd ../ezc/src ; $(MAKE) -e clean @cd ../ezc/src ; $(MAKE) -e clean
@cd main ; $(MAKE) -e clean @cd main ; $(MAKE) -e clean
rm -f cmslu.so rm -f winix.so
rm -f cmslu rm -f winix
FORCE: FORCE:
@ -50,7 +50,7 @@ depend:
#install: all #install: all
# mkdir -p bin # mkdir -p bin
# rm -f bin/cmslu.so # rm -f bin/winix.so
# rm -f bin/cmslu # rm -f bin/winix
# cp cmslu.so bin/ # cp winix.so bin/
# cp cmslu bin/ # cp winix bin/

View File

@ -19,13 +19,15 @@ ConfParser::ConfParser()
ConfParser::Status ConfParser::Parse(const char * file_name) ConfParser::Status ConfParser::Parse(const char * file_name)
{ {
line = 1;
table.clear();
file.clear();
file.open( file_name ); file.open( file_name );
if( !file ) if( !file )
return cant_open_file; return cant_open_file;
line = 1;
table.clear();
ReadChar(); ReadChar();
status = ParseFile(); status = ParseFile();
@ -50,7 +52,8 @@ ConfParser::Status ConfParser::ParseFile()
if( !ReadValue() ) if( !ReadValue() )
return syntax_error; return syntax_error;
table.insert( std::make_pair(variable, value) ); //table.insert( std::make_pair(variable, value) );
table[variable] = value;
} }
if( lastc == commentary ) if( lastc == commentary )
@ -81,7 +84,8 @@ return false;
bool ConfParser::IsValueSimpleChar(int c) bool ConfParser::IsValueSimpleChar(int c)
{ {
if( c==-1 || c=='\n' || IsWhite(c) || c==commentary ) //if( c==-1 || c=='\n' || IsWhite(c) || c==commentary )
if( c==-1 || c=='\n' || c==commentary )
return false; return false;
return true; return true;
@ -159,6 +163,7 @@ bool ConfParser::ReadValueSimple()
ReadChar(); ReadChar();
} }
Trim(value);
SkipWhite(); SkipWhite();
return true; return true;
@ -202,7 +207,34 @@ void ConfParser::SkipLine()
void ConfParser::Trim(std::string & s)
{
std::string::size_type i;
if( s.empty() )
return;
// looking for white characters at the end
for(i=s.size()-1 ; i>0 && IsWhite(s[i]) ; --i);
if( i==0 && IsWhite(s[i]) )
{
// the whole string has white characters
s.clear();
return;
}
// deleting white characters at the end
if( i != s.size() - 1 )
s.erase(i+1, std::string::npos);
// looking for white characters at the beginning
for(i=0 ; i<s.size() && IsWhite(s[i]) ; ++i);
// deleting white characters at the beginning
if( i != 0 )
s.erase(0, i);
}

View File

@ -66,7 +66,7 @@ private:
bool IsWhite(int c); bool IsWhite(int c);
void SkipWhite(); void SkipWhite();
void SkipLine(); void SkipLine();
void Trim(std::string & s);
}; };

View File

@ -1,7 +1,9 @@
# DO NOT DELETE # DO NOT DELETE
cat.o: content.h ../core/item.h ../templates/templates.h cat.o: content.h ../core/item.h ../templates/templates.h
cat.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h cat.o: ../templates/patterncacher.h ../templates/misc.h
cat.o: ../templates/localefilter.h ../core/locale.h
cat.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
cat.o: ../core/done.h ../core/request.h ../core/requesttypes.h cat.o: ../core/done.h ../core/request.h ../core/requesttypes.h
cat.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h cat.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
cat.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h cat.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -9,7 +11,9 @@ cat.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
cat.o: ../core/acceptbaseparser.h ../core/htmlfilter.h cat.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
cat.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h cat.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h
content.o: content.h ../core/item.h ../templates/templates.h content.o: content.h ../core/item.h ../templates/templates.h
content.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h content.o: ../templates/patterncacher.h ../templates/misc.h
content.o: ../templates/localefilter.h ../core/locale.h
content.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
content.o: ../core/done.h ../core/request.h ../core/requesttypes.h content.o: ../core/done.h ../core/request.h ../core/requesttypes.h
content.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h content.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
content.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h content.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -20,38 +24,42 @@ content.o: ../core/db.h ../core/group.h ../core/dircontainer.h
content.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h content.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h
content.o: ../core/users.h ../core/groups.h ../core/functions.h content.o: ../core/users.h ../core/groups.h ../core/functions.h
content.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h content.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
content.o: ../core/misc.h ../core/plugin.h ../core/request.h ../core/data.h content.o: ../core/locale.h ../core/misc.h ../core/plugin.h ../core/request.h
content.o: ../core/pluginmsg.h content.o: ../core/data.h ../core/pluginmsg.h
createthread.o: content.h ../core/item.h ../templates/templates.h createthread.o: content.h ../core/item.h ../templates/templates.h
createthread.o: ../templates/patterncacher.h ../core/thread.h createthread.o: ../templates/patterncacher.h ../templates/misc.h
createthread.o: ../core/ticket.h ../core/done.h ../core/request.h createthread.o: ../templates/localefilter.h ../core/locale.h
createthread.o: ../core/requesttypes.h ../core/session.h ../core/done.h createthread.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
createthread.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h createthread.o: ../core/done.h ../core/request.h ../core/requesttypes.h
createthread.o: ../core/rebus.h ../core/function.h ../core/thread.h createthread.o: ../core/session.h ../core/done.h ../core/item.h
createthread.o: ../core/compress.h ../core/acceptencodingparser.h createthread.o: ../core/error.h ../core/log.h ../core/user.h ../core/rebus.h
createthread.o: ../core/acceptbaseparser.h ../core/htmlfilter.h createthread.o: ../core/function.h ../core/thread.h ../core/compress.h
createthread.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h createthread.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
createthread.o: ../core/db.h ../core/group.h ../core/dircontainer.h createthread.o: ../core/htmlfilter.h ../core/postmultiparser.h
createthread.o: ../core/ugcontainer.h ../core/mount.h ../core/data.h createthread.o: ../core/ticket.h ../core/error.h ../core/db.h ../core/group.h
createthread.o: ../core/dirs.h ../core/users.h ../core/groups.h createthread.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/mount.h
createthread.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h createthread.o: ../core/data.h ../core/dirs.h ../core/users.h
createthread.o: ../core/mount.h createthread.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
createthread.o: ../core/mounts.h ../core/mount.h ../core/locale.h
createticket.o: content.h ../core/item.h ../templates/templates.h createticket.o: content.h ../core/item.h ../templates/templates.h
createticket.o: ../templates/patterncacher.h ../core/thread.h createticket.o: ../templates/patterncacher.h ../templates/misc.h
createticket.o: ../core/ticket.h ../core/done.h ../core/request.h createticket.o: ../templates/localefilter.h ../core/locale.h
createticket.o: ../core/requesttypes.h ../core/session.h ../core/done.h createticket.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
createticket.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h createticket.o: ../core/done.h ../core/request.h ../core/requesttypes.h
createticket.o: ../core/rebus.h ../core/function.h ../core/thread.h createticket.o: ../core/session.h ../core/done.h ../core/item.h
createticket.o: ../core/compress.h ../core/acceptencodingparser.h createticket.o: ../core/error.h ../core/log.h ../core/user.h ../core/rebus.h
createticket.o: ../core/acceptbaseparser.h ../core/htmlfilter.h createticket.o: ../core/function.h ../core/thread.h ../core/compress.h
createticket.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h createticket.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
createticket.o: ../core/db.h ../core/group.h ../core/dircontainer.h createticket.o: ../core/htmlfilter.h ../core/postmultiparser.h
createticket.o: ../core/ugcontainer.h ../core/mount.h ../core/data.h createticket.o: ../core/ticket.h ../core/error.h ../core/db.h ../core/group.h
createticket.o: ../core/dirs.h ../core/users.h ../core/groups.h createticket.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/mount.h
createticket.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h createticket.o: ../core/data.h ../core/dirs.h ../core/users.h
createticket.o: ../core/mount.h createticket.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
createticket.o: ../core/mounts.h ../core/mount.h ../core/locale.h
default.o: content.h ../core/item.h ../templates/templates.h default.o: content.h ../core/item.h ../templates/templates.h
default.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h default.o: ../templates/patterncacher.h ../templates/misc.h
default.o: ../templates/localefilter.h ../core/locale.h
default.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
default.o: ../core/done.h ../core/request.h ../core/requesttypes.h default.o: ../core/done.h ../core/request.h ../core/requesttypes.h
default.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h default.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
default.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h default.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -62,8 +70,11 @@ default.o: ../core/db.h ../core/group.h ../core/dircontainer.h
default.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h default.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h
default.o: ../core/users.h ../core/groups.h ../core/functions.h default.o: ../core/users.h ../core/groups.h ../core/functions.h
default.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h default.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
default.o: ../core/locale.h
editticket.o: content.h ../core/item.h ../templates/templates.h editticket.o: content.h ../core/item.h ../templates/templates.h
editticket.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h editticket.o: ../templates/patterncacher.h ../templates/misc.h
editticket.o: ../templates/localefilter.h ../core/locale.h
editticket.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
editticket.o: ../core/done.h ../core/request.h ../core/requesttypes.h editticket.o: ../core/done.h ../core/request.h ../core/requesttypes.h
editticket.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h editticket.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
editticket.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h editticket.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -74,9 +85,11 @@ editticket.o: ../core/error.h ../core/db.h ../core/group.h
editticket.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/mount.h editticket.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/mount.h
editticket.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h editticket.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h
editticket.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h editticket.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
editticket.o: ../core/mount.h editticket.o: ../core/mount.h ../core/locale.h
emacs.o: content.h ../core/item.h ../templates/templates.h emacs.o: content.h ../core/item.h ../templates/templates.h
emacs.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h emacs.o: ../templates/patterncacher.h ../templates/misc.h
emacs.o: ../templates/localefilter.h ../core/locale.h
emacs.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
emacs.o: ../core/done.h ../core/request.h ../core/requesttypes.h emacs.o: ../core/done.h ../core/request.h ../core/requesttypes.h
emacs.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h emacs.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
emacs.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h emacs.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -86,13 +99,18 @@ emacs.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h
emacs.o: ../core/db.h ../core/group.h ../core/dircontainer.h emacs.o: ../core/db.h ../core/group.h ../core/dircontainer.h
emacs.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h emacs.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
emacs.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h emacs.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
emacs.o: ../core/mounts.h ../core/mount.h ../core/notify.h emacs.o: ../core/mounts.h ../core/mount.h ../core/locale.h ../core/notify.h
emacs.o: ../templatesnotify/templatesnotify.h ../core/mount.h ../core/misc.h emacs.o: ../templatesnotify/templatesnotify.h ../core/mount.h
emacs.o: ../templates/misc.h ../core/misc.h
last.o: content.h ../core/item.h ../templates/templates.h last.o: content.h ../core/item.h ../templates/templates.h
last.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h last.o: ../templates/patterncacher.h ../templates/misc.h
last.o: ../templates/localefilter.h ../core/locale.h
last.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
last.o: ../core/done.h last.o: ../core/done.h
login.o: content.h ../core/item.h ../templates/templates.h login.o: content.h ../core/item.h ../templates/templates.h
login.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h login.o: ../templates/patterncacher.h ../templates/misc.h
login.o: ../templates/localefilter.h ../core/locale.h
login.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
login.o: ../core/done.h ../core/request.h ../core/requesttypes.h login.o: ../core/done.h ../core/request.h ../core/requesttypes.h
login.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h login.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
login.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h login.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -102,9 +120,11 @@ login.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h
login.o: ../core/db.h ../core/group.h ../core/dircontainer.h login.o: ../core/db.h ../core/group.h ../core/dircontainer.h
login.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h login.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
login.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h login.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
login.o: ../core/mounts.h ../core/mount.h login.o: ../core/mounts.h ../core/mount.h ../core/locale.h
logout.o: content.h ../core/item.h ../templates/templates.h logout.o: content.h ../core/item.h ../templates/templates.h
logout.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h logout.o: ../templates/patterncacher.h ../templates/misc.h
logout.o: ../templates/localefilter.h ../core/locale.h
logout.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
logout.o: ../core/done.h ../core/request.h ../core/requesttypes.h logout.o: ../core/done.h ../core/request.h ../core/requesttypes.h
logout.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h logout.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
logout.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h logout.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -114,18 +134,22 @@ logout.o: ../core/postmultiparser.h ../core/ticket.h ../core/data.h
logout.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h logout.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h
logout.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h logout.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h
logout.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h logout.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
logout.o: ../core/mount.h logout.o: ../core/mount.h ../core/locale.h
ls.o: content.h ../core/item.h ../templates/templates.h ls.o: content.h ../core/item.h ../templates/templates.h
ls.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h ls.o: ../templates/patterncacher.h ../templates/misc.h
ls.o: ../core/done.h ../core/request.h ../core/requesttypes.h ls.o: ../templates/localefilter.h ../core/locale.h ../confparser/confparser.h
ls.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h ls.o: ../core/thread.h ../core/ticket.h ../core/done.h ../core/request.h
ls.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h ls.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
ls.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h ls.o: ../core/error.h ../core/log.h ../core/user.h ../core/rebus.h
ls.o: ../core/acceptbaseparser.h ../core/htmlfilter.h ls.o: ../core/function.h ../core/thread.h ../core/compress.h
ls.o: ../core/postmultiparser.h ../core/ticket.h ../core/db.h ../core/group.h ls.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
ls.o: ../core/dircontainer.h ../core/ugcontainer.h ls.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
ls.o: ../core/db.h ../core/group.h ../core/dircontainer.h
ls.o: ../core/ugcontainer.h
misc_item.o: content.h ../core/item.h ../templates/templates.h misc_item.o: content.h ../core/item.h ../templates/templates.h
misc_item.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h misc_item.o: ../templates/patterncacher.h ../templates/misc.h
misc_item.o: ../templates/localefilter.h ../core/locale.h
misc_item.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
misc_item.o: ../core/done.h ../core/request.h ../core/requesttypes.h misc_item.o: ../core/done.h ../core/request.h ../core/requesttypes.h
misc_item.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h misc_item.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
misc_item.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h misc_item.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -135,7 +159,9 @@ misc_item.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
misc_item.o: ../core/misc.h ../core/db.h ../core/group.h misc_item.o: ../core/misc.h ../core/db.h ../core/group.h
misc_item.o: ../core/dircontainer.h ../core/ugcontainer.h misc_item.o: ../core/dircontainer.h ../core/ugcontainer.h
misc_specialfile.o: content.h ../core/item.h ../templates/templates.h misc_specialfile.o: content.h ../core/item.h ../templates/templates.h
misc_specialfile.o: ../templates/patterncacher.h ../core/thread.h misc_specialfile.o: ../templates/patterncacher.h ../templates/misc.h
misc_specialfile.o: ../templates/localefilter.h ../core/locale.h
misc_specialfile.o: ../confparser/confparser.h ../core/thread.h
misc_specialfile.o: ../core/ticket.h ../core/done.h ../core/request.h misc_specialfile.o: ../core/ticket.h ../core/done.h ../core/request.h
misc_specialfile.o: ../core/requesttypes.h ../core/session.h ../core/done.h misc_specialfile.o: ../core/requesttypes.h ../core/session.h ../core/done.h
misc_specialfile.o: ../core/item.h ../core/error.h ../core/log.h misc_specialfile.o: ../core/item.h ../core/error.h ../core/log.h
@ -147,9 +173,11 @@ misc_specialfile.o: ../core/ticket.h ../core/data.h ../core/dirs.h
misc_specialfile.o: ../core/dircontainer.h ../core/users.h misc_specialfile.o: ../core/dircontainer.h ../core/users.h
misc_specialfile.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h misc_specialfile.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h
misc_specialfile.o: ../core/functions.h ../core/lastcontainer.h misc_specialfile.o: ../core/functions.h ../core/lastcontainer.h
misc_specialfile.o: ../core/mounts.h ../core/mount.h misc_specialfile.o: ../core/mounts.h ../core/mount.h ../core/locale.h
mkdir.o: content.h ../core/item.h ../templates/templates.h mkdir.o: content.h ../core/item.h ../templates/templates.h
mkdir.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h mkdir.o: ../templates/patterncacher.h ../templates/misc.h
mkdir.o: ../templates/localefilter.h ../core/locale.h
mkdir.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
mkdir.o: ../core/done.h ../core/request.h ../core/requesttypes.h mkdir.o: ../core/done.h ../core/request.h ../core/requesttypes.h
mkdir.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h mkdir.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
mkdir.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h mkdir.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -159,10 +187,13 @@ mkdir.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h
mkdir.o: ../core/db.h ../core/group.h ../core/dircontainer.h mkdir.o: ../core/db.h ../core/group.h ../core/dircontainer.h
mkdir.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h mkdir.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
mkdir.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h mkdir.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
mkdir.o: ../core/mounts.h ../core/mount.h ../core/notify.h mkdir.o: ../core/mounts.h ../core/mount.h ../core/locale.h ../core/notify.h
mkdir.o: ../templatesnotify/templatesnotify.h ../core/mount.h mkdir.o: ../templatesnotify/templatesnotify.h ../core/mount.h
mkdir.o: ../templates/misc.h
node.o: content.h ../core/item.h ../templates/templates.h node.o: content.h ../core/item.h ../templates/templates.h
node.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h node.o: ../templates/patterncacher.h ../templates/misc.h
node.o: ../templates/localefilter.h ../core/locale.h
node.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
node.o: ../core/done.h ../core/request.h ../core/requesttypes.h node.o: ../core/done.h ../core/request.h ../core/requesttypes.h
node.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h node.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
node.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h node.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -170,7 +201,9 @@ node.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
node.o: ../core/acceptbaseparser.h ../core/htmlfilter.h node.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
node.o: ../core/postmultiparser.h ../core/ticket.h node.o: ../core/postmultiparser.h ../core/ticket.h
priv.o: content.h ../core/item.h ../templates/templates.h priv.o: content.h ../core/item.h ../templates/templates.h
priv.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h priv.o: ../templates/patterncacher.h ../templates/misc.h
priv.o: ../templates/localefilter.h ../core/locale.h
priv.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
priv.o: ../core/done.h ../core/request.h ../core/requesttypes.h priv.o: ../core/done.h ../core/request.h ../core/requesttypes.h
priv.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h priv.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
priv.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h priv.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -180,29 +213,36 @@ priv.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h
priv.o: ../core/db.h ../core/group.h ../core/dircontainer.h priv.o: ../core/db.h ../core/group.h ../core/dircontainer.h
priv.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h priv.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
priv.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h priv.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
priv.o: ../core/mounts.h ../core/mount.h priv.o: ../core/mounts.h ../core/mount.h ../core/locale.h
reload.o: content.h ../core/item.h ../templates/templates.h reload.o: content.h ../core/item.h ../templates/templates.h
reload.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h reload.o: ../templates/patterncacher.h ../templates/misc.h
reload.o: ../templates/localefilter.h ../core/locale.h
reload.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
reload.o: ../core/done.h ../core/request.h ../core/requesttypes.h reload.o: ../core/done.h ../core/request.h ../core/requesttypes.h
reload.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h reload.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
reload.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h reload.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
reload.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h reload.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
reload.o: ../core/acceptbaseparser.h ../core/htmlfilter.h reload.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
reload.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h reload.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h
reload.o: ../core/notify.h ../templatesnotify/templatesnotify.h
reload.o: ../core/mount.h ../templates/misc.h
rm.o: content.h ../core/item.h ../templates/templates.h rm.o: content.h ../core/item.h ../templates/templates.h
rm.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h rm.o: ../templates/patterncacher.h ../templates/misc.h
rm.o: ../core/done.h ../core/request.h ../core/requesttypes.h rm.o: ../templates/localefilter.h ../core/locale.h ../confparser/confparser.h
rm.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h rm.o: ../core/thread.h ../core/ticket.h ../core/done.h ../core/request.h
rm.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h rm.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
rm.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h rm.o: ../core/error.h ../core/log.h ../core/user.h ../core/rebus.h
rm.o: ../core/acceptbaseparser.h ../core/htmlfilter.h rm.o: ../core/function.h ../core/thread.h ../core/compress.h
rm.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h ../core/db.h rm.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
rm.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h rm.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
rm.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h rm.o: ../core/error.h ../core/db.h ../core/group.h ../core/dircontainer.h
rm.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h rm.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
rm.o: ../core/mount.h rm.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
rm.o: ../core/mounts.h ../core/mount.h ../core/locale.h
run.o: content.h ../core/item.h ../templates/templates.h run.o: content.h ../core/item.h ../templates/templates.h
run.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h run.o: ../templates/patterncacher.h ../templates/misc.h
run.o: ../templates/localefilter.h ../core/locale.h
run.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
run.o: ../core/done.h ../core/request.h ../core/requesttypes.h run.o: ../core/done.h ../core/request.h ../core/requesttypes.h
run.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h run.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
run.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h run.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -210,7 +250,9 @@ run.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
run.o: ../core/acceptbaseparser.h ../core/htmlfilter.h run.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
run.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h run.o: ../core/postmultiparser.h ../core/ticket.h ../core/error.h
thread.o: content.h ../core/item.h ../templates/templates.h thread.o: content.h ../core/item.h ../templates/templates.h
thread.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h thread.o: ../templates/patterncacher.h ../templates/misc.h
thread.o: ../templates/localefilter.h ../core/locale.h
thread.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
thread.o: ../core/done.h ../core/request.h ../core/requesttypes.h thread.o: ../core/done.h ../core/request.h ../core/requesttypes.h
thread.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h thread.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
thread.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h thread.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -220,9 +262,11 @@ thread.o: ../core/postmultiparser.h ../core/ticket.h ../core/db.h
thread.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h thread.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
thread.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h thread.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h
thread.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h thread.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
thread.o: ../core/mount.h ../core/mount.h thread.o: ../core/mount.h ../core/locale.h ../core/mount.h
ticket.o: content.h ../core/item.h ../templates/templates.h ticket.o: content.h ../core/item.h ../templates/templates.h
ticket.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h ticket.o: ../templates/patterncacher.h ../templates/misc.h
ticket.o: ../templates/localefilter.h ../core/locale.h
ticket.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
ticket.o: ../core/done.h ../core/request.h ../core/requesttypes.h ticket.o: ../core/done.h ../core/request.h ../core/requesttypes.h
ticket.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h ticket.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
ticket.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h ticket.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -232,9 +276,11 @@ ticket.o: ../core/postmultiparser.h ../core/ticket.h ../core/db.h
ticket.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h ticket.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
ticket.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h ticket.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h
ticket.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h ticket.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
ticket.o: ../core/mount.h ../core/mount.h ticket.o: ../core/mount.h ../core/locale.h ../core/mount.h
upload.o: content.h ../core/item.h ../templates/templates.h upload.o: content.h ../core/item.h ../templates/templates.h
upload.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h upload.o: ../templates/patterncacher.h ../templates/misc.h
upload.o: ../templates/localefilter.h ../core/locale.h
upload.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
upload.o: ../core/done.h ../core/request.h ../core/requesttypes.h upload.o: ../core/done.h ../core/request.h ../core/requesttypes.h
upload.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h upload.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
upload.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h upload.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/function.h
@ -244,7 +290,9 @@ upload.o: ../core/postmultiparser.h ../core/ticket.h ../core/data.h
upload.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h upload.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h
upload.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h upload.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h
upload.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h upload.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
upload.o: ../core/mount.h upload.o: ../core/mount.h ../core/locale.h
who.o: content.h ../core/item.h ../templates/templates.h who.o: content.h ../core/item.h ../templates/templates.h
who.o: ../templates/patterncacher.h ../core/thread.h ../core/ticket.h who.o: ../templates/patterncacher.h ../templates/misc.h
who.o: ../templates/localefilter.h ../core/locale.h
who.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
who.o: ../core/done.h who.o: ../core/done.h

View File

@ -10,12 +10,16 @@
#include "content.h" #include "content.h"
#include "../core/request.h" #include "../core/request.h"
#include "../core/error.h" #include "../core/error.h"
#include "../core/notify.h"
void Content::FunReloadTemplates() void Content::FunReloadTemplates()
{ {
log << log1 << "Content: reloading html templates" << logend; log << log1 << "Content: reloading html templates" << logend;
templates.ReadTemplates(); templates.ReadTemplates();
notify.ReadTemplates(); // make sure that ReadTemplates() is using some kind of locking
request.session->done = Done::reloaded_templates; request.session->done = Done::reloaded_templates;
request.session->done_status = Error::ok; request.session->done_status = Error::ok;

View File

@ -7,8 +7,8 @@
* *
*/ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <cstdio> #include <cstdio>
#include "content.h" #include "content.h"
#include "../core/request.h" #include "../core/request.h"

View File

@ -5,12 +5,12 @@ compress.o: compress.h log.h
config.o: config.h ../confparser/confparser.h log.h data.h dirs.h item.h config.o: config.h ../confparser/confparser.h log.h data.h dirs.h item.h
config.o: dircontainer.h users.h user.h ugcontainer.h groups.h group.h config.o: dircontainer.h users.h user.h ugcontainer.h groups.h group.h
config.o: functions.h function.h lastcontainer.h mounts.h mount.h error.h config.o: functions.h function.h lastcontainer.h mounts.h mount.h error.h
config.o: rebus.h plugin.h request.h requesttypes.h session.h done.h thread.h config.o: rebus.h locale.h plugin.h request.h requesttypes.h session.h done.h
config.o: compress.h acceptencodingparser.h acceptbaseparser.h htmlfilter.h config.o: thread.h compress.h acceptencodingparser.h acceptbaseparser.h
config.o: postmultiparser.h ticket.h pluginmsg.h misc.h config.o: htmlfilter.h postmultiparser.h ticket.h pluginmsg.h misc.h
data.o: data.h dirs.h item.h dircontainer.h users.h user.h ugcontainer.h data.o: data.h dirs.h item.h dircontainer.h users.h user.h ugcontainer.h
data.o: log.h groups.h group.h functions.h function.h lastcontainer.h data.o: log.h groups.h group.h functions.h function.h lastcontainer.h
data.o: mounts.h mount.h error.h rebus.h data.o: mounts.h mount.h error.h rebus.h locale.h ../confparser/confparser.h
db.o: db.h item.h user.h group.h thread.h error.h log.h dircontainer.h db.o: db.h item.h user.h group.h thread.h error.h log.h dircontainer.h
db.o: ugcontainer.h ticket.h misc.h db.o: ugcontainer.h ticket.h misc.h
db_itemcolumns.o: db.h item.h user.h group.h thread.h error.h log.h db_itemcolumns.o: db.h item.h user.h group.h thread.h error.h log.h
@ -18,7 +18,8 @@ db_itemcolumns.o: dircontainer.h ugcontainer.h ticket.h
dircontainer.o: dircontainer.h item.h log.h dircontainer.o: dircontainer.h item.h log.h
dirs.o: dirs.h item.h dircontainer.h error.h log.h db.h user.h group.h dirs.o: dirs.h item.h dircontainer.h error.h log.h db.h user.h group.h
dirs.o: thread.h ugcontainer.h ticket.h data.h users.h groups.h functions.h dirs.o: thread.h ugcontainer.h ticket.h data.h users.h groups.h functions.h
dirs.o: function.h lastcontainer.h mounts.h mount.h rebus.h dirs.o: function.h lastcontainer.h mounts.h mount.h rebus.h locale.h
dirs.o: ../confparser/confparser.h
done.o: done.h done.o: done.h
error.o: error.h log.h error.o: error.h log.h
function.o: function.h item.h function.o: function.h item.h
@ -26,45 +27,52 @@ functioncodeparser.o: functioncodeparser.h item.h function.h log.h
functionparser.o: functionparser.h requesttypes.h log.h item.h error.h data.h functionparser.o: functionparser.h requesttypes.h log.h item.h error.h data.h
functionparser.o: dirs.h dircontainer.h users.h user.h ugcontainer.h groups.h functionparser.o: dirs.h dircontainer.h users.h user.h ugcontainer.h groups.h
functionparser.o: group.h functions.h function.h lastcontainer.h mounts.h functionparser.o: group.h functions.h function.h lastcontainer.h mounts.h
functionparser.o: mount.h rebus.h db.h thread.h ticket.h request.h session.h functionparser.o: mount.h rebus.h locale.h ../confparser/confparser.h db.h
functionparser.o: done.h compress.h acceptencodingparser.h acceptbaseparser.h functionparser.o: thread.h ticket.h request.h session.h done.h compress.h
functionparser.o: htmlfilter.h postmultiparser.h functionparser.o: acceptencodingparser.h acceptbaseparser.h htmlfilter.h
functionparser.o: postmultiparser.h
functions.o: functions.h function.h item.h functions.o: functions.h function.h item.h
groups.o: groups.h group.h ugcontainer.h log.h db.h item.h user.h thread.h groups.o: groups.h group.h ugcontainer.h log.h db.h item.h user.h thread.h
groups.o: error.h dircontainer.h ticket.h groups.o: error.h dircontainer.h ticket.h
htmlfilter.o: htmlfilter.h htmlfilter.o: htmlfilter.h
httpsimpleparser.o: httpsimpleparser.h httpsimpleparser.o: httpsimpleparser.h
lastcontainer.o: lastcontainer.h log.h lastcontainer.o: lastcontainer.h log.h
locale.o: locale.h ../confparser/confparser.h log.h
log.o: log.h log.o: log.h
misc.o: misc.h item.h log.h data.h dirs.h dircontainer.h users.h user.h misc.o: misc.h item.h log.h data.h dirs.h dircontainer.h users.h user.h
misc.o: ugcontainer.h groups.h group.h functions.h function.h lastcontainer.h misc.o: ugcontainer.h groups.h group.h functions.h function.h lastcontainer.h
misc.o: mounts.h mount.h error.h rebus.h misc.o: mounts.h mount.h error.h rebus.h locale.h ../confparser/confparser.h
mount.o: mount.h mount.o: mount.h
mountparser.o: mountparser.h mount.h item.h error.h log.h data.h dirs.h mountparser.o: mountparser.h mount.h item.h error.h log.h data.h dirs.h
mountparser.o: dircontainer.h users.h user.h ugcontainer.h groups.h group.h mountparser.o: dircontainer.h users.h user.h ugcontainer.h groups.h group.h
mountparser.o: functions.h function.h lastcontainer.h mounts.h rebus.h misc.h mountparser.o: functions.h function.h lastcontainer.h mounts.h rebus.h
mountparser.o: locale.h ../confparser/confparser.h misc.h
mounts.o: mounts.h mount.h error.h log.h data.h dirs.h item.h dircontainer.h mounts.o: mounts.h mount.h error.h log.h data.h dirs.h item.h dircontainer.h
mounts.o: users.h user.h ugcontainer.h groups.h group.h functions.h mounts.o: users.h user.h ugcontainer.h groups.h group.h functions.h
mounts.o: function.h lastcontainer.h rebus.h request.h requesttypes.h mounts.o: function.h lastcontainer.h rebus.h locale.h
mounts.o: session.h done.h thread.h compress.h acceptencodingparser.h mounts.o: ../confparser/confparser.h request.h requesttypes.h session.h
mounts.o: done.h thread.h compress.h acceptencodingparser.h
mounts.o: acceptbaseparser.h htmlfilter.h postmultiparser.h ticket.h mounts.o: acceptbaseparser.h htmlfilter.h postmultiparser.h ticket.h
mounts.o: mountparser.h db.h mounts.o: mountparser.h db.h
notify.o: log.h notify.h ../templatesnotify/templatesnotify.h ../core/mount.h notify.o: log.h notify.h ../templatesnotify/templatesnotify.h ../core/mount.h
notify.o: data.h dirs.h item.h dircontainer.h users.h user.h ugcontainer.h notify.o: ../core/locale.h ../confparser/confparser.h ../templates/misc.h
notify.o: groups.h group.h functions.h function.h lastcontainer.h mounts.h notify.o: ../templates/localefilter.h data.h dirs.h item.h dircontainer.h
notify.o: mount.h error.h rebus.h misc.h request.h requesttypes.h session.h notify.o: users.h user.h ugcontainer.h groups.h group.h functions.h
notify.o: done.h thread.h compress.h acceptencodingparser.h notify.o: function.h lastcontainer.h mounts.h mount.h error.h rebus.h
notify.o: acceptbaseparser.h htmlfilter.h postmultiparser.h ticket.h notify.o: locale.h misc.h request.h requesttypes.h session.h done.h thread.h
notify.o: compress.h acceptencodingparser.h acceptbaseparser.h htmlfilter.h
notify.o: postmultiparser.h ticket.h
plugin.o: plugin.h request.h requesttypes.h session.h done.h item.h error.h plugin.o: plugin.h request.h requesttypes.h session.h done.h item.h error.h
plugin.o: log.h user.h rebus.h function.h thread.h compress.h plugin.o: log.h user.h rebus.h function.h thread.h compress.h
plugin.o: acceptencodingparser.h acceptbaseparser.h htmlfilter.h plugin.o: acceptencodingparser.h acceptbaseparser.h htmlfilter.h
plugin.o: postmultiparser.h ticket.h data.h dirs.h dircontainer.h users.h plugin.o: postmultiparser.h ticket.h data.h dirs.h dircontainer.h users.h
plugin.o: ugcontainer.h groups.h group.h functions.h lastcontainer.h mounts.h plugin.o: ugcontainer.h groups.h group.h functions.h lastcontainer.h mounts.h
plugin.o: mount.h pluginmsg.h plugin.o: mount.h locale.h ../confparser/confparser.h pluginmsg.h
postmultiparser.o: postmultiparser.h error.h log.h requesttypes.h data.h postmultiparser.o: postmultiparser.h error.h log.h requesttypes.h data.h
postmultiparser.o: dirs.h item.h dircontainer.h users.h user.h ugcontainer.h postmultiparser.o: dirs.h item.h dircontainer.h users.h user.h ugcontainer.h
postmultiparser.o: groups.h group.h functions.h function.h lastcontainer.h postmultiparser.o: groups.h group.h functions.h function.h lastcontainer.h
postmultiparser.o: mounts.h mount.h rebus.h postmultiparser.o: mounts.h mount.h rebus.h locale.h
postmultiparser.o: ../confparser/confparser.h
rebus.o: log.h rebus.h misc.h item.h rebus.o: log.h rebus.h misc.h item.h
request.o: request.h requesttypes.h session.h done.h item.h error.h log.h request.o: request.h requesttypes.h session.h done.h item.h error.h log.h
request.o: user.h rebus.h function.h thread.h compress.h request.o: user.h rebus.h function.h thread.h compress.h
@ -72,34 +80,40 @@ request.o: acceptencodingparser.h acceptbaseparser.h htmlfilter.h
request.o: postmultiparser.h ticket.h getparser.h httpsimpleparser.h request.o: postmultiparser.h ticket.h getparser.h httpsimpleparser.h
request.o: postparser.h cookieparser.h data.h dirs.h dircontainer.h users.h request.o: postparser.h cookieparser.h data.h dirs.h dircontainer.h users.h
request.o: ugcontainer.h groups.h group.h functions.h lastcontainer.h request.o: ugcontainer.h groups.h group.h functions.h lastcontainer.h
request.o: mounts.h mount.h plugin.h pluginmsg.h misc.h db.h request.o: mounts.h mount.h locale.h ../confparser/confparser.h plugin.h
request.o: pluginmsg.h misc.h db.h
requestcontroller.o: requestcontroller.h ../content/content.h ../core/item.h requestcontroller.o: requestcontroller.h ../content/content.h ../core/item.h
requestcontroller.o: ../templates/templates.h ../templates/patterncacher.h requestcontroller.o: ../templates/templates.h ../templates/patterncacher.h
requestcontroller.o: ../core/thread.h ../core/ticket.h ../core/done.h requestcontroller.o: misc.h item.h ../core/thread.h ../core/ticket.h
requestcontroller.o: sessionmanager.h sessioncontainer.h session.h done.h requestcontroller.o: ../core/done.h sessionmanager.h sessioncontainer.h
requestcontroller.o: item.h error.h log.h user.h rebus.h functionparser.h requestcontroller.o: session.h done.h error.h log.h user.h rebus.h
requestcontroller.o: requesttypes.h data.h dirs.h dircontainer.h users.h requestcontroller.o: functionparser.h requesttypes.h data.h dirs.h
requestcontroller.o: ugcontainer.h groups.h group.h functions.h function.h requestcontroller.o: dircontainer.h users.h ugcontainer.h groups.h group.h
requestcontroller.o: lastcontainer.h mounts.h mount.h request.h thread.h requestcontroller.o: functions.h function.h lastcontainer.h mounts.h mount.h
requestcontroller.o: locale.h ../confparser/confparser.h request.h thread.h
requestcontroller.o: compress.h acceptencodingparser.h acceptbaseparser.h requestcontroller.o: compress.h acceptencodingparser.h acceptbaseparser.h
requestcontroller.o: htmlfilter.h postmultiparser.h ticket.h postparser.h requestcontroller.o: htmlfilter.h postmultiparser.h ticket.h postparser.h
requestcontroller.o: httpsimpleparser.h cookieparser.h notify.h requestcontroller.o: httpsimpleparser.h cookieparser.h notify.h
requestcontroller.o: ../templatesnotify/templatesnotify.h ../core/mount.h requestcontroller.o: ../templatesnotify/templatesnotify.h ../core/mount.h
requestcontroller.o: ../core/locale.h ../templates/misc.h
requestcontroller.o: ../templates/localefilter.h
session.o: session.h done.h item.h error.h log.h user.h rebus.h session.o: session.h done.h item.h error.h log.h user.h rebus.h
sessioncontainer.o: sessioncontainer.h session.h done.h item.h error.h log.h sessioncontainer.o: sessioncontainer.h session.h done.h item.h error.h log.h
sessioncontainer.o: user.h rebus.h data.h dirs.h dircontainer.h users.h sessioncontainer.o: user.h rebus.h data.h dirs.h dircontainer.h users.h
sessioncontainer.o: ugcontainer.h groups.h group.h functions.h function.h sessioncontainer.o: ugcontainer.h groups.h group.h functions.h function.h
sessioncontainer.o: lastcontainer.h mounts.h mount.h sessioncontainer.o: lastcontainer.h mounts.h mount.h locale.h
sessioncontainer.o: ../confparser/confparser.h
sessionmanager.o: sessionmanager.h sessioncontainer.h session.h done.h item.h sessionmanager.o: sessionmanager.h sessioncontainer.h session.h done.h item.h
sessionmanager.o: error.h log.h user.h rebus.h request.h requesttypes.h sessionmanager.o: error.h log.h user.h rebus.h request.h requesttypes.h
sessionmanager.o: function.h thread.h compress.h acceptencodingparser.h sessionmanager.o: function.h thread.h compress.h acceptencodingparser.h
sessionmanager.o: acceptbaseparser.h htmlfilter.h postmultiparser.h ticket.h sessionmanager.o: acceptbaseparser.h htmlfilter.h postmultiparser.h ticket.h
sessionmanager.o: data.h dirs.h dircontainer.h users.h ugcontainer.h groups.h sessionmanager.o: data.h dirs.h dircontainer.h users.h ugcontainer.h groups.h
sessionmanager.o: group.h functions.h lastcontainer.h mounts.h mount.h sessionmanager.o: group.h functions.h lastcontainer.h mounts.h mount.h
sessionmanager.o: sessionparser.h sessionmanager.o: locale.h ../confparser/confparser.h sessionparser.h
sessionparser.o: sessionparser.h session.h done.h item.h error.h log.h user.h sessionparser.o: sessionparser.h session.h done.h item.h error.h log.h user.h
sessionparser.o: rebus.h sessioncontainer.h data.h dirs.h dircontainer.h sessionparser.o: rebus.h sessioncontainer.h data.h dirs.h dircontainer.h
sessionparser.o: users.h ugcontainer.h groups.h group.h functions.h sessionparser.o: users.h ugcontainer.h groups.h group.h functions.h
sessionparser.o: function.h lastcontainer.h mounts.h mount.h sessionparser.o: function.h lastcontainer.h mounts.h mount.h locale.h
sessionparser.o: ../confparser/confparser.h
users.o: users.h user.h ugcontainer.h log.h db.h item.h group.h thread.h users.o: users.h user.h ugcontainer.h log.h db.h item.h group.h thread.h
users.o: error.h dircontainer.h ticket.h users.o: error.h dircontainer.h ticket.h

View File

@ -1 +1 @@
o = acceptbaseparser.o compress.o config.o data.o db.o db_itemcolumns.o dircontainer.o dirs.o done.o error.o function.o functioncodeparser.o functionparser.o functions.o groups.o htmlfilter.o httpsimpleparser.o lastcontainer.o log.o misc.o mount.o mountparser.o mounts.o notify.o plugin.o postmultiparser.o rebus.o request.o requestcontroller.o session.o sessioncontainer.o sessionmanager.o sessionparser.o users.o o = acceptbaseparser.o compress.o config.o data.o db.o db_itemcolumns.o dircontainer.o dirs.o done.o error.o function.o functioncodeparser.o functionparser.o functions.o groups.o htmlfilter.o httpsimpleparser.o lastcontainer.o locale.o log.o misc.o mount.o mountparser.o mounts.o notify.o plugin.o postmultiparser.o rebus.o request.o requestcontroller.o session.o sessioncontainer.o sessionmanager.o sessionparser.o users.o

View File

@ -14,6 +14,7 @@
#include "misc.h" #include "misc.h"
Config::Config() Config::Config()
{ {
default_str.clear(); default_str.clear();
@ -108,7 +109,8 @@ void Config::AssignValues()
data.post_file_max = Int("post_file_max", 8388608); // 8 MB data.post_file_max = Int("post_file_max", 8388608); // 8 MB
data.static_auth_dir = Text("static_auth_dir"); data.static_auth_dir = Text("static_auth_dir");
data.templates = Text("templates"); data.templates_dir = Text("templates_dir");
data.templates_dir_default = Text("templates_dir_default");
data.http_session_id_name = Text("http_session_id_name"); data.http_session_id_name = Text("http_session_id_name");
data.db_database = Text("db_database"); data.db_database = Text("db_database");
data.db_user = Text("db_user"); data.db_user = Text("db_user");
@ -132,7 +134,7 @@ void Config::AssignValues()
data.session_max_idle = Int("session_max_idle", 10800); // 3h data.session_max_idle = Int("session_max_idle", 10800); // 3h
data.session_remember_max_idle = Int("session_remember_max_idle", 16070400); // 3 months data.session_remember_max_idle = Int("session_remember_max_idle", 16070400); // 3 months
data.session_file = Text("session_file"); data.session_file = Text("session_file");
data.compression = Bool("compression", true); data.compression = Bool("compression", true);
@ -140,6 +142,15 @@ void Config::AssignValues()
data.plugin_file.push_back(p); data.plugin_file.push_back(p);
data.html_filter = Bool("html_filter", true); data.html_filter = Bool("html_filter", true);
data.locale_str = Text("locale", "en");
data.locale_dir = Text("locale_dir");
data.locale_dir_default = Text("locale_dir_default");
Locale::Lang lang = Locale::StrToLang(data.locale_str);
if( lang != Locale::lang_unknown )
data.locale.SetLang(lang);
} }

View File

@ -22,6 +22,7 @@
#include "lastcontainer.h" #include "lastcontainer.h"
#include "mounts.h" #include "mounts.h"
#include "rebus.h" #include "rebus.h"
#include "locale.h"
class Data class Data
@ -58,7 +59,8 @@ public:
// fast cgi: group of the socket // fast cgi: group of the socket
std::string fcgi_socket_group; std::string fcgi_socket_group;
std::string templates; std::string templates_dir;
std::string templates_dir_default; // templates from winix
std::string db_database; std::string db_database;
std::string db_user; std::string db_user;
@ -109,6 +111,17 @@ public:
// directory for static files (for fastcgi authorizer mode) // directory for static files (for fastcgi authorizer mode)
std::string static_auth_dir; std::string static_auth_dir;
// default locale: en pl
std::string locale_str;
// directory with locale files
std::string locale_dir;
// directory with default locale files (those from winix)
std::string locale_dir_default;
// below variables are based on the other config variables // below variables are based on the other config variables
// base_url_prefix + base_server // base_url_prefix + base_server
@ -120,6 +133,10 @@ public:
// base_url_static_auth_prefix + base_server // base_url_static_auth_prefix + base_server
std::string base_url_static_auth; std::string base_url_static_auth;
Locale locale;
// end config members // end config members
// ----------------------------------------------------------------- // -----------------------------------------------------------------

190
core/locale.cpp Executable file
View File

@ -0,0 +1,190 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#include "locale.h"
#include "log.h"
Locale::Locale()
{
loc_tab.resize(lang_unknown);
default_lang = lang_en;
current_lang = lang_en;
}
void Locale::AddLocale(Lang lang)
{
ConfParser::Table::iterator i = loc_parser.table.begin();
for( ; i != loc_parser.table.end() ; ++i)
loc_tab[lang][i->first] = i->second;
}
void Locale::ReadFile(const char * dir, const char * dir_def, Lang lang, const char * file)
{
if( static_cast<size_t>(lang) >= loc_tab.size() )
{
// ops, something wrong
return;
}
loc_tab[lang].clear();
bool read = false;
if( dir_def )
{
file_name = dir_def;
file_name += '/';
file_name += file;
if( loc_parser.Parse(file_name.c_str()) == ConfParser::ok )
{
read = true;
AddLocale(lang);
log << log3 << "Locale: read locale from: " << file_name << logend;
}
}
if( dir )
{
file_name = dir;
file_name += '/';
file_name += file;
if( loc_parser.Parse(file_name.c_str()) == ConfParser::ok )
{
read = true;
AddLocale(lang);
log << log3 << "Locale: read locale from: " << file_name << logend;
}
}
if( !read )
log << log1 << "Locale: cant open file for locale: " << file << logend;
}
void Locale::Read(const char * dir, const char * dir_def)
{
ReadFile(dir, dir_def, lang_pl, "pl");
ReadFile(dir, dir_def, lang_en, "en");
}
void Locale::Read(const std::string & dir, const std::string & dir_def)
{
if( dir_def.empty() )
Read(dir.c_str());
else
Read(dir.c_str(), dir_def.c_str());
}
void Locale::SetLang(Lang lang)
{
current_lang = lang;
}
Locale::Lang Locale::GetLang()
{
return current_lang;
}
void Locale::SetLangDef(Lang lang)
{
default_lang = lang_en;
}
const std::string & Locale::Get(const std::string & key) const
{
if( static_cast<size_t>(current_lang) >= loc_tab.size() )
{
// ops, something wrong
return empty;
}
// looking in the current_lang
ConfParser::Table::const_iterator i = loc_tab[current_lang].find(key);
if( i != loc_tab[current_lang].end() )
return i->second;
if( current_lang == default_lang )
return empty;
if( static_cast<size_t>(default_lang) >= loc_tab.size() )
{
// ops, something wrong
return empty;
}
// looking in a default language
i = loc_tab[default_lang].find(key);
if( i != loc_tab[default_lang].end() )
return i->second;
// there is no such a key
return empty;
}
Locale::Lang Locale::StrToLang(const std::string & str)
{
if( str == "en" )
return lang_en;
else
if( str == "pl" )
return lang_pl;
return lang_unknown;
}
const char * Locale::LangToStr(Lang lang)
{
static char buffer[30];
switch(lang)
{
case lang_en:
sprintf(buffer, "en");
break;
case lang_pl:
sprintf(buffer, "pl");
break;
default:
sprintf(buffer, "unknown");
}
return buffer;
}
size_t Locale::Size()
{
return loc_tab.size();
}

66
core/locale.h Executable file
View File

@ -0,0 +1,66 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslucorelocale
#define headerfilecmslucorelocale
#include "../confparser/confparser.h"
#include <vector>
#include <string>
class Locale
{
public:
enum Lang
{
lang_en = 0,
lang_pl,
lang_unknown // should be last
};
Locale();
void Read(const char * dir, const char * dir_def = 0);
void Read(const std::string & dir, const std::string & dir_def);
const std::string & Get(const std::string & key) const;
// default is english
void SetLang(Lang lang);
Lang GetLang();
// which language is used instead if there is no a key in an other language
// default: lang_en
void SetLangDef(Lang lang);
static Lang StrToLang(const std::string & str);
static const char * LangToStr(Lang lang);
size_t Size();
private:
void AddLocale(Lang lang);
void ReadFile(const char * dir, const char * dir_def, Lang lang, const char * file);
std::vector<ConfParser::Table> loc_tab;
ConfParser loc_parser;
std::string file_name;
std::string empty;
Lang default_lang;
Lang current_lang;
};
#endif

View File

@ -7,6 +7,8 @@
* *
*/ */
#include <sys/types.h>
#include <sys/stat.h>
#include "misc.h" #include "misc.h"
#include "log.h" #include "log.h"
#include "data.h" #include "data.h"
@ -538,3 +540,17 @@ bool ValidateEmail(const std::string & email)
return correct; return correct;
} }
bool IsFile(const char * file)
{
struct stat sb;
return (stat(file, &sb) == 0);
}
bool IsFile(const std::string & file)
{
return IsFile(file.c_str());
}

View File

@ -61,4 +61,8 @@ bool EqualNoCase(const char * short_str, const char * long_str);
bool ValidateEmail(const std::string & email); bool ValidateEmail(const std::string & email);
bool IsFile(const char * file);
bool IsFile(const std::string & file);
#endif #endif

View File

@ -28,15 +28,15 @@ Notify * Notify::obj;
/* /*
methods for second thread methods for the second thread
second thread can reference to 'this' by using 'obj' pointer the thread can reference to 'this' by using 'obj' pointer
*/ */
void * Notify::ThreadRoutine(void * arg) void * Notify::ThreadRoutine(void * arg)
{ {
obj = (Notify*)arg; obj = (Notify*)arg;
obj->templates_notify.Read(obj->templates_dir);
while( true ) while( true )
@ -70,7 +70,10 @@ void Notify::SendEmail(NotifyMsg & n)
{ {
TemplatesNotifyFunctions::notify_msg = &n; TemplatesNotifyFunctions::notify_msg = &n;
obj->templates_notify.Generate(); obj->Lock(); // templates can be reloaded from the first thread
obj->templates_notify.Generate(n.lang);
obj->Unlock();
SendEmail(n.email, obj->templates_notify.notify_str.str()); SendEmail(n.email, obj->templates_notify.notify_str.str());
} }
@ -91,7 +94,6 @@ void Notify::SendEmail(const std::string & email, const std::string & message)
if( !sendmail ) if( !sendmail )
{ {
nlog << "Notify: can't run sendmail" << logend; nlog << "Notify: can't run sendmail" << logend;
return; return;
} }
@ -133,11 +135,20 @@ Notify::~Notify()
} }
void Notify::ReadTemplates()
bool Notify::Init(const std::string & tdir)
{ {
templates_dir = tdir; Lock();
templates_notify.Read();
Unlock();
}
bool Notify::Init()
{
templates_notify.CreateFunctions();
int t = pthread_create(&thread, 0, ThreadRoutine, (void*)this); int t = pthread_create(&thread, 0, ThreadRoutine, (void*)this);
if( t != 0 ) if( t != 0 )
@ -229,6 +240,7 @@ Users::Iterator i;
if( sending ) if( sending )
{ {
n.email = i->email; n.email = i->email;
n.lang = data.locale.GetLang(); // !! bedzie osobno dla kazdego uzytkownika
notify_pool.insert(notify_pool.end(), n); notify_pool.insert(notify_pool.end(), n);
} }
} }

View File

@ -30,7 +30,9 @@ public:
Notify(); Notify();
~Notify(); ~Notify();
bool Init(const std::string & tdir); void ReadTemplates();
bool Init();
/* /*
this method addes an item to our special pool this method addes an item to our special pool
@ -64,7 +66,6 @@ private:
std::list<NotifyMsg> notify_pool; std::list<NotifyMsg> notify_pool;
static Notify * obj; static Notify * obj;
std::string command; std::string command;
std::string templates_dir;
TemplatesNotify templates_notify; TemplatesNotify templates_notify;
}; };

View File

@ -2,7 +2,7 @@
* This file is a part of CMSLU -- Content Management System like Unix * This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2009, Tomasz Sowa * Copyright (c) 2008-2010, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -108,7 +108,7 @@ bool RequestController::Init()
data.groups.ReadGroups(); data.groups.ReadGroups();
data.functions.ReadFunctions(); data.functions.ReadFunctions();
data.mounts.ReadMounts(); data.mounts.ReadMounts();
data.locale.Read(data.locale_dir, data.locale_dir_default); // call it before content.Init()
data.rebus.Init(); data.rebus.Init();
// //

View File

@ -28,6 +28,8 @@
class RequestController class RequestController
{ {
Content content; Content content;
SessionManager session_manager; SessionManager session_manager;
bool BaseUrlRedirect(); bool BaseUrlRedirect();

View File

@ -1 +1 @@
<p class="iteminfo">Dodane przez: [dir_last_user], [dir_last_date_creation][if-no dir_last_dates_equal], ostatnio modyfikowany: [dir_last_date_modification][end]</p> <p class="iteminfo">{added_by}: [dir_last_user], [dir_last_date_creation][if-no dir_last_dates_equal], {last_modified}: [dir_last_date_modification][end]</p>

View File

@ -1,3 +1,3 @@
<h1>Błąd 404</h1> <h1>{error_404}</h1>
<p>Przykro nam ale podanej strony nie ma w naszym serwisie.</p> <p>{error_404_msg}</p>

View File

@ -1,8 +1,8 @@
[if-any done_is_error] [if-any done_is_error]
[if-any done_status_incorrect_rebus] [if-any done_status_incorrect_rebus]
<p class="error">Proszę rozwiązać rebus!</p> <p class="error">{solve_rebus}</p>
[else] [else]
[if-any done_status_spam] [if-any done_status_spam]
<p class="error">Jesteś podejrzany jako spamer,<br> nie możesz nic wysłać do czasu zalogowania się!</p> <p class="error">{suspected_spammer}</p>
[end] [end]
[end] [end]

View File

@ -1,3 +0,0 @@
<h1>Item required</h1>
<p>This function can only be used with an item</p>

View File

@ -1,5 +1,5 @@
[if-one doc_is_error done_is_error] [if-one doc_is_error done_is_error]
<h1>Przepraszamy ale wystąpiły problemy z wykonaniem tej operacji.</h1> <h1>{was_errors}</h1>
<p>Kod błędu: [if-one doc_is_error]doc:[doc_status][end], [if-one done_is_error]done:[done_status][end]</p> <p>{error_code}: [if-one doc_is_error]doc:[doc_status][end], [if-one done_is_error]done:[done_status][end]</p>
[end] [end]

View File

@ -1,3 +1,5 @@
<h1>Brak dostępu</h1> <h1>{access_denied}</h1>
<p>{access_denied_msg}</p>
<p>Przykro nam ale nie masz dostępu do tej części serwisu.</p>

View File

@ -1,8 +1,17 @@
<div> <div>
[is mount_page_is "subject"] [is mount_page_is "subject"]
[is mount_page_is "info"] [is mount_page_is "info"]
<h1 class="withinfo">[else]<h1>[end][item_subject]</h1> <h1 class="withinfo">
[else]
<h1>
[end] [end]
[item_subject]
</h1>
[end]
[is mount_page_is "info"] [is mount_page_is "info"]
[item_info] [item_info]
[end] [end]
@ -12,7 +21,7 @@
[item_print_content] [item_print_content]
[else] [else]
[if-one item_static_auth_is_other] [if-one item_static_auth_is_other]
Ściągnij plik: <a href="[item_link_static_auth]" title="[item_subject]">[item_subject]</a> {download}: <a href="[item_link_static_auth]" title="[item_subject]">[item_subject]</a>
[item_print_content] [item_print_content]
[else] [else]
[if-one item_static_auth_is_none] [if-one item_static_auth_is_none]

View File

@ -1,23 +1,25 @@
<h1>Za³ó¿ w±tek</h1> <h1>{create_thread_header}</h1>
[include "err_abuse.html"] [include "err_abuse.html"]
<form id="additem" method="post" action="[doc_base_url][dir]createthread"> <form id="additem" method="post" action="[doc_base_url][dir]createthread">
<fieldset> <fieldset>
<legend>Wype³nij wszystkie pozycje formularza</legend> <legend>{form_thread_legend}</legend>
<p class="withnext">Tytu³:</p> <p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]"> <input class="edit" type="text" name="subject" value="[item_subject]">
[include "fun_emacs_post.html"] [include "fun_emacs_post.html"]
[if-no user_logged] [if-no user_logged]
<p class="withnext">Nick:</p> <p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]"> <input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">Rebus: Ile to jest [rebus_question]?</p> <p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus"> <input class="edit" type="text" name="rebus">
[end] [end]
<input class="submit" type="submit" value="Za³ó¿ w±tek">
<input class="submit" type="submit" value="{button_thread_submit}">
</fieldset> </fieldset>
</form> </form>

View File

@ -1,17 +1,20 @@
[if-one ticket_is]<h1>Edytuj zg³oszenie</h1>[else]<h1>Nowe zg³oszenie</h1>[end] [if-one ticket_is]<h1>{edit_ticket_header}</h1>[else]<h1>{create_ticket_header}</h1>[end]
[include "err_abuse.html"] [include "err_abuse.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if-one ticket_is]editticket[else]createticket[end]"> <form id="additem" method="post" action="[doc_base_url][dir][if-one ticket_is]editticket[else]createticket[end]">
<fieldset> <fieldset>
[if-one ticket_is] [if-one ticket_is]
<legend>Formularz edycji zg³oszenia.</legend> <legend>{form_edit_ticket_legend}</legend>
[else] [else]
<legend>Formularz nowego zg³oszenia.</legend> <legend>{form_create_ticket_legend}</legend>
[end] [end]
<p class="withnext">Tytu³:</p> <p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]"> <input class="edit" type="text" name="subject" value="[item_subject]">
<table class="ticket"> <table class="ticket">
@ -19,7 +22,7 @@
[if-one ticket_type_tab_defined] [if-one ticket_type_tab_defined]
[if-one ticket_type_tab] [if-one ticket_type_tab]
<tr> <tr>
<th>Rodzaj zg³oszenia:</th> <th>{form_ticket_type}:</th>
<td> <td>
<select name="type"> <select name="type">
[for ticket_type_tab] [for ticket_type_tab]
@ -31,7 +34,7 @@
[end] [end]
[else] [else]
<tr> <tr>
<th>Rodzaj zg³oszenia:</th> <th>{form_ticket_type}:</th>
<td> <td>
<select name="type"> <select name="type">
<option value="0">-</option> <option value="0">-</option>
@ -45,7 +48,7 @@
[if-one ticket_status_tab_defined] [if-one ticket_status_tab_defined]
[if-one ticket_status_tab] [if-one ticket_status_tab]
<tr> <tr>
<th>Status:</th> <th>{form_ticket_status}:</th>
<td> <td>
<select name="status"> <select name="status">
[for ticket_status_tab] [for ticket_status_tab]
@ -57,7 +60,7 @@
[end] [end]
[else] [else]
<tr> <tr>
<th>Status:</th> <th>{form_ticket_status}:</th>
<td> <td>
<select name="status"> <select name="status">
<option value="0">-</option> <option value="0">-</option>
@ -72,7 +75,7 @@
[if-one ticket_priority_tab_defined] [if-one ticket_priority_tab_defined]
[if-one ticket_priority_tab] [if-one ticket_priority_tab]
<tr> <tr>
<th>Priorytet:</th> <th>{form_ticket_priority}:</th>
<td> <td>
<select name="priority"> <select name="priority">
[for ticket_priority_tab] [for ticket_priority_tab]
@ -84,7 +87,7 @@
[end] [end]
[else] [else]
<tr> <tr>
<th>Priorytet:</th> <th>{form_ticket_priority}:</th>
<td> <td>
<select name="priority"> <select name="priority">
<option value="0">-</option> <option value="0">-</option>
@ -98,7 +101,7 @@
[if-one ticket_category_tab_defined] [if-one ticket_category_tab_defined]
[if-one ticket_category_tab] [if-one ticket_category_tab]
<tr> <tr>
<th>Kategoria:</th> <th>{form_ticket_category}:</th>
<td> <td>
<select name="category"> <select name="category">
[for ticket_category_tab] [for ticket_category_tab]
@ -110,7 +113,7 @@
[end] [end]
[else] [else]
<tr> <tr>
<th>Kategoria:</th> <th>{form_ticket_category}:</th>
<td> <td>
<select name="category"> <select name="category">
<option value="0">-</option> <option value="0">-</option>
@ -123,7 +126,7 @@
[if-one ticket_expected_tab_defined] [if-one ticket_expected_tab_defined]
[if-one ticket_expected_tab] [if-one ticket_expected_tab]
<tr> <tr>
<th>Oczekiwany w:</th> <th>{form_ticket_expected}:</th>
<td> <td>
<select name="expected"> <select name="expected">
[for ticket_expected_tab] [for ticket_expected_tab]
@ -135,7 +138,7 @@
[end] [end]
[else] [else]
<tr> <tr>
<th>Oczekiwany w:</th> <th>{form_ticket_expected}:</th>
<td> <td>
<select name="expected"> <select name="expected">
<option value="0">-</option> <option value="0">-</option>
@ -145,7 +148,7 @@
[end] [end]
<tr> <tr>
<th>Postêp prac (0-100):</th> <th>{form_ticket_progress}:</th>
<td><input type="text" name="progress" value="[ticket_progress]"></td> <td><input type="text" name="progress" value="[ticket_progress]"></td>
</tr> </tr>
@ -156,12 +159,14 @@
[if-no user_logged] [if-no user_logged]
<p class="withnext">Nick:</p> <p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]"> <input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">Rebus: Ile to jest [rebus_question]?</p> <p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus"> <input class="edit" type="text" name="rebus">
[end] [end]
<input class="submit" type="submit" value="[if-one ticket_is]Edytuj zg³oszenie[else]Za³ó¿ zg³oszenie[end]">
<input class="submit" type="submit" value="[if-one ticket_is]{form_ticket_edit_submit}[else]{form_ticket_create_submit}[end]">
</fieldset> </fieldset>
</form> </form>

View File

@ -1,25 +1,29 @@
<h1>Domyślna pozycja w katalogu</h1> <h1>{default_header}</h1>
[if-any done_defaulted_dir done_is_error] [if-any done_defaulted_dir done_is_error]
<p>Przykro nam ale wystąpiły błędy podczas zmiany domyślnej pozycji.<br> <p>{default_was_error}<br>
[if-any done_status_incorrect_dir] [if-any done_status_incorrect_dir]
<p>Podano nie istniejący katalog.</p> <p>{default_error_no_dir}</p>
[else] [else]
[if-any done_status_no_item] [if-any done_status_no_item]
<p>Podano nie istniejąca pozycję.</p> <p>default_error_no_file</p>
[else] [else]
Kod błędu: [done_status]</p> {error_code}: [done_status]</p>
[end] [end]
[end] [end]
[end] [end]
<form id="additem" method="post" action="[doc_base_url][dir]default"> <form id="additem" method="post" action="[doc_base_url][dir]default">
<fieldset> <fieldset>
<legend>Wypełnij wszystkie pozycje formularza</legend> <legend>{form_default_legend}</legend>
Url:<br> {url}:<br>
<input class="edit" type="text" name="defaultitem" value="[dir_last_default_item_dir][dir_last_default_item_url]"> <input class="edit" type="text" name="defaultitem" value="[dir_last_default_item_dir][dir_last_default_item_url]">
<input class="submit" type="submit" value="Dodaj"> <input class="submit" type="submit" value="{change}">
</fieldset> </fieldset>
</form> </form>

View File

@ -1,25 +1,26 @@
[if-one item_is]<h1>Edytuj</h1>[else]<h1>Dodaj</h1>[end] [if-one item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[include "err_abuse.html"] [include "err_abuse.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]emacs"> <form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]emacs">
<fieldset> <fieldset>
<legend>Formularz edycji.</legend> <legend>{form_emacs_legend}</legend>
[if-one mount_type_is_cms] [if-one mount_type_is_cms]
<p class="withnext">Tytu³:</p> <p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]"> <input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">Url:</p> <p class="withnext">{url}:</p>
<input class="edit" type="text" name="url" value="[item_url]"> <input class="edit" type="text" name="url" value="[item_url]">
[end] [end]
[if-one mount_type_is_thread] [if-one mount_type_is_thread]
[is mount_thread_is "subject"] [is mount_thread_is "subject"]
<p class="withnext">Tytu³:</p> <p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]"> <input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">Url:</p> <p class="withnext">{url}:</p>
<input class="edit" type="text" name="url" value="[item_url]"> <input class="edit" type="text" name="url" value="[item_url]">
[end] [end]
[end] [end]
@ -27,13 +28,15 @@
[include "fun_emacs_post.html"] [include "fun_emacs_post.html"]
[if-no user_logged] [if-no user_logged]
<p class="withnext">Nick:</p> <p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]"> <input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">Rebus: Ile to jest [rebus_question]?</p> <p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus"> <input class="edit" type="text" name="rebus">
[end] [end]
<input class="submit" type="submit" value="[if-one item_is]Zmieñ[else]Dodaj[end]"> <input class="submit" type="submit" value="[if-one item_is]{change}[else]{add}[end]">
</fieldset> </fieldset>
</form> </form>

View File

@ -1,17 +1,20 @@
[if-one mount_type_is_cms]<p class="withnext">Zawarto¶æ:</p>[end] [if-one mount_type_is_cms]<p class="withnext">{form_emacs_content_cms}</p>[end]
[if-one mount_type_is_thread]<p class="withnext">Post:</p>[end] [if-one mount_type_is_thread]<p class="withnext">{form_emacs_content_thread}</p>[end]
[if-one mount_type_is_ticket]<p class="withnext">Opis:</p>[end] [if-one mount_type_is_ticket]<p class="withnext">{form_emacs_content_ticket}</p>[end]
<textarea class="multitext" rows="[if-one mount_type_is_cms]30[else]10[end]" cols="60" name="content">[item_content]</textarea> <textarea class="multitext" rows="[if-one mount_type_is_cms]30[else]10[end]" cols="60" name="content">[item_content]</textarea>
<p class="withnext">Rodzaj wiadomo¶ci:</p> <p class="withnext">{form_emacs_content_type}</p>
<select name="contenttype" class="contenttype"> <select name="contenttype" class="contenttype">
<option[is item_content_type_is "text"] selected[end] value="0">text</option> <option[is item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[is item_content_type_is "formatted text"] selected[end] value="1">sformatowany text</option> <option[is item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if-one user_can_use_html]<option[is item_content_type_is "html"] selected[end] value="2">html</option>[end] [if-one user_can_use_html]<option[is item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
[if-one user_can_use_bbcode]<option[is item_content_type_is "bbcode"] selected[end] value="3">bbcode</option>[end] [if-one user_can_use_bbcode]<option[is item_content_type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
[if-one user_can_use_raw]<option[is item_content_type_is "raw"] selected[end] value="4">surowa postaæ</option>[end] [if-one user_can_use_raw]<option[is item_content_type_is "raw"] selected[end] value="4">{form_emacs_content_type_raw}</option>[end]
</select> </select>

View File

@ -1,14 +1,14 @@
<h1 class="simple">Ostatnio logowani u¿ytkownicy</h1> <h1 class="simple">{last_header}</h1>
[if-one last_tab] [if-one last_tab]
<table>
<table> <tr><th>{last_table_login}</th><th>{last_table_ip}</th><th>{last_table_login_date}</th><th>{last_table_logout_date}</th></tr>
<tr><th>Login</th><th>Adres IP</th><th>Czas zalogowania</th><th>Czas wylogowania</th></tr> [for last_tab]
[for last_tab] <tr><td>[last_tab_name]</td><td>[last_tab_ip]</td><td>[last_tab_start]</td><td>[last_tab_end]</td></tr>
<tr><td>[last_tab_name]</td><td>[last_tab_ip]</td><td>[last_tab_start]</td><td>[last_tab_end]</td></tr> [end]
[end] </table>
</table>
[else] [else]
<p>Nie ma dostêpnych ¿adnych informacji.</p> <p>{last_none}</p>
[end] [end]

View File

@ -1,34 +1,22 @@
[if-one dir_can_write dir_can_remove]
<ul class="itemmenu">
[if-one dir_can_write]<li><a href="[doc_base_url][dir]mkdir">Dodaj katalog</a></li>[end]
[if-one dir_can_remove]<li><a href="[doc_base_url][dir]rm/confirm">Usuñ katalog</a></li>[end]
[if-one dir_can_write]<li><a href="[doc_base_url][dir]emacs">Dodaj pozycjê</a></li>[end]
</ul>
[end]
[if-no item_is] [if-no item_is]
[if-one dir_childs_tab]
[if-one dir_childs_tab] <ul>
<!--<h2>Katalogi:</h2>--> [for dir_childs_tab]
<li><a href="[doc_base_url][dir][dir_childs_tab_url]">[dir_childs_tab_url]/</a></li>
<ul> [end]
[for dir_childs_tab] </ul>
<li><a href="[doc_base_url][dir][dir_childs_tab_url]">[dir_childs_tab_url]/</a></li>[end] [end]
</ul>
[end] [end]
[end]
[if-one item_tab] [if-one item_tab]
<!--<h2>Pozycje:</h2>--> <ul>
[for item_tab]
<ul> <li><a href="[doc_base_url][dir][item_tab_url]">[item_tab_url]</a></li>
[for item_tab] [end]
<li><a href="[doc_base_url][dir][item_tab_url]">[item_tab_url]</a></li>[end] </ul>
</ul>
[end] [end]

View File

@ -1,18 +1,21 @@
<h1>Stwórz katalog</h1> <h1>{mkdir_header}</h1>
[if-any done_added_dir done_is_error] [if-any done_added_dir done_is_error]
<p>Przykro nam ale wystąpiły błędy podczas tworzenia tego katalogu.<br> <p>{mkdir_was_error}<br>
Kod błędu: [done_status]</p> {error_code}: [done_status]</p>
[end] [end]
<form id="additem" method="post" action="[doc_base_url][dir]mkdir"> <form id="additem" method="post" action="[doc_base_url][dir]mkdir">
<fieldset> <fieldset>
<legend>Wypełnij wszystkie pozycje formularza</legend> <legend>{mkdir_form_legend}</legend>
Tytuł:<br> {title}<br>
<input class="edit" type="text" name="subject" value=""> <input class="edit" type="text" name="subject" value="">
Url:<br> {url}<br>
<input class="edit" type="text" name="url" value=""> <input class="edit" type="text" name="url" value="">
<input class="submit" type="submit" value="Dodaj"> <input class="submit" type="submit" value="{add}">
</fieldset> </fieldset>
</form> </form>

View File

@ -1,32 +1,40 @@
<h1>Zmieñ uprawnienia dostêpu</h1> <h1>{priv_header}</h1>
[if-any done_privileged_item done_is_error] [if-any done_privileged_item done_is_error]
<p>Przykro nam ale wyst±pi³y b³êdy podczas zmiany uprawnieñ.<br> <p>{priv_was_error}<br>
Kod b³êdu: [done_status]</p> {error_code}: [done_status]</p>
[end] [end]
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]priv"> <form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]priv">
<fieldset> <fieldset>
<legend>Uprawnienia</legend> <legend>{priv_form_legend}</legend>
<table class="withoutborder">
<table class="withoutborder"> <tr><td>{user}:</td><td>
<tr><td>U¿ytkownik:</td><td> <select name="user" class="users">
<select name="user" class="users">[for priv_user_tab] [for priv_user_tab]
<option[if-one priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>[end] <option[if-one priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>
</select> [end]
</td></tr> </select>
</td></tr>
<tr><td>Grupa: </td><td>
<select name="group" class="groups">[for priv_group_tab] <tr><td>{group}: </td><td>
<option[if-one priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>[end] <select name="group" class="groups">
</select> [for priv_group_tab]
</td></tr> <option[if-one priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
<tr><td>Uprawnienia:</td><td><input class="privileges" type="text" name="privileges" value="[priv_privileges]"></td></tr> </select>
</table> </td></tr>
<input class="submit" type="submit" value="Zmieñ"> <tr><td>permissions:</td><td><input class="privileges" type="text" name="privileges" value="[priv_privileges]"></td></tr>
</table>
<input class="submit" type="submit" value="{change}">
</fieldset> </fieldset>
</form> </form>

View File

@ -1,24 +1,21 @@
<h1>Reload</h1> <h1>{reload_header}</h1>
[if-any done_reloaded_templates] [if-any done_reloaded_templates]
[if-any done_is_error]
<p>{reload_was_error}<br>
{error_code}: [done_status]</p>
[end]
[if-any done_is_error] [if-no done_is_error]
<p>Przykro nam ale wyst±pi³y b³êdy podczas ponownego wczytywania.<br> [if-any done_reloaded_templates]
Kod b³êdu: [done_status]</p> <p>{templates_reloaded_successfully}</p>
[end] [end]
[end]
[if-no done_is_error]
[if-any done_reloaded_templates]
<p>Szablony zosta³y pomy¶lnie wczytane.</p>
[end]
[end] [end]
[end] <p>{reload_select}:</p>
<a href="[doc_base_url][dir]reload/templates">{reload_templates}</a>
<p>Wybierz pozycjê:</p>
<a href="[doc_base_url][dir]reload/templates">templates</a>

View File

@ -1,26 +1,30 @@
[if-one item_is] [if-one item_is]
<h1>Czy napewno chcesz usunąć podaną pozycję?</h1>
<p> <h1>{rm_file_header}</h1>
URL: <a href="[doc_base_url][dir][item_url]">[doc_base_url][dir][item_url]</a><br>
Krótki URL: <a href="[doc_base_url]/node/[item_id]">[doc_base_url]/node/[item_id]</a><br> <p>
Tytuł: [item_subject] {url}: <a href="[doc_base_url][dir][item_url]">[doc_base_url][dir][item_url]</a><br>
</p> {title}: [item_subject]
</p>
<ul>
<li><a href="[doc_base_url][dir][item_url]/rm">Tak</a></li> <ul>
<li><a href="[doc_base_url][dir][item_url]">Nie (powrót do tej pozycji)</a></li> <li><a href="[doc_base_url][dir][item_url]/rm">{yes}</a></li>
</ul> <li><a href="[doc_base_url][dir][item_url]">{no}</a></li>
</ul>
[else] [else]
<h1>Czy napewno chcesz usunąć podany katalog?</h1>
<p> <h1>{rm_dir_header}</h1>
URL: <a href="[doc_base_url][dir]">[doc_base_url][dir]</a>
</p> <p>
{url}: <a href="[doc_base_url][dir]">[doc_base_url][dir]</a>
</p>
<ul>
<li><a href="[doc_base_url][dir]rm/r">{yes}</a></li>
<li><a href="[doc_base_url][dir]">{no}</a></li>
</ul>
<ul>
<li><a href="[doc_base_url][dir]rm/r">Tak</a></li>
<li><a href="[doc_base_url][dir]">Nie (powrót do tego katalogu)</a></li>
</ul>
[end] [end]

View File

@ -1,13 +1,25 @@
<div> <div>
[is mount_page_is "subject"] [is mount_page_is "subject"]
[is mount_page_is "info"]<h1 class="withinfo">[else]<h1>[end][item_subject]</h1> [is mount_page_is "info"]
[end] <h1 class="withinfo">
[is mount_page_is "info"] [else]
[item_info] <h1>
[end] [end]
[item_run]
[item_subject]
</h1>
[end]
[is mount_page_is "info"]
[item_info]
[end]
[item_run]
</div> </div>
[include "item_options.html"] [include "item_options.html"]

View File

@ -1,38 +1,47 @@
[if-one thread_can_create] [if-one thread_can_create]
[is mount_page_is "subject"]<h1[is mount_page_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end]
[is mount_page_is "subject"]<h1[is mount_page_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end] [is mount_page_is "info"][dir_last_info][end]
[is mount_page_is "info"][dir_last_info][end]
<ul class="itemmenu">
<ul class="itemmenu"> [if-one thread_can_create]
[if-one thread_can_create]<li><a href="[doc_base_url][dir]createthread">Za³ó¿ nowy w±tek</a></li>[end] <li><a href="[doc_base_url][dir]createthread">{thread_create_new}</a></li>
</ul> [end]
</ul>
[if-one thread_tab]
<table class="forum"> [if-one thread_tab]
<tr><th>Tytu³ w±tku</th><th>Autor</th><th>Rep.</th><th>Ostatni post</th></tr> <table class="forum">
[for thread_tab] <tr><th>{thread_table_title}</th><th>{thread_table_author}</th><th>{thread_table_replies}</th><th>{thread_table_last_post}</th></tr>
<tr><td><a href="[doc_base_url][dir][thread_tab_url]">[thread_tab_subject]</a></td><td class="smallfont">[thread_tab_author]</td><td class="smallfont">[thread_tab_answers]</td><td class="smallfont">[thread_tab_last_item_date_modification] ([thread_tab_last_item_user])</td></tr>[end] [for thread_tab]
</table> <tr>
[end] <td><a href="[doc_base_url][dir][thread_tab_url]">[thread_tab_subject]</a></td>
<td class="smallfont">[thread_tab_author]</td><td class="smallfont">[thread_tab_answers]</td>
<td class="smallfont">[thread_tab_last_item_date_modification] ([thread_tab_last_item_user])</td>
</tr>
[end]
</table>
[end]
[end] [end]
[if-one thread_is] [if-one thread_is]
[is mount_page_is "subject"]<h1[is mount_page_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end]
[is mount_page_is "subject"]<h1[is mount_page_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end] [is mount_page_is "info"][dir_last_info][end]
[is mount_page_is "info"][dir_last_info][end]
[if-one dir_can_use_emacs]
[if-one dir_can_use_emacs] <ul class="itemmenu">
<ul class="itemmenu"> <li><a href="[doc_base_url][dir]emacs">{thread_reply_in_this_thread}</a></li>
[if-one dir_can_use_emacs]<li><a href="[doc_base_url][dir]emacs">Odpowiedz w tym w±tku</a></li>[end] </ul>
</ul> [end]
[for item_tab]
<div class="threadbox[if-index item_tab odd] threadboxcolor[end]">
[is mount_thread_is "subject"]<h2[is mount_thread_is "info"] class="withinfo"[end]>[item_tab_subject]</h2>[end]
[is mount_thread_is "info"][item_tab_info][end]
[item_tab_print_content]
</div>
[end]
[end] [end]
[for item_tab]
<div class="threadbox[if-index item_tab odd] threadboxcolor[end]">
[is mount_thread_is "subject"]<h2[is mount_thread_is "info"] class="withinfo"[end]>[item_tab_subject]</h2>[end]
[is mount_thread_is "info"][item_tab_info][end]
[item_tab_print_content]
</div>
[end]
[end]

View File

@ -4,7 +4,7 @@
[if-one ticket_can_create] [if-one ticket_can_create]
<ul class="itemmenu"> <ul class="itemmenu">
<li><a href="[doc_base_url][dir]createticket">Za³ó¿ nowe zg³oszenie</a></li> <li><a href="[doc_base_url][dir]createticket">{ticket_create_new}</a></li>
</ul> </ul>
[end] [end]
@ -12,11 +12,11 @@
[if-one ticket_tab] [if-one ticket_tab]
<table class="forum"> <table class="forum">
<tr> <tr>
<th>Zg³oszenie</th> <th>{ticket_table_name}</th>
[if-any ticket_type_tab]<th>Rodzaj</th>[end] [if-any ticket_type_tab]<th>{ticket_table_type}</th>[end]
[if-any ticket_status_tab]<th>Status</th>[end] [if-any ticket_status_tab]<th>{ticket_table_status}</th>[end]
[if-any ticket_priority_tab]<th>Priorytet</th>[end] [if-any ticket_priority_tab]<th>{ticket_table_priority}</th>[end]
[if-any ticket_expected_tab]<th>Oczeki-<br>wany w</th>[end] [if-any ticket_expected_tab]<th>{ticket_table_expected}</th>[end]
</tr> </tr>
[for ticket_tab] [for ticket_tab]
<tr> <tr>
@ -33,21 +33,21 @@
[if-one ticket_is] [if-one ticket_is]
<div class="ticketinfo"> <div class="ticketinfo">
<p class="edit"><a href="[doc_base_url][dir]editticket">\[Edytuj\]</a></p> <p class="edit"><a href="[doc_base_url][dir]editticket">\[{edit}\]</a></p>
<table> <table>
[if-any ticket_type_tab]<tr><th>Rodzaj zg³oszenia:</th><td>[ticket_type]</td></tr>[end] [if-any ticket_type_tab]<tr><th>{ticket_info_type}:</th><td>[ticket_type]</td></tr>[end]
[if-any ticket_status_tab]<tr><th>Status:</th><td>[ticket_status]</td></tr>[end] [if-any ticket_status_tab]<tr><th>{ticket_info_status}:</th><td>[ticket_status]</td></tr>[end]
[if-any ticket_priority_tab]<tr><th>Piorytet:</th><td>[ticket_priority]</td></tr>[end] [if-any ticket_priority_tab]<tr><th>{ticket_info_priority}:</th><td>[ticket_priority]</td></tr>[end]
[if-any ticket_category_tab]<tr><th>Kategoria:</th><td>[ticket_category]</td></tr>[end] [if-any ticket_category_tab]<tr><th>{ticket_info_category}:</th><td>[ticket_category]</td></tr>[end]
[if-any ticket_expected_tab]<tr><th>Oczekiwany w:</th><td>[ticket_expected]</td></tr>[end] [if-any ticket_expected_tab]<tr><th>{ticket_info_expected}:</th><td>[ticket_expected]</td></tr>[end]
<tr><th>Postêp prac:</th><td>[ticket_progress]%</td></tr> <tr><th>{ticket_info_progress}:</th><td>[ticket_progress]%</td></tr>
</table> </table>
[item_print_content] [item_print_content]
</div> </div>
[if-one dir_can_use_emacs] [if-one dir_can_use_emacs]
<ul class="itemmenu"> <ul class="itemmenu">
[if-one dir_can_use_emacs]<li><a href="[doc_base_url][dir]emacs">Odpowiedz w tym w±tku</a></li>[end] <li><a href="[doc_base_url][dir]emacs">{ticket_reply_in_this_thread}</a></li>
</ul> </ul>
[end] [end]
@ -59,3 +59,5 @@
</div> </div>
[end] [end]
[end] [end]

View File

@ -1,43 +1,46 @@
[if-one item_is]<h1>Edytuj pozycjê</h1>[else]<h1>Dodaj pozycjê</h1>[end] [if-one item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[include "err_abuse.html"] [include "err_abuse.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]upload" enctype="multipart/form-data"> <form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]upload" enctype="multipart/form-data">
<fieldset> <fieldset>
<legend>Edycja pozycji.</legend> <legend>{upload_form_legend}</legend>
<input type="file" name="fileupload">
[if-one mount_type_is_cms]
<p class="withnext">Tytu³:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">Url:</p> <input type="file" name="fileupload">
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if-one mount_type_is_cms]
[if-one mount_type_is_thread] <p class="withnext">{title}:</p>
[is mount_thread_is "subject"]
<p class="withnext">Tytu³:</p>
<input class="edit" type="text" name="subject" value="[item_subject]"> <input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">Url:</p> <p class="withnext">{url}:</p>
<input class="edit" type="text" name="url" value="[item_url]"> <input class="edit" type="text" name="url" value="[item_url]">
[end] [end]
[end]
<p class="withnext">Post:</p>
<textarea class="multitext" rows="[if-one thread_is]10[else]30[end]" cols="60" name="content">[item_content]</textarea>
[if-no user_logged]
<p class="withnext">Nick:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">Rebus: Ile to jest [rebus_question]?</p> [if-one mount_type_is_thread]
<input class="edit" type="text" name="rebus"> [is mount_thread_is "subject"]
[end] <p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[end]
<input class="submit" type="submit" value="[if-one item_is]Zmieñ[else]Dodaj[end]">
<p class="withnext">{upload_content}:</p>
<textarea class="multitext" rows="[if-one thread_is]10[else]30[end]" cols="60" name="content">[item_content]</textarea>
[if-no user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
[end]
<input class="submit" type="submit" value="[if-one item_is]{change}[else]{add}[end]">
</fieldset> </fieldset>
</form> </form>

View File

@ -1,15 +1,15 @@
<h1>{who_header}</h1>
<h1>Lista sesji</h1>
[if-any who_tab] [if-any who_tab]
<table class="who"> <table class="who">
<tr><th>L.p.</th><th>U¿ytkownik</th><th>Start</th><th>Ostatnio aktywny</th></tr> <tr><th>{who_table_index}</th><th>{user}</th><th>{who_table_start}</th><th>{who_table_last_active}</th></tr>
[for who_tab] [for who_tab]
<tr><td>[who_tab_lp]</td><td>[who_tab_user]</td><td>[who_tab_time]</td><td>[who_tab_last_time]</td></tr> <tr><td>[who_tab_lp]</td><td>[who_tab_user]</td><td>[who_tab_time]</td><td>[who_tab_last_time]</td></tr>
[end] [end]
</table> </table>
[else] [else]
<p>Nie ma ¿adnych dostêpnych sesji.</p> <p>{who_none}</p>
[end] [end]

View File

@ -1,114 +1,72 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="[doc_language]"> <html lang="{language}">
<head> <head>
<title>Slimaczek.pl[doc_title]</title> <title>[doc_title]</title>
<meta http-equiv="content-type" content="text/html; charset=[doc_charset]"> <meta http-equiv="content-type" content="text/html; charset={charset}">
<meta name="description" content="Młodzieżowe Stowarzyszenie Satanistyczno-Terrorystyczne"> <meta name="description" content="">
<meta name="keywords" content="slimaczek, quake, counter-strike, cs"> <meta name="keywords" content="">
<link rel="stylesheet" href="[doc_base_url_static]/css/styles.css" type="text/css"> <link rel="stylesheet" href="[doc_base_url_static]/css/styles.css" type="text/css">
<link rel="shortcut icon" href="[doc_base_url_static]/favicon.ico"> <link rel="shortcut icon" href="[doc_base_url_static]/favicon.ico">
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<div id="header"> <div id="header">
[if-one user_logged] [if-one user_logged]
<span id="zalogowany">zalogowany jako: [user_name] <span id="zalogowany">{logged_as}: [user_name]
<a href="[doc_base_url][if-one dir_can_read_exec][dir][if-any item_is item_can_read][item_url]/[end][else]/[end]logout">wyloguj</a></span> <a href="[doc_base_url][if-one dir_can_read_exec][dir][if-any item_is item_can_read][item_url]/[end][else]/[end]logout">{logout}</a></span>
[else] [else]
<form id="loguj" method="post" action="[doc_base_url][if-one dir_can_read_exec][dir][if-any item_is item_can_read][item_url]/[end][else]/[end]login"> <form id="loguj" method="post" action="[doc_base_url][if-one dir_can_read_exec][dir][if-any item_is item_can_read][item_url]/[end][else]/[end]login">
<fieldset> <fieldset>
<legend>Logowanie:</legend> <legend>{form_login_legend}:</legend>
<input class="edit" type="text" name="login"> <input class="edit" type="text" name="login">
<input class="edit" type="password" name="password"> <input class="edit" type="password" name="password">
<input class="submit" type="submit" value="Loguj"> <input class="submit" type="submit" value="{button_login}">
<p><label><input class="remember" type="checkbox" name="rememberme">Zapamiętaj mnie</label></p> <p><label><input class="remember" type="checkbox" name="rememberme">{remember_me}</label></p>
</fieldset> </fieldset>
</form> </form>
[end] [end]
<a href="[doc_base_url]" id="logo">Strona główna</a> <a href="[doc_base_url]" id="logo">{home_page}</a>
[if-one dir_tab] [if-one dir_tab]
<ul id="current_dir"> <ul id="current_dir">
[for dir_tab] [for dir_tab]
<li><a href="[dir_tab_link]">[dir_tab_url] /&nbsp;</a></li>[end] <li><a href="[dir_tab_link]">[dir_tab_url] /&nbsp;</a></li>
[if-one item_is] [end]
<li><a href="[item_link]">[item_url]</a></li>
[end] [if-one item_is]
</ul> <li><a href="[item_link]">[item_url]</a></li>
[end]
</ul>
[end] [end]
</div> <!-- header --> </div> <!-- header -->
<div id="contentleft"> <div id="contentleft">
<h2>Quake 3</h2>
<ul class="menu">
<li><a href="[doc_base_url]/quake3/o_nas">O nas</a></li>
<li><a href="[doc_base_url]/quake3/nasze_serwery">Nasze serwery</a></li>
<li><a href="[doc_base_url]/quake3/glosowanie">Głosowanie</a></li>
<li><a href="[doc_base_url]/quake3/dodatkowe_mapy">Dodatkowe mapy</a></li>
<li><a href="[doc_base_url]/quake3/dodatki">Dodatki</a></li>
<li><a href="[doc_base_url]/quake3/konfig">Konfig</a></li>
<li><a href="[doc_base_url]/quake3/ustawienia_sieciowe">Ustawienia sieciowe</a></li>
<li><a href="[doc_base_url]/quake3/administratorzy">Administratorzy</a></li>
<li><a href="[doc_base_url]/quake3/konkurs">Konkurs</a></li>
</ul>
<h2 class="next">Counter Strike</h2>
<ul class="menu">
<li><a href="[doc_base_url]/cs/nasze_serwery">Nasze serwery</a></li>
</ul>
<h2 class="next">Forum</h2>
<ul class="menu">
<li><a href="[doc_base_url]/forum/ogolne">Ogólne</a></li>
[if-one is_group_tv]<li><a href="[doc_base_url]/forum/tv">Telewizja</a></li>
[end]
</ul>
[if-one is_group_tv]
<h2 class="next">Radio</h2>
<ul class="menu">
<li><a href="[doc_base_url]/radio/slimaczek_rock">Ślimaczek Rock</a></li>
</ul>
<h2 class="next">Telewizja</h2>
<ul class="menu">
<li><a href="[doc_base_url]/tv/jak_nas_odbierac">Jak nas odbierać</a></li>
<li><a href="[doc_base_url]/tv/program">Program</a></li>
<li><a href="[doc_base_url]/tv/bugs">Znane problemy</a></li>
</ul>
[end]
</div> <!-- contentleft --> </div> <!-- contentleft -->
<div id="contentright"> <div id="contentright">
[if-one done_loggedout]
<!--
<h1>Dziękujemy za poświęcony nam czas</h1>
<p>Zostałeś wylogowany.</p>
-->
[end]
[content] [content]
</div> <!-- contentright --> </div> <!-- contentright -->
<div id="footer"> <div id="footer">
<ul id="menu2">
<li><a href="[doc_base_url]/regulamin">Regulamin</a></li>
<li class="last"><a href="[doc_base_url]/kontakt">Kontakt</a></li>
</ul>
</div> <!-- footer --> </div> <!-- footer -->
</div> <!-- container --> </div> <!-- container -->
</body> </body>
</html> </html>

View File

@ -1 +1 @@
<p class="iteminfo">Dodane przez: [item_user], [item_date_creation][if-no item_dates_equal], ostatnio modyfikowany: [item_date_modification][end]</p> <p class="iteminfo">{added_by}: [item_user], [item_date_creation][if-no item_dates_equal], {last_modified}: [item_date_modification][end]</p>

View File

@ -1,42 +0,0 @@
[if-one done_added_dir]
[if-no done_is_error]
<p>Katalog zosta³ dodany:<br>
URL: <a href="[doc_base_url][item_old_dir][item_old_url]">[doc_base_url][item_old_dir][item_old_url]</a><br>
Krótki URL: <a href="[doc_base_url]/node/[item_old_id]">[doc_base_url]/node/[item_old_id]</a></p>
[end]
[end]
[if-one done_deleted_dir]
[if-no done_is_error]
<p>Katalog zosta³ usuniêty:<br>
URL: [doc_base_url][dir_old]
</p>
[end]
[end]
[if-one done_added_item]
[if-no done_is_error]
<p>Pozycja zosta³a dodana:<br>
URL: <a href="[doc_base_url][item_old_dir][item_old_url]">[doc_base_url][item_old_dir][item_old_url]</a><br>
Krótki URL: <a href="[doc_base_url]/node/[item_old_id]">[doc_base_url]/node/[item_old_id]</a></p>
[end]
[end]
[if-one done_edited_item]
[if-no done_is_error]
<p>Pozycja zosta³a zmodyfikowana:<br>
URL: <a href="[doc_base_url][item_old_dir][item_old_url]">[doc_base_url][item_old_dir][item_old_url]</a><br>
Krótki URL: <a href="[doc_base_url]/node/[item_old_id]">[doc_base_url]/node/[item_old_id]</a></p>
[end]
[end]
[if-one done_deleted_item]
[if-one done_is_error]
<p>Nie uda³o siê skasowaæ poni¿szej pozycji, mo¿liwe ¿e link jest nie prawid³owy:<br>
[else]
<p>Skasowano nastêpuj±c± pozycjê:<br>
Tytu³: [item_old_subject]<br>
URL: [doc_base_url][item_old_dir][item_old_url]<br>
Krótki URL: [doc_base_url]/node/[item_old_id]</p>
[end]
[end]

View File

@ -1,12 +1,12 @@
[if-one dir_can_write item_can_write] [if-one dir_can_write item_can_write]
<div class="itemoptions"> <div class="itemoptions">
<h2>Dostêpne opcje administracyjne:</h2> <h2>{admin_options}:</h2>
<ul class="itemmenu"> <ul class="itemmenu">
[if-one dir_can_write]<li><a href="[doc_base_url][dir]mkdir">Dodaj katalog</a></li>[end] [if-one dir_can_write]<li><a href="[doc_base_url][dir]mkdir">{admin_mkdir}</a></li>[end]
[if-one dir_can_write]<li><a href="[doc_base_url][dir]emacs">Dodaj pozycjê</a></li>[end] [if-one dir_can_write]<li><a href="[doc_base_url][dir]emacs">{admin_emacs_add}</a></li>[end]
[if-one item_can_write]<li><a href="[doc_base_url][dir][item_url]/emacs">Edytuj pozycjê</a></li>[end] [if-one item_can_write]<li><a href="[doc_base_url][dir][item_url]/emacs">{admin_emacs_edit}</a></li>[end]
[if-one dir_can_write]<li><a href="[doc_base_url][dir][item_url]/rm/confirm">Usuñ pozycjê</a></li>[end] [if-one dir_can_write]<li><a href="[doc_base_url][dir][item_url]/rm/confirm">{admin_rm}</a></li>[end]
</ul> </ul>
</div> </div>
[end] [end]

View File

@ -1 +1 @@
<p class="[if-index item_tab odd]itemtabinfo[else][is mount_thread_is "subject"]itemtabinfo[else]itemtabinfo2[end][end]">Dodane przez: [item_tab_user], [item_tab_date_creation][if-no item_tab_dates_equal], ostatnio modyfikowany: [item_tab_date_modification][end]</p> <p class="[if-index item_tab odd]itemtabinfo[else][is mount_thread_is "subject"]itemtabinfo[else]itemtabinfo2[end][end]">{added_by}: [item_tab_user], [item_tab_date_creation][if-no item_tab_dates_equal], {last_modified}: [item_tab_date_modification][end]</p>

View File

@ -1,52 +1,46 @@
Subject: [if-one notify_item_added]Nowości[else]Zmiany[end] Subject: [if-one notify_item_added]{notify_new}[else]{notify_change}[end]
From: Ślimaczkowe powiadomienia <dontreply@slimaczek.pl> From: {notify_from}
To: [notify_to] To: [notify_to]
Content-Type: text/plain; charset="ISO-8859-2" Content-Type: {notify_content_type}
Witamy {notify_header}
Chcielibyśmy powiadomić że właśnie[if-one notify_mount_type_is_thread] {notify_msg1}[if-one notify_mount_type_is_thread]
[if-one notify_dir_added] ktoś rozpoczął nowy wątek: [if-one notify_dir_added] {notify_msg2}
[notify_doc_base_url][notify_item_dir] [notify_doc_base_url][notify_item_dir]
[else] [else]
[if-one notify_item_added] ktoś odpowiedział w wątku: [if-one notify_item_added] {notify_msg3}
[notify_doc_base_url][notify_item_dir] [notify_doc_base_url][notify_item_dir]
[end] [end]
[end] [end]
[if-one notify_item_edited] ktoś zmienił swoją odpowiedź w wątku: [if-one notify_item_edited] {notify_msg4}
[notify_doc_base_url][notify_item_dir] [notify_doc_base_url][notify_item_dir]
[end] [end]
[if-one notify_item_deleted] czyjaś odpowiedź została skasowana z wątku: [if-one notify_item_deleted] {notify_msg5}
[notify_doc_base_url][notify_item_dir] [notify_doc_base_url][notify_item_dir]
[end] [end]
[else] [else]
[if-one notify_mount_type_is_cms] [if-one notify_mount_type_is_cms]
[if-one notify_item_added] pojawiła się nowa pozycja do poczytania: [if-one notify_item_added] {notify_msg6}
[notify_item_link] [notify_item_link]
[end] [end]
[if-one notify_item_edited] zmieniono coś na: [if-one notify_item_edited] {notify_msg7}
[notify_item_link] [notify_item_link]
[end] [end]
[if-one notify_item_deleted] skasowano następującą pozycję: [if-one notify_item_deleted] {notify_msg8}
[notify_item_link] [notify_item_link]
[end] [end]
[end] [end]
[end] [end]
Życzymy miłego dnia i zapraszamy do lektury. {notify_msg9}
{notify_footer}
--
http://www.slimaczek.pl
Ta wiadomość została wysłana automatycznie - prosimy na nią nie odpowiadać.
Jeśli nie chcesz dostawać więcej takich wiadomości możesz je wyłączyć
w swoim panelu użytkownika.

192
locale/en Executable file
View File

@ -0,0 +1,192 @@
language = en
charset = iso-8859-1
logged_as = logged as
logout = logout
form_login_legend = Loging
remember_me = Remember me
home_page = Home page
button_login = Login
added_by = Added by
last_modified = Last modified
error_404 = Error 404
error_404_msg = We are sory but there is no such a page in our service.
solve_rebus = Solve the rebus please!
suspected_spammer = You are suspected to be a spammer,<br>you cannot send anything without logging first.
was_errors = We are sory but there were some problems with the operation.
error_code = Error code
access_denied = Permission denied
access_denied_msg = We are sory but you don't have access to the page.
download = download
create_thread_header = Create thread
form_thread_legend = Thread form
button_thread_submit = Create thread
url = Url
short_url = Short url
title = Title
nick = Nick
change = Change
edit = Edit
add = Add
user = User
group = Group
permissions = Permissions
yes = Yes
no = No
rebus_how_is_it = Rebus: How is it
edit_ticket_header = Edit ticket
create_ticket_header = Create a new ticket
form_edit_ticket_legend = Edit ticket form.
form_create_ticket_legend = Ticket form.
form_ticket_type = Ticket type
form_ticket_status = Status
form_ticket_priority = Priority
form_ticket_category = Category
form_ticket_expected = Expected in
form_ticket_progress = Progress (0-100)
form_ticket_create_submit = Create a new ticket
form_ticket_edit_submit = Edit a ticket
default_header = Default item in a directory
default_was_error = We are sory but there was an error during changing the default item.
default_error_no_dir = There is no such a directory.
default_error_no_file = There is no such a file.
form_default_legend = Default item form
form_emacs_legend = Edit form
form_emacs_content_cms = Content
form_emacs_content_thread = Post
form_emacs_content_ticket = Info
form_emacs_content_type = Message type
form_emacs_content_type_text = text
form_emacs_content_type_formatted_text = formatted text
form_emacs_content_type_html = html
form_emacs_content_type_bbcode = bbcode
form_emacs_content_type_raw = raw
last_header = Last logged users
last_table_login = Login
last_table_ip = IP
last_table_login_date = Login time
last_table_logout_date = Logout time
last_none = There is no anything information.
mkdir_header = Make directory
mkdir_was_error = We are sorry but there were errors during creating the directory
mkdir_form_legend = Make directory form
priv_header = Permissions
priv_was_error = We are sorry but there were errors while changing permissions.
priv_form_legend = Permissions
reload_header = Reload
reload_was_error = We are sorry but there were errors while reloading.
templates_reloaded_successfully = Templates reloaded successfully.
reload_select = What to reload:
reload_templates = templates
rm_file_header = Are you sure you want to delete the file?
rm_dir_header = Are you sure you want to delete the directory?
thread_create_new = Create a new thread
thread_table_title = Thread title
thread_table_author = Author
thread_table_replies = Rep.
thread_table_last_post = Last post
thread_reply_in_this_thread = Reply in this thread
ticket_create_new = Create a new ticket
ticket_table_name = Ticket
ticket_table_type = Type
ticket_table_status = Status
ticket_table_priority = Priority
ticket_table_expected = Expected in
ticket_info_type = Type
ticket_info_status = Status
ticket_info_priority = Priority
ticket_info_category = Category
ticket_info_expected = Expected in
ticket_info_progress = Progress
ticket_reply_in_this_thread = Replay in this thread
upload_form_legend = Upload form
upload_content = File description
who_header = Sessions
who_table_index = Ind.
who_table_start = Start
who_table_last_active = Last active
who_none = There is no any sessions.
admin_options = Available administrative options.
admin_mkdir = Add directory
admin_emacs_add = Add file
admin_emacs_edit = Edit file
admin_rm = Remove file
# notifications
notify_new = News
notify_change = Changes
notify_from = ttmath.org notifications <dontreply@ttmath.org>
notify_content_type = text/plain; charset="ISO-8859-1"
notify_header = Welcome
notify_msg1 = We would like to inform you that
notify_msg2 = someone started a new thread:
notify_msg3 = someone replayed in a thread:
notify_msg4 = someone has changed its post:
notify_msg5 = a post has been deleted from a thread:
notify_msg6 = a new page has been added:
notify_msg7 = a page has been modified:
notify_msg8 = a page has been deleted:
notify_msg9 = We invite you to read.\nHave a good day. Bye.
notify_footer = \n\n-- \nhttp://www.ttmath.org\nThis message has been sent automatically - do not answer please.\nIf you do not want to receive such messages you can switch them off\nin your user control panel.

181
locale/pl Executable file
View File

@ -0,0 +1,181 @@
language = pl
charset = iso-8859-2
logged_as = zalogowany jako
logout = wyloguj
form_login_legend = Logowanie
remember_me = Zapamiętaj mnie
home_page = Strona główna
button_login = Loguj
added_by = Dodane przez
last_modified = ostatnio modyfikowany
error_404 = Bł±d 404
error_404_msg = Przykro nam ale podanej strony nie ma w naszym serwisie.
solve_rebus = Proszę rozwi±zać rebus!
suspected_spammer = Jeste¶ podejrzany jako spamer,<br> nie możesz nic wysłać do czasu zalogowania się!
was_errors = Przepraszamy ale wyst±piły problemy z wykonaniem tej operacji.
error_code = Kod błędu
access_denied = Brak dostępu
access_denied_msg = Przykro nam ale nie masz dostępu do tej czę¶ci serwisu.
download = ¦ci±gnij plik
create_thread_header = Załóż w±tek
form_thread_legend = Wypełnij wszystkie pozycje formularza
button_thread_submit = Załóż w±tek
url = Url
short_url = Krótki url
title = Tytuł
nick = Nick
change = Zmień
edit = Edytuj
add = Dodaj
user = Użytkownik
group = Grupa
permissions = Uprawnienia
yes = Tak
no = Nie
rebus_how_is_it = Rebus: Ile to jest
edit_ticket_header = Edytuj zgłoszenie
create_ticket_header = Nowe zgłoszenie
form_edit_ticket_legend = Formularz edycji zgłoszenia.
form_create_ticket_legend = Formularz nowego zgłoszenia.
form_ticket_type = Rodzaj zgłoszenia
form_ticket_status = Status
form_ticket_priority = Priorytet
form_ticket_category = Kategoria
form_ticket_expected = Oczekiwany w
form_ticket_progress = Postęp prac (0-100)
form_ticket_create_submit = Załóż zgłoszenie
form_ticket_edit_submit = Edytuj zgłoszenie
default_header = Domy¶lna pozycja w katalogu
default_was_error = Przykro nam ale wyst±piły błędy podczas zmiany domy¶lnej pozycji.
default_error_no_dir = Podano nie istniej±cy katalog.
default_error_no_file = Podano nie istniej±cy post.
form_default_legend = Formularz zmiany pozycji domy¶lnej
form_emacs_legend = Formularz edycji.
form_emacs_content_cms = Zawarto¶ć:
form_emacs_content_thread = Post:
form_emacs_content_ticket = Opis:
form_emacs_content_type = Rodzaj wiadomo¶ci:
form_emacs_content_type_text = text
form_emacs_content_type_formatted_text = sformatowany text
form_emacs_content_type_html = html
form_emacs_content_type_bbcode = bbcode
form_emacs_content_type_raw = surowa postać
last_header = Ostatnio logowani użytkownicy
last_table_login = Login
last_table_ip = Adres IP
last_table_login_date = Czas zalogowania
last_table_logout_date = Czas wylogowania
last_none = Nie ma dostępnych żadnych informacji.
mkdir_header = Stwórz katalog
mkdir_was_error = Przykro nam ale wyst±piły błędy podczas tworzenia tego katalogu.
mkdir_form_legend = Wypełnij wszystkie pozycje formularza
priv_header = Zmień uprawnienia dostępu
priv_was_error = Przykro nam ale wyst±piły błędy podczas zmiany uprawnień.
priv_form_legend = Uprawnienia
reload_header = Przeładuj
reload_was_error = Przykro nam ale wyst±piły błędy podczas ponownego wczytywania.
templates_reloaded_successfully = Szablony zostały pomy¶lnie wczytane.
reload_select = Wybierz pozycję
reload_templates = templates
rm_file_header = Czy napewno chcesz usun±ć podan± pozycję?
rm_dir_header = Czy napewno chcesz usun±ć podany katalog?
thread_create_new = Załóż nowy w±tek
thread_table_title = Tytuł w±tku
thread_table_author = Autor
thread_table_replies = Odp.
thread_table_last_post = Ostatni post
thread_reply_in_this_thread = Odpowiedz w tym w±tku
ticket_create_new = Załóż nowe zgłoszenie
ticket_table_name = Zgłoszenie
ticket_table_type = Rodzaj
ticket_table_status = Status
ticket_table_priority = Priorytet
ticket_table_expected = Oczeki-<br>wany w
ticket_info_type = Rodzaj zgłoszenia
ticket_info_status = Status
ticket_info_priority = Piorytet
ticket_info_category = Kategoria
ticket_info_expected = Oczekiwany w
ticket_info_progress = Postęp prac
ticket_reply_in_this_thread = Odpowiedz w tym w±tku
upload_form_legend = Formularz do wysłania pliku
upload_content = Opis pliku
who_header = Lista sesji
who_table_index = L.p.
who_table_start = Start
who_table_last_active = Ostatnio aktywny
who_none = Nie ma żadnych dostępnych sesji.
admin_options = Dostępne opcje administracyjne
admin_mkdir = Dodaj katalog
admin_emacs_add = Dodaj pozycję
admin_emacs_edit = Edytuj pozycję
admin_rm = Usuń pozycję
# notifications
notify_new = Coś nowego
notify_change = Zmiany
notify_from = ¦limaczkowe powiadomienia <dontreply@slimaczek.pl>
notify_content_type = text/plain; charset="ISO-8859-2"
notify_header = Witamy
notify_msg1 = Chcieliby¶my powiadomić że wła¶nie
notify_msg2 = kto¶ rozpocz±ł nowy w±tek:
notify_msg3 = kto¶ odpowiedział w w±tku:
notify_msg4 = kto¶ zmienił swoj± odpowiedĽ w w±tku:
notify_msg5 = czyja¶ odpowiedĽ została skasowana z w±tku:
notify_msg6 = pojawiła się nowa pozycja do poczytania:
notify_msg7 = zmieniono co¶ na:
notify_msg8 = skasowano następuj±c± pozycję:
notify_msg9 = Życzymy miłego dnia i zapraszamy do lektury.
notify_footer = \n\n-- \nhttp://www.slimaczek.pl\nTa wiadomo¶ć została wysłana automatycznie - prosimy na ni± nie odpowiadać.\nJe¶li nie chcesz dostawać więcej takich wiadomo¶ci możesz je wył±czyć\nw swoim panelu użytkownika.

View File

@ -2,18 +2,20 @@
main.o: ../core/requestcontroller.h ../content/content.h ../core/item.h main.o: ../core/requestcontroller.h ../content/content.h ../core/item.h
main.o: ../templates/templates.h ../templates/patterncacher.h main.o: ../templates/templates.h ../templates/patterncacher.h
main.o: ../core/thread.h ../core/ticket.h ../core/done.h main.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
main.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/session.h main.o: ../confparser/confparser.h ../core/thread.h ../core/ticket.h
main.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h main.o: ../core/done.h ../core/sessionmanager.h ../core/sessioncontainer.h
main.o: ../core/user.h ../core/rebus.h ../core/functionparser.h main.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
main.o: ../core/log.h ../core/user.h ../core/rebus.h ../core/functionparser.h
main.o: ../core/requesttypes.h ../core/data.h ../core/dirs.h main.o: ../core/requesttypes.h ../core/data.h ../core/dirs.h
main.o: ../core/dircontainer.h ../core/users.h ../core/ugcontainer.h main.o: ../core/dircontainer.h ../core/users.h ../core/ugcontainer.h
main.o: ../core/groups.h ../core/group.h ../core/functions.h main.o: ../core/groups.h ../core/group.h ../core/functions.h
main.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h main.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
main.o: ../core/mount.h ../core/log.h ../core/request.h ../core/thread.h main.o: ../core/mount.h ../core/locale.h ../core/log.h ../core/request.h
main.o: ../core/compress.h ../core/acceptencodingparser.h main.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
main.o: ../core/acceptbaseparser.h ../core/htmlfilter.h main.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
main.o: ../core/postmultiparser.h ../core/ticket.h ../core/db.h main.o: ../core/postmultiparser.h ../core/ticket.h ../core/db.h
main.o: ../core/config.h ../confparser/confparser.h ../core/notify.h main.o: ../core/config.h ../core/notify.h
main.o: ../templatesnotify/templatesnotify.h ../core/mount.h ../core/plugin.h main.o: ../templatesnotify/templatesnotify.h ../core/mount.h
main.o: ../core/request.h ../core/data.h ../core/pluginmsg.h main.o: ../templates/misc.h ../core/plugin.h ../core/request.h ../core/data.h
main.o: ../core/pluginmsg.h

View File

@ -35,6 +35,7 @@ Notify notify;
Plugin plugin; Plugin plugin;
void signal_term(int) void signal_term(int)
{ {
req_controller.SaveSessions(); req_controller.SaveSessions();
@ -62,7 +63,6 @@ void print_syntax()
int main(int argv, char ** argc) int main(int argv, char ** argc)
{ {
std::srand(std::time(0)); std::srand(std::time(0));
@ -74,8 +74,6 @@ int main(int argv, char ** argc)
} }
data.config_file = argc[1]; data.config_file = argc[1];
if( !config.ReadConfig(true) ) /* errors to stdout */ if( !config.ReadConfig(true) ) /* errors to stdout */
return 2; return 2;
@ -107,9 +105,12 @@ int main(int argv, char ** argc)
if( !req_controller.Init() ) if( !req_controller.Init() )
return 1; return 1;
if( !notify.Init(data.templates) ) // !! teraz mamy dwa katalogi z templetami
if( !notify.Init() )
return 2; return 2;
notify.ReadTemplates();
signal(SIGTERM, signal_term); signal(SIGTERM, signal_term);
signal(SIGINT, signal_term); signal(SIGINT, signal_term);
signal(SIGHUP, signal_hup); signal(SIGHUP, signal_hup);

View File

@ -1,6 +1,7 @@
# DO NOT DELETE # DO NOT DELETE
dir.o: templates.h patterncacher.h ../core/item.h ../core/request.h dir.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
dir.o: ../core/locale.h ../confparser/confparser.h ../core/request.h
dir.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h dir.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
dir.o: ../core/error.h ../core/log.h ../core/user.h ../core/rebus.h dir.o: ../core/error.h ../core/log.h ../core/user.h ../core/rebus.h
dir.o: ../core/function.h ../core/thread.h ../core/compress.h dir.o: ../core/function.h ../core/thread.h ../core/compress.h
@ -9,63 +10,80 @@ dir.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
dir.o: ../core/data.h ../core/dirs.h ../core/dircontainer.h ../core/users.h dir.o: ../core/data.h ../core/dirs.h ../core/dircontainer.h ../core/users.h
dir.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h dir.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h
dir.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h dir.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
dir.o: ../core/mount.h ../core/db.h ../core/log.h ../core/misc.h dir.o: ../core/mount.h ../core/locale.h ../core/db.h ../core/log.h
doc.o: templates.h patterncacher.h ../core/item.h ../core/data.h dir.o: ../core/misc.h
doc.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
doc.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
doc.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h doc.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
doc.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h doc.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
doc.o: ../core/group.h ../core/functions.h ../core/function.h doc.o: ../core/group.h ../core/functions.h ../core/function.h
doc.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h doc.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
doc.o: ../core/error.h ../core/rebus.h ../core/request.h doc.o: ../core/error.h ../core/rebus.h ../core/locale.h ../core/request.h
doc.o: ../core/requesttypes.h ../core/session.h ../core/done.h doc.o: ../core/requesttypes.h ../core/session.h ../core/done.h
doc.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h doc.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
doc.o: ../core/acceptbaseparser.h ../core/htmlfilter.h doc.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
doc.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h doc.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h
done.o: templates.h patterncacher.h ../core/item.h ../core/request.h done.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
done.o: ../core/locale.h ../confparser/confparser.h ../core/request.h
done.o: ../core/requesttypes.h ../core/session.h ../core/done.h done.o: ../core/requesttypes.h ../core/session.h ../core/done.h
done.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h done.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
done.o: ../core/rebus.h ../core/function.h ../core/thread.h done.o: ../core/rebus.h ../core/function.h ../core/thread.h
done.o: ../core/compress.h ../core/acceptencodingparser.h done.o: ../core/compress.h ../core/acceptencodingparser.h
done.o: ../core/acceptbaseparser.h ../core/htmlfilter.h done.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
done.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h done.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h
item.o: templates.h patterncacher.h ../core/item.h ../core/data.h item.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
item.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
item.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h item.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
item.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h item.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
item.o: ../core/group.h ../core/functions.h ../core/function.h item.o: ../core/group.h ../core/functions.h ../core/function.h
item.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h item.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
item.o: ../core/error.h ../core/rebus.h ../core/request.h item.o: ../core/error.h ../core/rebus.h ../core/locale.h ../core/request.h
item.o: ../core/requesttypes.h ../core/session.h ../core/done.h item.o: ../core/requesttypes.h ../core/session.h ../core/done.h
item.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h item.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
item.o: ../core/acceptbaseparser.h ../core/htmlfilter.h item.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
item.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h item.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h
last.o: templates.h patterncacher.h ../core/item.h ../core/lastcontainer.h last.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
last.o: ../core/locale.h ../confparser/confparser.h ../core/lastcontainer.h
last.o: ../core/data.h ../core/dirs.h ../core/item.h ../core/dircontainer.h last.o: ../core/data.h ../core/dirs.h ../core/item.h ../core/dircontainer.h
last.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h last.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h
last.o: ../core/groups.h ../core/group.h ../core/functions.h last.o: ../core/groups.h ../core/group.h ../core/functions.h
last.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h last.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
last.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/request.h last.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/locale.h
last.o: ../core/requesttypes.h ../core/session.h ../core/done.h last.o: ../core/request.h ../core/requesttypes.h ../core/session.h
last.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h last.o: ../core/done.h ../core/thread.h ../core/compress.h
last.o: ../core/acceptbaseparser.h ../core/htmlfilter.h last.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
last.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h last.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
mount.o: templates.h patterncacher.h ../core/item.h ../core/data.h last.o: ../core/misc.h
localefilter.o: localefilter.h ../core/locale.h ../confparser/confparser.h
localefilter.o: ../core/misc.h ../core/item.h
misc.o: ../core/data.h ../core/dirs.h ../core/item.h ../core/dircontainer.h
misc.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h
misc.o: ../core/groups.h ../core/group.h ../core/functions.h
misc.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
misc.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/locale.h
misc.o: ../core/misc.h misc.h localefilter.h ../core/locale.h
misc.o: ../confparser/confparser.h
mount.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
mount.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
mount.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h mount.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
mount.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h mount.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
mount.o: ../core/group.h ../core/functions.h ../core/function.h mount.o: ../core/group.h ../core/functions.h ../core/function.h
mount.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h mount.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
mount.o: ../core/error.h ../core/rebus.h mount.o: ../core/error.h ../core/rebus.h ../core/locale.h
patterncacher.o: patterncacher.h ../core/item.h ../core/data.h ../core/dirs.h patterncacher.o: patterncacher.h ../core/item.h ../core/data.h ../core/dirs.h
patterncacher.o: ../core/item.h ../core/dircontainer.h ../core/users.h patterncacher.o: ../core/item.h ../core/dircontainer.h ../core/users.h
patterncacher.o: ../core/user.h ../core/ugcontainer.h ../core/log.h patterncacher.o: ../core/user.h ../core/ugcontainer.h ../core/log.h
patterncacher.o: ../core/groups.h ../core/group.h ../core/functions.h patterncacher.o: ../core/groups.h ../core/group.h ../core/functions.h
patterncacher.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h patterncacher.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
patterncacher.o: ../core/mount.h ../core/error.h ../core/rebus.h patterncacher.o: ../core/mount.h ../core/error.h ../core/rebus.h
patterncacher.o: ../core/log.h patterncacher.o: ../core/locale.h ../core/log.h
priv.o: templates.h patterncacher.h ../core/item.h ../core/data.h priv.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
priv.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
priv.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h priv.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
priv.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h priv.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
priv.o: ../core/group.h ../core/functions.h ../core/function.h priv.o: ../core/group.h ../core/functions.h ../core/function.h
priv.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h priv.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
priv.o: ../core/error.h ../core/rebus.h ../core/request.h priv.o: ../core/error.h ../core/rebus.h ../core/locale.h ../core/request.h
priv.o: ../core/requesttypes.h ../core/session.h ../core/done.h priv.o: ../core/requesttypes.h ../core/session.h ../core/done.h
priv.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h priv.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
priv.o: ../core/acceptbaseparser.h ../core/htmlfilter.h priv.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
@ -79,60 +97,71 @@ rebus.o: ../core/postmultiparser.h ../core/ticket.h ../core/data.h
rebus.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h rebus.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h
rebus.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h rebus.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h
rebus.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h rebus.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
rebus.o: ../core/mount.h templates.h patterncacher.h ../core/item.h rebus.o: ../core/mount.h ../core/locale.h templates.h patterncacher.h
sys.o: templates.h patterncacher.h ../core/item.h ../core/data.h rebus.o: ../core/item.h misc.h localefilter.h ../core/locale.h
rebus.o: ../confparser/confparser.h
sys.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
sys.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
sys.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h sys.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
sys.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h sys.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
sys.o: ../core/group.h ../core/functions.h ../core/function.h sys.o: ../core/group.h ../core/functions.h ../core/function.h
sys.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h sys.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
sys.o: ../core/error.h ../core/rebus.h ../core/request.h sys.o: ../core/error.h ../core/rebus.h ../core/locale.h ../core/request.h
sys.o: ../core/requesttypes.h ../core/session.h ../core/done.h sys.o: ../core/requesttypes.h ../core/session.h ../core/done.h
sys.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h sys.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
sys.o: ../core/acceptbaseparser.h ../core/htmlfilter.h sys.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
sys.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h sys.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h
templates.o: templates.h patterncacher.h ../core/item.h ../core/data.h templates.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
templates.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
templates.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h templates.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h
templates.o: ../core/users.h ../core/user.h ../core/ugcontainer.h templates.o: ../core/users.h ../core/user.h ../core/ugcontainer.h
templates.o: ../core/log.h ../core/groups.h ../core/group.h templates.o: ../core/log.h ../core/groups.h ../core/group.h
templates.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h templates.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
templates.o: ../core/mounts.h ../core/mount.h ../core/error.h ../core/rebus.h templates.o: ../core/mounts.h ../core/mount.h ../core/error.h ../core/rebus.h
templates.o: ../core/request.h ../core/requesttypes.h ../core/session.h templates.o: ../core/locale.h ../core/request.h ../core/requesttypes.h
templates.o: ../core/done.h ../core/thread.h ../core/compress.h templates.o: ../core/session.h ../core/done.h ../core/thread.h
templates.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h templates.o: ../core/compress.h ../core/acceptencodingparser.h
templates.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h templates.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
templates.o: ../core/misc.h ../core/plugin.h ../core/request.h ../core/data.h templates.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h
templates.o: ../core/plugin.h ../core/request.h ../core/data.h
templates.o: ../core/pluginmsg.h templates.o: ../core/pluginmsg.h
thread.o: templates.h patterncacher.h ../core/item.h ../core/data.h thread.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
thread.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
thread.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h thread.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h
thread.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h thread.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h
thread.o: ../core/groups.h ../core/group.h ../core/functions.h thread.o: ../core/groups.h ../core/group.h ../core/functions.h
thread.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h thread.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
thread.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/request.h thread.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/locale.h
thread.o: ../core/requesttypes.h ../core/session.h ../core/done.h thread.o: ../core/request.h ../core/requesttypes.h ../core/session.h
thread.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h thread.o: ../core/done.h ../core/thread.h ../core/compress.h
thread.o: ../core/acceptbaseparser.h ../core/htmlfilter.h thread.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
thread.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h thread.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
ticket.o: templates.h patterncacher.h ../core/item.h ../core/data.h thread.o: ../core/misc.h
ticket.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
ticket.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
ticket.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ticket.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h
ticket.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h ticket.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h
ticket.o: ../core/groups.h ../core/group.h ../core/functions.h ticket.o: ../core/groups.h ../core/group.h ../core/functions.h
ticket.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h ticket.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
ticket.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/request.h ticket.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/locale.h
ticket.o: ../core/requesttypes.h ../core/session.h ../core/done.h ticket.o: ../core/request.h ../core/requesttypes.h ../core/session.h
ticket.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h ticket.o: ../core/done.h ../core/thread.h ../core/compress.h
ticket.o: ../core/acceptbaseparser.h ../core/htmlfilter.h ticket.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
ticket.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h ticket.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
user.o: templates.h patterncacher.h ../core/item.h ../core/data.h ticket.o: ../core/misc.h
user.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
user.o: ../core/locale.h ../confparser/confparser.h ../core/data.h
user.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h user.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
user.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h user.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
user.o: ../core/group.h ../core/functions.h ../core/function.h user.o: ../core/group.h ../core/functions.h ../core/function.h
user.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h user.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
user.o: ../core/error.h ../core/rebus.h ../core/request.h user.o: ../core/error.h ../core/rebus.h ../core/locale.h ../core/request.h
user.o: ../core/requesttypes.h ../core/session.h ../core/done.h user.o: ../core/requesttypes.h ../core/session.h ../core/done.h
user.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h user.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
user.o: ../core/acceptbaseparser.h ../core/htmlfilter.h user.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
user.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h user.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h
who.o: templates.h patterncacher.h ../core/item.h ../core/sessioncontainer.h who.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
who.o: ../core/locale.h ../confparser/confparser.h ../core/sessioncontainer.h
who.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h who.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
who.o: ../core/log.h ../core/user.h ../core/rebus.h who.o: ../core/log.h ../core/user.h ../core/rebus.h
who.o: ../core/requestcontroller.h ../content/content.h who.o: ../core/requestcontroller.h ../content/content.h
@ -142,7 +171,7 @@ who.o: ../core/functionparser.h ../core/requesttypes.h ../core/data.h
who.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h who.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h
who.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h who.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h
who.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h who.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
who.o: ../core/mounts.h ../core/mount.h ../core/request.h ../core/thread.h who.o: ../core/mounts.h ../core/mount.h ../core/locale.h ../core/request.h
who.o: ../core/compress.h ../core/acceptencodingparser.h who.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
who.o: ../core/acceptbaseparser.h ../core/htmlfilter.h who.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
who.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h who.o: ../core/postmultiparser.h ../core/ticket.h ../core/misc.h

View File

@ -1 +1 @@
o = dir.o doc.o done.o item.o last.o mount.o patterncacher.o priv.o rebus.o sys.o templates.o thread.o ticket.o user.o who.o o = dir.o doc.o done.o item.o last.o localefilter.o misc.o mount.o patterncacher.o priv.o rebus.o sys.o templates.o thread.o ticket.o user.o who.o

View File

@ -228,7 +228,10 @@ void dir_last_subject(Info & i)
void dir_last_info(Info & i) void dir_last_info(Info & i)
{ {
Ezc::Generator gen(i.out, pat_dir_last_info, functions); if( static_cast<size_t>(data.locale.GetLang()) >= patterns.size() )
return;
Ezc::Generator gen(i.out, patterns[data.locale.GetLang()][pat_dir_last_info], functions);
gen.Generate(); gen.Generate();
} }

View File

@ -21,13 +21,6 @@ namespace TemplatesFunctions
void doc_language(Info & i)
{
// at the moment only Polish language
i.out << "pl";
}
void doc_title(Info & i) void doc_title(Info & i)
{ {
@ -49,11 +42,6 @@ void doc_title(Info & i)
void doc_charset(Info & i)
{
i.out << "iso-8859-2";
}

View File

@ -190,7 +190,10 @@ void item_can_write(Info & i)
void item_info(Info & i) void item_info(Info & i)
{ {
Ezc::Generator gen(i.out, pat_item_info, functions); if( static_cast<size_t>(data.locale.GetLang()) >= patterns.size() )
return;
Ezc::Generator gen(i.out, patterns[data.locale.GetLang()][pat_item_info], functions);
gen.Generate(); gen.Generate();
} }
@ -448,7 +451,10 @@ void item_tab_can_read(Info & i)
void item_tab_info(Info & i) void item_tab_info(Info & i)
{ {
Ezc::Generator gen(i.out, pat_item_tab_info, functions); if( static_cast<size_t>(data.locale.GetLang()) >= patterns.size() )
return;
Ezc::Generator gen(i.out, patterns[data.locale.GetLang()][pat_item_tab_info], functions);
gen.Generate(); gen.Generate();
} }

117
templates/localefilter.cpp Executable file
View File

@ -0,0 +1,117 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#include "localefilter.h"
#include "../core/misc.h"
LocaleFilter::LocaleFilter()
{
open_mark = '{';
closing_mark = '}';
}
void LocaleFilter::ReadKey()
{
key.clear();
for( ; *pchar && *pchar != closing_mark ; ++pchar)
key += *pchar;
// skipping last closing mark (if exists)
if( *pchar == closing_mark )
++pchar;
TrimWhite(key);
}
std::string & LocaleFilter::FilterValue(const std::string & in)
{
value.clear();
const char * p = in.c_str();
while( *p )
{
if( *p == '\\' && (*(p+1) == 'n') )
{
value += '\n';
p += 2;
}
else
if( *p == '\\' && (*(p+1) == '\\') )
{
value += '\\';
p += 2;
}
else
{
value += *p;
p += 1;
}
}
return value;
}
void LocaleFilter::Parse(std::string & str)
{
res.clear();
pchar = str.c_str();
while( *pchar )
{
if( *pchar == open_mark )
{
++pchar;
ReadKey();
res += FilterValue(plocale->Get(key));
}
else
if( *pchar == '\\' && (*(pchar+1) == open_mark || *(pchar+1) == closing_mark || *(pchar+1) == '\\') )
{
res += *(pchar+1);
pchar += 2;
}
else
{
res += *pchar;
pchar += 1;
}
}
str = res;
}
void LocaleFilter::FilterText(Ezc::Pattern::Item & item)
{
if( !item.text.empty() )
Parse(item.text);
std::vector<Ezc::Pattern::Item*>::iterator i = item.item_table.begin();
for( ; i != item.item_table.end() ; ++i )
FilterText(**i);
}
void LocaleFilter::Filter(Ezc::Pattern & pattern, const Locale & locale)
{
plocale = &locale;
FilterText( pattern.item_root );
}

46
templates/localefilter.h Executable file
View File

@ -0,0 +1,46 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslutemplateslocalefilter
#define headerfilecmslutemplateslocalefilter
#include "../core/locale.h"
#include "ezc.h"
class LocaleFilter
{
public:
LocaleFilter();
void Filter(Ezc::Pattern & pattern, const Locale & locale);
private:
void ReadKey();
std::string & FilterValue(const std::string & in);
void FilterText(Ezc::Pattern::Item & item);
void Parse(std::string & str);
char open_mark; // default '{'
char closing_mark; // default '}'
const Locale * plocale;
std::string res;
std::string key;
std::string value;
const char * pchar;
};
#endif

88
templates/misc.cpp Executable file
View File

@ -0,0 +1,88 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#include "../core/data.h"
#include "../core/misc.h"
#include "misc.h"
namespace TemplatesMisc
{
// those functions from here are used in the second thread too
void Read(Patterns & patterns, size_t pat, LocaleFilter & locale_filter, const std::string & dir, const char * file, bool delete_white)
{
size_t i;
size_t len = patterns.size();
Locale::Lang old_lang = data.locale.GetLang();
for(i=0 ; i<len ; ++i)
{
if( pat < patterns[i].size() )
{
patterns[i][pat].delete_all_white = delete_white;
patterns[i][pat].Directory(dir);
patterns[i][pat].ParseFile(file);
Locale::Lang new_lang = static_cast<Locale::Lang>(i);
data.locale.SetLang(new_lang);
locale_filter.Filter(patterns[i][pat], data.locale);
log << "Read pattern: " << dir << "/" << file << " for lang: " << data.locale.LangToStr(new_lang) << logend;
}
}
data.locale.SetLang(old_lang);
}
void Read(Patterns & patterns, size_t pat, LocaleFilter & locale_filter, const char * file, bool delete_white)
{
std::string temp = data.templates_dir;
temp += '/';
temp += file;
if( IsFile(temp) )
{
Read(patterns, pat, locale_filter, data.templates_dir, file, delete_white);
}
else
{
Read(patterns, pat, locale_filter, data.templates_dir_default, file, delete_white);
}
}
void ClearPatterns(Patterns & patterns, size_t len)
{
size_t loc, pat;
patterns.resize(Locale::lang_unknown);
for(loc=0 ; loc < static_cast<size_t>(Locale::lang_unknown) ; ++loc)
{
patterns[loc].resize(len);
for(pat=0 ; pat<len ; ++pat)
patterns[loc][pat].Clear();
}
}
} // namespace TemplatesMisc

40
templates/misc.h Executable file
View File

@ -0,0 +1,40 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslutemplatesmisc
#define headerfilecmslutemplatesmisc
#include <vector>
#include <string>
#include "localefilter.h"
#include "ezc.h"
namespace TemplatesMisc
{
typedef std::vector<std::vector<Ezc::Pattern> > Patterns;
// those functions from here are used in the second thread too
void Read(Patterns & patterns, size_t pat, LocaleFilter & locale_filter, const std::string & dir, const char * file, bool delete_white = false);
void Read(Patterns & patterns, size_t pat, LocaleFilter & locale_filter, const char * file, bool delete_white = false);
void ClearPatterns(Patterns & patterns, size_t len);
} // namespace TemplatesMisc
#endif

View File

@ -2,12 +2,13 @@
* This file is a part of CMSLU -- Content Management System like Unix * This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2009, Tomasz Sowa * Copyright (c) 2008-2010, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
#include "templates.h" #include "templates.h"
#include "localefilter.h"
#include "../core/data.h" #include "../core/data.h"
#include "../core/request.h" #include "../core/request.h"
#include "../core/misc.h" #include "../core/misc.h"
@ -16,37 +17,11 @@
namespace TemplatesFunctions namespace TemplatesFunctions
{ {
Ezc::Pattern pat_index;
Ezc::Pattern pat_fun_cat;
Ezc::Pattern pat_fun_ls;
Ezc::Pattern pat_fun_emacs;
Ezc::Pattern pat_fun_mkdir;
Ezc::Pattern pat_fun_default;
Ezc::Pattern pat_fun_priv;
Ezc::Pattern pat_fun_rm;
Ezc::Pattern pat_fun_who;
Ezc::Pattern pat_fun_run;
Ezc::Pattern pat_fun_last;
Ezc::Pattern pat_fun_thread;
Ezc::Pattern pat_fun_reload;
Ezc::Pattern pat_fun_createthread;
Ezc::Pattern pat_fun_upload;
Ezc::Pattern pat_fun_ticket;
Ezc::Pattern pat_fun_createticket;
Ezc::Pattern pat_err_item_required;
Ezc::Pattern pat_err_404;
Ezc::Pattern pat_err_per_denied;
Ezc::Pattern pat_err_others;
Ezc::Pattern pat_item_info;
Ezc::Pattern pat_item_tab_info;
Ezc::Pattern pat_dir_last_info;
TemplatesMisc::Patterns patterns;
Ezc::Functions functions; Ezc::Functions functions;
PatternCacher pattern_cacher;
LocaleFilter locale_filter;
PatternCacher pattern_cacher;
@ -60,86 +35,44 @@ Ezc::Pattern * content_for_function()
{ {
Ezc::Pattern * p = 0; Ezc::Pattern * p = 0;
if( !request.pfunction ) if( !request.pfunction )
{ {
log << log1 << "Templates: no function" << logend; log << log1 << "Templates: no function" << logend;
return p; return p;
} }
static PatName pat_name_tab[] = {
{FUN_CAT, pat_fun_cat},
{FUN_LS, pat_fun_ls},
{FUN_RM, pat_fun_rm},
{FUN_EMACS, pat_fun_emacs},
{FUN_MKDIR, pat_fun_mkdir},
{FUN_DEFAULT, pat_fun_default},
{FUN_PRIV, pat_fun_priv},
{FUN_RUN, pat_fun_run},
{FUN_WHO, pat_fun_who},
{FUN_LAST, pat_fun_last},
{FUN_THREAD, pat_fun_thread},
{FUN_RELOAD, pat_fun_reload},
{FUN_CREATETHREAD, pat_fun_createthread},
{FUN_TICKET, pat_fun_ticket},
{FUN_CREATETICKET, pat_fun_createticket},
{FUN_EDITTICKET, pat_fun_createticket},
{FUN_UPLOAD, pat_fun_upload}
};
switch( request.pfunction->code ) size_t i, len = sizeof(pat_name_tab)/sizeof(PatName);
for(i=0 ; i<len ; ++i)
{ {
case FUN_CAT: if( pat_name_tab[i].fun_code == request.pfunction->code )
p = &pat_fun_cat; {
break; // !! data.locale.GetLang() bedzie brane indywidualnie dla kazdego uzytkownika
p = &patterns[data.locale.GetLang()][pat_name_tab[i].pat];
case FUN_LS: break;
p = &pat_fun_ls; }
break;
case FUN_RM:
p = &pat_fun_rm;
break;
case FUN_EMACS:
p = &pat_fun_emacs;
break;
case FUN_MKDIR:
p = &pat_fun_mkdir;
break;
case FUN_DEFAULT:
p = &pat_fun_default;
break;
case FUN_PRIV:
p = &pat_fun_priv;
break;
case FUN_RUN:
p = &pat_fun_run;
break;
case FUN_WHO:
p = &pat_fun_who;
break;
case FUN_LAST:
p = &pat_fun_last;
break;
case FUN_THREAD:
p = &pat_fun_thread;
break;
case FUN_RELOAD:
p = &pat_fun_reload;
break;
case FUN_CREATETHREAD:
p = &pat_fun_createthread;
break;
case FUN_TICKET:
p = &pat_fun_ticket;
break;
case FUN_CREATETICKET:
case FUN_EDITTICKET:
p = &pat_fun_createticket;
break;
case FUN_UPLOAD:
p = &pat_fun_upload;
break;
default:
break;
} }
return p; return p;
} }
@ -149,6 +82,13 @@ void content(Info & i)
{ {
Ezc::Pattern * p = 0; Ezc::Pattern * p = 0;
if( static_cast<size_t>(data.locale.GetLang()) >= patterns.size() )
{
log << log1 << "Templates: there is no such a language in patterns" << logend;
return;
}
switch( request.status ) switch( request.status )
{ {
case Error::ok: case Error::ok:
@ -165,17 +105,20 @@ Ezc::Pattern * p = 0;
case Error::cant_change_user: case Error::cant_change_user:
case Error::cant_change_group: case Error::cant_change_group:
case Error::cant_change_privileges: case Error::cant_change_privileges:
p = &pat_err_per_denied; // !! data.locale.GetLang() bedzie brane indywidualnie dla kazdego uzytkownika
p = &patterns[data.locale.GetLang()][pat_err_per_denied];
break; break;
case Error::no_item: case Error::no_item:
case Error::no_function: case Error::no_function:
case Error::unknown_param: case Error::unknown_param:
p = &pat_err_404; // !! data.locale.GetLang() bedzie brane indywidualnie dla kazdego uzytkownika
p = &patterns[data.locale.GetLang()][pat_err_404];
break; break;
default: default:
p = &pat_err_others; // !! data.locale.GetLang() bedzie brane indywidualnie dla kazdego uzytkownika
p = &patterns[data.locale.GetLang()][pat_err_others];
break; break;
} }
@ -218,9 +161,7 @@ void Templates::CreateFunctions()
/* /*
doc doc
*/ */
functions.Insert("doc_language", doc_language);
functions.Insert("doc_title", doc_title); functions.Insert("doc_title", doc_title);
functions.Insert("doc_charset", doc_charset);
functions.Insert("doc_base_url", doc_base_url); functions.Insert("doc_base_url", doc_base_url);
functions.Insert("doc_base_url_static", doc_base_url_static); functions.Insert("doc_base_url_static", doc_base_url_static);
functions.Insert("doc_base_url_static_auth", doc_base_url_static_auth); functions.Insert("doc_base_url_static_auth", doc_base_url_static_auth);
@ -482,90 +423,59 @@ void Templates::CreateFunctions()
void Templates::ReadTemplates() void Templates::ReadTemplates()
{ {
using namespace TemplatesFunctions; using namespace TemplatesFunctions;
using namespace TemplatesMisc;
pat_index.Directory(data.templates);
pat_index.ParseFile("index.html");
pat_err_404.Directory(data.templates);
pat_err_404.ParseFile("err_404.html");
pat_err_per_denied.Directory(data.templates); ClearPatterns();
pat_err_per_denied.ParseFile("err_per_denied.html");
pat_fun_cat.Directory(data.templates); Read(patterns, pat_index, locale_filter, "index.html");
pat_fun_cat.ParseFile("fun_cat.html"); Read(patterns, pat_err_404, locale_filter, "err_404.html");
Read(patterns, pat_err_per_denied, locale_filter, "err_per_denied.html");
pat_fun_ls.Directory(data.templates); Read(patterns, pat_fun_cat, locale_filter, "fun_cat.html");
pat_fun_ls.ParseFile("fun_ls.html"); Read(patterns, pat_fun_ls, locale_filter, "fun_ls.html");
Read(patterns, pat_fun_rm, locale_filter, "fun_rm.html");
pat_fun_rm.Directory(data.templates); Read(patterns, pat_fun_emacs, locale_filter, "fun_emacs.html");
pat_fun_rm.ParseFile("fun_rm.html"); Read(patterns, pat_fun_mkdir, locale_filter, "fun_mkdir.html");
Read(patterns, pat_fun_default, locale_filter, "fun_default.html");
pat_err_item_required.Directory(data.templates); Read(patterns, pat_fun_priv, locale_filter, "fun_priv.html");
pat_err_item_required.ParseFile("err_item_required.html"); Read(patterns, pat_err_others, locale_filter, "err_others.html");
Read(patterns, pat_fun_who, locale_filter, "fun_who.html");
pat_fun_emacs.Directory(data.templates); Read(patterns, pat_fun_run, locale_filter, "fun_run.html");
pat_fun_emacs.ParseFile("fun_emacs.html"); Read(patterns, pat_fun_last, locale_filter, "fun_last.html");
Read(patterns, pat_item_info, locale_filter, "item_info.html");
pat_fun_mkdir.Directory(data.templates); Read(patterns, pat_item_tab_info, locale_filter, "item_tab_info.html");
pat_fun_mkdir.ParseFile("fun_mkdir.html"); Read(patterns, pat_fun_thread, locale_filter, "fun_thread.html");
Read(patterns, pat_fun_createthread,locale_filter, "fun_createthread.html");
pat_fun_default.Directory(data.templates); Read(patterns, pat_dir_last_info, locale_filter, "dir_last_info.html");
pat_fun_default.ParseFile("fun_default.html"); Read(patterns, pat_fun_reload, locale_filter, "fun_reload.html");
Read(patterns, pat_fun_upload, locale_filter, "fun_upload.html");
pat_fun_priv.Directory(data.templates); Read(patterns, pat_fun_ticket, locale_filter, "fun_ticket.html");
pat_fun_priv.ParseFile("fun_priv.html"); Read(patterns, pat_fun_createticket,locale_filter, "fun_createticket.html");
pat_err_others.Directory(data.templates);
pat_err_others.ParseFile("err_others.html");
pat_fun_who.Directory(data.templates);
pat_fun_who.ParseFile("fun_who.html");
pat_fun_run.Directory(data.templates);
pat_fun_run.ParseFile("fun_run.html");
pat_fun_last.Directory(data.templates);
pat_fun_last.ParseFile("fun_last.html");
pat_item_info.Directory(data.templates);
pat_item_info.ParseFile("item_info.html");
pat_item_tab_info.Directory(data.templates);
pat_item_tab_info.ParseFile("item_tab_info.html");
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");
pat_dir_last_info.Directory(data.templates);
pat_dir_last_info.ParseFile("dir_last_info.html");
pat_fun_reload.Directory(data.templates);
pat_fun_reload.ParseFile("fun_reload.html");
pat_fun_upload.Directory(data.templates);
pat_fun_upload.ParseFile("fun_upload.html");
pat_fun_ticket.Directory(data.templates);
pat_fun_ticket.ParseFile("fun_ticket.html");
pat_fun_createticket.Directory(data.templates);
pat_fun_createticket.ParseFile("fun_createticket.html");
} }
void Templates::ClearPatterns()
{
using namespace TemplatesFunctions;
TemplatesMisc::ClearPatterns(patterns, pat_last);
}
void Templates::Generate() void Templates::Generate()
{ {
using namespace TemplatesFunctions; using namespace TemplatesFunctions;
Ezc::Generator generator(request.page, pat_index, functions); // !! locale beda w zaleznosci od uzytkownika
if( static_cast<size_t>(data.locale.GetLang()) >= patterns.size() )
return;
Ezc::Generator generator(request.page, patterns[data.locale.GetLang()][pat_index], functions);
generator.Generate(); generator.Generate();
} }
@ -582,3 +492,10 @@ using namespace TemplatesFunctions;
item_run(info); item_run(info);
} }
Templates::Templates()
{
ClearPatterns();
}

View File

@ -2,7 +2,7 @@
* This file is a part of CMSLU -- Content Management System like Unix * This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2009, Tomasz Sowa * Copyright (c) 2008-2010, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,9 +12,9 @@
#include <iomanip> #include <iomanip>
#include <set> #include <set>
#include "ezc.h" #include "ezc.h"
#include "patterncacher.h" #include "patterncacher.h"
#include "misc.h"
@ -22,11 +22,45 @@ namespace TemplatesFunctions
{ {
using Ezc::Info; using Ezc::Info;
enum Pat {
pat_index = 0, // first should be zero
pat_fun_cat,
pat_fun_ls,
pat_fun_emacs,
pat_fun_mkdir,
pat_fun_default,
pat_fun_priv,
pat_fun_rm,
pat_fun_who,
pat_fun_run,
pat_fun_last,
pat_fun_thread,
pat_fun_reload,
pat_fun_createthread,
pat_fun_upload,
pat_fun_ticket,
pat_fun_createticket,
pat_err_404,
pat_err_per_denied,
pat_err_others,
pat_item_info,
pat_item_tab_info,
pat_dir_last_info,
pat_last // should be last
};
struct PatName
{
int fun_code;
Pat pat;
};
extern TemplatesMisc::Patterns patterns;
extern PatternCacher pattern_cacher; extern PatternCacher pattern_cacher;
extern Ezc::Functions functions; extern Ezc::Functions functions;
extern Ezc::Pattern pat_item_info;
extern Ezc::Pattern pat_item_tab_info;
extern Ezc::Pattern pat_dir_last_info;
@ -41,9 +75,7 @@ namespace TemplatesFunctions
/* /*
doc doc
*/ */
void doc_language(Info & i);
void doc_title(Info & i); void doc_title(Info & i);
void doc_charset(Info & i);
void doc_base_url(Info & i); void doc_base_url(Info & i);
void doc_base_url_static(Info & i); void doc_base_url_static(Info & i);
void doc_base_url_static_auth(Info & i); void doc_base_url_static_auth(Info & i);
@ -301,11 +333,18 @@ class Templates
{ {
public: public:
Templates();
void ClearPatterns();
void ReadTemplates(); void ReadTemplates();
void CreateFunctions(); void CreateFunctions();
void Generate(); void Generate();
void GenerateRunRaw(); void GenerateRunRaw();
private:
std::string temp;
}; };

View File

@ -1,6 +1,16 @@
# DO NOT DELETE # DO NOT DELETE
notify.o: templatesnotify.h ../core/mount.h ../core/notify.h notify.o: templatesnotify.h ../core/mount.h ../core/locale.h
notify.o: ../confparser/confparser.h ../templates/misc.h
notify.o: ../templates/localefilter.h ../core/notify.h
notify.o: ../templatesnotify/templatesnotify.h notify.o: ../templatesnotify/templatesnotify.h
templatesnotify.o: templatesnotify.h ../core/mount.h ../core/misc.h templatesnotify.o: templatesnotify.h ../core/mount.h ../core/locale.h
templatesnotify.o: ../core/item.h templatesnotify.o: ../confparser/confparser.h ../templates/misc.h
templatesnotify.o: ../templates/localefilter.h ../core/misc.h ../core/item.h
templatesnotify.o: ../core/data.h ../core/dirs.h ../core/dircontainer.h
templatesnotify.o: ../core/users.h ../core/user.h ../core/ugcontainer.h
templatesnotify.o: ../core/log.h ../core/groups.h ../core/group.h
templatesnotify.o: ../core/functions.h ../core/function.h
templatesnotify.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
templatesnotify.o: ../core/error.h ../core/rebus.h ../core/locale.h
templatesnotify.o: ../core/log.h

View File

@ -9,27 +9,33 @@
#include "templatesnotify.h" #include "templatesnotify.h"
#include "../core/misc.h" #include "../core/misc.h"
#include "../core/locale.h"
#include "../core/data.h"
#include "../core/log.h"
namespace TemplatesNotifyFunctions namespace TemplatesNotifyFunctions
{ {
Ezc::Pattern pat_notify_email;
TemplatesMisc::Patterns patterns;
Ezc::Functions functions; Ezc::Functions functions;
LocaleFilter locale_filter;
// you can use this pointer in template functions (will be always valid) // you can use this pointer in template functions (will be always valid)
NotifyMsg * notify_msg; NotifyMsg * notify_msg;
} // namespace TemplatesNotifyFunctions } // namespace TemplatesNotifyFunctions
void TemplatesNotify::CreateFunctions() void TemplatesNotify::CreateFunctions()
{ {
using namespace TemplatesNotifyFunctions; using namespace TemplatesNotifyFunctions;
@ -51,22 +57,34 @@ using namespace TemplatesNotifyFunctions;
void TemplatesNotify::ClearPatterns()
void TemplatesNotify::Read(const std::string & templates_dir)
{ {
using namespace TemplatesNotifyFunctions; using namespace TemplatesNotifyFunctions;
pat_notify_email.delete_all_white = true;
pat_notify_email.Directory(templates_dir);
pat_notify_email.ParseFile("notify_email.txt");
CreateFunctions(); TemplatesMisc::ClearPatterns(patterns, pat_last);
}
// templates are read in the main thread
// (before creating the second thread)
void TemplatesNotify::Read()
{
using namespace TemplatesNotifyFunctions;
using namespace TemplatesMisc;
ClearPatterns();
TemplatesMisc::Read(patterns, pat_email_notify, locale_filter, "notify_email.txt", true);
notify_msg = 0; notify_msg = 0;
} }
void TemplatesNotify::Generate() void TemplatesNotify::Generate(Locale::Lang lang)
{ {
using namespace TemplatesNotifyFunctions; using namespace TemplatesNotifyFunctions;
@ -75,8 +93,37 @@ using namespace TemplatesNotifyFunctions;
if( !notify_msg ) if( !notify_msg )
return; return;
Ezc::Generator generator(notify_str, pat_notify_email, functions); if( static_cast<size_t>(lang) >= patterns.size() )
{
// ops, something wrong
return;
}
Ezc::Generator generator(notify_str, patterns[lang][pat_email_notify], functions);
generator.Generate(); generator.Generate();
} }
TemplatesNotify::TemplatesNotify()
{
ClearPatterns();
}

View File

@ -13,8 +13,9 @@
#include <iomanip> #include <iomanip>
#include <set> #include <set>
#include <string> #include <string>
#include "../core/mount.h" #include "../core/mount.h"
#include "../core/locale.h"
#include "../templates/misc.h"
#include "ezc.h" #include "ezc.h"
@ -23,6 +24,7 @@ struct NotifyMsg
std::string email; std::string email;
int notify_code; int notify_code;
Mount::Type current_mount_type; Mount::Type current_mount_type;
Locale::Lang lang;
std::string doc_base_url; std::string doc_base_url;
std::string item_dir; std::string item_dir;
std::string item_link; std::string item_link;
@ -33,6 +35,15 @@ namespace TemplatesNotifyFunctions
{ {
using Ezc::Info; using Ezc::Info;
enum Pat {
pat_email_notify = 0, // first should be zero
pat_last // should be last
};
typedef std::vector<std::vector<Ezc::Pattern> > Patterns;
extern TemplatesMisc::Patterns patterns;
extern NotifyMsg * notify_msg; extern NotifyMsg * notify_msg;
void notify_item_added(Info & i); void notify_item_added(Info & i);
@ -55,15 +66,21 @@ class TemplatesNotify
{ {
public: public:
void Read(const std::string & templates_dir); TemplatesNotify();
void Generate();
void Read();
void CreateFunctions();
void Generate(Locale::Lang lang);
std::ostringstream notify_str; std::ostringstream notify_str;
private: private:
void CreateFunctions(); void Read(TemplatesNotifyFunctions::Pat pat, const std::string & dir, const char * file);
void Read(TemplatesNotifyFunctions::Pat pat, const char * file);
void ClearPatterns();
std::string temp;
}; };