<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap" rel="stylesheet">
  
<?php 
 

define('dap_member_dir', plugin_dir_path(__FILE__));
define('dap_member_path', plugin_dir_url(__FILE__));
define('dap_member_current_date_time', date("Y-m-d H:i:s"));

echo DapMemberShowLoader();
  
//customize template variable  
$prod_per_row = 'col-sm-4';
$dm_wid = 700;
$dm_wid_outer = 900;
$dm_bdr_style = 'solid';
$dm_temp_align = 'none';
$dm_bdr_wid = 2;
$dm_bdr_color = "#17a2b8";
$dm_border_color_top = "#03A9F4";
$dm_padd_top = 20;  
$dm_padd_bottom = 15;  
$dm_av_padd_top = 15;  
$dm_box_padd_bottom = 60;  
$dm_background = '#ffffff';
$available_background = '#2e2e2d';
$upcoming_background = '#ebebeb';
$clicktostart = '#18cba3';
$modulebg = '#d9edf7';
$product_name_bg = '#028da2';
$box_wid = '300';

// customize img variable 
$show_img = 'yes';  
$dm_img_type = "img_slider" ;
$dm_img_res = "25" ;
$dm_img_wid = 200;  
$dm_img_wid1 = 150;  
$dm_img_height = 230;  
 

// Display variable  
$show_prod_name = 'true';  
$show_prod_desc = 'true';  
$show_access_start_date = 'true';  
$show_access_end_date = 'true';  
$show_av_content = 'true';  
$show_up_content = 'true';  
 
// customize button variable  
$dm_btn_wid = 150;
$dm_btn_height = 8;
$dm_backgroud_color  = '#17a2b8';
$dm_border_style = 'dashed';
$dm_border_wid = 0;
$dm_border_color = '#17a2b8';
$dm_border_rad = 5;

// box shadow
$sprd_radius ='0';
$blur_radius ='0';
$ver_lnth ='0';
$hor_lnth ='0';
$shad_clr ='#f1f1f1';

//other
$template ="template1";
$template_selected_name ="inpage";
$temp_type ="singlecol";
$udpate_mode_style = "style='display:none'";
$empty_product_image = plugin_dir_url(__FILE__).'../frontend/assets/images/dummy.jpg';  
$update_mode_onecolumn_style_display = 'style="display:flex"' ;
$update_mode_multicolumn_style_display = 'style="display:none"' ;
$template_customized_html ="";
$table_heading_html ='<div class="table_heading">This content will open up in the popup in frontend</div>';

//name-value table
$notallproduct_checked =" checked ";
$allproduct_checked ="";
$productid ="ALL";
$hideproductid ="NONE";
$firsttab ="active";
$secondtab ="";
if(isset($_GET['id']) and is_numeric($_GET['id'])){
	
	$id = $_GET['id'];
	$firsttab ="";
	$secondtab ="active";

	$mp_obj = DAP_MemberPages::loadById($_GET['id']);
	if($mp_obj){
		
		$gettemp =  $mp_obj->getTemplate();
		$gettemp = explode("||",$gettemp);
		$template_selected_name =  $gettemp[0];
		$template =  $gettemp[1];
		$temp_type =  $gettemp[2];
		if( $temp_type == "multicol"){
			$update_mode_multicolumn_style_display = 'style="display:flex"' ;
			$update_mode_onecolumn_style_display = 'style="display:none"' ;
		}else{
			$update_mode_multicolumn_style_display = 'style="display:none"' ;
			$update_mode_onecolumn_style_display = 'style="display:flex"' ;
		}
		 
		$template_html =  $mp_obj->getTemplateHtml();
 
		$csspath = dap_member_path."includes/templates/mycontent/".$temp_type. "/".$template_selected_name. "/template1.css";		 
		$imgpath = dap_member_path."includes/images/mycontentimg.jpg";		 
		$contentavailableimg = dap_member_path."includes/templates/mycontent/singlecol/postmetadata/contentavailableimg.jpg";		 
		$upcomingimg = dap_member_path."includes/templates/mycontent/singlecol/postmetadata/upcomingimg.jpg";		 
 
		$template_html = explode("|:|",$template_html);			 			
		
		if( $temp_type == "multicol" && $template_selected_name == "popup"){
			$av_data = '<div class="multicol_table_outer" >'.$template_html[5].'</div>';
			$temp_html = '<div class="dap_multicol_outer" >'.$template_html[0].'</div>';
			$template_customized_html = $temp_html.$table_heading_html.$av_data;
		}else{
			$temp_html = '<div class="dap_multicol_outer" >'.$template_html[0].'</div>';
			$template_customized_html = $temp_html;
		}
		$template_customized_html  = str_replace( '%%TEMPLATECSS%%', $csspath, $template_customized_html);
		$template_customized_html  = str_replace( '%%IMAGESPATH%%', $imgpath, $template_customized_html);
 
		$template_customized_html  = str_replace( '%%CONTENTIMG%%', $contentavailableimg, $template_customized_html);
		$template_customized_html  = str_replace( '%%UPCOMINGIMG%%', $upcomingimg, $template_customized_html);
		
		
		$styling_options = $mp_obj->getStylingOptions();
		$styling_options = explode("|||",$styling_options);
		
		//customize template variable  
		if(isset($styling_options[0])){			
			$dm_content_temp = explode("||",$styling_options[0]);			
			$dm_wid =  $dm_content_temp[0];
			$dm_bdr_style =  $dm_content_temp[1];
			$dm_bdr_wid =  $dm_content_temp[2];
			$dm_bdr_color =  $dm_content_temp[3];
			$dm_padd_top =  $dm_content_temp[4];
			$dm_padd_bottom =  $dm_content_temp[5];
			$dm_av_padd_top =  $dm_content_temp[6];
			$dm_box_padd_bottom =  $dm_content_temp[7];
			$dm_background =  $dm_content_temp[8];
			$available_background =  $dm_content_temp[9];
			$upcoming_background =  $dm_content_temp[10];
			$clicktostart =  $dm_content_temp[11];			
			$product_name_bg =  $dm_content_temp[12];			
			$prod_per_row =  $dm_content_temp[13];			
			$dm_wid_outer =  $dm_content_temp[14];			
			$dm_temp_align =  $dm_content_temp[15];			
			$box_wid=  $dm_content_temp[16];	
			
			if($dm_bdr_wid =="" || $dm_bdr_wid =="NaN"){
				$dm_bdr_wid = 2;
			}	
		}
	
		 //customize  img variable 
		if(isset($styling_options[1])){			
			$dm_content_temp_img = explode("||",$styling_options[1]);			
			$show_img =  $dm_content_temp_img[0];
			$dm_img_type =  $dm_content_temp_img[1];
			$dm_img_res =  $dm_content_temp_img[2];
			$dm_img_wid =  $dm_content_temp_img[3];
			$dm_img_height =  $dm_content_temp_img[4];
			$dm_img_wid1 =  $dm_content_temp_img[5]; 
		}
		
		// customize display
		if(isset($styling_options[2])){
			$dm_content_temp_btn = explode("||",$styling_options[2]);		
			$show_prod_name =  $dm_content_temp_btn[0];
			$show_prod_desc =  $dm_content_temp_btn[1];
			$show_access_start_date =  $dm_content_temp_btn[2];
			$show_access_end_date =  $dm_content_temp_btn[3];
			$show_av_content =  $dm_content_temp_btn[4];
			$show_up_content =  $dm_content_temp_btn[5];			 
		}

		// customize button variable 
		if(isset($styling_options[3])){
			$dm_content_temp_btn = explode("||",$styling_options[3]);		
			$dm_btn_wid =  $dm_content_temp_btn[0];
			$dm_btn_height =  $dm_content_temp_btn[1];
			$dm_backgroud_color =  $dm_content_temp_btn[2];
			$dm_border_style =  $dm_content_temp_btn[3];
			$dm_border_wid =  $dm_content_temp_btn[4];
			$dm_border_color =  $dm_content_temp_btn[5];
			$dm_border_rad =  $dm_content_temp_btn[6];	
			
			if($dm_bdr_wid =="" || $dm_bdr_wid =="NaN"){
				$dm_bdr_wid = 2;	
			}	
			if($dm_border_wid =="" || $dm_border_wid =="NaN"){
				$dm_border_wid = 0;	
			}	
			if($dm_border_rad =="" || $dm_border_rad =="NaN"){
				$dm_border_rad = 0;	
			}	
			
		}
		
		// shadow_effect
		if(isset($styling_options[4])){
			$content_temp_shd = explode("||",$styling_options[4]);
		
			$sprd_radius = $content_temp_shd[0];
			$blur_radius = $content_temp_shd[1];
			$ver_lnth = $content_temp_shd[2];
			$hor_lnth = $content_temp_shd[3];
			$shad_clr = $content_temp_shd[4];	
			
		 
		} 
		         		
		$action_id = $mp_obj->getId();
		$mpv_obj = DAP_MemberPagesValues::loadByActionId($action_id);
		if($mpv_obj){
			$showunavailableproducts = DAP_MemberPagesValues::loadByActionIdAndName($action_id,'showunavailableproducts');
			if($showunavailableproducts){
					$showunavailableproducts = $showunavailableproducts->getValue();
					if($showunavailableproducts == "Y"){
						$notallproduct_checked =" ";
						$allproduct_checked =" checked ";
					}else{
						$notallproduct_checked =" checked ";
						$allproduct_checked ="";
					}
			}  
			
			$productid_obj = DAP_MemberPagesValues::loadByActionIdAndName($action_id,'productid');
			if($productid_obj){
				$productid = $productid_obj->getValue();
				$productid = explode(",", $productid);					 
			}  
			
			$hideproductid_obj = DAP_MemberPagesValues::loadByActionIdAndName($action_id,'hideproductid');
			if($hideproductid_obj){
				$hideproductid = $hideproductid_obj->getValue();
				$hideproductid = explode(",", $hideproductid);					 
			} 
			
			if($temp_type =="contentlinks"){ 
				$select_prod_obj = DAP_MemberPagesValues::loadByActionIdAndName($action_id, 'select_prod');			 
				if(isset($select_prod_obj)){	
					$select_prod	= $select_prod_obj->getValue();			 	 				 
				}   
			}
		} 
	}
	
}
 

