fix: external docs links and automatic install retry provisioning
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/020b5f73-a6ca-4a45-a4cb-eeef59cb26a8 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
e0fdb8cdd2
commit
83f97dda20
7 changed files with 261 additions and 9 deletions
|
|
@ -24,14 +24,15 @@
|
|||
|
||||
function gsp_support_docs_url_for_game_key($game_key)
|
||||
{
|
||||
$baseDocsUrl = 'https://gameservers.world/docs';
|
||||
$game_key = trim((string)$game_key);
|
||||
if ($game_key !== '') {
|
||||
$docPath = __DIR__ . '/../billing/docs/' . $game_key . '/index.php';
|
||||
if (is_file($docPath)) {
|
||||
return '/docs.php?action=view&doc=' . rawurlencode($game_key);
|
||||
return $baseDocsUrl . '/' . rawurlencode($game_key) . '/';
|
||||
}
|
||||
}
|
||||
return '/docs.php';
|
||||
return $baseDocsUrl . '/';
|
||||
}
|
||||
|
||||
function exec_ogp_module() {
|
||||
|
|
@ -93,7 +94,7 @@ if (!empty($webhook)) {
|
|||
} // end if submit
|
||||
echo '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />';
|
||||
echo "<h2>".get_lang('support')."</h2>";
|
||||
$defaultDocsUrl = '/docs.php';
|
||||
$defaultDocsUrl = 'https://gameservers.world/docs/';
|
||||
if (!empty($server_homes) && is_array($server_homes)) {
|
||||
foreach ((array)$server_homes as $server_home_row) {
|
||||
if (!empty($server_home_row['game_key'])) {
|
||||
|
|
@ -167,7 +168,7 @@ if (!empty($webhook)) {
|
|||
$(document).ready(function(){
|
||||
function updateSupportDocLink(){
|
||||
var selected = $('#gameserver option:selected');
|
||||
var url = selected.data('doc-url') || '/docs.php';
|
||||
var url = selected.data('doc-url') || 'https://gameservers.world/docs/';
|
||||
$('#support-doc-link').attr('href', url);
|
||||
}
|
||||
$('#gameserver').on('change', updateSupportDocLink);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue