54 lines
829 B
C++
Executable File
54 lines
829 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2012, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfile_winix_functions_env
|
|
#define headerfile_winix_functions_env
|
|
|
|
#include "functionbase.h"
|
|
#include "space/spaceparser.h"
|
|
|
|
|
|
namespace Fun
|
|
{
|
|
|
|
|
|
class Env : public FunctionBase
|
|
{
|
|
public:
|
|
|
|
Env();
|
|
|
|
bool EditAdminEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
|
|
bool EditEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
|
|
|
|
bool HasAccess();
|
|
void MakePost();
|
|
|
|
// used mainly by templates
|
|
// can return a null pointer
|
|
User * GetUser();
|
|
|
|
private:
|
|
|
|
PT::SpaceParser conf_parser;
|
|
PT::Space space;
|
|
User * puser;
|
|
size_t req_id;
|
|
|
|
bool Parse(const std::wstring & env_str);
|
|
void SaveEnv();
|
|
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|
|
|
|
#endif
|