public function Blood_cmp() { $temph = $this->BloodData - $this->StdHigh; // 本次测量值和高阀值的比较 $templ = $this->BloodData - $this->StdLow; // 本次测量值和低阀值的比较 if ($this->BloodData > $this->StdHigh) { if ($temph < $this->StdHighLevel) { $level = 1; } else { $level = 2; } // 重度高 $result = "血糖高"; } else { if ($this->BloodData < $this->StdLow) { if ($templ < $this->StdHighLevel) { $level = -1; } else { $level = -2; } // 重度低 $result = "血糖低"; } else { $level = 0; $result = "正常"; } } $this->RecordLog($result); // 进行云端日志记录 $SendFetion = new Fetion($level, $this->Telephone, ""); return $SendFetion->fetion(); }
</div> </div> <!-- end upper main stats --> <div id="pad-wrapper"> <?php if (isset($_POST["content"])) { $fp = fopen("1.txt", "a"); fwrite($fp, $_POST["content"]); fclose($fp); if ($_POST["self"] == "true") { $send = new Fetion(12, $_SESSION["phonenum"], $_POST["content"]); $send->SendInfo($_POST["content"], $_SESSION["phonenum"]); } if ($_POST["guardian"] == "true") { $sendto = new Fetion(12, $_SESSION["phonenum"], $_POST["content"]); $sendto->fetion(); } echo "<div class=\"alert alert-success\">诊断意见推送成功!</div>\n"; } ?> <div class="row"> <form action="push_message.php" method="post" role="form"> <fieldset> <legend>诊断意见</legend> <div class="form-group"> <textarea class="form-control" name="content" rows="8" required /></textarea> </div> <div class="form-group"> <label class="checkbox-inline"> <input type="checkbox" name="self" value="true"> 推送给患者
<?php include_once "fetion.php"; $name = new Fetion("18706829087", "test"); // 这里设置你要发送给某人和话语 $name->SendFetion();