txtlist.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. $getstr=$_GET[str];
  5. $id=returnsx("i");
  6. while0("*","yjcode_news where id=".$id);if(!$row=mysql_fetch_array($res)){php_toheader(weburl."404.html");exit;}
  7. $sj=date("Y-m-d H:i:s");
  8. while1("*","yjcode_news where type1id=".$row[type1id]." and type2id=".$row[type2id]." and zt=0 and lastsj>='".$row[lastsj]."' and id<>".$row[id]." order by sj asc");
  9. if($row1=mysql_fetch_array($res1)){$pre="<a href='txtlist_i".$row1[id]."v.html'>".$row1[tit]."</a>";}
  10. else{$pre="已是第一篇内容";}
  11. while1("*","yjcode_news where type1id=".$row[type1id]." and type2id=".$row[type2id]." and zt=0 and lastsj<='".$row[lastsj]."' and id<>".$row[id]." order by sj desc");
  12. if($row1=mysql_fetch_array($res1)){$nex="<a href='txtlist_i".$row1[id]."v.html'>".$row1[tit]."</a>";}
  13. else{$nex="已是最后一篇内容";}
  14. checkdjl("c2",$row[id],"yjcode_news");
  15. $t=preg_split("/_ueditor_page_break_tag_/",$row[txt]);
  16. if(returnsx("p")==-1){$page=1;}else{$page=returnsx("p");}
  17. $txt=$t[$page-1];
  18. ?>
  19. <html>
  20. <head>
  21. <meta http-equiv="x-ua-compatible" content="ie=7" />
  22. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  23. <meta name="keywords" content="<?=$row[wkey]?>">
  24. <meta name="description" content="<?=$row[wdes]?>">
  25. <title><?=$row[tit]?> - <?=webname?></title>
  26. <? include("../tem/cssjs.html");?>
  27. <? if(empty($rowcontrol[ifwap])){?>
  28. <script language="javascript">
  29. if(is_mobile()) {document.location.href= '<?=weburl?>m/news/txtlist_i<?=$id?>v.html';}
  30. </script>
  31. <? }?>
  32. </head>
  33. <body>
  34. <? include("../tem/openwv.php");?>
  35. <? include("../tem/top.html");?>
  36. <? include("../tem/top1.html");?>
  37. <div class="yjcode">
  38. <? adwhile("ADNV07");?>
  39. <div class="dqwz">
  40. <ul class="u1">
  41. <li class="l1">
  42. 当前位置:<a href="<?=weburl?>">首页</a> > <a href="./">资讯</a> > <a href="newslist_j<?=$row[type1id]?>v.html"><?=returnnewstype(1,$row[type1id])?></a>
  43. <? if(0!=$row[type2id]){?> > <a href="newslist_j<?=$row[type1id]?>v_k<?=$row[type2id]?>v.html"><?=returnnewstype(2,$row[type2id])?></a><? }?>
  44. </li>
  45. </ul>
  46. </div>
  47. <div class="newsmain">
  48. <!--左B-->
  49. <div class="left">
  50. <h1 class="titcap fontyh"><a name="tit"><?=$row[tit]?></a></h1>
  51. <ul class="u1">
  52. <li class="l1">时间:<?=dateYMDHM($row[lastsj])?> 编辑:<?=$row[zze]?> 来源:<a href="<?=returndw($row[lyurl],"","#")?>" class="blue" target="_blank"><?=$row[ly]?></a> 阅读:<?=$row[djl]?></li>
  53. <li class="l2" onMouseOver="objdis(1,'newm')" onMouseOut="objdis(0,'newm')">扫一扫,手机访问</li>
  54. </ul>
  55. <div id="newm" style="display:none;"><? $uw=weburl."m/news/txtlist_i".$row[id]."v.html"; ?><img src="<?=weburl?>tem/getqr.php?u=<?=$uw?>&size=4" /></div>
  56. <div class="zytad"><? adwhile("ADNV03")?></div>
  57. <div class="zhaiy "><strong>摘要:</strong><?=$row[wdes]?></div>
  58. <div class="ntxt"><?=$txt?></div>
  59. <? if(count($t)>1){?>
  60. <div class="txtpage">
  61. <a href="<?=rentser('p',1,'','',"txtlist");?>#tit">第1页</a>
  62. <? for($i=1;$i<=count($t);$i++){?>
  63. <? if($page!=$i){?><a href="<?=rentser('p',$i,'','',"txtlist");?>#tit"><?=$i?></a><? }else{?><strong><?=$i?></strong><? }?>
  64. <? }?>
  65. <a href="<?=rentser('p',count($t),'','',"txtlist");?>#tit">最后1页</a>
  66. </div>
  67. <? }?>
  68. <!--评论B-->
  69. <? $ses="yjcode_newspj where newsbh='".$row[bh]."'";?>
  70. <a name="pj"></a>
  71. <div class="pinlun fontyh">
  72. <ul class="plu1">
  73. <li class="l1"><strong>全部评论</strong>(<?=returncount($ses." and zt=0")?>)</li><li class="l2"></li>
  74. </ul>
  75. <form name="f1" method="post" target="_blank" onSubmit="return newspj()">
  76. <input type="hidden" value="<?=$row[bh]?>" name="bh" />
  77. <ul class="plu0">
  78. <li class="l1"><textarea id="pjt" name="pjt"></textarea></li>
  79. <li class="l3">[<a href="pjlist_i<?=$id?>v.html" target="_blank">展开所有评论</a>]</li>
  80. <li class="l2"><input type="submit" value="发表评论"></li>
  81. </ul>
  82. </form>
  83. <?
  84. if(!empty($_SESSION[SHOPUSER])){
  85. $userid=returnuserid($_SESSION[SHOPUSER]);
  86. while1("*",$ses." and zt=1 and userid=".$userid." order by sj desc");while($row1=mysql_fetch_array($res1)){
  87. $usertx="../upload/".$row1[userid]."/user.jpg";
  88. if(!is_file($usertx)){$usertx="../user/img/nonetx.gif";}
  89. ?>
  90. <div class="pld">
  91. <div class="pld1"><img src="<?=$usertx?>" width="50" height="50" /></div>
  92. <ul class="plu2">
  93. <li class="l1"><?=returnnc($row1[userid])?> <span class="red">(正在审核)</span></li>
  94. <li class="l2"><?=$row1[txt]?></li>
  95. <li class="l3"><?=$row1[sj]?></li>
  96. </ul>
  97. </div>
  98. <? }}?>
  99. <?
  100. while1("*",$ses." and zt=0 order by sj desc limit 10");while($row1=mysql_fetch_array($res1)){
  101. $usertx="../upload/".$row1[userid]."/user.jpg";
  102. if(!is_file($usertx)){$usertx="../user/img/nonetx.gif";}
  103. ?>
  104. <div class="pld">
  105. <div class="pld1"><img src="<?=$usertx?>" width="50" height="50" /></div>
  106. <ul class="plu2">
  107. <li class="l1"><a href="../my/view<?=$row1[userid]?>.html" target="_blank"><?=returnnc($row1[userid])?></a></li>
  108. <li class="l2"><?=$row1[txt]?></li>
  109. <li class="l3"><?=$row1[sj]?></li>
  110. </ul>
  111. </div>
  112. <? }?>
  113. </div>
  114. <!--评论E-->
  115. <div class="nxg">
  116. 上一篇:<?=$pre?><br>
  117. 下一篇:<?=$nex?>
  118. </div>
  119. <div class="lad"><? adwhile("ADNV02");?></div>
  120. <div class="otherxg">
  121. <strong>最新发布的资讯信息</strong><br>
  122. <? while1("*","yjcode_news where zt=0 order by lastsj desc limit 10");while($row1=mysql_fetch_array($res1)){?>
  123. 【<?=returnnewstype(1,$row1[type1id])."|".returnnewstype(2,$row1[type2id])?>】<a href="txtlist_i<?=$row1[id]?>v.html" class="g_ac0"><?=$row1[tit]?></a><span class="hui">(<?=dateYMDHM($row1[lastsj])?>)</span><br>
  124. <? }?>
  125. </div>
  126. </div>
  127. <!--左E-->
  128. <!--右B-->
  129. <div class="right">
  130. <div class="adf"><? adwhile("ADNV01");?></div>
  131. <? include("right.php");?>
  132. </div>
  133. <!--右E-->
  134. </div>
  135. </div>
  136. <? include("../tem/bottom.html");?>
  137. </body>
  138. </html>