Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package TinyIsland-Private
- * @version 1.0
- * @author Whistik
- **/
- require_once('./res/development/class/utility.class.php');
- require_once('./res/development/class/player.class.php');
- require_once('./res/development/config.php');
- if(!isset($_GET['req'])){
- exit("error:message to short b");
- }
- $player = new Player();
- $utility = new UTILITY();
- $sessionID = explode("|", $_GET['req']);
- $sessionID = $sessionID[0];
- $req = substr($_GET['req'], 33);
- $req = explode(":", $req);
- $action = $req[0];
- $args = explode("/", $req[1]);
- $action_file = "./res/development/game_actions/$action.php";
- $return = [];
- if(file_exists($action_file)){
- require_once('./res/development/game_actions/'.$action.'.php');
- print(execute_action($args));
- }else{
- $tempdoc_file = file_get_contents("./res/development/tempdoc.php");
- $tempdoc_file = str_replace("@action", $action, $tempdoc_file);
- $tempaction = implode("|", $args);
- $tempdoc_file = str_replace("@arguments", $tempaction, $tempdoc_file);
- $tempdoc_file = str_replace("@triggered", UTILITY::UTILITY_GETDATE(), $tempdoc_file);
- $actionScript = fopen($action_file, "w");
- fclose($actionScript);
- file_put_contents($action_file, $tempdoc_file);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement