<?php 
Loader::model('file_set');
$searchFields = array('' => '** ' . t('Fields'), 'size' => t('Size'), 'type' => t('Type'), 'extension' => t('Extension'), 'date_added' => t('Added Between'), 'added_to' => t('Added to Page'));
if ($_REQUEST['fType'] != false) {
    unset($searchFields['type']);
}
if ($_REQUEST['fExtension'] != false) {
    unset($searchFields['extension']);
}
$html = Loader::helper('html');
Loader::model('file_attributes');
$searchFieldAttributes = FileAttributeKey::getSearchableList();
foreach ($searchFieldAttributes as $ak) {
    $searchFields[$ak->getAttributeKeyID()] = $ak->getAttributeKeyDisplayHandle();
}
$ext1 = FileList::getExtensionList();
$extensions = array();
foreach ($ext1 as $value) {
    $extensions[$value] = $value;
}
$t1 = FileList::getTypeList();
$types = array();
foreach ($t1 as $value) {
    $types[$value] = FileType::getGenericTypeText($value);
}
?>

<?php 
$form = Loader::helper('form');
?>