Renamed multiple database tables
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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) { ?>
|
||||
|
||||
@@ -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/'));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ $jsScriptLoadData['datepicker'] = true;
|
||||
|
||||
|
||||
# Retrieve Information for the page
|
||||
$stmt = $GLOBALS['conn']->query("SELECT user_uuid, user_full_name, user_first_name, user_profile_picture_thumbnail, user_stompable, user_email FROM vc_users WHERE user_stompable = '1'");
|
||||
$stmt = $GLOBALS['conn']->query("SELECT user_uuid, user_full_name, user_first_name, user_profile_picture_thumbnail, user_stompable, user_email FROM system_users WHERE user_stompable = '1'");
|
||||
$administrators = [];
|
||||
while ($row = $stmt->fetch_assoc()) {
|
||||
$administrators[$row['user_uuid']] = $row;
|
||||
@@ -59,7 +59,7 @@ if (!isset($_GET['td'])) {
|
||||
|
||||
$stompjes = array();
|
||||
$stmt = $GLOBALS['conn']->query("SELECT stomp_uuid, office_stompjes.user_uuid, user_full_name, user_first_name, stomp_timestamp FROM office_stompjes
|
||||
INNER JOIN vc_users ON office_stompjes.user_uuid = vc_users.user_uuid
|
||||
INNER JOIN system_users ON office_stompjes.user_uuid = system_users.user_uuid
|
||||
WHERE stomp_timestamp BETWEEN '$SelectFromDate' AND '$SelectTillDate'
|
||||
AND user_stompable = '1'
|
||||
ORDER BY stomp_timestamp DESC");
|
||||
|
||||
@@ -25,7 +25,7 @@ $pageNavbar = new pageNavbar(true);
|
||||
$formBuilder = new formBuilder('Edit profile', '<i class="fas fa-plus"></i>', '/userprofile/');
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups = array();
|
||||
$user_data = false;
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
@@ -34,7 +34,7 @@ while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
}
|
||||
|
||||
$user_uuid = $_SESSION['user']['user_uuid'];
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM vc_users INNER JOIN vc_user_groups ON vc_users.user_group_uuid = vc_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM system_users INNER JOIN system_user_groups ON system_users.user_group_uuid = system_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt->bind_param("s", $user_uuid);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
@@ -27,7 +27,7 @@ $jsScriptLoadData['updateToggle'] = true;
|
||||
$pageNavbar = new pageNavbar(false, '<i class="fa-solid fa-address-card"></i> ' . $_SESSION['user']['user_full_name'] . ' ' . strtolower(__('user_profile')));
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups = array();
|
||||
$admin_data = false;
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
@@ -36,7 +36,7 @@ while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
}
|
||||
|
||||
$user_uuid = $_SESSION['user']['user_uuid'];
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM vc_users INNER JOIN vc_user_groups ON vc_users.user_group_uuid = vc_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM system_users INNER JOIN system_user_groups ON system_users.user_group_uuid = system_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt->bind_param("s", $user_uuid);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
@@ -38,7 +38,7 @@ $pageNavbar->AddHTMLButton('<a href="?admin_add="><button class="btn btn-primary
|
||||
$formBuilder = new formBuilder('add_admin', '<i class="fas fa-plus"></i>', '/accesscontrol/#user-groups');
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups = array();
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
array_push($user_groups, $user_group);
|
||||
|
||||
@@ -34,7 +34,7 @@ $pageNavbar->AddHTMLButton('<a href="?admin_add="><button class="btn btn-primary
|
||||
$formBuilder = new formBuilder('edit_admin', '<i class="fas fa-plus"></i>', '/accesscontrol/#user-groups');
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups = array();
|
||||
$admin_data = false;
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
@@ -43,7 +43,7 @@ while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
}
|
||||
|
||||
$user_uuid = $_GET['admin_edit'];
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM vc_users INNER JOIN vc_user_groups ON vc_users.user_group_uuid = vc_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM system_users INNER JOIN system_user_groups ON system_users.user_group_uuid = system_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt->bind_param("s", $user_uuid);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
@@ -41,7 +41,7 @@ if ($API->checkPermissions('admin-access-admins', 'RW', true)) {
|
||||
}
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups = array();
|
||||
$admin_data = false;
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
@@ -50,7 +50,7 @@ while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
}
|
||||
|
||||
$user_uuid = $_GET['admin_view'];
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM vc_users INNER JOIN vc_user_groups ON vc_users.user_group_uuid = vc_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM system_users INNER JOIN system_user_groups ON system_users.user_group_uuid = system_user_groups.user_group_uuid WHERE user_uuid = ?");
|
||||
$stmt->bind_param("s", $user_uuid);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
@@ -33,7 +33,7 @@ $pageNavbar = new pageNavbar(true);
|
||||
$formBuilder = new formBuilder('add_user_groups', '<i class="fas fa-plus"></i>', '/accesscontrol/#user-groups');
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups ORDER BY user_group_weight ASC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups ORDER BY user_group_weight ASC");
|
||||
$user_groups = array();
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
array_push($user_groups, $user_group);
|
||||
|
||||
@@ -39,8 +39,8 @@ $requiredFields = ['user_group_uuid' => ['type' => 'uuid']];
|
||||
$API_usergroups->validateData($requiredFields);
|
||||
$user_group = $API_usergroups->getUsergroup()[0];
|
||||
|
||||
$query = "SELECT * FROM vc_user_group_permissions_portal
|
||||
INNER JOIN vc_permissions ON vc_user_group_permissions_portal.permission_uuid = vc_permissions.permission_uuid
|
||||
$query = "SELECT * FROM system_user_group_permissions
|
||||
INNER JOIN system_permissions ON system_user_group_permissions.permission_uuid = system_permissions.permission_uuid
|
||||
WHERE user_group_uuid = ?";
|
||||
$stmt = $GLOBALS['pdo']->prepare($query);
|
||||
$stmt->execute([$user_group_uuid]);
|
||||
|
||||
@@ -25,7 +25,7 @@ $jsScriptLoadData['datatables'] = true;
|
||||
# PageClasses Setup
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups ORDER BY user_group_weight ASC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups ORDER BY user_group_weight ASC");
|
||||
$user_groups = array();
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
array_push($user_groups, $user_group);
|
||||
@@ -33,14 +33,14 @@ while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
}
|
||||
|
||||
# get all the admins
|
||||
$stmt = $GLOBALS['conn']->query("SELECT * FROM vc_users INNER JOIN vc_user_groups ON vc_users.user_group_uuid = vc_user_groups.user_group_uuid WHERE user_group_type = 'admin'");
|
||||
$stmt = $GLOBALS['conn']->query("SELECT * FROM system_users INNER JOIN system_user_groups ON system_users.user_group_uuid = system_user_groups.user_group_uuid WHERE user_group_type = 'admin'");
|
||||
$administrators = array();
|
||||
while ($row = $stmt->fetch_assoc()) {
|
||||
array_push($administrators, $row);
|
||||
}
|
||||
|
||||
|
||||
$stmt = $GLOBALS['conn']->query("SELECT * FROM vc_permissions INNER JOIN system_modules ON vc_permissions.module_uuid = system_modules.module_uuid WHERE system_modules.module_enabled = 1");
|
||||
$stmt = $GLOBALS['conn']->query("SELECT * FROM system_permissions INNER JOIN system_modules ON system_permissions.module_uuid = system_modules.module_uuid WHERE system_modules.module_enabled = 1");
|
||||
$permissions = array();
|
||||
while ($row = $stmt->fetch_assoc()) {
|
||||
array_push($permissions, $row);
|
||||
|
||||
@@ -25,7 +25,7 @@ $jsScriptLoadData['updateToggle'] = true;
|
||||
# PageClasses Setup
|
||||
|
||||
# Retrieve Information for the page
|
||||
$portal_settings = $GLOBALS['conn']->query("SELECT * FROM vc_portal_settings")->fetch_assoc();
|
||||
$portal_settings = $GLOBALS['conn']->query("SELECT * FROM system_settings")->fetch_assoc();
|
||||
|
||||
$system_modules_data = $GLOBALS['conn']->query("SELECT * FROM system_modules");
|
||||
$system_modules = array();
|
||||
|
||||
@@ -51,7 +51,7 @@ if ($GLOBALS['modules_enabled']['customers']) {
|
||||
}
|
||||
|
||||
# Retrieve Information for the page
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM vc_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
$user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WHERE user_group_type = 'admin' ORDER BY user_group_weight DESC");
|
||||
|
||||
|
||||
# memory
|
||||
|
||||
Reference in New Issue
Block a user