1. <?php
  2. get_header();
  3. global $wpdb;
  4. $postTab = $wpdb->prefix."posts";
  5. $postMeta = $wpdb->prefix."postmeta";
  6. global $post;
  7. $mrpostParent =$post->ID;
  8. ?>
  9. <div class="mr_top-menu">
  10. <?php if ( ! dynamic_sidebar( 'Home Widget' ) ) : ?>
  11. <?php endif ?>
  12. </div>
  13. <div class="mr-singlepostOut">
  14. <div id="primary" class="content-area">
  15. <div id="content" class="site-content" role="main">
  16. <div class="link-header1 nocenter"><h2 class="link-header-magnify">Pornstar Details</h2>
  17. <div class="link-header-back1"><a href="<?php bloginfo("url"); ?>">Back To Home</a></div>
  18. </div>
  19. <div class="clearfix"></div>
  20. <div class="single-model-outer">
  21. <?php while ( have_posts() ) : the_post();
  22. $modelID = get_the_ID();
  23. $modelData = get_fields($modelID);
  24. ?>
  25. <div class="model-left thumnail">
  26. <?php
  27. if(has_post_thumbnail())
  28. {
  29. the_post_thumbnail('large');
  30. }
  31. ?>
  32. </div>
  33. <div class="model-right">
  34. <h1 class="model-name"><?php the_title(); ?></h1>
  35. <ul>
  36. <li><h2 class="model-name2"><?php echo get_field( "aka",$modelID); ?></h2></li><br />
  37. <li><strong>Date of Birth</strong> : <?php
  38. if (get_field('data_of_birth', false, false)) {
  39. // get raw date
  40. $date = get_field('date_of_birth', false, false);
  41. // make date object
  42. $date = new DateTime($date);
  43. echo $date->format('M j, Y'); ?> (<?php
  44. $date = get_field('date_of_birth');
  45. $birthday = new DateTime($date);
  46. $interval = $birthday->diff(new DateTime);
  47. echo $interval->y.' years old';
  48. ?>)
  49. } // end if date
  50. <li><strong>Birth Place</strong> : <?php echo get_field( "birth_place",$modelID); ?></li>
  51. <li><strong>Eye Color</strong> : <?php echo get_field( "model_eye",$modelID); ?></li>
  52. <li><strong>Hair Color</strong> : <?php echo get_field( "model_hair",$modelID); ?></li>
  53. <li><strong>Height</strong> : <?php echo get_field( "height",$modelID); ?></li>
  54. <li><strong>Measurements</strong> : <?php echo get_field( "measurements",$modelID); ?></li>
  55. <li><strong>Fake Boobs</strong> : <?php echo get_field( "fake_boobs",$modelID); ?></li>
  56. <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>
  57. <li><?php the_content(); ?></li>
  58. </ul>
  59. </div>
  60. <div class="clearfix"></div>
  61. <?php endwhile; ?>
  62. </div>
  63. </div><!-- #content -->
  64. </div>
  65. <!-- #primary -->
  66. <!--Exclusive Galleries -->
  67. <div class="mr-exclusive-gallery-section">
  68. <div class="mr_ExG-head">
  69. <table border="0" width="100%">
  70. <tr>
  71. <td><h3>Exclusive <?php the_title(); ?> Picture Galleries</h3></td>
  72. <td></td>
  73. <td>
  74. <script type="text/javascript">
  75. jQuery(document).ready(function(){
  76. var GalleyPic_count = $("#wpsimplegallery").children().length;
  77. if(GalleyPic_count<1)
  78. { jQuery(".mr-exclusive-gallery-section").hide();
  79. }
  80. jQuery(".noofExG").html(GalleyPic_count+" picture galleries");
  81. });</script>
  82. <p class="noofExG">picture galleries</p>
  83. </td>
  84. </tr>
  85. </table>
  86. </div>
  87. <div class="free-exclusive-gallery-out">
  88. <div id="free-EXG-containt">
  89. <?php
  90. echo do_shortcode('[wpsgallery]');
  91. ?>
  92. </div>
  93. </div>
  94. </div>
  95. <!-- Close Exclusive galleries -->
  96. <!-- Free Video section -->
  97. <?php
  98. /* //$ttFVQue =$wpdb->get_results("select * from $postTab where post_type='freevideo' and post_status='publish' and post_parent='$mrpostParent'"); */
  99. $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
  100. ( b.meta_key='mr_freeV_model' or b.meta_key='mr_freeV_model2') and b.meta_value='$mrpostParent'");
  101. if($ttFVQue && $wpdb->num_rows>0)
  102. {
  103. $totalFV = $wpdb->num_rows;
  104. }
  105. else
  106. {
  107. $totalFV="0";
  108. }
  109. ?>
  110. <div class="mr-free-Video-section" <?php if($totalFV<1){ echo 'style="display:none;"'; }?>>
  111. <div class="mr_Fvideo-head">
  112. <table border="0" width="100%">
  113. <tr>
  114. <td ><h3>Latest <?php the_title(); ?> Videos</h3></td>
  115. <td >
  116. <div class="freeVideo-pagi-out">
  117. <div id="pagination-wraper">
  118. <?php
  119. $page=1;//Default page
  120. $limit=8;//Records per page
  121. $start=0;//starts displaying records from 0
  122. if(isset($_GET['mrpage']) && $_GET['mrpage']!='')
  123. {
  124. $page=$_GET['mrpage'];
  125. }
  126. $start=($page-1)*$limit;
  127. $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
  128. ( b.meta_key='mr_freeV_model' or b.meta_key='mr_freeV_model2') and b.meta_value='$mrpostParent'");
  129. if($query)
  130. {
  131. $rows =$wpdb->num_rows;
  132. }
  133. $m_Cpageurl = get_permalink();
  134. ######################## PAGINATION FUNCTION CALLING #########################
  135. echo pagination($limit,$page,$m_Cpageurl.'?mrpage=',$rows);
  136. ################ END #########################################################
  137. ?>
  138. </div>
  139. </div>
  140. </td>
  141. <td ><p class="noofVideos"><?php echo $totalFV; ?> videos</p></td>
  142. </tr>
  143. </table>
  144. <script type="text/javascript">
  145. jQuery(document).ready(function()
  146. {
  147. jQuery(".freeVideo-pagi-out").on("click", ".pagi-icon a", function(event)
  148. {
  149. var mr_post_currentpostId="<?php echo $mrpostParent; ?>";
  150. event.preventDefault();
  151. var pagno =jQuery(this).attr('data-pagin');
  152. //Code for pagination
  153. jQuery.ajax({
  154. url: "<?php echo get_template_directory_uri();?>/ajax-paginations.php",
  155. method: "POST",
  156. data: {pageNumb:pagno,mrTotalrow:'<?php echo $rows; ?>',mr_currentPageurl:'<?php echo $m_Cpageurl; ?>'},
  157. //datatype : "html",
  158. success: function(mrresult)
  159. {
  160. jQuery(".freeVideo-pagi-out").html(mrresult);
  161. }
  162. });
  163. // End Code
  164. //Code for data
  165. jQuery.ajax({
  166. url: "<?php echo get_template_directory_uri();?>/datafrompaginData.php",
  167. method: "POST",
  168. data: {pageNumb:pagno,posttype:'freevideo',videoParent:'model',mr_post_parent:mr_post_currentpostId},
  169. //datatype : "html",
  170. success: function(result)
  171. {
  172. // alert(result);
  173. jQuery("#free-FVLR-containt").html(result);
  174. }
  175. });
  176. });
  177. });
  178. </script>
  179. </div>
  180. <div class="free-video-list-out">
  181. <div id="free-FVLR-containt">
  182. <?php
  183. $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
  184. ( 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");
  185. if($listFVpost && $wpdb->num_rows>0)
  186. {
  187. /* while($row= mysql_fetch_array($listFVpost)) */
  188. foreach($listFVpost as $row)
  189. {
  190. /* extract($row); */
  191. $videoId = $row->ID;
  192. $videoThum = get_the_post_thumbnail($row->ID,"medium");
  193. $mr_videoCutomUrl = get_post_meta($row->ID,"mr_freeVideoUrl",true);
  194. if(!empty($mr_videoCutomUrl))
  195. {
  196. $mrVideoUrl = $mr_videoCutomUrl;
  197. $mr_target = "_blank";
  198. }
  199. else
  200. {
  201. $mrVideoUrl=get_permalink($row->ID);
  202. $mr_target ="";
  203. }
  204. ?>
  205. <div class="fvideo-box">
  206. <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).'&#8230;'; ?></a></div>
  207. <div class="fvideo-thum">
  208. <a target="<?php echo $mr_target; ?>"href="<?php echo $mrVideoUrl; ?>">
  209. <?php
  210. if($videoThum){echo $videoThum;
  211. }
  212. else
  213. {
  214. ?>
  215. <img src="<?php echo get_template_directory_uri(); ?>/images/no-image.jpg">
  216. <?php
  217. }
  218. ?>
  219. </a>
  220. </div>
  221. <div class="fv-star-rat">
  222. <?php if(function_exists("kk_star_ratings")) : echo kk_star_ratings($row->ID); endif; ?>
  223. <div class="clearfix"></div>
  224. </div>
  225. </div>
  226. <?php
  227. }
  228. }
  229. ?>
  230. <div class="clearfix"></div>
  231. </div>
  232. </div>
  233. </div>
  234. <!-- Free Galley Section -->
  235. <?php
  236. /* // $ttFGQue =$wpdb->get_results("select * from $postTab where post_type='freegallery' and post_status='publish' and post_parent='$mrpostParent'"); */
  237. $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
  238. ( b.meta_key='mr_freeGalleryModel' or b.meta_key='mr_freeGalleryModel_2') and b.meta_value='$mrpostParent'");
  239. if($ttFGQue && $wpdb->num_rows>0)
  240. {
  241. $totalFg = $wpdb->num_rows;
  242. }
  243. else{
  244. $totalFg="0";
  245. }
  246. ?>
  247. <div class="mr-free-Galleries-section" <?php if($totalFg<1){ echo 'style="display:none;"'; }?>>
  248. <div class="mr_gallery-head">
  249. <table border="0" width="100%">
  250. <tr>
  251. <td ><h3>Latest <?php the_title(); ?> Galleries</h3></td>
  252. <td ><div class="freeGallery-pagi-out">
  253. <div id="pagination-wraper">
  254. <?php
  255. $page=1;//Default page
  256. $limit=25;//Records per page
  257. $start=0;//starts displaying records from 0
  258. if(isset($_GET['fgpage']) && $_GET['fgpage']!='')
  259. {
  260. $page=$_GET['fgpage'];
  261. }
  262. $start=($page-1)*$limit;
  263. $m_Cpageurl = get_permalink();
  264. ######################## PAGINATION FUNCTION CALLING #########################
  265. echo pagination($limit,$page,$m_Cpageurl.'?fgpage=',$totalFg);
  266. ################ END #########################################################
  267. ?>
  268. </div>
  269. </div></td>
  270. <td ><p class="noofGalleries"><?php echo $totalFg; ?> galleries</p></td>
  271. </tr>
  272. </table>
  273. <script type="text/javascript">
  274. jQuery(document).ready(function()
  275. {
  276. jQuery(".freeGallery-pagi-out").on("click", ".pagi-icon a", function(event)
  277. {
  278. var mr_post_currentpostId="<?php echo $mrpostParent; ?>";
  279. event.preventDefault();
  280. var pagno =jQuery(this).attr('data-pagin');
  281. //Code for pagination
  282. jQuery.ajax({
  283. url: "<?php echo get_template_directory_uri();?>/ajax-paginations.php",
  284. method: "POST",
  285. data: {pageNumb:pagno,mrTotalrow:'<?php echo $totalFg; ?>',posttype:'freegallery',mr_currentPageurl:'<?php echo $m_Cpageurl; ?>'},
  286. //datatype : "html",
  287. success: function(mrresult)
  288. {
  289. jQuery(".freeGallery-pagi-out").html(mrresult);
  290. }
  291. });
  292. // End Code
  293. //Code for data
  294. jQuery.ajax({
  295. url: "<?php echo get_template_directory_uri();?>/datafrompaginData.php",
  296. method: "POST",
  297. data: {pageNumb:pagno,posttype:'freegallery',fgalleryParent:'model',mr_post_parent:mr_post_currentpostId},
  298. //datatype : "html",
  299. success: function(fg_result)
  300. {
  301. // alert(result);
  302. jQuery("#free-GLR-containt").html(fg_result);
  303. }
  304. });
  305. });
  306. });
  307. </script>
  308. </div>
  309. <div class="free-gallery-list-out">
  310. <div id="free-GLR-containt">
  311. <table width="100%" border="0" cellpadding="5" cellspacing="5">
  312. <thead>
  313. <tr><th>Gallery<hr></th> <th>Type<hr></th><th>Site<hr></th><th>Date<hr></th></tr>
  314. </thead>
  315. <tbody id="free-galleryTblist">
  316. <?php
  317. $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
  318. ( 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");
  319. if($listFgpost && $wpdb->num_rows>0)
  320. {
  321. /* while($res=mysql_fetch_array($listFgpost)) */
  322. foreach($listFgpost as $res)
  323. {
  324. /* extract($res); */
  325. ?>
  326. <tr>
  327. <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>
  328. <td align="center">
  329. <img src="<?php echo get_template_directory_uri().'/images/'.get_post_meta($res->ID,'mr_freeGallery_type',true); ?>.png">
  330. </td>
  331. <td align="center">
  332. <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>
  333. </td>
  334. <td align="center"><?php echo get_post_meta($res->ID,'mr_freeGalleryDate',true); ?></td>
  335. </tr>
  336. <?php
  337. }
  338. }
  339. else
  340. {
  341. ?><tr><td colspan="5" align="center"><font color="red">No records</font></td></tr><?php
  342. }
  343. ?>
  344. <tbody>
  345. </table>
  346. </div>
  347. </div>
  348. </div>
  349. <script>
  350. jQuery(document).ready(function() {
  351. jQuery('.bestthumbnail').hover(function() {
  352. jQuery(this).parent().find("span").css('visibility','visible');
  353. },
  354. function() {
  355. jQuery(this).parent().find("span").css('visibility','hidden');
  356. }
  357. );
  358. });
  359. </script>
  360. <style>
  361. .bestthumbnail span {
  362. display: block;
  363. left: 0 !important;
  364. margin: 0 auto;
  365. right: 0;
  366. top: initial !important;
  367. width: 216px;
  368. }
  369. </style>
  370. <!-- Free Galley Section -->
  371. <?php
  372. // Get the model appear in sites ID
  373. $modelSiteID = get_post_meta($mrpostParent,"mr_model_appear_sites",true);
  374. if(!empty($modelSiteID))
  375. {
  376. $modelSiteIdArr =explode(",",$modelSiteID);
  377. if(count($modelSiteIdArr)>0)
  378. {
  379. ?>
  380. <div class="mr-sites-section">
  381. <div class="mr_gallery-head">
  382. <table border="0" width="100%">
  383. <tr>
  384. <td><h3><?php the_title(); ?> appears on the following sites</h3></td>
  385. <td>
  386. <div class="modelsites-pagi-out">
  387. <div id="pagination-wraper">
  388. <?php
  389. $page=1;//Default page
  390. $limit=8;//Records per page
  391. $start=0;//starts displaying records from 0
  392. if(isset($_GET['mSpage']) && $_GET['mSpage']!='')
  393. {
  394. $page=$_GET['mSpage'];
  395. }
  396. $start=($page-1)*$limit;
  397. $totalSite = count($modelSiteIdArr);
  398. $m_Cpageurl = get_permalink();
  399. ######################## PAGINATION FUNCTION CALLING #########################
  400. echo pagination($limit,$page,$m_Cpageurl.'?mSpage=',$totalSite);
  401. ################ END #########################################################
  402. ?>
  403. </div>
  404. </div>
  405. </td>
  406. <td><p class="noofGalleries"><?php echo count($modelSiteIdArr); ?> sites</p></td>
  407. </tr>
  408. </table>
  409. <script type="text/javascript">
  410. jQuery(document).ready(function()
  411. {
  412. jQuery(".modelsites-pagi-out").on("click", ".pagi-icon a", function(event)
  413. {
  414. var mr_post_currentpostId="<?php echo $mrpostParent; ?>";
  415. event.preventDefault();
  416. var pagno =jQuery(this).attr('data-pagin');
  417. //Code for pagination
  418. jQuery.ajax({
  419. url: "<?php echo get_template_directory_uri();?>/ajax-paginations.php",
  420. method: "POST",
  421. data: {pageNumb:pagno,mrTotalrow:'<?php echo $totalSite; ?>',mr_currentPageurl:'<?php echo $m_Cpageurl; ?>'},
  422. success: function(mSresult)
  423. {
  424. //alert(mSresult);
  425. jQuery(".modelsites-pagi-out").html(mSresult);
  426. }
  427. });
  428. // End Code
  429. //Code for data
  430. jQuery.ajax({
  431. url: "<?php echo get_template_directory_uri();?>/datafrompaginData.php",
  432. method: "POST",
  433. data: {pageNumb:pagno,posttype:'site',mr_post_parent:mr_post_currentpostId},
  434. success: function(ms_result)
  435. {
  436. //alert(ms_result);
  437. jQuery("#modelsites-containt").html(ms_result);
  438. }
  439. });
  440. });
  441. });
  442. </script>
  443. </div>
  444. <div class="modelsites-list-out">
  445. <div id="modelsites-containt">
  446. <?php
  447. for($i=$start;$i<$limit;$i++)
  448. {
  449. $siteID = $modelSiteIdArr[$i];
  450. $siteData = get_post($siteID);
  451. if(!empty($siteID))
  452. {
  453. ?>
  454. <?php /*?><div class="siteListmain">
  455. <div class="mrthumbnails">
  456. <a href="<?php echo get_permalink($siteData->ID); ?>">
  457. <?php echo get_the_post_thumbnail($siteData->ID,'large'); ?></a>
  458. </div>
  459. <div class="list_sitetiel">
  460. <a href="<?php echo get_permalink($siteData->ID); ?>"><?php echo $siteData->post_title; ?></a>
  461. </div>
  462. </div> <?php */?>
  463. <div class="col-md-3 col-sm-3 col-xs-3 mr-trip-box-out">
  464. <?php
  465. $post_external_link = (get_post_meta($siteID,'post_external_link',true))?get_post_meta($siteID,'post_external_link',true):'#';
  466. $new_post_added = (get_post_meta($siteID,'new_post_added',true))?'<span class="new_txt">'.get_post_meta($siteID,'new_post_added',true).'</span>':'';
  467. if(get_field( "nofollow_tag" )) { $nofollow_tag = 'rel="nofollow"'; }
  468. else { $nofollow_tag = ''; }
  469. ?>
  470. <div class="trip-box">
  471. <a title="<?php echo $siteData->post_title; ?>" href="<?php echo get_permalink($siteData->ID); ?>">
  472. <span class="li_list"><?php echo $siteData->post_title; ?></span><?php echo $new_post_added; ?></a>
  473. <a title="Click to visit <?php echo $siteData->post_title; ?>" href="<?php echo get_permalink($siteData->ID); ?>">
  474. <span class="review"></span></a>
  475. <a title="<?php echo $siteData->post_title; ?>" target="_blank" href="<?php echo $post_external_link; ?>" rel="nofollow">
  476. <?php
  477. $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($siteID), 'full' );
  478. if($thumb && !empty($thumb))
  479. {
  480. echo '<img class="attachment-full lazyLoad wp-post-image" data-src="'.$thumb[0].'" src="'.get_template_directory_uri().'/images/placeholder.png"/>';
  481. }
  482. else
  483. {
  484. 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" />';
  485. }
  486. ?>
  487. </a>
  488. </div>
  489. </div>
  490. <?
  491. }
  492. }
  493. ?>
  494. <div class="clear"></div>
  495. </div>
  496. </div>
  497. </div>
  498. <?php
  499. }
  500. }
  501. ?>
  502. </div> <!-- .mr-singlepostout -->
  503. <?php get_footer(); ?>