Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_alluser_available_tiles()

Parameters

ColumnTypeDefaultDescription
$tile "null"

Location

include/dash_functions.php lines 386 to 426

Definition

 
function get_alluser_available_tiles($tile="null")
    {
    if(
is_numeric($tile))
        {
        
$tilecheck 'AND ref = ?'$params = ['i'$tile];
        }
    else
        {
        
$tilecheck '';
        
$params = [];
        }
    
    return 
ps_query(
            
"
            SELECT 
                dash_tile.ref,
                dash_tile.ref as 'tile',
                dash_tile.title,
                dash_tile.txt,
                dash_tile.link,
                dash_tile.url,
                dash_tile.reload_interval_secs,
                dash_tile.resource_count,
                dash_tile.all_users,
                dash_tile.allow_delete,
                dash_tile.default_order_by,
                dash_tile.default_order_by AS `order_by`, # needed for get_default_dash()
                (IF(ref IN (select distinct dash_tile FROM user_dash_tile),1,0)) as 'dash_tile'
            FROM
                dash_tile
            WHERE
                dash_tile.all_users=1 
            "
.$tilecheck."
                AND ref NOT IN (SELECT dash_tile FROM usergroup_dash_tile)
            ORDER BY 
            dash_tile,
            default_order_by

            "
        
$params);
    }

This article was last updated 2nd October 2022 18:05 Europe/London time based on the source file dated 27th September 2022 15:05 Europe/London time.