// Check the validity of the currently entered directory (if any)
// Check the validity of the currently entered directory (if any)
$directory=qa_opt('event_logger_directory');
$directory=qa_opt('event_logger_directory');
$note=null;
$error=null;
if(!strlen($directory))
$note='Please specify a directory that is writable by the web server.';
elseif(!file_exists($directory))
$error='This directory cannot be found. Please enter the full path.';
elseif(!is_dir($directory))
$error='This is a file. Please enter the full path of a directory.';
elseif(!is_writable($directory))
$error='This directory is not writable by the web server. Please choose a different directory, use chown/chmod to change permissions, or contact your web hosting company for assistance.';
// Create the form for display
$note=null;
$error=null;
if(!strlen($directory))
$note='Please specify a directory that is writable by the web server.';
elseif(!file_exists($directory))
$error='This directory cannot be found. Please enter the full path.';
elseif(!is_dir($directory))
$error='This is a file. Please enter the full path of a directory.';
elseif(!is_writable($directory))
$error='This directory is not writable by the web server. Please choose a different directory, use chown/chmod to change permissions, or contact your web hosting company for assistance.';
'error'=>$ready?null:'To use Facebook Login, please <a href="http://developers.facebook.com/setup/" target="_blank">set up a Facebook application</a>.',
),
'fields'=>array(
array(
'label'=>'Facebook App ID:',
'value'=>qa_html(qa_opt('facebook_app_id')),
'tags'=>'name="facebook_app_id_field"',
),
'buttons'=>array(
array(
'label'=>'Save Changes',
'tags'=>'name="facebook_save_button"',
),
array(
'label'=>'Facebook App Secret:',
'value'=>qa_html(qa_opt('facebook_app_secret')),
'tags'=>'name="facebook_app_secret_field"',
'error'=>$ready?null:'To use Facebook Login, please <a href="http://developers.facebook.com/setup/" target="_blank">set up a Facebook application</a>.',
),
);
}
),
'buttons'=>array(
array(
'label'=>'Save Changes',
'tags'=>'name="facebook_save_button"',
),
),
);
}
/*
Omit PHP closing tag to help avoid accidental output