Change the tables to schemas.
This commit is contained in:
+20
-20
@@ -26,7 +26,7 @@
|
||||
require_once "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('table_view')) {
|
||||
if (permission_exists('schema_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
@@ -49,7 +49,7 @@ require_once "includes/paging.php";
|
||||
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td width='50%' align='left' nowrap='nowrap'><b>Virtual Tables</b></td>\n";
|
||||
echo "<td width='50%' align='left' nowrap='nowrap'><b>Schemas</b></td>\n";
|
||||
echo "<td width='50%' align='right'> </td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
@@ -60,7 +60,7 @@ require_once "includes/paging.php";
|
||||
echo "</tr>\n";
|
||||
echo "</tr></table>\n";
|
||||
|
||||
$sql = " select * from v_tables ";
|
||||
$sql = " select * from v_schemas ";
|
||||
$sql .= " where domain_uuid = '$domain_uuid' ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
@@ -75,7 +75,7 @@ require_once "includes/paging.php";
|
||||
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
$sql = " select * from v_tables ";
|
||||
$sql = " select * from v_schemas ";
|
||||
$sql .= " where domain_uuid = '$domain_uuid' ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$sql .= " limit $rows_per_page offset $offset ";
|
||||
@@ -92,14 +92,14 @@ require_once "includes/paging.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('table_label', 'Label', $order_by, $order);
|
||||
echo th_order_by('table_name', 'Table Name', $order_by, $order);
|
||||
echo th_order_by('table_auth', 'Authentication', $order_by, $order);
|
||||
echo th_order_by('table_description', 'Description', $order_by, $order);
|
||||
echo th_order_by('schema_label', 'Label', $order_by, $order);
|
||||
echo th_order_by('schema_name', 'Schema Name', $order_by, $order);
|
||||
echo th_order_by('schema_auth', 'Authentication', $order_by, $order);
|
||||
echo th_order_by('schema_description', 'Description', $order_by, $order);
|
||||
//echo "<th align='center'>View</th>\n";
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if (permission_exists('tables_add')) {
|
||||
echo " <a href='table_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
if (permission_exists('schema_add')) {
|
||||
echo " <a href='schema_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
@@ -110,16 +110,16 @@ require_once "includes/paging.php";
|
||||
else { //received results
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['table_label']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['table_name']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['table_auth']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['table_description']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['schema_label']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['schema_name']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['schema_auth']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['schema_description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('table_edit')) {
|
||||
echo " <a href='table_edit.php?id=".$row['table_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
if (permission_exists('schema_edit')) {
|
||||
echo " <a href='schema_edit.php?id=".$row['schema_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('table_delete')) {
|
||||
echo " <a href='table_delete.php?id=".$row['table_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
if (permission_exists('schema_delete')) {
|
||||
echo " <a href='schema_delete.php?id=".$row['schema_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -135,8 +135,8 @@ require_once "includes/paging.php";
|
||||
echo " <td width='33.3%' nowrap> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
if (permission_exists('tables_add')) {
|
||||
echo " <a href='table_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
if (permission_exists('schema_add')) {
|
||||
echo " <a href='schema_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user