Files
winix/content/content.h
Tomasz Sowa 717eb526fb * added: class HTMLFilter
files: htmlfilter.h htmlfilter.cpp
         this is an html filter used to make the html output looking better
         this is a very lightweight filter
         (without using any dynamic memory - some memory is allocated only at the beginning - in ctors)
         this filter has O(n) complexity over the whole html string
* added: antyspamming method
         if the POST request is sent too fast after the GET
         it is treated as a spam
         only for no logged users and only in 'emacs' and 'createthread' functions
       


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@534 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-09 00:42:40 +00:00

102 lines
1.8 KiB
C++
Executable File

/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2008-2009, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslucontentcontent
#define headerfilecmslucontentcontent
#include <cstdlib>
#include <fcgiapp.h>
#include <ctime>
#include "../core/item.h"
#include "../templates/templates.h"
#include "../core/thread.h"
class Content
{
Templates templates;
void CheckSpecialFile();
void PrepareUrl(Item & item);
void SetDefaultFunctionForFile();
void SetDefaultFunctionForDir();
void SetDefaultFunction();
bool DirsHaveReadExecPerm();
void MakeStandardFunction();
void SetUser(Item & item);
bool CheckRebus();
void MakePost();
void FunCat();
void FunLogout();
void FunLs();
void FunEmacs();
void FunPriv();
void FunRmDirRecursive();
void FunRmDir();
void FunRm();
void FunNode();
void FunMkdir();
void FunDefault();
void FunRun();
void PostFunRun();
void FunWho();
void FunLast();
void FunReloadTemplates();
void FunReload();
static bool FunThreadSort(const Thread & t1, const Thread & t2);
void FunThread();
void FunCreateThread();
bool PostFunSetUrlSubject();
void PostFunLogin();
void PostFunEmacsAdd();
void PostFunEmacsEdit(bool with_url);
void PostFunEmacs();
void PostFunMkdir(bool add_to_dir_table = false, int mask = 0755 );
long PostFunDefaultParsePath();
void PostFunDefault();
void PostFunPriv();
void PostFunPriv(Item & item);
bool FunCreateThreadCheckAccess();
bool FunCreateThreadCheckAbuse();
void PostFunCreateThread();
void RedirectTo(const Item & item);
void RedirectTo(long item_id);
void CheckGetPostTimes(time_t difference = 10);
public:
bool Init();
void ReadAdditionalInfo();
void Make();
};
#endif