module.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /*
  3. *
  4. * OGP - Open Game Panel
  5. * Copyright (C) 2008 - 2018 The OGP Development Team
  6. *
  7. * http://www.opengamepanel.org/
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. *
  23. */
  24. include_once("server_config_parser.php");
  25. // Module general information
  26. $module_title = "Config games";
  27. $module_version = "1.0";
  28. $db_version = 0;
  29. $module_required = TRUE;
  30. $module_menus = array(
  31. array( 'subpage' => '', 'name'=>'Game/Mod Config', 'group'=>'admin' )
  32. );
  33. $install_queries = array();
  34. $install_queries[0] = array(
  35. "DROP TABLE IF EXISTS ".OGP_DB_PREFIX."config_homes;",
  36. "CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."config_homes` (
  37. `home_cfg_id` int(20) NOT NULL auto_increment,
  38. `game_key` varchar(64) NOT NULL,
  39. `game_name` varchar(255) NOT NULL,
  40. `home_cfg_file` varchar(64) NULL,
  41. PRIMARY KEY (`home_cfg_id`),
  42. UNIQUE KEY `game_key` (`game_key`)
  43. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;",
  44. "DROP TABLE IF EXISTS ".OGP_DB_PREFIX."config_mods;",
  45. "CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."config_mods` (
  46. `mod_cfg_id` int(50) NOT NULL auto_increment,
  47. `home_cfg_id` varchar(50) NOT NULL,
  48. `mod_key` varchar(100) NOT NULL COMMENT 'mod short name - used by the game server for startup commands - ex cstrike',
  49. `mod_name` varchar(255) NOT NULL COMMENT 'Mod value is user defined string - like Counter-Strike',
  50. `def_precmd` TEXT,
  51. `def_postcmd` TEXT,
  52. PRIMARY KEY (`mod_cfg_id`),
  53. UNIQUE KEY `home_cfg_id` (`home_cfg_id`,`mod_key`)
  54. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;");
  55. ?>