* * PHP Version 5.2.0 or Upper version * * @package Dura * @author Hidehito NOZAWA aka Suin <http://suin.asia> * @copyright 2010 Hidehito NOZAWA * @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3 * */ if (file_exists('setting.php')) { require 'setting.php'; } else { require 'setting.dist.php'; } require 'dura.php'; Dura::setup(); if (!isset($_SESSION['room']['id'])) { // Session not exists. header('Content-Type: application/xml; charset=UTF-8'); die('<?xml version="1.0" encoding="UTF-8"?><room><error>1</error></room>'); } $id = $_SESSION['room']['id']; $roomHandler = new Dura_Model_RoomHandler(); $roomModel = $roomHandler->load($id); if (!$roomModel) { // Room not found. header('Content-Type: application/xml; charset=UTF-8'); die('<?xml version="1.0" encoding="UTF-8"?><room><error>2</error></room>'); } $file = $roomHandler->getFilePath($id); $content = md5(file_get_contents($file));