view.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. include("../config/xy.php");
  5. $id=$_GET[id];
  6. $sj=getsj();
  7. checkdjl("c3",$id,"yjcode_pro");
  8. while0("*","yjcode_pro where zt<>99 and id=".$id);if(!$row=mysql_fetch_array($res)){php_toheader("../");}
  9. $txtmb=returnjgdw($row[txtmb],"","default");
  10. $_SESSION["tzURL"]=weburl."product/view".$id.".html";
  11. $nowmoney=returnyhmoney($row[yhxs],$row[money2],$row[money3],$sj,$row[yhsj1],$row[yhsj2],$row[id]);
  12. $ty1name=returntype(1,$row[ty1id]);
  13. $sqlsell="select * from yjcode_user where id=".$row[userid];mysql_query("SET NAMES 'GBK'");$ressell=mysql_query($sqlsell);
  14. if(!$rowsell=mysql_fetch_array($ressell)){php_toheader("../");}
  15. $nuid=returnuserid($_SESSION["SHOPUSER"]);
  16. $nch="";
  17. if(isset($_COOKIE['prohistoy'])){
  18. $nch=$_COOKIE['prohistoy'];
  19. if(check_in($row[id]."xcf",$nch)){$nch=str_replace($row[id]."xcf","",$nch);}
  20. $a=preg_split("/xcf/",$nch);
  21. if(count($a)>6){$ni=6;}else{$ni=count($a);}
  22. $nch="";
  23. for($i=0;$i<=$ni;$i++){
  24. $nch=$nch.$a[$i]."xcf";
  25. }
  26. }
  27. $Month = 864000 + time();
  28. setcookie(prohistoy,$row[id]."xcf".$nch, $Month,'/');
  29. $nch=$_COOKIE['prohistoy'];
  30. ?>
  31. <html>
  32. <head>
  33. <meta http-equiv="x-ua-compatible" content="ie=7" />
  34. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  35. <meta name="keywords" content="<?=returnjgdw($row[wkey],"",$row[tit])?>">
  36. <meta name="description" content="<?=delhtml(returnjgdw($row[wdes],"",strgb2312(strip_tags($row[txt]),0,250)))?>">
  37. <title><?=$row[tit]?> - <?=webname?></title>
  38. <? include("../tem/cssjs.html");?>
  39. <link href="<?=$txtmb?>/view.css" rel="stylesheet" type="text/css" />
  40. <script language="javascript" src="<?=$txtmb?>/view.js"></script>
  41. <script type="text/javascript" src="jquery-plugin-slide.js"></script>
  42. <? if(empty($rowcontrol[ifwap])){?>
  43. <script language="javascript">
  44. if(is_mobile()) {document.location.href= '<?=weburl?>m/product/view<?=$row[id]?>.html';}
  45. </script>
  46. <? }?>
  47. </head>
  48. <body>
  49. <?
  50. include("../tem/top.html");
  51. include($txtmb."/viewmb.php");
  52. ?>
  53. <div class="clear clear15"></div>
  54. <?
  55. include("../tem/bottom.html");
  56. ?>
  57. </body>
  58. </html>