Skip to content

Commit

Permalink
Update to AppGini 24.11
Browse files Browse the repository at this point in the history
  • Loading branch information
bigprof committed Mar 24, 2024
1 parent 8e19fa4 commit 57b46bc
Show file tree
Hide file tree
Showing 51 changed files with 1,343 additions and 110 deletions.
2 changes: 1 addition & 1 deletion app/admin/getUsers.php
@@ -1,5 +1,5 @@
<?php
// This script and data application were generated by AppGini 23.17
// This script and data application was generated by AppGini, https://bigprof.com/appgini
// Download AppGini for free from https://bigprof.com/appgini/download/

/*
Expand Down
30 changes: 30 additions & 0 deletions app/admin/incFunctions.php
Expand Up @@ -3483,3 +3483,33 @@ function httpRequest($url, $payload = [], $headers = [], $type = 'GET', $cookieJ
'body' => $respBody,
];
}

/**
* @brief Retrieve owner username of the record with the given primary key value
*
* @param $tn string table name
* @param $pkValue string primary key value
* @return string|null username of the record owner, or null if not found
*/
function getRecordOwner($tn, $pkValue) {
$tn = makeSafe($tn);
$pkValue = makeSafe($pkValue);
$owner = sqlValue("SELECT `memberID` FROM `membership_userrecords` WHERE `tableName`='{$tn}' AND `pkValue`='$pkValue'");

if(!strlen($owner)) return null;
return $owner;
}

/**
* @brief Retrieve lookup field name that determines record owner of the given table
*
* @param $tn string table name
* @return string|null lookup field name, or null if default (record owner is user that creates the record)
*/
function tableRecordOwner($tn) {
$owners = [
];

return $owners[$tn] ?? null;
}

4 changes: 2 additions & 2 deletions app/admin/incHeader.php
Expand Up @@ -205,10 +205,10 @@ function hideDialogs() {
<li><a href="app-documentation.php"><i class="glyphicon menu-item-icon text-info glyphicon-book"></i> <?php echo $Translation['app documentation']; ?></a></li>
<li><a href="pageTranslation.php"><i class="glyphicon menu-item-icon text-info glyphicon-globe"></i> <?php echo $Translation['translation tool']; ?></a></li>
<li class="divider"></li>
<li><a href="pageTransferOwnership.php"><i class="glyphicon menu-item-icon text-info glyphicon-transfer"></i> <?php echo $Translation['batch transfer']; ?></a></li>
<li><a href="pageTransferOwnership.php"><i class="glyphicon menu-item-icon text-info glyphicon-transfer"></i> <?php echo $Translation['ownership batch transfer']; ?></a></li>
<li><a href="pageRebuildFields.php"><i class="glyphicon menu-item-icon text-info glyphicon-refresh"></i> <?php echo $Translation['view or rebuild fields']; ?></a></li>
<li><a href="pageBackupRestore.php"><i class="glyphicon menu-item-icon text-info glyphicon-tasks"></i> <?php echo $Translation['database backups']; ?></a></li>
<li><a href="pageUploadCSV.php"><i class="glyphicon menu-item-icon text-info glyphicon-upload"></i> <?php echo $Translation['import CSV']; ?></a></li>
<li><a href="../import-csv.php"><i class="glyphicon menu-item-icon text-info glyphicon-upload"></i> <?php echo $Translation['import CSV']; ?></a></li>
<li><a href="pageQueryLogs.php"><i class="glyphicon menu-item-icon text-info glyphicon-book"></i> <?php echo $Translation['Query logs']; ?></a></li>
<li><a href="pageSQL.php"><i class="glyphicon menu-item-icon text-danger glyphicon-console"></i> <?php echo $Translation['Interactive SQL queries tool']; ?></a></li>
<li class="divider"></li>
Expand Down

0 comments on commit 57b46bc

Please sign in to comment.