$contect .= "<td height='100' width='80%' class=span_label ><textarea id='contect' style='width:80%;height:60'></textarea></td>"; $contect .= "</tr>"; $contect .= "<tr class=InputFrameLine>"; $contect .= "<td height='30' width='20%' align=right class=form_label></td>"; $contect .= "<td height='30' width='80%' class=span_label ><input type='button' value='提交结果' onclick='tj()'/></td>"; $contect .= "</tr>"; $contect .= "</table>"; } $beginpage = ($page - 1) * 10; $contect .= "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"; $k = 0; $query = "select * from tb_memberhf where fd_memberhf_memid = '{$memid}' order by fd_memberhf_datetime desc limit {$beginpage},10\n"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $staname = $db->f(fd_memberhf_loginstaname); $hfdate = $db->f(fd_memberhf_datetime); $hfcontect = $db->f(fd_memberhf_contect); $contect .= "<tr height='50'>"; $contect .= "<td nowrap style='padding-left:40px' >回访客服:" . $staname . "</td>"; $contect .= "<td nowrap >回访日期:" . $hfdate . "</td>"; $contect .= "</tr>"; $contect .= "<tr height='40'>"; $contect .= "<td id='hfwidth' colspan=2 style='word-break:break-all;word-wrap:break-word;border-bottom:1px dotted #d1d1d1' style='padding-left:40px;color:#0000ff'>" . $hfcontect . "</td>"; $contect .= "</tr>"; $k++; } } if ($k == 0) { $contect .= "<tr><td nowrap colspan=32 height=50>没有任何数据……</td></tr>"; }
if (!empty($atcompany)) { $atcompany = iconv('utf-8', 'gbk', unescape($atcompany)); $querywhere .= " and fd_webcus_name like '%{$atcompany}%'"; } if (!empty($atcity)) { $atcity = iconv('utf-8', 'gbk', unescape($atcity)); $querywhere .= " and (fd_provinces_name like '%{$atcity}%' or fd_city_name like '%{$atcity}%')"; } $beginpage = ($page - 1) * $pagecount; //会员资料 $query = "select fd_webcus_id,fd_webcus_allname,\n fd_city_name , fd_webcus_newtime as joindate ,fd_provinces_name ,\n fd_webcus_lasthfdate as lasthf,fd_webcus_lasthfcontect\n\tfrom tb_webcustomer \n\tleft join tb_city on fd_city_code = fd_webcus_city\n\tleft join tb_provinces on fd_provinces_code = fd_webcus_provinces\n\twhere fd_webcus_erpcusid <> 0 {$querywhere} order by {$sort} {$sorttype} limit {$beginpage},{$pagecount}\n\t"; $db->query($query); if ($db->nf()) { $v = 0; while ($db->next_record()) { $cusid = $db->f(fd_webcus_id); if ($v == 0) { $vv = "where fd_webcus_id = '{$cusid}'"; } else { $vv .= " or fd_webcus_id = '{$cusid}'"; } $arr_memname[$cusid] = $db->f(fd_webcus_allname); $arr_linkman[$cusid] = @implode("<br>", $arr_linkman_t[$cusid]); $arr_phone[$cusid] = @implode("<br>", $arr_linkphone_t[$cusid]); $arr_city[$cusid] = $db->f(fd_provinces_name) . $db->f(fd_city_name); $arr_joindate[$cusid] = $db->f(joindate); $arr_lasthf[$cusid] = $db->f(lasthf); $arr_memhf[$cusid] = $db->f(fd_webcus_lasthfcontect); $v++; } }
<?php require "../include/common.inc.php"; $db = new DB_test(); $db1 = new DB_test(); $db2 = new DB_test(); $dberp = new DB_erptest(); $query = "select * from web_order where fd_order_seltdate='2012-12-04' and fd_order_zf=0"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $orderid = $db->f(fd_order_id); $arr_web[$orderid] = $db->f(fd_order_allcost); $sumweb += number_format($db->f(fd_order_allcost), 2, ".", ""); } } $query = "select * from tb_salelist where fd_selt_date='2012-12-04' and fd_selt_organid = 1 "; $dberp->query($query); if ($dberp->nf()) { while ($dberp->next_record()) { $orderid = $dberp->f(fd_selt_weborderid); $arr_erp[$orderid] = number_format($dberp->f(fd_selt_allcost), 2, ".", ""); $sumerp += number_format($dberp->f(fd_selt_allcost), 2, ".", ""); } } echo $sumweb . "##" . $sumerp . "<br>"; while (list($orderid, $val) = @each($arr_web)) { if ($arr_web[$orderid] != $arr_erp[$orderid]) { echo $orderid . "&&" . $arr_web[$orderid] . "!=" . $arr_erp[$orderid] . "<br>"; } }