Still not sure if this file should be wrapped as a function to explictly self document all of the variables in scope that can be referenced. The issue with that is that there are something like 30 of them.

The way the user written templates are currently used is via an include statement, so keeping it consistent with that might be a better option. 

Used variables:
$useSearch
$calc_cols
$hcalc

$searches
$settings
$useCheckboxes
$useViewEntryLinks
$hiddenQuickSearches

$title

$thisButtonCode
$buttonCodeArray
$thisButtonCode

$loadview 
$lockcontrols
$loadviewname
$currentview

$submitButton

$atLeastOneActionButton
$buttonCodeArray

$add_own_entry
$singleMulti
$user_can_delete

$import_data
$gperm_handler

$fid
$groups
$mid
$curviewid
$addMultiButton
$addProxyButton

$currentViewList
$pageNavControls