table rename to ysfnodes

pull/1/head
Tom Early 5 years ago
parent d2411c239d
commit 3c8b4ab763

@ -176,7 +176,6 @@ WriteAmbeMKFile () {
WriteCfgPhpFile () { WriteCfgPhpFile () {
cat << EOF > $ysfs cat << EOF > $ysfs
// Created on $(date)
<?php <?php
define('DB_SERVER', 'localhost'); define('DB_SERVER', 'localhost');
define('DB_USERNAME', '${ysfdbuser}'); define('DB_USERNAME', '${ysfdbuser}');

@ -1,15 +0,0 @@
<?php
/* Database credentials. Assuming you are running MySQL */
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'qnusers');
define('DB_PASSWORD', 'qnuser!20');
define('DB_NAME', 'qnusers');
/* Attempt to connect to MySQL database */
$link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
?>

@ -12,7 +12,7 @@ if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
require_once "configure.php"; require_once "configure.php";
// find current frequencies and initialize // find current frequencies and initialize
$sql = "SELECT txfreq, rxfreq FROM users WHERE callsign = ?"; $sql = "SELECT txfreq, rxfreq FROM ysfnodes WHERE callsign = ?";
if ($stmt = mysqli_prepare($link, $sql)) { if ($stmt = mysqli_prepare($link, $sql)) {
// Bind variables to the prepared statement as parameters // Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "s", $_SESSION["callsign"]); mysqli_stmt_bind_param($stmt, "s", $_SESSION["callsign"]);

@ -12,7 +12,7 @@ if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
require_once "configure.php"; require_once "configure.php";
// find current frequencies and initialize // find current frequencies and initialize
$sql = "SELECT txfreq, rxfreq FROM users WHERE callsign = ?"; $sql = "SELECT txfreq, rxfreq FROM ysfnodes WHERE callsign = ?";
if ($stmt = mysqli_prepare($link, $sql)) { if ($stmt = mysqli_prepare($link, $sql)) {
// Bind variables to the prepared statement as parameters // Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "s", $_SESSION["callsign"]); mysqli_stmt_bind_param($stmt, "s", $_SESSION["callsign"]);

@ -35,7 +35,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Validate credentials // Validate credentials
if (empty($callsign_err) && empty($password_err)) { if (empty($callsign_err) && empty($password_err)) {
// Prepare a select statement // Prepare a select statement
$sql = "SELECT callsign, password FROM users WHERE callsign = ?"; $sql = "SELECT callsign, password FROM ysfnodes WHERE callsign = ?";
if ($stmt = mysqli_prepare($link, $sql)) { if ($stmt = mysqli_prepare($link, $sql)) {
// Bind variables to the prepared statement as parameters // Bind variables to the prepared statement as parameters

@ -27,7 +27,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$callsign_err = "Not a valid callsign."; $callsign_err = "Not a valid callsign.";
} else { } else {
// Prepare a select statement // Prepare a select statement
$sql = "SELECT * FROM users WHERE callsign = ?"; $sql = "SELECT * FROM ysfnodes WHERE callsign = ?";
if ($stmt = mysqli_prepare($link, $sql)) { if ($stmt = mysqli_prepare($link, $sql)) {
// Bind variables to the prepared statement as parameters // Bind variables to the prepared statement as parameters

Loading…
Cancel
Save

Powered by TurnKey Linux.