moved winix directories to winixdsubdirectory

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1028 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2016-03-17 08:26:02 +00:00
parent ed5adb3f23
commit 145efe937c
246 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
include Makefile.o.dep
name = ticket.so
all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name) -o $(name) $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $(LDFLAGS) *.o
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $<
depend:
makedepend -Y. $(CXXWINIXINCLUDEFLAGS) -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
clean:
rm -f *.o
rm -f *.so
rm -f $(name)
include Makefile.dep

View File

@@ -0,0 +1,774 @@
# DO NOT DELETE
createticket.o: ../../../winix/core/plugin.h pluginmsg.h
createticket.o: ../../../winix/core/log.h ../../../winix/core/textstream.h
createticket.o: ../../../winix/core/misc.h ../../../winix/core/item.h
createticket.o: ../../../pikotools/space/space.h
createticket.o: ../../../pikotools/textstream/types.h
createticket.o: ../../../pikotools/date/date.h
createticket.o: ../../../winix/core/requesttypes.h
createticket.o: ../../../pikotools/textstream/textstream.h
createticket.o: ../../../pikotools/convert/convert.h
createticket.o: ../../../pikotools/convert/inttostr.h
createticket.o: ../../../pikotools/membuffer/membuffer.h
createticket.o: ../../../pikotools/textstream/types.h
createticket.o: ../../../pikotools/utf8/utf8.h
createticket.o: ../../../winix/core/winix_const.h
createticket.o: ../../../winix/core/logmanipulators.h
createticket.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
createticket.o: ../../../winix/core/request.h ../../../winix/core/error.h
createticket.o: ../../../winix/core/config.h
createticket.o: ../../../pikotools/space/spaceparser.h
createticket.o: ../../../pikotools/space/space.h
createticket.o: ../../../winix/core/htmlfilter.h
createticket.o: ../../../winix/templates/htmltextstream.h
createticket.o: ../../../winix/core/textstream.h
createticket.o: ../../../pikotools/space/spacetojson.h
createticket.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
createticket.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
createticket.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
createticket.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
createticket.o: ../../../winix/core/system.h ../../../winix/core/job.h
createticket.o: ../../../winix/core/basethread.h
createticket.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
createticket.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
createticket.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
createticket.o: ../../../winix/db/dbtextstream.h ../../../winix/core/error.h
createticket.o: ../../../winix/db/dbitemquery.h ../../../winix/core/item.h
createticket.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
createticket.o: ../../../winix/core/group.h
createticket.o: ../../../winix/core/dircontainer.h
createticket.o: ../../../winix/core/ugcontainer.h
createticket.o: ../../../winix/notify/notify.h
createticket.o: ../../../winix/notify/notifypool.h
createticket.o: ../../../winix/templates/patterns.h
createticket.o: ../../../winix/templates/locale.h
createticket.o: ../../../winix/templates/localefilter.h
createticket.o: ../../../ezc/src/ezc.h ../../../ezc/src/generator.h
createticket.o: ../../../ezc/src/blocks.h ../../../ezc/src/cache.h
createticket.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
createticket.o: ../../../ezc/src/objects.h ../../../ezc/src/pattern.h
createticket.o: ../../../ezc/src/patternparser.h
createticket.o: ../../../winix/notify/notifythread.h
createticket.o: ../../../winix/core/basethread.h
createticket.o: ../../../winix/notify/templatesnotify.h
createticket.o: ../../../winix/core/config.h ../../../winix/core/users.h
createticket.o: ../../../winix/core/ugcontainer.h
createticket.o: ../../../winix/core/lastcontainer.h
createticket.o: ../../../winix/core/mounts.h
createticket.o: ../../../winix/core/mountparser.h ../../../winix/core/crypt.h
createticket.o: ../../../winix/core/run.h ../../../winix/core/users.h
createticket.o: ../../../winix/core/groups.h ../../../winix/core/group.h
createticket.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
createticket.o: ../../../winix/core/threadmanager.h
createticket.o: ../../../winix/core/timezones.h
createticket.o: ../../../winix/core/timezone.h
createticket.o: ../../../winix/core/sessionmanager.h
createticket.o: ../../../winix/core/sessioncontainer.h
createticket.o: ../../../winix/core/ipbancontainer.h
createticket.o: ../../../winix/core/sessionidmanager.h
createticket.o: ../../../tito/src/base64.h ../../../tito/src/aes.h
createticket.o: ../../../winix/functions/functions.h
createticket.o: ../../../winix/functions/functionbase.h
createticket.o: ../../../winix/core/request.h ../../../winix/core/system.h
createticket.o: ../../../winix/core/synchro.h
createticket.o: ../../../winix/functions/functionparser.h
createticket.o: ../../../winix/core/cur.h ../../../winix/functions/account.h
createticket.o: ../../../winix/functions/adduser.h
createticket.o: ../../../winix/functions/cat.h
createticket.o: ../../../winix/functions/chmod.h
createticket.o: ../../../winix/functions/privchanger.h
createticket.o: ../../../winix/functions/chown.h
createticket.o: ../../../winix/functions/ckeditor.h
createticket.o: ../../../winix/functions/cp.h
createticket.o: ../../../winix/functions/default.h
createticket.o: ../../../winix/functions/download.h
createticket.o: ../../../winix/functions/emacs.h
createticket.o: ../../../winix/functions/env.h
createticket.o: ../../../winix/functions/imgcrop.h
createticket.o: ../../../winix/functions/last.h
createticket.o: ../../../winix/functions/login.h
createticket.o: ../../../winix/functions/logout.h
createticket.o: ../../../winix/functions/ln.h ../../../winix/functions/ls.h
createticket.o: ../../../winix/functions/man.h
createticket.o: ../../../winix/functions/meta.h
createticket.o: ../../../winix/functions/mkdir.h
createticket.o: ../../../winix/functions/mv.h
createticket.o: ../../../winix/functions/nicedit.h
createticket.o: ../../../winix/functions/node.h
createticket.o: ../../../winix/functions/passwd.h
createticket.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
createticket.o: ../../../winix/functions/reload.h
createticket.o: ../../../winix/functions/rm.h
createticket.o: ../../../winix/functions/rmuser.h
createticket.o: ../../../winix/functions/sort.h
createticket.o: ../../../winix/functions/specialdefault.h
createticket.o: ../../../winix/functions/stat.h
createticket.o: ../../../winix/functions/subject.h
createticket.o: ../../../winix/functions/template.h
createticket.o: ../../../winix/functions/tinymce.h
createticket.o: ../../../winix/functions/uname.h
createticket.o: ../../../winix/functions/upload.h
createticket.o: ../../../winix/functions/uptime.h
createticket.o: ../../../winix/functions/who.h ../../../winix/functions/vim.h
createticket.o: ../../../winix/core/htmlfilter.h
createticket.o: ../../../winix/templates/templates.h
createticket.o: ../../../winix/templates/patterncacher.h
createticket.o: ../../../winix/templates/indexpatterns.h
createticket.o: ../../../winix/templates/patterns.h
createticket.o: ../../../winix/templates/changepatterns.h
createticket.o: ../../../winix/templates/htmltextstream.h
createticket.o: ../../../winix/core/sessionmanager.h createticket.h tdb.h
createticket.o: ticket.h ../../../winix/db/dbbase.h
createticket.o: ../../../winix/functions/functionbase.h ticketinfo.h
createticket.o: sessiondata.h ../../../winix/core/plugindata.h
createticket.o: ../../../winix/functions/rm.h
editticket.o: editticket.h tdb.h ticket.h ../../../winix/db/dbbase.h
editticket.o: ../../../winix/core/error.h ticketinfo.h
editticket.o: ../../../winix/core/item.h ../../../winix/core/system.h
editticket.o: ../../../winix/functions/functions.h
editticket.o: ../../../winix/functions/functionbase.h ../../../winix/db/db.h
editticket.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
editticket.o: ../../../winix/db/dbtextstream.h
editticket.o: ../../../winix/core/textstream.h
editticket.o: ../../../pikotools/textstream/textstream.h
editticket.o: ../../../pikotools/space/space.h
editticket.o: ../../../pikotools/textstream/types.h
editticket.o: ../../../pikotools/date/date.h
editticket.o: ../../../pikotools/convert/convert.h
editticket.o: ../../../pikotools/convert/inttostr.h
editticket.o: ../../../pikotools/membuffer/membuffer.h
editticket.o: ../../../pikotools/textstream/types.h
editticket.o: ../../../pikotools/space/spaceparser.h
editticket.o: ../../../pikotools/space/space.h
editticket.o: ../../../winix/db/dbitemquery.h
editticket.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
editticket.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
editticket.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
editticket.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
editticket.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
editticket.o: ../../../pikotools/utf8/utf8.h
editticket.o: ../../../winix/core/winix_const.h
editticket.o: ../../../winix/core/logmanipulators.h
editticket.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
editticket.o: ../../../winix/core/request.h ../../../winix/core/error.h
editticket.o: ../../../winix/core/config.h ../../../winix/core/htmlfilter.h
editticket.o: ../../../winix/templates/htmltextstream.h
editticket.o: ../../../pikotools/space/spacetojson.h
editticket.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
editticket.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
editticket.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
editticket.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
editticket.o: ../../../winix/core/request.h ../../../winix/core/config.h
editticket.o: ../../../winix/core/synchro.h ../../../winix/notify/notify.h
editticket.o: ../../../winix/notify/notifypool.h
editticket.o: ../../../winix/templates/patterns.h
editticket.o: ../../../winix/templates/locale.h
editticket.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
editticket.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
editticket.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
editticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
editticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
editticket.o: ../../../winix/notify/notifythread.h
editticket.o: ../../../winix/core/basethread.h
editticket.o: ../../../winix/notify/templatesnotify.h
editticket.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
editticket.o: ../../../winix/core/lastcontainer.h
editticket.o: ../../../winix/functions/functionparser.h
editticket.o: ../../../winix/core/cur.h ../../../winix/functions/account.h
editticket.o: ../../../winix/functions/adduser.h
editticket.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
editticket.o: ../../../winix/functions/privchanger.h
editticket.o: ../../../winix/functions/chown.h
editticket.o: ../../../winix/functions/ckeditor.h
editticket.o: ../../../winix/functions/cp.h
editticket.o: ../../../winix/functions/default.h
editticket.o: ../../../winix/functions/download.h
editticket.o: ../../../winix/functions/emacs.h ../../../winix/functions/env.h
editticket.o: ../../../winix/functions/imgcrop.h
editticket.o: ../../../winix/functions/last.h
editticket.o: ../../../winix/functions/login.h
editticket.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
editticket.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
editticket.o: ../../../winix/functions/meta.h
editticket.o: ../../../winix/functions/mkdir.h ../../../winix/functions/mv.h
editticket.o: ../../../winix/functions/nicedit.h
editticket.o: ../../../winix/functions/node.h
editticket.o: ../../../winix/functions/passwd.h
editticket.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
editticket.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
editticket.o: ../../../winix/functions/rmuser.h ../../../winix/core/run.h
editticket.o: ../../../winix/functions/sort.h
editticket.o: ../../../winix/functions/specialdefault.h
editticket.o: ../../../winix/functions/stat.h
editticket.o: ../../../winix/functions/subject.h
editticket.o: ../../../winix/functions/template.h
editticket.o: ../../../winix/core/timezone.h
editticket.o: ../../../winix/functions/tinymce.h
editticket.o: ../../../winix/functions/uname.h
editticket.o: ../../../winix/functions/upload.h
editticket.o: ../../../winix/functions/uptime.h
editticket.o: ../../../winix/functions/who.h ../../../winix/functions/vim.h
editticket.o: ../../../winix/core/htmlfilter.h
editticket.o: ../../../winix/functions/functionbase.h sessiondata.h
editticket.o: ../../../winix/core/plugindata.h ../../../winix/functions/rm.h
editticket.o: ../../../winix/core/plugin.h pluginmsg.h
editticket.o: ../../../winix/core/system.h ../../../winix/core/job.h
editticket.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
editticket.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
editticket.o: ../../../winix/core/mounts.h ../../../winix/core/mountparser.h
editticket.o: ../../../winix/core/crypt.h ../../../winix/core/users.h
editticket.o: ../../../winix/core/groups.h ../../../winix/core/group.h
editticket.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
editticket.o: ../../../winix/core/threadmanager.h
editticket.o: ../../../winix/core/timezones.h
editticket.o: ../../../winix/core/sessionmanager.h
editticket.o: ../../../winix/core/sessioncontainer.h
editticket.o: ../../../winix/core/ipbancontainer.h
editticket.o: ../../../winix/core/sessionidmanager.h
editticket.o: ../../../tito/src/base64.h ../../../tito/src/aes.h
editticket.o: ../../../winix/templates/templates.h
editticket.o: ../../../winix/templates/patterncacher.h
editticket.o: ../../../winix/templates/indexpatterns.h
editticket.o: ../../../winix/templates/patterns.h
editticket.o: ../../../winix/templates/changepatterns.h
editticket.o: ../../../winix/templates/htmltextstream.h
editticket.o: ../../../winix/core/sessionmanager.h
funticket.o: funticket.h tdb.h ticket.h ../../../winix/db/dbbase.h
funticket.o: ../../../winix/core/error.h ticketinfo.h
funticket.o: ../../../winix/core/item.h ../../../winix/core/system.h
funticket.o: ../../../winix/functions/functions.h
funticket.o: ../../../winix/functions/functionbase.h ../../../winix/db/db.h
funticket.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
funticket.o: ../../../winix/db/dbtextstream.h
funticket.o: ../../../winix/core/textstream.h
funticket.o: ../../../pikotools/textstream/textstream.h
funticket.o: ../../../pikotools/space/space.h
funticket.o: ../../../pikotools/textstream/types.h
funticket.o: ../../../pikotools/date/date.h
funticket.o: ../../../pikotools/convert/convert.h
funticket.o: ../../../pikotools/convert/inttostr.h
funticket.o: ../../../pikotools/membuffer/membuffer.h
funticket.o: ../../../pikotools/textstream/types.h
funticket.o: ../../../pikotools/space/spaceparser.h
funticket.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
funticket.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
funticket.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
funticket.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
funticket.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
funticket.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
funticket.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
funticket.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
funticket.o: ../../../winix/core/cur.h ../../../winix/core/request.h
funticket.o: ../../../winix/core/error.h ../../../winix/core/config.h
funticket.o: ../../../winix/core/htmlfilter.h
funticket.o: ../../../winix/templates/htmltextstream.h
funticket.o: ../../../pikotools/space/spacetojson.h
funticket.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
funticket.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
funticket.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
funticket.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
funticket.o: ../../../winix/core/request.h ../../../winix/core/config.h
funticket.o: ../../../winix/core/synchro.h ../../../winix/notify/notify.h
funticket.o: ../../../winix/notify/notifypool.h
funticket.o: ../../../winix/templates/patterns.h
funticket.o: ../../../winix/templates/locale.h
funticket.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
funticket.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
funticket.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
funticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
funticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
funticket.o: ../../../winix/notify/notifythread.h
funticket.o: ../../../winix/core/basethread.h
funticket.o: ../../../winix/notify/templatesnotify.h
funticket.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
funticket.o: ../../../winix/core/lastcontainer.h
funticket.o: ../../../winix/functions/functionparser.h
funticket.o: ../../../winix/core/cur.h ../../../winix/functions/account.h
funticket.o: ../../../winix/functions/adduser.h
funticket.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
funticket.o: ../../../winix/functions/privchanger.h
funticket.o: ../../../winix/functions/chown.h
funticket.o: ../../../winix/functions/ckeditor.h
funticket.o: ../../../winix/functions/cp.h ../../../winix/functions/default.h
funticket.o: ../../../winix/functions/download.h
funticket.o: ../../../winix/functions/emacs.h ../../../winix/functions/env.h
funticket.o: ../../../winix/functions/imgcrop.h
funticket.o: ../../../winix/functions/last.h ../../../winix/functions/login.h
funticket.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
funticket.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
funticket.o: ../../../winix/functions/meta.h ../../../winix/functions/mkdir.h
funticket.o: ../../../winix/functions/mv.h ../../../winix/functions/nicedit.h
funticket.o: ../../../winix/functions/node.h
funticket.o: ../../../winix/functions/passwd.h
funticket.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
funticket.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
funticket.o: ../../../winix/functions/rmuser.h ../../../winix/core/run.h
funticket.o: ../../../winix/functions/sort.h
funticket.o: ../../../winix/functions/specialdefault.h
funticket.o: ../../../winix/functions/stat.h
funticket.o: ../../../winix/functions/subject.h
funticket.o: ../../../winix/functions/template.h
funticket.o: ../../../winix/core/timezone.h
funticket.o: ../../../winix/functions/tinymce.h
funticket.o: ../../../winix/functions/uname.h
funticket.o: ../../../winix/functions/upload.h
funticket.o: ../../../winix/functions/uptime.h ../../../winix/functions/who.h
funticket.o: ../../../winix/functions/vim.h ../../../winix/core/htmlfilter.h
funticket.o: ../../../winix/functions/functionbase.h
funticket.o: ../../../winix/core/plugin.h pluginmsg.h
funticket.o: ../../../winix/core/system.h ../../../winix/core/job.h
funticket.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
funticket.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
funticket.o: ../../../winix/core/mounts.h ../../../winix/core/mountparser.h
funticket.o: ../../../winix/core/crypt.h ../../../winix/core/users.h
funticket.o: ../../../winix/core/groups.h ../../../winix/core/group.h
funticket.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
funticket.o: ../../../winix/core/threadmanager.h
funticket.o: ../../../winix/core/timezones.h
funticket.o: ../../../winix/core/sessionmanager.h
funticket.o: ../../../winix/core/sessioncontainer.h
funticket.o: ../../../winix/core/ipbancontainer.h
funticket.o: ../../../winix/core/sessionidmanager.h
funticket.o: ../../../tito/src/base64.h ../../../tito/src/aes.h
funticket.o: ../../../winix/templates/templates.h
funticket.o: ../../../winix/templates/patterncacher.h
funticket.o: ../../../winix/templates/indexpatterns.h
funticket.o: ../../../winix/templates/patterns.h
funticket.o: ../../../winix/templates/changepatterns.h
funticket.o: ../../../winix/templates/htmltextstream.h
funticket.o: ../../../winix/core/sessionmanager.h
funticket.o: ../../../winix/plugins/thread/pluginmsg.h
init.o: tdb.h ticket.h ../../../winix/db/dbbase.h ../../../winix/core/error.h
init.o: funticket.h ticketinfo.h ../../../winix/core/item.h
init.o: ../../../winix/core/system.h ../../../winix/functions/functions.h
init.o: ../../../winix/functions/functionbase.h ../../../winix/db/db.h
init.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
init.o: ../../../winix/db/dbtextstream.h ../../../winix/core/textstream.h
init.o: ../../../pikotools/textstream/textstream.h
init.o: ../../../pikotools/space/space.h
init.o: ../../../pikotools/textstream/types.h ../../../pikotools/date/date.h
init.o: ../../../pikotools/convert/convert.h
init.o: ../../../pikotools/convert/inttostr.h
init.o: ../../../pikotools/membuffer/membuffer.h
init.o: ../../../pikotools/textstream/types.h
init.o: ../../../pikotools/space/spaceparser.h
init.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
init.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
init.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
init.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
init.o: ../../../winix/core/cur.h ../../../winix/core/request.h
init.o: ../../../winix/core/error.h ../../../winix/core/config.h
init.o: ../../../winix/core/htmlfilter.h
init.o: ../../../winix/templates/htmltextstream.h
init.o: ../../../pikotools/space/spacetojson.h ../../../ezc/src/outstreams.h
init.o: ../../../winix/core/session.h ../../../winix/core/user.h
init.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
init.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
init.o: ../../../winix/templates/locale.h ../../../winix/core/request.h
init.o: ../../../winix/core/config.h ../../../winix/core/synchro.h
init.o: ../../../winix/notify/notify.h ../../../winix/notify/notifypool.h
init.o: ../../../winix/templates/patterns.h ../../../winix/templates/locale.h
init.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
init.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
init.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
init.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
init.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
init.o: ../../../winix/notify/notifythread.h ../../../winix/core/basethread.h
init.o: ../../../winix/notify/templatesnotify.h ../../../winix/core/users.h
init.o: ../../../winix/core/ugcontainer.h ../../../winix/core/lastcontainer.h
init.o: ../../../winix/functions/functionparser.h ../../../winix/core/cur.h
init.o: ../../../winix/functions/account.h ../../../winix/functions/adduser.h
init.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
init.o: ../../../winix/functions/privchanger.h
init.o: ../../../winix/functions/chown.h ../../../winix/functions/ckeditor.h
init.o: ../../../winix/functions/cp.h ../../../winix/functions/default.h
init.o: ../../../winix/functions/download.h ../../../winix/functions/emacs.h
init.o: ../../../winix/functions/env.h ../../../winix/functions/imgcrop.h
init.o: ../../../winix/functions/last.h ../../../winix/functions/login.h
init.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
init.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
init.o: ../../../winix/functions/meta.h ../../../winix/functions/mkdir.h
init.o: ../../../winix/functions/mv.h ../../../winix/functions/nicedit.h
init.o: ../../../winix/functions/node.h ../../../winix/functions/passwd.h
init.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
init.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
init.o: ../../../winix/functions/rmuser.h ../../../winix/core/run.h
init.o: ../../../winix/functions/sort.h
init.o: ../../../winix/functions/specialdefault.h
init.o: ../../../winix/functions/stat.h ../../../winix/functions/subject.h
init.o: ../../../winix/functions/template.h ../../../winix/core/timezone.h
init.o: ../../../winix/functions/tinymce.h ../../../winix/functions/uname.h
init.o: ../../../winix/functions/upload.h ../../../winix/functions/uptime.h
init.o: ../../../winix/functions/who.h ../../../winix/functions/vim.h
init.o: ../../../winix/core/htmlfilter.h
init.o: ../../../winix/functions/functionbase.h editticket.h createticket.h
init.o: showtickets.h ../../../winix/core/log.h ../../../winix/core/plugin.h
init.o: pluginmsg.h ../../../winix/core/system.h ../../../winix/core/job.h
init.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
init.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
init.o: ../../../winix/core/mounts.h ../../../winix/core/mountparser.h
init.o: ../../../winix/core/crypt.h ../../../winix/core/users.h
init.o: ../../../winix/core/groups.h ../../../winix/core/group.h
init.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
init.o: ../../../winix/core/threadmanager.h ../../../winix/core/timezones.h
init.o: ../../../winix/core/sessionmanager.h
init.o: ../../../winix/core/sessioncontainer.h
init.o: ../../../winix/core/ipbancontainer.h
init.o: ../../../winix/core/sessionidmanager.h ../../../tito/src/base64.h
init.o: ../../../tito/src/aes.h ../../../winix/templates/templates.h
init.o: ../../../winix/templates/patterncacher.h
init.o: ../../../winix/templates/indexpatterns.h
init.o: ../../../winix/templates/patterns.h
init.o: ../../../winix/templates/changepatterns.h
init.o: ../../../winix/templates/htmltextstream.h
init.o: ../../../winix/core/sessionmanager.h sessiondata.h
init.o: ../../../winix/core/plugindata.h ../../../winix/functions/rm.h
init.o: ../../../winix/plugins/thread/showthreads.h
init.o: ../../../winix/plugins/thread/threadinfo.h
init.o: ../../../winix/plugins/thread/thread.h
init.o: ../../../winix/plugins/thread/pluginmsg.h
sessiondata.o: sessiondata.h ../../../winix/core/plugindata.h ticket.h
sessiondata.o: ../../../winix/functions/rm.h ../../../pikotools/space/space.h
sessiondata.o: ../../../pikotools/textstream/types.h
showtickets.o: showtickets.h tdb.h ticket.h ../../../winix/db/dbbase.h
showtickets.o: ../../../winix/core/error.h ticketinfo.h
showtickets.o: ../../../winix/core/item.h ../../../winix/core/system.h
showtickets.o: ../../../winix/functions/functions.h
showtickets.o: ../../../winix/functions/functionbase.h ../../../winix/db/db.h
showtickets.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
showtickets.o: ../../../winix/db/dbtextstream.h
showtickets.o: ../../../winix/core/textstream.h
showtickets.o: ../../../pikotools/textstream/textstream.h
showtickets.o: ../../../pikotools/space/space.h
showtickets.o: ../../../pikotools/textstream/types.h
showtickets.o: ../../../pikotools/date/date.h
showtickets.o: ../../../pikotools/convert/convert.h
showtickets.o: ../../../pikotools/convert/inttostr.h
showtickets.o: ../../../pikotools/membuffer/membuffer.h
showtickets.o: ../../../pikotools/textstream/types.h
showtickets.o: ../../../pikotools/space/spaceparser.h
showtickets.o: ../../../pikotools/space/space.h
showtickets.o: ../../../winix/db/dbitemquery.h
showtickets.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
showtickets.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
showtickets.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
showtickets.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
showtickets.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
showtickets.o: ../../../pikotools/utf8/utf8.h
showtickets.o: ../../../winix/core/winix_const.h
showtickets.o: ../../../winix/core/logmanipulators.h
showtickets.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
showtickets.o: ../../../winix/core/request.h ../../../winix/core/error.h
showtickets.o: ../../../winix/core/config.h ../../../winix/core/htmlfilter.h
showtickets.o: ../../../winix/templates/htmltextstream.h
showtickets.o: ../../../pikotools/space/spacetojson.h
showtickets.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
showtickets.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
showtickets.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
showtickets.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
showtickets.o: ../../../winix/core/request.h ../../../winix/core/config.h
showtickets.o: ../../../winix/core/synchro.h ../../../winix/notify/notify.h
showtickets.o: ../../../winix/notify/notifypool.h
showtickets.o: ../../../winix/templates/patterns.h
showtickets.o: ../../../winix/templates/locale.h
showtickets.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
showtickets.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
showtickets.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
showtickets.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
showtickets.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
showtickets.o: ../../../winix/notify/notifythread.h
showtickets.o: ../../../winix/core/basethread.h
showtickets.o: ../../../winix/notify/templatesnotify.h
showtickets.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
showtickets.o: ../../../winix/core/lastcontainer.h
showtickets.o: ../../../winix/functions/functionparser.h
showtickets.o: ../../../winix/core/cur.h ../../../winix/functions/account.h
showtickets.o: ../../../winix/functions/adduser.h
showtickets.o: ../../../winix/functions/cat.h
showtickets.o: ../../../winix/functions/chmod.h
showtickets.o: ../../../winix/functions/privchanger.h
showtickets.o: ../../../winix/functions/chown.h
showtickets.o: ../../../winix/functions/ckeditor.h
showtickets.o: ../../../winix/functions/cp.h
showtickets.o: ../../../winix/functions/default.h
showtickets.o: ../../../winix/functions/download.h
showtickets.o: ../../../winix/functions/emacs.h
showtickets.o: ../../../winix/functions/env.h
showtickets.o: ../../../winix/functions/imgcrop.h
showtickets.o: ../../../winix/functions/last.h
showtickets.o: ../../../winix/functions/login.h
showtickets.o: ../../../winix/functions/logout.h
showtickets.o: ../../../winix/functions/ln.h ../../../winix/functions/ls.h
showtickets.o: ../../../winix/functions/man.h ../../../winix/functions/meta.h
showtickets.o: ../../../winix/functions/mkdir.h ../../../winix/functions/mv.h
showtickets.o: ../../../winix/functions/nicedit.h
showtickets.o: ../../../winix/functions/node.h
showtickets.o: ../../../winix/functions/passwd.h
showtickets.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
showtickets.o: ../../../winix/functions/reload.h
showtickets.o: ../../../winix/functions/rm.h
showtickets.o: ../../../winix/functions/rmuser.h ../../../winix/core/run.h
showtickets.o: ../../../winix/functions/sort.h
showtickets.o: ../../../winix/functions/specialdefault.h
showtickets.o: ../../../winix/functions/stat.h
showtickets.o: ../../../winix/functions/subject.h
showtickets.o: ../../../winix/functions/template.h
showtickets.o: ../../../winix/core/timezone.h
showtickets.o: ../../../winix/functions/tinymce.h
showtickets.o: ../../../winix/functions/uname.h
showtickets.o: ../../../winix/functions/upload.h
showtickets.o: ../../../winix/functions/uptime.h
showtickets.o: ../../../winix/functions/who.h ../../../winix/functions/vim.h
showtickets.o: ../../../winix/core/htmlfilter.h
showtickets.o: ../../../winix/functions/functionbase.h pluginmsg.h
showtickets.o: ../../../winix/plugins/thread/pluginmsg.h
showtickets.o: ../../../winix/core/plugin.h ../../../winix/core/system.h
showtickets.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
showtickets.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
showtickets.o: ../../../winix/core/dircontainer.h
showtickets.o: ../../../winix/core/mounts.h ../../../winix/core/mountparser.h
showtickets.o: ../../../winix/core/crypt.h ../../../winix/core/users.h
showtickets.o: ../../../winix/core/groups.h ../../../winix/core/group.h
showtickets.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
showtickets.o: ../../../winix/core/threadmanager.h
showtickets.o: ../../../winix/core/timezones.h
showtickets.o: ../../../winix/core/sessionmanager.h
showtickets.o: ../../../winix/core/sessioncontainer.h
showtickets.o: ../../../winix/core/ipbancontainer.h
showtickets.o: ../../../winix/core/sessionidmanager.h
showtickets.o: ../../../tito/src/base64.h ../../../tito/src/aes.h
showtickets.o: ../../../winix/templates/templates.h
showtickets.o: ../../../winix/templates/patterncacher.h
showtickets.o: ../../../winix/templates/indexpatterns.h
showtickets.o: ../../../winix/templates/patterns.h
showtickets.o: ../../../winix/templates/changepatterns.h
showtickets.o: ../../../winix/templates/htmltextstream.h
showtickets.o: ../../../winix/core/sessionmanager.h
tdb.o: tdb.h ticket.h ../../../winix/db/dbbase.h ../../../winix/core/error.h
tdb.o: ../../../winix/core/log.h
templates.o: ../../../ezc/src/ezc.h ../../../ezc/src/generator.h
templates.o: ../../../ezc/src/blocks.h ../../../winix/core/item.h
templates.o: ../../../pikotools/space/space.h
templates.o: ../../../pikotools/textstream/types.h
templates.o: ../../../pikotools/date/date.h ../../../ezc/src/cache.h
templates.o: ../../../ezc/src/functions.h ../../../pikotools/utf8/utf8.h
templates.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
templates.o: ../../../ezc/src/pattern.h ../../../ezc/src/outstreams.h
templates.o: ../../../ezc/src/patternparser.h ticketinfo.h ticket.h
templates.o: ../../../winix/core/item.h ../../../winix/core/system.h
templates.o: ../../../winix/functions/functions.h
templates.o: ../../../winix/functions/functionbase.h ../../../winix/db/db.h
templates.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
templates.o: ../../../winix/db/dbtextstream.h
templates.o: ../../../winix/core/textstream.h
templates.o: ../../../pikotools/textstream/textstream.h
templates.o: ../../../pikotools/convert/convert.h
templates.o: ../../../pikotools/convert/inttostr.h
templates.o: ../../../pikotools/membuffer/membuffer.h
templates.o: ../../../pikotools/textstream/types.h
templates.o: ../../../winix/core/error.h
templates.o: ../../../pikotools/space/spaceparser.h
templates.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
templates.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
templates.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
templates.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
templates.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
templates.o: ../../../winix/core/requesttypes.h
templates.o: ../../../winix/core/winix_const.h
templates.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
templates.o: ../../../winix/core/cur.h ../../../winix/core/request.h
templates.o: ../../../winix/core/error.h ../../../winix/core/config.h
templates.o: ../../../winix/core/htmlfilter.h
templates.o: ../../../winix/templates/htmltextstream.h
templates.o: ../../../pikotools/space/spacetojson.h
templates.o: ../../../winix/core/session.h ../../../winix/core/user.h
templates.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
templates.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
templates.o: ../../../winix/templates/locale.h ../../../winix/core/request.h
templates.o: ../../../winix/core/config.h ../../../winix/core/synchro.h
templates.o: ../../../winix/notify/notify.h
templates.o: ../../../winix/notify/notifypool.h
templates.o: ../../../winix/templates/patterns.h
templates.o: ../../../winix/templates/locale.h
templates.o: ../../../winix/templates/localefilter.h
templates.o: ../../../winix/notify/notifythread.h
templates.o: ../../../winix/core/basethread.h
templates.o: ../../../winix/notify/templatesnotify.h
templates.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
templates.o: ../../../winix/core/lastcontainer.h
templates.o: ../../../winix/functions/functionparser.h
templates.o: ../../../winix/core/cur.h ../../../winix/functions/account.h
templates.o: ../../../winix/functions/adduser.h
templates.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
templates.o: ../../../winix/functions/privchanger.h
templates.o: ../../../winix/functions/chown.h
templates.o: ../../../winix/functions/ckeditor.h
templates.o: ../../../winix/functions/cp.h ../../../winix/functions/default.h
templates.o: ../../../winix/functions/download.h
templates.o: ../../../winix/functions/emacs.h ../../../winix/functions/env.h
templates.o: ../../../winix/functions/imgcrop.h
templates.o: ../../../winix/functions/last.h ../../../winix/functions/login.h
templates.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
templates.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
templates.o: ../../../winix/functions/meta.h ../../../winix/functions/mkdir.h
templates.o: ../../../winix/functions/mv.h ../../../winix/functions/nicedit.h
templates.o: ../../../winix/functions/node.h
templates.o: ../../../winix/functions/passwd.h
templates.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
templates.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
templates.o: ../../../winix/functions/rmuser.h ../../../winix/core/run.h
templates.o: ../../../winix/functions/sort.h
templates.o: ../../../winix/functions/specialdefault.h
templates.o: ../../../winix/functions/stat.h
templates.o: ../../../winix/functions/subject.h
templates.o: ../../../winix/functions/template.h
templates.o: ../../../winix/core/timezone.h
templates.o: ../../../winix/functions/tinymce.h
templates.o: ../../../winix/functions/uname.h
templates.o: ../../../winix/functions/upload.h
templates.o: ../../../winix/functions/uptime.h ../../../winix/functions/who.h
templates.o: ../../../winix/functions/vim.h ../../../winix/core/htmlfilter.h
templates.o: tdb.h ../../../winix/db/dbbase.h editticket.h
templates.o: ../../../winix/functions/functionbase.h createticket.h
templates.o: ../../../winix/core/misc.h ../../../winix/core/plugin.h
templates.o: pluginmsg.h ../../../winix/core/system.h
templates.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
templates.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
templates.o: ../../../winix/core/dircontainer.h ../../../winix/core/mounts.h
templates.o: ../../../winix/core/mountparser.h ../../../winix/core/crypt.h
templates.o: ../../../winix/core/users.h ../../../winix/core/groups.h
templates.o: ../../../winix/core/group.h ../../../winix/core/loadavg.h
templates.o: ../../../winix/core/image.h ../../../winix/core/threadmanager.h
templates.o: ../../../winix/core/timezones.h
templates.o: ../../../winix/core/sessionmanager.h
templates.o: ../../../winix/core/sessioncontainer.h
templates.o: ../../../winix/core/ipbancontainer.h
templates.o: ../../../winix/core/sessionidmanager.h
templates.o: ../../../tito/src/base64.h ../../../tito/src/aes.h
templates.o: ../../../winix/templates/templates.h
templates.o: ../../../winix/templates/patterncacher.h
templates.o: ../../../winix/templates/indexpatterns.h
templates.o: ../../../winix/templates/patterns.h
templates.o: ../../../winix/templates/changepatterns.h
templates.o: ../../../winix/templates/htmltextstream.h
templates.o: ../../../winix/core/sessionmanager.h sessiondata.h
templates.o: ../../../winix/core/plugindata.h ../../../winix/functions/rm.h
templates.o: ../../../winix/plugins/thread/pluginmsg.h
templates.o: ../../../winix/templates/miscspace.h
templates.o: ../../../winix/templates/templates.h
ticketinfo.o: ticketinfo.h ticket.h ../../../winix/core/item.h
ticketinfo.o: ../../../winix/core/system.h
ticketinfo.o: ../../../winix/functions/functions.h
ticketinfo.o: ../../../winix/functions/functionbase.h ../../../winix/db/db.h
ticketinfo.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
ticketinfo.o: ../../../winix/db/dbtextstream.h
ticketinfo.o: ../../../winix/core/textstream.h
ticketinfo.o: ../../../pikotools/textstream/textstream.h
ticketinfo.o: ../../../pikotools/space/space.h
ticketinfo.o: ../../../pikotools/textstream/types.h
ticketinfo.o: ../../../pikotools/date/date.h
ticketinfo.o: ../../../pikotools/convert/convert.h
ticketinfo.o: ../../../pikotools/convert/inttostr.h
ticketinfo.o: ../../../pikotools/membuffer/membuffer.h
ticketinfo.o: ../../../pikotools/textstream/types.h
ticketinfo.o: ../../../winix/core/error.h
ticketinfo.o: ../../../pikotools/space/spaceparser.h
ticketinfo.o: ../../../pikotools/space/space.h
ticketinfo.o: ../../../winix/db/dbitemquery.h
ticketinfo.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
ticketinfo.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
ticketinfo.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
ticketinfo.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
ticketinfo.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
ticketinfo.o: ../../../pikotools/utf8/utf8.h
ticketinfo.o: ../../../winix/core/winix_const.h
ticketinfo.o: ../../../winix/core/logmanipulators.h
ticketinfo.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
ticketinfo.o: ../../../winix/core/request.h ../../../winix/core/error.h
ticketinfo.o: ../../../winix/core/config.h ../../../winix/core/htmlfilter.h
ticketinfo.o: ../../../winix/templates/htmltextstream.h
ticketinfo.o: ../../../pikotools/space/spacetojson.h
ticketinfo.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
ticketinfo.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
ticketinfo.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
ticketinfo.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
ticketinfo.o: ../../../winix/core/request.h ../../../winix/core/config.h
ticketinfo.o: ../../../winix/core/synchro.h ../../../winix/notify/notify.h
ticketinfo.o: ../../../winix/notify/notifypool.h
ticketinfo.o: ../../../winix/templates/patterns.h
ticketinfo.o: ../../../winix/templates/locale.h
ticketinfo.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
ticketinfo.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
ticketinfo.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
ticketinfo.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
ticketinfo.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
ticketinfo.o: ../../../winix/notify/notifythread.h
ticketinfo.o: ../../../winix/core/basethread.h
ticketinfo.o: ../../../winix/notify/templatesnotify.h
ticketinfo.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
ticketinfo.o: ../../../winix/core/lastcontainer.h
ticketinfo.o: ../../../winix/functions/functionparser.h
ticketinfo.o: ../../../winix/core/cur.h ../../../winix/functions/account.h
ticketinfo.o: ../../../winix/functions/adduser.h
ticketinfo.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
ticketinfo.o: ../../../winix/functions/privchanger.h
ticketinfo.o: ../../../winix/functions/chown.h
ticketinfo.o: ../../../winix/functions/ckeditor.h
ticketinfo.o: ../../../winix/functions/cp.h
ticketinfo.o: ../../../winix/functions/default.h
ticketinfo.o: ../../../winix/functions/download.h
ticketinfo.o: ../../../winix/functions/emacs.h ../../../winix/functions/env.h
ticketinfo.o: ../../../winix/functions/imgcrop.h
ticketinfo.o: ../../../winix/functions/last.h
ticketinfo.o: ../../../winix/functions/login.h
ticketinfo.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
ticketinfo.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
ticketinfo.o: ../../../winix/functions/meta.h
ticketinfo.o: ../../../winix/functions/mkdir.h ../../../winix/functions/mv.h
ticketinfo.o: ../../../winix/functions/nicedit.h
ticketinfo.o: ../../../winix/functions/node.h
ticketinfo.o: ../../../winix/functions/passwd.h
ticketinfo.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
ticketinfo.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
ticketinfo.o: ../../../winix/functions/rmuser.h ../../../winix/core/run.h
ticketinfo.o: ../../../winix/functions/sort.h
ticketinfo.o: ../../../winix/functions/specialdefault.h
ticketinfo.o: ../../../winix/functions/stat.h
ticketinfo.o: ../../../winix/functions/subject.h
ticketinfo.o: ../../../winix/functions/template.h
ticketinfo.o: ../../../winix/core/timezone.h
ticketinfo.o: ../../../winix/functions/tinymce.h
ticketinfo.o: ../../../winix/functions/uname.h
ticketinfo.o: ../../../winix/functions/upload.h
ticketinfo.o: ../../../winix/functions/uptime.h
ticketinfo.o: ../../../winix/functions/who.h ../../../winix/functions/vim.h
ticketinfo.o: ../../../winix/core/htmlfilter.h tdb.h
ticketinfo.o: ../../../winix/db/dbbase.h ../../../winix/core/log.h
ticketinfo.o: ../../../winix/core/misc.h ../../../winix/core/plugin.h
ticketinfo.o: pluginmsg.h ../../../winix/core/system.h
ticketinfo.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
ticketinfo.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
ticketinfo.o: ../../../winix/core/dircontainer.h ../../../winix/core/mounts.h
ticketinfo.o: ../../../winix/core/mountparser.h ../../../winix/core/crypt.h
ticketinfo.o: ../../../winix/core/users.h ../../../winix/core/groups.h
ticketinfo.o: ../../../winix/core/group.h ../../../winix/core/loadavg.h
ticketinfo.o: ../../../winix/core/image.h ../../../winix/core/threadmanager.h
ticketinfo.o: ../../../winix/core/timezones.h
ticketinfo.o: ../../../winix/core/sessionmanager.h
ticketinfo.o: ../../../winix/core/sessioncontainer.h
ticketinfo.o: ../../../winix/core/ipbancontainer.h
ticketinfo.o: ../../../winix/core/sessionidmanager.h
ticketinfo.o: ../../../tito/src/base64.h ../../../tito/src/aes.h
ticketinfo.o: ../../../winix/templates/templates.h
ticketinfo.o: ../../../winix/templates/patterncacher.h
ticketinfo.o: ../../../winix/templates/indexpatterns.h
ticketinfo.o: ../../../winix/templates/patterns.h
ticketinfo.o: ../../../winix/templates/changepatterns.h
ticketinfo.o: ../../../winix/templates/htmltextstream.h
ticketinfo.o: ../../../winix/core/sessionmanager.h sessiondata.h
ticketinfo.o: ../../../winix/core/plugindata.h ../../../winix/functions/rm.h

