product-detail.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /*
  3. Template Name: Product Detail
  4. */
  5. /**
  6. * The template for displaying all pages.
  7. *
  8. * This is the template that displays all pages by default.
  9. * Please note that this is the WordPress construct of pages
  10. * and that other 'pages' on your WordPress site will use a
  11. * different template.
  12. *
  13. * @package WordPress
  14. * @subpackage Twenty_Ten
  15. * @since Twenty Ten 1.0
  16. */
  17. ?>
  18. <?php
  19. /**
  20. * @package WordPress
  21. * @subpackage Default_Theme
  22. */
  23. get_header(); ?>
  24. <div id="main-content" class="main-content inner-wrapper">
  25. <div id="primary" class="content-area">
  26. <div id="content" class="site-content" role="main">
  27. <?php
  28. include "servervars.php";
  29. $id=$_GET['id'];
  30. //$producttitle= file_get_contents("http://www.".$serverone."/central/gettitle.php?id=$id");
  31. $ch = curl_init();
  32. $timeout = 5;
  33. $url="http://www.".$serverone."/central/gettitledetails.php?id=$id";
  34. curl_setopt($ch,CURLOPT_URL,$url);
  35. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  36. curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
  37. $data = curl_exec($ch);
  38. curl_close($ch);
  39. $producttitle= $data;
  40. $ch = curl_init();
  41. $timeout = 5;
  42. $url="http://www.".$serverone."/central/getdetails.php?id=$id&width=$width&guid=$guid&s=$serverone";
  43. curl_setopt($ch,CURLOPT_URL,$url);
  44. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  45. curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
  46. $data = curl_exec($ch);
  47. curl_close($ch);
  48. $data=str_replace('.php', '/', $data);
  49. $productcontent= $data;
  50. //$productcontent= file_get_contents("http://www.".$serverone."/central/getlisting.php?id=$id&width=$width&guid=$guid&s=$serverone");
  51. ?>
  52. <link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_directory' ); ?>/products.css" />
  53. <?php echo $productcontent; ?>
  54. <div id="clear"></div>
  55. </div>
  56. </div>
  57. </div>
  58. <?php get_footer(); ?>