Exemple #1
0
function wp_rss_multi_importer_post_page()
{
    ?>

			<div id="icon-themes" class="icon32 icon32-posts-rssmi_feed"></div>
		
		<?php 
    settings_errors();
    ?>

       <div class="wrap">
	 <h2><?php 
    _e("AutoPost Settings - Put Your RSS Feed Items Into Blog Posts", 'wp-rss-multi-importer');
    ?>
</h2>
	<div id="poststuff">


       <div id="options">

       <form action="options.php" method="post"  >            

       <?php 
    settings_fields('wp_rss_multi_importer_post_options');
    $post_options = get_option('rss_post_options');
    ?>


<div class="postbox">
<h3><label for="title"><?php 
    _e("AutoPost Options Settings", 'wp-rss-multi-importer');
    ?>
</label></h3>

<div class="inside">

<h3><?php 
    _e("Activation and Post Type Settings", 'wp-rss-multi-importer');
    ?>
</h3>



<p><label class='o_textinput' for='active'><?php 
    _e("Check to Activate this Feature", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[active]" Value="1" <?php 
    if (isset($post_options['active']) && $post_options['active'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label><?php 
    if (isset($post_options['active']) && $post_options['active'] != 1) {
        echo "   <span style=\"color:red\">This feature is not active</span>";
    }
    ?>
</p>
<?php 
    if (isset($post_options['active']) && $post_options['active'] == 1) {
        wp_rss_multi_deactivation(1);
        wp_rss_multi_activation();
    } else {
        wp_rss_multi_deactivation(1);
    }
    ?>

<p><label class='o_textinput' for='fetch_schedule'><?php 
    _e("How often to import feeds (NOTE: Importing of feeds comes from the feed item database.  Make sure that database is updated to get the most recent feeds.)", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[fetch_schedule]" id="post_status">
<OPTION VALUE="2" <?php 
    if ($post_options['fetch_schedule'] == "2") {
        echo 'selected';
    }
    ?>
>Every 10 Min.</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['fetch_schedule'] == "3") {
        echo 'selected';
    }
    ?>
>Every 15 Min.</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['fetch_schedule'] == "4") {
        echo 'selected';
    }
    ?>
>Every 20 Min.</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['fetch_schedule'] == "5") {
        echo 'selected';
    }
    ?>
>Every 30 Min.</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['fetch_schedule'] == "1") {
        echo 'selected';
    }
    ?>
>Hourly</OPTION>
<OPTION VALUE="6" <?php 
    if ($post_options['fetch_schedule'] == "6") {
        echo 'selected';
    }
    ?>
>Every Two Hours</OPTION>
<OPTION VALUE="7" <?php 
    if ($post_options['fetch_schedule'] == "7") {
        echo 'selected';
    }
    ?>
>Every Four Hours</OPTION>
<OPTION VALUE="12" <?php 
    if ($post_options['fetch_schedule'] == "12") {
        echo 'selected';
    }
    ?>
>Twice Daily</OPTION>
<OPTION VALUE="24" <?php 
    if ($post_options['fetch_schedule'] == "24") {
        echo 'selected';
    }
    ?>
>Daily</OPTION>
<OPTION VALUE="168" <?php 
    if ($post_options['fetch_schedule'] == "168") {
        echo 'selected';
    }
    ?>
>Weekly</OPTION>
</SELECT></p>



<p><label class='o_textinput' for='post_status'><?php 
    _e("Default status of posts", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[post_status]" id="post_status">
<OPTION VALUE="draft" <?php 
    if ($post_options['post_status'] == "draft") {
        echo 'selected';
    }
    ?>
>draft</OPTION>
<OPTION VALUE="publish" <?php 
    if ($post_options['post_status'] == "publish") {
        echo 'selected';
    }
    ?>
>publish</OPTION>
<OPTION VALUE="pending" <?php 
    if ($post_options['post_status'] == "pending") {
        echo 'selected';
    }
    ?>
>pending</OPTION>
<OPTION VALUE="future" <?php 
    if ($post_options['post_status'] == "future") {
        echo 'selected';
    }
    ?>
>future</OPTION>
<OPTION VALUE="private" <?php 
    if ($post_options['post_status'] == "private") {
        echo 'selected';
    }
    ?>
>private</OPTION>
</SELECT></p>


<p><label class='o_textinput' for='post_format'><?php 
    _e("Default post format", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[post_format]" id="post_format">
<OPTION VALUE="standard" <?php 
    if ($post_options['post_format'] == "standard") {
        echo 'selected';
    }
    ?>
>Standard</OPTION>
<OPTION VALUE="aside" <?php 
    if ($post_options['post_format'] == "aside") {
        echo 'selected';
    }
    ?>
>Aside</OPTION>
<OPTION VALUE="gallery" <?php 
    if ($post_options['post_format'] == "gallery") {
        echo 'selected';
    }
    ?>
>Gallery</OPTION>
<OPTION VALUE="link" <?php 
    if ($post_options['post_format'] == "link") {
        echo 'selected';
    }
    ?>
>Link</OPTION>
<OPTION VALUE="image" <?php 
    if ($post_options['post_format'] == "image") {
        echo 'selected';
    }
    ?>
>Image</OPTION>
<OPTION VALUE="quote" <?php 
    if ($post_options['post_format'] == "quote") {
        echo 'selected';
    }
    ?>
>Quote</OPTION>
<OPTION VALUE="status" <?php 
    if ($post_options['post_format'] == "status") {
        echo 'selected';
    }
    ?>
>Status</OPTION>
<OPTION VALUE="video" <?php 
    if ($post_options['post_format'] == "video") {
        echo 'selected';
    }
    ?>
>Video</OPTION>
</SELECT></p>



<p ><label class='o_textinput' for='custom_type_name'><?php 
    _e("Post as a custom type", 'wp-rss-multi-importer');
    ?>
   <input  id='custom_type_name' type="text" size='20' Name="rss_post_options[custom_type_name]" Value="<?php 
    echo $post_options['custom_type_name'];
    ?>
">(provide the custom type name - if left blank, no custom type will be used)</label></p>


<p ><label class='o_textinput' for='plugindelete'><span style="color:red"><?php 
    _e("IMPORTANT: Check to delete all posts and featured images created by this plugin if this plugin is deleted (Note: this will not delete posts that have a custom type name you created above) ", 'wp-rss-multi-importer');
    ?>
</span><input type="checkbox" Name="rss_post_options[plugindelete]" Value="1" <?php 
    if (isset($post_options['plugindelete']) && $post_options['plugindelete'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
</p>


<h3><?php 
    _e("Post Time Settings", 'wp-rss-multi-importer');
    ?>
</h3>
<p><label class='o_textinput' for='overridedate'><?php 
    _e("Check to over-ride the posts date/time with the current date and time   ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[overridedate]" Value="1" <?php 
    if (isset($post_options['overridedate']) && $post_options['overridedate'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
</p>

<p ><label class='o_textinput' for='timezone'><?php 
    _e("Server Time Zone", 'wp-rss-multi-importer');
    ?>
   <input  id='timezone' type="text" size='40'  Name="rss_post_options[timezone]" Value="<?php 
    echo $post_options['timezone'];
    ?>
"> - <?php 
    _e("Only fill this if your posts are showing up at the wrong time, even if the override box is checked - (<a href=\"http://www.wprssimporter.com/faqs/my-posts-are-showing-up-with-the-wrong-time//\" target=\"_blank\">Read this for what to do here</a>).", 'wp-rss-multi-importer');
    ?>
 </label></p>

<h3><?php 
    _e("Fetch Quantity Settings", 'wp-rss-multi-importer');
    ?>
</h3>


<p><label class='o_textinput' for='maxfeed'><?php 
    _e("Number of Items per Feed to Fetch<span class='vtip' title='Bring in this number of the latest posts from each feed.'>?</span>", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[maxfeed]">
<OPTION VALUE="1" <?php 
    if ($post_options['maxfeed'] == 1) {
        echo 'selected';
    }
    ?>
>1</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['maxfeed'] == 2) {
        echo 'selected';
    }
    ?>
>2</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['maxfeed'] == 3) {
        echo 'selected';
    }
    ?>
>3</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['maxfeed'] == 4) {
        echo 'selected';
    }
    ?>
>4</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['maxfeed'] == 5) {
        echo 'selected';
    }
    ?>
>5</OPTION>
<OPTION VALUE="10" <?php 
    if ($post_options['maxfeed'] == 10) {
        echo 'selected';
    }
    ?>
>10</OPTION>
<OPTION VALUE="15" <?php 
    if ($post_options['maxfeed'] == 15) {
        echo 'selected';
    }
    ?>
>15</OPTION>
<OPTION VALUE="20" <?php 
    if ($post_options['maxfeed'] == 20) {
        echo 'selected';
    }
    ?>
>20</OPTION>
<OPTION VALUE="30" <?php 
    if ($post_options['maxfeed'] == 30) {
        echo 'selected';
    }
    ?>
>30</OPTION>
<OPTION VALUE="40" <?php 
    if ($post_options['maxfeed'] == 40) {
        echo 'selected';
    }
    ?>
>40</OPTION>
<OPTION VALUE="50" <?php 
    if ($post_options['maxfeed'] == 50) {
        echo 'selected';
    }
    ?>
>50</OPTION>
<OPTION VALUE="60" <?php 
    if ($post_options['maxfeed'] == 60) {
        echo 'selected';
    }
    ?>
>60</OPTION>
<OPTION VALUE="70" <?php 
    if ($post_options['maxfeed'] == 70) {
        echo 'selected';
    }
    ?>
>70</OPTION>
<OPTION VALUE="80" <?php 
    if ($post_options['maxfeed'] == 80) {
        echo 'selected';
    }
    ?>
>80</OPTION>
<OPTION VALUE="100" <?php 
    if ($post_options['maxfeed'] == 100) {
        echo 'selected';
    }
    ?>
>100</OPTION>
</SELECT></p>



<p><label class='o_textinput' for='maxperfetch'><?php 
    _e("Total Number of Entries per Fetch <span class='vtip' title='This is the total number to be fetched from all of your feeds, with each feed providing the number of items chosen above.'>?</span>(<a href=\"http://www.wprssimporter.com/faqs/how-does-the-number-of-entries-per-feed-and-page-or-fetch-work//\" target=\"_blank\">Go here to see how to set this option</a>)", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[maxperfetch]">
<OPTION VALUE="1" <?php 
    if ($post_options['maxperfetch'] == 1) {
        echo 'selected';
    }
    ?>
>1</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['maxperfetch'] == 2) {
        echo 'selected';
    }
    ?>
>2</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['maxperfetch'] == 3) {
        echo 'selected';
    }
    ?>
>3</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['maxperfetch'] == 4) {
        echo 'selected';
    }
    ?>
>4</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['maxperfetch'] == 5) {
        echo 'selected';
    }
    ?>
>5</OPTION>
<OPTION VALUE="10" <?php 
    if ($post_options['maxperfetch'] == 10) {
        echo 'selected';
    }
    ?>
>10</OPTION>
<OPTION VALUE="15" <?php 
    if ($post_options['maxperfetch'] == 15) {
        echo 'selected';
    }
    ?>
>15</OPTION>
<OPTION VALUE="20" <?php 
    if ($post_options['maxperfetch'] == 20) {
        echo 'selected';
    }
    ?>
>20</OPTION>
<OPTION VALUE="30" <?php 
    if ($post_options['maxperfetch'] == 30) {
        echo 'selected';
    }
    ?>
>30</OPTION>
<OPTION VALUE="40" <?php 
    if ($post_options['maxperfetch'] == 40) {
        echo 'selected';
    }
    ?>
>40</OPTION>
<OPTION VALUE="50" <?php 
    if ($post_options['maxperfetch'] == 50) {
        echo 'selected';
    }
    ?>
>50</OPTION>
<OPTION VALUE="100" <?php 
    if ($post_options['maxperfetch'] == 100) {
        echo 'selected';
    }
    ?>
>100</OPTION>
<OPTION VALUE="200" <?php 
    if ($post_options['maxperfetch'] == 200) {
        echo 'selected';
    }
    ?>
>200</OPTION>
<OPTION VALUE="300" <?php 
    if ($post_options['maxperfetch'] == 300) {
        echo 'selected';
    }
    ?>
>300</OPTION>
<OPTION VALUE="400" <?php 
    if ($post_options['maxperfetch'] == 400) {
        echo 'selected';
    }
    ?>
>400</OPTION>
<OPTION VALUE="500" <?php 
    if ($post_options['maxperfetch'] == 500) {
        echo 'selected';
    }
    ?>
>500</OPTION>
<OPTION VALUE="600" <?php 
    if ($post_options['maxperfetch'] == 600) {
        echo 'selected';
    }
    ?>
>600</OPTION>
<OPTION VALUE="700" <?php 
    if ($post_options['maxperfetch'] == 700) {
        echo 'selected';
    }
    ?>
>700</OPTION>
<OPTION VALUE="800" <?php 
    if ($post_options['maxperfetch'] == 800) {
        echo 'selected';
    }
    ?>
>800</OPTION>
<OPTION VALUE="1000" <?php 
    if ($post_options['maxperfetch'] == 1000) {
        echo 'selected';
    }
    ?>
>1000</OPTION>
<OPTION VALUE="2000" <?php 
    if ($post_options['maxperfetch'] == 2000) {
        echo 'selected';
    }
    ?>
>2000</OPTION>
</SELECT></p>


<h3><?php 
    _e("Link Settings", 'wp-rss-multi-importer');
    ?>
</h3>


<p><label class='o_textinput' for='targetWindow'><?php 
    _e("Target Window (when link clicked, where should it open?)", 'wp-rss-multi-importer');
    ?>
</label>
	<SELECT NAME="rss_post_options[targetWindow]" id="targetWindow">
	<OPTION VALUE="0" <?php 
    if ($post_options['targetWindow'] == 0) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Use LightBox", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="1" <?php 
    if ($post_options['targetWindow'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Open in Same Window", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="2" <?php 
    if ($post_options['targetWindow'] == 2) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Open in New Window", 'wp-rss-multi-importer');
    ?>
</OPTION>
	</SELECT></p>
	
	<p ><label class='o_textinput' for='titleFilter'><?php 
    _e("Make title clickable on listing page with same settings as above <span class='vtip' title='Checking this option may result in problems if you are using the  Wordpress Custom Menu Widget - see the FAQs if this happens.'>?</span>", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" Name="rss_post_options[titleFilter]" Value="1" <?php 
    if (isset($post_options['titleFilter']) && $post_options['titleFilter'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label></p>
	
	
	
	<p ><label class='o_textinput' for='readmore'><?php 
    _e("Text to use for Read More (default is ...Read More)", 'wp-rss-multi-importer');
    ?>
   <input  id='readmore' type="text" size='18' Name="rss_post_options[readmore]" Value="<?php 
    echo $post_options['readmore'];
    ?>
"></label></p>
	
	
	

<h3><?php 
    _e("Word Output Setting", 'wp-rss-multi-importer');
    ?>
</h3>
<p><label class='o_textinput' for='descnum'><?php 
    _e("Excerpt length (number of words)", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[descnum]" id="descnum">
<OPTION VALUE="0" <?php 
    if ($post_options['descnum'] == 0) {
        echo 'selected';
    }
    ?>
>0</OPTION>
<OPTION VALUE="20" <?php 
    if ($post_options['descnum'] == 20) {
        echo 'selected';
    }
    ?>
>20</OPTION>
<OPTION VALUE="30" <?php 
    if ($post_options['descnum'] == 30) {
        echo 'selected';
    }
    ?>
>30</OPTION>
<OPTION VALUE="50" <?php 
    if ($post_options['descnum'] == 50) {
        echo 'selected';
    }
    ?>
>50</OPTION>
<OPTION VALUE="75" <?php 
    if ($post_options['descnum'] == 75) {
        echo 'selected';
    }
    ?>
>75</OPTION>
<OPTION VALUE="100" <?php 
    if ($post_options['descnum'] == 100) {
        echo 'selected';
    }
    ?>
>100</OPTION>
<OPTION VALUE="200" <?php 
    if ($post_options['descnum'] == 200) {
        echo 'selected';
    }
    ?>
>200</OPTION>
<OPTION VALUE="300" <?php 
    if ($post_options['descnum'] == 300) {
        echo 'selected';
    }
    ?>
>300</OPTION>
<OPTION VALUE="400" <?php 
    if ($post_options['descnum'] == 400) {
        echo 'selected';
    }
    ?>
>400</OPTION>
<OPTION VALUE="500" <?php 
    if ($post_options['descnum'] == 500) {
        echo 'selected';
    }
    ?>
>500</OPTION>
<OPTION VALUE="1000" <?php 
    if ($post_options['descnum'] == 1000) {
        echo 'selected';
    }
    ?>
>1000</OPTION>
<OPTION VALUE="99" <?php 
    if ($post_options['descnum'] == 99) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Give me everything", 'wp-rss-multi-importer');
    ?>
</OPTION>
</SELECT></p>

<h3><?php 
    _e("Author and Source Settings", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='addAuthor'><?php 
    _e("Show Feed or Author Name (if available)", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" Name="rss_post_options[addAuthor]" Value="1" <?php 
    if (isset($post_options['addAuthor']) && $post_options['addAuthor'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label></p>


<p ><label class='o_textinput' for='addSource'><?php 
    _e("Show Feed Source", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" Name="rss_post_options[addSource]" Value="1" <?php 
    if (isset($post_options['addSource']) && $post_options['addSource'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label></p>


<p style="padding-left:15px"><label class='o_textinput' for='sourceWords'><?php 
    _e("Feed Source Attribution Label", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[sourceWords]">
<OPTION VALUE="1" <?php 
    if ($post_options['sourceWords'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Source", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['sourceWords'] == 2) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Via", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['sourceWords'] == 3) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Read more here", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['sourceWords'] == 4) {
        echo 'selected';
    }
    ?>
><?php 
    _e("From", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['sourceWords'] == 5) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Other (fill in below)", 'wp-rss-multi-importer');
    ?>
</OPTION>
</SELECT></p>

<p style="padding-left:15px"><label class='o_textinput' for='sourceWords_Label'><?php 
    _e("Your own attribution label", 'wp-rss-multi-importer');
    ?>
   <input  id='sourceWords_Label' type="text" size='12'  Name="rss_post_options[sourceWords_Label]" Value="<?php 
    echo $post_options['sourceWords_Label'];
    ?>
">(make sure to choose Other in drop down list)</label></p>


<p><label class='o_textinput' for='sourceAnchorText'><?php 
    _e("Read More anchor text", 'wp-rss-multi-importer');
    ?>
</label>
	<SELECT NAME="rss_post_options[sourceAnchorText]" id="sourceAnchorText">
	<OPTION VALUE="1" <?php 
    if ($post_options['sourceAnchorText'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Feed Name", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="2" <?php 
    if ($post_options['sourceAnchorText'] == 2) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Title", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="3" <?php 
    if ($post_options['sourceAnchorText'] == 3) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Link", 'wp-rss-multi-importer');
    ?>
</OPTION>
	</SELECT></p>


<h3><?php 
    _e("HTML, Image and Video Handling", 'wp-rss-multi-importer');
    ?>
</h3>


<p><label class='o_textinput' for='showVideo'><?php 
    _e("Place video into the post when available", 'wp-rss-multi-importer');
    ?>
</label>
	<input type="checkbox" Name="rss_post_options[showVideo]" Value="1" <?php 
    if ($post_options['showVideo'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
		<?php 
    _e("(<a href=\"http://www.wprssimporter.com/faqs/the-videos-are-not-working-on-my-site//\" target=\"_blank\">GO HERE TO READ MORE ABOUT THIS</a>", 'wp-rss-multi-importer');
    ?>
	</p>

	<p ><label class='o_textinput' for='noProcess'><?php 
    _e("Bring in all images without processing (this will bypass all of the images settings below - i.e., no excerpt or featured image)", 'wp-rss-multi-importer');
    ?>
  <input type="checkbox" Name="rss_post_options[noProcess]" Value="1" <?php 
    if (isset($post_options['noProcess']) && $post_options['noProcess'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label></p>


<p><label class='o_textinput' for='stripAll'><?php 
    _e("Check to get rid of all html and images in the excerpt", 'wp-rss-multi-importer');
    ?>
	<SELECT NAME="rss_post_options[stripAll]" id="stripAll">
	<OPTION VALUE="1" <?php 
    if ($post_options['stripAll'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Yes", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="0" <?php 
    if ($post_options['stripAll'] == 0) {
        echo 'selected';
    }
    ?>
><?php 
    _e("No", 'wp-rss-multi-importer');
    ?>
</OPTION>
	</SELECT>
</p>







<span id="stripAllsecret" <?php 
    if ($post_options['stripAll'] == 1) {
        echo 'style="display:none"';
    }
    ?>
>
	
		<p ><label class='o_textinput' for='floatType'><?php 
    _e("Float images to the left.", 'wp-rss-multi-importer');
    ?>
  <input type="checkbox" Name="rss_post_options[floatType]" Value="1" <?php 
    if ($post_options['floatType'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label></p>
		
	<p><label class='o_textinput' for='stripSome'><?php 
    _e("Keep limited html in the excerpt (&lt;a&gt;,&lt;br&gt;,&lt;p&gt;)  ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[stripSome]" Value="1" <?php 
    if (isset($post_options['stripSome']) && $post_options['stripSome'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label> </p>

<p><label class='o_textinput' for='maximgwidth'><?php 
    _e("Maximum width size of images", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[maximgwidth]">
<OPTION VALUE="100" <?php 
    if ($post_options['maximgwidth'] == 100) {
        echo 'selected';
    }
    ?>
>100px</OPTION>
<OPTION VALUE="150" <?php 
    if ($post_options['maximgwidth'] == 150) {
        echo 'selected';
    }
    ?>
>150px</OPTION>
<OPTION VALUE="250" <?php 
    if ($post_options['maximgwidth'] == 250) {
        echo 'selected';
    }
    ?>
>250px</OPTION>
<OPTION VALUE="350" <?php 
    if ($post_options['maximgwidth'] == 350) {
        echo 'selected';
    }
    ?>
>350px</OPTION>
<OPTION VALUE="500" <?php 
    if ($post_options['maximgwidth'] == 500) {
        echo 'selected';
    }
    ?>
>500px</OPTION>
<OPTION VALUE="600" <?php 
    if ($post_options['maximgwidth'] == 600) {
        echo 'selected';
    }
    ?>
>600px</OPTION>
<OPTION VALUE="700" <?php 
    if ($post_options['maximgwidth'] == 700) {
        echo 'selected';
    }
    ?>
>700px</OPTION>
<OPTION VALUE="999" <?php 
    if ($post_options['maximgwidth'] == 999) {
        echo 'selected';
    }
    ?>
><?php 
    _e("unrestricted", 'wp-rss-multi-importer');
    ?>
</OPTION>
</SELECT></p>

<p ><label class='o_textinput' for='RSSdefaultImage'><?php 
    _e("Default category image setting", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[RSSdefaultImage]" id="RSSdefaultImage">
<OPTION VALUE="0" <?php 
    if ($post_options['RSSdefaultImage'] == 0) {
        echo 'selected';
    }
    ?>
>Process normally</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['RSSdefaultImage'] == 1) {
        echo 'selected';
    }
    ?>
>Use default image for category</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['RSSdefaultImage'] == 2) {
        echo 'selected';
    }
    ?>
>Replace articles with no image with default category image</OPTION>

</SELECT></p>




<p ><label class='o_textinput' for='setFeaturedImage'><?php 
    _e("Select how to use the image (in excerpt and/or as the Featured Image).", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[setFeaturedImage]" id="setFeaturedImage">
<OPTION VALUE="0" <?php 
    if ($post_options['setFeaturedImage'] == 0) {
        echo 'selected';
    }
    ?>
>Excerpt Only</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['setFeaturedImage'] == 1) {
        echo 'selected';
    }
    ?>
>Excerpt and Featured Image</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['setFeaturedImage'] == 2) {
        echo 'selected';
    }
    ?>
>Featured Image Only</OPTION>
</SELECT></p>


</span>


<h3><?php 
    _e("Get Social", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='showsocial'><?php 
    _e("Add social icons (Twitter, Facebook, and Google+) to each post ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[showsocial]" Value="1" <?php 
    if (isset($post_options['showsocial']) && $post_options['showsocial'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
</p>

<h3><?php 
    _e("Comment Status", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='showsocial'><?php 
    _e("Turn off comments on posts made by this plugin ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[commentstatus]" Value="1" <?php 
    if (isset($post_options['commentstatus']) && $post_options['commentstatus'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
</p>

<h3><?php 
    _e("Excerpt Handling", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='includeExcerpt'><?php 
    _e("Put the contents also in the excerpts field. ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[includeExcerpt]" Value="1" <?php 
    if (isset($post_options['includeExcerpt']) && $post_options['includeExcerpt'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
</p>

<h3><?php 
    _e("No Index, No Follow, Canonical ", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='noindex'><?php 
    _e("Make the AutoPost items not search engine visible (It is up to search engines to honor this request.). ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[noindex]" Value="1" <?php 
    if ($post_options['noindex'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
</p>

<p ><label class='o_textinput' for='noFollow'>Set links as No Follow.  <input type="checkbox" Name="rss_post_options[noFollow]" Value="1" <?php 
    if (isset($post_options['noFollow']) && $post_options['noFollow'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label></p>

<p ><label class='o_textinput' for='addcanonical'>Add canonical URL to page linking back to original article.  <input type="checkbox" Name="rss_post_options[addcanonical]" Value="1" <?php 
    if (isset($post_options['addcanonical']) && $post_options['addcanonical'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label></p>


<h3><?php 
    _e("Auto Remove Posts", 'wp-rss-multi-importer');
    ?>
</h3>

<p ><label class='o_textinput' for='autoDelete'><?php 
    _e("Check to Auto Remove Posts Created by this Plugin", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" id="autoRemoveCB" Name="rss_post_options[autoDelete]" Value="1" <?php 
    if (isset($post_options['autoDelete']) && $post_options['autoDelete'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>   (<a href="/wp-admin/admin.php?page=wprssmi_options3&tab=manage_autoposts">Manage what posts to keep here.</a>)</p>

<span id="autoremoveposts" <?php 
    if (isset($post_options['autoDelete']) && $post_options['autoDelete'] != 1) {
        echo 'style="display:none"';
    }
    ?>
>

<p ><label class='o_textinput' for='expiration'><?php 
    _e("Select the expiration time (number of days, weeks, etc.) before removing posts (NOTE:  This will cause any old items that are brought in to be immediately deleted)", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[expiration]" id="expiration">
<OPTION VALUE="1" <?php 
    if ($post_options['expiration'] == 1) {
        echo 'selected';
    }
    ?>
>1 Day</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['expiration'] == 2) {
        echo 'selected';
    }
    ?>
>2 Days</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['expiration'] == 3) {
        echo 'selected';
    }
    ?>
>3 Days</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['expiration'] == 4) {
        echo 'selected';
    }
    ?>
>4 Days</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['expiration'] == 5) {
        echo 'selected';
    }
    ?>
>5 Days</OPTION>
<OPTION VALUE="6" <?php 
    if ($post_options['expiration'] == 6) {
        echo 'selected';
    }
    ?>
>6 Days</OPTION>
<OPTION VALUE="7" <?php 
    if ($post_options['expiration'] == 7) {
        echo 'selected';
    }
    ?>
>7 Days</OPTION>
<OPTION VALUE="14" <?php 
    if ($post_options['expiration'] == 14) {
        echo 'selected';
    }
    ?>
>2 Weeks</OPTION>
<OPTION VALUE="21" <?php 
    if ($post_options['expiration'] == 21) {
        echo 'selected';
    }
    ?>
>3 Weeks</OPTION>
<OPTION VALUE="28" <?php 
    if ($post_options['expiration'] == 28) {
        echo 'selected';
    }
    ?>
>4 Weeks</OPTION>
<OPTION VALUE="56" <?php 
    if ($post_options['expiration'] == 56) {
        echo 'selected';
    }
    ?>
>2 Months</OPTION>
<OPTION VALUE="365" <?php 
    if ($post_options['expiration'] == 365) {
        echo 'selected';
    }
    ?>
>1 Year</OPTION>
</SELECT></p>

<p ><label class='o_textinput' for='oldPostStatus'><?php 
    _e("Move posts to what status?", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[oldPostStatus]" id="setFeaturedImage">
<OPTION VALUE="0" <?php 
    if ($post_options['oldPostStatus'] == 0) {
        echo 'selected';
    }
    ?>
>Permanently Delete</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['oldPostStatus'] == 1) {
        echo 'selected';
    }
    ?>
>Trash (but don't permanently delete)</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['oldPostStatus'] == 2) {
        echo 'selected';
    }
    ?>
>Pending</OPTION>
</SELECT><?php 
    _e("  NOTE: Choosing Permanently Delete may result in posts being imported again", 'wp-rss-multi-importer');
    ?>
</p>

<p ><label class='o_textinput' for='keepcomments'><?php 
    _e("Only delete posts with no comments. ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[keepcomments]" Value="1" <?php 
    if (isset($post_options['keepcomments']) && $post_options['keepcomments'] == 1) {
        echo 'checked="checked"';
    }
    ?>
></label>
</p>

</span>
<?php 
    $catOptions = get_option('rss_import_categories');
    if (!empty($catOptions)) {
        echo "<h3><label class='o_textinput' for='category'>" . __('Restrict feeds to one of your defined RSS Multi Importer categories and place them in your blog categories', 'wp-rss-multi-importer') . "</label></h3>";
        echo "<p>" . __('Choose a plugin category and associate it with one of your blog post categories.', 'wp-rss-multi-importer') . "</p>";
        echo '<div class="ftpost_head">Plugin Category --></div><div class="ftpost_head">Blog Post Category</div><div style="clear:both;"></div>';
        $catsize = count($catOptions);
        $postoptionsize = $catsize / 2;
        //var_dump($post_options['categoryid']['wpcatid']);
        for ($q = 1; $q <= $postoptionsize; $q++) {
            //echo $q."=".isEmpty($post_options['categoryid']['wpcatid'][$q])."<br>";
            //if ((isset($post_options['categoryid']['wpcatid'][$q]) && isEmpty($post_options['categoryid']['wpcatid'][$q])==0) || $q==1){
            if (isset($post_options['categoryid']['wpcatid'][$q]) && isEmpty($post_options['categoryid']['wpcatid'][$q]) == 0 || $q == 1) {
                echo "<div class='category_id_options' id='{$q}'>";
                $selclear = 0;
                // added
            } else {
                echo "<div class='category_id_options' id='{$q}' style='display:none'>";
                $selclear = 1;
                // added
            }
            ?>



<p><span class="ftpost_l"><SELECT NAME="rss_post_options[categoryid][plugcatid][<?php 
            echo $q;
            ?>
]">
	<?php 
            if ($selclear == 1) {
                // added
                ?>
	<OPTION selected VALUE=''>None</OPTION>
	<?php 
            }
            if ($q == 1) {
                ?>
<OPTION VALUE='0' <?php 
                if ($post_options['categoryid']['plugcatid'][$q] == 0) {
                    echo 'selected="selected"';
                }
                ?>
>ALL</OPTION>
<?php 
            }
            for ($k = 1; $k <= $catsize; $k++) {
                if ($k % 2 == 0) {
                    continue;
                }
                $catkey = key($catOptions);
                $nameValue = $catOptions[$catkey];
                next($catOptions);
                $catkey = key($catOptions);
                $IDValue = $catOptions[$catkey];
                if ($post_options['categoryid']['plugcatid'][$q] == $IDValue && $selclear == 0) {
                    // selclear added
                    $sel = 'selected  ';
                } else {
                    $sel = '';
                }
                echo "<OPTION " . $sel . "VALUE=" . $IDValue . ">" . $nameValue . "</OPTION>";
                next($catOptions);
            }
            echo "</SELECT></span><span class='ftpost_r'>";
            //var_dump($post_options['categoryid']['wpcatid'][$q]);
            echo "<SELECT multiple='multiple' size='4' id='wpcategory2' NAME='rss_post_options[categoryid][wpcatid][{$q}][]'>";
            catDropDown($post_options['categoryid']['wpcatid'][$q]);
            echo "</SELECT></span></p></div>";
            reset($catOptions);
        }
        echo "<a href='javascript:void(0)' class='add_cat_id'>Add another plugin to blog post category association</a>";
    } else {
        echo __("<b>NOTE: If you set up categories (in Category Options) you can restrict only feeds in that category to go into blog posts.</b> ", 'wp-rss-multi-importer');
    }
    ?>


</div></div>

       <p class="submit"><input type="submit" value="Save Settings" name="submit" class="button-primary"></p>



       </form>

<button type="button" name="fetchnow" id="fetch-now" value=""><?php 
    _e("CLICK TO FETCH FEED ITEMS NOW", 'wp-rss-multi-importer');
    ?>
</button>	
<div id="note"></div><div id="rssmi-ajax-loader-center"></div>
<?php 
    echo rssmi_show_last_feed_update();
    ?>
	
</div></div>

<!--******DELETE THIS LINE BEFORE UPLOADING****** -->
<!--
<button type="button" name="fetchdelete" id="fetch-delete" value=""><?php 
    _e("CLICK TO DELETE FEEDS NOW", 'wp-rss-multi-importer');
    ?>
</button>  
-->


</div>
<?php 
}
function wp_rss_multi_importer_post_page()
{
    ?>

       <div class="wrap">
	 <h2><?php 
    _e("Put Your RSS Feed Into Blog Posts", 'wp-rss-multi-importer');
    ?>
</h2>
	<div id="poststuff">


       <div id="options">

       <form action="options.php" method="post"  >            

       <?php 
    settings_fields('wp_rss_multi_importer_post_options');
    $post_options = get_option('rss_post_options');
    ?>


<div class="postbox">
<h3><label for="title"><?php 
    _e("Feed to Post Options Settings", 'wp-rss-multi-importer');
    ?>
</label></h3>

<div class="inside">

<h3><?php 
    _e("Activation and Post Type Settings", 'wp-rss-multi-importer');
    ?>
</h3>



<p><label class='o_textinput' for='active'><?php 
    _e("Check to Activate this Feature", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[active]" Value="1" <?php 
    if ($post_options['active'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label><?php 
    if ($post_options['active'] != 1) {
        echo "   <span style=\"color:red\">This feature is not active</span>";
    }
    ?>
</p>
<?php 
    if ($post_options['active'] == 1) {
        wp_rss_multi_deactivation();
        wp_rss_multi_activation();
    } else {
        wp_rss_multi_deactivation();
    }
    ?>

<p><label class='o_textinput' for='fetch_schedule'><?php 
    _e("How often to import feeds (<a href=\"http://www.allenweiss.com/faqs/how-to-have-more-control-over-scheduling-of-feteching-feeds//\" target=\"_blank\">click here to learn how to have more control over this</a>)", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[fetch_schedule]" id="post_status">
<OPTION VALUE="2" <?php 
    if ($post_options['fetch_schedule'] == "2") {
        echo 'selected';
    }
    ?>
>Every 10 Min.</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['fetch_schedule'] == "3") {
        echo 'selected';
    }
    ?>
>Every 15 Min.</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['fetch_schedule'] == "4") {
        echo 'selected';
    }
    ?>
>Every 20 Min.</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['fetch_schedule'] == "5") {
        echo 'selected';
    }
    ?>
>Every 30 Min.</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['fetch_schedule'] == "1") {
        echo 'selected';
    }
    ?>
>Hourly</OPTION>
<OPTION VALUE="12" <?php 
    if ($post_options['fetch_schedule'] == "12") {
        echo 'selected';
    }
    ?>
>Twice Daily</OPTION>
<OPTION VALUE="24" <?php 
    if ($post_options['fetch_schedule'] == "24") {
        echo 'selected';
    }
    ?>
>Daily</OPTION>
<OPTION VALUE="168" <?php 
    if ($post_options['fetch_schedule'] == "168") {
        echo 'selected';
    }
    ?>
>Weekly</OPTION>
</SELECT></p>



<p><label class='o_textinput' for='post_status'><?php 
    _e("Default status of posts", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[post_status]" id="post_status">
<OPTION VALUE="draft" <?php 
    if ($post_options['post_status'] == "draft") {
        echo 'selected';
    }
    ?>
>draft</OPTION>
<OPTION VALUE="publish" <?php 
    if ($post_options['post_status'] == "publish") {
        echo 'selected';
    }
    ?>
>publish</OPTION>
<OPTION VALUE="pending" <?php 
    if ($post_options['post_status'] == "pending") {
        echo 'selected';
    }
    ?>
>pending</OPTION>
<OPTION VALUE="future" <?php 
    if ($post_options['post_status'] == "future") {
        echo 'selected';
    }
    ?>
>future</OPTION>
<OPTION VALUE="private" <?php 
    if ($post_options['post_status'] == "private") {
        echo 'selected';
    }
    ?>
>private</OPTION>
</SELECT></p>


<p><label class='o_textinput' for='post_format'><?php 
    _e("Default post format", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[post_format]" id="post_format">
<OPTION VALUE="standard" <?php 
    if ($post_options['post_format'] == "standard") {
        echo 'selected';
    }
    ?>
>Standard</OPTION>
<OPTION VALUE="aside" <?php 
    if ($post_options['post_format'] == "aside") {
        echo 'selected';
    }
    ?>
>Aside</OPTION>
<OPTION VALUE="gallery" <?php 
    if ($post_options['post_format'] == "gallery") {
        echo 'selected';
    }
    ?>
>Gallery</OPTION>
<OPTION VALUE="link" <?php 
    if ($post_options['post_format'] == "link") {
        echo 'selected';
    }
    ?>
>Link</OPTION>
<OPTION VALUE="image" <?php 
    if ($post_options['post_format'] == "image") {
        echo 'selected';
    }
    ?>
>Image</OPTION>
<OPTION VALUE="quote" <?php 
    if ($post_options['post_format'] == "quote") {
        echo 'selected';
    }
    ?>
>Quote</OPTION>
<OPTION VALUE="status" <?php 
    if ($post_options['post_format'] == "status") {
        echo 'selected';
    }
    ?>
>Status</OPTION>
</SELECT></p>



<p ><label class='o_textinput' for='bloguserid'><?php 
    _e("Post to blog user_id", 'wp-rss-multi-importer');
    ?>
   <input  id='bloguserid' type="text" size='4' maxlength='4' Name="rss_post_options[bloguserid]" Value="<?php 
    echo $post_options['bloguserid'];
    ?>
">(if left blank, the admin will be the user)</label></p>


<p ><label class='o_textinput' for='plugindelete'><span style="color:red"><?php 
    _e("IMPORTANT: Check to delete all posts and featured images created by this plugin if this plugin is deleted  ", 'wp-rss-multi-importer');
    ?>
</span><input type="checkbox" Name="rss_post_options[plugindelete]" Value="1" <?php 
    if ($post_options['plugindelete'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label>
</p>


<h3><?php 
    _e("Post Time Settings", 'wp-rss-multi-importer');
    ?>
</h3>
<p><label class='o_textinput' for='overridedate'><?php 
    _e("Check to over-ride the posts date/time with the current date and time   ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[overridedate]" Value="1" <?php 
    if ($post_options['overridedate'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label>
</p>

<p ><label class='o_textinput' for='timezone'><?php 
    _e("Server Time Zone", 'wp-rss-multi-importer');
    ?>
   <input  id='timezone' type="text" size='40'  Name="rss_post_options[timezone]" Value="<?php 
    echo $post_options['timezone'];
    ?>
"> - <?php 
    _e("Only fill this if your posts are showing up at the wrong time, even if the override box is checked - (<a href=\"http://www.allenweiss.com/faqs/my-posts-are-showing-up-with-the-wrong-time//\" target=\"_blank\">Read this for what to do here</a>).", 'wp-rss-multi-importer');
    ?>
 </label></p>

<h3><?php 
    _e("Fetch Quantity Settings", 'wp-rss-multi-importer');
    ?>
</h3>


<p><label class='o_textinput' for='maxfeed'><?php 
    _e("Number of Entries per Feed to Fetch", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[maxfeed]">
<OPTION VALUE="1" <?php 
    if ($post_options['maxfeed'] == 1) {
        echo 'selected';
    }
    ?>
>1</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['maxfeed'] == 2) {
        echo 'selected';
    }
    ?>
>2</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['maxfeed'] == 3) {
        echo 'selected';
    }
    ?>
>3</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['maxfeed'] == 4) {
        echo 'selected';
    }
    ?>
>4</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['maxfeed'] == 5) {
        echo 'selected';
    }
    ?>
>5</OPTION>
<OPTION VALUE="10" <?php 
    if ($post_options['maxfeed'] == 10) {
        echo 'selected';
    }
    ?>
>10</OPTION>
<OPTION VALUE="15" <?php 
    if ($post_options['maxfeed'] == 15) {
        echo 'selected';
    }
    ?>
>15</OPTION>
<OPTION VALUE="20" <?php 
    if ($post_options['maxfeed'] == 20) {
        echo 'selected';
    }
    ?>
>20</OPTION>
<OPTION VALUE="30" <?php 
    if ($post_options['maxfeed'] == 30) {
        echo 'selected';
    }
    ?>
>30</OPTION>
<OPTION VALUE="40" <?php 
    if ($post_options['maxfeed'] == 40) {
        echo 'selected';
    }
    ?>
>40</OPTION>
<OPTION VALUE="50" <?php 
    if ($post_options['maxfeed'] == 50) {
        echo 'selected';
    }
    ?>
>50</OPTION>
<OPTION VALUE="60" <?php 
    if ($post_options['maxfeed'] == 60) {
        echo 'selected';
    }
    ?>
>60</OPTION>
<OPTION VALUE="70" <?php 
    if ($post_options['maxfeed'] == 70) {
        echo 'selected';
    }
    ?>
>70</OPTION>
<OPTION VALUE="80" <?php 
    if ($post_options['maxfeed'] == 80) {
        echo 'selected';
    }
    ?>
>80</OPTION>
<OPTION VALUE="100" <?php 
    if ($post_options['maxfeed'] == 100) {
        echo 'selected';
    }
    ?>
>100</OPTION>
</SELECT></p>



<p><label class='o_textinput' for='maxperfetch'><?php 
    _e("Number of Total Post Entries per Fetch (should be much greater than the number of entries per feed)", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[maxperfetch]">
<OPTION VALUE="1" <?php 
    if ($post_options['maxperfetch'] == 1) {
        echo 'selected';
    }
    ?>
>1</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['maxperfetch'] == 2) {
        echo 'selected';
    }
    ?>
>2</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['maxperfetch'] == 3) {
        echo 'selected';
    }
    ?>
>3</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['maxperfetch'] == 4) {
        echo 'selected';
    }
    ?>
>4</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['maxperfetch'] == 5) {
        echo 'selected';
    }
    ?>
>5</OPTION>
<OPTION VALUE="10" <?php 
    if ($post_options['maxperfetch'] == 10) {
        echo 'selected';
    }
    ?>
>10</OPTION>
<OPTION VALUE="15" <?php 
    if ($post_options['maxperfetch'] == 15) {
        echo 'selected';
    }
    ?>
>15</OPTION>
<OPTION VALUE="20" <?php 
    if ($post_options['maxperfetch'] == 20) {
        echo 'selected';
    }
    ?>
>20</OPTION>
<OPTION VALUE="30" <?php 
    if ($post_options['maxperfetch'] == 30) {
        echo 'selected';
    }
    ?>
>30</OPTION>
<OPTION VALUE="40" <?php 
    if ($post_options['maxperfetch'] == 40) {
        echo 'selected';
    }
    ?>
>40</OPTION>
<OPTION VALUE="50" <?php 
    if ($post_options['maxperfetch'] == 50) {
        echo 'selected';
    }
    ?>
>50</OPTION>
<OPTION VALUE="100" <?php 
    if ($post_options['maxperfetch'] == 100) {
        echo 'selected';
    }
    ?>
>100</OPTION>
<OPTION VALUE="200" <?php 
    if ($post_options['maxperfetch'] == 200) {
        echo 'selected';
    }
    ?>
>200</OPTION>
<OPTION VALUE="300" <?php 
    if ($post_options['maxperfetch'] == 300) {
        echo 'selected';
    }
    ?>
>300</OPTION>
</SELECT></p>


<h3><?php 
    _e("Link Settings", 'wp-rss-multi-importer');
    ?>
</h3>


<p><label class='o_textinput' for='targetWindow'><?php 
    _e("Target Window (when link clicked, where should it open?)", 'wp-rss-multi-importer');
    ?>
</label>
	<SELECT NAME="rss_post_options[targetWindow]" id="targetWindow">
	<OPTION VALUE="0" <?php 
    if ($post_options['targetWindow'] == 0) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Use LightBox", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="1" <?php 
    if ($post_options['targetWindow'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Open in Same Window", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="2" <?php 
    if ($post_options['targetWindow'] == 2) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Open in New Window", 'wp-rss-multi-importer');
    ?>
</OPTION>
	</SELECT></p>
	
		<p ><label class='o_textinput' for='titleFilter'><?php 
    _e("Make title clickable on listing page with same settings as above", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" Name="rss_post_options[titleFilter]" Value="1" <?php 
    if ($post_options['titleFilter'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label></p>
	
	<p ><label class='o_textinput' for='readmore'><?php 
    _e("Text to use for Read More (default is ...Read More)", 'wp-rss-multi-importer');
    ?>
   <input  id='readmore' type="text" size='18' Name="rss_post_options[readmore]" Value="<?php 
    echo $post_options['readmore'];
    ?>
"></label></p>
	
	

<h3><?php 
    _e("Word Output Setting", 'wp-rss-multi-importer');
    ?>
</h3>
<p><label class='o_textinput' for='descnum'><?php 
    _e("Excerpt length (number of words)", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[descnum]" id="descnum">
<OPTION VALUE="20" <?php 
    if ($post_options['descnum'] == 20) {
        echo 'selected';
    }
    ?>
>20</OPTION>
<OPTION VALUE="30" <?php 
    if ($post_options['descnum'] == 30) {
        echo 'selected';
    }
    ?>
>30</OPTION>
<OPTION VALUE="50" <?php 
    if ($post_options['descnum'] == 50) {
        echo 'selected';
    }
    ?>
>50</OPTION>
<OPTION VALUE="100" <?php 
    if ($post_options['descnum'] == 100) {
        echo 'selected';
    }
    ?>
>100</OPTION>
<OPTION VALUE="200" <?php 
    if ($post_options['descnum'] == 200) {
        echo 'selected';
    }
    ?>
>200</OPTION>
<OPTION VALUE="300" <?php 
    if ($post_options['descnum'] == 300) {
        echo 'selected';
    }
    ?>
>300</OPTION>
<OPTION VALUE="400" <?php 
    if ($post_options['descnum'] == 400) {
        echo 'selected';
    }
    ?>
>400</OPTION>
<OPTION VALUE="500" <?php 
    if ($post_options['descnum'] == 500) {
        echo 'selected';
    }
    ?>
>500</OPTION>
<OPTION VALUE="1000" <?php 
    if ($post_options['descnum'] == 1000) {
        echo 'selected';
    }
    ?>
>1000</OPTION>
<OPTION VALUE="99" <?php 
    if ($post_options['descnum'] == 99) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Give me everything", 'wp-rss-multi-importer');
    ?>
</OPTION>
</SELECT><?php 
    _e("  NOTE: Choosing Give me everything will prohibit you from getting a Featured or Default Category Image", 'wp-rss-multi-importer');
    ?>
</p>

<h3><?php 
    _e("Author and Source Settings", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='addAuthor'><?php 
    _e("Show Feed or Author Name (if available)", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" Name="rss_post_options[addAuthor]" Value="1" <?php 
    if ($post_options['addAuthor'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label></p>


<p ><label class='o_textinput' for='addSource'><?php 
    _e("Show Feed Source", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" Name="rss_post_options[addSource]" Value="1" <?php 
    if ($post_options['addSource'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label></p>


<p style="padding-left:15px"><label class='o_textinput' for='sourceWords'><?php 
    _e("Feed Source Attribution Label", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[sourceWords]">
<OPTION VALUE="1" <?php 
    if ($post_options['sourceWords'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Source", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['sourceWords'] == 2) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Via", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['sourceWords'] == 3) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Read more here", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['sourceWords'] == 4) {
        echo 'selected';
    }
    ?>
><?php 
    _e("From", 'wp-rss-multi-importer');
    ?>
</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['sourceWords'] == 5) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Other (fill in below)", 'wp-rss-multi-importer');
    ?>
</OPTION>
</SELECT></p>

<p style="padding-left:15px"><label class='o_textinput' for='sourceWords_Label'><?php 
    _e("Your own attribution label", 'wp-rss-multi-importer');
    ?>
   <input  id='sourceWords_Label' type="text" size='12'  Name="rss_post_options[sourceWords_Label]" Value="<?php 
    echo $post_options['sourceWords_Label'];
    ?>
">(make sure to choose Other in drop down list)</label></p>

<p><label class='o_textinput' for='sourceAnchorText'><?php 
    _e("Read More anchor text", 'wp-rss-multi-importer');
    ?>
</label>
	<SELECT NAME="rss_post_options[sourceAnchorText]" id="sourceAnchorText">
	<OPTION VALUE="1" <?php 
    if ($post_options['sourceAnchorText'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Feed Name", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="2" <?php 
    if ($post_options['sourceAnchorText'] == 2) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Title", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="3" <?php 
    if ($post_options['sourceAnchorText'] == 3) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Link", 'wp-rss-multi-importer');
    ?>
</OPTION>
	</SELECT></p>


<h3><?php 
    _e("HTML and Image Handling", 'wp-rss-multi-importer');
    ?>
</h3>


<p><label class='o_textinput' for='stripAll'><?php 
    _e("Check to get rid of all html and images in the excerpt", 'wp-rss-multi-importer');
    ?>
	<SELECT NAME="rss_post_options[stripAll]" id="stripAll">
	<OPTION VALUE="1" <?php 
    if ($post_options['stripAll'] == 1) {
        echo 'selected';
    }
    ?>
><?php 
    _e("Yes", 'wp-rss-multi-importer');
    ?>
</OPTION>
	<OPTION VALUE="0" <?php 
    if ($post_options['stripAll'] == 0) {
        echo 'selected';
    }
    ?>
><?php 
    _e("No", 'wp-rss-multi-importer');
    ?>
</OPTION>
	</SELECT>
</p>







<span id="stripAllsecret" <?php 
    if ($post_options['stripAll'] == 1) {
        echo 'style="display:none"';
    }
    ?>
>
	
	
	<p ><label class='o_textinput' for='stripSome'><?php 
    _e("Eliminate all hyperlinks   ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[stripSome]" Value="1" <?php 
    if ($post_options['stripSome'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label> </p>

<p><label class='o_textinput' for='maximgwidth'><?php 
    _e("Maximum width size of images", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[maximgwidth]">
<OPTION VALUE="100" <?php 
    if ($post_options['maximgwidth'] == 100) {
        echo 'selected';
    }
    ?>
>100px</OPTION>
<OPTION VALUE="150" <?php 
    if ($post_options['maximgwidth'] == 150) {
        echo 'selected';
    }
    ?>
>150px</OPTION>
<OPTION VALUE="250" <?php 
    if ($post_options['maximgwidth'] == 250) {
        echo 'selected';
    }
    ?>
>250px</OPTION>
<OPTION VALUE="350" <?php 
    if ($post_options['maximgwidth'] == 350) {
        echo 'selected';
    }
    ?>
>350px</OPTION>
<OPTION VALUE="500" <?php 
    if ($post_options['maximgwidth'] == 500) {
        echo 'selected';
    }
    ?>
>500px</OPTION>
<OPTION VALUE="999" <?php 
    if ($post_options['maximgwidth'] == 999) {
        echo 'selected';
    }
    ?>
><?php 
    _e("unrestricted", 'wp-rss-multi-importer');
    ?>
</OPTION>
</SELECT></p>

<p ><label class='o_textinput' for='RSSdefaultImage'><?php 
    _e("Default category image setting", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[RSSdefaultImage]" id="RSSdefaultImage">
<OPTION VALUE="0" <?php 
    if ($post_options['RSSdefaultImage'] == 0) {
        echo 'selected';
    }
    ?>
>Process normally</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['RSSdefaultImage'] == 1) {
        echo 'selected';
    }
    ?>
>Use default image for category</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['RSSdefaultImage'] == 2) {
        echo 'selected';
    }
    ?>
>Replace articles with no image with default category image</OPTION>

</SELECT></p>




<p ><label class='o_textinput' for='setFeaturedImage'><?php 
    _e("Select how to use the image (in excerpt and/or as the Featured Image).", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[setFeaturedImage]" id="setFeaturedImage">
<OPTION VALUE="0" <?php 
    if ($post_options['setFeaturedImage'] == 0) {
        echo 'selected';
    }
    ?>
>Excerpt Only</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['setFeaturedImage'] == 1) {
        echo 'selected';
    }
    ?>
>Excerpt and Featured Image</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['setFeaturedImage'] == 2) {
        echo 'selected';
    }
    ?>
>Featured Image Only</OPTION>
</SELECT></p>


</span>


<h3><?php 
    _e("Get Social", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='showsocial'><?php 
    _e("Add social icons (Twitter and Facebook) to each post ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[showsocial]" Value="1" <?php 
    if ($post_options['showsocial'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label>
</p>

<h3><?php 
    _e("Comment Status", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='showsocial'><?php 
    _e("Turn off comments on posts made by this plugin ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[commentstatus]" Value="1" <?php 
    if ($post_options['commentstatus'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label>
</p>

<h3><?php 
    _e("Excerpt Handling", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='includeExcerpt'><?php 
    _e("Put the contents also in the excerpts field. ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[includeExcerpt]" Value="1" <?php 
    if ($post_options['includeExcerpt'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label>
</p>


<h3><?php 
    _e("No Index, No Follow ", 'wp-rss-multi-importer');
    ?>
</h3>
<p ><label class='o_textinput' for='noindex'><?php 
    _e("Make the Feed to Post items not search engine visible (It is up to search engines to honor this request.). ", 'wp-rss-multi-importer');
    ?>
<input type="checkbox" Name="rss_post_options[noindex]" Value="1" <?php 
    if ($post_options['noindex'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label>
</p>



<h3><?php 
    _e("Auto Remove Posts", 'wp-rss-multi-importer');
    ?>
</h3>

<p ><label class='o_textinput' for='autoDelete'><?php 
    _e("Check to Auto Remove Posts Created by this Plugin", 'wp-rss-multi-importer');
    ?>
   <input type="checkbox" id="autoRemoveCB" Name="rss_post_options[autoDelete]" Value="1" <?php 
    if ($post_options['autoDelete'] == 1) {
        echo 'checked="checked"';
    }
    ?>
</label>   (<a href="/wp-admin/options-general.php?page=wp_rss_multi_importer_admin&tab=posts_list">Manage what posts to keep here.</a>)</p>

<span id="autoremoveposts" <?php 
    if ($post_options['autoDelete'] != 1) {
        echo 'style="display:none"';
    }
    ?>
>

<p ><label class='o_textinput' for='expiration'><?php 
    _e("Select the expiration time (number of days, weeks, etc.) before removing posts", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[expiration]" id="expiration">
<OPTION VALUE="1" <?php 
    if ($post_options['expiration'] == 1) {
        echo 'selected';
    }
    ?>
>1 Day</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['expiration'] == 2) {
        echo 'selected';
    }
    ?>
>2 Days</OPTION>
<OPTION VALUE="3" <?php 
    if ($post_options['expiration'] == 3) {
        echo 'selected';
    }
    ?>
>3 Days</OPTION>
<OPTION VALUE="4" <?php 
    if ($post_options['expiration'] == 4) {
        echo 'selected';
    }
    ?>
>4 Days</OPTION>
<OPTION VALUE="5" <?php 
    if ($post_options['expiration'] == 5) {
        echo 'selected';
    }
    ?>
>5 Days</OPTION>
<OPTION VALUE="6" <?php 
    if ($post_options['expiration'] == 6) {
        echo 'selected';
    }
    ?>
>6 Days</OPTION>
<OPTION VALUE="7" <?php 
    if ($post_options['expiration'] == 7) {
        echo 'selected';
    }
    ?>
>7 Days</OPTION>
<OPTION VALUE="14" <?php 
    if ($post_options['expiration'] == 14) {
        echo 'selected';
    }
    ?>
>2 Weeks</OPTION>
<OPTION VALUE="21" <?php 
    if ($post_options['expiration'] == 21) {
        echo 'selected';
    }
    ?>
>3 Weeks</OPTION>
<OPTION VALUE="28" <?php 
    if ($post_options['expiration'] == 28) {
        echo 'selected';
    }
    ?>
>4 Weeks</OPTION>
<OPTION VALUE="56" <?php 
    if ($post_options['expiration'] == 56) {
        echo 'selected';
    }
    ?>
>2 Months</OPTION>
</SELECT></p>

<p ><label class='o_textinput' for='oldPostStatus'><?php 
    _e("Move posts to what status?", 'wp-rss-multi-importer');
    ?>
</label>
<SELECT NAME="rss_post_options[oldPostStatus]" id="setFeaturedImage">
<OPTION VALUE="0" <?php 
    if ($post_options['oldPostStatus'] == 0) {
        echo 'selected';
    }
    ?>
>Permanently Delete</OPTION>
<OPTION VALUE="1" <?php 
    if ($post_options['oldPostStatus'] == 1) {
        echo 'selected';
    }
    ?>
>Trash (but don't permanently delete)</OPTION>
<OPTION VALUE="2" <?php 
    if ($post_options['oldPostStatus'] == 2) {
        echo 'selected';
    }
    ?>
>Pending</OPTION>
</SELECT><?php 
    _e("  NOTE: Choosing Permanently Delete may result in posts being imported again", 'wp-rss-multi-importer');
    ?>
</p>

</span>
<?php 
    $catOptions = get_option('rss_import_categories');
    if (!empty($catOptions)) {
        echo "<h3><label class='o_textinput' for='category'>" . __('Restrict feeds to one of your defined RSS Multi Importer categories and place them in your blog categories', 'wp-rss-multi-importer') . "</label></h3>";
        echo "<p>" . __('Choose a plugin category and associate it with one of your blog post categories.', 'wp-rss-multi-importer') . "</p>";
        echo '<div class="ftpost_head">Plugin Category --></div><div class="ftpost_head">Blog Post Category</div><div style="clear:both;"></div>';
        $catsize = count($catOptions);
        $postoptionsize = $catsize / 2;
        for ($q = 1; $q <= $postoptionsize; $q++) {
            if (isEmpty($post_options['categoryid']['wpcatid'][$q]) == 0 || $q == 1) {
                echo "<div class='category_id_options' id='{$q}'>";
                $selclear = 0;
                // added
            } else {
                echo "<div class='category_id_options' id='{$q}' style='display:none'>";
                $selclear = 1;
                // added
            }
            ?>



<p><span class="ftpost_l"><SELECT NAME="rss_post_options[categoryid][plugcatid][<?php 
            echo $q;
            ?>
]">
	<?php 
            if ($selclear == 1) {
                // added
                ?>
	<OPTION selected VALUE=''>None</OPTION>
	<?php 
            }
            if ($q == 1) {
                ?>
<OPTION VALUE='0' <?php 
                if ($post_options['categoryid']['plugcatid'][$q] == 0) {
                    echo 'selected="selected"';
                }
                ?>
>ALL</OPTION>
<?php 
            }
            for ($k = 1; $k <= $catsize; $k++) {
                if ($k % 2 == 0) {
                    continue;
                }
                $catkey = key($catOptions);
                $nameValue = $catOptions[$catkey];
                next($catOptions);
                $catkey = key($catOptions);
                $IDValue = $catOptions[$catkey];
                if ($post_options['categoryid']['plugcatid'][$q] == $IDValue && $selclear == 0) {
                    // selclear added
                    $sel = 'selected  ';
                } else {
                    $sel = '';
                }
                echo "<OPTION " . $sel . "VALUE=" . $IDValue . ">" . $nameValue . "</OPTION>";
                next($catOptions);
            }
            echo "</SELECT></span><span class='ftpost_r'>";
            echo "<SELECT multiple='multiple' size='4' id='wpcategory2' NAME='rss_post_options[categoryid][wpcatid][{$q}][]'>";
            catDropDown($post_options['categoryid']['wpcatid'][$q]);
            echo "</SELECT></span></p></div>";
            reset($catOptions);
        }
        echo "<a href='javascript:void(0)' class='add_cat_id'>Add another plugin to blog post category association</a>";
    } else {
        echo __("<b>NOTE: If you set up categories (in Category Options) you can restrict only feeds in that category to go into blog posts.</b> ", 'wp-rss-multi-importer');
    }
    ?>


</div></div>

       <p class="submit"><input type="submit" value="Save Settings" name="submit" class="button-primary"></p>



       </form>

<button type="button" name="fetchnow" id="fetch-now" value=""><?php 
    _e("CLICK TO FETCH FEEDS NOW", 'wp-rss-multi-importer');
    ?>
</button>	
<div id="note"></div>
	
</div></div>



</div>
<?php 
}