/** * Check if grid belongs to twigmo location * @param int $grid_id */ function fn_twg_is_twigmo_grid($grid_id) { $grid = Grid::getById($grid_id); if (!$grid) { return false; } $container = Container::getById($grid['container_id']); return fn_twg_is_twigmo_location($container['location_id']); }
<?php /*************************************************************************** * * * (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev * * * * This is commercial software, only users who have purchased a valid * * license and accept to the terms of the License Agreement can install * * and use this program. * * * **************************************************************************** * PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE * * "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. * ****************************************************************************/ if (!defined('BOOTSTRAP')) { die('Access denied'); } if ($mode == 'update_block' and !empty($_REQUEST['selected_location'])) { if (fn_twg_is_twigmo_location($_REQUEST['selected_location'])) { $view = fn_twg_get_view_object(); $view->assign('is_twigmo_location', '1'); } }