<div class="container-fluid">
    <div class="block-header">
        <h2>Design > Themes</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-12 col-md-12">
            <div class="card">
                <div class="header">
                    <h2>Manage Themes</h2>
                </div>
                <div class="body">
                    <div class="alert alert-success pro-settings-alert"></div>
                    <form action="#" method="post" class="setting-themes-container">
                    <div class="row">
                    	 <?php
				         foreach (GetThemes() as $theme_url) {
				            include($theme_url . '/info.php');
				         ?>
				         <div class="col-lg-6">
				            <div class="theme <?php echo ($themeName == $wo['config']['theme']) ? ' active' : '';?>">
				               <div class="themeName"><?php echo $themeName;?></div>
				               <div class="themeVirsion">Version: <?php echo $themeVirsion;?></div>
				               <div class="themeAuthor">Author <a href="<?php echo $themeAuthorUrl;?>"><?php echo $themeAuthor;?></a></div>
				               <?php if($themeName ==  $wo['config']['theme']) { ?>
				               <div class="active"><i class="fa fa-check"></i> Activeted</div>
				               <?php } else { ?>
				               <div class="active"><a href="#" id="active">Activate</a></div>
				               <input type="hidden" name="theme" value="<?php echo $themeName; ?>" />
				               <?php } ?>
				               <div class="clearfix"></div>
				            </div>
				         </div>
				         <?php } ?>
				         <div class="clearfix"></div>
                    </div>
                        <input type="hidden" name="hash_id" value="<?php echo Wo_CreateSession();?>">
                </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->
<script>
$(function() {
   $('a#active').click(function() {
     $('form.setting-themes-container').submit();
   });
   $('form.setting-themes-container').ajaxForm({
     url: Wo_Ajax_Requests_File() + '?f=admin_setting&s=update_general_setting',
     success: function(data) {
       if (data.status == 200) {
         window.location = "<?php echo Wo_LoadAdminLinkSettings('manage-themes'); ?>";
       } 
     }
  });
});
</script>