80 lines
1.2 KiB
C++
Executable File
80 lines
1.2 KiB
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecontent
|
|
#define headerfilecontent
|
|
|
|
#include <cstdlib>
|
|
#include <fcgiapp.h>
|
|
|
|
#include "templates.h"
|
|
#include "request.h"
|
|
#include "error.h"
|
|
#include "misc.h"
|
|
#include "db.h"
|
|
#include "user.h"
|
|
|
|
|
|
|
|
|
|
class Content
|
|
{
|
|
// index to request.get_table
|
|
// set after calling MakeDirectoryStructure()
|
|
// index of the last item which is not a directory (or is equal get_table.size())
|
|
GetTable::size_type get_index;
|
|
|
|
|
|
// temporarily object used for some purposes
|
|
Item item;
|
|
|
|
|
|
Templates templates;
|
|
|
|
|
|
void AssertPrivileges(Item & old_item, Item & new_item);
|
|
|
|
void AddItem();
|
|
void EditItem();
|
|
void LogUser();
|
|
|
|
void MakeDirectoryStructure();
|
|
Request::Result StandardFunction(std::string & name);
|
|
void PrepareUrlSubject(Item & item);
|
|
bool MakeGetCheckDir();
|
|
|
|
void MakeAddItem();
|
|
void MakeEditItem();
|
|
void MakeShowItemById();
|
|
void MakeDelItem();
|
|
void MakeLogout();
|
|
void MakeStandardFunction();
|
|
|
|
|
|
void AppendCurDir(std::string & dir);
|
|
|
|
void MakePost();
|
|
void MakeGet();
|
|
|
|
|
|
|
|
void RedirectTo(const Item & item);
|
|
|
|
public:
|
|
|
|
bool Init();
|
|
|
|
void Make();
|
|
|
|
|
|
};
|
|
|
|
|
|
#endif
|