97 lines
1.3 KiB
C++
Executable File
97 lines
1.3 KiB
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecmslucoreitem
|
|
#define headerfilecmslucoreitem
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
struct Item
|
|
{
|
|
long id;
|
|
long parent_id;
|
|
|
|
|
|
long user_id;
|
|
long group_id;
|
|
std::wstring guest_name; // used as a user name when user_id is equal -1
|
|
|
|
long modification_user_id; // who has modified the item last (not taken into account when checking permissions)
|
|
|
|
int privileges;
|
|
|
|
tm date_creation;
|
|
tm date_modification;
|
|
|
|
std::wstring subject;
|
|
std::wstring content;
|
|
long content_id; // used by the database
|
|
std::wstring url;
|
|
|
|
enum ContentType
|
|
{
|
|
ct_text = 0,
|
|
ct_formatted_text,
|
|
ct_html,
|
|
ct_bbcode,
|
|
ct_raw
|
|
};
|
|
|
|
ContentType content_type;
|
|
|
|
|
|
|
|
enum Type
|
|
{
|
|
dir = 0,
|
|
file = 1,
|
|
|
|
none = 1000 // !! pozbyc sie tego
|
|
};
|
|
|
|
|
|
Type type;
|
|
|
|
|
|
long default_item;
|
|
|
|
|
|
|
|
|
|
// external static file authorized by winix
|
|
enum Auth
|
|
{
|
|
auth_none = 0, /* there is not an external file */
|
|
auth_image = 1, /* png, gif, jpg - only types available to render by a web browser*/
|
|
auth_document = 2, /* pdf doc xls txt */
|
|
auth_other = 3 /* other file */
|
|
};
|
|
|
|
|
|
Auth auth;
|
|
std::wstring auth_path; // path to a file (if auth!=auth_none)
|
|
|
|
|
|
std::wstring html_template;
|
|
|
|
|
|
// methods
|
|
Item();
|
|
void SetDateToNow();
|
|
void SetDateModifyToNow();
|
|
void Clear();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|