$imgbg5 = imgbg($_POST[imgbg5]);
   } else {
       $imgbg5 = 'style="background-color:rgb(0, 0, 0);"';
   }
   if ($_POST[imgbg6]) {
       $imgbg6 = imgbg($_POST[imgbg6]);
   } else {
       $imgbg6 = 'style="background-color:rgb(0, 0, 0);"';
   }
   if ($_POST[imgbg7]) {
       $imgbg7 = imgbg($_POST[imgbg7]);
   } else {
       $imgbg7 = 'style="background-color:rgb(0, 0, 0);"';
   }
   if ($_POST[imgbg8]) {
       $imgbg8 = imgbg($_POST[imgbg8]);
   } else {
       $imgbg8 = 'style="background-color:rgb(0, 0, 0);"';
   }
   if (!$roww[theme]) {
       $fontclr = 'color:black;';
       $fontclrs = 'style="color:black;"';
   }
   $popup .= '<div class="swiper-wrapper">
 <div class="swiper-slide" ' . $fontclrs . '>
 <div ' . $imgbg1 . ' id="' . $pj . $ap . 'owlmn' . $pn . 'n1"></div>
 <div ' . $imgbg2 . ' id="' . $pj . $ap . 'owlmn' . $pn . 'n2"></div>  
 </div>
 <div class="swiper-slide" ' . $fontclrs . '>
 <div ' . $imgbg3 . ' id="' . $pj . $ap . 'owlmn' . $pn . 'n3"></div>
 <div ' . $imgbg4 . ' id="' . $pj . $ap . 'owlmn' . $pn . 'n4"></div> 
        $audiopopbg = 'data-theme="a" style="overflow-x:hidden;overflow-y:auto;padding:5px;height: 100%;width: 100%;top:0;left:-15px;"';
    }
    if ($_POST[picpopbg]) {
        if (strlen($_POST[picpopbg]) == 1) {
            $picpopbg = 'data-theme="' . htmlspecialchars($_POST[picpopbg]) . '" style="padding:5px;height: 100%;width: 100%;top:0;left:-15px;"';
        } else {
            $picpopbg = 'data-theme="z" style="overflow-x:hidden;overflow-y:auto;padding:5px;height: 100%;width: 100%;top:0;left:-15px;' . imgbg($_POST[picpopbg]) . '"';
        }
    } else {
        $picpopbg = 'data-theme="a" style="overflow-x:hidden;overflow-y:auto;padding:5px;height: 100%;width: 100%;top:0;left:-15px;"';
    }
    if ($_POST[positionpopbg]) {
        if (strlen($_POST[positionpopbg]) == 1) {
            $positionpopbg = 'data-theme="' . htmlspecialchars($_POST[positionpopbg]) . '" style="padding:5px;height: 100%;width: 100%;top:0;left:-15px;"';
        } else {
            $positionpopbg = 'data-theme="z" style="padding:5px;height: 100%;width: 100%;top:0;left:-15px;' . imgbg($_POST[positionpopbg]) . '"';
        }
    } else {
        $positionpopbg = 'data-theme="a" style="padding:5px;height: 100%;width: 100%;top:0;left:-15px;"';
    }
    $popup .= '<div class="ui-grid-solo" style="position:relative;" id="' . $pj . $ap . 'dwimgs' . $pn . '">
	<div style="float:right;position:absolute;top:5%;right:15%;z-index:2;' . $bghtml . '" data-corners="false" data-type="horizontal" data-role="controlgroup">
	<a href="#' . $pj . $ap . 'dwpop' . $pn . '" id="' . $pj . $ap . 'dwstart' . $pn . '" data-rel="popup"  class="ui-btn ui-btn-' . $bgtheme . ' ui-btn-inline"><i class="pigss-pencil"></i></a>  
	

	<a href="#' . $pj . $ap . 'dwICONpop' . $pn . '" id="' . $pj . $ap . 'dwicon' . $pn . '" data-rel="popup"  class="ui-btn ui-btn-' . $bgtheme . ' ui-btn-inline"><i class="pigss-star"></i></a> 
	<a id="' . $pj . $ap . 'dwundo' . $pn . '" class="ui-btn ui-btn-' . $bgtheme . ' ui-btn-inline"><i class="pigss-refresh"></i></a> 
	<a id="' . $pj . $ap . 'dwdo' . $pn . '" class="ui-btn ui-btn-' . $bgtheme . ' ui-btn-inline" style="color:red"><i class="pigss-refresh"></i></a> 
	<a href="#" id="' . $pj . $ap . 'dwsave' . $pn . '" data-rel="popup" class="ui-btn ui-btn-' . $bgtheme . ' ui-btn-inline"><i class="pigss-pictures"></i></a>';
    if ($_POST[html]) {
        $popup .= '<a href="#' . $pj . $ap . 'dwinfs' . $pn . '" id="' . $pj . $ap . 'dwinf' . $pn . '" data-rel="popup" class="ui-btn ui-btn-' . $bgtheme . ' ui-btn-inline"><i class="pigss-info"></i></a>';