Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

get_usergroup_available_tiles()

Parameters

ColumnTypeDefaultDescription
$user_group_id
$tile ''

Location

include/dash_functions.php lines 821 to 835

Definition

 
function get_usergroup_available_tiles($user_group_id$tile '')
    {
    if(!
is_numeric($user_group_id))
        {
        
trigger_error('$user_group_id has to be a number');
        }

    
$tile_sql '';
    if(
'' != $tile)
        {
        
$tile_sql "AND dt.ref = '" escape_check($tile) . "'";
        }

    return 
sql_query("SELECT dt.ref, dt.ref AS `tile`, dt.title, dt.txt, dt.link, dt.url, dt.reload_interval_secs, dt.resource_count, dt.all_users, dt.allow_delete, dt.default_order_by, udt.order_by , 1 AS 'dash_tile' FROM dash_tile AS dt LEFT JOIN usergroup_dash_tile AS udt ON dt.ref = udt.dash_tile WHERE dt.all_users = 1 AND udt.usergroup = '{$user_group_id}{$tile_sql} ORDER BY udt.default_order_by ASC");
    }

This article was last updated 12th July 2020 07:05 Europe/London time based on the source file dated 24th June 2020 14:38 Europe/London time.