' /> <?php echo($blog_config[ 'blog_title' ]); ?> - <?php echo( $lang_string['title'] ); ?> '; $str_out .= "\n\t\n"; for ( $i = 0; $i < count ($emo); $i++) { $tags=emoticons_check_tags($emo[$i]); $str_out .= "\t\t\n"; $str_out .= "\t\t\t\n"; $str_out .= "\t\t\t\n"; $str_out .= "\t\t\t\n"; $str_out .= "\t\t\n"; } $str_out .= ''; $str_out .= "\t
"; $str_out .= "'; $str_out .= "$emo[$i]
\n\t"; $str_out .= '
'; $str_out .= "\t\n"; $str_out .= "\n"; return $str_out; } function emoticons_getform() { // Emoticon preferences form results $form_arr = Array(); for ( $i = 0; $i < $_POST['emo_count']; $i++) { if ($_POST['emo' . $i] == 'on') { if ($_POST['tag' . $i] !== '') { $temp_arr = Array(); $temp_arr['PATH'] = ($_POST['emo_name' . $i]); $temp_arr['TAGS'] = ($_POST['tag' . $i]); array_push( $form_arr, $temp_arr ); } } } // echo('
');
			// print_r($form_arr);
			// echo('
'); return $form_arr; } function emoticons_save($form_arr) { // Convert array format to a string. $str = ''; $emote_arr = Array(); for ( $i = 0; $i < count($form_arr); $i++) { $temp_arr = Array(); $tags = $form_arr[$i]['TAGS']; $tags = str_replace( '|', '|', $tags ); $tags = str_replace( '=', '=', $tags ); $temp_arr['PATH'] = $form_arr[$i]['PATH']; $temp_arr['TAGS'] = sb_stripslashes($tags); array_push( $emote_arr, implode_with_keys( $temp_arr, '=' ) ); } $str = implode( '|', $emote_arr ); return sb_write_file( 'config/emoticons.txt', $str ); } $entry_array = array(); $entry_array[ 'subject' ] = $lang_string[ 'title' ]; ob_start(); ?>


'; if (!$_FILES["user_emot"] && $_POST && !$_POST["user_emot"]) { // User is updating emoticon preferences. $form_arr = emoticons_getform(); if ( emoticons_save($form_arr) ) { echo( $lang_string["save_success"] ); } else { echo( $lang_string["save_error"] ); } } echo( emoticons_admin_display() ); $entry_array[ 'entry' ] = ob_get_clean(); echo( theme_staticentry( $entry_array ) ); } ?>