View File

@@ -0,0 +1 @@
o = createticket.o editticket.o funticket.o init.o sessiondata.o showtickets.o tdb.o templates.o ticketinfo.o

View File

@@ -0,0 +1,227 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "core/plugin.h"
#include "createticket.h"
#include "functions/functions.h"
#include "sessiondata.h"
#include "pluginmsg.h"
namespace Winix
{
namespace Ticket
{
CreateTicket::CreateTicket()
{
fun.url = L"createticket";
}
void CreateTicket::SetTDb(TDb * ptdb)
{
tdb = ptdb;
}
void CreateTicket::SetTicketInfo(TicketInfo * pinfo)
{
ticket_info = pinfo;
}
bool CreateTicket::HasAccess()
{
if( cur->request->is_item || !system->HasWriteAccess(*cur->request->dir_tab.back()) )
return false;
if( cur->mount->type != ticket_info->mount_type_ticket )
return false;
return true;
}
void CreateTicket::AddTicket(Ticket & ticket, Item & item)
{
ticket.file_id = item.id;
cur->request->status = tdb->AddTicket(ticket);
if( cur->request->status == WINIX_ERR_OK )
{
// sending notification
notify_msg.code = WINIX_NOTIFY_CODE_ADD;
notify_msg.template_index = ticket_info->template_index;
notify_msg.dir_link = config->url_proto;
notify_msg.dir_link += config->base_url;// !! IMPROVE ME what about subdomains?
system->dirs.MakePath(item.parent_id, notify_msg.dir_link, false);
notify_msg.item_link = notify_msg.dir_link;
notify_msg.item_link += item.url;
system->notify.ItemChanged(notify_msg);
// sending a message
plugin.Call(WINIX_PL_TICKET_ADDED_NEW, &ticket, &item);
}
}
void CreateTicket::Submit(Ticket & ticket, Item & item)
{
if( functions->CheckAbuse() )
return;
functions->SetUser(item);
item.privileges = system->NewFilePrivileges();
item.parent_id = cur->request->dir_tab.back()->id;
plugin.Call(WINIX_PL_TICKET_PREPARE_TO_ADD_TICKET, &item, &ticket);
// adding without notificating
cur->request->status = system->AddFile(item, false);
if( cur->request->status == WINIX_ERR_OK )
AddTicket(ticket, item);
if( cur->request->status == WINIX_ERR_OK )
{
log << log2 << "CreateTicket: added a new ticket" << logend;
RemoveTmpTicket();
ticket_info->MakeRedirectIfPossible(item);
}
else
{
log << log1 << "CreateTicket: problem with adding a new ticket, error code: "
<< cur->request->status << logend;
}
}
void CreateTicket::RemoveTmpTicket()
{
SessionData * session_data = reinterpret_cast<SessionData*>(
cur->session->plugin_data.Get(ticket_info->plugin_id) );
long dir_id = cur->request->dir_tab.back()->id;
session_data->create_ticket_map.erase(dir_id);
session_data->create_space_map.erase(dir_id);
}
Ticket & CreateTicket::PrepareTicket()
{
SessionData * session_data = reinterpret_cast<SessionData*>(
cur->session->plugin_data.Get(ticket_info->plugin_id) );
bool is_new;
long dir_id = cur->request->dir_tab.back()->id;
Ticket & ticket = session_data->GetTicket(dir_id, session_data->create_ticket_map, &is_new);
ticket_info->create_new_ticket = is_new;
return ticket;
}
PT::Space & CreateTicket::PrepareSpace()
{
SessionData * session_data = reinterpret_cast<SessionData*>(
cur->session->plugin_data.Get(ticket_info->plugin_id) );
long dir_id = cur->request->dir_tab.back()->id;
PT::Space & new_space = session_data->GetNewSpace(dir_id, session_data->create_space_map);
return new_space;
}
void CreateTicket::MakePost()
{
ticket_info->Clear();
ticket_info->FindCurrentConf();
Ticket & ticket = PrepareTicket();
PT::Space & meta = PrepareSpace();
Item & item = cur->request->item;
ticket_info->ticket = &ticket;
ticket_info->item = &item;
bool file_was_deleted;
ticket_info->ReadTicketParams(ticket, false, meta, file_was_deleted);
functions->ReadItem(item, Item::file);
ticket_info->CopyTicketSpace(meta, item);
if( !cur->request->IsPostVar(L"fileuploadsubmit") && !file_was_deleted )
{
Submit(ticket, item);
ticket_info->ticket = ticket_info->GetEmptyTicket(); // ticket was deleted by Submit() method -- RemoveTmpTicket() was used
}
}
void CreateTicket::MakeGet()
{
ticket_info->Clear();
ticket_info->FindCurrentConf();
Ticket & ticket = PrepareTicket();
PT::Space & meta = PrepareSpace();
ticket_info->ticket = &ticket;
ticket_info->item = &cur->request->item;
// copy meta info to display correctly new files
ticket_info->CopyTicketSpace(meta, cur->request->item);
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,81 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_createticket
#define headerfile_winix_plugins_ticket_createticket
#include "tdb.h"
#include "functions/functionbase.h"
#include "ticketinfo.h"
#include "notify/notify.h"
namespace Winix
{
namespace Ticket
{
class CreateTicket : public FunctionBase
{
public:
CreateTicket();
void SetTDb(TDb * ptdb);
void SetTicketInfo(TicketInfo * pinfo);
bool HasAccess();
void MakePost();
void MakeGet();
private:
void AddTicket(Ticket & ticket, Item & item);
void Submit(Ticket & ticket, Item & item);
void RemoveTmpTicket();
Ticket & PrepareTicket();
PT::Space & PrepareSpace();
TDb * tdb;
TicketInfo * ticket_info;
NotifyMsg notify_msg;
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,278 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "editticket.h"
#include "functions/functions.h"
#include "sessiondata.h"
#include "core/plugin.h"
#include "pluginmsg.h"
namespace Winix
{
namespace Ticket
{
EditTicket::EditTicket()
{
fun.url = L"editticket";
}
void EditTicket::SetTDb(TDb * ptdb)
{
tdb = ptdb;
}
void EditTicket::SetTicketInfo(TicketInfo * pinfo)
{
ticket_info = pinfo;
}
bool EditTicket::HasAccess()
{
// not logged users cannot edit tickets
// !! we are waiting for the sticky bit
if( !cur->session->puser )
return false;
if( !cur->request->is_item || !system->HasWriteAccess(cur->request->item) )
return false;
if( cur->mount->type != ticket_info->mount_type_ticket )
return false;
// !! CHECKME what about closing threads?
return true;
}
void EditTicket::ChangeTicket(Ticket & ticket, Item & item)
{
cur->request->status = tdb->RemoveAddTicket(ticket);
if( cur->request->status == WINIX_ERR_OK )
{
// sending notification
notify_msg.code = WINIX_NOTIFY_CODE_EDIT;
notify_msg.template_index = ticket_info->template_index;
notify_msg.dir_link = config->url_proto;
notify_msg.dir_link += config->base_url;// !! IMPROVE ME what about subdomains?
system->dirs.MakePath(item.parent_id, notify_msg.dir_link, false);
notify_msg.item_link = notify_msg.dir_link;
notify_msg.item_link += item.url;
system->notify.ItemChanged(notify_msg);
// sending a message
plugin.Call(WINIX_PL_TICKET_CHANGED, &ticket, &item);
}
}
void EditTicket::Submit(Ticket & ticket, Item & item)
{
if( functions->CheckAbuse() )
return;
// adding without notificating
cur->request->status = system->EditFile(item, old_url != item.url);
if( cur->request->status == WINIX_ERR_OK )
ChangeTicket(ticket, item);
if( cur->request->status == WINIX_ERR_OK )
{
log << log2 << "EditTicket: ticket modified" << logend;
RemoveTmpTicket();
ticket_info->MakeRedirectIfPossible(item);
}
else
{
log << log1 << "EditTicket: problem with editing a ticket, error code: "
<< cur->request->status << logend;
// !! add session log
}
}
void EditTicket::RemoveTmpTicket()
{
SessionData * session_data = reinterpret_cast<SessionData*>(
cur->session->plugin_data.Get(ticket_info->plugin_id) );
long file_id = cur->request->item.id;
session_data->edit_ticket_map.erase(file_id);
session_data->edit_space_map.erase(file_id);
}
Ticket & EditTicket::PrepareTicket()
{
SessionData * session_data = reinterpret_cast<SessionData*>(
cur->session->plugin_data.Get(ticket_info->plugin_id) );
bool is_new;
long file_id = cur->request->item.id;
Ticket & ticket = session_data->GetTicket(file_id, session_data->edit_ticket_map, &is_new);
if( is_new )
tdb->GetTicket(file_id, ticket);
else
ticket.file_id = file_id;
return ticket;
}
PT::Space & EditTicket::PrepareSpace()
{
SessionData * session_data = reinterpret_cast<SessionData*>(
cur->session->plugin_data.Get(ticket_info->plugin_id) );
bool is_new;
long file_id = cur->request->item.id;
PT::Space & new_space = session_data->GetNewSpace(file_id, session_data->edit_space_map, &is_new);
if( is_new )
{
PT::Space * ticket_space = cur->request->item.meta.FindSpace(L"ticket");
if( ticket_space )
{
new_space = *ticket_space;
PT::Space & old_space = session_data->GetOldSpace(file_id, session_data->edit_space_map);
old_space = new_space;
}
}
return new_space;
}
bool EditTicket::CloseTicket()
{
PT::Space & ticket_space = cur->request->item.ameta.FindAddSpace(L"ticket");
ticket_space.Add(L"closed", true);
PT::Space & thread_space = cur->request->item.ameta.FindAddSpace(L"thread");
thread_space.Add(L"closed", true);
if( db->EditAdminMetaById(cur->request->item.ameta, cur->request->item.id) == WINIX_ERR_OK )
{
log << log3 << "EditTicket: closing ticket" << logend;
return true;
}
return false;
}
void EditTicket::MakePost()
{
ticket_info->Clear();
ticket_info->FindCurrentConf();
Ticket & ticket = PrepareTicket();
PT::Space & meta = PrepareSpace();
Item & item = cur->request->item;
old_url = item.url;
ticket_info->ticket = &ticket;
ticket_info->item = &item;
if( cur->request->IsParam(L"close") )
{
if( CloseTicket() )
plugin.Call(WINIX_PL_TICKET_CLOSED, ticket_info->item, ticket_info->ticket);
ticket_info->MakeRedirectIfPossible(*cur->request->last_item);
}
else
{
bool file_was_deleted;
ticket_info->ReadTicketParams(ticket, false, meta, file_was_deleted);
functions->ReadItem(item, Item::file);
ticket_info->CopyTicketSpace(meta, item);
if( !cur->request->IsPostVar(L"fileuploadsubmit") && !file_was_deleted )
{
Submit(ticket, item);
ticket_info->ticket = ticket_info->GetEmptyTicket(); // ticket was deleted by Submit() method -- RemoveTmpTicket() was used
}
}
}
void EditTicket::MakeGet()
{
ticket_info->Clear();
ticket_info->FindCurrentConf();
Ticket & ticket = PrepareTicket();
PT::Space & meta = PrepareSpace();
ticket_info->ticket = &ticket;
ticket_info->item = &cur->request->item;
// copy meta info to display correctly new files
ticket_info->CopyTicketSpace(meta, cur->request->item);
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,85 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_editticket
#define headerfile_winix_plugins_ticket_editticket
#include "tdb.h"
#include "ticket.h"
#include "ticketinfo.h"
#include "functions/functionbase.h"
#include "notify/notify.h"
namespace Winix
{
namespace Ticket
{
class EditTicket : public FunctionBase
{
public:
EditTicket();
void SetTDb(TDb * ptdb);
void SetTicketInfo(TicketInfo * pinfo);
bool HasAccess();
void MakePost();
void MakeGet();
private:
TDb * tdb;
TicketInfo * ticket_info;
std::wstring old_url;
NotifyMsg notify_msg;
void RemoveTmpTicket();
Ticket & PrepareTicket();
PT::Space & PrepareSpace();
void ChangeTicket(Ticket & ticket, Item & item);
void Submit(Ticket & ticket, Item & item);
bool CloseTicket();
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,90 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "funticket.h"
#include "core/plugin.h"
#include "plugins/thread/pluginmsg.h"
namespace Winix
{
namespace Ticket
{
FunTicket::FunTicket()
{
fun.url = L"ticket";
}
void FunTicket::SetTDb(TDb * ptdb)
{
tdb = ptdb;
}
void FunTicket::SetTicketInfo(TicketInfo * pinfo)
{
ticket_info = pinfo;
}
bool FunTicket::HasAccess()
{
return cur->request->is_item && system->HasReadAccess(cur->request->item);
}
void FunTicket::MakeGet()
{
ticket_info->Clear();
ticket_info->FindCurrentConf();
ticket_info->ticket = &ticket;
ticket_info->item = &cur->request->item;
tdb->GetTicket(cur->request->item.id, ticket);
plugin.Call(WINIX_PL_THREAD_PREPARE_THREAD, cur->request->item.id);
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,74 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_funticket
#define headerfile_winix_plugins_ticket_funticket
#include "tdb.h"
#include "ticketinfo.h"
#include "functions/functionbase.h"
namespace Winix
{
namespace Ticket
{
class FunTicket : public FunctionBase
{
public:
FunTicket();
void SetTDb(TDb * ptdb);
void SetTicketInfo(TicketInfo * pinfo);
bool HasAccess();
void MakeGet();
private:
TDb * tdb;
TicketInfo * ticket_info;
Ticket ticket;
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,235 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "tdb.h"
#include "funticket.h"
#include "editticket.h"
#include "createticket.h"
#include "showtickets.h"
#include "core/log.h"
#include "core/plugin.h"
#include "sessiondata.h"
#include "plugins/thread/showthreads.h"
#include "plugins/thread/pluginmsg.h"
#include "pluginmsg.h"
namespace Winix
{
extern "C" void Init(PluginInfo &);
namespace Ticket
{
const wchar_t plugin_name[] = L"ticket";
TDb tdb;
TicketInfo ticket_info;
FunTicket fun_ticket;
CreateTicket fun_create_ticket;
EditTicket fun_edit_ticket;
ShowTickets fun_show_tickets;
void AddFunctions(PluginInfo & info)
{
info.functions->Add(fun_ticket);
info.functions->Add(fun_create_ticket);
info.functions->Add(fun_edit_ticket);
info.functions->Add(fun_show_tickets);
}
void SelectDefaultFunction(PluginInfo & info)
{
if( info.system->mounts.pmount->type == ticket_info.mount_type_ticket )
{
// !! moze dac fun_ticket tylko dla itemow ktore nie sa plikami statycznymi...
if( info.cur->request->is_item )
info.cur->request->function = &fun_ticket;
else
info.cur->request->function = &fun_show_tickets;
}
}
void AddMounts(PluginInfo & info)
{
Mounts & m = info.system->mounts;
ticket_info.mount_type_ticket = m.AddMountType(L"ticket");
ticket_info.mount_par_ticket_conf = m.AddMountPar(L"ticket_conf");
}
void FstabChanged(PluginInfo & info)
{
ticket_info.ReadTicketConf(true);
}
void ProcessRequest(PluginInfo & info)
{
if( info.cur->request->function == &info.functions->fun_reload )
{
if( info.cur->request->IsParam(L"tickets") )
ticket_info.ReadTicketConf();
}
}
void RemoveTicket(PluginInfo & info)
{
// !! dodac nowy komunikat PREPERE_TO_REMOVE
// i tam korzystajac z meta informacji w item
// usunac odpowiednie pliki
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
ticket_info.RemoveTicket(item->id);
}
void InitTicket(PluginInfo & info)
{
ticket_info.progress_prefix = info.config->Text(L"ticket_form_progress_prefix", L"progress");
}
void AddNotifyTemplate(PluginInfo & info)
{
ticket_info.template_index = info.system->notify.AddTemplate(L"notify_email_ticket.txt");
}
void CreateSession(PluginInfo & info)
{
SessionData * p = new SessionData();
p->fun_rm = &info.functions->fun_rm;
info.session->plugin_data.Assign(p);
log << log4 << "Ticket: created ticket plugin data: " << (void*)p << logend;
}
void RemoveSession(PluginInfo & info)
{
if( info.plugin_data_base )
{
info.plugin_data_base->Clear();
delete info.plugin_data_base;
log << log4 << "Ticket: removed ticket plugin data: " << (void*)info.plugin_data_base << logend;
}
}
void EndRequest(PluginInfo & info)
{
ticket_info.Clear();
}
void ShowTicketsFromDir(PluginInfo & info)
{
fun_show_tickets.ShowTicketsFromDir(info.l1);
}
// defined in templates.cpp
void AddEzcFunctions(PluginInfo & info);
} // namespace Ticket
void Init(PluginInfo & info)
{
using namespace Ticket;
plugin.Assign(WINIX_PLUGIN_INIT, InitTicket);
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
plugin.Assign(WINIX_CREATE_FUNCTIONS, AddFunctions);
plugin.Assign(WINIX_SELECT_DEFAULT_FUNCTION, SelectDefaultFunction);
plugin.Assign(WINIX_ADD_MOUNTS, AddMounts);
plugin.Assign(WINIX_FSTAB_CHANGED, FstabChanged);
plugin.Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
plugin.Assign(WINIX_FILE_REMOVED, RemoveTicket);
plugin.Assign(WINIX_NOTIFY_ADD_TEMPLATE, AddNotifyTemplate);
plugin.Assign(WINIX_SESSION_CREATED, CreateSession);
plugin.Assign(WINIX_PLUGIN_SESSION_DATA_REMOVE, RemoveSession);
plugin.Assign(WINIX_END_REQUEST, EndRequest);
plugin.Assign(WINIX_PL_TICKET_LOAD_TICKETS, ShowTicketsFromDir);
tdb.SetConn(info.db->GetConn());
tdb.LogQueries(info.config->log_db_query);
ticket_info.SetDb(info.db);
ticket_info.SetTDb(&tdb);
ticket_info.SetConfig(info.config);
ticket_info.SetSystem(info.system);
ticket_info.SetCur(info.cur);
ticket_info.SetFunctions(info.functions);
ticket_info.plugin_id = info.plugin_id;
fun_ticket.SetTDb(&tdb);
fun_ticket.SetTicketInfo(&ticket_info);
fun_edit_ticket.SetTDb(&tdb);
fun_edit_ticket.SetTicketInfo(&ticket_info);
fun_create_ticket.SetTDb(&tdb);
fun_create_ticket.SetTicketInfo(&ticket_info);
fun_show_tickets.SetTDb(&tdb);
fun_show_tickets.SetTicketInfo(&ticket_info);
info.p1 = (void*)(plugin_name);
}
} // namespace Winix

View File

@@ -0,0 +1,105 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_pluginmsg
#define headerfile_winix_plugins_ticket_pluginmsg
namespace Winix
{
// values from 4100 - 4199 reserved for 'ticket' plugin
// showtickets winix function is about to sort pointers to tickets
// in p1 you have pointer to std::vector<Item*> struct
// you can sort it in your own (in such a case you have to return true)
#define WINIX_PL_TICKET_SORT_POINTERS 4100
//
#define WINIX_PL_TICKET_CAN_MAKE_REDIRECT 4101
// calling ShowTicketsFromDir(long dir_id) method from ShowTickets object
// when tickets are read and sorted then WINIX_PL_TICKET_TICKETS_LOADED is called
// in l1 you shoud give the directory_id
// from the tickets have to be read
// and you can use only ezc functions to display the tickets
#define WINIX_PL_TICKET_LOAD_TICKETS 4102
// a ticket is going to add
// in p1 you have a pointer to the Item struct
// in p2 you have a pointer to the Ticket struct
#define WINIX_PL_TICKET_PREPARE_TO_ADD_TICKET 4103
// a next ticket will be displayed
// in p1 you have a pointer to the Item struct
// this is call from tickets_tab ezc function
#define WINIX_PL_TICKET_TICKETS_TAB_IS_NEXT 4104
// a ticket has been closed (closed button pressed)
// in p1 you have a pointer to the Item struct
// in p2 you have a pointer to the Ticket struct
#define WINIX_PL_TICKET_CLOSED 4105
// send by showtickets winix function when tickets are loaded (and sorted)
// in p1 you have a pointer to the ticket tab: std::vector<Ticket::Ticket> (include "ticket.h")
// in p2 you have a pointer to the sort tab: std::vector<Item*>
// those tables don't have to be equal in size (in the case when there is no some tickets in the database)
#define WINIX_PL_TICKET_TICKETS_LOADED 4106
// a new ticket has been added
// in p1 you have a pointer to the Ticket::Ticket structure (include "ticket.h")
// in p2 you have a pointer to the Item structure
#define WINIX_PL_TICKET_ADDED_NEW 4107
// a ticket has been changed
// in p1 you have a pointer to the Ticket::Ticket structure (include "ticket.h")
// in p2 you have a pointer to the Item structure
#define WINIX_PL_TICKET_CHANGED 4108
} // namespace Winix
#endif

View File

@@ -0,0 +1,219 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <algorithm>
#include "sessiondata.h"
namespace Winix
{
namespace Ticket
{
SessionData::SessionData()
{
fun_rm = 0;
}
SessionData::~SessionData()
{
Clear();
}
void SessionData::Clear()
{
RemoveFiles(create_space_map, false);
RemoveFiles(edit_space_map, true);
}
void SessionData::RemoveFiles(SessionData::SpaceMap & space_map, bool only_stale_files)
{
SpaceMap::iterator i;
if( fun_rm )
{
for(i=space_map.begin() ; i!=space_map.end() ; ++i)
{
if( only_stale_files )
RemoveAllStaleFiles(i->second.new_space, i->second.old_space);
else
RemoveAllFiles(i->second.new_space);
}
space_map.clear();
}
}
void SessionData::RemoveAllFiles(PT::Space & new_space)
{
std::vector<long> new_file_tab;
BuildFileList(new_file_tab, new_space);
for(size_t i=0 ; i<new_file_tab.size() ; ++i)
fun_rm->RemoveItemById(new_file_tab[i], false);
}
void SessionData::RemoveAllStaleFiles(PT::Space & new_space, PT::Space & old_space)
{
std::vector<long> new_file_tab;
std::vector<long> old_file_tab;
size_t n = 0;
size_t o = 0;
BuildFileList(new_file_tab, new_space);
BuildFileList(old_file_tab, old_space);
std::sort(new_file_tab.begin(), new_file_tab.end());
std::sort(old_file_tab.begin(), old_file_tab.end());
// removes only those items present on new_file_tab
// but not existing on old_space_tab
while( n < new_file_tab.size() && o < old_file_tab.size() )
{
if( new_file_tab[n] < old_file_tab[o] )
{
fun_rm->RemoveFileOrSymlink(new_file_tab[n], false);
n += 1;
}
else
if( new_file_tab[n] == old_file_tab[o] )
{
n += 1;
o += 1;
}
else
{
o += 1;
}
}
while( n < new_file_tab.size() )
{
fun_rm->RemoveFileOrSymlink(new_file_tab[n], false);
n += 1;
}
}
void SessionData::BuildFileList(std::vector<long> & file_tab, PT::Space & space)
{
file_tab.clear();
for(size_t i=0 ; i<space.spaces.size() ; ++i)
{
PT::Space & sp = *space.spaces[i];
if( sp.name == L"param" )
CheckFile(file_tab, sp);
}
}
void SessionData::CheckFile(std::vector<long> & file_tab, PT::Space & space)
{
for(size_t i=0 ; i<space.spaces.size() ; ++i)
{
PT::Space & subsp = *space.spaces[i];
if( subsp.name == L"file" )
{
std::wstring * file_id_str = subsp.GetValue(L"itemid");
if( file_id_str )
{
long file_id = Tol(*file_id_str);
file_tab.push_back(file_id);
}
}
}
}
Ticket & SessionData::GetTicket(long id, SessionData::TicketMap & ticket_map, bool * is_new)
{
std::pair<TicketMap::iterator, bool> res = ticket_map.insert( std::make_pair(id, Ticket()) );
if( is_new )
*is_new = res.second;
return res.first->second;
}
PT::Space & SessionData::GetOldSpace(long id, SpaceMap & space_map, bool * is_new)
{
std::pair<SpaceMap::iterator, bool> res = space_map.insert( std::make_pair(id, SpacePair()) );
if( is_new )
*is_new = res.second;
return res.first->second.old_space;
}
PT::Space & SessionData::GetNewSpace(long id, SpaceMap & space_map, bool * is_new)
{
std::pair<SpaceMap::iterator, bool> res = space_map.insert( std::make_pair(id, SpacePair()) );
if( is_new )
*is_new = res.second;
return res.first->second.new_space;
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,120 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_sessiondata
#define headerfile_winix_plugins_ticket_sessiondata
#include <vector>
#include <string>
#include <map>
#include "core/plugindata.h"
#include "ticket.h"
#include "functions/rm.h"
#include "space/space.h"
namespace Winix
{
namespace Ticket
{
struct SessionData : public PluginDataBase
{
SessionData();
~SessionData();
struct SpacePair
{
PT::Space new_space;
PT::Space old_space;
// old_space is used when editing an existing ticket
// current ticket space is copied to old_space
// and when the session expires only new added files
// are deleted
};
virtual void Clear();
typedef std::map<long, Ticket> TicketMap;
typedef std::map<long, SpacePair> SpaceMap;
// temporary tickets for 'createticket' function
// <parent_dir_id, Ticket>
TicketMap create_ticket_map;
// temporary tickets for 'editticket' function
// <file_id, Ticket>
TicketMap edit_ticket_map;
// temporary spaces for 'createticket' function
// these files should be deleted if a user will not click on the submit button
SpaceMap create_space_map;
// temporary spaces for 'editticket' function
// these files should be deleted if a user will not click on the submit button
SpaceMap edit_space_map;
// inserting and returning a new ticket or just returning the ticket if it exists
Ticket & GetTicket(long id, TicketMap & ticket_map, bool * is_new = 0);
// inserting and returning a new/old space or just returning the space if it exists
PT::Space & GetOldSpace(long id, SpaceMap & space_map, bool * is_new = 0);
PT::Space & GetNewSpace(long id, SpaceMap & space_map, bool * is_new = 0);
// for deleting files
Fun::Rm * fun_rm;
private:
void RemoveFiles(SpaceMap & space_map, bool only_stale_files);
void RemoveAllFiles(PT::Space & new_space);
void RemoveAllStaleFiles(PT::Space & new_space, PT::Space & old_space);
void BuildFileList(std::vector<long> & file_tab, PT::Space & space);
void CheckFile(std::vector<long> & file_tab, PT::Space & space);
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,194 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <ctime>
#include <algorithm>
#include "showtickets.h"
#include "pluginmsg.h"
#include "plugins/thread/pluginmsg.h"
#include "core/plugin.h"
namespace Winix
{
namespace Ticket
{
ShowTickets::ShowTickets()
{
fun.url = L"showtickets";
}
void ShowTickets::SetTDb(TDb * ptdb)
{
tdb = ptdb;
}
void ShowTickets::SetTicketInfo(TicketInfo * pinfo)
{
ticket_info = pinfo;
}
bool ShowTickets::HasAccess()
{
return !cur->request->is_item;
}
bool ShowTickets::Sort::operator()(const Item * item1, const Item * item2)
{
if( sort_type == 0 )
{
// sorting by url
return item1->url < item2->url;
}
else
{
// sorting by sort_index and if equal then by date
if( item1->sort_index != item2->sort_index )
return item1->sort_index < item2->sort_index;
return item1->date_creation > item2->date_creation;
}
}
void ShowTickets::ReadFiles(long dir_id)
{
// reading files
DbItemQuery iq;
iq.SetAll(false, false);
iq.sel_url = true;
iq.sel_subject = true;
iq.sel_date = true;
iq.sel_user_id = true;
iq.sel_group_id = true;
iq.sel_guest_name = true;
iq.sel_privileges = true;
iq.sel_date = true;
iq.sel_meta = true;
iq.sel_sort_index = true;
iq.WhereParentId(dir_id);
iq.WhereType(Item::file);
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
db->GetItems(ticket_info->item_tab, iq);
system->CheckAccessToItems(ticket_info->item_tab);
}
void ShowTickets::CreatePointers()
{
// creating a pointers table
ticket_info->item_sort_tab.resize(ticket_info->item_tab.size());
for(size_t i=0 ; i<ticket_info->item_tab.size() ; ++i)
ticket_info->item_sort_tab[i] = &ticket_info->item_tab[i];
}
void ShowTickets::SortPointers()
{
PluginRes res = plugin.Call(WINIX_PL_TICKET_SORT_POINTERS, &ticket_info->item_sort_tab);
if( res.res_true > 0 )
return;
int sort_type = 1;
if( cur->request->ParamValue(L"sort") == L"url" )
sort_type = 0;
std::vector<Item*> & table = ticket_info->item_sort_tab;
std::sort(table.begin(), table.end(), Sort(this, sort_type));
}
void ShowTickets::ReadTickets()
{
// reading tickets for the files
file_id_tab.resize(ticket_info->item_sort_tab.size());
for(size_t i=0 ; i<ticket_info->item_sort_tab.size() ; ++i)
file_id_tab[i] = ticket_info->item_sort_tab[i]->id;
tdb->GetTickets(file_id_tab, ticket_info->ticket_tab);
}
void ShowTickets::ShowTicketsFromDir(long dir_id)
{
ticket_info->Clear();
ticket_info->FindCurrentConf(dir_id);
ReadFiles(dir_id);
CreatePointers();
SortPointers();
ReadTickets();
plugin.Call(WINIX_PL_TICKET_TICKETS_LOADED, &ticket_info->ticket_tab, &ticket_info->item_sort_tab);
// !! IMPROVE ME may a better name instead of WINIX_PL_THREAD_SET_SORTTAB?
plugin.Call(WINIX_PL_THREAD_SET_SORTTAB, &ticket_info->item_sort_tab);
plugin.Call(WINIX_PL_THREAD_READ_THREADS);
}
void ShowTickets::MakeGet()
{
ShowTicketsFromDir(cur->request->dir_tab.back()->id);
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,90 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_showtickets
#define headerfile_winix_plugins_ticket_showtickets
#include "tdb.h"
#include "ticketinfo.h"
#include "core/item.h"
#include "functions/functionbase.h"
namespace Winix
{
namespace Ticket
{
class ShowTickets : public FunctionBase
{
public:
ShowTickets();
void SetTDb(TDb * ptdb);
void SetTicketInfo(TicketInfo * pinfo);
bool HasAccess();
void MakeGet();
void ShowTicketsFromDir(long dir_id);
private:
TDb * tdb;
TicketInfo * ticket_info;
std::vector<long> file_id_tab;
void ReadFiles(long dir_id);
void CreatePointers();
void SortPointers();
void ReadTickets();
struct Sort
{
ShowTickets * show_tickets;
int sort_type;
Sort(ShowTickets * show, int type) : show_tickets(show), sort_type(type) {}
bool operator()(const Item * item1, const Item * item2);
};
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,289 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "tdb.h"
#include "core/log.h"
namespace Winix
{
namespace Ticket
{
bool TDb::IsTicket(long file_id)
{
PGresult * r = 0;
bool is = false;
try
{
query.Clear();
query << R("select count(*) from plugins.ticket "
"where ticket.file_id=") << file_id << R(";");
r = AssertQuery(query);
AssertResult(r, PGRES_TUPLES_OK);
if( Rows(r)==1 && Cols(r)==1 )
is = AssertValueInt(r, 0, 0) != 0;
}
catch(const Error &)
{
}
ClearResult(r);
return is;
}
void TDb::SetTicketColumns(PGresult * r)
{
cfileid = AssertColumn(r, "file_id");
cparam = AssertColumn(r, "param");
cintv = AssertColumn(r, "intv");
cdecv = AssertColumn(r, "decv");
}
void TDb::ReadTicketPar(PGresult * r, Ticket::TicketParam & par, int row)
{
par.Clear();
par.param = AssertValueInt(r, row, cparam);
par.intv = AssertValueLong(r, row, cintv);
AssertValueWide(r, row, cdecv, par.decv); // !! temporarily
}
Error TDb::GetTicket(long file_id, Ticket & ticket)
{
PGresult * r = 0;
Error status = WINIX_ERR_OK;
ticket.Clear();
try
{
// they should be sorted by param (they are used in a binary search later)
query.Clear();
query << R("select file_id, param, intv, decv from plugins.ticket "
"where ticket.file_id=") << file_id << R(" order by param asc;");
r = AssertQuery(query);
AssertResult(r, PGRES_TUPLES_OK);
SetTicketColumns(r);
int rows = Rows(r);
ticket.file_id = file_id;
if( rows == 0 )
throw Error(WINIX_ERR_NO_TICKET); // !! do we need this kind or error?
if( ticket.par_tab.capacity() < ticket.par_tab.size() + rows )
ticket.par_tab.reserve(ticket.par_tab.size() + rows);
for(int i=0 ; i<rows ; ++i)
{
ReadTicketPar(r, tic_par, i);
ticket.par_tab.push_back(tic_par);
}
}
catch(const Error & e)
{
status = e;
}
ClearResult(r);
return status;
}
Error TDb::GetTickets(const std::vector<long> & file_id_tab, std::vector<Ticket> & ticket_tab, bool clear_tab)
{
PGresult * r = 0;
Error status = WINIX_ERR_OK;
if( clear_tab )
ticket_tab.clear();
if( file_id_tab.empty() )
return status;
try
{
// ticket_tab must be sorted by file_id (they are used in a binary search later)
// and items in a ticket should be sorted by param (they are used in a binary search later too)
query.Clear();
query << R("select file_id, param, intv, decv from plugins.ticket "
"where ticket.file_id in ") << file_id_tab << R(" order by file_id, param;");
r = AssertQuery(query);
AssertResult(r, PGRES_TUPLES_OK);
SetTicketColumns(r);
int rows = Rows(r);
long last_file_id = -1;
empty_ticket.Clear();
for(int i=0 ; i<rows ; ++i)
{
long file_id = AssertValueLong(r, i, cfileid);
if( i==0 || last_file_id != file_id )
{
ticket_tab.push_back(empty_ticket);
ticket_tab.back().file_id = file_id;
last_file_id = file_id;
}
ReadTicketPar(r, tic_par, i);
ticket_tab.back().par_tab.push_back(tic_par);
}
}
catch(const Error & e)
{
status = e;
}
ClearResult(r);
return status;
}
Error TDb::AddTicket(const Ticket & ticket)
{
PGresult * r = 0;
Error status = WINIX_ERR_OK;
try
{
for(size_t i=0 ; i<ticket.par_tab.size() ; ++i)
{
query.Clear();
query << R("insert into plugins.ticket (file_id, param, intv) values (")
<< ticket.file_id
<< ticket.par_tab[i].param
<< ticket.par_tab[i].intv
//<< ticket.par_tab[i].decv
<< R(");");
r = AssertQuery(query);
AssertResult(r, PGRES_COMMAND_OK);
}
}
catch(const Error & e)
{
status = e;
}
ClearResult(r);
return status;
}
Error TDb::RemoveAddTicket(const Ticket & ticket)
{
Error status = BeginTrans();
if( status != WINIX_ERR_OK )
return status;
status = RemoveTicket(ticket.file_id);
if( status == WINIX_ERR_OK )
status = AddTicket(ticket);
if( status == WINIX_ERR_OK )
status = CommitTrans();
else
RollbackTrans();
return status;
}
Error TDb::RemoveTicket(long file_id)
{
PGresult * r = 0;
Error status = WINIX_ERR_OK;
try
{
query.Clear();
query << R("delete from plugins.ticket where file_id=") << file_id << R(";");
r = AssertQuery(query);
AssertResult(r, PGRES_COMMAND_OK);
long rows = AffectedRows(r);
if( rows > 0 )
log << log2 << "TicketDb: deleted " << rows << " rows from plugins.ticket" << logend;
}
catch(const Error & e)
{
status = e;
}
ClearResult(r);
return status;
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,85 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_tdb
#define headerfile_winix_plugins_ticket_tdb
#include <vector>
#include "ticket.h"
#include "db/dbbase.h"
#include "core/error.h"
namespace Winix
{
namespace Ticket
{
class TDb : public DbBase
{
public:
bool IsTicket(long file_id);
Error GetTicket(long file_id, Ticket & ticket);
Error GetTickets(const std::vector<long> & file_id_tab, std::vector<Ticket> & ticket_tab, bool clear_tab = true);
Error AddTicket(const Ticket & ticket);
Error RemoveAddTicket(const Ticket & ticket); // first removing and then adding a ticket
Error RemoveTicket(long file_id);
private:
DbTextStream query;
Ticket empty_ticket;
Ticket::TicketParam tic_par;
int cfileid;
int cparam;
int cintv;
int cdecv;
void SetTicketColumns(PGresult * r);
void ReadTicketPar(PGresult * r, Ticket::TicketParam & par, int row);
};
} // namespace
} // namespace Winix
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,108 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_ticket
#define headerfile_winix_plugins_ticket_ticket
#include <vector>
#include <string>
#include <algorithm>
namespace Winix
{
namespace Ticket
{
struct Ticket
{
struct TicketParam
{
long param;
long intv;
std::wstring decv; // !! temporarily as a string (in the future there'll be a Dec type from ttmath)
void Clear()
{
param = 0;
intv = 0;
decv.clear();
}
TicketParam()
{
Clear();
}
};
long file_id;
typedef std::vector<TicketParam> ParTab;
ParTab par_tab;
Ticket()
{
Clear();
}
void Clear()
{
file_id = -1;
par_tab.clear();
}
struct Sort
{
bool operator()(const TicketParam & par1, const TicketParam & par2)
{
return par1.param < par2.param;
}
};
void SortParTab()
{
std::sort(par_tab.begin(), par_tab.end(), Sort());
}
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,633 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <algorithm>
#include <ctime>
#include "ticketinfo.h"
#include "core/error.h"
#include "core/log.h"
#include "core/misc.h"
#include "core/plugin.h"
#include "pluginmsg.h"
#include "sessiondata.h"
namespace Winix
{
namespace Ticket
{
TicketInfo::TicketInfo()
{
Clear();
}
void TicketInfo::SetTDb(TDb * ptdb)
{
tdb = ptdb;
}
void TicketInfo::SetDb(Db * pdb)
{
db = pdb;
}
void TicketInfo::SetConfig(Config * pconfig)
{
config = pconfig;
}
void TicketInfo::SetSystem(System * psystem)
{
system = psystem;
}
void TicketInfo::SetCur(Cur * pcur)
{
cur = pcur;
}
void TicketInfo::SetFunctions(Functions * pfunctions)
{
functions = pfunctions;
}
void TicketInfo::Clear()
{
ticket = &ticket_empty;
item = &item_empty;
ticket->Clear();
item->Clear();
// we use meta from item which should not be const
cur_conf_wrap = &cur_conf_wrap_empty;
cur_conf = &cur_conf_empty;
cur_conf->Clear();
item_tab.clear();
ticket_tab.clear();
item_sort_tab.clear();
create_new_ticket = false;
}
void TicketInfo::MarkAllConfToDelete()
{
ConfTab::iterator i = conf_tab.begin();
for( ; i!=conf_tab.end() ; ++i)
i->second.to_delete = true;
}
void TicketInfo::DeleteAllMarkedConf()
{
ConfTab::iterator inext;
ConfTab::iterator i = conf_tab.begin();
while( i != conf_tab.end() )
{
inext = i;
++inext;
if( i->second.to_delete )
{
log << log3 << "Ticket: deleting ticket conf for dir id: " << i->first << logend;
conf_tab.erase(i);
}
i = inext;
}
}
bool TicketInfo::GetConfContent(const std::wstring & path)
{
int status = system->FollowAllLinks(path, config_dir_tab, config_file, false, false, false);
if( status != 1 )
{
log << log1 << "Ticket: problem with reading a config file: " << path << ", status: " << status << logend;
return false;
}
return true;
}
bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::wstring & path)
{
log << log3 << "Ticket: parsing conf file: " << path << logend;
conf_tab[mount_dir_id].file_name = path;
conf_parser.SetSpace(conf_tab[mount_dir_id].conf);
conf_parser.SplitSingle(true);
conf_tab[mount_dir_id].conf.Clear();
return (conf_parser.ParseString(config_file.content) == PT::SpaceParser::ok);
}
void TicketInfo::ReadTicketConf(const Mount & mount, bool skip_existing_configs)
{
if( mount.param[mount_par_ticket_conf].defined &&
mount.param[mount_par_ticket_conf].arg.size() == 1 )
{
const std::wstring & file_name = mount.param[mount_par_ticket_conf].arg[0];
ConfTab::iterator c = conf_tab.find(mount.dir_id);
bool exists = (c != conf_tab.end() && c->second.file_name == file_name);
if( exists )
c->second.to_delete = false;
if( !(skip_existing_configs && exists) )
{
if( GetConfContent(file_name) )
{
if( !ParseTicketConf(mount.dir_id, file_name) )
conf_tab[mount.dir_id].to_delete = true;
}
else
{
if( exists )
c->second.to_delete = true;
}
}
}
}
// if skip_existing_configs is true then only new config files will be parsed
void TicketInfo::ReadTicketConf(Mounts & mounts, bool skip_existing_configs)
{
Mounts::MountTab::const_iterator i;
const Mounts::MountTab * mtab = mounts.GetMountTab();
// loop through all mount points
for(i=mtab->begin() ; i!=mtab->end() ; ++i)
{
const Mount & mount = i->second;
ReadTicketConf(mount, skip_existing_configs);
}
}
// if skip_existing_configs is true then only new config files will be parsed
void TicketInfo::ReadTicketConf(bool skip_existing_configs)
{
MarkAllConfToDelete();
ReadTicketConf(system->mounts, skip_existing_configs);
DeleteAllMarkedConf();
}
void TicketInfo::FindCurrentConf(long dir_id)
{
Mount * mount = system->mounts.CalcMount(dir_id);
if( mount )
{
// long dir_id = cur->mount->dir_id;
ConfTab::iterator i = conf_tab.find(mount->dir_id);
if( i != conf_tab.end() )
{
cur_conf_wrap = &i->second;
cur_conf = &i->second.conf;
}
else
{
log << log1 << "Ticket: there is no a ticket_conf parameter in the mount point (an empty config used)" << logend;
}
}
else
{
log << log1 << "Ticket: I cannot find the mount point for dir id: " << dir_id << logend;
}
}
void TicketInfo::FindCurrentConf()
{
if( !cur->request->dir_tab.empty() )
FindCurrentConf(cur->request->dir_tab.back()->id);
}
void TicketInfo::CheckMinMaxValue(PT::Space & space, Ticket::TicketParam & par)
{
if( space.Text(L"type") == L"integer" )
{
std::wstring * min_str = space.GetValue(L"min");
std::wstring * max_str = space.GetValue(L"min");
if( min_str )
{
long minv = Tol(*min_str);
if( par.intv < minv )
par.intv = minv;
}
if( max_str )
{
long maxv = Tol(*max_str);
if( par.intv > maxv )
par.intv = maxv;
}
}
else
if( space.Text(L"type") == L"progress" )
{
// !! dodac tez min/max
if( par.intv < 0 )
par.intv = 0;
if( par.intv > 100 )
par.intv = 100;
}
else
if( space.Text(L"type") == L"select" )
{
for(size_t a=0 ; a<space.spaces.size() ; ++a)
{
PT::Space & sp = *space.spaces[a];
if( sp.name == L"option" && sp.Long(L"id") == par.intv )
return;
}
par.intv = Tol(space.Text(L"default"));
}
}
PT::Space & TicketInfo::FindAddMetaByParam(PT::Space & meta, long param)
{
for(size_t i=0 ; i<meta.spaces.size() ; ++i)
{
PT::Space & sp = *meta.spaces[i];
if( sp.name == L"param" && sp.Long(L"id") == param )
return sp;
}
PT::Space & sp = meta.AddSpace(L"param");
sp.Add(L"id", param);
return sp;
}
bool TicketInfo::ReadTicketValue(PT::Space & space, long param_id, Ticket::TicketParam & par, const std::wstring & value, PT::Space & meta)
{
if( space.Text(L"type") == L"integer" ||
space.Text(L"type") == L"progress" ||
space.Text(L"type") == L"select" )
{
par.intv = Tol(value);
par.decv.clear();
CheckMinMaxValue(space, par);
return true;
}
else
if( space.Text(L"type") == L"string" ||
space.Text(L"type") == L"multistring" )
{
// !! dodac cos co sprawdzi czy string nie zawiera znakow konca linii
PT::Space & sp = FindAddMetaByParam(meta, param_id);
sp.Add(L"value", value);
return false;
}
if( space.Text(L"type") == L"images" ||
space.Text(L"type") == L"files" )
{
if( !value.empty() )
{
log << log1 << "Ticket: images or files should be added only by a specific html tag (ignored)" << logend;
}
else
{
// an empty field from the html form (ignoring)
}
return false;
}
else
{
// !! dodac obsluge komunikatow
// niech zostanie wyslany komunikat o dodawaniu nieznanego parametru
// i jesli nic nie odpowie na ten komunikat to wtedy zglaszamy blad
log << log1 << "Ticket: incorrect parameter, param: " << par.param << ", value: " << value << " (ignored)" << logend;
}
return false;
}
void TicketInfo::ReadTicketValue(PT::Space & space,
long param_id,
const PostFile & value,
PT::Space & meta,
Item & upload_dir)
{
file.Clear(); // clearing and setting date
file.parent_id = upload_dir.id;
file.type = Item::file;
file.privileges = system->NewFilePrivileges();
file.file_type = SelectFileType(value.filename);
file.url = value.filename;
functions->PrepareUrl(file);
functions->SetUser(file);
functions->fun_upload.UploadFile(file, value.tmp_filename);
if( cur->request->status == WINIX_ERR_OK )
{
PT::Space & space = FindAddMetaByParam(meta, param_id);
PT::Space & file_space = space.AddSpace(L"file");
if( file.file_type == WINIX_ITEM_FILETYPE_IMAGE )
file_space.Add(L"type", L"image");
else
file_space.Add(L"type", L"file");
file_space.Add(L"itemid", file.id);
system->MakePath(file, file_path);
file_space.Add(L"path", file_path);
}
else
{
log << log1 << "Ticket: problem with uploading" << logend;
}
}
void TicketInfo::ReadTicketValue(PT::Space & space,
long param_id, const PostFile & value, PT::Space & meta)
{
if( space.Text(L"type") == L"images" || space.Text(L"type") == L"files" )
{
std::wstring & upload_path = space.Text(L"upload_dir");
if( !upload_path.empty() )
{
Item * upload_dir = system->dirs.GetDir(upload_path);
if( upload_dir )
ReadTicketValue(space, param_id, value, meta, *upload_dir);
else
log << log1 << "Ticket: there is no an upload directory: " << upload_path << logend;
}
else
{
log << log1 << "Ticket: you must set 'upload_dir' directory in the config" << logend;
}
}
}
// adding a new parameter only if it not exists in ticket.par_tab
void TicketInfo::ReadTicketParam(PT::Space & space, Ticket & ticket, long param_id, const std::wstring & value, PT::Space & meta)
{
ticket_param.param = param_id;
for(size_t i2=0 ; i2<ticket.par_tab.size() ; ++i2)
{
if( ticket.par_tab[i2].param == param_id )
{
// parameter param_id already exists in ticket.par_tab
// (overwritting)
if( ReadTicketValue(space, param_id, ticket_param, value, meta) )
ticket.par_tab[i2] = ticket_param;
return;
}
}
// adding a new parameter param_id
if( ReadTicketValue(space, param_id, ticket_param, value, meta) )
ticket.par_tab.push_back(ticket_param);
}
void TicketInfo::ReadTicketParam(Ticket & ticket, long param_id, const std::wstring & value, PT::Space & meta)
{
ticket_param.Clear();
for(size_t i=0 ; i<cur_conf->spaces.size() ; ++i)
{
PT::Space & space = *cur_conf->spaces[i];
if( space.name == L"param" && Tol(space.Text(L"id")) == param_id )
{
ReadTicketParam(space, ticket, param_id, value, meta);
return;
}
}
log << log1 << "Ticket: skipped incorrect parameter: " << param_id << " (not defined in the config)" << logend;
}
// always adds a new parameter
void TicketInfo::ReadTicketParam(long param_id, const PostFile & value, PT::Space & meta)
{
for(size_t i=0 ; i<cur_conf->spaces.size() ; ++i)
{
PT::Space & space = *cur_conf->spaces[i];
if( space.name == L"param" && space.Long(L"id") == param_id )
{
ReadTicketValue(space, param_id, value, meta);
return;
}
}
log << log1 << "Ticket: skipped incorrect parameter: " << param_id << " (not defined in the config)" << logend;
}
bool TicketInfo::DeleteTicketFile(Ticket & ticket, long file_id, PT::Space & meta)
{
for(size_t i=0 ; i<meta.spaces.size() ; ++i)
{
PT::Space & param = *meta.spaces[i];
if( param.name == L"param" )
{
for(size_t z=0 ; z<param.spaces.size() ; ++z)
{
PT::Space & file = *param.spaces[z];
if( file.name == L"file" )
{
if( file.Long(L"itemid") == file_id )
{
param.RemoveSpace(z);
// !! IMPROVE ME
// temporarily we delete the file here
// but it should be really deleted when the user will press
// the submit button
//functions->fun_rm.RemoveFileOrSymlink(file_id, true);
return true;
}
}
}
}
}
return false;
}
void TicketInfo::ReadTicketParams(Ticket & ticket, bool clear_ticket, PT::Space & meta, bool & file_was_deleted)
{
PostTab::iterator i;
PostFileTab::iterator i2;
file_was_deleted = false;
if( clear_ticket )
ticket.Clear();
// !! IMPROVE ME move me somewhere
std::wstring ticket_delete_prefix = L"ticketdeletefile_";
for(i=cur->request->post_tab.begin() ; i!=cur->request->post_tab.end() ; ++i)
{
// !! CHECKME why ticket_form_prefix is in the global config?
// (this is a plugin variable)
if( IsSubString(config->ticket_form_prefix, i->first) )
{
long param_id = Tol(i->first.c_str() + config->ticket_form_prefix.size());
ReadTicketParam(ticket, param_id, i->second, meta);
}
if( IsSubString(ticket_delete_prefix, i->first) )
{
long file_id = Tol(i->first.c_str() + ticket_delete_prefix.size());
if( DeleteTicketFile(ticket, file_id, meta) )
{
file_was_deleted = true;
}
}
}
for(i2=cur->request->post_file_tab.begin() ; i2!=cur->request->post_file_tab.end() ; ++i2)
{
if( IsSubString(config->ticket_form_prefix, i2->first) )
ReadTicketParam(Tol(i2->first.c_str() + config->ticket_form_prefix.size()), i2->second, meta);
}
ticket.SortParTab();
}
void TicketInfo::RemoveTicket(long file_id)
{
/*
* IMPROVEME
* we should also remove some files (images) for a ticket
* may when 'rm' function is displayed we should show some checkboxes
* 'remove static files etc.' and if they are checked then the files are removed?
*
*/
if( tdb->GetTicket(file_id, rm_ticket) == WINIX_ERR_OK )
{
tdb->RemoveTicket(file_id);
}
}
void TicketInfo::CopyTicketSpace(PT::Space & ticket_space, Item & item)
{
PT::Space & ticket_meta = item.meta.FindAddSpace(L"ticket");
ticket_meta = ticket_space;
ticket_meta.name = L"ticket";
}
void TicketInfo::MakeRedirectIfPossible(const Item & item)
{
PluginRes res = plugin.Call(WINIX_PL_TICKET_CAN_MAKE_REDIRECT);
if( res.res_false > 0 )
{
log << log4 << "Ticket: redirect prevented" << logend;
return;
}
system->RedirectTo(item);
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,197 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_ticket_ticketinfo
#define headerfile_winix_plugins_ticket_ticketinfo
#include <vector>
#include "ticket.h"
#include "core/item.h"
#include "core/system.h"
#include "functions/functions.h"
#include "db/db.h"
#include "tdb.h"
#include "space/spaceparser.h"
namespace Winix
{
namespace Ticket
{
struct TicketConfWrap
{
bool to_delete;
std::wstring file_name;
PT::Space conf;
TicketConfWrap()
{
to_delete = false;
}
};
class TicketInfo
{
public:
TicketInfo();
void SetTDb(TDb * ptdb);
void SetDb(Db * pdb);
void SetConfig(Config * pconfig);
void SetSystem(System * psystem);
void SetCur(Cur * pcur);
void SetFunctions(Functions * pfunctions);
void Clear();
// current ticket for templates
Ticket * ticket;
// current item for templates
// !! zobaczyc czy sie da na conts zamienic
// teraz zmieniona obsluga templatow wiec moze sie da
Item * item;
// true if 'createticket' function is creating a new ticket
bool create_new_ticket;
// for displaying all tickets in a directory
std::vector<Item> item_tab; // !! in the future we'll use cur->request->item_tab[number] (an array of arrays)
std::vector<Ticket> ticket_tab;
std::vector<Item*> item_sort_tab;
// <dir_id, TicketConfWrap>
typedef std::map<long, TicketConfWrap> ConfTab;
ConfTab conf_tab;
// current ticket config
// will be set by FindCurrentConf()
TicketConfWrap * cur_conf_wrap;
PT::Space * cur_conf;
// default: "progress"
// can be set in config in option: ticket_form_progress_prefix
std::wstring progress_prefix;
// ticket plugin id
int plugin_id;
int mount_type_ticket;
int mount_par_ticket_conf;
// template index for notifications
size_t template_index;
void ReadTicketConf(bool skip_existing_configs = false);
void FindCurrentConf(long dir_id);
void FindCurrentConf();
void ReadTicketParams(Ticket & ticket, bool clear_ticket, PT::Space & meta, bool & file_was_deleted);
void RemoveTicket(long file_id);
void CopyTicketSpace(PT::Space & ticket_space, Item & item);
void MakeRedirectIfPossible(const Item & item);
// may now it is better to use null pointers instead of this empty objects?
Ticket * GetEmptyTicket() { return &ticket_empty; };
//Item * GetEmptyItem();
private:
Db * db;
TDb * tdb;
Config * config;
System * system;
Cur * cur;
Functions * functions;
// for reading parameters
Ticket::TicketParam ticket_param;
// for adding a new image/file to a ticket
Item file;
std::wstring file_path;
// for reading config file
PT::SpaceParser conf_parser;
std::vector<Item*> config_dir_tab;
Item config_file;
// for Clearing
// (we don't want to use empty pointers)
TicketConfWrap cur_conf_wrap_empty;
PT::Space cur_conf_empty;
Ticket ticket_empty;
Item item_empty;
// for removing a ticket
Ticket rm_ticket;
bool GetConfContent(const std::wstring & path);
bool ParseTicketConf(long mount_dir_id, const std::wstring & path);
void ReadTicketConf(Mounts & mounts, bool skip_existing_configs);
void MarkAllConfToDelete();
void DeleteAllMarkedConf();
void ReadTicketConf(const Mount & mount, bool skip_existing_configs);
PT::Space & FindAddMetaByParam(PT::Space & meta, long param);
void CheckMinMaxValue(PT::Space & space, Ticket::TicketParam & par);
bool ReadTicketValue(PT::Space & space, long param_id, Ticket::TicketParam & par, const std::wstring & value, PT::Space & meta);
void ReadTicketValue(PT::Space & space, long param_id, const PostFile & value, PT::Space & meta, Item & upload_dir);
void ReadTicketValue(PT::Space & space, long param_id, const PostFile & value, PT::Space & meta);
void ReadTicketParam(PT::Space & space, Ticket & ticket, long param_id, const std::wstring & value, PT::Space & meta);
void ReadTicketParam(Ticket & ticket, long param_id, const std::wstring & value, PT::Space & meta);
void ReadTicketParam(long param_id, const PostFile & value, PT::Space & meta);
bool DeleteTicketFile(Ticket & ticket, long file_id, PT::Space & meta);
};
}
} // namespace Winix
#endif