Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

get_alluser_available_tiles()

Parameters

ColumnTypeDefaultDescription
$tile "null"

Location

include/dash_functions.php lines 389 to 429

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 19th March 2024 10:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.