Renamed multiple database tables

This commit is contained in:
2026-05-15 23:00:08 +02:00
parent 925348e8fe
commit 5a27c678b1
40 changed files with 267 additions and 256 deletions

View File

@@ -78,7 +78,7 @@ $formBuilder->startForm();
<div class="select2-input">
<select id="device_vendor_uuid" name="device_vendor_uuid" class="form-control" required>
<?php
$data = $GLOBALS['conn']->query("SELECT vendor_uuid, vendor_name FROM vc_vendors WHERE vendor_enabled = 1");
$data = $GLOBALS['conn']->query("SELECT vendor_uuid, vendor_name FROM autop_vendors WHERE vendor_enabled = 1");
if ($data->num_rows == 0) { ?>
<option value=""><?php echo __('no_vendor_found') ?></option>
<?php } else {
@@ -162,7 +162,7 @@ $formBuilder->startForm();
<div class="select2-input">
<select id="device_extensions" name="device_extensions[]" class="form-control" multiple="multiple" data-multiple-select="true">
<?php
$data = $GLOBALS['conn']->query("SELECT device_uuid, device_name, device_vendor_uuid FROM vc_devices WHERE device_type = 'module'");
$data = $GLOBALS['conn']->query("SELECT device_uuid, device_name, device_vendor_uuid FROM autop_devices WHERE device_type = 'module'");
if ($data->num_rows == 0) { ?>
<option value=""><?php echo __('no_device_found') ?></option>
<?php } else {

View File

@@ -51,7 +51,7 @@ $formBuilder->addExtraButtons(array(0 => array('buttonText' => __('view'), 'butt
# Retrieve Information for the page
$device_found = false;
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM vc_devices INNER JOIN vc_vendors ON vc_devices.device_vendor_uuid = vc_vendors.vendor_uuid WHERE device_uuid = ?");
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM autop_devices INNER JOIN autop_vendors ON autop_devices.device_vendor_uuid = autop_vendors.vendor_uuid WHERE device_uuid = ?");
$stmt->bind_param("s", $_GET['edit']);
$stmt->execute();
$device_data_result = $stmt->get_result();
@@ -91,7 +91,7 @@ if ($device_found) {
<div class="select2-input">
<select id="device_vendor_uuid" name="device_vendor_uuid" class="form-control" required>
<?php
$data = $GLOBALS['conn']->query("SELECT vendor_uuid, vendor_name FROM vc_vendors WHERE vendor_enabled = 1");
$data = $GLOBALS['conn']->query("SELECT vendor_uuid, vendor_name FROM autop_vendors WHERE vendor_enabled = 1");
if ($data->num_rows == 0) { ?>
<option value=""><?php echo __('no_vendor_found') ?></option>
<?php } else {
@@ -178,9 +178,9 @@ if ($device_found) {
<select id="device_extensions" name="device_extensions[]" class="form-control" multiple="multiple" data-multiple-select="true">
<?php
if ($device_data['device_type'] == 'base') {
$data = $GLOBALS['conn']->query("SELECT device_uuid, device_name, device_vendor_uuid FROM vc_devices WHERE device_type = 'module' OR device_type = 'handset'");
$data = $GLOBALS['conn']->query("SELECT device_uuid, device_name, device_vendor_uuid FROM autop_devices WHERE device_type = 'module' OR device_type = 'handset'");
} else {
$data = $GLOBALS['conn']->query("SELECT device_uuid, device_name, device_vendor_uuid FROM vc_devices WHERE device_type = 'module'");
$data = $GLOBALS['conn']->query("SELECT device_uuid, device_name, device_vendor_uuid FROM autop_devices WHERE device_type = 'module'");
}
if ($data->num_rows == 0) { ?>

View File

@@ -45,7 +45,7 @@ if ($API->checkPermissions('admin-devices', 'RW', true)) {
</div>');
}
# Retrieve Information for the page
$data = $GLOBALS['conn']->query("SELECT * FROM vc_devices INNER JOIN vc_vendors ON vc_devices.device_vendor_uuid = vc_vendors.vendor_uuid");
$data = $GLOBALS['conn']->query("SELECT * FROM autop_devices INNER JOIN autop_vendors ON autop_devices.device_vendor_uuid = autop_vendors.vendor_uuid");
# Set breadcrumb data
array_push($GLOBALS['breadCrumbArray'], array('display' => __('devices'), 'href' => '/devices/'));

View File

@@ -123,7 +123,7 @@ if ($API->checkPermissions('admin-devices', 'RW', true)) {
}
# Retrieve Information for the page
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM vc_devices INNER JOIN vc_vendors ON vc_devices.device_vendor_uuid = vc_vendors.vendor_uuid WHERE device_uuid = ?");
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM autop_devices INNER JOIN autop_vendors ON autop_devices.device_vendor_uuid = autop_vendors.vendor_uuid WHERE device_uuid = ?");
$stmt->bind_param("s", $_GET['view']);
$stmt->execute();
$device_data_result = $stmt->get_result();
@@ -225,7 +225,7 @@ $pageNavbar->outPutNavbar();
if ($device_data['device_type'] == 'phone' || $device_data['device_type'] == 'base') {
$device_extensions = json_decode($device_data['device_extensions']);
} elseif ($device_data['device_type'] == 'module' || $device_data['device_type'] == 'handset') {
$query = "SELECT device_extensions, device_uuid FROM vc_devices WHERE device_extensions LIKE ?";
$query = "SELECT device_extensions, device_uuid FROM autop_devices WHERE device_extensions LIKE ?";
$stmt = $GLOBALS['conn']->prepare($query);
if ($stmt) {
$searchTerm = "%" . $device_data['device_uuid'] . "%"; // Add wildcards manually
@@ -243,7 +243,7 @@ $pageNavbar->outPutNavbar();
if (!empty($device_extensions)) {
$placeholders = implode(' OR device_uuid = ', array_fill(0, count($device_extensions), '?'));
$query = "SELECT * FROM vc_devices WHERE device_uuid = " . $placeholders;
$query = "SELECT * FROM autop_devices WHERE device_uuid = " . $placeholders;
$stmt = $GLOBALS['conn']->prepare($query);
if ($stmt) {
$types = str_repeat('s', count($device_extensions));

View File

@@ -28,7 +28,7 @@ $pageNavbar = new pageNavbar(false, '<i class="fas fa-layer-group"></i> Platform
$pageNavbar->AddHTMLButton('<a href="?add="><button class="btn btn-primary"><i class="fas fa-plus text-success"></i>' . __('add_platform') . '</button></a>');
# Retrieve Information for the page
$data = $GLOBALS['conn']->query("SELECT * FROM vc_platforms");
$data = $GLOBALS['conn']->query("SELECT * FROM autop_platforms");
# Set breadcrumb data