<?php
$filter = new stdclass();
$filter->rules    = new stdclass();
$filter->default  = new stdclass();

$filter->blog     = new stdclass();
$filter->customer = new stdclass();
$filter->doc      = new stdclass();
$filter->entry    = new stdclass();
$filter->file     = new stdclass();
$filter->my       = new stdclass();
$filter->project  = new stdclass();
$filter->reply    = new stdclass();
$filter->rss      = new stdclass();
$filter->sso      = new stdclass();
$filter->thread   = new stdclass();
$filter->todo     = new stdclass();
$filter->trade    = new stdclass();
$filter->upgrade  = new stdclass();
$filter->user     = new stdclass();
$filter->webapp   = new stdclass();

$filter->rules->any        = '/./';
$filter->rules->base64     = '/^[a-zA-Z0-9\+\/\=]+$/';
$filter->rules->callback   = '/^[a-zA-Z0-9=\&\%\.\/\-\:\?]+$/';
$filter->rules->character  = '/^[a-zA-Z_\-]+$/';
$filter->rules->checked    = '/^[0-9,]+$/';
$filter->rules->common     = '/^[a-zA-Z0-9_]+$/';
$filter->rules->browseType = '/^by[a-z]+$/';
$filter->rules->idList     = '/^[0-9\|]+$/';
$filter->rules->key        = '/^[a-z0-9]{32}+$/';
$filter->rules->lang       = '/^[a-zA-Z_\-]+$/';
$filter->rules->md5        = '/^[a-z0-9]{32}$/';
$filter->rules->number     = '/^[0-9]+$/';
$filter->rules->orderBy    = '/^\w+_(desc|asc)$/i';
$filter->rules->paramName  = '/^[a-zA-Z0-9_\.]+$/';
$filter->rules->paramValue = '/^[a-zA-Z0-9=_,:\-\?\&`#+\^\/\.%\|\x7f-\xff]+$/';
$filter->rules->path       = '/(^//.|^/|^[a-zA-Z])?:?/.+(/$)?/';
$filter->rules->word       = '/^\w+$/';

$filter->default->moduleName = 'code';
$filter->default->methodName = 'code';
$filter->default->paramName  = 'reg::paramName';
$filter->default->paramValue = 'reg::paramValue';

$filter->default->get['onlybody']              = 'equal::yes';
$filter->default->get['lang']                  = 'reg::lang';
$filter->default->get['HTTP_X_REQUESTED_WITH'] = 'equal::XMLHttpRequest';

$filter->default->cookie['lang']           = 'reg::lang';
$filter->default->cookie['theme']          = 'reg::common';
$filter->default->cookie['device']         = 'reg::common';
$filter->default->cookie['ra']             = 'reg::common';
$filter->default->cookie['rp']             = 'reg::common';
$filter->default->cookie['keepLogin']      = 'equal::on';
$filter->default->cookie['lastBrowserUrl'] = 'url';

$filter->block = new stdclass();
$filter->block->default = new stdclass();
$filter->block->default->get['mode']      = 'reg::character';
$filter->block->default->get['blockid']   = 'reg::character';
$filter->block->default->get['hash']      = 'reg::md5';
$filter->block->default->get['sso']       = 'reg::word';
$filter->block->default->get['app']       = 'reg::character';
$filter->block->default->get['param']     = 'reg::base64';
$filter->block->default->get['longblock'] = 'reg::number';

$filter->entry = new stdclass();
$filter->entry->depts = new stdclass();
$filter->entry->depts->get['key'] = 'reg::key';

$filter->entry->users = new stdclass();
$filter->entry->users->get['key'] = 'reg::key';

$filter->entry->visit = new stdclass();
$filter->entry->visit->get['referer'] = 'reg::base64';

$filter->file = new stdclass();
$filter->file->ajaxueditorupload = new stdclass();
$filter->file->ajaxueditorupload->get['action'] = 'equal::config';

$filter->file->filemanager = new stdclass();
$filter->file->filemanager->get['path']  = 'reg::path';
$filter->file->filemanager->get['order'] = 'reg::common';

$filter->file->download = new stdclass();
$filter->file->download->cookie[$config->sessionVar] = 'reg::common';

$filter->rss = new stdclass();
$filter->rss->index = new stdclass();
$filter->rss->index->get['type'] = 'reg::common';

$filter->sso = new stdclass();
$filter->sso->check = new stdclass();
$filter->sso->check->get['callback'] = 'reg::callback';
$filter->sso->check->get['referer']  = 'reg::base64';
$filter->sso->check->get['token']    = 'reg::key';
$filter->sso->check->get['auth']     = 'reg::key';
$filter->sso->check->get['userIP']   = 'ip';

$filter->sso->leaveusers = new stdclass();
$filter->sso->leaveusers->get['code'] = 'code';
$filter->sso->leaveusers->get['key']  = 'reg::key';

$filter->upgrade = new stdclass();
$filter->upgrade->upgradelicense = new stdclass();
$filter->upgrade->upgradelicense->get['agree'] = 'equal::true';

$filter->user = new stdclass();
$filter->user->login = new stdclass();
$filter->user->login->get['lang'] = 'reg::lang';

$filter->blog = new stdclass();
$filter->blog->view = new stdclass();
$filter->blog->view->cookie['windowReloadUrl'] = 'equal::true';

$filter->doc = new stdclass();
$filter->doc->browse = new stdclass();
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';

$filter->my = new stdclass();
$filter->my->project = new stdclass();
$filter->my->project->cookie['taskListType'] = 'code';

$filter->project = new stdclass();
$filter->project->default = new stdclass();
$filter->project->default->cookie['lastProject'] = 'int';
$filter->project->default->cookie['projectMode'] = 'code';

$filter->project->index = new stdclass();
$filter->project->index->cookie['taskListType'] = 'code';

$filter->reply = new stdclass();
$filter->reply->default = new stdclass();
$filter->reply->default->cookie['r'] = 'reg::checked';

$filter->thread = new stdclass();
$filter->thread->default = new stdclass();
$filter->thread->default->cookie['t'] = 'reg::checked';

$filter->todo = new stdclass();
$filter->todo->calendar = new stdclass();
$filter->todo->calendar->cookie['todoCalendarSide'] = 'equal::hide';

$filter->trade = new stdclass();
$filter->trade->browse = new stdclass();
$filter->trade->browse->cookie['treeview'] = 'code';

$filter->webapp = new stdclass();
$filter->webapp->obtain = new stdclass();
$filter->webapp->obtain->cookie['pagerWebappObtain'] = 'int';

$filter->customer = new stdclass();
$filter->customer->ajaxgetpairs = new stdclass();
$filter->customer->ajaxgetpairs->paramValue['key'] = 'reg::any';

$filter->customer = new stdclass();
$filter->customer->ajaxsearchcustomer = new stdclass();
$filter->customer->ajaxsearchcustomer->paramValue['key'] = 'reg::any';

$filter->user = new stdclass();
$filter->user->admin = new stdclass();
$filter->user->admin->paramValue['query'] = 'reg::any';