?>
 
 <div class="css_container">
 <link href="<?php echo $csspath; ?>" rel="stylesheet">
 </div>
<div id="dap_member_page_wrapper">
	
	<div class="dap_member_setting_outer common_outer">
		<ul class="nav nav-tabs custom_tabbar" id="dap_member_login_tabs" role="tablist"> 
		  <li class="nav-item   ">
			<a class="nav-link <?php echo $firsttab; ?>" id="dap_member_general_tab"  href="#dap_member_general" data-toggle="tab" role="tab" aria-selected="true"><span>1</span> <span class="fa_tick"><i class="fa fa-check"></i></span> General</a>
		  </li>
		  <li class="nav-item ">
			<a class="nav-link <?php echo $secondtab; ?>" id="dap_member_customize_tab"  href="#dap_member_customize" data-toggle="tab" role="tab" aria-selected="false"><span>2</span> <span class="fa_tick"><i class="fa fa-check"></i></span> Customize</a>
		  </li>
		  <li class="nav-item "> 
			<a class="nav-link"  id="dap_member_preview_link" href="#dap_member_preview" data-toggle="tab" role="tab" aria-selected="false"><span>3</span> <span class="fa_tick"><i class="fa fa-check"></i></span> Preview</a>
		  </li>
		  <li class="nav-item ">
			<a class="nav-link"   id="dap_member_details_tab"  href="#dap_member_details" data-toggle="tab" role="tab" aria-selected="false"><span>4</span> <span class="fa_tick"><i class="fa fa-check"></i></span> Shortcode Details</a>
		  </li>
		</ul>
		
	<div class="tab-content dap_member_content">
			
	<input type="hidden" value="<?php if(isset($id) && $id !="") { echo $id;} else{ echo "0";} ?>" name="edit_id" id="edit_id"/>
	<input type="hidden" value="<?php if(isset($id) && $id !="") { echo $template_selected_name;}else{ echo $template_selected_name;}?>" 
	name="template_selected_name" id="template_selected_name"/>
	<input type="hidden" value="<?php if(isset($id) && $id !="") { echo $template;} ?>" name="sel_template" id="sel_template"/>
	<input type="hidden" value="<?php if(isset($id) && $id !="") { echo $temp_type;}else{ echo $temp_type;}?>" name="temp_type" id="temp_type"/>
	
			<div class="tab-pane <?php echo $firsttab; ?>" id="dap_member_general" role="tabpanel" aria-labelledby="template-tab">
				<div class="master_heading d-flex align-items-center border-bottom-0">
					<h4><i class="fa fa-credit-card mr-2"></i> My Content</h4>
				</div>
				
				<div class="enter_name_outer">
					<h3 class="section_heading"><i class="fa fa-credit-card mr-1"></i> Enter a Name</h3>
					<div class="form-group row mb-4">
					  <div class="col-sm-9">
						  
						  <div class="inner_section" id="member_login_outer">
							  <div class="form-group row mb-4 form_group_inner">  
								  <div class="col-sm-3 d-flex align-items-center">
									<label> Create a New MyContent Page </label>
								  </div>
								  <div class="col-sm-6">
									  <div class="input-group mb-2">
										<div class="input-group-prepend">
										  <div class="input-group-text"><?php echo site_url();?></div>
										</div>
										<input type="text" placeholder="Enter Name" id="pagename" class="form-control page_name" name="pagename" 
										value="<?php if(isset($mp_obj)) { $page_id = $mp_obj->getPageId(); echo get_the_title($page_id); } ?>" <?php if($mp_obj){ echo 'readonly';}?>>
										<input type="hidden"  id="page_id" class="form-control" name="page_id" value="<?php if(isset($mp_obj)) { echo $mp_obj->getPageId(); } ?>">
									  </div>
								  </div>
								  <div class="col-sm-2 pl-0 text-right">
									<button type="button" class="btn btn-success create_page_btn theme-btn" id="create_page_button" <?php if($mp_obj){ echo 'disabled';}?> >Click to Create</button>
								 </div>
								  <div class="col-sm-3 "> </div>
								 <div class="col-sm-6 error-msgs text-center messages-div">
									<h5 class="alert alert-danger error_create_login_page error_msg" style="display:none">Sorry, This Name is already taken. Please Try with another one. </h5>
									<h5 class="alert alert-success success_create_login_page success_msg" style="display:none"> Page created successfully.</h5>
								</div>
							  </div>
							  
							  <div class="form-group row mb-4" >  
								  <div class="col-sm-3"></div>
								  <div class="col-sm-6">
										<div class="or">
										  <span>OR</span>
										</div>
								  </div>
							  </div>
							  
							  <div class="form-group row mb-0 form_group_inner">  
								  <div class="col-sm-3 d-flex align-items-center">
									<label> Select an existing page </label>
								  </div>
							  
								  <div class="col-sm-6">
									  <select class="form-control" id="page_url" name="page_url" <?php if($mp_obj){ echo 'disabled=disabled';}?>>
										<option value="">Select a URL</option>
										<?php
										$page_ids = get_all_page_ids_data();
										foreach($page_ids as $page){
										$page_name = get_page( $page );
										if ($page_name->post_status == 'publish'){
											
											if(isset($mp_obj) && ($mp_obj->getPageId() == $page)){
												$selected = 'selected=selected';
											}
										?>
										<option value='<?php echo $page; ?>' <?php if(isset($mp_obj) && ($mp_obj->getPageId() == $page)){
												echo $selected;
											}?> >
										<?php echo get_permalink($page); ?>
										</option>
										<?php }

										}//close foreach loop ?>
									</select>
								  </div>
							  </div>
						  </div>
						  <div class="page_response"></div>
					 </div>
					 
					</div>
				</div>
					
				<div class="enter_name_outer" id="member_content_outer_container">
					<h3 class="section_heading"><i class="fa fa-credit-card mr-1"></i> Content Display Settings</h3>
					<div class="form-group row mb-0">
						<div class="col-sm-12">
						  <div class="inner_section" id="member_login_outer">
							  <div class="form-group row mb-4 form_group_inner"> 
								<div class="col-sm-4 d-flex align-items-center">
									<label> Display not-yet-available products to the logged-in member? </label>
								</div>
							    <div class="col-sm-7 pr-0">
									<span class="input-outer d-inline-block mt-2"> 
										<input type="radio"  class="showunavailableproduct"  id="showUnavailableProduct1" name="showunavailableproducts"  value="N" 
										<?php echo $notallproduct_checked; ?>>
										Only Display  Products that the logged-in member owns.
									</span>
									 <br>
									<span class="input-outer"> <input type="radio"  class="showunavailableproduct" id="showUnavailableProduct2"  name="showunavailableproducts"  value="Y"
									 <?php echo $allproduct_checked; ?> >
									 Display All Products (even the products that the member does not own currently).
									</span>
									  
									
								</div>
							</div>
							 
							<div class="form-group row mb-4 form_group_inner"> 
								<div class="col-sm-4 d-flex align-items-center">
									<label> Select products that you want to include on the my content page </label>
								</div>
							    <div class="col-sm-5">
								   <select style="height: 179px;"  id="productid"  name="productid[]" multiple="multiple" class="product_ids form-control">
									  <option value="ALL" selected>ALL</option>
										 <?php
											$productList = Dap_Product::loadProducts("","A");
											foreach ($productList as $prod) {    ?>
											<option value="<?php echo $prod->getId(); ?>" 
											<?php if(isset($mp_obj)) {  if (in_array($prod->getId(), 
												$productid)){ echo " selected=selected ";	} }	?> >
											 <?php echo $prod->getName(); ?></option>
									  <?php } ?>
								    </select>
							    </div>
							    <div class="col-sm-2" style="padding:0">
									<div class="tool-tip sort_div">
										<i class="fa fa-refresh sortProduct" aria-hidden="true"></i>
										<div class="toll-tip-desc sortProduct"> Sort By ID </div>
									</div>
									<br/>
									<div class="tool-tip sort_div">
										<i class="fa fa-refresh sortProductName" aria-hidden="true"></i>
										<div class="toll-tip-desc sortProductName"> Sort By name </div>
									</div>
									 <input type="hidden" value="desc" id="sortProduct_val"  name="sortProduct_val"/> 
								</div>
							</div>
							
							<div class="form-group row mb-0"> 
								<div class="col-sm-4 d-flex align-items-center">
									<label> Hide these products 
									<div class="tool-tip">
							<i class="fa fa-info-circle" aria-hidden="true"></i>
							<div class="toll-tip-desc">  These products will not be displayed on my content page even the users has access to these products.
							   </div>
							</div></label>
								</div>
							    <div class="col-sm-5">
								   <select style="height: 179px;"  id="hideproductid"   name="hideproductid[]" multiple="multiple" class="product_ids form-control">
									  <option value="NONE" selected>NONE</option>
										 <?php
										   
										   $productList = Dap_Product::loadProducts("","A");
											foreach ($productList as $prod) {                                             
										?>
											<option value="<?php echo $prod->getId(); ?>" <?php 
											if(isset($mp_obj)) { if (in_array($prod->getId(), $hideproductid)){ echo " selected=selected ";	} } 	?>  ><?php echo $prod->getName(); ?></option>
									  <?php } ?>
								   </select>
							    </div>
							    <div class="col-sm-2" style="padding:0">
									<div class="tool-tip sort_div">
										<i class="fa fa-refresh sortProduct1" aria-hidden="true"></i>
										<div class="toll-tip-desc sortProduct1"> Sort By ID </div>
									</div><br/>
									<div class="tool-tip sort_div">
										<i class="fa fa-refresh sortProductName1" aria-hidden="true"></i>
										<div class="toll-tip-desc sortProductName1"> Sort By Name </div>
									</div>
									 <input type="hidden" value="desc" id="sortProduct1_val"  name="sortProduct1_val"/> 
								</div>
							</div>
						</div>
					  </div>
					</div>
				</div>
				
				<div class="enter_name_outer" id="member_login_outer_container1">
					<h3 class="section_heading"><i class="fa fa-credit-card mr-1"></i> Select Template</h3>
					<div class="form-group row mb-0">
						<div class="col-sm-12">
						  <div class="inner_section" id="member_login_outer">
							  <div class="form-group row mb-4 form_group_inner"> 
								<div class="col-sm-2 d-flex align-items-center">
									<label> Select Template Type </label>
								</div>
							    <div class="col-sm-4" style="padding: 0 0 0 45px;">
								   <select class="form-control" name="selecttemplate" id="selecttemplate" >
									  <option value="singlecol" <?php if($temp_type == "singlecol"){echo "selected=selected"; }?>>Display 1 product per row</option>
									  <option value="multicol" <?php if( $temp_type == "multicol"){ echo "selected=selected"; }?>>Display multiple products per row</option>
									  <option value="payperpost" <?php if( $temp_type == "payperpost"){ echo "selected=selected"; }?>>Display Pay-Per-Post Content</option>
									  <option value="productlist" <?php if( $temp_type == "productlist"){echo "selected=selected"; }?>>Display Product List (no links, no image)</option>
									  <option value="contentlinks" <?php if( $temp_type == "contentlinks"){echo "selected=selected";}?>>Display Content Links (no image)</option>
								  </select>
							    </div>
							</div>
							  
							
							  
							  <div class="form-group row mb-0 form_group_inner sel_template_outer" id="singlecol_id" style="display:<?php if($temp_type == "singlecol"){echo "block";} else{ echo "none";} ?>"> 
									<div class="col-sm-12 mb-4">
										<label> Select a Template</label>
									</div>
									<div class="col-sm-12">
									 
										<ul class="choices-template row">
										   <li class="onecolumn_template singlecol_inpage" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/onecol_inpage.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'singlecol')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if(isset($mp_obj) && ($temp_type== "singlecol") && $template_selected_name == "inpage" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'singlecol')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','inpage', 'singlecol')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
												 Display Available / Upcoming Content In-Page
											 </span>
										</li>
										
										 <li class="onecolumn_template singlecol_redirect" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/onecol_redirect.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','redirect', 'singlecol')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) && ($temp_type == "singlecol") && $template_selected_name == "redirect" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','redirect', 'singlecol')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','redirect', 'singlecol')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
												 Redirect to a Product Specific Page
												  <small>(The redirect URL needs to be in DAP products page >> advanced tab >> Redirect URL field)</small>
											 </span>
										</li>
										
										 
										 
										 
										 <li class="onecolumn_template singlecol_coursestyle" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/template1_coursestyle.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','coursestyle', 'singlecol')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) &&  ($temp_type == "singlecol") && $template_selected_name == "coursestyle" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','coursestyle', 'singlecol')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','coursestyle', 'singlecol')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
												 Course-Style
											 </span>
										</li>
											 <li class="onecolumn_template singlecol_post" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/onecol_postmeta.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','postmetadata', 'singlecol')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) &&  ($temp_type == "singlecol") && $template_selected_name == "postmetadata" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','postmetadata', 'singlecol')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','postmetadata', 'singlecol')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
												 Content Thumbnail
												  <small>(Enter the image and other details in the <a href="<?php echo admin_url('admin.php?page=dap_postmeta_settings') ?>" target="_blank">Content Thumbnail page</a>.)</small>
											 </span>
										</li>					
										
									 </ul>
									 
									 </div>
									 
									 
									</div>
							
							
							 <div class="form-group row mb-0 form_group_inner sel_template_outer" id="multicol_id" style="display:<?php  if($temp_type == "multicol"){echo "block";} else{ echo "none";} ?>"> 
									<div class="col-sm-12 mb-4">
										<label> Select a Template</label>
									</div>
									<div class="col-sm-12 ">
									 
										<ul class="choices-template row">
										   <li class="onecolumn_template multicol_popup" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/multi_popup.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','popup', 'multicol')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) &&  ($temp_type == "multicol") && $template_selected_name == "popup" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','popup', 'multicol')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','popup', 'multicol')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
												Display Available / Upcoming Content in a Popup
											 </span>
										</li>
																			 
										<li class="onecolumn_template multicol_redirect" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/multicol_redirect.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','redirect', 'multicol')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) &&  ($temp_type == "multicol") && $template_selected_name == "redirect" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','redirect', 'multicol')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','redirect', 'multicol')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
												 Redirect to a Product Specific Page
												  <small>(The redirect URL needs to be in DAP products page >> advanced tab >> Redirect URL field)</small>
											 </span>
										</li>								
										
									 </ul>
									 
									 </div>
									 
									 
									</div>
							
							  
								
							 <div class="form-group row mb-0 form_group_inner sel_template_outer" id="productlist_id" style="display:<?php  if($temp_type == "productlist"){echo "block";} else{ echo "none";} ?>"> 
									<div class="col-sm-12 mb-4">
										<label> Select a Template</label>
									</div>
									<div class="col-sm-12">
									 
										<ul class="choices-template row">
										   <li class="onecolumn_template productlist_inpage" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/product-details.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'productlist')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) &&  ($temp_type == "productlist") && $template_selected_name == "inpage" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'productlist')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','inpage', 'productlist')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
											Display only products (no links no image)
											 </span>
										</li>
																			 
										 								
										
									 </ul>
									 
									 </div>
									 
									 
									</div>
							
							 <div class="form-group row mb-0 form_group_inner sel_template_outer" id="payperpost_id" style="display:<?php  if($temp_type == "payperpost"){echo "block";} else{ echo "none";} ?>"> 
									<div class="col-sm-12 mb-4">
										<label> Select a Template</label>
									</div>
									<div class="col-sm-12">
									 
										<ul class="choices-template row">
										   <li class="onecolumn_template payperpost_inpage" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/ppp_purchased_list.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'payperpost')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) &&  ($temp_type == "payperpost") && $template_selected_name == "inpage" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'payperpost')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','inpage', 'payperpost')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
											Display Pay-Per-Post Content
											 </span>
										</li>
																			 
										 								
										
									 </ul>
									 
									 </div>
									 
									 
									</div>
							
							
								
								
							 <div class="form-group row mb-0 form_group_inner sel_template_outer" id="contentlinks_id" style="display:<?php  if($temp_type == "contentlinks"){echo "block";} else{ echo "none";} ?>"> 
								<div class="col-sm-12">	
										<div class="form-group row mb-4 form_group_inner"> 
											<div class="col-sm-2 d-flex align-items-center">
												<label> Select a Product </label>
											</div>
											<div class="col-sm-4" style="padding: 0 0 0 45px;">
											   <select class="form-control" name="select_prod" id="select_prod" >
												  <option value="0" >Select a Product</option>
													 <?php
														$productList = Dap_Product::loadProducts("","A");
														foreach ($productList as $prod) {    ?>
														<option value="<?php echo $prod->getId(); ?>" <?php if(isset($mp_obj)) {  if ($prod->getId() == $select_prod){ echo " selected=selected ";	} }	?> >
														 <?php echo $prod->getName(); ?></option>
												  <?php } ?>
											  </select>
											</div>
										</div>
									</div>
							  
							
									<div class="col-sm-12 mb-4">
										<label> Select a Template</label>
									</div>
									<div class="col-sm-12">
									 
										<ul class="choices-template row">
										   <li class="onecolumn_template contentlinks_inpage" >
											<label>
												<div class="template_preview_img">
													
													
													<img src="<?php echo $img_url_template1 = plugin_dir_url(__FILE__)."includes/images/product-links.jpg"; ?>" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'contentlinks')" class="select_temp" height="250" width="250">
												</div>
												
												<div class="active-box-div">
													<div class="true-icon">
														<i class="fa fa-check">
														</i>
													</div>
												</div>
												<div class="pre-box-div <?php if( isset($mp_obj) &&  ($temp_type == "contentlinks") && $template_selected_name == "inpage" && $template == "template1"){
									 echo "activecls";
								} ?> ">
													<div class="pre-icon">
															<input type="button" class="preview_temp btn btn-success" onclick="dap_member_mycontent_preview_temp('template1','inpage', 'contentlinks')" value="Preview">
															<input type="button" class="preview_temp btn btn-warning" onclick="dap_member_mycontent_customize_temp('template1','inpage', 'contentlinks')" value="Customize">
													</div>
												</div>
												
											</label>
											<span class="input-outer"> 
											Display only products (no links no image)
											 </span>
										</li>
																			 
										 								
										
									 </ul>
									 
									 </div>
									 
									 
									</div>
							
							
							
							
									
								</div>
								
								
							  </div>
						   </div>
							  <div class="row">
								<div class="col-md-12 tab_bottom_button">
									<a class="btn btn-success mb-2 theme-btn" href="<?php echo admin_url('admin.php?page=dap_member_pages') ?>">Return To Member Pages</a> 
									<?php if( isset($mp_obj)){ ?> <button type="button"  id="save_data" class="btn btn-success theme-btn">Save</button> <?php } ?>
									<button type="button" class="btn btn-success theme-btn" onclick="validation_mycontent_firsttab('#dap_member_customize');">Next <img src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/next-arrow.png" alt=""></button>	
								</div>    
							</div>
					    </div>
			</div>
			
			
			<!-----2nd tab------->
			<div class="tab-pane <?php echo $secondtab; ?>" id="dap_member_customize" role="tabpanel" aria-labelledby="preview-tab">
				
				<div class="master_heading d-flex align-items-center border-bottom-0" style=" display: none !important;">
					<h4><i class="fa fa-credit-card mr-2"></i> Customize Template</h4>
				</div>
				
				<div class="enter_name_outer">
				  <div class="row">
					   <div class="col-sm-12 mb-2">
						   <h3 class="mb-2 section_heading"><i class="fa fa-credit-card mr-1"></i> Customize Template <div class="tool-tip">
							<i class="fa fa-info-circle" aria-hidden="true"></i>
							<div class="toll-tip-desc">* Product Name:- Will be replaced by Product Name in DAP. <br/> 
							* Product Description:- Will be replaced by Product Description in DAP. <br/> 
							   </div>
							</div></h3>
							<p class="text-capitalize text-center small_text my-4"> Click on the text below to set the text color, style, etc.</p>
						  
						  <div class="row">
							<div class="col-sm-3 left_customizer">
							  <div class="customized-optional image_customizer" >
								<div class="customizer_heading">Image Customizer</div>
									<ul class="templates-styles">
									  <li class="show_img_outer" >
											<label>Show Product Image </label>
											<div class="input-group ">
													<select class="input-group form-control" id="show_img" name="show_img">
													 <option  value="yes" <?php if($show_img == 'yes'){ echo "selected=selected";}?> >Yes</option>
													<option   value="no" <?php if($show_img == 'no'){ echo "selected=selected";}?> >No</option> 
												</select>
											</div>
										</li>
										<li style="display:none !important">
											<label>Select customizer Type  </label>
											<div class="input-group colorpicker-component">
											<select class="input-group form-control" id="dm_img_type" name="dm_img_type"  >
												<option value="img_res" <?php if($dm_img_type == "img_res"){ echo "selected"; }?> >Image Resolution  </option>
												<option value="img_slider" <?php if($dm_img_type == "img_slider"){ echo "selected";}?> >Image Slider  </option>
												</select>
											</div>
										</li>
										
										<li class="img_slider_part img_size_outer" style="">
											<label>Image Size </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_img_wid"  name="dm_img_wid" class="form-control" data-slider-id='ex1Slider6' type="text" data-slider-min="100" data-slider-max="500" data-slider-step="1" data-slider-value="<?php echo $dm_img_wid; ?>" /> 
												</div>
											</div>
										</li>  
										
										<li class="img_slider_part1 img_size_outer1" style="display:none">
											<label>Image Size </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_img_wid1"  name="dm_img_wid1" class="form-control" data-slider-id='ex1Slider7' type="text" data-slider-min="50" data-slider-max="200" data-slider-step="1" data-slider-value="<?php echo $dm_img_wid1; ?>" /> 
												</div>
											</div>
										</li>  
									<li class="img_slider_part" style="display:none !important">
											<label>Image Height  </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_img_height"  name="dm_img_height" class="form-control" data-slider-id='ex1Slider10' type="text" data-slider-min="100" data-slider-max="500" data-slider-step="1" data-slider-value="<?php echo $dm_img_height; ?>" /> 
												</div>
											</div>
										</li>
									 										 
										<li class="img_res_part"  style="display:none !important">
											<label>Image Resolution  </label>
											<div class="input-group colorpicker-component">
												<select class="input-group form-control" id="dm_img_res" name="dm_img_res" >
													<?php 
													
													
													$dm_img_array = array(
													'1'=>'150*150',
													'2'=>'200*200',
													'3'=>'250*250',
													'4'=>'300*300',
													'5'=>'350*350',
													'6'=>'400*400',
													'7'=>'200*150',
													'8'=>'250*200',
													'9'=>'300*250',
													'10'=>'350*300',
													'11'=>'400*350',
													'12'=>'200*100',
													'13'=>'250*150',
													'14'=>'300*250',
													'15'=>'350*300',
													'16'=>'400*300',
													'17'=>'250*100',
													'18'=>'300*150',
													'19'=>'350*200',
													'20'=>'400*250',
													'21'=>'450*300',
													'22'=>'500*350',													
													'23'=>'300*100',													
													'24'=>'350*150',													
													'25'=>'400*200',													
													'26'=>'450*250',													
													'27'=>'500*300',													
													); 
													
													foreach($dm_img_array as $key=>$value){
														 $slected = '';
														if($key == $dm_img_res ){
															
															$slected = 'selected=selected';
														}
														echo "<option value='".$key."' $slected >$value</option>";
													}
													?>
												
												</select>
											</div>
										</li>
									</ul>
								</div>
								<div class="customized-optional display_options">
								 <div class="customizer_heading">Display Options </div>
									<ul class="templates-styles">
										<li class="show_display_options_cls">
											<label>Show Product Name</label>
											<div class="input-group ">											
												 <input type="checkbox" <?= isset($show_prod_name) &&  $show_prod_name == 'true' ? 'checked' : '' ?> id="show_prod_name" value="" data-toggle="toggle">
											</div>
										</li>
										<li class="show_display_options_cls show_prod_desc_cls">
											<label>Show Product Description</label>
											<div class="input-group ">											
												 <input type="checkbox" <?= isset($show_prod_desc) && $show_prod_desc == 'true' ? 'checked' : '' ?> id="show_prod_desc" value="" data-toggle="toggle">
											</div>
										</li>
										<li class="show_display_options_cls show_access_start_date_outer">
											<label>Show Access Start Date</label>
											<div class="input-group ">											
												 <input type="checkbox" <?= isset($show_access_start_date) && $show_access_start_date == 'true' ? 'checked' : '' ?> id="show_access_start_date" value="" data-toggle="toggle">
											</div>
										</li >
										<li class="show_display_options_cls show_access_end_date_outer">
											<label>Show Access End Date</label>
											<div class="input-group ">											
												 <input type="checkbox" <?= isset($show_access_end_date) && $show_access_end_date == 'true' ? 'checked' : '' ?> id="show_access_end_date" value="" data-toggle="toggle">
											</div>
										</li>
										<li class="show_display_options_cls show_av_content_cls">
											<label>Show Available Content</label>
											<div class="input-group ">											
												 <input type="checkbox" <?= isset($show_av_content) && $show_av_content == 'true' ? 'checked' : '' ?> id="show_av_content" value="" data-toggle="toggle">
											</div>
										</li>
										<li class="show_display_options_cls show_up_content_cls">
												<label>Show Upcoming Content</label>
											<div class="input-group ">											
												 <input type="checkbox" <?= isset($show_up_content) && $show_up_content == 'true' ? 'checked' : '' ?> id="show_up_content" value="" data-toggle="toggle">
											</div>
										</li>
									</ul>
								</div>
								
									
								<div class="customized-optional shadow_customizer">
								 <div class="customizer_heading">External Shadow Customizer</div>
									<ul class="templates-styles">
									 <li>
										<label>Spread Radius </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="sprd_radius"  name="sprd_radius" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $sprd_radius; ?>" /> 
												</div>
											</div>
										</li>
										<li>
											<label>Blur Radius </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="blur_radius"  name="blur_radius" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $blur_radius; ?>" /> 
												</div>
											</div>
										</li>
										<li>
											<label>Horizontal Length </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="hor_lnth"  name="hor_lnth" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $hor_lnth; ?>" /> 
												</div>
											</div>
										</li>
										<li>
											<label>Vertical Length </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="ver_lnth"  name="ver_lnth" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $ver_lnth; ?>" /> 
												</div>
											</div>
										</li>
										<li>
											<label>Shadow Color  </label>
											<div class="input-group ">
												 <div id="shad_clr_div" class="input-group colorpicker-component">
												  <input type="text" value="<?php echo $shad_clr;?>" name="shad_clr" id="shad_clr" class="form-control temp_style_fields" />
												  <span class="input-group-addon" style="background-color:<?php echo $shad_clr;?>">
													  <i></i>
												   </span>
											  </div>
											  
												 
											</div>
										</li>
									</ul>
								</div>
							
							</div>
							
							<div class="col-sm-6 template_center mt-4">
								<div class="cs_customize_template_outer_div" id="dap_customize_template"> 
									<?php if(isset($mp_obj)){echo $template_customized_html ; }?>
								</div>
								
								 
							</div>
							<div class="col-sm-3 right_customizer">
								<div class="customized-optional template_style">
								<div class="customizer_heading">Template Style </div>
									<ul class="templates-styles">
										<li class=" temp_width_outer_onecol customized_optional_single_column m_top_bottom" <?php echo $update_mode_onecolumn_style_display;?>>
											<label>Template Width</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component">
													<input id="dm_wid" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="200" data-slider-max="1200" data-slider-step="1" data-slider-value="<?php echo $dm_wid;?>" name="dm_wid"/> 
												</div>
											</div>
										</li>
										
										<li class="customized_optional_multi_column" <?php echo $update_mode_multicolumn_style_display;?>>
											<label>Product per row</label>
											<div class="input-group ">
												<select class="input-group form-control" id="prod_per_row" name="prod_per_row">
													 <option value="col-sm-12" <?php if($prod_per_row == 'col-sm-12'){ echo "selected=selected";}?>  >1</option>
													<option value="col-sm-6"<?php if($prod_per_row == 'col-sm-6'){ echo "selected=selected";}?> >2</option>
													<option value="col-sm-4" <?php if($prod_per_row == 'col-sm-4'){ echo "selected=selected";}?>  >3</option>
													<option value="col-sm-3"<?php if($prod_per_row == 'col-sm-3'){ echo "selected=selected";}?>  >4</option>
													<option value="col-sm-25" <?php if($prod_per_row == 'col-sm-25'){ echo "selected=selected";}?>  >5</option>
													<option value="col-sm-2" <?php if($prod_per_row == 'col-sm-2'){ echo "selected=selected";}?>  >6</option>
												</select>
											</div>
										</li>
										 <li class="customized_optional_single_column m_top_bottom"  >
											<label>Template Alignment</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component">
													<select class="input-group form-control" id="dm_temp_align" name="dm_temp_align">
													 <option value="none" <?php if($dm_temp_align == 'none'){ echo "selected=selected";}?>  >Center</option>
													<option value="left"<?php if($dm_temp_align == 'left'){ echo "selected=selected";}?> >Left</option>
													<option value="right" <?php if($dm_temp_align == 'right'){ echo "selected=selected";}?>  >right</option> 
												</select>
												</div>
											</div>
										</li>
										<li>
											<label>Border Style  </label>
											<div class="input-group ">
												<select class="input-group form-control" id="dm_bdr_style" name="dm_bdr_style">
													<?php 
													
													$dm_bdr_style_array = array('none'=>'None','solid'=>'Solid','dashed'=>'Dashed','dotted'=>'Dotted');
													
													foreach($dm_bdr_style_array as $key=>$value){
														 $slected = '';
														if($key == $dm_bdr_style ){
															
															$slected = 'selected=selected';
														}
														echo "<option value='".$key."' $slected >$value</option>";
													}
													?>
												
												</select>
											</div>
										</li>
										<li>
											<label>Border Width</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_bdr_wid"  name="dm_bdr_wid" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="50" data-slider-step="1" data-slider-value="<?php echo $dm_bdr_wid; ?>" /> 
												</div>
											</div>
										</li>
										<li style="display:none">
											<label>Border Radius</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_br_radius"  name="dm_br_radius" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_br_radius; ?>" /> 
												</div>
											</div>
										</li>
										
										<li>
											<label>Border Color </label>
											<div class="input-group ">
											  <div id="dm_bdr_color_div" class="input-group colorpicker-component"> 
											  <input type="text" value="<?php echo $dm_bdr_color;?>" name="dm_bdr_color" id="dm_bdr_color" class="form-control" />
											  <span class="input-group-addon">
												  <i style="background-color:#9b9b9b"></i>
											   </span>
											  </div>
											</div>
											
										</li>
										<li class="metadata_temp" style="display:none">
											<label>Border Top Color </label>
											<div class="input-group ">
											  <div id="dm_border_color_top_div" class="input-group colorpicker-component"> 
											  <input type="text" value="<?php echo $dm_border_color_top;?>" name="dm_border_color_top" id="dm_border_color_top" class="form-control" />
											  <span class="input-group-addon">
												  <i style="background-color:#03A9F4"></i>
											   </span>
											  </div>
											</div>
											
										</li>
										<li  class="dm_padd_top_cls metadata_temp_hide">
											<label>Padding Top </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_padd_top"  name="dm_padd_top" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" 
													data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_padd_top; ?>" /> 
												</div>
											</div>
										</li>
										<li  class="dm_padd_bottom_cls metadata_temp_hide">
											<label>Padding Bottom </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_padd_bottom"  name="dm_padd_bottom" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_padd_bottom; ?>" /> 
												</div>
											</div>
										</li>
										<li class="dm_av_padd_top_cls">
											<label>Padding Above Available Content </label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_av_padd_top"  name="dm_av_padd_top" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" 
													data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_av_padd_top; ?>" /> 
												</div>
											</div>
										</li>
										<li class="dm_box_padd_bottom_cls metadata_temp_hide">
											<label>Padding Between Boxes</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component m_top_bottom">
													<input id="dm_box_padd_bottom"  name="dm_box_padd_bottom" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" 
													data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_box_padd_bottom; ?>" /> 
												</div>
											</div>
										</li>
										 												
										  
									</ul>
								</div>
								
								<div class="customized-optional bg_color_customizer">
								  <div class="customizer_heading">Background Color Customizer </div>
									<ul class="templates-styles">
									 
										<li class="dm_background_cls">
											<label>Box</label>
											<div class="input-group ">
											  <div id="dm_background_div" class="input-group colorpicker-component">
											  <input type="text" value="<?php echo $dm_background;?>" name="dm_background" id="dm_background" class="form-control temp_style_fields" />
											  <span class="input-group-addon">
												  <i></i>
											   </span>
											  </div>
											</div>
										</li>
									 
										<li class="available_background_cls">
											<label>Available Content </label>
											<div class="input-group ">
											  <div id="available_background_div" class="input-group colorpicker-component">
											  <input type="text" value="<?php echo $available_background;?>" name="available_background" id="available_background" class="form-control temp_style_fields" />
											  <span class="input-group-addon">
												  <i></i>
											   </span>
											  </div>
											</div>
										</li>
										
										<li class="upcoming_background_cls">
											<label>Upcoming Content </label>
											<div class="input-group ">
											  <div id="upcoming_background_div" class="input-group colorpicker-component">
											  <input type="text" value="<?php echo $upcoming_background;?>" name="upcoming_background" id="upcoming_background" class="form-control temp_style_fields" />
											  <span class="input-group-addon">
												  <i></i>
											   </span>
											  </div>
											</div>
										</li>
										<li class="product_name_bg_cls" style="display:none">
											<label>Heading</label>
											<div class="input-group ">
											  <div id="product_name_bg_div" class="input-group colorpicker-component">
											  <input type="text" value="<?php echo $product_name_bg;?>" name="product_name_bg" id="product_name_bg" class="form-control temp_style_fields" />
											  <span class="input-group-addon">
												  <i></i>
											   </span>
											  </div>
											</div>
										</li>
										<li class="clicktostart_cls metadata_temp_hide">
											<label>Click to Start </label>
											<div class="input-group ">
											  <div id="clicktostart_div" class="input-group colorpicker-component">
											  <input type="text" value="<?php echo $clicktostart;?>" name="clicktostart" id="clicktostart" class="form-control temp_style_fields" />
											  <span class="input-group-addon">
												  <i></i>
											   </span>
											  </div>
											</div>
										</li>
										<li class="modulebg_cls metadata_temp " style="display:none">
											<label>Module Background Color</label>
											<div class="input-group ">
											  <div id="modulebg_div" class="input-group colorpicker-component">
											  <input type="text" value="<?php echo $modulebg;?>" name="modulebg" id="modulebg" class="form-control temp_style_fields" />
											  <span class="input-group-addon">
												  <i></i>
											   </span>
											  </div>
											</div>
										</li>
										
									</ul>
								</div>
								 <div class="customized-optional button_style">
								  <div class="customizer_heading">Button Style </div>
									<ul class="templates-styles">
										 
										
										<li>
											<label>Button Width</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component">
													<input id="dm_btn_wid" name="dm_btn_wid" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="100" data-slider-max="500" data-slider-step="1" data-slider-value="<?php echo $dm_btn_wid;?>" /> 
												</div>
											</div>
										</li>
										<li>
											<label>Button Height</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component">
													<input id="dm_btn_height" name="dm_btn_height" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="5" data-slider-max="100" data-slider-step="1"
													 data-slider-value="<?php echo $dm_btn_height;?>" /> 
												</div>
											</div>
										</li>
										<li>
											<label>Background Color </label>
											<div class="input-group ">
											  <div id="dm_backgroud_color_div" class="input-group colorpicker-component">
											  <input type="text" value="<?php echo $dm_backgroud_color;?>" id="dm_backgroud_color" name ="dm_backgroud_color" class="form-control temp_style_fields" /> 
											  <span class="input-group-addon">
												  <i style="background-color:#64a2f7"></i>
											   </span>
											  </div>
											</div>
										</li>
										<li>
											<label>Button Border Style </label>
											<div class="input-group ">
												<select class="input-group form-control" id="dm_border_style" name="dm_border_style">
												<?php 
												$dm_border_style_array = array('none'=>'None','solid'=>'Solid','dashed'=>'Dashed','dotted'=>'Dotted');

												foreach($dm_border_style_array as $key=>$value){
												$slected = '';
												if($key == $dm_border_style ){

												$slected = 'selected=selected';
												}
												echo "<option value='".$key."' $slected >$value</option>";
												}
												?>
													
													
												</select>
											</div>
										</li>
										<li>
											<label>Button Border Width</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component">
													<input id="dm_border_wid" name="dm_border_wid" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="20" data-slider-step="1" data-slider-value="<?php echo $dm_border_wid;?>" /> 
													
												</div>
											</div>
										</li>
										
										<li>
											<label>Border Color </label>
											<div class="input-group ">
											  <div id="dm_border_color_div" class="input-group colorpicker-component">
											  <input type="text"  name="dm_border_color" value="<?php echo $dm_border_color;?>" id="dm_border_color" class="form-control" /> 
											  <span class="input-group-addon">
												  <i style="background-color:#ccc"></i>
											   </span>
											  </div>
											</div>
										</li>
										<li>
											<label>Border Radius</label>
											<div class="input-group ">
												<div class="input-group colorpicker-component">
													<input id="dm_border_rad" name="dm_border_rad" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="200" data-slider-step="1" data-slider-value="<?php echo $dm_border_rad; ?>" /> 
													
												</div>
											</div>
										</li>
									</ul>			
								</div>
								
						</div>
						  </div>
					   </div>
					   
				   
						<div class="col-sm-12">
							<div class="list_box">
								 <p>* Please Note:- This is the dummy data, it will be replaced in the frontend.</p>
								 <p>* In the live mode, this image will be replaced by the image you configure in DAP Products page >> Basic Details tab >> Product Image URL Field.</p>
								<p>* Please use size 285*235 for the product images  </p>
								 
							</div>
						</div>
				     </div> 
				     
				     <div class="row">
						<div class="col-md-12 tab_bottom_button">
							<button type="button" class="btn btn-success theme-btn" onclick="dap_member_goto_next_tab('#dap_member_general');" ><img src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/prev-arrow.png" alt=""> Previous </button>
							<?php if(isset($mp_obj)) { ?>
								 <button type="button" class="btn btn-success theme-btn" id="save_data" >Save</button>
								<button type="button" class="btn btn-success theme-btn" onclick="dap_member_goto_next_tab('#dap_member_preview');">Next <img src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/next-arrow.png" alt=""></button>	
							<?php }else{ ?>
									<button type="button" class="btn btn-success theme-btn" onclick="save_mycontent_data('#dap_member_preview');"  >Save & Next</button>
							<?php } ?>
						</div>    
					</div>
				</div><!-- close Outer class -->
			</div>
			
			<div class="tab-pane " id="dap_member_preview" role="tabpanel" aria-labelledby="preview-tab">
				<div class="enter_name_outer">
					<div class="row">
						<div class="col-sm-12">
							<h3 class="section_heading"><i class="fa fa-eye mr-1"></i> Preview</h3>
						</div>
						
						<div class="col-sm-3 mt-3">
							<ul class="templates-styles">
								<li class="border-bottom-0" id="box_width_outer" style="display:none">
									<label>Box Width</label>
									<div class="input-group ">
										<div class="input-group colorpicker-component">
											<input id="box_wid" name="box_wid" class="form-control" data-slider-id='box_width_slider' type="text" data-slider-min="200" data-slider-max="500" data-slider-step="1" data-slider-value="<?php echo $box_wid;?>" /> 
										</div>
									</div>
								</li>
								<li class="temp_width_outer_mulcol customized_optional_mutli_column m_top_bottom" <?php echo $update_mode_multicolumn_style_display;?>>
									<label>Outer Template Width</label>
									<div class="input-group ">
										<div class="input-group colorpicker-component">
											<input id="dm_wid_outer" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="200" data-slider-max="1600" data-slider-step="1" data-slider-value="<?php echo $dm_wid_outer;?>" name="dm_wid_outer"/> 
										</div>
									</div>
								</li>
							</ul>
						</div>
					</div>
					<div class="row dap_member_preview_outer" style="max-width:100%">
						
					</div>
					 <div class="row">
						<div class="col-md-12 tab_bottom_button">
							<button type="button" class="btn btn-success theme-btn" onclick="dap_member_goto_next_tab('#dap_member_customize');" ><img src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/prev-arrow.png" alt=""> Previous </button>
							<?php if(isset($mp_obj)) { ?> <button type="button" class="btn btn-success theme-btn"  id="save_data">Save</button><?php } ?>	
							 <button type="button" class="btn btn-success theme-btn" onclick="dap_member_goto_next_tab('#dap_member_details');">Next <img src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/next-arrow.png" alt=""></button>	
							 
						</div>    
					</div>
				</div>
			</div>
			
			<div class="tab-pane " id="dap_member_details" role="tabpanel" aria-labelledby="details-tab">
				
				
				<div class="row">
					<div class="col-sm-7">
						<?php if( $temp_type == "payperpost"){ ?>
						<div class="modalchk_des alert-secondary mycontent_shrt"><span class="check_heading">Here is your Pay-Per-Post Content List URL: </span>
							<a href="<?php if(isset($mp_obj) && ($mp_obj->getPageId() != "")){ echo get_permalink($mp_obj->getPageId());  } ?> " target="_blank">
								<?php if(isset($mp_obj) && ($mp_obj->getPageId() != "")){ echo get_permalink($mp_obj->getPageId());  } ?> </a>
						<br>
							<div class="shortcode_display1"><span class="check_heading">Here is your Pay-Per-Post Content List shortcode: </span><br>
						 
							 <span id="shortcode_display" class="d-inline" name="shortcode_display">[DAPPayPerPostContent id=<?php if(isset($mp_obj) && ($mp_obj->getId() != "")){
												echo $mp_obj->getId();
											}?>][/DAPPayPerPostContent]</span>
							<?php  }else{ ?> 				
								
								
								<div class="modalchk_des alert-secondary mycontent_shrt"><span class="check_heading">Here's your MyContent page URL:</span>
							<a href="<?php if(isset($mp_obj) && ($mp_obj->getPageId() != "")){ echo get_permalink($mp_obj->getPageId());  } ?> " target="_blank">
								<?php if(isset($mp_obj) && ($mp_obj->getPageId() != "")){ echo get_permalink($mp_obj->getPageId());  } ?> </a>
						<br>
							<div class="shortcode_display1"><span class="check_heading">Here's your MyContent page Shortcode:</span><br>
						 
							 <span id="shortcode_display" class="d-inline" name="shortcode_display">[DAPMemberContent id=<?php if(isset($mp_obj) && ($mp_obj->getId() != "")){
												echo $mp_obj->getId();
											}?>][/DAPMemberContent]</span>
								
								
							<?php  } ?> 				
											
							 <button data-id="shortcode_display" id="copy_shortcode" class="theme-button btn btn-warning" onclick="dap_member_copy_to_clipboard(this)"> Copy</button></div>
                        </div>
					</div>
				</div>
				 <div class="row">
					<div class="col-md-12 tab_bottom_button pt-5">
						<button type="button" class="btn btn-success theme-btn"  onclick="dap_member_goto_next_tab('#dap_member_preview');" ><img src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/prev-arrow.png" alt=""> Previous </button>
						<button type="button" class="btn btn-success theme-btn"  id="save_data">Save</button>
						<a class="btn btn-success theme-btn" href="<?php echo admin_url('admin.php?page=dap_member_pages') ?>">Return To Member Pages</a>     
					</div>    
				</div>
			</div>
		</div>		
	</div>
 

<button type="button" class="btn btn-info btn-lg" id="openpreview" data-toggle="modal" data-target="#dap_member_login_preview_wrapper_modal" style="display:none"></button>

<!-- perview tempate popup start -->
<div class="modal fade " id="dap_member_login_preview_wrapper_modal" style="z-index:99999;">
	 
	<div class="modal-dialog modal-dialog-centered modal-lg">
	    <div class="modal-content ">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close" style= " position: absolute; top: 0;right: 0; padding: 12px; margin: 0;">
				<i class="fa fa-close"></i></button>
				<h4 class="modal-title w-100" style="float:left; font-weight: 600; color: #333; line-height: 1;"> Preview	</h4>
			</div>
			<div class="modal-body">
			</div>
	    </div>
	</div>
 </div>
<!-- perview tempate popup end --> 







