本文整理汇总了PHP中cot_plugin_active函数的典型用法代码示例。如果您正苦于以下问题:PHP cot_plugin_active函数的具体用法?PHP cot_plugin_active怎么用?PHP cot_plugin_active使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cot_plugin_active函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: subscribe_checkEmail
/**
* Проверяем e-mail
* @param string $mail - проверяемый e-mail
*
* @return bool|string TRUE or Error message
*/
function subscribe_checkEmail($mail = '')
{
global $db_banlist, $db;
// Проверяем бан-лист
if (cot_plugin_active('banlist')) {
$sql = cot::$db->query("SELECT banlist_reason, banlist_email FROM {$db_banlist}\n WHERE banlist_email LIKE " . cot::$db->quote('%' . $mail . '%'));
if ($row = $sql->fetch()) {
$ret = cot::$L['aut_emailbanned'] . $row['banlist_reason'];
return $ret;
}
$sql->closeCursor();
}
if (!cot_check_email($mail)) {
$ret = cot::$L['subscribe_err_wrongmail'];
return $ret;
}
return true;
}
示例2: karma_user_post
/**
* Проверкаи запись постов пользователя
* @param num $user_id - ID пользователя.
* @return num - возвращаем посты.
*/
function karma_user_post($user_id)
{
global $db, $db_forum_posts, $db_com, $db_pages, $db_users, $usr;
if (cot_module_active('forums')) {
cot::$db->registerTable('forum_posts');
$frmc = $db->query("SELECT COUNT(*) FROM {$db_forum_posts} WHERE fp_posterid = {$user_id} ")->fetchColumn();
}
if (cot_plugin_active('comments')) {
cot::$db->registerTable('com');
$comc = $db->query("SELECT COUNT(*) FROM {$db_com} WHERE com_authorid = {$user_id} ")->fetchColumn();
}
if (cot_module_active('page')) {
cot::$db->registerTable('pages');
$pgc = $db->query("SELECT COUNT(*) FROM {$db_pages} WHERE page_ownerid = {$user_id} and page_state = 0 ")->fetchColumn();
}
if (cot_module_active('users')) {
cot::$db->registerTable('users');
$klast = explode(":", $usr['profile']['user_karma_auth']);
$karmasave = $klast[0] . ":" . $klast[1] . ":" . $klast[2] . ":" . ($frmc + $comc + $pgc);
$db->query("UPDATE {$db_users} SET user_karma_auth = '" . $karmasave . "' WHERE user_id= {$user_id} ");
}
return $frmc + $comc + $pgc;
}
示例3: defined
<?php
/**
* [BEGIN_COT_EXT]
* Hooks=users.profile.update.first, users.edit.update.first, users.register.add.first
* [END_COT_EXT]
*/
defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('usercategories', 'plug');
$catslimit = cot_cfg_usercategories();
$rcats = cot_import('rcats', 'P', 'ARR');
if (is_array($rcats)) {
$rcats = array_filter($rcats);
$ruser['user_cats'] = implode(',', $rcats);
if ($m == 'edit' || $m == 'profile') {
$groupid = $urr['user_maingrp'];
} else {
$groupid = cot_import('ruserusergroup', 'P', 'INT');
}
if (!cot_plugin_active('paypro') || cot_plugin_active('paypro') && !cot_getuserpro($urr)) {
cot_check($catslimit[$groupid]['default'] > 0 && count($rcats) > $catslimit[$groupid]['default'], cot_rc($L['usercategories_error_catslimit'], array('limit' => $catslimit[$groupid]['default'])), 'rcats');
} elseif (cot_plugin_active('paypro') && cot_getuserpro($urr)) {
cot_check($catslimit[$groupid]['pro'] > 0 && count($rcats) > $catslimit[$groupid]['pro'], cot_rc($L['usercategories_error_catslimit'], array('limit' => $catslimit[$groupid]['pro'])), 'rcats');
}
}
示例4: XTemplate
$tr_t = new XTemplate(cot_tplfile($info ? 'trashcan.info.admin' : 'trashcan.admin', 'plug', true));
$totalitems = (int) $db->query("SELECT COUNT(*) FROM {$db_trash} WHERE tr_parentid=0")->fetchColumn();
$pagenav = cot_pagenav('admin', 'm=other&p=trashcan', $d, $totalitems, $maxperpage, 'd', '', $cfg['jquery'] && $cfg['turnajax']);
$sql_query = $info ? "AND tr_id={$id} LIMIT 1" : "ORDER by tr_id DESC LIMIT {$d}, " . $maxperpage;
$sql = $db->query("SELECT t.*, u.user_name FROM {$db_trash} AS t\n\tLEFT JOIN {$db_users} AS u ON t.tr_trashedby=u.user_id\n\tWHERE tr_parentid=0 {$sql_query}");
$ii = 0;
/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('trashcan.admin.loop');
/* ===== */
foreach ($sql->fetchAll() as $row) {
$ii++;
switch ($row['tr_type']) {
case 'comment':
$icon = $R['admin_icon_comments'];
$typestr = $L['Comment'];
$enabled = cot_plugin_active('comments') ? 1 : 0;
break;
case 'forumpost':
$icon = $R['admin_icon_forums_posts'];
$typestr = $L['Post'];
$enabled = cot_module_active('forums') ? 1 : 0;
break;
case 'forumtopic':
$icon = $R['admin_icon_forums_topics'];
$typestr = $L['Topic'];
$enabled = cot_module_active('forums') ? 1 : 0;
break;
case 'page':
$icon = $R['admin_icon_page'];
$typestr = $L['Page'];
$enabled = cot_module_active('page') ? 1 : 0;
示例5: cot_validate_stages
/**
* Вычищаем ненужные символы из названий и текстов стадий
*
* @param array $rstagetitle Массив из title стадий
* @param array $rstagetext Массив из text стадий
* @param bool $purifier TRUE - вычистить внутренности скриптов, FALSE - заменить допустимыми символами
*/
function cot_validate_stages(&$rstagetitle, &$rstagetext, $purifier = false)
{
// Если включен плагин htmlpurifier, то очищаем через него
if ($purifier === true) {
if (cot_plugin_active('htmlpurifier') && function_exists('htmlpurifier_filter')) {
foreach ($rstagetitle as $key => $value) {
$rstagetitle[$key] = htmlpurifier_filter($value, false);
}
foreach ($rstagetext as $key => $value) {
$rstagetext[$key] = htmlpurifier_filter($value, false);
}
} else {
error_log('Попытка функции cot_validate_stages валидировать title и text с помощью неактивного плагина htmlpurifier');
return false;
}
} else {
foreach ($rstagetitle as $key => $value) {
$rstagetitle[$key] = str_replace('<', '<', trim($value));
}
foreach ($rstagetext as $key => $value) {
$rstagetext[$key] = str_replace('<', '<', trim($value));
}
}
}
示例6: defined
<?php
/**
* pagecattree Plugin for Cotonti CMF
*
* @version 2.0.0
* @author esclkm, http://www.littledev.ru
* @copyright (c) 2008-2011 esclkm, http://www.littledev.ru
*/
defined('COT_CODE') or die('Wrong URL.');
$adminpath[] = array(cot_url('admin', 'm=structure'), $L['Structure']);
// Show available module list
if (is_array($extension_structure) && count($extension_structure) > 0) {
foreach ($extension_structure as $code) {
$parse = false;
if (cot_plugin_active($code)) {
$is_module = false;
$parse = true;
}
if (cot_module_active($code)) {
$is_module = true;
$parse = true;
}
if ($parse) {
$ext_info = cot_get_extensionparams($code, $is_module);
$t->assign(array('ADMIN_STRUCTURE_EXT_URL' => cot_url('admin', 'm=other&p=cateditor&n=' . $code), 'ADMIN_STRUCTURE_EXT_ICO' => $ext_info['icon'], 'ADMIN_STRUCTURE_EXT_NAME' => $ext_info['name']));
$t->parse('MAIN.ADMIN_STRUCTURE_EXT');
}
}
} else {
$t->parse('MAIN.ADMIN_STRUCTURE_EMPTY');
示例7: defined
<?php
/**
* Uninstallation handler
*
* @package I18n
* @copyright (c) Cotonti Team
* @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
*/
defined('COT_CODE') or die('Wrong URL');
if (cot_plugin_active('tags')) {
// Remove i18n-specific tags
require_once cot_incfile('tags', 'plug');
global $db_tag_references;
$db->delete($db_tag_references, "tag_locale != ''");
$db->query("ALTER TABLE {$db_tag_references} DROP PRIMARY KEY");
$db->query("ALTER TABLE {$db_tag_references} ADD PRIMARY KEY (`tag`,`tag_area`,`tag_item`)");
$db->query("ALTER TABLE {$db_tag_references} DROP COLUMN `tag_locale`");
}
示例8: cot_shield_hammer
/**
* Anti-hammer protection
*
* @param int $hammer Hammer rate
* @param string $action Action type
* @param int $lastseen User last seen timestamp
* @return int
*/
function cot_shield_hammer($hammer, $action, $lastseen)
{
global $cfg, $sys;
if ($action == 'Hammering') {
cot_shield_protect();
cot_shield_clearaction();
cot_plugin_active('hits') && cot_stat_inc('totalantihammer');
}
if ($sys['now'] - $lastseen < 4) {
$hammer++;
if ($hammer > $cfg['shieldzhammer']) {
cot_shield_update(180, 'Hammering');
cot_log('IP banned 3 mins, was hammering', 'sec');
$hammer = 0;
}
} else {
if ($hammer > 0) {
$hammer--;
}
}
return $hammer;
}
示例9: is_numeric
$pl_cfg = $cfg['plugin']['whosonline'];
$maxuserssperpage = is_numeric($pl_cfg['maxusersperpage']) ? $pl_cfg['maxusersperpage'] : 0;
list($pg, $d, $durl) = cot_import_pagenav('d', $maxuserssperpage);
$maxusers = 0;
if (isset($cfg['plugin']['hits'])) {
require_once cot_incfile('hits', 'plug');
$stats = $db->query("SELECT stat_value FROM {$db_stats} WHERE stat_name='maxusers' LIMIT 1")->fetch();
$maxusers = $stats[0];
}
$count_users = 0;
$count_guests = 0;
if (cot_plugin_active('hiddengroups')) {
require_once cot_incfile('hiddengroups', 'plug');
$hiddenusers = cot_hiddengroups_get(cot_hiddengroups_mode(), 'users');
}
$ipsearch = cot_plugin_active('ipsearch');
$out['subtitle'] = $L['WhosOnline'];
$join_condition = "LEFT JOIN {$db_users} AS u ON u.user_id=o.online_userid";
if ($pl_cfg['disable_guests']) {
$where = "WHERE o.online_userid > 0";
}
$is_user_check = 'IF(o.online_userid > 0,1,0) as is_user';
$limit = $maxuserssperpage ? "LIMIT {$d}, {$maxuserssperpage}" : '';
$sql_users = $db->query("\n\tSELECT DISTINCT u.*, o.*, {$is_user_check}\n\tFROM {$db_online} AS o\n\t{$join_condition} {$where}\n\tORDER BY is_user DESC, online_lastseen DESC {$limit}\n");
$sql_users_count = $db->query("SELECT COUNT(*) as cnt, {$is_user_check} FROM {$db_online} as o {$where} GROUP BY is_user");
$who_guests = 0;
$who_users = 0;
foreach ($sql_users_count as $row) {
if ($row['is_user']) {
$who_users = (int) $row['cnt'];
} else {
示例10: defined
<?php
/**
* markItUp! install handler
*
* @package MarItUp
* @copyright (c) Cotonti Team
* @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
*/
defined('COT_CODE') or die('Wrong URL');
// Installing new bbcodes
if (cot_plugin_active('bbcode')) {
require_once cot_incfile('bbcode', 'plug');
cot_bbcode_remove(0, 'markitup');
cot_bbcode_add('size', 'pcre', '\\[size=([1-2][0-9])\\](.+?)\\[/size\\]', '<span style="font-size:$1pt">$2</span>', true, 128, 'markitup');
cot_bbcode_add('table', 'str', '[table]', '<table>', true, 128, 'markitup');
cot_bbcode_add('table', 'str', '[/table]', '</table>', true, 128, 'markitup');
cot_bbcode_add('tr', 'str', '[tr]', '<tr>', true, 128, 'markitup');
cot_bbcode_add('tr', 'str', '[/tr]', '</tr>', true, 128, 'markitup');
cot_bbcode_add('th', 'str', '[th]', '<th>', true, 128, 'markitup');
cot_bbcode_add('th', 'str', '[/th]', '</th>', true, 128, 'markitup');
cot_bbcode_add('td', 'str', '[td]', '<td>', true, 128, 'markitup');
cot_bbcode_add('td', 'str', '[/td]', '</td>', true, 128, 'markitup');
cot_bbcode_add('hide', 'callback', '\\[hide\\](.+?)\\[/hide\\]', 'return $usr["id"] > 0 ? $input[1] : "<div class=\\"hidden\\">".$L["Hidden"]."</div>";', true, 150, 'markitup', true);
cot_bbcode_add('spoiler', 'pcre', '\\[spoiler\\](.+?)\\[/spoiler\\]', '<div style="margin:4px 0px 4px 0px"><input type="button" value="' . $L['Show'] . '" onclick="if(this.parentNode.getElementsByTagName(\'div\')[0].style.display != \'\') { this.parentNode.getElementsByTagName(\'div\')[0].style.display = \'\'; } else { this.parentNode.getElementsByTagName(\'div\')[0].style.display = \'none\'; }" /><div style="display:none" class="spoiler">$1</div></div>', true, 130, 'markitup');
cot_bbcode_add('spoiler', 'pcre', '\\[spoiler=([^\\]]+)\\](.+?)\\[/spoiler\\]', '<div style="margin:4px 0px 4px 0px"><input type="button" value="$1" onclick="if(this.parentNode.getElementsByTagName(\'div\')[0].style.display != \'\') { this.parentNode.getElementsByTagName(\'div\')[0].style.display = \'\'; } else { this.parentNode.getElementsByTagName(\'div\')[0].style.display = \'none\'; }" /><div style="display:none" class="spoiler">$2</div></div>', true, 130, 'markitup');
cot_bbcode_clearcache();
}
示例11: cot_clear_mark
function cot_clear_mark($text, $words)
{
global $cfg;
$text = trim($text);
if (!empty($text)) {
$text = preg_replace("'\r?\n'", " ", $text);
$text = preg_replace("'\\s+'", " ", $text);
if (cot_plugin_active('bbcode')) {
// BB
$text = preg_replace("'\\[img.*?/img\\]'si", "", $text);
$text = preg_replace("'\\[thumb.*?/thumb\\]'si", "", $text);
$text = preg_replace("'[[^]]*?.*?]'si", "", $text);
}
// HTML
$text = strip_tags($text);
$text = htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
foreach ($words as $i => $w) {
$p = mb_stripos($text, $w);
if ($p > 0) {
$p_arr[] = $p;
}
}
if (count($p_arr)) {
sort($p_arr);
$text_result = '';
$last_pos = -1;
$delta = 255 / count($p_arr);
$text_len = mb_strlen($text);
foreach ($p_arr as $pos_mid) {
$pos_beg = $pos_mid - $delta;
if ($pos_beg <= 0) {
$pos_beg = 0;
} else {
while ($pos_beg > 0 && mb_substr($text, $pos_beg, 1) != " ") {
$pos_beg--;
}
}
$pos_end = $pos_mid + $delta;
if ($pos_end > $text_len) {
$pos_end = $text_len;
} else {
while ($pos_end < $text_len && mb_substr($text, $pos_end, 1) != " ") {
$pos_end++;
}
}
if ($pos_beg <= $last_pos) {
$arOtr[count($arOtr) - 1][1] = $pos_end;
} else {
$arOtr[] = array($pos_beg, $pos_end);
}
$last_pos = $pos_end;
}
if (count($arOtr)) {
for ($i = 0; $i < count($arOtr); $i++) {
$text_result .= $arOtr[$i][0] <= 0 ? '' : ' ...';
$text_result .= mb_substr($text, $arOtr[$i][0], $arOtr[$i][1] - $arOtr[$i][0]);
$text_result .= $arOtr[$i][1] >= $text_len ? '' : ' ... ';
}
}
}
if (mb_strlen($text_result) < 10) {
$len_cut = 255;
$len_txt = mb_strlen($text);
$len_cut = $len_txt < $len_cut ? $len_txt : $len_cut;
$text_result = mb_substr($text, 0, $len_cut);
$text_result = $len_cut < $len_txt ? $text_result . '... ' : $text_result;
}
foreach ($words as $k => $i) {
$text_result = str_ireplace($i, '<span class="search_hl">' . $i . '</span>', $text_result);
}
return $text_result;
}
return "";
}
示例12: cot_incfile
require_once cot_incfile('cateditor', 'plug');
require_once cot_incfile('cateditor', 'plug', 'structure');
require_once cot_langfile('cateditor', 'plug');
cot_rc_add_file($cfg['plugins_dir'] . '/cateditor/lib/jquery.nestable.js');
cot_rc_add_file($cfg['plugins_dir'] . '/cateditor/lib/jquery.cookie.js');
cot_rc_add_file($cfg['plugins_dir'] . '/cateditor/lib/jquery.nestable.css');
cot_rc_add_file($cfg['plugins_dir'] . '/cateditor/lib/cateditor.js');
/* === Hook === */
foreach (cot_getextplugins('admin.structure.first') as $pl) {
include $pl;
}
/* ===== */
//cot_rc_link_file($cfg['plugins_dir'].'/banners/tpl/admin.css');
// Роутер
// Only if the file exists...
if (is_array($extension_structure) && count($extension_structure) == 1 && (cot_plugin_active($extension_structure[0]) || cot_module_active($extension_structure[0]))) {
$n = $extension_structure[0];
}
$sub = empty($n) ? 'list' : 'editor';
if (!empty($n)) {
$cot_structure = new structure($n);
$is_module = cot_module_active($n);
if (file_exists(cot_incfile($n, $is_module ? 'module' : 'plug'))) {
require_once cot_incfile($n, $is_module ? 'module' : 'plug');
}
}
if (!empty($a) && file_exists(cot_incfile('cateditor', 'plug', 'admin.' . $sub . '.' . $a))) {
require_once cot_incfile('cateditor', 'plug', 'admin.' . $sub . '.' . $a);
}
if (file_exists(cot_incfile('cateditor', 'plug', 'admin.' . $sub))) {
$t = new XTemplate(cot_tplfile('cateditor.admin.' . $sub, 'plug'));
示例13: defined
*
* @package usergroupselector
* @version 1.0.0
* @author CMSWorks Team
* @copyright Copyright (c) CMSWorks.ru, littledev.ru
* @license BSD
* */
defined('COT_CODE') or die('Wrong URL');
global $db_users, $db_groups, $db_auth, $db_config;
require_once cot_incfile('auth');
// Add field if missing
if (!$db->fieldExists($db_users, "user_usergroup")) {
$dbres = $db->query("ALTER TABLE `{$db_users}` ADD COLUMN `user_usergroup` int(11) NOT NULL default '0'");
}
// Переносим значение из старого поля user_role в новое поле для группы по-умолчанию
if (cot_plugin_active('freelancers')) {
if (!$db->fieldExists($db_users, "user_role")) {
$dbres = $db->query("UPDATE `{$db_users}` SET user_usergroup=user_role WHERE 1");
}
}
// Дальше проверяем наличие групп в базе, если их нет, то создаем
$group_exists = (bool) $db->query("SELECT grp_id FROM {$db_groups} WHERE grp_id=4")->fetch();
if ($group_exists) {
$rgroups['grp_name'] = 'Фрилансеры';
$rgroups['grp_title'] = 'Фрилансер';
$rgroups['grp_alias'] = 'freelancer';
$db->update($db_groups, $rgroups, 'grp_id=4');
$db->update($db_auth, array('auth_rights' => 5), "auth_groupid=4 AND auth_code='projects'");
// Устанавливаем права только на создание предложений в проектах
}
$group_exists = (bool) $db->query("SELECT grp_id FROM {$db_groups} WHERE grp_alias='employer'")->fetch();
示例14: while
while ($row = $sql->fetch()) {
unset($row['auth_id']);
$row['auth_code'] = 'folio';
$db->insert($db_auth, $row);
}
// Копируем записи из таблицы Foliostore в Folio
// При этом также переименовываем загруженные изображения в плагине Mavatars
$sql = $db->query("SELECT * FROM {$db_foliostore} WHERE item_store<>1");
while ($row = $sql->fetch()) {
$folioid = $row['item_id'];
unset($row['item_id']);
unset($row['item_store']);
unset($row['item_index']);
$db->insert($db_folio, $row);
$id = $db->lastInsertId();
if (cot_plugin_active('mavatars')) {
if ($mav = $db->query("SELECT * FROM {$db_mavatars} WHERE mav_code=" . $folioid . " AND mav_extension='foliostore'")->fetch()) {
unset($mav['mav_id']);
$mav['mav_extension'] = 'folio';
$mav['mav_code'] = $id;
$db->insert($db_mavatars, $mav);
}
}
}
} else {
require_once cot_incfile('structure');
cot_structure_add('folio', array('structure_area' => 'folio', 'structure_code' => 'programming', 'structure_title' => 'Программирование', 'structure_path' => '001'));
cot_structure_add('folio', array('structure_area' => 'folio', 'structure_code' => 'management', 'structure_title' => 'Менеджмент', 'structure_path' => '002'));
cot_structure_add('folio', array('structure_area' => 'folio', 'structure_code' => 'folioing', 'structure_title' => 'Маркетинг и реклама', 'structure_path' => '003'));
cot_structure_add('folio', array('structure_area' => 'folio', 'structure_code' => 'design', 'structure_title' => 'Дизайн', 'structure_path' => '004'));
cot_structure_add('folio', array('structure_area' => 'folio', 'structure_code' => 'seo', 'structure_title' => 'Оптимизация (SEO)', 'structure_path' => '005'));
示例15: fieldList
public static function fieldList()
{
$fields = array('id' => array('type' => 'int', 'description' => 'id', 'primary' => true), 'alias' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['Alias']), 'state' => array('type' => 'tinyint', 'length' => 1, 'default' => 0, 'description' => cot::$L['Status']), 'category' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'nullable' => false, 'description' => cot::$L['Category']), 'title' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['Title']), 'price' => array('type' => 'decimal(15,2)', 'default' => 0, 'description' => cot::$L['advboard_price']), 'description' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['advboard_desc']), 'text' => array('type' => 'text', 'default' => '', 'description' => cot::$L['Text']), 'person' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['advboard_person']), 'email' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['Email']), 'city' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['advboard_city']), 'city_name' => array('name' => 'city_name', 'type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['advboard_city']), 'phone' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['advboard_phone']), 'sticky' => array('type' => 'tinyint', 'length' => 1, 'default' => 0, 'description' => cot::$L['advboard_sticky']), 'begin' => array('type' => 'int', 'default' => cot::$sys['now'], 'description' => cot::$L['Begin']), 'expire' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['Expire']), 'sort' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['advboard_sort_date']), 'user' => array('type' => 'int', 'default' => 0, 'nullable' => false, 'description' => 'id Владельца'), 'views' => array('type' => 'mediumint', 'length' => 8, 'default' => 0, 'description' => 'Количество просмотров'), 'admin_notified' => array('type' => 'datetime', 'default' => '1970-01-01 00:00:01', 'description' => 'Дата создания'), 'created' => array('type' => 'datetime', 'default' => date('Y-m-d H:i:s', cot::$sys['now']), 'description' => 'Дата создания'), 'created_by' => array('type' => 'int', 'default' => cot::$usr['id'], 'description' => 'Кем создано'), 'updated' => array('type' => 'datetime', 'default' => date('Y-m-d H:i:s', cot::$sys['now']), 'description' => 'Дата обновления'), 'updated_by' => array('type' => 'int', 'default' => cot::$usr['id'], 'description' => 'Кем обновлено'));
if (cot_plugin_active('regioncity')) {
$fields['city'] = array('name' => 'city', 'type' => 'link', 'default' => 0, 'description' => cot::$L['advboard_city'], 'link' => array('model' => 'regioncity_model_City', 'relation' => SOM::TO_ONE_NULL, 'label' => 'title'));
}
return $fields;
}