applicationType;
$textTypes = $aeh_plugin->textType;
$imageTypes = $aeh_plugin->imageType;
$audioTypes = $aeh_plugin->audioType;
$videoTypes = $aeh_plugin->videoType;
$all_files_format = array_merge($imageTypes, $audioTypes, $videoTypes, $applicationTypes, $textTypes);
foreach ( $all_files_format as $format){
${'aeh_'.$format} = '';
}
if (isset($_POST['aeh_save_settings']))
{ $number_of_formats = (int)count($all_files_format);
$j = 0;
foreach ( $all_files_format as $format){
if (!empty($_POST['aeh_'.$format.'_days'])) {
if (is_int((int)$_POST['aeh_'.$format.'_days'])&& ((int)$_POST['aeh_'.$format.'_days']>0)){
${'aeh_'.$format.'_days'}= esc_sql((int)$_POST['aeh_'.$format.'_days']);
} else {
$errors .= 'Please enter an positive integer amount for the "Number of Days" in "'.$format.'" file format
';
}
}
if (isset($_POST['aeh_'.$format])){
$j++ ;
}
}
if($number_of_formats == $j ) {
$errors .= 'You must choose at least one file type.
';
$empty_expires_headers_formats = 0;
}
if (strlen($errors)> 0){
echo '
' . $errors . '
Settings Saved
'; echo 'Your .htaccess file was successfully updated!
'; echo 'Unable to update changes. Make sure your .htaccess file is editable!