本文整理汇总了PHP中put_errormsg函数的典型用法代码示例。如果您正苦于以下问题:PHP put_errormsg函数的具体用法?PHP put_errormsg怎么用?PHP put_errormsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了put_errormsg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_start
*Copyrighted 2015-2016 by Michael Avila *
*Distributed under the terms of the GNU General Public License *
*This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
*****************************************************************/
session_start();
$background = "3";
$logFileName = "user";
$headerTitle = "USER LOG";
$refresh = "<meta http-equiv=\"refresh\" content=\"30\";>";
require_once "includes/header1.inc";
require_once "includes/header2.inc";
require_once "includes/common.inc";
echo "<br><br><center>This page will automatically refresh every 30 seconds</center>";
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$sql = "SELECT * FROM `petclinicsys`.`usersol`;";
$result = $mysqli->query($sql);
$row_cnt = $result->num_rows;
if ($row_cnt == 0) {
put_errormsg("There are no Users Logged In");
redirect("sysadmin.php");
exit;
}
for ($i = 0; $i < $row_cnt; $i++) {
$row = $result->fetch_row();
echo "<br>" . $row[0] . " " . $row[1] . " " . $row[2];
}
echo "<form method=\"post\" action=\"sysadmin.php\"><center><input type=\"submit\" value=\"Return to Sys Admin Menu\"></center></form>";
$display = "sysloggedin";
require_once "includes/footer.inc";
示例2: mysqli
$doctordea = '';
$doctorstatus = 'A';
echo '<div class="center"><h2>Doctor Entry</h2></div>';
echo '<div id="formContainer">';
echo '<div id="formLeftSide"><br>';
echo '<div>Current list of Doctors</div><br>';
echo '<select name="doclist" size="5">';
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$sql = "SELECT * FROM `petcliniccorp`.`doctors`;";
$result = $mysqli->query($sql);
if ($result == FALSE) {
put_errormsg("Cannot access doctors table");
} else {
$row_cnt = $result->num_rows;
if ($row_cnt == 0) {
put_errormsg("There are no Doctors in the database");
} else {
while ($row = $result->fetch_row()) {
echo '<option value="' . $row[0] . '">' . sprintf("%3s", $row[0]) . " " . $row[1] . '</option>';
}
}
}
$mysqli->close();
echo '</select></div>';
echo '<div id="formRightSide"><br>';
echo '<form id="docform0" name="docform0" action="doctors1.php" method="post">';
echo '<table class="center" width="100%">';
echo '<tr><td>Enter the Doctor Number to be edited.</td></tr>';
echo '<tr><td><input type="text" name="editdocnum" size="5" maxlength="5"></td></tr>';
echo '<tr><td><input type="submit" value="Edit Requested Doctor"></td></tr></table></form><br>';
echo '<form id="docform1" name="docform1" action="doctors1.php" method="post">';
示例3: redirect
redirect("invmedbase.php");
exit;
}
if (isset($_POST['wherebought'])) {
$wherebought = $_POST['wherebought'];
} else {
put_errormsg("A Vendor must be selected for where bought");
redirect("invmedbase.php");
exit;
}
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$emplnumber = $_SESSION["employeenumber"];
echo $wherebought;
$quesmark = strpos($wherebought, "?");
$vendorid = substr($wherebought, 0, $quesmark);
$wherebought = substr($wherebought, $quesmark + 1);
$sql = 'INSERT INTO `petclinicinv`.`invmedicine` (`meddesc`, `vendorid`, `wherebought`, `purdate`, `cartoncost`, `cartonspurch`, `containercarton`, ';
$sql = $sql . '`itemscontainer`, `itemcost`, `containercost`, `itemreorderlevel`, `itemmarkup`, `containermarkup`, `itemsalesprice`, ';
$sql = $sql . '`containersalesprice`, `taxable`, `status`, `changeid`) ';
$sql = $sql . ' VALUES("' . $desc . '", ' . $vendorid . ', "' . $wherebought . '", ' . $purchdate . ', ' . $cartoncost . ', ' . $cartonspurch . ', ' . $contcarton . ', ';
$sql = $sql . $itemcont . ', ' . $itemcost . ', ' . $contcost . ', ' . $itemreorder . ', ' . $itemmarkup . ', ' . $contmarkup . ', ' . $itemsales . ', ';
$sql = $sql . $contsales . ', "' . $taxable . '", "A", ' . $emplnumber . ');';
if ($mysqli->query($sql) === TRUE) {
} else {
put_errormsg("Table invmedicine data insertion failed" . $mysqli->error);
redirect("invmedbase.php");
exit(1);
}
$mysqli->close();
delete_errormsg();
redirect("invmedbase.php");
示例4: serialize
$visitserialarray = serialize($visitarray);
setcookie("visitarray", $visitserialarray, time() + 1);
if (strlen($date) != 8) {
put_errormsg("The Date must be entered");
redirect("visitsnew1.php");
exit;
}
if ($save == "draft") {
$filename = "draftPet" . $petid . ".txt";
$fh = fopen("./notes/" . $filename, "wbt");
fwrite($fh, $visitserialarray . "\n");
fclose($fh);
if ($prefilename != "") {
unlink("./notes/" . $prefilename);
}
put_errormsg("The Draft file has been created (" . $filename . ")");
redirect("visits.php");
exit;
}
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$emplnumber = $_SESSION["employeenumber"];
$sql = "INSERT INTO `petclinic`.`visit` (`visitdate`, `petnumber`, `temp`, `weight`, `pulse`, `respiration`, `panting`, `caprefill`, `mucous`, `hydration`, ";
$sql = $sql . "`clinicalstay`, `clinicaldischarge`, `changeid`) ";
$sql = $sql . "VALUES (\"" . $date . "\", \"" . $petid . "\", \"" . $temp . "\", \"" . $weight . "\", \"" . $pulse . "\", \"" . $resp . "\", \"" . $pant . "\", \"" . $caprefill . "\", ";
$sql = $sql . "\"" . $mucous . "\", \"" . $hydration . "\", \"" . $stay . "\", \"" . $discharge . "\", " . $emplnumber . ");";
if ($mysqli->query($sql) === TRUE) {
$visitnumber = $mysqli->insert_id;
} else {
echo "Table visit data insertion failed" . $mysqli->error;
exit(1);
}
示例5: put_errormsg
if (empty($_POST["procdesc"])) {
put_errormsg("Procedure Description cannot be blank");
redirect("procmaint.php");
exit;
} else {
$procdesc = $_POST["procdesc"];
}
if (empty($_POST["proctype"])) {
put_errormsg("Procedure Type cannot be blank");
redirect("procmaint.php");
exit;
} else {
$proctype = $_POST["proctype"];
}
if (empty($_POST["procstatus"])) {
put_errormsg("Status cannot be blank");
redirect("procmaint.php");
exit;
} else {
$procstatus = $_POST["procstatus"];
}
//if ($status <> "A") {
//}
$emplnumber = $_SESSION['employeenumber'];
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
if ($proccode != "new") {
$sql = "UPDATE procedures SET `petclinicproc`.`proccode` = \"" . $proccode . "\", `procdesc` = \"" . $procdesc . "\", `proctype` = \"" . $proctype . "\", `procstatus` = \"" . $procstatus . "\", ";
$sql = $sql . "`changeid` = " . $emplnumber . " WHERE proccode = \"" . $proccode . "\";";
if ($mysqli->query($sql) === TRUE) {
} else {
echo "Table procedure data update failed" . $mysqli->error;
示例6: mysqli
echo "</form></center>";
exit;
}
if ($u = "y") {
$baserec = $_GET["baserec"];
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$sql = "SELECT * FROM `petclinicinv`.`invmedicine` WHERE `medid` = " . $baserec . ";";
$result = $mysqli->query($sql);
if ($result == FALSE) {
put_errormsg("Invalid medid");
redirect("invmedmenu.php");
exit;
}
$row_cnt = $result->num_rows;
if ($row_cnt == 0) {
put_errormsg("Invalid medid");
redirect("invmedmenu.php");
exit;
}
$row = $result->fetch_row();
/*
`medid` integer (5) NOT NULL AUTO_INCREMENT,
`meddesc` varchar(32) NOT NULL,
`vendorid` integer(11),
`wherebought` varchar(50),
`purdate` integer(8),
`cartoncost` decimal(5,2),
`cartonspurch` integer(3),
`containercarton` integer(3) NOT NULL,
`itemscontainer` integer(4) NOT NULL,
`itemcost` decimal(5,2),
示例7: mysqli
require_once "includes/footer.inc";
exit;
}
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
if ($proccode != "new") {
$sql = "SELECT proccode, procdesc, proctype, procstatus, changeid";
$sql = $sql . " FROM `petclinicproc`.`procedures` WHERE proccode = " . $proccode;
$result = $mysqli->query($sql);
if ($result == FALSE) {
put_errormsg("Invalid Procedure Code " . $proccode . " / " . $mysqli->error);
redirect("procmaint.php");
exit;
}
$row_cnt = $result->num_rows;
if ($row_cnt == 0) {
put_errormsg("Invalid Procedure Code");
redirect("procmaint.php");
exit;
}
delete_errormsg();
for ($i = 0; $i < $row_cnt; $i++) {
$row = $result->fetch_row();
$proccode = $row[0];
$procdesc = $row[1];
$procbillcharge = $row[2];
$procstatus = $row[3];
$changeid = $row[4];
}
}
$errormsg = get_errormsg();
if ($proccode == "new") {
示例8: mc_decrypt
if (isset($_GET["pass"])) {
$pass = $_GET["pass"];
}
if ($pass == 2) {
$background = "0";
require_once "includes/header1.inc";
require_once "includes/header2.inc";
echo "<center><form action=\"pwdreset2.php?pass=3\" method=\"post\"><table border=\"0\" width=\"60%\">";
echo "<tr><td>";
$question = mc_decrypt($question, ENCRYPTION_KEY);
echo $question;
echo "</td><td><input type=\"text\" name=\"answer\" size=\"40\" maxlength=\"40\"></td></tr>";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Submit Answer\"></td></tr>";
echo "</table></form></center>";
$display = "Pwdreset2";
require_once "includes/footer.inc";
exit;
}
if ($pass == 3) {
$hashanswer = mc_decrypt($answer, ENCRYPTION_KEY);
$answer = $_POST["answer"];
if ($answer != $hashanswer) {
put_errormsg("Your answer is not correct");
redirect("pwdreset.php");
exit;
}
}
delete_errormsg();
redirect("newpassword.php");
?>
?
示例9: mysqli
$coname = $_POST["coname"];
$address1 = $_POST["address1"];
$address2 = $_POST["address2"];
$city = $_POST["city"];
$state = $_POST["state"];
$zipcode = $_POST["zipcode"];
$telephone = $_POST["telephone"];
$fax = $_POST["fax"];
$logo = $_POST["logo"];
$license = $_POST["license"];
$statetax = $_POST["statetax"];
$mysqlic = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$address1 = mc_encrypt($address1, ENCRYPTION_KEY);
if (strlen($address2) > 0) {
$address2 = mc_encrypt($address2, ENCRYPTION_KEY);
} else {
$address2 = "";
}
$city = mc_encrypt($city, ENCRYPTION_KEY);
$emplnumber = $_SESSION['employeenumber'];
$sql = "UPDATE `petcliniccorp`.`company` SET `name` = \"" . $coname . "\", `address` = \"" . $address1 . "\", `address2` = \"" . $address2 . "\", `city` = \"" . $city . "\", `state` = \"" . $state . "\", `zipcode` = \"" . $zipcode;
$sql = $sql . "\", `telephone` = \"" . $telephone . "\", `fax` = \"" . $fax . "\", `logo` = \"" . $logo . "\", `businesslic` = \"" . $license . "\", `statetax` = \"" . $statetax . "\", ";
$sql = $sql . "changeid={$emplnumber};";
if ($mysqlic->query($sql) === TRUE) {
} else {
put_errormsg("Company update failed" . $mysqlic->error);
redirect("criticalerror.php?m=corpinfo1.php&ec=0");
}
$mysqlic->close();
delete_errormsg();
redirect("corpinfo.php");
示例10: mysqli
$mysqlic = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$sql = "SELECT `sk22` FROM `petcliniccorp`.`seckeys` WHERE `emplnumber` = {$emplnumber} and `sequence` = 1;";
$resultc = $mysqlic->query($sql);
$row_cnt_c = $resultc->num_rows;
$rowc = $resultc->fetch_row();
$sk22 = $rowc[0];
$mysqlic->close();
$result = $mysqli->query($sql1);
if ($result == FALSE) {
put_erormsg("There are no Pets (false)");
redirect("listings.php");
exit;
}
$row_cnt = $result->num_rows;
if ($row_cnt == 0) {
put_errormsg("There are no Pets (count)");
exit;
}
if ($sk22 == "Y") {
echo "Clicking on the Pet Number will take you to a display to edit that Pet.<hr>";
}
delete_errormsg();
while ($row = $result->fetch_row()) {
$row1 = "Pet # ";
if ($sk22 == "Y") {
$row1 = $row1 . '<a href="petmaint.php?editpetnum="' . $row[0] . '">' . $row[0] . '</a>';
} else {
$row1 = $row1 . $row[0] . " ";
}
$row1 = $row1 . ", Name is " . $row[1] . " ";
$sql2 = "SELECT ";
示例11: put_errormsg
echo $errormsg;
echo "</center>";
exit;
}
if (!isset($_POST["client"])) {
put_errormsg("You must enter a Client Number");
redirect("visitsnew.php");
exit;
} else {
$client = $_POST["client"];
}
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$sql = "SELECT * FROM `petclinic`.`clientpet` WHERE `clientnumber` = " . $client . ";";
$result = $mysqli->query($sql);
if ($result == FALSE) {
put_errormsg("That Clients has no Pets");
redirect("visitsnew.php");
$mysqli->close();
exit;
}
echo "<br><br>";
if (isset($_POST["procdb"])) {
$procdb = $_POST["procdb"];
} else {
$procdb = "N";
}
$row_cnt = $result->num_rows;
for ($i = 0; $i < $row_cnt; $i++) {
$row = $result->fetch_row();
$sql = "SELECT * FROM `petclinic`.`pet` WHERE `petnumber` = " . $row[1] . ";";
$result2 = $mysqli->query($sql);
示例12: mysqli
}
if (isset($_POST["docdea"])) {
$docdea = $_POST["docdea"];
} else {
$docdea = "";
}
if (isset($_POST["doctorstatus"])) {
$doctorstatus = $_POST["doctorstatus"];
} else {
$doctorstatus = "A";
}
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
if ($docnumber != "new") {
$sql = "UPDATE `petcliniccorp`.`doctors` SET `doctordesc` = '{$doctorinfo}', `doctorstatelic` = '{$docstatelic}', `doctordealic` = '{$docdea}', `doctorstatus` = '{$doctorstatus}' WHERE `doctorid` = '{$docnumber}';";
if ($mysqli->query($sql) === TRUE) {
} else {
put_errormessage("Table employee data update failed" . $mysqli->error);
redirect("criticalerror.php?m=doctors2.php&ec=0");
exit(1);
}
} else {
$sql = "INSERT INTO `petcliniccorp`.`doctors` (`doctordesc`, `doctorstatelic`, `doctordealic`, `doctorstatus`) VALUES ('{$doctorinfo}', '{$docstatelic}', '{$docdea}', '{$doctorstatus}');";
if ($mysqli->query($sql) === TRUE) {
} else {
put_errormsg("Table employee data insertion failed" . $mysqli->error);
redirect("criticalerror.php?m=doctors2.php&ec=0");
exit(1);
}
}
$mysqli->close();
delete_errormsg();
示例13: mysqli
$headerTitle = "USER LOG";
require_once "includes/header1.inc";
require_once "includes/header2.inc";
require_once "includes/common.inc";
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$emplid = $_SESSION['employeenumber'];
$sql = "SELECT emplnumber, lname, fname, address, address2, city, state, zipcode FROM `petcliniccorp`.`employee` WHERE emplnumber = " . $emplid;
$result = $mysqli->query($sql);
if ($result == FALSE) {
put_errormsg("You are not listed. Internal error.");
redirect("listings.php");
exit;
}
$row_cnt = $result->num_rows;
if ($row_cnt == 0) {
put_errormsg("You are not listed. Internal error.");
redirect("listings.php");
exit;
}
echo "Clicking on your Employee Number will take you to a display to edit yoour information.<hr>";
delete_errormsg();
for ($i = 0; $i < $row_cnt; $i++) {
$row = $result->fetch_row();
$address = mc_decrypt($row[3], ENCRYPTION_KEY);
if ($row[4] != "") {
$address2 = mc_decrypt($row[4], ENCRYPTION_KEY);
}
$row1 = "Employee # <a href=\"setupcmaint.php?editclientnum=" . $row[0] . "\">" . $row[0] . "</a> " . $row[2] . " " . $row[1] . " lives at " . $address;
if ($row[4] != "") {
$row1 = $row1 . ", " . $address2;
}
示例14: mysqli
if (!empty($_POST["pref2"])) {
$pref2 = "bg." . $_POST["pref2"] . ".png";
} else {
$pref2 = "";
}
if (!empty($_POST["pref3"])) {
$pref3 = "bg." . $_POST["pref3"] . ".png";
} else {
$pref3 = "";
}
if (!empty($_POST["pref4"])) {
$pref4 = "bg." . $_POST["pref4"] . ".png";
} else {
$pref4 = "";
}
if (!empty($_POST["pref5"])) {
$pref5 = "bg." . $_POST["pref5"] . ".png";
} else {
$pref5 = "";
}
$mysqli = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$sql = "UPDATE 'petcliniccorp`.`preferences' SET `pref1` = \"" . $pref1 . "\", `pref2` = \"" . $pref2 . "\", `pref3` = \"" . $pref3 . "\", `pref4` = \"" . $pref4 . "\", `pref5` = \"" . $pref5 . "\" WHERE `sequence` = 2";
$result = $mysqli->query($sql);
if ($result == FALSE) {
put_errormsg("Pref Seq 2 Update failed");
redirect("corpmenu.php");
exit;
}
$mysqli->close();
delete_errormsg();
redirect("corppref.php");
示例15: mysqli
$mysqlic = new mysqli('localhost', $_SESSION["user"], mc_decrypt($_SESSION["up"], ps_key), '');
$sql = "SELECT `sk21` FROM `petcliniccorp`.`seckeys` WHERE `emplnumber` = {$emplnumber} and `sequence` = 1;";
$resultc = $mysqlic->query($sql);
$row_cnt_c = $resultc->num_rows;
$rowc = $resultc->fetch_row();
$sk21 = $rowc[0];
$mysqlic->close();
$result = $mysqli->query($sql1);
if ($result == FALSE) {
put_errormsg("There are no Clients (false)");
header("Location:listings.php");
exit;
}
$row_cnt = $result->num_rows;
if ($row_cnt == 0) {
put_errormsg("There are no Clients (count)");
redirect("listings.php");
exit;
}
if ($sk21 == "Y") {
echo "Clicking on the Client Number will take you to a display to edit that Client.<hr>";
}
delete_errormsg();
for ($i = 0; $i < $row_cnt; $i++) {
$row = $result->fetch_row();
$address = mc_decrypt($row[3], ENCRYPTION_KEY);
if ($row[4] != "") {
$address2 = mc_decrypt($row[4], ENCRYPTION_KEY);
} else {
$address2 = "";
}