Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div class="conteudo index">
  4. <div class="ihead">
  5. <div class="ap-select">
  6. <div class="fSelect">
  7. <p><b>últimos Lançamentos</b><br /><span>Veja os últimos seriados e filmes atualizados</span></p>
  8. </div>
  9.  
  10. <ul class="fOpcoes">
  11. <li><a href="<?php echo get_category_link(get_cat_ID('series')); ?>">Últimos Episódios</a></li>
  12. <li><a href="<?php echo get_category_link(get_cat_ID('filmes')); ?>">Últimos Filmes</a></li>
  13. </ul>
  14. </div>
  15.  
  16. <div class="qPosts">
  17. <div class="qPosts-icon"></div>
  18. <?php
  19. $numseries = 0;
  20. $numseries = $wpdb->get_var("SELECT count FROM wp_term_taxonomy WHERE term_taxonomy_id = '10' ");
  21. if(0 < $numseries)
  22. $numseries = number_format($numseries);
  23.  
  24. $numposts = $wpdb->get_var("SELECT count(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post'");
  25.  
  26. if(0 < $numposts)
  27. $numposts = number_format($numposts);
  28. ?>
  29. <p><b><?php echo $numposts-$numseries; ?> Filmes</b><br /><span>Filmes postados no site</span></p>
  30. </div>
  31.  
  32. <div class="qPosts">
  33. <div class="qPosts-icon"></div>
  34. <p><b><?php echo $numseries; ?> Episódios</b><br /><span>De seriados postados no site</span></p>
  35. </div>
  36. </div>
  37.  
  38. <div class="miniaturas">
  39. <?php
  40. query_posts('category_name=filmes,tv-ao-vivo');
  41. if(have_posts()):while(have_posts()):the_post();
  42. $url_imagem = get_post_meta($post->ID, 'imagem', true);
  43. $audio = get_post_meta($post->ID, 'audio', true);
  44. $qualidade = get_post_meta($post->ID, 'qualidade', true);
  45. $p_visitas = get_post_meta($post->ID, 'views', true);
  46. $rand = rand(0, 999999); ?>
  47.  
  48. <div class="miniatura">
  49. <div class="tooltip">
  50. <div class="tt-content">
  51. <div class="tt-theContent">
  52. <h3 class="tt-titulo"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  53.  
  54. <div class="tt-infos">
  55. <div class="iCats"><?php the_category(', '); ?></div>
  56. <div class="iClassind"><?php echo get_post_meta($post->ID, 'classind', true); ?></div>
  57. <div class="iDuracao"><?php echo get_post_meta($post->ID, 'tempo', true); ?> min.</div>
  58. <div class="iAno"><?php echo get_post_meta($post->ID, 'ano-lancamento', true); ?></div>
  59. </div>
  60.  
  61. <div class="tt-sinopse">
  62. <p><?php echo strip_tags(get_the_content()); ?></p>
  63. <a href="<?php the_permalink(); ?>" class="maisInfos">Mais Informações...</a>
  64. </div>
  65. </div>
  66. </div>
  67.  
  68. <div class="tt-seta"></div>
  69. </div>
  70.  
  71. <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php short_title('','..',true, '24'); ?></a></h2>
  72.  
  73. <div class="img">
  74. <div class="mTag">
  75. <?php if($audio != ""){ ?>
  76. <span><?php echo $audio; ?></span>
  77. <?php } ?>
  78. <?php if($qualidade != ""){ ?>
  79. <span><?php echo $qualidade; ?></span>
  80. <?php } ?>
  81. </div>
  82.  
  83. <img src="<?php echo $url_imagem; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
  84. <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
  85. </div>
  86.  
  87. <div class="mInfo">
  88. <a href="#" class="comentarios"><span class="fb-comments-count" data-href="<?php the_permalink(); ?>"></span></a>
  89. <div class="mAutor"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="autor" rel="author"><?php echo ucwords(get_the_author_link()); ?></a></div>
  90. <div class="mViews"><?php if($p_visitas and $p_visitas >= 0){ echo $p_visitas; } else { echo '0'; } ?> visitas</div>
  91. </div>
  92. </div>
  93.  
  94. <?php endwhile;
  95.  
  96. if(function_exists('wp_pagenavi')){
  97. wp_pagenavi();
  98. } else {
  99. echo '<div class="wp-pagenavi">';
  100. posts_nav_link('&nbsp;', '&laquo; Página Anterior', 'Próxima Página &raquo;');
  101. echo '</div>';
  102. }
  103.  
  104. else:endif; wp_reset_query(); ?>
  105. </div>
  106. </div>
  107.  
  108. <script src="<?php bloginfo('template_url'); ?>/js/jquery.js"></script>
  109. <script src="<?php bloginfo('template_url'); ?>/js/jquery.miniaturas.js"></script>
  110.  
  111. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement