📄 doupdate.php
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"><html><!-- ------------------------------------------------------------ --><!-- DoUpdate.php --><!-- Copyright (C) 2005 Robert W Smith (bsmith@linuxtoys.org) --><!-- --><!-- This program is distributed under the terms of the GNU --><!-- GPL. See the file COPYING file. --><!-- ------------------------------------------------------------ --><head><title>Laddie Alarm System</title></head><body><?php // Suppress Postgres error messages error_reporting(error_reporting() & 0xFFFD); // connect to the LAD-D application $connection = pg_connect("localhost", "8888", "bsmith"); if ($connection == "") { printf("$s%s%s", "Unable to connect to Laddie Alarm application.<br>", "Please verify that the application is running.<br>"); exit(); } // This app processes an input form to clear or test an alarm. $id = htmlentities($_GET['id']); $col = htmlentities($_GET['col']); $nvalue = htmlentities($_GET['nvalue']); if ($id >=0 && $id <= 5 && $col == "alarm") { $command = "UPDATE Zone SET $col=$nvalue WHERE id=$id"; $result = pg_exec($connection, $command); if ($result == "") { exit(); } pg_freeresult($result); } printf("Ladd application update complete."); pg_close($connection);?></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -