( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ 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/design.php
<?php 
include("../includes/limittext.php");
include('../Connections/videoondemand.php');
require("../DbSql2.inc.php");
require("../NewsSql2.inc.php");
$db = new NewsSQL;
include("../protect.php");

  ?>

   <link rel="stylesheet" href="<?php echo $siteaddress; ?>easyEdit/assets/css/styles.min.css">




	<link rel="stylesheet" type="text/css" href="<?php echo $siteaddress; ?>css/icofont.min.css">

	
	<style> .cancel-button {


            width:100px;
            right:5px;
            height:35px;

            background-color:#00bff3;
            color:#FFF;

            border-radius:40px;
            text-align:center;
            box-shadow: 2px 2px 3px #999;
            z-index: 999999;
            line-height: 35px;

        }
        .apply-button {

            width:100px;
            right:5px;
            height:35px;

            background-color:#00bff3;
            color:#FFF;

            border-radius:40px;
            text-align:center;
            box-shadow: 2px 2px 3px #999;
            z-index: 999999;
            line-height: 35px;

        }.position-bottom {



            margin: 15;
            margin-left: 25px;
            margin-top: 50px;
            margin-right: 25px;
            box-shadow: none;





            bottom: 0;
            width: 99%;

            display:block;

            border: none;

            /*background-color:#b92861;*/

        }
	#dialog-background{
    background: none repeat scroll 0 0 rgba(255, 255,255);
    height: 100%;
    left: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    width: 100%;

    z-index: 999999999;
	display:block;

	/*background-color:#b92861;*/

}
        #dialog-background2{

            height: 100%;
            left: 0;
            margin: 0;
            padding: 0;
            position: absolute;
            top: 0;
            width: 100%;

            z-index: 999999999;
            display:block;

            /*background-color:#b92861;*/

        }
#dialog-loading-wrapper {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border: 0 none;
    height: 116px;
    left: 50%;
    margin-left: -50px;
    margin-top: -50px;
    position: fixed;
    top: 50%;
    width: 116px;
    z-index: 9999999;
	 
}
        #dialog-loading-wrapper2 {

            border: 0 none;
            height: 116px;
            left: 50%;
            margin-left: -50px;
            margin-top: -50px;
            position: fixed;
            top: 50%;
            width: 116px;
            z-index: 9999999;

        }

        #dialog-loading-icon {
          /* background-color: #b92861 !important;*/
          border-radius: 50px;


          background-repeat:no-repeat;
          display: block;
          background-position:center;
          height: 100px;
          line-height:100px;


          margin: 0;
          padding: 0px;
          text-align: center;
          background-color:#00bff3;
          color: #fff;

          width: 100px;
      }
        #dialog-loading-icon2 {
            /* background-color: #b92861 !important;*/
            border-radius: 50px;


            background-repeat:no-repeat;
            display: block;
            background-position:center;
            height: 100px;
            line-height:100px;


            margin: 0;
            padding: 0px;
            text-align: center;
            background-color:#00bff3;
            color: #fff;

            width: 100px;
        }
		
			toolbar {
				background-color: aqua;
				
	
} 
	</style>

<?php
	session_start(); 
 
    $userid=$_SESSION['euserid'];
 
	
	if (empty ($userid) ) 
{
 

		 
	 header("Location: $siteaddress2/m/auth/login"); 
	 
 
 } 
 
if(empty($_GET['themeid']))
{
	 header("Location: $siteaddress2/m/auth/login"); 
   exit();
    
    
}
else
{
$themeid = $_GET['themeid'];
	$themeid = $db->base64url_decode($themeid); 
}	
	
	
	



?>
<?php /*?><script src="//cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.js"></script>
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.css" id="theme-styles">
 
 <script src="//cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.js"></script>  
 
   <script src="//cdn.jsdelivr.net/npm/sweetalert2@10"></script> <?php */?> 


	<style>

      .float2{
	position:fixed;
	width:40px;
	height: 40px;
	 right:55px;

	bottom:165px;

    background-color:#ffffff;
	color:#00bff3;
	border-radius:40px;
	text-align:center;
	box-shadow: 2px 2px 3px #999;
	z-index: 999999;
	line-height: 40px;
}

 .float3{
	position:fixed;
	width:100px;
 	right:5px;
	height:35px;
	top:5px;
	background-color:#00bff3;
	color:#FFF;

	border-radius:40px;
	text-align:center;
	box-shadow: 2px 2px 3px #999;
	z-index: 999999;
	 line-height: 35px;
}

#loadingX{
	position:fixed;
	width:136px;
    padding-left:5px;
 	left:5px;
	height:40px;
	bottom:130px;
	background-color:#ffffff;
	color:#00bff3;

	border-radius:40px;
	text-align:center;
	box-shadow: 2px 2px 3px #999;
	z-index: 999999;
	 line-height: 40px;
     font-size:12px;
     display:none;
}
	</style>

<div id="loadingX">   </div>
	<div id="dialog-background" >
    <div id="dialog-loading-wrapper">
        <div id="dialog-loading-icon" >Loading...
        </div>
    </div>
</div>



<div id="dialog-background2" >
    <div id="dialog-loading-wrapper2">
        <div id="dialog-loading-icon2" >Saving...
        </div>
    </div>
</div>
	
	<a class="float3" id="saveme">Save
<i class="icofont-save my-float" ></i> 
</a>
	
 
<!--<a class="float2" id="addphoto">
<i  class="icofont-image my-float" ></i> 
</a>-->


<style>
    body, html {
        margin: 0;
        width: 100%;
        height: 100%;
    }
</style>
 <brandeditor-editor>
	

</brandeditor-editor>
 
<script src="<?php echo $siteaddress; ?>easyEdit/assets/js/scriptsAdmin.min.js"></script>

