products.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /*
  3. Template Name: Products
  4. */
  5. ?>
  6. <?php
  7. /**
  8. * @package WordPress
  9. * @subpackage Default_Theme
  10. */
  11. get_header(); ?>
  12. <div id="main-content" class="main-content inner-wrapper">
  13. <div id="primary" class="content-area">
  14. <div id="content" class="site-content" role="main">
  15. <link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_directory' ); ?>/products.css" />
  16. <?php
  17. // Start the Loop.
  18. while ( have_posts() ) : the_post();
  19. // Include the page content template.
  20. get_template_part( 'content', 'page' );
  21. endwhile;
  22. ?>
  23. <?php
  24. include "servervars.php";
  25. //echo file_get_contents("http://www.".$serverone."/central/getcats.php?guid=$guid&width=$width&s=$serverone");
  26. $ch = curl_init();
  27. $timeout = 5;
  28. $url="http://www.".$serverone."/central/getcats.php?guid=$guid&width=$width&s=$serverone";
  29. curl_setopt($ch,CURLOPT_URL,$url);
  30. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  31. curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
  32. $data = curl_exec($ch);
  33. curl_close($ch);
  34. $data=str_replace('.php', '/', $data);
  35. echo $data;
  36. ?>
  37. <div id="clear"></div>
  38. </div>
  39. </div>
  40. </div>
  41. <?php get_footer(); ?>