项目作者: CyberFX

项目描述 :
An add-on for swift game panel, clients can RE-Install server!
高级语言: Smarty
项目地址: git://github.com/CyberFX/SWIFT-Panel-Rebuild-Client-Servers.git
创建时间: 2020-03-24T14:32:52Z
项目社区:https://github.com/CyberFX/SWIFT-Panel-Rebuild-Client-Servers

开源协议:GNU General Public License v3.0

下载


SWIFT Panel Rebuild/Reinstall Client Servers

An add-on for swift game panel, clients can RE-Install their server!

License Donate

Description

Default swift game panel is very popular and interesting, however some of the options are lacking such as client server reinstallation.
This script will allow clients to self-reinstall the server whenever they want and of course it will be logged in logs.
Script support all games in panel.

Instalation

Just import serverrebuild.php in root of game panel.

Implementation (in default template for example)

In templates/default/serversummary.tpl is already set-up, just replace existing serversummary.tpl in default template folder.

  • Open templates/default/serversummary.tpl file and find next line:

    1. <input type="button" value="Start Server" onclick="window.location='servermanage.php?task=start&serverid={$srv.serverid}'" class="button green start" />
  • Add this code after previus:

    1. <input type="button" value="Reinstall Server" onclick="doServerRebuild('{$srv.serverid}', '{$srv.name}')" class="button blue restart" />
    2. {literal}
    3. <script language="javascript" type="text/javascript">
    4. <!--
    5. function doServerRebuild(serverid, name){ if (confirm("Are you sure you want to rebuild server: #"+serverid+" - "+name+"? \n\nAll files will be deleted from server!")) { window.location="serverrebuild.php?task=serverrebuild&serverid="+serverid; } }
    6. -->
    7. </script>
    8. {/literal}
  • Delete cache files from templates_c folder and that’s it! Enjoy!

    Reinstall button will bi show only when server stoped, also reinstall proccess only work when server is stoped!

Have problem?

If have problem with integration, i can finish this for you for small donation, just send me message on mail, facebook or here!

License

GPL-3.0

Donation

If you appreciate my work and if this script helped you, treat me a coffee… ^_^

paypal