';
}elseif($_POST["inap_test"] == 2){
update_option('inap_test','');
$message .= 'INAP test options deleted.
';
$inapall = get_option('inap');
}else{
INAP::update_options($_REQUEST['inap']);
update_option('inap',$inapall);
update_option('inap_test','');
$message .= 'INAP options updated.
';
}
}elseif($_POST["action"] == "restoredefaults"){
$inapall = '';
INAP::set_defaults();
$message .= 'INAP settings restored to defaults.
';
}elseif($_POST["action"] == "restoreupdate" && $_POST['resop']){
$options = trim($_POST['resop']);
if( get_magic_quotes_gpc() ) {
$options = trim(stripslashes($options));
}
$options = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $options );
$options = unserialize($options);
$inapall = '';
if(is_array($options)){
INAP::update_options($options);
update_option('inap_test',$inapall);
$message .= 'Options successfully saved as test options. Please review them for consistancy before saving.
';
}
}
$inap_test = get_option('inap_test');
if(is_array($inap_test)){
$inapall = $inap_test;
$is_test= true;
$message .= 'You are using the test options currently. You must save them as the live options or delete them to see the current live options.
To view these settings append ?inap=test to any URL in your blog or click here ';
}
if($inapall['comment_template'] == '1'){
$temp1 = 'checked="checked"';
}elseif($inapall['comment_template'] == '2'){
$temp2 = 'checked="checked"';
}else{
$temp0 = 'checked="checked"';
}
if($inapall['split_mode'] == '3'){
$sm3 = 'checked="checked"';
}elseif($inapall['split_mode'] == '2'){
$sm2 = 'checked="checked"';
}else{
$sm1 = 'checked="checked"';
}
if($inapall['split_comments'] == '3'){
$sc3 = 'checked="checked"';
}elseif($inapall['split_comments'] == '2'){
$sc2 = 'checked="checked"';
}else{
$sc1 = 'checked="checked"';
}
if($inapall['js_library'] == '3' || ($inapall['use_prototype'] == 1 && !$inapall['js_library'])){
$jl3 = 'checked="checked"';
}elseif($inapall['js_library'] == '2'){
$jl2 = 'checked="checked"';
}else{
$jl1 = 'checked="checked"';
}
if($inapall['paginate_max_words_para'] == ''){
if($sm2)
$inapall['paginate_max_words_para'] = $inapall['line_break'];
if($sm3)
$inapall['paginate_max_words_para'] = $inapall['word_limit'];
}
if($inapall['max_words_para'] == ''){
if($sm2)
$inapall['max_words_para'] = $inapall['line_break'];
if($sm3)
$inapall['max_words_para'] = $inapall['word_limit'];
}
$texts = array('link_show_text','link_hide_text','link_embed_show_text','link_embed_hide_text','comment_open','comment_hide','addcomment_reply_open','addcomment_reply_hide','comment_tag','comment_all_tag','comment_body_tag','comment_title_tag','addcomment_open','pagelinks','addcomment_hide','live_preview_before','live_preview_after','allow_custom','read_more');
foreach($texts as $name){
$inapall[$name]= stripslashes(htmlspecialchars($inapall[$name],ENT_QUOTES));
}
$checkboxes = array('strip_excerpt','strip_html','use_fade','simple_posts','simple_comments','special_effects','comment_threaded','show_addcomments_single','show_comments_single','show_addcomments_page','show_comments_page','show_addcomments_home','show_comments_home','trimfeeds','live_preview','live_preview_smilies','live_preview_html','comment_order','inap_pages','hide_child_comments','hide_excerpt','allow_custom','paginate_mode','default_behavior','add_comments_tags','posts_off','comments_off','nav_off','give_credit','go_to_post','hide_old_child_comments');
foreach($checkboxes as $name){
if($inapall[$name]==1)
$$name= 'checked="checked"';
}
if($inapall['comment_order'] == 'DESC'){ $comment_order= 'checked="checked"';}
if($message){
echo '
'.$message; echo '