<?php
function fm_featured_page($current_plugin = '') {
?>
  <div id="main_featured_plugins_page">
	<table align="center" width="90%" style="margin-top: 0px;border-bottom: rgb(111, 111, 111) solid 1px;">
		<tr>
			<td colspan="2" style="height: 40px; padding: 30px 0px 0px 0px;">
				<h3 style="margin: 0px;font-family:Segoe UI;padding-bottom: 15px;color: rgb(111, 111, 111); font-size:18pt;">Featured Plugins</h3>
			</td>
			<td  align="right" style="font-size:16px;"></td>
		</tr>
	</table>
	<form method="post">
		<ul id="featured-plugins-list">
			<li class="photo-gallery ">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Photo Gallery</strong>
				</div>
				<div class="description">
					<p>Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality. </p>
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-photo-gallery-plugin.html" class="download">Download</a>
			</li>
			<li class="events-wd">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Event Calendar WD</strong>
				</div>
				<div class="description">
					<p>Organize and publish your events in an easy and elegant way using Event Calendar WD.</p>
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-event-calendar-wd.html" class="download">Download</a>
			</li>
			<li class="spider-calendar">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Spider Calendar</strong>
				</div>
				<div class="description">
					<p>Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.</p>
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-calendar.html" class="download">Download</a>
			</li>
			<li class="faq_wd">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">FAQ WD</strong>
				</div>
				<div class="description">
					<p> Organize and publish your FAQs in an easy and elegant way using FAQ WD. </p>	
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-faq-wd.html" class="download">Download</a>
			</li>
			 <li class="catalog">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Spider Catalog</strong>
				</div>
				<div class="description">
					<p>Spider Catalog for WordPress is a convenient tool for organizing the products represented on your website into catalogs.</p>	
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-catalog.html" class="download">Download</a>
			</li>
			<li class="slider_wd">
				 <div class="product"></div>
				 <div class="title">
					 <strong class="heading">Slider WD</strong>
				 </div>
				<div class="description">
					<p>Create responsive, highly configurable sliders with various effects for your WordPress site. </p>			
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-slider-plugin.html" class="download">Download</a>
			</li>
			<li class="player">
				<div class="product"></div>
				<div class="title">
						<strong class="heading">Video Player</strong>
				</div>
				<div class="description">
					<p>Spider Video Player for WordPress is a Flash & HTML5 video player plugin that allows you to easily add videos to your website with the possibility</p>
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-player.html" class="download">Download</a>
			</li>
			<li class="contacts">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Spider Contacts</strong>
				</div>
				<div class="description">
					<p>Spider Contacts helps you to display information about the group of people more intelligible, effective and convenient.</p>	
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-contacts-plugin.html" class="download">Download</a>
			</li>
			<li class="facebook">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Spider Facebook</strong>
				</div>
				<div class="description">
					<p>Spider Facebook is a WordPress integration tool for Facebook.It includes all the available Facebook social plugins and widgets.</p>
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-facebook.html" class="download">Download</a>
			</li>
			<li class="faq">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Spider FAQ</strong>
				</div>
				<div class="description">
					<p>The Spider FAQ WordPress plugin is for creating an FAQ (Frequently Asked Questions) section for your website.</p>	
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-faq-plugin.html" class="download">Download</a>
			</li>
			<li class="zoom">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Zoom</strong>
				</div>
				<div class="description">
					<p>Zoom enables site users to resize the predefined areas of the web site.</p>	
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-zoom.html" class="download">Download</a>
			</li>
			<li class="flash-calendar">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Flash Calendar</strong>
				</div>
				<div class="description">
					<p>Spider Flash Calendar is a highly configurable Flash calendar plugin which allows you to have multiple organized events.</p>	
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-events-calendar.html" class="download">Download</a>
			</li>
			<li class="contact-maker">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Contact Form Maker</strong>
				</div>
				<div class="description">
					<p>WordPress Contact Form Maker is an advanced and easy-to-use tool for creating forms.</p>			 
				 </div>
				 <a target="_blank" href="https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html" class="download">Download</a>
			</li>
			<li class="twitter-widget">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Widget Twitter</strong>
				</div>
				<div class="description">
					<p>The Widget Twitter plugin lets you to fully integrate your WordPress site with your Twitter account.</p>
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-twitter-integration-plugin.html" class="download">Download</a>
			</li>
			<li class="contact_form_bulder">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Contact Form Builder</strong>
				</div>
				<div class="description">
					<p>Contact Form Builder is the best tool for quickly arranging a contact form for your clients and visitors. </p>		 
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-contact-form-builder.html" class="download">Download</a>
			</li>
			<li class="folder_menu">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Folder Menu</strong>
				</div>
				<div class="description">
					<p>Folder Menu Vertical is a WordPress Flash menu module for your website, designed to meet your needs and preferences. </p>		 
				</div>
				<a target="_blank" href="https://web-dorado.com/products/wordpress-menu-vertical.html" class="download">Download</a>
			</li>
			<li class="random_post">
				<div class="product"></div>
				<div class="title">
					<strong class="heading">Random post</strong>
				</div>
				<div class="description">
					<p>Spider Random Post is a small but very smart solution for your WordPress web site. </p>		 
			 </div>
			 <a target="_blank" href="https://web-dorado.com/products/wordpress-random-post.html" class="download">Download</a>
			</li>
		</ul>
	</form>
</div>
<?php
}

