view.php 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. include("../config/xy.php");
  5. $sj=date("Y-m-d H:i:s");
  6. $myweb=$_GET[str];
  7. if(empty($myweb)){$uid=$_GET[id];$ses="id=".$uid."";}else{$ses="myweb='".$myweb."'";}
  8. $sqluser="select * from yjcode_user where zt=1 and (shopzt=2 or shopzt=4) and ".$ses;mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser);
  9. if(!$rowuser=mysql_fetch_array($resuser)){php_toheader("./");}
  10. if(4==$rowuser[shopzt]){php_toheader(weburl."shop/dqview".$rowuser[id].".html");}
  11. $uid=$rowuser[id];
  12. ?>
  13. <html>
  14. <head>
  15. <meta http-equiv="x-ua-compatible" content="ie=7" />
  16. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  17. <title><?=$rowuser[shopname]?>的网上店铺 - <?=webname?></title>
  18. <? $cssjsty="a";include("../tem/cssjs.html");?>
  19. <link href="<?=weburl?>shop/shop.css" rel="stylesheet" type="text/css" />
  20. <script language="javascript" src="<?=weburl?>shop/js/index.js"></script>
  21. </head>
  22. <body>
  23. <? include("top.php");?>
  24. <script language="javascript">
  25. document.getElementById("shopmenu1").className="a1";
  26. </script>
  27. <? $ses="yjcode_shopbannar where userid=".$rowuser[id]." and zt=0";if(returncount($ses)>0){?>
  28. <!--切换B-->
  29. <div class="banner" id="banner" >
  30. <? $i=0;while1("*",$ses." order by xh asc");while($row1=mysql_fetch_array($res1)){?>
  31. <a href="<?=$row1[aurl]?>" class="d1"<? if(2==$row1[targ]){?> target="_blank"<? }?> style="background:url(../upload/<?=$row1[userid]?>/shopbannar_<?=$row1[bh]?>.jpg) center no-repeat;"></a>
  32. <? $i++;}?>
  33. <div class="d2" id="banner_id">
  34. <ul style="margin-left:-<?=16*$i/2?>px;">
  35. <? for($j=0;$j<$i;$j++){?><li></li><? }?>
  36. </ul>
  37. </div>
  38. </div>
  39. <script type="text/javascript">banner();</script>
  40. <!--切换E-->
  41. <div class="bfb"></div>
  42. <? }?>
  43. <div class="bfb bfbshop">
  44. <div class="yjcode">
  45. <!--左B-->
  46. <? include("left.php");?>
  47. <!--左E-->
  48. <!--右B-->
  49. <div class="iright">
  50. <div class="rcap">
  51. <div class="d1">关于我们</div>
  52. <div class="d2"><a href="<?=weburl?>shop/aboutview<?=$rowuser[id]?>.html">More>></a></div>
  53. </div>
  54. <div class="gywm">
  55. <?=returnjgdw($rowuser[seodes],"","这家伙很懒,没写说明")?>
  56. </div>
  57. <div class="rcap">
  58. <div class="d1">服务项目</div>
  59. <div class="d2"><a href="<?=weburl?>shop/prolist_i<?=$rowuser[id]?>v.html">More>></a></div>
  60. </div>
  61. <div class="fwxm">
  62. <?
  63. while1("*","yjcode_protype where zt=0 and admin=1 and userid=".$uid." order by xh asc");while($row1=mysql_fetch_array($res1)){
  64. ?>
  65. <a href="<?=weburl?>shop/prolist_i<?=$rowuser[id]?>v_j<?=$row1[id]?>v.html"><?=$row1[name1]?></a>
  66. <? }?>
  67. </div>
  68. <div class="rcap">
  69. <div class="d1">最新交易</div>
  70. </div>
  71. <div class="newjy">
  72. <span class="icon"></span>
  73. <ul id="rolltxt">
  74. <? $i=0;while1("*","yjcode_order where (ddzt='wait' or ddzt='db' or ddzt='suc') and selluserid=".$uid." order by sj desc limit 20");while($row1=mysql_fetch_array($res1)){?>
  75. <li><?=returnjiami(returnnc($row1[userid]))?> 购买了 <span class="s1"><?=returntitdian($row1[tit],90)?></span> 单价:<span class="s2">¥<?=$row1[money1]?></span> [<?=returnorderzt($row1[ddzt])?>] </li>
  76. <? $i++;}?>
  77. </ul>
  78. </div>
  79. <span id="jynum" style="display:none;"><?=$i?></span>
  80. <script language="javascript" src="<?=weburl?>shop/jy.js"> </script>
  81. <div class="rcap">
  82. <div class="d1">最新上架</div>
  83. <div class="d2"><a href="<?=weburl?>shop/prolist_i<?=$rowuser[id]?>v.html">More>></a></div>
  84. </div>
  85. <div class="plist">
  86. <?
  87. while1("*","yjcode_pro where userid=".$uid." and zt=0 and ifxj=0 order by lastsj desc limit 8");while($row1=mysql_fetch_array($res1)){
  88. $au="../product/view".$row1[id].".html";
  89. $tp=returntp("bh='".$row1[bh]."' order by iffm desc","-2");
  90. ?>
  91. <ul class="u2">
  92. <li class="l1"><a href="<?=$au?>" target="_blank"><img border="0" title="<?=$row1[tit]?>" src="<?=$tp?>" onerror="this.src='../img/none180x180.gif'" width="180" height="180" /></a></li>
  93. <li class="l2"><strong>¥<?=returnjgdian(returnyhmoney($row1[yhxs],$row1[money2],$row1[money3],$sj,$row1[yhsj1],$row1[yhsj2],$row1[id]))?></strong></li>
  94. <li class="l3"><a href="<?=$au?>" target="_blank" title="<?=$row1[tit]?>"><?=strgb2312($row1[tit],0,50)?></a></li>
  95. <li class="l4">成交:<?=$row1[xsnum]?>次</li>
  96. <li class="l5"><a href="<?=$au?>" target="_blank">立即购买</a></li>
  97. </ul>
  98. <? }?>
  99. </div>
  100. <div class="rcap">
  101. <div class="d1">客户评价</div>
  102. <div class="d2"><a href="<?=weburl?>shop/pjlist_i<?=$rowuser[id]?>v.html">More>></a></div>
  103. </div>
  104. <?
  105. $a1=returncount("yjcode_propj where selluserid=".$uid." and pf1=1")+returncount("yjcode_propj where selluserid=".$uid." and pf2=1")+returncount("yjcode_propj where selluserid=".$uid." and pf3=1");
  106. $a2=returncount("yjcode_propj where selluserid=".$uid." and pf1=2")+returncount("yjcode_propj where selluserid=".$uid." and pf2=2")+returncount("yjcode_propj where selluserid=".$uid." and pf3=2");
  107. $a3=returncount("yjcode_propj where selluserid=".$uid." and pf1=3")+returncount("yjcode_propj where selluserid=".$uid." and pf2=3")+returncount("yjcode_propj where selluserid=".$uid." and pf3=3");
  108. $a4=returncount("yjcode_propj where selluserid=".$uid." and pf1=4")+returncount("yjcode_propj where selluserid=".$uid." and pf2=4")+returncount("yjcode_propj where selluserid=".$uid." and pf3=4");
  109. $a5=returncount("yjcode_propj where selluserid=".$uid." and pf1=5")+returncount("yjcode_propj where selluserid=".$uid." and pf2=5")+returncount("yjcode_propj where selluserid=".$uid." and pf3=5");
  110. $al=$a1+$a2+$a3+$a4+$a5;
  111. if($al==0){$a1v=0;$a2v=0;$a3v=0;$a4v=0;$a5v=0;}
  112. else{
  113. $a1v=sprintf("%.1f",$a1/$al*100);
  114. $a2v=sprintf("%.1f",$a2/$al*100);
  115. $a3v=sprintf("%.1f",$a3/$al*100);
  116. $a4v=sprintf("%.1f",$a4/$al*100);
  117. $a5v=sprintf("%.1f",$a5/$al*100);
  118. }
  119. $hp=returncount("yjcode_propj where selluserid=".$uid." and pjlx=1");
  120. $pa=returncount("yjcode_propj where selluserid=".$uid."");
  121. if($pa==0){$av="100";}else{$av=sprintf("%.2f",$hp/$pa*100);}
  122. ?>
  123. <ul class="pjcap">
  124. <li class="l1"><span>好评率</span><strong><?=$av?>%</strong></li>
  125. <li class="l1"><span>综合得分</span><strong><?=round(($mspf+$fhpf+$shpf)/3,2)?></strong></li>
  126. <li class="l2">描述相符:<span><?=$mspf?></span>分<br>发货速度:<span><?=$fhpf?></span>分<br>服务态度:<span><?=$shpf?></span>分</li>
  127. </ul>
  128. <div class="pjcap1">
  129. <ul class="u1">
  130. <li class="l1"><span class="s0"><img src="<?=weburl?>shop/img/pjf1.gif" /></span><span class="s1"><strong>1</strong>分</span><span class="s2" style="width:<?=returnjgdw($a1v*1.2,"",1)?>px"></span><span class="s3"><?=$a1v?>%</span></li>
  131. <li class="l1"><span class="s0"><img src="<?=weburl?>shop/img/pjf2.gif" /></span><span class="s1"><strong>2</strong>分</span><span class="s2" style="width:<?=returnjgdw($a2v*1.2,"",1)?>px"></span><span class="s3"><?=$a2v?>%</span></li>
  132. <li class="l1"><span class="s0"><img src="<?=weburl?>shop/img/pjf3.gif" /></span><span class="s1"><strong>3</strong>分</span><span class="s2" style="width:<?=returnjgdw($a3v*1.2,"",1)?>px"></span><span class="s3"><?=$a3v?>%</span></li>
  133. <li class="l1"><span class="s0"><img src="<?=weburl?>shop/img/pjf4.gif" /></span><span class="s1"><strong>4</strong>分</span><span class="s2" style="width:<?=returnjgdw($a4v*1.2,"",1)?>px"></span><span class="s3"><?=$a4v?>%</span></li>
  134. <li class="l1"><span class="s0"><img src="<?=weburl?>shop/img/pjf5.gif" /></span><span class="s1"><strong>5</strong>分</span><span class="s2" style="width:<?=returnjgdw($a5v*1.2,"",1)?>px"></span><span class="s3"><?=$a5v?>%</span></li>
  135. </ul>
  136. </div>
  137. <?
  138. while1("*","yjcode_propj where selluserid=".$uid." order by sj desc limit 10");while($row1=mysql_fetch_array($res1)){
  139. $usertx="../upload/".$row1[userid]."/user.jpg";
  140. if(!is_file($usertx)){$usertx="../user/img/nonetx.gif";}else{$usertx=$usertx."?id=".rnd_num(1000);}
  141. $pjlx=returnjgdw($row1[pjlx],"",1);
  142. if($pjlx==1){$pj="好评";}
  143. elseif($pjlx==2){$pj="一般";}
  144. elseif($pjlx==3){$pj="差评";}
  145. ?>
  146. <div class="pj pj<?=$pjlx?>">
  147. <ul class="u1"><li class="l1"><img src="../user/img/nonetx.gif" width="50" height="50" /></li><li class="l2"><?=returnjiami(returnnc($row1[userid]))?></li></ul>
  148. <ul class="u2">
  149. <li class="l1">
  150. <?=strip_tags($row1[txt])?><br>
  151. <?
  152. if(1==$row1[iftp]){
  153. while2("*","yjcode_tp where bh='".$row1[orderbh]."' order by xh asc");while($row2=mysql_fetch_array($res2)){$tp="../".str_replace(".","-1.",$row2[tp]);
  154. ?>
  155. <a href="../<?=$row2[tp]?>" target="_blank"><img src="<?=$tp?>" width="50" height="50" /></a>&nbsp;&nbsp;
  156. <? }}?>
  157. </li>
  158. <li class="l3"><?=$row1[sj]?></li>
  159. </ul>
  160. <div class="d2"><span class="s<?=$pjlx?>"><?=$pj?></span></div>
  161. </div>
  162. <? }?>
  163. </div>
  164. <!--右E-->
  165. </div>
  166. </div>
  167. <? include("../tem/bottom.html");?>
  168. </body>
  169. </html>