query("SELECT * FROM psyhvel_folders WHERE userID=".$user->getId()); $res = array(); while ( $row = mysql_fetch_array($ret) ) { $res[] = $row; } return $res; } function getCurrentFolderID() { if ( isset($_SESSION['folderid']) && is_numeric($_SESSION['folderid']) ) { return $_SESSION['folderid']; } return 0; } /** * @Secured(roles={'manager'}) * */ function actionCreateGame() { if ( isset($_POST['folderid']) && is_numeric($_POST['folderid']) ) { $_SESSION['folderid'] = $_POST['folderid']; } $_SESSION['rid'] = NULL; return array('rid' => 'new', 'type' => $_POST['typepage'], 'mode' => 'edit'); } /** * @Secured(roles={'manager'}) * */ function actionCancelGame() { $_SESSION['psyhvel_notice'] = gettext("Game creation cancelled!"); if (isset($_SESSION['folderid']) && $_SESSION['folderid']!="NULL") { return array('pid' => 'Folder', 'fid' => $_SESSION['folderid']); } return array('pid' => 'MyFolder'); } } ?>