function fm_extensions_page($current_plugin = '') {

		$addons = array(
			'Form Maker Add-ons' => array(
				'imp_exp'   => array(
					'name'        => 'Import/Export',
					'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/export-import.html',
					'description' => 'Form Maker Export/Import WordPress plugin allows exporting and importing forms with/without submissions.',
					'icon'        => '',
					'image'       => plugins_url( '../assets/import_export.png', __FILE__ ),
				),
				'mailchimp' => array(
					'name'        => 'MailChimp',
					'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/mailchimp.html',
					'description' => 'This add-on is an integration of the Form Maker with MailChimp which allows to add contacts to your subscription lists just from submitted forms.',
					'icon'        => '',
					'image'       => plugins_url( '../assets/mailchimp.png', __FILE__ ),
				),				
				'reg' => array(
					'name'        => 'Registration',
					'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/registration.html',
					'description' => 'User Registration add-on integrates with Form maker forms allowing users to create accounts at your website.',
					'icon'        => '',
					'image'       => plugins_url( '../assets/reg.png', __FILE__ ),
				),
				'post_generation' => array(
					'name'        => 'Post Generation',
					'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/post-generation.html',
					'description' => 'Post Generation add-on allows creating a post, page or custom post based on the submitted data.',
					'icon'        => '',
					'image'       => plugins_url( '../assets/post-generation-update.png', __FILE__ ),
				),
				'conditional_emails' => array(
					'name'        => 'Conditional Emails',
					'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/conditional-emails.html',
					'description' => 'Conditional Emails add-on allows to send emails to different recipients depending on the submitted data .',
					'icon'        => '',
					'image'       => plugins_url( '../assets/conditional-emails-update.png', __FILE__ ),
				),
				'dropbox_integration' => array(
						'name'        => 'Dropbox Integration',
						'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/dropbox.html',
						'description' => 'The Form Maker Dropbox Integration addon is extending the Form Maker capabilities allowing to store the form attachments straight to your Dropbox account.',
						'icon'        => '',
						'image'       => plugins_url( '../assets/dropbox-integration-update.png', __FILE__ ),
				),
				'gdrive_integration' => array(
						'name'        => 'Google Drive Integration',
						'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/google-drive.html',
						'description' => 'The Google Drive Integration add-on integrates Form Maker with Google Drive and allows you to send the file uploads to the Google Drive',
						'icon'        => '',
						'image'       => plugins_url( '../assets/google_drive_integration.png', __FILE__ ),
				),
				'pdf_integration' => array(
						'name'        => 'PDF Integration',
						'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/pdf.html',
						'description' => 'The Form Maker PDF Integration add-on allows sending submitted forms in PDF format.',
						'icon'        => '',
						'image'       => plugins_url( '../assets/pdf-integration.png', __FILE__ ),
				),
				'pushover' => array(
						'name'        => 'Pushover',
						'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/pushover.html',
						'description' => 'Form Maker Pushover integration allows to receive real-time notifications when a user submits a new form. This means messages can be pushed to Android and Apple devices, as well as desktop notification board.',
						'icon'        => '',
						'image'       => plugins_url( '../assets/pushover.png', __FILE__ ),
				),
				'form-maker-save-progress' => array(
					'name'          => 'Save Progress',
					'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html',
					'description' => 'The add-on allows to save filled in forms as draft and continue editing them subsequently.',
					'icon'        => '',
					'image'       => plugins_url( '../assets/save-progress.png', __FILE__ ),
				),
        'stripe' => array(
						'name'        => 'Stripe',
						'url'         => 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html',
						'description' => 'Form Maker Stripe Integration Add-on allows to accept direct payments made by Credit Cards. Users will remain on your website during the entire process.',
						'icon'        => '',
						'image'       => plugins_url( '../assets/stripe-integration-update.png', __FILE__ ),
				)
			)
		);



?>
<link href="<?php echo plugins_url( 'admin.css', __FILE__ )?>" rel="stylesheet"/>
<div class="wrap">
	<?php settings_errors(); ?>
	<div id="fm-settings">
		<div id="fm-settings-content" >
			<h2 id="add_on_title"><?php echo esc_html(get_admin_page_title()); ?></h2>
			<?php
			if($addons){
				foreach ($addons as $name=>$cat) {
					?>

				<!--	<div style="clear: both; margin-top: 15px;"> <h3 class="fm-addon-subtitle"><?php echo $name?> </h3></div> -->
					<?php
					foreach ( $cat as $addon ) {
						?>
						<div class="fm-add-on">
							<h2><?php echo $addon['name'] ?></h2>
							<figure class="fm-figure">
								<div  class="fm-figure-img">
									<a href="<?php echo $addon['url'] ?>" target="_blank">
										<?php if ( $addon['image'] ) { ?>
											<img src="<?php echo $addon['image'] ?>"/>
										<?php } ?>
									</a>
								</div>

								<figcaption class="fm-addon-descr fm-figcaption">

									<?php if ( $addon['icon'] ) { ?>
										<img src="<?php echo $addon['icon'] ?>"/>
									<?php } ?>
									<?php echo $addon['description'] ?>
								</figcaption>
							</figure>
							<?php if ( $addon['url'] !== '#' ) { ?>
								<a href="<?php echo $addon['url'] ?>"
								   target="_blank" class="fm-addon"><span>GET THIS ADD ON</span></a>

							<?php } else { ?>
								<div class="fm_coming_soon">
									<img
										src="<?php echo plugins_url( '../../assets/coming_soon.png', __FILE__ ); ?>"/>
								</div>
							<?php }  ?>
						</div>
					<?php
					}
				}
			}
			?>

		</div>
		<!-- #fm-settings-content -->
	</div>
	<!-- #fm-settings -->
</div><!-- .wrap -->

<?php
}