<script>

    var spinner = document.querySelector('#dialog-background2');
    spinner.style.display = 'none';
    spinner.style.visibility = 'hidden';


    var brandeditor = new Brandeditor({
        // ENTER CONFIGURATION HERE
        height: "100%",
        showExportPanel: true,
        watermarkText: '',
		crossOrigin: false,
		
        onLoad: function () {

        window.postMessage('brandeditorLoaded', '*');
 brandeditor.loadState('<?php echo $siteaddress; ?>easyEdit/myjson<?php echo $themeid; ?>.json').then(function() {
 
    

    var spinner = document.querySelector('#dialog-background');
	spinner.style.display = 'none';
    spinner.style.visibility = 'hidden';



 
 
    function activityWatcher(){

//The number of seconds that have passed
//since the user was active.
var secondsSinceLastActivity = 0;

//Five minutes. 60 x 5 = 300 seconds.
var maxInactivity = (1);

//Setup the setInterval method to run
//every second. 1000 milliseconds = 1 second.
setInterval(function(){
    secondsSinceLastActivity++;
    //console.log(secondsSinceLastActivity + ' seconds since the user was last active');
    //if the user has been inactive or idle for longer
    //then the seconds specified in maxInactivity
    if(secondsSinceLastActivity > maxInactivity){
        console.log('User has been inactive for more than ' + maxInactivity + ' seconds');

           //start





   //end
        
    }
    else{

  /*
        var stateX = brandeditor.getState();
    brandeditor.http().post('<?php echo $siteaddress; ?>TheBrandX/mode.php?mode=saveDesignNewInterface&themeid=<?php echo $themeid; ?>&nani=<?php echo $userid; ?>', {data: stateX}).subscribe(function(response) {
    
    
        var loading = document.querySelector('#loadingX');
	loading.style.display = 'block';
    loading.style.visibility = 'visible';
	document.getElementById("loadingX").innerHTML='Design saved...';


	setTimeout(function(){ 

		var loading = document.querySelector('#loadingX');
	loading.style.display = 'none';
    loading.style.visibility = 'hidden';
  
}, 3000);
    
    
    });*/
  
  

 
        
    }
}, 3000);
		
		
document.getElementById("saveme").addEventListener("click", myFunction);
function myFunction() {



    var spinner = document.querySelector('#dialog-background2');
    spinner.style.display = 'block';
    spinner.style.visibility = 'visible';


     var stateX = brandeditor.getState();
    brandeditor.http().post('<?php echo $siteaddress; ?>TheBrandX/mode.php?mode=saveDesignNewInterface&themeid=<?php echo $themeid; ?>&nani=<?php echo $userid; ?>', {data: stateX}).subscribe(function(response) {


        var spinner = document.querySelector('#dialog-background2');
        spinner.style.display = 'none';
        spinner.style.visibility = 'hidden';


        var loading = document.querySelector('#loadingX');
	loading.style.display = 'block';
    loading.style.visibility = 'visible';
	document.getElementById("loadingX").innerHTML='Design saved...';


	setTimeout(function(){ 

		var loading = document.querySelector('#loadingX');
	loading.style.display = 'none';
    loading.style.visibility = 'hidden';
  
}, 3000);
   
   
   
   
   
   
    });	
	
	 
	
	
	
}
		
		
		
		
document.getElementById("addphoto").addEventListener("click", myFunction2);
function myFunction2() {

    
	
	
	brandeditor.getTool('import').openUploadDialog().then(function(obj) {
});
	
	 
	
	 
}		
		
		
		
		
		
		
		
		
		
		
		
//The function that will be called whenever a user is active
function activity(){
    //reset the secondsSinceLastActivity variable
    //back to 0
    secondsSinceLastActivity = 0;
}

//An array of DOM events that should be interpreted as
//user activity.
var activityEvents = [
    'mousedown',  'keydown', 'touchstart'
];

//add these events to the document.
//register the activity function as the listener parameter.
activityEvents.forEach(function(eventName) {
    document.addEventListener(eventName, activity, true);
});


}

activityWatcher();
 
 
 
 
 
 
 
 
 
 
 
 });


			
			
				
       	
			
			





 



        },
        // onSave: function(data) {
        //      var stateX = brandeditor.getState();
             
       
		// 	 brandeditor.http().post('http://localhost/thebrand/TheBrandX/mode.php?mode=saveDesignNewInterface&nani=152&themeid=<?php echo $themeid; ?>&userid=<?php echo $userid; ?>', {data: stateX}).subscribe(function(response) {
              
               
        //     });  },
		
		
						
 

		ui: {
        defaultTheme: 'white',
		
		mode: 'inline',
	    openImageDialog: false,
        compact: true,

            colorPresets: {
                replaceDefault: false,
                items: [
                    'rgb(0,0,0)',
                    'rgb(255, 255, 255)',
                    'rgb(242, 38, 19)',
                    'rgb(249, 105, 14)',
                    'rgb(253, 227, 167)',
                    'rgb(4, 147, 114)',
                    'rgb(30, 139, 195)',
                    'rgb(142, 68, 173)',
                ],
            },

		/* openImageDialog: { show: true, sampleImages: [  ] } ,*/
		
		toolbar: {
      replaceDefaultLeftItems: true,
      replaceDefaultCenterItems: true,
      replaceDefaultRightItems: true,
      leftItems: [
          { type: "button", icon: "photo-library", text: "Add", action: "openOverlayImage",  showInCompactMode: !0, },
          { type: "button", icon: "history", text: "Undo", action: "toggleHistory",  showInCompactMode: !0, },],



        centerItems: [{ type: "zoomWidget", showInCompactMode: !0, }, { type: "button", icon: "layers", action: "toggleObjects" , showInCompactMode: !0},],


     

 rightItems: [
	
     {
                                    type: "button",
                                    icon: "file-download",
                                    text: "Download",
                                    action: "exportImage",
                                    showInCompactMode: !0,
                                    
                                },


     {
         type: "button",
         icon: "check",
         text: "Save",
         showInCompactMode: !0,
         dropdownItems: [
             { action: "exportImage", label: "Save" },
             { action: "exportImage", label: "Download" },


         ],
     },
                           
                            ],
    },
    },



    });
 
				

</script>
<?php /*?>

“pixie.openEditorWithImage(‘https://image.png')"


 brandeditor.getTool('text').add('my text', {fontStyle: 'Times New Roman'});
Instead of having two instances of pixie on the page, you should use “pixie.resetEditor({image: ‘new-image.jpg’})” to load new image.


onMainImageLoaded: function(file) {pixie.getTool(‘shapes’).addSticker(‘placeholders’, 0); var activeObject = pixie.get(‘activeObject’);var x=parseInt(mainImage.width-1000)/2; var y=parseInt(mainImage.height-1000)/2; setTimeout(function(){activeObject.setValues({ opacity: 1, width: 1000, height:1000, scaleX:1, scaleY:1, left:x, top:y, lockUniScaling: false, hasRotatingPoint: false, name:’placeholder’ })},1000);<?php */?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<!--<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102496375-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-102496375-1');
</script>-->