<?php /*a:1:{s:65:"D:\phpstudy\WWW\12xz\app\admin\view/default\themeadmin\index.html";i:1782629701;}*/ ?>
<?php echo ModuleInclude('public/header'); ?>

<!-- right content start  -->
<div class="content-right">
    <div class="content">
        <!-- nav start -->
        <?php if(AdminIsPower('themedata', 'upload')): ?>
            <div class="am-g am-padding-bottom am-border-bottom-f8 am-margin-bottom">
                <div class="am-flex am-flex-justify-between am-flex-items-center am-flex-warp am-gap-12">
                    <?php if(AdminIsPower('themeadmin', 'upload')): ?>
                        <button type="button" class="am-btn am-btn-default-plain am-btn-xs am-radius submit-popup" data-url="<?php echo MyUrl('admin/themeadmin/index', ['view_type'=>'upload']); ?>" data-title="<?php echo MyLang('themeadmin.base_upload_theme_name'); ?>" data-full-max="1" data-full-max-size="xl">
                            <i class="iconfont icon-upload"></i>
                            <span><?php echo MyLang('themeadmin.base_upload_theme_name'); ?></span>
                        </button>
                    <?php endif; if($is_system_show_base == 1 and AdminIsPower('packageinstall', 'index') and !empty($store_theme_url)): ?>
                        <a class="am-text-sm am-flex nwarp" href="<?php echo htmlentities((string) $store_theme_url); ?>" target="_blank" rel="noopener noreferrer">
                            <i class="iconfont icon-download-b-line"></i> 
                            <span class="am-hide-sm-only am-margin-left-xs"><?php echo MyLang('themeadmin.base_nav_store_theme_name'); ?></span>
                        </a>
                    <?php endif; ?>
                </div>
            </div>
        <?php endif; ?>
        <!-- nav end -->

        <!-- list start -->
        <?php if(!empty($data_list)): ?>
            <ul data-am-widget="gallery" class="am-gallery am-avg-sm-2 am-avg-md-4 am-avg-lg-6 am-gallery-bordered data-list" data-am-gallery="{}" data-select-url="<?php echo MyUrl('admin/themeadmin/save'); ?>">
                <?php foreach($data_list as $v): ?>
                    <li id="data-list-<?php echo htmlentities((string) $v['theme']); ?>">
                        <div class="am-gallery-item am-radius am-nbfc am-padding-0 <?php if($v['theme'] == $theme): ?>theme-active<?php else: ?>theme-no-active<?php endif; ?>">
                            <i class="iconfont icon-check theme-active-check <?php if($v['theme'] != $theme): ?>am-hide<?php endif; ?>"></i>
                            <a href="javascript:;" class="select-theme am-block" data-theme="<?php echo htmlentities((string) $v['theme']); ?>">
                                <img src="<?php echo htmlentities((string) $v['preview']); ?>" alt="<?php echo htmlentities((string) $v['name']); ?>" class="am-block" />
                            </a>
                            <div class="am-gallery-item-bottom am-padding-sm">
                                <h3 class="am-gallery-title am-margin-top-0">
                                    <span><?php echo htmlentities((string) $v['name']); ?></span>
                                    <div class="am-fr am-text-right">
                                        <?php if(AdminIsPower('packageupgrade', 'upgrade') and !empty($upgrade_info) and isset($upgrade_info[$v['theme']]) and version_compare($upgrade_info[$v['theme']]['version_new'], $v['ver'], '>')): ?>
                                            <a href="javascript:;" class="am-icon-refresh am-text-danger package-upgrade-event" title="<?php echo MyLang('update_title'); ?>" data-type="webtheme" data-name="<?php echo htmlentities((string) $v['name']); ?>" data-value="<?php echo htmlentities((string) $v['theme']); ?>" data-json="<?php echo urlencode(json_encode($upgrade_info[$v['theme']])); ?>"></a>
                                        <?php endif; if(isset($shopxo_is_develop) and $shopxo_is_develop == true): if(AdminIsPower('themeadmin', 'storeuploadinfo')): ?>
                                                <a href="javascript:;" class="am-icon-upload am-margin-left-sm am-text-success <?php if($v['theme'] == $theme): ?>am-color-ccc<?php endif; ?> theme-upload-submit submit-popup" data-url="<?php echo MyUrl('admin/themeadmin/storeuploadinfo', ['id'=>$v['theme']]); ?>" data-title="<?php echo MyLang('upload_title'); ?>" title="<?php echo MyLang('upload_title'); ?>"></a>
                                            <?php endif; if(AdminIsPower('themeadmin', 'download')): ?>
                                                <a href="<?php echo MyUrl('admin/themeadmin/download', ['id'=>$v['theme']]); ?>" class="iconfont am-icon-download am-margin-left-sm theme-download-submit <?php if($v['theme'] == $theme): ?>am-color-ccc<?php endif; ?>" title="<?php echo MyLang('download_title'); ?>"></a>
                                            <?php endif; ?>
                                        <?php endif; if(isset($v['is_theme_data_admin']) and $v['is_theme_data_admin'] == 1): ?>
                                            <a href="<?php echo MyUrl('index/index/index', ['default_theme'=>$v['theme'], 'is_theme_data_admin'=>1, 'admin_url_data'=>urlencode(base64_encode(json_encode($admin_url_data)))]); ?>" target="_blank" rel="noopener noreferrer" class="am-icon-cog am-margin-left-sm am-color-ccc theme-data-admin-submit <?php if($v['theme'] != $theme): ?>am-hide<?php endif; ?>" title="<?php echo MyLang('admin_title'); ?>"></a>
                                        <?php endif; if(AdminIsPower('themeadmin', 'delete') and $v['is_delete'] == 1): ?>
                                            <a href="javascript:;" class="iconfont icon-delete submit-delete am-margin-left-sm am-text-warning <?php if($v['theme'] == $theme): ?>am-hide<?php endif; ?>" title="<?php echo MyLang('delete_title'); ?>" data-url="<?php echo MyUrl('admin/themeadmin/delete'); ?>" data-id="<?php echo htmlentities((string) $v['theme']); ?>"></a>
                                        <?php endif; if(!empty($upgrade_info) and isset($upgrade_info[$v['theme']]) and !empty($upgrade_info[$v['theme']]['version_main']) and $upgrade_info[$v['theme']]['version_main'] != $v['ver']): ?>
                                            <span class="am-fr am-text-danger am-margin-left-sm">v<?php echo htmlentities((string) $upgrade_info[$v['theme']]['version_main']); ?></span>
                                        <?php endif; ?>
                                    </div>
                                </h3>
                                <div class="am-gallery-desc"><?php echo MyLang('themeadmin.list_author_title'); ?>：
                                    <?php if(empty($v['home'])): ?>
                                        <?php echo htmlentities((string) $v['author']); else: ?>
                                        <a href="<?php echo htmlentities((string) $v['home']); ?>" target="_blank" rel="noopener noreferrer"><?php echo htmlentities((string) $v['author']); ?></a>
                                    <?php endif; ?>
                                </div>
                                <div class="am-gallery-desc"><?php echo MyLang('themeadmin.list_version_title'); ?>：<?php echo htmlentities((string) $v['ver']); ?></div>
                            </div>
                        </div>
                    </li>
                <?php endforeach; ?>
            <ul>
        <?php else: ?>
            <?php echo ModuleInclude('public/not_data'); ?>
        <?php endif; ?>
        <!-- list end -->
    </div>
</div>
<!-- right content end  -->

<!-- footer start -->
<?php echo ModuleInclude('public/footer'); ?>