zencart 添加评论回复功能\admin\reviews.php怎么添加

 我来答
龙氏风采
2016-12-18 · 知道合伙人互联网行家
龙氏风采
知道合伙人互联网行家
采纳数:5849 获赞数:12817
从事互联网运营推广,5年以上互联网运营推广经验,丰富的实战经

向TA提问 私信TA
展开全部
  void function(e,t){for(var n=t.getElementsByTagName("img"),a=+new Date,i=[],o=function(){this.removeEventListener&&this.removeEventListener("load",o,!1),i.push({img:this,time:+new Date})},s=0;s< n.length;s++)!function(){var e=n[s];e.addEventListener?!e.complete&&e.addEventListener("load",o,!1):e.attachEvent&&e.attachEvent("onreadystatechange",function(){"complete"==e.readyState&&o.call(e,o)})}();alog("speed.set",{fsItems:i,fs:a})}(window,document);
  $rID?=?zen_db_prepare_input($_GET['rID']);?
  ?
  $reviews?=?$db->Execute("select?r.reviews_id,?r.products_id,?r.customers_name,?r.customers_email,r.customers_ip,?r.date_added,?r.last_modified,?r.reviews_read,?rd.reviews_text,rd.reviews_reply,?r.reviews_rating?
  from?"?.?TABLE_REVIEWS?.?"?r,?"?.?TABLE_REVIEWS_DESCRIPTION?.?"?rd?where?r.reviews_id?=?'"?.?(int)$rID?.?"'?and?r.reviews_id?=?rd.reviews_id");?
  ???
  <td?class="main"><b><?php?echo?ENTRY_RATING;??></b> <?php?echo?zen_image(DIR_WS_TEMPLATE_IMAGES?.?'stars_'?.?$rInfo->reviews_rating?.?'.gif',?sprintf?
  ?
  (TEXT_OF_5_STARS,?
  $rInfo->reviews_rating));??> <small>[<?php?echo?
  sprintf(TEXT_OF_5_STARS,?$rInfo->reviews_rating);??>]</small>?<?php?if($rInfo->reviews_reply!=?null){?>?
  <?php?echo?'<br?/><DIV?class="reviews_reply"><b>Reply:</b>?
  '.nl2br(zen_db_output(zen_break_string($rInfo->reviews_reply,15))).'</DIV>'?>?<?php?}?>?
  ?
  </td>?
  3.?//文件:
  \includes\modules\pages\product_reviews_write\header_php.php?//功能:保存客户IP,客户EMAIL(修正原版本BUG)?
  $customers_ip?=???$_SESSION['customers_ip_address'];????
  $sql?=?"INSERT?INTO?"?.?TABLE_REVIEWS?.?"?(products_id,?customers_id,customers_email,review_title,customers_name,?reviews_rating,?date_added,?status,customers_ip)?VALUES?
  (:productsID,?:customersID,:customers_email,:review_title,?:customersName,?:rating,?now(),?"?.?$review_status?.?",:customers_ip)";??
  var cpro_psid ="u2572954"; var cpro_pswidth =966; var cpro_psheight =120;
  $sql?=?$db->bindVars($sql,?':productsID',?$_GET['products_id'],?'integer');?
  $sql?=?$db->bindVars($sql,?':customersID',?(isset($_SESSION['customer_id'])?||?
  $_SESSION['customer_id']=="")?0:$_SESSION['customer_id'],?'integer');?
  //?$sql?=?$db->bindVars($sql,?':customersName',?$customer->fields['customers_firstname']?.?'?'?.?$customer->fields['customers_lastname'],?'string');?
  $sql?=?$db->bindVars($sql,?':customers_email',?$customer_email,?'string');?
  $sql?=?$db->bindVars($sql,?':review_title',?$review_title,?'string');?
  $sql?=?$db->bindVars($sql,?':customersName',$customer_name,?'string');?
  $sql?=?$db->bindVars($sql,?':rating',?$rating,?'string');?$sql?=?$db->bindVars($sql,?':customers_ip',?$customers_ip,?'string');??
  $db->Execute($sql);?
  ??
  ?4.?//
  文
  件
  :
  \includes\templates\ezppt\templates\tpl_product_reviews_default.php?//功能:显示reviews_reply内容?
  <br?/>?
  <?php?if($reviews['reviewsReply']?!=?null){?>?<?php?echo?'<DIV?class="reviews_reply">Reply:?'.$reviews['reviewsReply']?.'</DIV>'?>?<?php?}?>?
  5.//文件:\includes\modules\pages\product_info\header_php.php?//功能:读取reviews_reply字段并赋值?
  $reviews_query_raw?=?"SELECT?r.reviews_id,?left(rd.reviews_text,?400)?as?reviews_text,?r.reviews_rating,?r.date_added,?r.customers_name,rd.reviews_reply????????????????????????
  var cpro_id = "u2845472";
  ?
  FROM?"?.?TABLE_REVIEWS?.?"?r,?"?.?TABLE_REVIEWS_DESCRIPTION?.?"?rd?WHERE?r.products_id?=?:productsID?AND?r.reviews_id?=?rd.reviews_id?
  AND?rd.languages_id?=?:languagesID?"?.?$review_status?.?"?ORDER?BY?r.reviews_id?desc";?
  ?
  $reviews_query_raw?=?$db->bindVars($reviews_query_raw,?':productsID',?$_GET['products_id'],?'integer');?
  $reviews_query_raw?=?$db->bindVars($reviews_query_raw,?':languagesID',?$_SESSION['languages_id'],?'integer');?$reviews_split?=?new?splitPageResults($reviews_query_raw,?MAX_DISPLAY_NEW_REVIEWS);?
  $reviews?=?$db->Execute($reviews_split->sql_query);?$reviewsArray?=?array();?while?(!$reviews->EOF)?{?
  $reviewsArray[]?=?array('id'=>$reviews->fields['reviews_id'],?'customersName'=>$reviews->fields['customers_name'],?'dateAdded'=>$reviews->fields['date_added'],?
  'reviewsText'=>$reviews->fields['reviews_text'],?
  'reviewsReply'=>$reviews->fields['reviews_reply'],//@steven?added?'reviewsRating'=>$reviews->fields['reviews_rating']);?$reviews->MoveNext();?}?
  //注意,以上代码并非连续的,请在适当位置进行修改.?引
  用
  :
  http://hi.baidu.com/lxq73061/blog/item/3245470f1f5f83246059f3da.html
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式