so sometimes the time of the dir was changed now for converting tm into time_t use: time_t Time(const tm & par); time_t Time(const tm * par); tm Time(time_t par); from core/misc.h now winix internally use GMT time only when printing it is converted to local user time temporarily all users use the same local time (config: time_zone_offset) (only logs are genereted with local system time) added to system: time_t LocalTime(time_t gmt_time); tm LocalTime(const tm * ptm); tm LocalTime(const tm & ptm); they convert GMT time to local user time git-svn-id: svn://ttmath.org/publicrep/winix/trunk@666 e52654a7-88a9-db11-a3e9-0013d4bc506e
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::string 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::string subject;
|
|
std::string content;
|
|
long content_id; // used by the database
|
|
std::string 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::string auth_path; // path to a file (if auth!=auth_none)
|
|
|
|
|
|
std::string html_template;
|
|
|
|
|
|
// methods
|
|
Item();
|
|
void SetDateToNow();
|
|
void SetDateModifyToNow();
|
|
void Clear();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|