|
|
@ -7,7 +7,7 @@ class UserController
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
global $dsn, $rep, $vues, $error;
|
|
|
|
global $dsn, $rep, $vues, $error;
|
|
|
|
$action = $_REQUEST['action'];
|
|
|
|
$action = $_REQUEST['action'];
|
|
|
|
//register_event_handler('add_to_queue',array($this,"onAddToQueue"));
|
|
|
|
echo $action;
|
|
|
|
switch ($action) {
|
|
|
|
switch ($action) {
|
|
|
|
case NULL:
|
|
|
|
case NULL:
|
|
|
|
$this->goToHome();
|
|
|
|
$this->goToHome();
|
|
|
@ -205,11 +205,12 @@ class UserController
|
|
|
|
require($rep . $vues['queue']);
|
|
|
|
require($rep . $vues['queue']);
|
|
|
|
$model = new UserModel();
|
|
|
|
$model = new UserModel();
|
|
|
|
$model->addToQueue();
|
|
|
|
$model->addToQueue();
|
|
|
|
$usergroup = $model->findUserGroup();
|
|
|
|
$userGroup = $model->findUserGroup();
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
'<script>
|
|
|
|
'<script>
|
|
|
|
io.to($userGroup).emit("launchGame");
|
|
|
|
io.to('.$userGroup.').emit("launchGame");
|
|
|
|
<script/>';
|
|
|
|
<script/>';
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception $e) {
|
|
|
|
} catch (Exception $e) {
|
|
|
|
$error = $e->getMessage();
|
|
|
|
$error = $e->getMessage();
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|