<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>

<style>

.mk_green { color:#fff; background:#0C0; border-radius: 50% }



.wrap-two{

	width:96%;

	float:left;

	background:#fff;

	border:1px #dddddd solid;

	margin-top: 15px;

	padding:20px;

}

.wrap-two h2{

	margin-top: 0px;

    border-bottom: 1px #dddd solid;

    padding-bottom: 15px;   

}

.wrap-two h2 img{

	float:left;

	margin-right:15px;

}

.wrap-two h2 p{

	font-size: 22px;

	margin-top: 0px;

    margin-bottom: 0px;

	font-weight: bold;

}

.wrap-two .by-box{

	width:100%;

	float:left;

	max-width:500px;

}

.wrap-two .by-box .add-plug{

	border-bottom:1px #dddddd solid;

	padding:15px 0px;

	width:100%;

	float:left;

}

.wrap-two .by-box .add-plug .img-box{

	width:50%;

	float:left;

}

.wrap-two .by-box .add-plug .img-box p{

	font-size: 18px;

    font-weight: bold;

    color: #000;

    margin: 0px;

    margin-top: 8px;

}

.wrap-two .by-box .add-plug .img-box img{

		float:left;

	    margin-right: 15px;

		margin-top: 4px;

}

.wrap-two .by-box .add-plug .txt-box{

	width:50%;

	float:left;

	text-align:right;

}

.wrap-two .by-box .add-plug .txt-box p{

	margin: 0px;

    background: #52be22;

    color: #fff;

    width: 120px;

    float: right;

    text-align: left;

    min-height: 40px;

    line-height: 37px;

    border-radius: 5px;

    font-size: 16px;

    font-weight: bold;

	cursor:pointer;

}

.wrap-two .by-box .add-plug .txt-box p .mk_green{

	background: none;

    margin-top: 10px;

    float: left;

    padding-left: 9px;

    margin-right: 5px;;

}

.wrap-two .by-box .add-plug .txt-box .button{

	background: #267ddd;

    color: #fff;

    font-size: 16px;

    font-weight: bold;

    border: 0px;

    border-radius: 5px;

    width: 120px;

    text-align: center;

    min-height: 40px;

    line-height: 37px;

}



</style>

<?php $dir = ABSPATH.'wp-content/plugins/';

function mkgeneratePluginActivationLinkUrl($plugin, $action = 'activate')

{

   	if ( strpos( $plugin, '/' ) ) {

		$plugin = str_replace( '\/', '%2F', $plugin );

	}

	$url = sprintf( admin_url( 'plugins.php?action=' . $action . '&plugin=%s&plugin_status=all&paged=1&s' ), $plugin );

	$_REQUEST['plugin'] = $plugin;

	$url = wp_nonce_url( $url, $action . '-plugin_' . $plugin );

	return $url;

}

?>

<div class="wrap">

<div class="wrap-two">



<h2> <img src="<?php echo plugins_url( 'images/add.png', dirname(__FILE__) ); ?>"/> 

	<p><?php _e('Add-ons', 'wp-file-manager-pro');?></p></h2>

	<div class="by-box">

		<div class="add-plug">

			<div class="img-box">

				<img src="<?php echo plugins_url( 'images/box.png', dirname(__FILE__) ); ?>"/>

				<p><?php _e('Box', 'wp-file-manager-pro');?> </p>

			</div>

			<div class="txt-box">

				<p>

				<?php if(class_exists('wp_file_manager_box')) {

                  echo 'Installed <span class="dashicons dashicons-yes mk_green"></span>';

                 } else if(file_exists($dir.'wp-file-manager-box')) { 

				  echo '<a href="'.mkgeneratePluginActivationLinkUrl('wp-file-manager-box/box.php').'" class="button">Activate</a>'; 

				 } else {

                 echo '<a href="https://filemanagerpro.io/product/file-manager-box" class="button">Buy Now</a>';                 

				 }

				?>                

                </p>

			</div>

		</div>

		

		

		<div class="add-plug">

			<div class="img-box">

				<img src="<?php echo plugins_url( 'images/drop.png', dirname(__FILE__) ); ?>"/>

				<p><?php _e('DropBox', 'wp-file-manager-pro');?> </p>

			</div>

			<div class="txt-box">

                <p><?php if(class_exists('wp_file_manager_dropbox')) {

                  echo 'Installed <span class="dashicons dashicons-yes mk_green"></span>';

                 } else if(file_exists($dir.'wp-file-manager-dropbox')) { 

				  echo '<a href="'.mkgeneratePluginActivationLinkUrl('wp-file-manager-dropbox/dropbox.php').'" class="button">Activate</a>'; 

				 } else {

                 echo '<a href="https://filemanagerpro.io/product/file-manager-dropbox" class="button">Buy Now</a>';                 

				 }

				?> 

                </p>

			</div>

		</div>

		

		

		<div class="add-plug">

			<div class="img-box">

				<img src="<?php echo plugins_url( 'images/drive.png', dirname(__FILE__) ); ?>"/> 

				<p><?php _e('Google Drive', 'wp-file-manager-pro');?> </p>

			</div>

			<div class="txt-box">

				<p>

				<?php if(class_exists('wp_file_manager_googledrive')) {

                  echo 'Installed <span class="dashicons dashicons-yes mk_green"></span>';

                 } else if(file_exists($dir.'wp-file-manager-googledrive')) { 

				  echo '<a href="'.mkgeneratePluginActivationLinkUrl('wp-file-manager-googledrive/wp_file_manager_googledrive.php').'" class="button">Activate</a>'; 

				 } else {

                 echo '<a href="https://filemanagerpro.io/product/file-manager-google-drive" class="button">Buy Now</a>';                 

				 }

				?> 				

				</p>

			</div>

		</div>	

		

		<div class="add-plug">

			<div class="img-box">

			<img src="<?php echo plugins_url( 'images/git.png', dirname(__FILE__) ); ?>"/> 

				<p><?php _e('Git Hub', 'wp-file-manager-pro');?> </p>

			</div>

			<div class="txt-box">

				<p>

				<?php if(class_exists('wp_file_manager_git')) {

                  echo 'Installed <span class="dashicons dashicons-yes mk_green"></span>';

                 } else if(file_exists($dir.'wp-file-manager-git')) { 

				  echo '<a href="'.mkgeneratePluginActivationLinkUrl('wp-file-manager-git/wp_file_manager_git.php').'" class="button">Activate</a>'; 

				 } else {

                 echo '<a href="https://filemanagerpro.io/product/file-manager-git" class="button">Buy Now</a>';                 

				 }

				?>

                </p>

			</div>

		</div>

		

		<?php /*

		<div class="add-plug">

			<div class="img-box">

				<img src="<?php echo plugins_url( 'images/not.png', dirname(__FILE__) ); ?>"/> 

				<p><?php _e('Mobile Notification', 'wp-file-manager-pro');?> </p>

			</div>

			<div class="txt-box">

               <p>

				<?php if(class_exists('wp_file_manager_mobile')) {

                  echo 'Installed <span class="dashicons dashicons-yes mk_green"></span>';

                 } else if(file_exists($dir.'wp-file-manager-mobile-notifications')) { 

				  echo '<a href="'.mkgeneratePluginActivationLinkUrl('wp-file-manager-mobile-notifications/wp_file_manager_mobile_notifications.php').'" class="button">Activate</a>'; 

				 } else {

                 echo '<a href="https://filemanagerpro.io/product/file-manager-mobile-notifications" class="button">Buy Now</a>';                 

				 }

				?>

                </p>

			</div>

		</div>

		*/ ?>

		

		<div class="add-plug">

			<div class="img-box">

				<img src="<?php echo plugins_url( 'images/one.png', dirname(__FILE__) ); ?>"/> 

				<p><?php _e('OneDrive', 'wp-file-manager-pro');?> </p>

			</div>

			<div class="txt-box">

               <p>

				<?php if(class_exists('wp_file_manager_onedrive')) {

                  echo 'Installed <span class="dashicons dashicons-yes mk_green"></span>';

                 } else if(file_exists($dir.'wp-file-manager-onedrive')) { 

				  echo '<a href="'.mkgeneratePluginActivationLinkUrl('wp-file-manager-onedrive/wp_file_manager_onedrive.php').'" class="button">Activate</a>'; 

				 } else {

                 echo '<a href="https://filemanagerpro.io/product/file-manager-one-drive" class="button">Buy Now</a>';                 

				 }

				?>

                </p>

			</div>

		</div>

		

		<div class="add-plug">

			<div class="img-box">

				<img src="<?php echo plugins_url( 'images/slack.png', dirname(__FILE__) ); ?>"/>

				<p><?php _e('Slack', 'wp-file-manager-pro');?> </p>

			</div>

			<div class="txt-box">

                <p>

				 <?php if(class_exists('wp_file_manager_slack')) {

                  echo 'Installed <span class="dashicons dashicons-yes mk_green"></span>';

                 } else if(file_exists($dir.'wp-file-manager-slack')) { 

				  echo '<a href="'.mkgeneratePluginActivationLinkUrl('wp-file-manager-slack/wp_file_manager_slack.php').'" class="button">Activate</a>'; 

				 } else {

                 echo '<a href="https://filemanagerpro.io/product/file-manager-slack" class="button">Buy Now</a>';                 

				 }

				?>

                </p>

			</div>

		</div>

		

	</div>

</div>



</div>