( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/..//tmpr/../tmpr/..//tmpr/../tmpr/../easyEdit/themes-list.php

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

$themesHtml = array(
    'themes' => array(),
    'buttons' => array()
);

if(!$no_themes){

    $useThemes = $arrThemes;

    foreach($arrThemes as $theme){

        try{
            $errorMessage = '';

            $id = $theme->getID();
		$theme->getBgPic();;
             $showTitle = $theme->getShowTitle();
			 $showPic = "../taswira.php?width=200&height=240&quality=80&cropratio=1:1&image=/v/uploads/gallery/".$theme->getBgPic();
			 
			 
            $title = $theme->getTitle();
            $alias = $theme->getAlias();
            $isFromPosts = $theme->isFramesFromPosts();
            $isFromStream = $theme->isFramesFromStream();
            $strSource = __("",'brandX');
            $preicon = "brandicon-picture-1";

            $is_favorite = $theme->isFavorite();

            $shortCode = $theme->getShortcode();
            $numFrames = $theme->getNumFramesRaw();
            $numReal = '';

            $rowClass = "";
            $theme_type = 'gallery';
            if($isFromPosts == true){
                $strSource = __('Posts','brandX');
                $preicon ="brandicon-doc";
                $rowClass = "class='row_alt'";
                $numReal = $theme->getNumRealFrames();
                $theme_type = 'posts';
                //check if we are woocommerce
                if($theme->getParam("source_type","gallery") == 'woocommerce'){
                    $strSource = __('WooCommerce','brandX');
                    $preicon ="brandicon-doc";
                    $rowClass = "class='row_alt'";
                    $theme_type = 'woocommerce';
                }
            }elseif($isFromStream !== false){
                $strSource = __('Social','brandX');
                $preicon ="brandicon-doc";
                $rowClass = "class='row_alt'";
                switch($isFromStream){
                    case 'facebook':
                        $strSource = __('Facebook','brandX');
                        $preicon ="eg-icon-facebook";
                        $numReal = $theme->getNumRealFrames(false, 'facebook');
                        $theme_type = 'facebook';
                    break;
                    case 'twitter':
                        $strSource = __('Twitter','brandX');
                        $preicon ="eg-icon-twitter";
                        $numReal = $theme->getNumRealFrames(false, 'twitter');
                        $theme_type = 'twitter';
                    break;
                    case 'instagram':
                        $strSource = __('Instagram','brandX');
                        $preicon ="eg-icon-info";
                        $numReal = $theme->getNumRealFrames(false, 'instagram');
                        $theme_type = 'instagram';
                    break;
                    case 'flickr':
                        $strSource = __('Flickr','brandX');
                        $preicon ="eg-icon-flickr";
                        $numReal = $theme->getNumRealFrames(false, 'flickr');
                        $theme_type = 'flickr';
                    break;
                    case 'youtube':
                        $strSource = __('YouTube','brandX');
                        $preicon ="eg-icon-youtube";
                        $numReal = $theme->getNumRealFrames(false, 'youtube');
                        $theme_type = 'youtube';
                    break;
                    case 'vimeo':
                        $strSource = __('Vimeo','brandX');
                        $preicon ="eg-icon-vimeo";
                        $numReal = $theme->getNumRealFrames(false, 'vimeo');
                        $theme_type = 'vimeo';
                    break;

                }

            }

            $first_graphic_image_thumb = array('url' => '', 'class' => 'mini-transparent', 'style' => '');

            if(intval($numFrames) == 0){
                $first_graphic_id = 'new&theme='.$id;
            }else{
                $frames = $theme->getFirstFrameIdFromGallery();
                if(!empty($frames)){
                    $first_graphic_id = $frames[key($frames)]->getID();
                    $first_graphic_image_thumb = $frames[key($frames)]->get_image_attributes($theme_type);
                }else{
                    $first_graphic_id = 'new&theme='.$id;
                }
            }

       $editLink = self::getViewUrl(StartagAdmin::VIEW_theme,"id=$id");
		   $oldText = "brandIndex";
		   $newText = "index";
  $editLink =str_replace($oldText,$newText,$editLink);

          $editFramesLink = self::getViewUrl(StartagAdmin::VIEW_FRAME,"id=$first_graphic_id");
		  $editFramesLink =str_replace($oldText,$newText,$editFramesLink);

            $showTitle = TheBrandFunctions::getHtmlLink($editLink, $showTitle);

        }catch(Exception $e){
            $errorMessage = "ERROR: ".$e->getMessage();
            $strSource = "";
            $numFrames = "";
            $isFromPosts = false;
        }

        $themeActions = array();
        /*$themeActions['embed'] = '<span class="button-primary br-embed-theme" ><i class="eg-icon-plus"></i>'. __("Embed Theme",'brandX') .'</span>';*/

        if (!BRAND_DEMO) {
           /* $themeActions['export'] = '<a class="button-primary  export_theme_overview" id="export_theme_'. $id .'" href="javascript:void(0);" ><i class="brandicon-export"></i>'. __("Export",'brandX') .'</a>';
*/
            $operations = new TheBrandOperations();
            $general_settings = $operations->getGeneralSettingsValues();
            $show_dev_export = TheBrandBase::getVar($general_settings, 'show_dev_export', 'on');
            if($show_dev_export == 'on'){
              /*  $themeActions['export_html'] = '<a class="button-primary  export_theme_standalone" id="export_theme_standalone_'. $id .'" href="javascript:void(0);" ><i class="brandicon-export"></i>'. __("Export to HTML",'brandX') .'</a>';*/
            }
        }
$newId = base64url_encode($id);
		
		
		$themeActions['chooseTheme'] = '<a class="button-primary " href="account/design_content?themeid='. $newId .'"><i class="icon-pencil"></i>'. __("Easy Edit",'brandX') .'</a>';
		
	
		
		     $themeActions['preview'] = '<a class="button-primary  button_duplicate_theme" id="button_duplicate_'. $id .'" href="javascript:void(0)"><i class="brandicon-picture"></i>'. __("Duplicate",'brandX') .'</a>';
			$themeActions['advanced'] = '<a class="button-primary " href="'.$editFramesLink.'&rand='.rand(125555,125555).'"><i class="icon-pencil"></i>'. __("Advanced",'brandX') .'</a>';
        $themeActions['delete'] = '<a class="button-primary  button_delete_theme" id="button_delete_'. $id .'" href="javascript:void(0)"><i class="brandicon-trash"></i>'. __("Delete",'brandX') .'</a>';
		
		/* $themeActions['duplicate'] = '<a class="button-primary"  href="indexAlone.php?mode=easyedit&themeid='. $newId .'"><i class="brandicon-export"></i>'. __("Use Design",'brandX') .'</a>';*/
   /*     $themeActions['duplicate'] = '<a class="button-primary  button_duplicate_theme" id="button_duplicate_'. $id .'" href="javascript:void(0)"><i class="brandicon-picture"></i>'. __("Duplicate",'brandX') .'</a>';*/
		
		
		
		
		
        /*$themeActions['preview'] = '<div id="button_preview_'. $id .'" class="button_theme_preview button-primary revgray"><i class="brandicon-search-1"></i>'. __("Preview",'brandX') .'</div>';*/
		
		 $idencoded = base64_encode($id);
     $idencoded = strtr($idencoded, '+/=', '-_,');

		/*$themeActions['brandingOptions'] = '<a class="button-primary"  href="indexAlone.php?mode=brand&msg_id='. $idencoded .'"><i class="brandicon-picture"></i>'. __("Branding Options",'brandX') .'</a>';*/
		
		
        $themeActions = apply_filters( 'brandsystem_themes_list_actions', $themeActions, $id );

        $themesHtml['themes'][$id]['theme'] = $theme;
        $themesHtml['themes'][$id]['html'] = '
        <li style="margin-right:15px;margin-top:30px;margin-bottom:30px;width: 200px;" class="tools-frame tools-stype-all tools-stype-'. $theme_type .'" data-favorit="'. ($is_favorite ? 'a' : 'b') .'" data-id="'. $id .'" data-name="'. $title .'" data-type="'. $theme_type .'">
            <div class="tools-main-metas" style="width: 200px;">
                                                                                                                                     
                <span class="tools-firstframeimage '. $first_graphic_image_thumb['class'] .'" style="'. $first_graphic_image_thumb['style'] .';'. (!empty($first_graphic_image_thumb['url']) ? 'background-image:url('.$showPic.')' : '') .';background-position: center; background-repeat: no-repeat;background-image:url('.$showPic.')"></span>
                <a href="easyEdit/edit.php?themeid='. $newId .'" class="tools-grad-bg tools-bg-top"></a>
                 
                <span class="tools-star"><a href="javascript:void(0);" class="brand-toogle-fav" id="reg-toggle-id-'. $id .'"><i class="eg-icon-star'. ($is_favorite ? '' : '-empty') .'"></i></a></span>
               
                <span class="tools-title-wrapper">
                    <span class="tools-id"><span class="tools-alias hidden" >'. $alias .'</span><span id="theme_title_'. $id .'" class="hidden">'. $title.'</span></span>
                    <span class="tools-title">*'. $showTitle . (!empty($errorMessage) ? '<span class="error_message">'. $errorMessage .'</span>' : '') .'
                    </span>
                  <!--  <a class="button-primary tools-settings" href="'. $editLink .'"><i class="brandicon-cog"></i></a>-->
                    
                    <span class="button-primary tools-showmore"  ><i class="eg-icon-down-open" style=" outline:none !important; box-shadow: none !important;"></i></span>
<!--<a class="button-primary tools-showmore" href="'. $editFramesLink .'"><i class="eg-icon-down-open"></i></a>
-->                </span>
            </div>';

        $themesHtml['themes'][$id]['html'] .= apply_filters('brandsystem_themes_list_additional_html', '', $theme);

        $themesHtml['themes'][$id]['html'] .= '<div class="tools-hover-metas">';
        foreach ( $themeActions as $action ) {
            $themesHtml['themes'][$id]['html'] .= $action;
        }
        $themesHtml['themes'][$id]['html'] .= '</div>
            <div class="tools-dimmme"> </div>
        </li>';
    }
}

$themesHtml['buttons']['addnewtheme'] = '
    <li class="tools-frame tools-addnewtheme">
		<a href="'.$addNewLink.'">
			<span class="tools-main-metas">
				<span class="tools-new-icon-wrapper">
					<span class="theme_list_add_buttons add_new_theme_icon"></span>
				</span>
				<span class="tools-title-wrapper">			
					<span class="tools-title">'. __("New Design", "startag") . '</span>					
				</span>
			</span>
		</a>
	</li>';

/*$themesHtml['buttons']['addnewthemetemplate'] = '
    <li class="tools-frame tools-addnewtheme">
		<a href="javascript:void(0);" id="' . (get_option('startag-app-valid', 'false') == 'true' ? 'button_import_template_theme' : 'regsiter-to-access-store-none') . '">
			<span class="tools-main-metas">
				<span class="tools-new-icon-wrapper add_new_template_icon_wrapper">
					<i class="theme_list_add_buttons add_new_template_icon"></i>
				</span>
				<span class="tools-title-wrapper">			
					<span class="tools-title">'. __("Add Theme From Template", "startag") .'</span>					
				</span>
			</span>
		</a>
	</li>';
*/
if(!TheBrandFunctionsWP::isAdminUser() && apply_filters('startag_restrict_role', true)){ }else{
    $themesHtml['buttons']['importtheme'] = '
    <li class="tools-frame tools-addnewtheme">
        <a href="javascript:void(0);" id="button_import_theme">
				<span class="tools-main-metas">
					<span class="tools-new-icon-wrapper">
						<i class="theme_list_add_buttons  add_new_import_icon"></i>
					</span>
					<span class="tools-title-wrapper">			
						<span class="tools-title">'. __("Import Theme", "startag") .'</span>					
					</span>
				</span>
        </a>
    </li>';
}

// update themes / buttons array
$themesHtml = apply_filters('brandsystem_themes_list_update_themes_buttons', $themesHtml);

//prepare original output
$themesHtmlOutput = '<ul class="brand-list_themes">';
foreach ( $themesHtml['themes'] as $theme ) {
    $themesHtmlOutput .= $theme['html'];
}
foreach ( $themesHtml['buttons'] as $button ) {
    $themesHtmlOutput .= $button;
}
$themesHtmlOutput .= '</ul>';
//here you can overwrite themes list
echo apply_filters('brandsystem_themes_list_before_output', $themesHtmlOutput, $themesHtml);

?>
<script>
  jQuery(document).ready(function() {
  	 jQuery('.tools-showmore').click(function() {
  	 	jQuery(this).closest('.tools-frame').find('.tools-hover-metas').show();
  	 	var elements = jQuery('.tools-frame:not(.hovered) .tools-dimmme');
  	 	punchgs.TweenLite.to(elements,0.5,{autoAlpha:0.6,overwrite:"all",ease:punchgs.Power3.easeInOut});
  	 	punchgs.TweenLite.to(jQuery(this).find('.tools-dimmme'),0.3,{autoAlpha:0,overwrite:"all",ease:punchgs.Power3.easeInOut})
  	 });

  	 jQuery('.tools-frame').hover(function() {
  	 	jQuery(this).addClass("hovered");
  	 }, function() {
  	 	var elements = jQuery('.tools-frame .tools-dimmme');
  	 	punchgs.TweenLite.to(elements,0.5,{autoAlpha:0,overwrite:"auto",ease:punchgs.Power3.easeInOut});
  	 	jQuery(this).removeClass("hovered");
  	 	jQuery(this).find('.tools-hover-metas').hide();
  	 });
  });

  jQuery('#filter-themes').on("change",function() {
  	jQuery('.tools-frame').hide();
  	jQuery('.tools-stype-'+jQuery(this).val()).show();
  	jQuery('.tools-addnewtheme').show();
  });

  function sort_li(a, b){
	    return (jQuery(b).data(jQuery('#sort-themes').val())) < (jQuery(a).data(jQuery('#sort-themes').val())) ? 1 : -1;    
	}

  jQuery('#sort-themes').on('change',function() {
  	jQuery(".brand-list_themes li").sort(sort_li).appendTo('.brand-list_themes');
  	jQuery('.tools-addnewtheme').appendTo('.brand-list_themes');
  });

  jQuery('.theme-lg-views').click(function() {
	var tls =jQuery('.brand-list_themes'),
		t = jQuery(this);
	jQuery('.theme-lg-views').removeClass("active");
	jQuery(this).addClass("active");
	tls.removeClass("br-listview");
	tls.removeClass("br-gridview");
	tls.addClass(t.data('type'));
  });

</script>