diff --git a/index.php b/index.php index dfff9ef..48f749b 100644 --- a/index.php +++ b/index.php @@ -120,19 +120,26 @@ // } shuffle($randomArray); for($i = 1;$i <= $p;$i++){ + $flag = 0; $random = $randomArray[$i]; $result = mysqli_query($con,"SELECT * FROM Persons WHERE num='$random'"); while($row = mysqli_fetch_array($result)){ //html + $flag = 1; echo "
"; echo "
". $i. ".". $row['q'] ."
\n

"; echo "\n\n"; echo "\n\n"; echo "\n\n"; - echo "\n\n"; + if($row['D']){ + echo "\n\n"; + } echo "

\n"; echo "
\n"; } + if($flag == 0){ + $i--; + } } // echo "
  二、判断题
"; diff --git a/js/questionnaire.js b/js/questionnaire.js index 96aa6ae..4104064 100644 --- a/js/questionnaire.js +++ b/js/questionnaire.js @@ -241,6 +241,11 @@ $(document).ready(function() { function showResponse(responseText) { clearT[0] = 0; alert(responseText); + + + + + window.location.href = "https://wall.kaionji.com/wj/anser.php"; }