case 'restore': case 'load_info': case 'upload': case 'like': case 'delete_file': loadTool('ajax.php'); loadTool('user.class.php'); if ($method == 'upload' or $method == 'delete_file') { loadTool('upload.class.php'); } elseif ($method == 'profile') { loadTool('skin.class.php'); } elseif ($method == 'restore' and $config['p_logic'] != 'usual' and $config['p_logic'] != 'xauth' and $config['p_logic'] != 'authme') { aExit(1, 'Change password is not available'); } DBinit('action_' . $method); MCRAuth::userLoad(); break; case 'download': loadTool('upload.class.php'); DBinit('action_download'); break; default: exit; break; } switch ($method) { case 'upload': // TODO Список последних добавленых файлов if (empty($user) or $user->lvl() < 15) { break; }