<?php
/**
 * Copyright (C) 2009  Honghao Geng (genghonghao@gmail.com)
 * $Id: constant.inc.php 587 2010-07-31 19:35:19Z genghonghao $
 */

// member constant
define('MEMBER_ADMIN', 1);
define('MEMBER_GUEST', 0);
define('MEMBER_GUEST_NAME', 'Guest');

define('SMARTGOONE_CHARSET', 'UTF8');
define('POWER_BY_SMARTGOON', 'Gen');
define('GEN_SESSION_GC_MAXLIFETIME', 976800);
// form constant
if(!defined('GEN_MAX_POSTSIZE')) { define('GEN_MAX_POSTSIZE', 65535); }
if(!defined('GEN_SEARCH_MIN_WORD')) { define('GEN_SEARCH_MIN_WORD', 3); }
if(!defined('GEN_SEARCH_MAX_WORD')) { define('GEN_SEARCH_MAX_WORD', 20); }

define('GEN_SESSION_NAME', 'gen_sess');
define('GEN_LINE_BREAK', (strtolower(PHP_OS) == 'linux') ? "\n" : "\r\n");

define('GEN_VERSION', 'GEN v,1.0.0 beta');

// Table
define('TB_ADMIN',                   'sg_admin');
define('TB_ARTICLE',               'sg_article');
define('TB_CATEGORY',             'sg_category');
define('TB_CONF',                     'sg_conf');
define('TB_LINKS',                   'sg_links');
define('TB_REPLY',                   'sg_reply');
define('TB_SESSIONS',             'sg_sessions');
define('TB_STATISTICS',         'sg_statistics');
define('TB_TAGS',                     'sg_tags');
define('TB_PERMISSIONS',       'sg_permissions');
define('TB_IMAGE',                   'sg_image');
define('TB_IMAGE_CATEGORY', 'sg_image_category');
define('TB_COMMENT_FILTER', 'sg_comment_filter');
define('TB_NAVIGATION',     'sg_navigation');

// Upload image error level
define('ERR_INVALID_IMAGE',             1);
define('ERR_NO_GD',                     2);
define('ERR_IMAGE_NOT_EXISTS',          3);
define('ERR_DIRECTORY_READONLY',        4);
define('ERR_UPLOAD_FAILURE',            5);
define('ERR_INVALID_PARAM',             6);
define('ERR_INVALID_IMAGE_TYPE',        7);

// Upload image dir
define('IMAGE_DIR',               'data/upload/images');
define('BACKUP_DIR',              'data/upload/backup');
define('DATA_DIR',                'upload');
?>
