<?php

// customize button variable  
// buybutton
$dm_btn_wid = 105;
$dm_btn_height = 10;
$dm_backgroud_color  = '#17a2b8';
$dm_border_style = 'none';
$dm_border_wid = 0;
$dm_border_color = '#17a2b8';
$dm_border_rad = 5;
$dm_font_size = 15;
$dm_font_weight = 600;
$dm_font_family = 1;

// rent button
$dm_btn_wid1 = 105;
$dm_btn_height1 = 10;
$dm_backgroud_color1  = '#3d5b9a';
$dm_border_style1 = 'none';
$dm_border_wid1 = 0;
$dm_border_color1 = '#3d5b9a';
$dm_border_rad1 = 5;
$dm_font_size1 = 15;
$dm_font_weight1 = 600;
$dm_font_family1 = 1;

// Membership button
$dm_btn_wid2 = 137;
$dm_btn_height2 = 10;
$dm_backgroud_color2  = '#6bad1f';
$dm_border_style2 = 'none';
$dm_border_wid2 = 0;
$dm_border_color2 = '#6bad1f';
$dm_border_rad2  = 5;
$dm_font_size2 = 15;
$dm_font_weight2 = 600;
$dm_font_family2 = 1;

// margin between buttons
$dm_margin_between_btn = 10;
// buttons alignment
$dm_buttom_alignment = 'left';


$button_type ="buynow";
$button_type1="rent";
$button_type2 ="membership";
$buybutton_data = DAP_PayPerPostCustomizer::loadByType($button_type);
$rentbutton_data = DAP_PayPerPostCustomizer::loadByType($button_type1);
$membershipbutton_data = DAP_PayPerPostCustomizer::loadByType($button_type2);



if(isset($buybutton_data)){
	// buybutton 
	$buybutton_html = $buybutton_data->getButtonHtml();
	$buybutton_customizerval = $buybutton_data->getButtonCustomizer();
	$buybutton_customizer =	explode("||", $buybutton_customizerval);		
	$dm_btn_wid = $buybutton_customizer[0];
	$dm_btn_height = $buybutton_customizer[1];
	$dm_backgroud_color  = $buybutton_customizer[2];
	$dm_border_style = $buybutton_customizer[3];
	$dm_border_wid = $buybutton_customizer[4];
	$dm_border_color = $buybutton_customizer[5];
	$dm_border_rad = $buybutton_customizer[6];
	$dm_font_size = $buybutton_customizer[7];
	$dm_font_weight = $buybutton_customizer[8];
	$dm_font_family = $buybutton_customizer[9];
	
	// margin between buttons
	$dm_margin_between_btn = $buybutton_customizer[10];
	// buttons alignment
	$dm_buttom_alignment = $buybutton_customizer[11];
	
}
if(isset($rentbutton_data)){
	// rentbutton 
	$rentbutton_html = $rentbutton_data->getButtonHtml();
	$rentbutton_customizerval = $rentbutton_data->getButtonCustomizer();
	$rentbutton_customizer =	explode("||", $rentbutton_customizerval);		
	$dm_btn_wid1 = $rentbutton_customizer[0];
	$dm_btn_height1 = $rentbutton_customizer[1];
	$dm_backgroud_color1  = $rentbutton_customizer[2];
	$dm_border_style1 = $rentbutton_customizer[3];
	$dm_border_wid1 = $rentbutton_customizer[4];
	$dm_border_color1 = $rentbutton_customizer[5];
	$dm_border_rad1 = $rentbutton_customizer[6];
	$dm_font_size1 = $rentbutton_customizer[7];
	$dm_font_weight1 = $rentbutton_customizer[8];
	$dm_font_family1 = $rentbutton_customizer[9];
}
if(isset($membershipbutton_data)){
	// membershipbutton 
	$membershipbutton_html = $membershipbutton_data->getButtonHtml();
	$membershipbutton_customizerval = $membershipbutton_data->getButtonCustomizer();
	$membershipbutton_customizer =	explode("||", $membershipbutton_customizerval);		
	$dm_btn_wid2 = $membershipbutton_customizer[0];
	$dm_btn_height2 = $membershipbutton_customizer[1];
	$dm_backgroud_color2  = $membershipbutton_customizer[2];
	$dm_border_style2 = $membershipbutton_customizer[3];
	$dm_border_wid2 = $membershipbutton_customizer[4];
	$dm_border_color2 = $membershipbutton_customizer[5];
	$dm_border_rad2 = $membershipbutton_customizer[6];
	$dm_font_size2 = $membershipbutton_customizer[7];
	$dm_font_weight2 = $membershipbutton_customizer[8];
	$dm_font_family2 = $membershipbutton_customizer[9];
}

?>


<link href="//fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&family=Roboto:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
<link href="//fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap" rel="stylesheet">

<div id="dap_pay_per_post" style="display:block;" class="popup_div_outer">
	<div id="Pay-Per-Post--tabs">
		<ul class="nav nav-tabs">
			<li><a data-toggle="tab" href="#manage-pp-post" class="active show">Manage Pay-Per-Post</a></li>
			<li><a data-toggle="tab" href="#pp-bulk-access">Copy Pay-Per-Post Settings</a></li>
			<li><a data-toggle="tab" href="#pp-button-customizer">Button Customizer</a></li>
			<li><a data-toggle="tab" href="#pp-msg-translation">Message Translation</a></li>
		</ul>

		<div class="tab-content">
			<div id="manage-pp-post" class="tab-pane fade in active show">
				<div class="live-links-outer pp-post-inner">
					<h3 class="pp--post-title"><i class="fa fa-cogs" aria-hidden="true"></i> Manage Pay-Per-Post</h3>
					<a href="<?php echo admin_url('post-new.php?post_type=page');?>" class="btn table-add-btn">Add New</a>
					<table class="table table-hover" id="dap_manage_pay_per_post_table" style="display:none">
						<thead>
							<tr>
								<th class="text-center">Post ID</th>
								<th>URL</th>
								<th class="text-center">STATUS</th>
								<th>OPTIONS</th>
								<th>LANDING PAGE</th>
								<th>Action</th>
								
							</tr>
						</thead>
						<tbody>
							<?php 
							$body_html = '';
							$allpayperpostObj = Dap_PayPerPost::loadAll();
							if(isset($allpayperpostObj)){
								foreach($allpayperpostObj as $payperpostObj){
									
									
									$post_id    = $payperpostObj->getPostId();
									if('publish' !== get_post_status( $post_id )){
										continue;
									}
									$payment_methods_names = array();
									$dapwp_post_meta_buynow_obj = Dap_PayPerPostMeta::loadPayPerPostMetaByPostIdAndButtonType($post_id, 'buynow');
									$dapwp_post_meta_rent_obj = Dap_PayPerPostMeta::loadPayPerPostMetaByPostIdAndButtonType($post_id, 'rent');
									$dapwp_post_meta_membership_obj = Dap_PayPerPostMeta::loadPayPerPostMetaByPostIdAndButtonType($post_id, 'membership');
									$post_enable = $payperpostObj->getEnablePayPerPost();
									$landing_url = $payperpostObj->getLandingURL();
									$date = $payperpostObj->getDate();
									
									$post_url   = get_permalink($post_id);
									if($landing_url == ''){
										$landing_url = $post_url;
									}
									
									
									if($dapwp_post_meta_buynow_obj){
										$payment_methods_names[] = 'Buy Now';
									}
									if($dapwp_post_meta_rent_obj){
										$payment_methods_names[] = 'Rent';
									}
									if($dapwp_post_meta_membership_obj){
										$payment_methods_names[] = 'Membership';
									}
									$payment_methods_names = implode(', ',$payment_methods_names);
									$edit_page_link = get_edit_post_link($post_id);  
									
									
									$post_enable_checked = ''; 
									if($post_enable == 'Y'){
										$post_enable_checked =	"checked='checked'";
									}
									$body_html .= "<tr class='dapwp_post_tr_".$post_id."'>";
									$body_html .= "<td class='text-center'>".$post_id."</td>";
									
									
									
									$body_html .= "<td ><a href='".$post_url."'>".$post_url."</a></td>";
									$body_html .= '<td class="text-center">';
									$body_html .= '<div class="switch_onoff">';
									$body_html .= '<input class="checkbox dapwp_post_status_checkbox_'.$post_id.'" '.$post_enable_checked.' type="checkbox" id="dapwp_post_status_checkbox_'.$post_id.'" name="dapwp_post_status_checkbox_'.$post_id.'" value="cpass" onclick="dapwp_update_post_status('.$post_id.')">';
									$body_html .= '<label for="dapwp_post_status_checkbox_'.$post_id.'"></label>';
									$body_html .= '</td>';
									$body_html .= '<td>'.$payment_methods_names.'</td>'; 
									$body_html .= '<td><a href="'.$landing_url.'">'.$landing_url.'</a></td>';
									$body_html .= '<td align="center"><a class="btn btn-info btn-sm" title="Edit Post" href="'.$edit_page_link.'"><i class="fa fa-pencil"></i></a> <a class="btn btn-danger btn-sm delete_dapwp_pay_per_post" data-post-id="'.$post_id.'" href="javascript:void(0)" title="Delete" onclick=delete_dapwp_pay_per_post('.$post_id.')><i class="fa fa-trash"></i></a></td>';
									
									$body_html .= "</tr>";
								}
							}
							echo $body_html;
						?>
						</tbody>
						</tbody>
					</table>
				</div>
			</div>
			<div id="pp-bulk-access" class="tab-pane fade">
				<?php include_once('DAP-Copy-PPPSettings.php');?>
			</div>
			<div id="pp-msg-translation" class="tab-pane fade">
				<?php 
				include_once('DAP-PayPerPost-Messages.php');?>
			</div>
			
			
			
			<div id="pp-button-customizer" class="tab-pane fade">
				<div class="dap-outer live-links-outer pp-post-inner" id="dap_shortcode_popup_inner">
					<h3 class="pp--post-title"><i class="fa fa-cog" aria-hidden="true"></i> Pay-Per-Post Button Customizer</h3>
					<div class="container dap-outer-div" id="dap_shortcode_popup_button_inn">
						<div class="button--Customizer-outer" style="">
							<!--buynow-->						
							<div class="button--Customizer-options">
								<div class="button--Customizer-inner">
									<h5>Buy Now Customizer</h5>
									<div class="button_container buybutton_outer">					
										<?php
											if(isset($buybutton_data )){
												echo $buybutton_html;
											} else{
										?>
										<div class="btn_container" id="buybutton" style="background: #268bbf;color: #fff; text-align: center;padding: 10px; border-radius: 5px; border: 0px; font-size: 15px; line-height: normal; font-weight: 600;  font-family: sans-serif; max-width: 100%; float: left; width: 105px;">Buy Now</div>
										<?php 
											}
										?>
									</div>
									
									<div class="customized-optional button_style">
										<ul class="templates-styles">
											<li>
												<label>Button Width</label>
												<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>
											</li>
											<li>
												<label>Button Height</label>
												<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>
											</li>
											<li>
												<label>Background Color </label>
												<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>
											</li>
											<li>
											<label>Button Border Style </label>
												<div class="input-group ">
													<select class="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 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>
											</li>
											<li>
												<label>Border Color </label>
												<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>
											</li>
											<li>
												<label>Border Radius</label>
												<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>
											</li>
											<li>
												<label>Font Size</label>
												<div class="input-group colorpicker-component">
													<input id="dm_font_size" name="dm_font_size" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="10" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_font_size; ?>" /> 
												</div>
											</li>
											<li>
												<label>Font Weight</label>
												<div class="input-group ">
													<select class="form-control" id="dm_font_weight" name="dm_font_weight">
														<?php 
														$dm_font_weight_array = array('300'=>'Lighter','400'=>'Normal','600'=>'Bold','700'=>'Bolder');
														foreach($dm_font_weight_array as $key=>$value){
														$slected = '';
														if($key == $dm_font_weight ){
														$slected = 'selected=selected';
														}
														echo "<option value='".$key."' $slected >$value</option>";
														}
														?>
													</select>
												</div>
											</li>
											<li>
												<label>Font Family</label>
												<div class="input-group ">
													<select class="form-control" id="dm_font_family" name="dm_font_family">
														<?php 
														$dm_font_family_array = array('1'=>"'Roboto', sans-serif",'2'=>"'Open Sans', sans-serif",'3'=>"'Poppins', sans-serif",'4'=>"'Oswald', sans-serif");

														foreach($dm_font_family_array as $key=>$value){
														$slected = '';
														if($key == $dm_font_family ){

														$slected = 'selected=selected';
														}
														echo "<option value='".$key."' $slected >$value</option>";
														}
														?>
													</select>
												</div>
											</li>
										</ul>
									</div>
								</div>
							</div>
						
							<!--Rent-->	
							<div class="button--Customizer-options" style="">
								<div class="button--Customizer-inner">
									<h5>Rent Customizer</h5>
									<div class="button_container rentbutton_outer">								
										<?php
											if(isset($rentbutton_data )){
												echo $rentbutton_html;
											} else{
										?>
											<div class="btn_container" id="rentbutton" style="background: #3d5b9a;color: #fff; text-align: center;padding: 10px; border-radius: 5px; border: 0px; font-size: 15px; line-height: normal; font-weight: 600; font-family: sans-serif; max-width: 100%; float: left; width: 105px;">Rent</div>
										<?php 
											}
										?>								
									</div>
									<div class="customized-optional button_style">								 
										<ul class="templates-styles">
											<li>
												<label>Button Width</label>
												<div class="input-group colorpicker-component">
													<input id="dm_btn_wid1" name="dm_btn_wid1" 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_wid1;?>" /> 
												</div>
											</li>
											<li>
												<label>Button Height</label>
												<div class="input-group colorpicker-component">
													<input id="dm_btn_height1" name="dm_btn_height1" 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_height1;?>" /> 
												</div>
											</li>
											<li>
												<label>Background Color </label>
												<div id="dm_backgroud_color1_div" class="input-group colorpicker-component">
													<input type="text" value="<?php echo $dm_backgroud_color1;?>" id="dm_backgroud_color1" name ="dm_backgroud_color1" class="form-control temp_style_fields" /> 
													<span class="input-group-addon"><i style="background-color:#64a2f7"></i></span>
												</div>
											</li>
											<li>
												<label>Button Border Style </label>
												<div class="input-group ">
													<select class="form-control" id="dm_border_style1" name="dm_border_style1">
													<?php 
														$dm_border_style1_array = array('none'=>'None','solid'=>'Solid','dashed'=>'Dashed','dotted'=>'Dotted');

														foreach($dm_border_style1_array as $key=>$value){
														$slected = '';
														if($key == $dm_border_style1 ){

														$slected = 'selected=selected';
														}
														echo "<option value='".$key."' $slected >$value</option>";
														}
													?>											
													</select>
												</div>
											</li>
											<li>
												<label>Button Border Width</label>
												<div class="input-group colorpicker-component">
													<input id="dm_border_wid1" name="dm_border_wid1" 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_wid1;?>" /> 
												</div>
											</li>
											
											<li>
												<label>Border Color </label>
												<div id="dm_border_color1_div" class="input-group colorpicker-component">
													<input type="text"  name="dm_border_color1" value="<?php echo $dm_border_color1;?>" id="dm_border_color1" class="form-control" /> 
													<span class="input-group-addon"><i style="background-color:#ccc"></i></span>
												</div>
											</li>
											<li>
												<label>Border Radius</label>
												<div class="input-group colorpicker-component">
													<input id="dm_border_rad1" name="dm_border_rad1" 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_rad1; ?>" /> 
												</div>
											</li>
											<li>
												<label>Font Size</label>
												<div class="input-group colorpicker-component">
													<input id="dm_font_size1" name="dm_font_size1" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="10" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_font_size1; ?>" /> 
												</div>
											</li>
											<li>
												<label>Font Weight</label>
												<div class="input-group ">
													<select class="form-control" id="dm_font_weight1" name="dm_font_weight1">
													<?php 
														$dm_font_weight_array1 = array('300'=>'Lighter','400'=>'Normal','600'=>'Bold','700'=>'Bolder');

														foreach($dm_font_weight_array1 as $key=>$value){
															$slected = '';
															if($key == $dm_font_weight1 ){

															$slected = 'selected=selected';
															}
															echo "<option value='".$key."' $slected >$value</option>";
														}
													?>						
													</select>
												</div>
											</li>
											<li>
												<label>Font Family</label>
												<div class="input-group ">
													<select class="form-control" id="dm_font_family1" name="dm_font_family1">
													<?php 
														$dm_font_family_array1 = array('1'=>"'Roboto', sans-serif",'2'=>"'Open Sans', sans-serif",'3'=>"'Poppins', sans-serif",'4'=>"'Oswald', sans-serif");


														foreach($dm_font_family_array1 as $key=>$value){
															$slected = '';
															if($key == $dm_font_family1 ){

															$slected = 'selected=selected';
															}
															echo "<option value='".$key."' $slected >$value</option>";
														}
													?>
													</select>
												</div>
											</li>
										</ul>
									</div>
								</div>
							</div>
							
							<!--membership-->
								
							<div class="button--Customizer-options" style="">
								<div class="button--Customizer-inner">
									<h5>Membership Customizer</h5>
									<div class="button_container membershipbutton_outer">								
										<?php
											if(isset($membershipbutton_data )){
												echo $membershipbutton_html;
											} else{
										?>
											<div class="btn_container" id="membershipbutton" style="background: #6bad1f;color: #fff; text-align: center;padding: 10px; border-radius: 5px; border: 0px; font-size: 15px; line-height: normal; font-weight: 600;  font-family: sans-serif; max-width: 100%; float: left; width: 137px;">Membership</div>
										<?php 
											}
										?>								
									</div>
									<div class="customized-optional button_style">
										<ul class="templates-styles">
											<li>
												<label>Button Width</label>
												<div class="input-group colorpicker-component">
													<input id="dm_btn_wid2" name="dm_btn_wid2" 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_wid2;?>" /> 
												</div>
											</li>
											<li>
												<label>Button Height</label>
												<div class="input-group colorpicker-component">
													<input id="dm_btn_height2" name="dm_btn_height2" 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_height2;?>" /> 
												</div>
											</li>
											<li>
												<label>Background Color </label>
												<div id="dm_backgroud_color2_div" class="input-group colorpicker-component">
													<input type="text" value="<?php echo $dm_backgroud_color2;?>" id="dm_backgroud_color2" name ="dm_backgroud_color1" class="form-control temp_style_fields" /> 
													<span class="input-group-addon"><i style="background-color:#64a2f7"></i></span>
												</div>
											</li>
											<li>
												<label>Button Border Style </label>
												<div class="input-group ">
													<select class="form-control" id="dm_border_style2" name="dm_border_style2">
													<?php 
														$dm_border_style2_array = array('none'=>'None','solid'=>'Solid','dashed'=>'Dashed','dotted'=>'Dotted');

														foreach($dm_border_style2_array as $key=>$value){
														$slected = '';
														if($key == $dm_border_style2 ){

														$slected = 'selected=selected';
														}
														echo "<option value='".$key."' $slected >$value</option>";
														}
													?>												
													</select>
												</div>
											</li>
											<li>
												<label>Button Border Width</label>
												<div class="input-group colorpicker-component">
													<input id="dm_border_wid2" name="dm_border_wid2" 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_wid2;?>" /> 
												</div>
											</li>
											
											<li>
												<label>Border Color </label>
												<div id="dm_border_color2_div" class="input-group colorpicker-component">
													<input type="text"  name="dm_border_color2" value="<?php echo $dm_border_color2;?>" id="dm_border_color2" class="form-control" /> 
													<span class="input-group-addon"><i style="background-color:#ccc"></i></span>
												</div>
											</li>
											<li>
												<label>Border Radius</label>
												<div class="input-group colorpicker-component">
													<input id="dm_border_rad2" name="dm_border_rad2" 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_rad2; ?>" /> 
												</div>
											</li>
											<li>
												<label>Font Size</label>
												<div class="input-group colorpicker-component">
													<input id="dm_font_size2" name="dm_font_size2" class="form-control" data-slider-id='ex1Slider' type="text" data-slider-min="10" data-slider-max="100" data-slider-step="1" data-slider-value="<?php echo $dm_font_size2; ?>" /> 
												</div>
											</li>
											<li>
												<label>Font Weight</label>
												<div class="input-group ">
													<select class="form-control" id="dm_font_weight2" name="dm_font_weight2">
													<?php 
														$dm_font_weight_array2 = array('300'=>'Lighter','400'=>'Normal','600'=>'Bold','700'=>'Bolder');

														foreach($dm_font_weight_array2 as $key=>$value){
															$slected = '';
															if($key == $dm_font_weight2 ){

															$slected = 'selected=selected';
															}
															echo "<option value='".$key."' $slected >$value</option>";
														}
													?>						
													</select>
												</div>
											</li>
											<li>
												<label>Font Family</label>
												<div class="input-group ">
													<select class="form-control" id="dm_font_family2" name="dm_font_family2">
													<?php 
														$dm_font_family_array2  = array('1'=>"'Roboto', sans-serif",'2'=>"'Open Sans', sans-serif",'3'=>"'Poppins', sans-serif",'4'=>"'Oswald', sans-serif");


														foreach($dm_font_family_array2 as $key=>$value){
															$slected = '';
															if($key == $dm_font_family2 ){

															$slected = 'selected=selected';
															}
															echo "<option value='".$key."' $slected >$value</option>";
														}
													?>						
													</select>
												</div>
											</li>
										</ul>			
									</div>
								</div>
							</div>
						</div>
						
						
						<!--Rent-->	
						<div class="pay-per-post-block-new" style="">
							<h5>Button Alignment & Margin</h5>
								 <div class="customized-optional button_style">
										<ul class="templates-styles">
											<li>
												<label>Margin between buttons</label>
												<div class="input-group ">
													<div class="input-group colorpicker-component">
														<input id="dm_margin_between_btn" name="dm_margin_between_btn" 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_margin_between_btn; ?>" /> 
													</div>
												</div>
											</li>
											
											
											<li>
												<label>Alignment</label>
												<div class="input-group ">
												<select class="input-group form-control" id="dm_buttom_alignment" name="dm_buttom_alignment">
												<?php 
												$dm_buttom_alignment_array = array('left'=>"Left",'right'=>"Right",'center'=>"Center");

												foreach($dm_buttom_alignment_array as $key=>$value){
												$slected = '';
												if($key == $dm_buttom_alignment ){
													$slected = 'selected=selected';
												}
												echo "<option value='".$key."' $slected >$value</option>";
												}
												?>
											</select>
										</div>
									</li>
										</ul>
								</div>			
						 </div>		
						
						
						<div class="metabox--actions-btn">
							 				
							<div class="metabox-btn metabox-next-btn save_data" >Save</div>
							<div class="saved_warning" style="display:none" >Saved Successfully...</div>
						</div>

						
						
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
