</ul> <div class="move-bg"></div> </div> </div> <div class="daohang"> <div class="menu"> <ul> <li class="menu-item"><a href="http://localhost/healthyone/view/consult.php">专家列表</a></li> <li class="menu-item_cur"><a href="http://localhost/healthyone/view/myAdvice.php">咨询建议</a></li> </ul> </div> </div> <div class="content"> <?php require '../model/consultService.class.php'; $res = ConsultService::find($username); while ($item = $res->fetchArray(SQLITE3_ASSOC)) { if ($item['ADVICE'] == "") { $advice = "待回复"; } else { $advice = $item['ADVICE']; } echo "\t<div class='item1'> \n\t\t<form name='consult' method='post' action='http://localhost/healthyOne/controller/consultProcess.php'>\n\t\t\t<p class='name'><b>" . $item['CONSULTED'] . "</p><b>\n  问题</b> <p class='dialog'>" . $item['PROBLEM'] . "</p><b>\n  建议 </b> <p class='dialog'>{$advice}</p>"; echo "</form>"; echo "</div>"; } ?> </div> <script> $(function(){ $(".nav").movebg({width:120/*滑块的大小*/,extra:40/*额外反弹的距离*/,speed:300/*滑块移动的速度*/,rebound_speed:400/*滑块反弹的速度*/});
$file = $_POST['uploadfile']; if (substr($file, -4) == ".txt") { $myfile = fopen($file, "r") or die("Unable to open file!"); $advice = fread($myfile, filesize("{$file}")); fclose($myfile); } } $res = ConsultService::advice($id, $advice); header("Location: http://localhost/healthyone/view/consultManage.php?"); } if ($_GET['operation'] == 2) { if (isset($_POST['uploadfile'])) { $file = $_POST['uploadfile']; if (substr($file, -4) == ".xml") { $doc = new DOMDocument(); $doc->load($file); $advices = $doc->getElementsByTagName("advice"); foreach ($advices as $advice) { $users = $advice->getElementsByTagName("user"); $user = $users->item(0)->nodeValue; $contents = $advice->getElementsByTagName("content"); $content = $contents->item(0)->nodeValue; echo $user; $res = ConsultService::advice($user, $content); } header("Location: http://localhost/healthyone/view/consultManage.php"); } } } } }