Server IP : 172.16.15.8 / Your IP : 18.118.149.55 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/zwang/.nautilus/../ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<HEAD><link rel="stylesheet" type="text/css" href="Hisstyles.css"></HEAD> <BODY> <?php $host = localhost; $user = bnhans; $pass = cs480; $database = bnhans; $pain0 = $_POST['pain0']; $pain1 = $_POST['pain1']; $pain2 = $_POST['pain2']; $pain3 = $_POST['pain3']; $pain4 = $_POST['pain4']; $pain5 = $_POST['pain5']; $pain6 = $_POST['pain6']; $pain7 = $_POST['pain7']; $pain8 = $_POST['pain8']; $pain9 = $_POST['pain9']; if ( (count($pain0) < 1) && (count($pain1) < 1) && (count($pain2) < 1) && (count($pain3) < 1) && (count($pain4) < 1) && (count($pain5) < 1) && (count($pain6) < 1) && (count($pain7) < 1) && (count($pain8) < 1) && (count($pain9) < 1)) { $_SESSION['error'] = "Error: No symptoms selected."; $error = $_SESSION['error']; print "<B><FONT SIZE=4 COLOR=RED>$error <BR>"; print "You will be redirected to the acupuncture front page in 5 seconds.</B></FONT><BR>"; print "If you are not redirected, please <A HREF=AcuFront.html>Click Here</A>."; print '<META HTTP-EQUIV="Refresh" Content="5; URL=AcuFront.html">'; } else { $menu0 = array('Frontal Headache', 'Back of the Head', 'Side of the Head', 'Top of the Head', 'Pain in the Eye'); $menu1 = array('Jaw', 'Toothache', 'Ear', 'Neck', 'Shoulder', 'Wrist', 'Hand', 'Backache', 'Hip', 'Knee', 'Ankle', 'Foot'); $menu2 = array('Sore Throat', 'Sinusitis', 'Loss of Voice', 'Earaches', 'Allergy'); $menu3 = array('Anxiety Attacks and Nervousness', 'Depression', 'Insomnia', 'Fainting', 'Hiccoughs', 'Memory and Concentration Improvement'); $menu4 = array('Angina', 'Palpitations', 'High Blood Pressure Treatment'); $menu5 = array('Constipation', 'Diarrhea', 'Heartburn', 'Stomachache'); $menu6 = array('PMS and Painful Periods', 'Hot Flashes', 'Acupressure During Pregnancy'); $menu7 = array('Bed-wetting', 'Incontinence', 'Urinary Retention'); $menu8 = array('Weight Loss', 'Nose Bleeding', 'Allergy', 'Itching', 'Asthma', 'Decreased Libido', 'Hangover Treatment'); $query = "Select * From ProjectDatabase2 WHERE"; for ($i = 0; $i <9; $i++) { if (count(${"pain".$i}) > 0) { foreach (${"pain".$i} as $sympt) { $matchedmenu = ${"menu" . $i}; if (strpos( $query, "Symptom=") !== false) { $query = $query . " OR Symptom='$matchedmenu[$sympt]'"; } else $query = $query . " Symptom='$matchedmenu[$sympt]'"; } unset($matchedmenu); } } ?> <H1>Symptoms Results</H1> Below are the results of your diagnosis. Start with the first step of the first Symptom listed.<BR> Reading the table left to right, fully complete one symptom before moving onto the next syptom listed. <BR>By clicking on the words listed in the step boxes you will be redirected in a new window that explains in detail the proper execution of the step given.<BR> After preforming the directions please close the window to advance to the next step.<BR> (EXAMPLE: You have a headache, ear pain and you have lost your voice. You would begin with the headache symptoms, fully complete steps 1-12 by clicking each step.<BR> After fully completing all 12 steps for headache you can then move on to the ear pain symptoms repeating the same process.) <br><hr> <?php function Tablemake($host, $user, $pass, $database, $query) // This function will make tables for you, just supply the 5 variabless { $connect = mysqli_connect($host, $user, $pass); mysqli_select_db($connect, $database); $result = mysqli_query($connect, $query); $result2 = mysqli_query($connect, $query); // if ($result) // { $max = 0; while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) { for ($m = 0; $m < 18; $m++) { if ($row[$m] !== "NULL") $tmax = $m; } if ($tmax > $max) $max = $tmax + 1; } print "<TABLE BORDER=1>"; print "<th>Symptom"; for ($i = 1; $i < $max; $i++) print "<th>Step $i"; while ($row2 = mysqli_fetch_array($result2, MYSQLI_NUM)) { print "<tr>"; print "<td><b><CENTER>$row2[0]</CENTER></b></td>"; for ($j = 1; $j <18; $j++) { if ($j < $max) { if ( $row2[$j] !== "NULL") { $linknum = $j + 17; $link = $row2[$linknum]; $point = $row2[$j]; print "<td><CENTER><A href=$link target=_blank> $point </A></CENTER></td>"; } else { print "<td><center>-</center></td>"; } } } print "</tr>"; } print "</TABLE>"; // } } Tablemake($host, $user, $pass, $database, $query); } print"<BR><A HREF=AcuFront.html> Home Screen </A>"; ?> </BODY>