if ($banner->ba_type == BaBanner::TYPE_CUSTOM) { $temp_array['BANNER'] = cot_rc('banner', array('banner' => $banner->ba_customcode)); } } /* === Hook === */ foreach ($extp_main as $pl) { include $pl; } /* ===== */ $cacheitem && ($cache[$banner->ba_id] = $temp_array); } else { // Диалога не существует } } $return_array = array(); foreach ($temp_array as $key => $val) { $return_array[$tagPrefix . $key] = $val; } return $return_array; } public static function fieldList() { $nullDate = date('Y-m-d H:i:s', 0); // 1970-01-01 00:00:00 $fields = array('id' => array('type' => 'int', 'description' => 'id', 'primary' => true), 'type' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['Type']), 'title' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'nullable' => false, 'description' => cot::$L['Title']), 'category' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'nullable' => false, 'description' => cot::$L['Category']), 'file' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['Image']), 'width' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['brs_width']), 'height' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['brs_height']), 'alt' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['brs_alt']), 'customcode' => array('type' => 'text', 'default' => '', 'description' => cot::$L['brs_custom_code']), 'clickurl' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['brs_click_url']), 'description' => array('type' => 'text', 'default' => '', 'description' => cot::$L['Description']), 'published' => array('type' => 'tinyint', 'length' => '1', 'default' => 0, 'description' => cot::$L['brs_published']), 'sticky' => array('type' => 'tinyint', 'length' => '1', 'default' => 0, 'description' => cot::$L['brs_sticky']), 'publish_up' => array('type' => 'datetime', 'default' => $nullDate, 'description' => cot::$L['brs_publish_up']), 'publish_down' => array('type' => 'datetime', 'default' => $nullDate, 'description' => cot::$L['brs_publish_down']), 'imptotal' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['brs_imptotal']), 'impressions' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['brs_impressions']), 'lastimp' => array('type' => 'double', 'default' => 0, 'description' => ''), 'clicks' => array('type' => 'int', 'default' => 0, 'description' => cot::$L['brs_clicks_all']), 'client' => array('type' => 'link', 'default' => 0, 'description' => cot::$L['brs_client'], 'link' => array('model' => 'brs_model_Client', 'relation' => Som::TO_ONE_NULL, 'label' => 'title')), 'track_clicks' => array('type' => 'tinyint', 'default' => -1, 'description' => cot::$L['brs_track_clicks']), 'track_impressions' => array('type' => 'tinyint', 'default' => -1, 'description' => cot::$L['brs_track_impressions']), 'purchase_type' => array('type' => 'tinyint', 'default' => -1, 'description' => cot::$L['brs_purchase_type']), 'sort' => array('type' => 'int', 'default' => 0, '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' => '')); return $fields; } } // Class initialization for some static variables brs_model_Banner::__init();