$v) {
echo " ";
}
}
// smilies options page
function clcs_options_admin_page() {
global $wpsmiliestrans, $clcs_options;
if ($_POST['update-options']) {
$updated = false;
$is_illegal_dir = false;
if (get_option('cs_list') != $_POST['list']) {
update_option('cs_list', $_POST['list']);
$updated = true;
}
if (array_key_exists('use-action-comment-form', $_POST)) {
$clcs_options = get_option('clcs_options');
if ($clcs_options['use_action_comment_form'] == 0) {
$updated = true;
}
$clcs_options['use_action_comment_form'] = 1;
update_option('clcs_options', $clcs_options);
} else {
$clcs_options = get_option('clcs_options');
if ($clcs_options['use_action_comment_form'] == 1) {
$updated = true;
}
$clcs_options['use_action_comment_form'] = 0;
update_option('clcs_options', $clcs_options);
}
if (array_key_exists('comment_textarea', $_POST)) {
$clcs_options = get_option('clcs_options');
if ($_POST['comment_textarea'] != $clcs_options['comment_textarea']) {
$clcs_options['comment_textarea'] = $_POST['comment_textarea'];
update_option('clcs_options', $clcs_options);
$updated = true;
}
}
if (array_key_exists('popup_win_width', $_POST)) {
$clcs_options = get_option('clcs_options');
if (!array_key_exists('popup_win_width', $clcs_options)) {
$clcs_options['popup_win_width'] = 0;
}
if ($_POST['popup_win_width'] != $clcs_options['popup_win_width']) {
$clcs_options['popup_win_width'] = $_POST['popup_win_width'];
update_option('clcs_options', $clcs_options);
$updated = true;
}
}
if (array_key_exists('popup_win_height', $_POST)) {
$clcs_options = get_option('clcs_options');
if (!array_key_exists('popup_win_height', $clcs_options)) {
$clcs_options['popup_win_height'] = 0;
}
if ($_POST['popup_win_height'] != $clcs_options['popup_win_height']) {
$clcs_options['popup_win_height'] = $_POST['popup_win_height'];
update_option('clcs_options', $clcs_options);
$updated = true;
}
}
if (array_key_exists('smilies_path', $_POST)) {
$clcs_options = get_option('clcs_options');
if (is_dir(ABSPATH . $_POST['smilies_path'])) {
if (($_POST['smilies_path'] != $clcs_options['smilies_path'])) {
$clcs_options['smilies_path'] = $_POST['smilies_path'];
update_option('clcs_options', $clcs_options);
$updated = true;
}
} else {
$is_illegal_dir = true;
}
}
if ($updated) {
$clcs_message = __('Preferences updated.', 'custom_smilies');
} else {
$clcs_message = __('No changes made.', 'custom_smilies');
}
if ($is_illegal_dir) {
$clcs_message .= __(' The path of smilies that you want to set is illegal.', 'custom_smilies');
}
echo '
' . $clcs_message . '
' . __('Your smilies have been updated.', 'custom_smilies') . '
' . __('Display all smilies', 'custom_smilies') . '' : '' . __('Display undefined smilies only', 'custom_smilies') . ''; ?>