- <?php
- get_header();
- global $wpdb;
- $postTab = $wpdb->prefix."posts";
- $postMeta = $wpdb->prefix."postmeta";
- global $post;
- $mrpostParent =$post->ID;
- ?>
- <div class="mr_top-menu">
- <?php if ( ! dynamic_sidebar( 'Home Widget' ) ) : ?>
- <?php endif ?>
- </div>
- <div class="mr-singlepostOut">
- <div id="primary" class="content-area">
- <div id="content" class="site-content" role="main">
- <div class="link-header1 nocenter"><h2 class="link-header-magnify">Pornstar Details</h2>
- <div class="link-header-back1"><a href="<?php bloginfo("url"); ?>">Back To Home</a></div>
- </div>
- <div class="clearfix"></div>
- <div class="single-model-outer">
- <?php while ( have_posts() ) : the_post();
- $modelID = get_the_ID();
- $modelData = get_fields($modelID);
- ?>
- <div class="model-left thumnail">
- <?php
- if(has_post_thumbnail())
- {
- the_post_thumbnail('large');
- }
- ?>
- </div>
- <div class="model-right">
- <h1 class="model-name"><?php the_title(); ?></h1>
- <ul>
- <li><h2 class="model-name2"><?php echo get_field( "aka",$modelID); ?></h2></li><br />
- <li><strong>Date of Birth</strong> : <?php
- if (get_field('data_of_birth', false, false)) {
- // get raw date
- $date = get_field('date_of_birth', false, false);
- // make date object
- $date = new DateTime($date);
- echo $date->format('M j, Y'); ?> (<?php
- $date = get_field('date_of_birth');
- $birthday = new DateTime($date);
- $interval = $birthday->diff(new DateTime);
- echo $interval->y.' years old';
- ?>)
- } // end if date
- <li><strong>Birth Place</strong> : <?php echo get_field( "birth_place",$modelID); ?></li>
- <li><strong>Eye Color</strong> : <?php echo get_field( "model_eye",$modelID); ?></li>
- <li><strong>Hair Color</strong> : <?php echo get_field( "model_hair",$modelID); ?></li>
- <li><strong>Height</strong> : <?php echo get_field( "height",$modelID); ?></li>
- <li><strong>Measurements</strong> : <?php echo get_field( "measurements",$modelID); ?></li>
- <li><strong>Fake Boobs</strong> : <?php echo get_field( "fake_boobs",$modelID); ?></li>
- <li><?php if ( get_post_meta($post->ID, 'website', true) ) { ?><a target="_blank" href="<?php echo get_post_meta($post->ID, "website", $single = true); ?>" rel="nofollow"><img src="wp-content/uploads/2016/11/website-24.png" alt="<?php the_title(); ?> Official Website" title="<?php the_title(); ?> Official Website" /></a><?php } ?> <?php if ( get_post_meta($post->ID, 'twitter', true) ) { ?><a target="_blank" href="<?php echo get_post_meta($post->ID, "twitter", $single = true); ?>" rel="nofollow"><img src="wp-content/uploads/2016/01/twitter-24.png" alt="<?php the_title(); ?> Official Twitter" title="<?php the_title(); ?> Official Twitter" /></a><?php } ?> <?php if ( get_post_meta($post->ID, 'facebook', true) ) { ?><a target="_blank" href="<?php echo get_post_meta($post->ID, "facebook", $single = true); ?>" rel="nofollow"><img src="wp-content/uploads/2016/01/facebook-24.png" alt="<?php the_title(); ?> Official Facebook" title="<?php the_title(); ?> Official Facebook" /></a><?php } ?> <?php if ( get_post_meta($post->ID, 'instagram', true) ) { ?><a target="_blank" href="<?php echo get_post_meta($post->ID, "instagram", $single = true); ?>" rel="nofollow"><img src="wp-content/uploads/2016/01/instagram-24.png" alt="<?php the_title(); ?> Official Instagram" title="<?php the_title(); ?> Official Instagram" /></a><?php } ?> <?php if ( get_post_meta($post->ID, 'tumblr', true) ) { ?><a target="_blank" href="<?php echo get_post_meta($post->ID, "tumblr", $single = true); ?>" rel="nofollow"><img src="wp-content/uploads/2016/01/tumblr-24.png" alt="<?php the_title(); ?> Official Tumblr" title="<?php the_title(); ?> Official Tumblr" /></a><?php } ?> <?php if ( get_post_meta($post->ID, 'youtube', true) ) { ?><a target="_blank" href="<?php echo get_post_meta($post->ID, "youtube", $single = true); ?>" rel="nofollow"><img src="wp-content/uploads/2016/01/youtube-24.png" alt="<?php the_title(); ?> Official Youtube" title="<?php the_title(); ?> Official Youtube" /></a><?php } ?></li>
- <li><?php the_content(); ?></li>
- </ul>
- </div>
- <div class="clearfix"></div>
- <?php endwhile; ?>
- </div>
- </div><!-- #content -->
- </div>
- <!-- #primary -->
- <!--Exclusive Galleries -->
- <div class="mr-exclusive-gallery-section">
- <div class="mr_ExG-head">
- <table border="0" width="100%">
- <tr>
- <td><h3>Exclusive <?php the_title(); ?> Picture Galleries</h3></td>
- <td></td>
- <td>
- <script type="text/javascript">
- jQuery(document).ready(function(){
- var GalleyPic_count = $("#wpsimplegallery").children().length;
- if(GalleyPic_count<1)
- { jQuery(".mr-exclusive-gallery-section").hide();
- }
- jQuery(".noofExG").html(GalleyPic_count+" picture galleries");
- });</script>
- <p class="noofExG">picture galleries</p>
- </td>
- </tr>
- </table>
- </div>
- <div class="free-exclusive-gallery-out">
- <div id="free-EXG-containt">
- <?php
- echo do_shortcode('[wpsgallery]');
- ?>
- </div>
- </div>
- </div>
- <!-- Close Exclusive galleries -->
- <!-- Free Video section -->
- <?php
- /* //$ttFVQue =$wpdb->get_results("select * from $postTab where post_type='freevideo' and post_status='publish' and post_parent='$mrpostParent'"); */
- $ttFVQue =$wpdb->get_results("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freevideo' and a.post_status='publish' and
- ( b.meta_key='mr_freeV_model' or b.meta_key='mr_freeV_model2') and b.meta_value='$mrpostParent'");
- if($ttFVQue && $wpdb->num_rows>0)
- {
- $totalFV = $wpdb->num_rows;
- }
- else
- {
- $totalFV="0";
- }
- ?>
- <div class="mr-free-Video-section" <?php if($totalFV<1){ echo 'style="display:none;"'; }?>>
- <div class="mr_Fvideo-head">
- <table border="0" width="100%">
- <tr>
- <td ><h3>Latest <?php the_title(); ?> Videos</h3></td>
- <td >
- <div class="freeVideo-pagi-out">
- <div id="pagination-wraper">
- <?php
- $page=1;//Default page
- $limit=8;//Records per page
- $start=0;//starts displaying records from 0
- if(isset($_GET['mrpage']) && $_GET['mrpage']!='')
- {
- $page=$_GET['mrpage'];
- }
- $start=($page-1)*$limit;
- $query=$wpdb->get_results("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freevideo' and a.post_status='publish' and
- ( b.meta_key='mr_freeV_model' or b.meta_key='mr_freeV_model2') and b.meta_value='$mrpostParent'");
- if($query)
- {
- $rows =$wpdb->num_rows;
- }
- $m_Cpageurl = get_permalink();
- ######################## PAGINATION FUNCTION CALLING #########################
- echo pagination($limit,$page,$m_Cpageurl.'?mrpage=',$rows);
- ################ END #########################################################
- ?>
- </div>
- </div>
- </td>
- <td ><p class="noofVideos"><?php echo $totalFV; ?> videos</p></td>
- </tr>
- </table>
- <script type="text/javascript">
- jQuery(document).ready(function()
- {
- jQuery(".freeVideo-pagi-out").on("click", ".pagi-icon a", function(event)
- {
- var mr_post_currentpostId="<?php echo $mrpostParent; ?>";
- event.preventDefault();
- var pagno =jQuery(this).attr('data-pagin');
- //Code for pagination
- jQuery.ajax({
- url: "<?php echo get_template_directory_uri();?>/ajax-paginations.php",
- method: "POST",
- data: {pageNumb:pagno,mrTotalrow:'<?php echo $rows; ?>',mr_currentPageurl:'<?php echo $m_Cpageurl; ?>'},
- //datatype : "html",
- success: function(mrresult)
- {
- jQuery(".freeVideo-pagi-out").html(mrresult);
- }
- });
- // End Code
- //Code for data
- jQuery.ajax({
- url: "<?php echo get_template_directory_uri();?>/datafrompaginData.php",
- method: "POST",
- data: {pageNumb:pagno,posttype:'freevideo',videoParent:'model',mr_post_parent:mr_post_currentpostId},
- //datatype : "html",
- success: function(result)
- {
- // alert(result);
- jQuery("#free-FVLR-containt").html(result);
- }
- });
- });
- });
- </script>
- </div>
- <div class="free-video-list-out">
- <div id="free-FVLR-containt">
- <?php
- $listFVpost =$wpdb->get_results("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freevideo' and a.post_status='publish' and
- ( b.meta_key='mr_freeV_model' or b.meta_key='mr_freeV_model2') and b.meta_value='$mrpostParent' order by a.ID DESC LIMIT $start, $limit");
- if($listFVpost && $wpdb->num_rows>0)
- {
- /* while($row= mysql_fetch_array($listFVpost)) */
- foreach($listFVpost as $row)
- {
- /* extract($row); */
- $videoId = $row->ID;
- $videoThum = get_the_post_thumbnail($row->ID,"medium");
- $mr_videoCutomUrl = get_post_meta($row->ID,"mr_freeVideoUrl",true);
- if(!empty($mr_videoCutomUrl))
- {
- $mrVideoUrl = $mr_videoCutomUrl;
- $mr_target = "_blank";
- }
- else
- {
- $mrVideoUrl=get_permalink($row->ID);
- $mr_target ="";
- }
- ?>
- <div class="fvideo-box">
- <div class="fvideoboxTitle"><a title="<?php echo $row->post_title; ?>" target="<?php echo $mr_target; ?>" href="<?php echo $mrVideoUrl; ?>"><?php echo substr($row->post_title,0,30).'…'; ?></a></div>
- <div class="fvideo-thum">
- <a target="<?php echo $mr_target; ?>"href="<?php echo $mrVideoUrl; ?>">
- <?php
- if($videoThum){echo $videoThum;
- }
- else
- {
- ?>
- <img src="<?php echo get_template_directory_uri(); ?>/images/no-image.jpg">
- <?php
- }
- ?>
- </a>
- </div>
- <div class="fv-star-rat">
- <?php if(function_exists("kk_star_ratings")) : echo kk_star_ratings($row->ID); endif; ?>
- <div class="clearfix"></div>
- </div>
- </div>
- <?php
- }
- }
- ?>
- <div class="clearfix"></div>
- </div>
- </div>
- </div>
- <!-- Free Galley Section -->
- <?php
- /* // $ttFGQue =$wpdb->get_results("select * from $postTab where post_type='freegallery' and post_status='publish' and post_parent='$mrpostParent'"); */
- $ttFGQue =$wpdb->get_results("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freegallery' and a.post_status='publish' and
- ( b.meta_key='mr_freeGalleryModel' or b.meta_key='mr_freeGalleryModel_2') and b.meta_value='$mrpostParent'");
- if($ttFGQue && $wpdb->num_rows>0)
- {
- $totalFg = $wpdb->num_rows;
- }
- else{
- $totalFg="0";
- }
- ?>
- <div class="mr-free-Galleries-section" <?php if($totalFg<1){ echo 'style="display:none;"'; }?>>
- <div class="mr_gallery-head">
- <table border="0" width="100%">
- <tr>
- <td ><h3>Latest <?php the_title(); ?> Galleries</h3></td>
- <td ><div class="freeGallery-pagi-out">
- <div id="pagination-wraper">
- <?php
- $page=1;//Default page
- $limit=25;//Records per page
- $start=0;//starts displaying records from 0
- if(isset($_GET['fgpage']) && $_GET['fgpage']!='')
- {
- $page=$_GET['fgpage'];
- }
- $start=($page-1)*$limit;
- $m_Cpageurl = get_permalink();
- ######################## PAGINATION FUNCTION CALLING #########################
- echo pagination($limit,$page,$m_Cpageurl.'?fgpage=',$totalFg);
- ################ END #########################################################
- ?>
- </div>
- </div></td>
- <td ><p class="noofGalleries"><?php echo $totalFg; ?> galleries</p></td>
- </tr>
- </table>
- <script type="text/javascript">
- jQuery(document).ready(function()
- {
- jQuery(".freeGallery-pagi-out").on("click", ".pagi-icon a", function(event)
- {
- var mr_post_currentpostId="<?php echo $mrpostParent; ?>";
- event.preventDefault();
- var pagno =jQuery(this).attr('data-pagin');
- //Code for pagination
- jQuery.ajax({
- url: "<?php echo get_template_directory_uri();?>/ajax-paginations.php",
- method: "POST",
- data: {pageNumb:pagno,mrTotalrow:'<?php echo $totalFg; ?>',posttype:'freegallery',mr_currentPageurl:'<?php echo $m_Cpageurl; ?>'},
- //datatype : "html",
- success: function(mrresult)
- {
- jQuery(".freeGallery-pagi-out").html(mrresult);
- }
- });
- // End Code
- //Code for data
- jQuery.ajax({
- url: "<?php echo get_template_directory_uri();?>/datafrompaginData.php",
- method: "POST",
- data: {pageNumb:pagno,posttype:'freegallery',fgalleryParent:'model',mr_post_parent:mr_post_currentpostId},
- //datatype : "html",
- success: function(fg_result)
- {
- // alert(result);
- jQuery("#free-GLR-containt").html(fg_result);
- }
- });
- });
- });
- </script>
- </div>
- <div class="free-gallery-list-out">
- <div id="free-GLR-containt">
- <table width="100%" border="0" cellpadding="5" cellspacing="5">
- <thead>
- <tr><th>Gallery<hr></th> <th>Type<hr></th><th>Site<hr></th><th>Date<hr></th></tr>
- </thead>
- <tbody id="free-galleryTblist">
- <?php
- $listFgpost =$wpdb->get_results("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freegallery' and a.post_status='publish' and
- ( b.meta_key='mr_freeGalleryModel' or b.meta_key='mr_freeGalleryModel_2') and b.meta_value='$mrpostParent' order by a.post_date DESC limit $start,$limit");
- if($listFgpost && $wpdb->num_rows>0)
- {
- /* while($res=mysql_fetch_array($listFgpost)) */
- foreach($listFgpost as $res)
- {
- /* extract($res); */
- ?>
- <tr>
- <td><a class="bestthumbnail" title="<?php echo $res->post_title; ?>" target="_blank" href="<?php echo get_post_meta($res->ID,'mr_freeGalleryUrl',true); ?>" rel="nofollow"><?php $title = $res->post_title; if (strlen($title) > 85){ echo substr($title,0,85).'...';}else { echo $title;}?><span> <?php echo get_the_post_thumbnail( $res->ID, 'medium' ); ?></span></a></td>
- <td align="center">
- <img src="<?php echo get_template_directory_uri().'/images/'.get_post_meta($res->ID,'mr_freeGallery_type',true); ?>.png">
- </td>
- <td align="center">
- <a target="_blank" href="<?php echo get_post_meta($res->ID,'mr_freeGallerySite_url',true); ?>"><?php echo get_post_meta($res->ID,'mr_freeGallerySite_name',true); ?></a>
- </td>
- <td align="center"><?php echo get_post_meta($res->ID,'mr_freeGalleryDate',true); ?></td>
- </tr>
- <?php
- }
- }
- else
- {
- ?><tr><td colspan="5" align="center"><font color="red">No records</font></td></tr><?php
- }
- ?>
- <tbody>
- </table>
- </div>
- </div>
- </div>
- <script>
- jQuery(document).ready(function() {
- jQuery('.bestthumbnail').hover(function() {
- jQuery(this).parent().find("span").css('visibility','visible');
- },
- function() {
- jQuery(this).parent().find("span").css('visibility','hidden');
- }
- );
- });
- </script>
- <style>
- .bestthumbnail span {
- display: block;
- left: 0 !important;
- margin: 0 auto;
- right: 0;
- top: initial !important;
- width: 216px;
- }
- </style>
- <!-- Free Galley Section -->
- <?php
- // Get the model appear in sites ID
- $modelSiteID = get_post_meta($mrpostParent,"mr_model_appear_sites",true);
- if(!empty($modelSiteID))
- {
- $modelSiteIdArr =explode(",",$modelSiteID);
- if(count($modelSiteIdArr)>0)
- {
- ?>
- <div class="mr-sites-section">
- <div class="mr_gallery-head">
- <table border="0" width="100%">
- <tr>
- <td><h3><?php the_title(); ?> appears on the following sites</h3></td>
- <td>
- <div class="modelsites-pagi-out">
- <div id="pagination-wraper">
- <?php
- $page=1;//Default page
- $limit=8;//Records per page
- $start=0;//starts displaying records from 0
- if(isset($_GET['mSpage']) && $_GET['mSpage']!='')
- {
- $page=$_GET['mSpage'];
- }
- $start=($page-1)*$limit;
- $totalSite = count($modelSiteIdArr);
- $m_Cpageurl = get_permalink();
- ######################## PAGINATION FUNCTION CALLING #########################
- echo pagination($limit,$page,$m_Cpageurl.'?mSpage=',$totalSite);
- ################ END #########################################################
- ?>
- </div>
- </div>
- </td>
- <td><p class="noofGalleries"><?php echo count($modelSiteIdArr); ?> sites</p></td>
- </tr>
- </table>
- <script type="text/javascript">
- jQuery(document).ready(function()
- {
- jQuery(".modelsites-pagi-out").on("click", ".pagi-icon a", function(event)
- {
- var mr_post_currentpostId="<?php echo $mrpostParent; ?>";
- event.preventDefault();
- var pagno =jQuery(this).attr('data-pagin');
- //Code for pagination
- jQuery.ajax({
- url: "<?php echo get_template_directory_uri();?>/ajax-paginations.php",
- method: "POST",
- data: {pageNumb:pagno,mrTotalrow:'<?php echo $totalSite; ?>',mr_currentPageurl:'<?php echo $m_Cpageurl; ?>'},
- success: function(mSresult)
- {
- //alert(mSresult);
- jQuery(".modelsites-pagi-out").html(mSresult);
- }
- });
- // End Code
- //Code for data
- jQuery.ajax({
- url: "<?php echo get_template_directory_uri();?>/datafrompaginData.php",
- method: "POST",
- data: {pageNumb:pagno,posttype:'site',mr_post_parent:mr_post_currentpostId},
- success: function(ms_result)
- {
- //alert(ms_result);
- jQuery("#modelsites-containt").html(ms_result);
- }
- });
- });
- });
- </script>
- </div>
- <div class="modelsites-list-out">
- <div id="modelsites-containt">
- <?php
- for($i=$start;$i<$limit;$i++)
- {
- $siteID = $modelSiteIdArr[$i];
- $siteData = get_post($siteID);
- if(!empty($siteID))
- {
- ?>
- <?php /*?><div class="siteListmain">
- <div class="mrthumbnails">
- <a href="<?php echo get_permalink($siteData->ID); ?>">
- <?php echo get_the_post_thumbnail($siteData->ID,'large'); ?></a>
- </div>
- <div class="list_sitetiel">
- <a href="<?php echo get_permalink($siteData->ID); ?>"><?php echo $siteData->post_title; ?></a>
- </div>
- </div> <?php */?>
- <div class="col-md-3 col-sm-3 col-xs-3 mr-trip-box-out">
- <?php
- $post_external_link = (get_post_meta($siteID,'post_external_link',true))?get_post_meta($siteID,'post_external_link',true):'#';
- $new_post_added = (get_post_meta($siteID,'new_post_added',true))?'<span class="new_txt">'.get_post_meta($siteID,'new_post_added',true).'</span>':'';
- if(get_field( "nofollow_tag" )) { $nofollow_tag = 'rel="nofollow"'; }
- else { $nofollow_tag = ''; }
- ?>
- <div class="trip-box">
- <a title="<?php echo $siteData->post_title; ?>" href="<?php echo get_permalink($siteData->ID); ?>">
- <span class="li_list"><?php echo $siteData->post_title; ?></span><?php echo $new_post_added; ?></a>
- <a title="Click to visit <?php echo $siteData->post_title; ?>" href="<?php echo get_permalink($siteData->ID); ?>">
- <span class="review"></span></a>
- <a title="<?php echo $siteData->post_title; ?>" target="_blank" href="<?php echo $post_external_link; ?>" rel="nofollow">
- <?php
- $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($siteID), 'full' );
- if($thumb && !empty($thumb))
- {
- echo '<img class="attachment-full lazyLoad wp-post-image" data-src="'.$thumb[0].'" src="'.get_template_directory_uri().'/images/placeholder.png"/>';
- }
- else
- {
- echo '<img class="attachment-full lazyLoad wp-post-image" data-src="'.get_template_directory_uri().'/images/sample450.jpg" src="'.bloginfo('template_url').'/images/placeholder.png" />';
- }
- ?>
- </a>
- </div>
- </div>
- <?
- }
- }
- ?>
- <div class="clear"></div>
- </div>
- </div>
- </div>
- <?php
- }
- }
- ?>
- </div> <!-- .mr-singlepostout -->
- <?php get_footer(); ?>