Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

render_access_key_tr()

Description

Render a table row (tr) for a single access key

Parameters

ColumnTypeDefaultDescription
$record array Access key record details

Return

void

Location

include/render_functions.php lines 1429 to 1493

Definition

 
function render_access_key_tr(array $record)
    {
    global 
$baseurl$baseurl_short$lang;
    
$link      '';
    
$type      '';
    
$edit_link '';

    
// Set variable dependent on type (ie. Resource / Collection)
    
if('' == $record['collection'] && '' != $record['resource'])
        {
        
// For resource
        
$link      $baseurl '?r=' urlencode($record['resource']) . '&k=' urlencode($record['access_key']);
        
$type      $lang['share-resource'];
        
$edit_link sprintf('%spages/resource_share.php?ref=%s&editaccess=%s&editexpiration=%s&editaccesslevel=%s&editgroup=%s&backurl=%s',
            
$baseurl_short,
            
urlencode($record['resource']),
            
urlencode($record['access_key']),
            
urlencode($record['expires']),
            
urlencode($record['access']),
            
urlencode($record['usergroup']),
            
urlencode("/pages/team/team_external_shares.php")
        );
        }
    else
        {
        
// For collection
        
$link      $baseurl '?c=' urlencode($record['collection']) . '&k=' urlencode($record['access_key']);
        
$type      $lang['sharecollection'];
        
$edit_link sprintf('%spages/collection_share.php?ref=%s&editaccess=%s&editexpiration=%s&editaccesslevel=%s&editgroup=%s&backurl=%s',
            
$baseurl_short,
            
urlencode($record['collection']),
            
urlencode($record['access_key']),
            
urlencode($record['expires']),
            
urlencode($record['access']),
            
urlencode($record['usergroup']),
            
urlencode("/pages/team/team_external_shares.php")
        );
        }
        
?>


    <tr id="access_key_ echo $record['access_key']; ?>">
        <td>
            <div class="ListTitle">
                <a href=" echo $link?>" target="_blank"> echo htmlspecialchars($record['access_key']); ?></a>
            </div>
        </td>
        <td> echo htmlspecialchars($type); ?></td>
        <td> echo htmlspecialchars(resolve_users($record['users'])); ?></td>
        <td> echo htmlspecialchars($record['emails']); ?></td>
        <td> echo htmlspecialchars(nicedate($record['maxdate'], truetruetrue)); ?></td>
        <td> echo htmlspecialchars(nicedate($record['lastused'], truetruetrue)); ?></td>
        <td> echo htmlspecialchars(('' == $record['expires']) ? $lang['never'] : nicedate($record['expires'], false)); ?></td>
        <td> echo htmlspecialchars((-== $record['access']) ? '' $lang['access' $record['access']]); ?></td>
        <td>
            <div class="ListTools">
                <a href="#" onClick="delete_access_key(' echo $record['access_key']; ?>', ' echo $record['resource']; ?>', ' echo $record['collection']; ?>');"> echo LINK_CARET ?> echo $lang['action-delete']; ?></a>
                <a href=" echo $edit_link?>"> echo LINK_CARET ?> echo $lang['action-edit']; ?></a>
            </div>
        </td>
    </tr>
    

    
return;
    }

This article was last updated 30th November 2020 10:05 Europe/London time based on the source file dated 13th November 2020 15:00 Europe/London time.