<?php $components = $_POST["components"]; $new_keywords = $_POST["new_keywords"]; $tsnum = $_POST["tsnum"]; echo $tsnum; echo "<br/>" . $components; //有用户传来的新关键词 if (strlen($new_keywords) != 0) { echo "<br />" . $new_keywords; } require "database/conn_autocomplaint.php"; //连接数据库 AutoComplaintDB::connect(); $sql = "UPDATE zgqczlw\r\n\t\t\tSET TS_CATEGORY='" . $components . "',TS_KEYWORDS='" . $new_keywords . "'\r\n\t\t\tWHERE TS_NUM=" . $tsnum . ""; $ret = mysql_query($sql); if ($ret) { header("location:tag.php"); } else { echo mysql_error(); } ?> <!DOCTYPE html> <html> <head> <title>缺陷汽车产品投诉信息归类系统</title> <meta charset='utf-8' /> <style> </style> </head>
<?php require 'database/conn_autocomplaint.php'; AutoComplaintDB::connect(); $sql = "SELECT TS_NUM,TS_TITLE,TS_PINPAN, TS_CONTENT FROM qctsw GROUP BY TS_PINPAN"; $result = mysql_query($sql); if ($result) { echo "<table border='1'> \r\n\t\t<tr style='color:#FF0000;'>\r\n\t\t<th>投诉序号</th>\r\n\t\t<th>投诉编号</th>\r\n\t\t<th>投诉标题</th>\r\n\t\t<th>投诉品牌</th>\r\n\t\t<th>投诉内容</th>\r\n\t\t</tr>"; $ix = 0; echo $sql . "\n"; while ($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . ++$ix . "</td>"; echo "<td>" . $row['TS_NUM'] . "</td>"; echo "<td>" . $row['TS_TITLE'] . "</td>"; echo "<td>" . $row['TS_PINPAN'] . "</td>"; echo "<td>" . $row['TS_CONTENT'] . "</td>"; echo "</tr>"; } } else { echo "Error: " . mysql_error(); } ?> <?php AutoComplaintDB::close(); //echo "数据库已关闭";