Location: PHPKode > scripts > Genghis > bobthecow-genghis-eb612d1/genghis.php
<?php

/**
 * Genghis v2.1.0
 *
 * The single-file MongoDB admin app
 *
 * http://genghisapp.com
 *
 * @author Justin Hileman <hide@address.com>
 */
define('GENGHIS_VERSION', "2.1.0");

class Genghis_Api extends Genghis_App { const ROUTE_PATTERN = '~^/?servers(?:/(?P<server>[^/]+)(?P<databases>/databases(?:/(?P<db>[^/]+)(?P<collections>/collections(?:/(?P<coll>[^/]+)(?P<documents>/documents(?:/(?P<id>[^/]+))?)?)?)?)?)?)?/?$~'; const CHECK_STATUS_ROUTE = '~/?check-status/?$~'; const PAGE_LIMIT = 50; protected $servers; public function __construct() { $this->servers = new Genghis_ServerCollection; } public function route($method, $path) { if (preg_match(self::CHECK_STATUS_ROUTE, $path)) { return new Genghis_JsonResponse($this->checkStatusAction()); } $p = array(); if (preg_match(self::ROUTE_PATTERN, $path, $p)) { $p = array_filter($p); if (isset($p['id'])) { return new Genghis_JsonResponse($this->documentAction($method, $p['server'], $p['db'], $p['coll'], $p['id'])); } if (isset($p['documents'])) { return new Genghis_JsonResponse($this->documentsAction($method, $p['server'], $p['db'], $p['coll'])); } if (isset($p['coll'])) { return new Genghis_JsonResponse($this->collectionAction($method, $p['server'], $p['db'], $p['coll'])); } if (isset($p['collections'])) { return new Genghis_JsonResponse($this->collectionsAction($method, $p['server'], $p['db'])); } if (isset($p['db'])) { return new Genghis_JsonResponse($this->databaseAction($method, $p['server'], $p['db'])); } if (isset($p['databases'])) { return new Genghis_JsonResponse($this->databasesAction($method, $p['server'])); } if (isset($p['server'])) { return new Genghis_JsonResponse($this->serverAction($method, $p['server'])); } return new Genghis_JsonResponse($this->serversAction($method)); } throw new Genghis_HttpException(404); } protected function checkStatusAction() { $alerts = array(); if (!class_exists('Mongo', false)) { $alerts[] = array( 'level' => 'error', 'msg' => '<h4>Mongo PHP class not found.</h4> ' . 'Have you installed and enabled the <strong>PECL Mongo drivers</strong>?', ); } if (!$this->skipUpdateCheck()) { try { $latest = @file_get_contents('https://raw.github.com/bobthecow/genghis/master/VERSION'); if ($latest && version_compare($latest, GENGHIS_VERSION, '>')) { $alerts[] = array( 'level' => 'warning', 'msg' => '<h4>A Genghis update is available</h4> ' . 'You are running Genghis version <tt>' . GENGHIS_VERSION . '</tt>. ' . 'The current version is <tt>' . $latest . '</tt>. ' . 'Visit <a href="http://genghisapp.com">genghisapp.com</a> for more information.' ); } } catch (Exception $e) { } } try { $d = new DateTime; } catch (Exception $e) { $msg = $e->getMessage(); if (strpos($msg, 'date.timezone') === false) { throw $e; } $alerts[] = array( 'level' => 'warning', 'msg' => preg_replace('/^(?:DateTime::__construct\(\): )?([^\.]+\.)/', '<h4>\1</h4> ', $msg), ); } return compact('alerts'); } public function documentAction($method, $server, $db, $coll, $id) { switch ($method) { case 'GET': return $this->servers[$server][$db][$coll][$id]; case 'PUT': $this->servers[$server][$db][$coll][$id] = $this->getRequestData(); return $this->servers[$server][$db][$coll][$id]; case 'DELETE': unset($this->servers[$server][$db][$coll][$id]); return array('success' => true); default: throw new Genghis_HttpException(405); } } public function documentsAction($method, $server, $db, $coll) { switch ($method) { case 'GET': $query = (string) $this->getQueryParam('q', ''); $page = (int) $this->getQueryParam('page', 1); return $this->servers[$server][$db][$coll]->findDocuments($query, $page); case 'POST': return $this->servers[$server][$db][$coll]->insert($this->getRequestData()); default: throw new Genghis_HttpException(405); } } public function collectionAction($method, $server, $db, $coll) { switch ($method) { case 'GET': return $this->servers[$server][$db][$coll]; case 'DELETE': unset($this->servers[$server][$db][$coll]); return array('success' => true); default: throw new Genghis_HttpException(405); } } public function collectionsAction($method, $server, $db) { switch ($method) { case 'GET': return $this->servers[$server][$db]->listCollections(); case 'POST': return $this->servers[$server][$db]->createCollection($this->getRequestParam('name')); default: throw new Genghis_HttpException(405); } } public function databaseAction($method, $server, $db) { switch ($method) { case 'GET': return $this->servers[$server][$db]; case 'DELETE': unset($this->servers[$server][$db]); return array('success' => true); default: throw new Genghis_HttpException(405); } } public function databasesAction($method, $server) { switch ($method) { case 'GET': return $this->servers[$server]->listDatabases(); case 'POST': return $this->servers[$server]->createDatabase($this->getRequestParam('name')); default: throw new Genghis_HttpException(405); } } public function serverAction($method, $server) { switch ($method) { case 'GET': return $this->servers[$server]; case 'DELETE': unset($this->servers[$server]); return array('success' => true); default: throw new Genghis_HttpException(405); } } public function serversAction($method) { switch ($method) { case 'GET': return $this->servers; case 'POST': $server = new Genghis_Models_Server($this->getRequestParam('name')); $this->servers[] = $server; return $server; default: throw new Genghis_HttpException(405); } } protected function skipUpdateCheck() { return (isset($_ENV['GENGHIS_NO_UPDATE_CHECK']) && $_ENV['GENGHIS_NO_UPDATE_CHECK']) || (isset($_SERVER['GENGHIS_NO_UPDATE_CHECK']) && $_SERVER['GENGHIS_NO_UPDATE_CHECK']); } protected function getRequestData($gfj = true) { $data = file_get_contents('php://input'); if ($gfj) { try { $json = Genghis_Json::decode($data); } catch (Genghis_JsonException $e) { throw new Genghis_HttpException(400, 'Malformed document'); } } else { $json = json_decode($data, true); } if (empty($json)) { throw new Genghis_HttpException(400, 'Malformed document'); } return $json; } protected function getRequestParam($name) { $data = $this->getRequestData(false); if (!isset($data[$name])) { throw new HttpException(400, sprintf("'%s' must be specified", $name)); } return $data[$name]; } }
class Genghis_App { protected $assets = array(); protected $assetEtags = array(); protected $baseUrl; public function run() { try { $response = $this->route($this->getRequestMethod(), $this->getRequestPath()); if ($response instanceof Genghis_Response) { $response->render(); } else { throw new Genghis_HttpException(500); } } catch (Genghis_HttpException $e) { $errorResponse = $this->renderTemplate( 'error.html.mustache', $e->getStatus(), array( 'message' => $e->getMessage(), 'status' => $e->getStatus(), ) ); $errorResponse->render(); } } public function route($method, $path) { if ($this->isJsonRequest()) { try { $api = new Genghis_Api; return $api->route($method, $path); } catch (Genghis_HttpException $e) { $msg = $e->getMessage() ? $e->getMessage() : Genghis_Response::getStatusText($e->getStatus()); return new Genghis_JsonResponse(array('error' => $msg, 'status' => $e->getStatus()), $e->getStatus()); } } else { if (strpos($path, '/assets/') === 0) { return $this->getAsset(substr($path, 8)); } else { return $this->renderTemplate('index.html.mustache'); } break; } } protected function isJsonRequest() { if (in_array($this->getRequestMethod(), array('POST', 'PUT'))) { if (array_key_exists('HTTP_CONTENT_TYPE', $_SERVER)) { $type = $_SERVER['HTTP_CONTENT_TYPE']; } elseif (array_key_exists('CONTENT_TYPE', $_SERVER)) { $type = $_SERVER['CONTENT_TYPE']; } else { $type = 'x-www-form-urlencoded'; } } else { $type = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : 'text/html'; } return strpos($type, 'application/json') !== false || strpos($type, 'application/javascript') !== false; } protected function getBaseUrl() { if (!isset($this->baseUrl)) { $this->baseUrl = $this->prepareBaseUrl(); } return $this->baseUrl; } protected function prepareBaseUrl() { $filename = basename($_SERVER['SCRIPT_FILENAME']); foreach (array('SCRIPT_NAME', 'PHP_SELF', 'ORIG_SCRIPT_NAME') as $key) { if (isset($_SERVER[$key]) && basename($_SERVER[$key]) == $filename) { $baseUrl = $_SERVER[$key]; break; } } if (!isset($baseUrl)) { $path = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''; $file = isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : ''; $chunks = array_reverse(explode('/', trim($file, '/'))); $index = 0; $last = count($chunks); $baseUrl = ''; do { $seg = $chunks[$index]; $baseUrl = '/'.$seg.$baseUrl; ++$index; } while (($last > $index) && (false !== ($pos = strpos($path, $baseUrl))) && (0 != $pos)); } $requestUri = $_SERVER['REQUEST_URI']; if ($baseUrl && 0 === strpos($requestUri, $baseUrl)) { return $baseUrl; } if ($baseUrl && 0 === strpos($requestUri, dirname($baseUrl))) { return rtrim(dirname($baseUrl), '/'); } $truncatedRequestUri = $requestUri; if (($pos = strpos($requestUri, '?')) !== false) { $truncatedRequestUri = substr($requestUri, 0, $pos); } $basename = basename($baseUrl); if (empty($basename) || !strpos($truncatedRequestUri, $basename)) { return ''; } if ((strlen($requestUri) >= strlen($baseUrl)) && ((false !== ($pos = strpos($requestUri, $baseUrl))) && ($pos !== 0))) { $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); } return rtrim($baseUrl, '/'); } protected function getRequestMethod() { return $_SERVER['REQUEST_METHOD']; } protected function getRequestPath() { if (isset($_SERVER['PATH_INFO'])) { return $_SERVER['PATH_INFO']; } elseif (isset($_SERVER['REQUEST_URI'])) { return parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); } else { return '/'; } } protected function getQueryParams() { global $_GET; return $_GET; } protected function getQueryParam($name, $default = null) { $params = $this->getQueryParams(); if (isset($params[$name])) { return $params[$name]; } else { return $default; } } protected function renderTemplate($name, $status = 200, array $vars = array()) { $this->initAssets(); $defaults = array( 'base_url' => $this->getBaseUrl(), 'genghis_version' => GENGHIS_VERSION, ); return new Genghis_Response(strtr($this->assets[$name], $this->prepareVars(array_merge($defaults, $vars))), $status); } protected function prepareVars($vars) { $ret = array(); foreach ($vars as $name => $var) { $ret['{{ '.$name.' }}'] = $var; } return $ret; } protected function getAsset($name) { $this->initAssets(); if (isset($this->assets[$name])) { return new Genghis_AssetResponse($name, $this->assets[$name], array( 'Last-Modified' => gmdate("D, d M Y H:i:s", filemtime(__FILE__))." GMT", 'Etag' => sprintf('"%s"', $this->assetEtags[$name]), )); } throw new Genghis_HttpException(404); } protected function initAssets() { if (empty($this->assets)) { $data = file_get_contents(__FILE__, false, null, __COMPILER_HALT_OFFSET__); foreach (preg_split("/^@@(?=[\w\d\.]+( [\w\d\.]+)?$)/m", $data, -1) as $asset) { if (trim($asset)) { list($line, $content) = explode("\n", $asset, 2); list($name, $etag) = explode(" ", $line, 2); $this->assets[$name] = trim($content); $this->assetEtags[$name] = $etag; } } } } }
class Genghis_AssetResponse extends Genghis_Response { protected $headers; private static $extMap = array( 'js' => 'application/x-javascript', 'json' => 'application/json', 'css' => 'text/css', 'html' => 'text/html', 'htm' => 'text/html', 'php' => 'text/html', 'txt' => 'text/plain', ); public function __construct($name, $content, $headers = array()) { parent::__construct($content); $this->name = $name; $this->headers = array_merge(array('Content-type' => $this->getContentType()), $headers); } protected function getContentType() { $parts = explode('.', $this->name); $ext = end($parts); if (isset(self::$extMap[$ext])) { return self::$extMap[$ext]; } else { return 'unknown/' . trim($ext); } } }
class Genghis_HttpException extends Exception { protected $status; public function __construct($status = 500, $msg = '') { $this->status = $status; parent::__construct(empty($msg) ? Genghis_Response::getStatusText($status) : $msg); } public function getStatus() { return $this->status; } }
class Genghis_Json { public static function encode($object) { return json_encode(self::doEncode($object)); } private static function doEncode($object) { if (is_object($object) && $object instanceof Genghis_JsonEncodable) { $object = $object->asJson(); } if (is_object($object)) { switch (get_class($object)) { case 'MongoId': return array( '$genghisType' => 'ObjectId', '$value' => (string) $object ); case 'MongoDate': return array( '$genghisType' => 'ISODate', '$value' => date(DATE_W3C, $object->sec) ); case 'MongoRegex': return array( '$genghisType' => 'RegExp', '$value' => array( '$pattern' => $object->regex, '$flags' => $object->flags ? $object->flags : null ) ); case 'MongoBinData': return array( '$genghisType' => 'BinData', '$value' => array( '$subtype' => $object->type, '$binary' => base64_encode($object->bin), ) ); } foreach ($object as $prop => $value) { $object->$prop = self::doEncode($value); } } elseif (is_array($object)) { foreach ($object as $key => $value) { $object[$key] = self::doEncode($value); } } return $object; } public static function decode($object) { if (is_string($object)) { $object = json_decode($object); if ($object === false) { throw new Genghis_JsonException; } } return self::doDecode($object); } private static function doDecode($object) { if (is_object($object)) { if ($type = self::getProp($object, 'genghisType')) { $value = self::getProp($object, 'value'); switch ($type) { case 'ObjectId': return new MongoId($value); case 'ISODate': return ($value === null) ? new MongoDate : new MongoDate($value); case 'RegExp': $pattern = self::getProp($value, 'pattern'); $flags = self::getProp($value, 'flags'); return new MongoRegex(sprintf('/%s/%s', $pattern, $flags)); case 'BinData': $data = base64_decode(self::getProp($value, 'binary')); $type = self::getProp($value, 'subtype'); return new MongoBinData($data, $type); } } else { foreach ($object as $prop => $value) { $object->$prop = self::doDecode($value); } } } elseif (is_array($object)) { foreach ($object as $key => $value) { $object[$key] = self::doDecode($value); } } return $object; } private static function getProp($object, $name) { $name = sprintf('$%s', $name); return isset($object->$name) ? $object->$name : null; } }
interface Genghis_JsonEncodable { public function asJson(); }
class Genghis_JsonException extends Exception { }
class Genghis_JsonRegex { public $pattern; public function __construct($pattern) { $this->pattern = $pattern; } public function __toString() { return $this->getPattern(); } }
class Genghis_JsonResponse extends Genghis_Response { public function renderHeaders() { $this->headers['Content-type'] = 'application/json'; $this->headers['Cache-Control'] = 'no-cache, must-revalidate'; $this->headers['Expires'] = 'Wed, 04 Aug 1982 00:00:00 GMT'; parent::renderHeaders(); } public function renderContent() { print(Genghis_Json::encode($this->data)); } }
class Genghis_Models_Collection implements ArrayAccess, Genghis_JsonEncodable { public $database; public $collection; public function __construct(Genghis_Models_Database $database, MongoCollection $collection) { $this->database = $database; $this->collection = $collection; } public function offsetExists($id) { try { $this->findDocument($id); } catch (Genghis_HttpException $e) { if ($e->getStatus() == 404) { return false; } else { throw $e; } } return true; } public function offsetGet($id) { return $this->findDocument($id); } public function offsetSet($id, $doc) { $this->findDocument($id); $query = array('_id' => $this->thunkMongoId($id)); $result = $this->collection->update($query, $doc, array('safe' => true)); if (!(isset($result['ok']) && $result['ok'])) { throw new Genghis_HttpException; } } public function offsetUnset($id) { $this->findDocument($id); $query = array('_id' => $this->thunkMongoId($id)); $result = $this->collection->remove($query, array('safe' => true)); if (!(isset($result['ok']) && $result['ok'])) { throw new Genghis_HttpException; } } public function findDocuments($query = null, $page = 1) { try { $query = Genghis_Json::decode($query); } catch (Genghis_JsonException $e) { throw new Genghis_HttpException(400, 'Malformed document'); } $offset = Genghis_Api::PAGE_LIMIT * ($page - 1); $cursor = $this->collection ->find($query ? $query : array()) ->limit(Genghis_Api::PAGE_LIMIT) ->skip($offset); $count = $cursor->count(); if (is_array($count) && isset($count['errmsg'])) { throw new Genghis_HttpException(400, $count['errmsg']); } return array( 'count' => $count, 'page' => $page, 'pages' => max(1, ceil($count / Genghis_Api::PAGE_LIMIT)), 'per_page' => Genghis_Api::PAGE_LIMIT, 'offset' => $offset, 'documents' => array_values(iterator_to_array($cursor)), ); } public function insert($data) { $result = $this->collection->insert($data, array('safe' => true)); if (!(isset($result['ok']) && $result['ok'])) { throw new Genghis_HttpException; } return $data; } public function drop() { $this->collection->drop(); } public function asJson() { $name = $this->collection->getName(); $colls = $this->database->database->listCollections(); foreach ($colls as $coll) { if ($coll->getName() == $name) { return array( 'id' => $coll->getName(), 'name' => $coll->getName(), 'count' => $coll->count(), 'indexes' => $coll->getIndexInfo(), ); } } throw new Genghis_HttpException(404, sprintf("Collection '%s' not found in '%s'", $name, $this->database->name)); } private function thunkMongoId($id) { if ($id[0] == '~') { return Genghis_Json::decode(base64_decode(substr($id, 1))); } return preg_match('/^[a-f0-9]{24}$/i', $id) ? new MongoId($id) : $id; } private function findDocument($id) { $doc = $this->collection->findOne(array('_id' => $this->thunkMongoId($id))); if (!$doc) { throw new Genghis_HttpException(404, sprintf("Document '%s' not found in '%s'", $id, $this->collection->getName())); } return $doc; } }
class Genghis_Models_Database implements ArrayAccess, Genghis_JsonEncodable { public $name; public $server; public $database; private $collections = array(); private $mongoCollections; public function __construct(Genghis_Models_Server $server, MongoDB $database) { $this->server = $server; $this->database = $database; $this->name = (string) $database; } public function drop() { $this->database->drop(); } public function offsetExists($name) { return ($this->getMongoCollection($name) !== null); } public function offsetGet($name) { if (!isset($this->collections[$name])) { $coll = $this->getMongoCollection($name); if ($coll === null) { throw new Genghis_HttpException(404, sprintf("Collection '%s' not found in '%s'", $name, $this->name)); } $this->collections[$name] = new Genghis_Models_Collection($this, $coll); } return $this->collections[$name]; } public function offsetSet($name, $value) { throw new Exception; } public function offsetUnset($name) { $this[$name]->drop(); } public function getCollectionNames() { $colls = array(); foreach ($this->getMongoCollections() as $coll) { $colls[] = $coll->getName(); } return $colls; } public function listCollections() { return array_map(array($this, 'offsetGet'), $this->getCollectionNames()); } public function createCollection($name) { if (isset($this[$name])) { throw new Genghis_HttpException(400, sprintf("Collection '%s' already exists in '%s'", $name, $this->name)); } try { $this->database->createCollection($name); } catch (Exception $e) { if (strpos($e->getMessage(), 'invalid name') !== false) { throw new Genghis_HttpException(400, 'Invalid collection name'); } throw $e; } unset($this->mongoCollections); return $this[$name]; } public function asJson() { $dbs = $this->server->getConnection()->listDBs(); foreach ($dbs['databases'] as $db) { if ($db['name'] == $this->name) { $colls = $this->getCollectionNames(); return array( 'id' => $db['name'], 'name' => $db['name'], 'count' => count($colls), 'collections' => $colls, 'size' => $db['sizeOnDisk'], ); } } throw new Genghis_HttpException(404, sprintf("Database '%s' not found on '%s'", $database, $server)); } private function getMongoCollection($name) { foreach ($this->getMongoCollections() as $coll) { if ($coll->getName() === $name) { return $coll; } } } private function getMongoCollections() { if (!isset($this->mongoCollections)) { $this->mongoCollections = $this->database->listCollections(); } return $this->mongoCollections; } }
class Genghis_Models_Server implements ArrayAccess, Genghis_JsonEncodable { public $dsn; public $name; public $options; public $default; private $connection; private $databases = array(); public function __construct($dsn, $default = false) { $this->default = $default; try { $config = self::parseDsn($dsn); $this->name = $config['name']; $this->dsn = $config['dsn']; $this->options = $config['options']; } catch (Genghis_HttpException $e) { $this->name = $dsn; $this->dsn = $dsn; $this->error = $e->getMessage(); } } public function offsetExists($name) { $list = $this->getConnection()->listDBs(); foreach ($list['databases'] as $db) { if ($db['name'] === $name) { return true; } } return false; } public function offsetGet($name) { if (!isset($this[$name])) { throw new Genghis_HttpException(404, sprintf("Database '%s' not found on '%s'", $name, $this->name)); } if (!isset($this->databases[$name])) { $this->databases[$name] = new Genghis_Models_Database($this, $this->getConnection()->selectDB($name)); } return $this->databases[$name]; } public function getConnection() { if (!isset($this->connection)) { $this->connection = new Mongo($this->dsn, $this->options); } return $this->connection; } public function createDatabase($name) { if (isset($this[$name])) { throw new Genghis_HttpException(400, sprintf("Database '%s' already exists on '%s'", $name, $this->name)); } try { $db = $this->connection->selectDB($name); } catch (Exception $e) { if (strpos($e->getMessage(), 'invalid name') !== false) { throw new Genghis_HttpException(400, 'Invalid database name'); } throw $e; } $db->selectCollection('__genghis_tmp_collection__')->drop(); return $this[$name]; } public function listDatabases() { $dbs = array(); $list = $this->getConnection()->listDBs(); foreach ($list['databases'] as $db) { $dbs[] = $this[$db['name']]; } return $dbs; } public function getDatabaseNames() { $names = array(); $list = $this->getConnection()->listDBs(); foreach ($list['databases'] as $db) { $names[] = $db['name']; } return $names; } public function offsetSet($name, $value) { throw new Exception; } public function offsetUnset($name) { $this[$name]->drop(); } public function asJson() { $server = array( 'id' => $this->name, 'name' => $this->name, 'editable' => !$this->default, ); if (isset($this->error)) { $server['error'] = $this->error; return $server; } try { $res = $this->getConnection()->listDBs(); if (isset($res['errmsg'])) { $server['error'] = sprintf("Unable to connect to Mongo server at '%s': %s", $this->name, $res['errmsg']); return $server; } $dbs = $this->getDatabaseNames(); return array_merge($server, array( 'size' => $res['totalSize'], 'count' => count($dbs), 'databases' => $dbs, )); } catch (Exception $e) { $server['error'] = sprintf("Unable to connect to Mongo server at '%s'", $this->name); return $server; } } public static function parseDsn($dsn) { if (strpos($dsn, '://') === false) { $dsn = 'mongodb://'.$dsn; } else if (strpos($dsn, 'mongodb://') !== 0) { throw new Genghis_HttpException(400, 'Malformed server DSN: unknown URI scheme'); } $chunks = parse_url($dsn); if ($chunks === false || isset($chunks['query']) || isset($chunks['fragment']) || !isset($chunks['host'])) { throw new Genghis_HttpException(400, 'Malformed server DSN'); } $options = array(); if (isset($chunks['query'])) { parse_str($chunks['query'], $options); foreach ($options as $name => $value) { if (!in_array($name, array('replicaSet'))) { throw new Genghis_HttpException(400, 'Malformed server DSN: Unknown option — ' . $name); } $options[$name] = (string) $value; } } $name = $chunks['host']; if (isset($chunks['user'])) { $name = $chunks['user'].'@'.$name; } if (isset($chunks['port']) && $chunks['port'] !== 27017) { $name .= ':'.$chunks['port']; } return compact('name', 'dsn', 'options'); } }
class Genghis_RedirectResponse extends Genghis_Response { public function __construct($url, $status = 301) { parent::__construct($url, $status); } public function render() { header(sprintf('Location: %s', $this->data), $this->status); } }
class Genghis_Response { protected static $statusCodes = array( 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 204 => 'No Content', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 400 => 'Bad Request', 401 => 'Unauthorized', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 412 => 'Precondition Failed', 415 => 'Unsupported Media Type', 417 => 'Expectation Failed', 500 => 'Internal Server Error', 501 => 'Not Implemented', ); protected $data = ''; protected $status = 200; protected $headers = array(); public function __construct($data, $status = 200, $headers = array()) { $this->data = $data; $this->status = $status; $this->headers = $headers; } public function render() { $this->renderHeaders(); $this->renderContent(); } public static function getStatusText($status) { if (isset(self::$statusCodes[$status])) { return self::$statusCodes[$status]; } } protected function renderHeaders() { header(sprintf('HTTP/1.0 %s %s', $this->status, self::$statusCodes[$this->status])); foreach ($this->headers as $name => $val) { header(sprintf('%s: %s', $name, $val)); } } protected function renderContent() { print((string) $this->data); } }
class Genghis_ServerCollection implements ArrayAccess, Genghis_JsonEncodable { private $serverDsns; private $servers; private $defaultServerDsns; private $defaultServers; public function __construct(array $servers = null, array $defaultServers = null) { $this->serverDsns = $servers; $this->defaultServerDsns = $defaultServers; } public function offsetExists($name) { $this->initDsns(); return isset($this->serverDsns[$name]) || isset($this->defaultServerDsns[$name]); } public function offsetGet($name) { if (!isset($this[$name])) { throw new Genghis_HttpException(404, sprintf("Server '%s' not found", $name)); } if (!isset($this->servers[$name])) { if (isset($this->serverDsns[$name])) { $this->servers[$name] = new Genghis_Models_Server($this->serverDsns[$name]); } elseif (isset($this->defaultServerDsns[$name])) { $this->servers[$name] = new Genghis_Models_Server($this->defaultServerDsns[$name], true); } } return $this->servers[$name]; } public function offsetSet($name, $server) { if (!$server instanceof Genghis_Models_Server) { throw new Exception('Invalid Server instance'); } if (isset($this->serverDsns[$server->name])) { throw new Genghis_HttpException(400, sprintf("Server '%s' already exists", $server->name)); } $this->serverDsns[$server->name] = $server->dsn; $this->servers[$server->name] = $server; $this->saveServers(); } public function offsetUnset($name) { $this->initServers(); if (!isset($this->servers[$name])) { throw new Genghis_HttpException(404, sprintf("Server '%s' not found", $name)); } unset($this->servers[$name]); $this->saveServers(); } public function asJson() { $this->initServers(); return array_values($this->servers); } private function initDsns() { if (!isset($this->serverDsns)) { $this->serverDsns = array(); if (isset($_COOKIE['genghis_servers']) && $localDsns = $this->decodeJson($_COOKIE['genghis_servers'])) { foreach (array_map(array('Genghis_Models_Server', 'parseDsn'), $localDsns) as $info) { $this->serverDsns[$info['name']] = $info['dsn']; } } } if (!isset($this->defaultServerDsns)) { $this->defaultServerDsns = array(); $defaultDsns = array_merge( isset($_ENV['GENGHIS_SERVERS']) ? explode(';', $_ENV['GENGHIS_SERVERS']) : array(), isset($_SERVER['GENGHIS_SERVERS']) ? explode(';', $_SERVER['GENGHIS_SERVERS']) : array() ); foreach (array_map(array('Genghis_Models_Server', 'parseDsn'), $defaultDsns) as $info) { $this->defaultServerDsns[$info['name']] = $info['dsn']; } } if (empty($this->serverDsns) && empty($this->defaultServerDsns)) { $this[] = new Genghis_Models_Server('localhost:27017'); } } private function initServers() { $this->initDsns(); foreach (array_merge(array_keys($this->serverDsns), array_keys($this->defaultServerDsns)) as $name) { $this[$name]; } } private function decodeJson($data) { $json = json_decode($data, true); if ($json === false && trim($data) != '') { throw new Genghis_HttpException(400, 'Malformed document'); } return $json; } private function saveServers() { $servers = array(); foreach ($this->servers as $server) { if (!$server->default) { $servers[$server->name] = $server->dsn; } } setcookie('genghis_servers', json_encode($servers), time()+60*60*24*365, '/'); } }


$app = new Genghis_App;
$app->run();

__halt_compiler();

@@index.html.mustache 121cc36fc06df7bd075cf09bc8c30c74
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Genghis</title> <link rel="shortcut icon" type="image/png" href="data:image/png;base64,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pqsj/KTGun9wyVNdFryzJsbh66yzT OmValhK2mkRJG1Ixts6RuqPGtgmWHDh74vR1U1xI/MZJ8UziUF5QYDDdpl07 1hT7b9s5ma40deVjutwctSbygxHfJ1j2gc8fDlOHxaB3TflldlPjhyea0Bb+ YIzZ//MnEAhApJd8e9sTy0L3LrhUp0zPVadlKnVamUIpk5KkRyrXyjAfSXns lHXSYxnzTFmCL6m4zz787/oz9Z0RsNCr/yuBQCZPUu5X161Z9nB2ekrsewTg woDPH0bTYGvX1Vv96FihlnhiBfzWFmodU8hhquz8vAeXZqRkpKq1CtAFlN0t 0YAeoHwut8tmsZonxgcGhud7jSUEcI8JCBMstAT1MLfQOOYdH+16fd7hF9oR B5duYC1dpM8M8pkhtHg5zL0PLDoOQcCLcxIH0YOxzzuZB6RxHAT/H1OHBz2Q /r/iZq+07nQhoQAAAABJRU5ErkJggg== "> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link type="text/css" rel="stylesheet" href="//fonts.googleapis.com/css?family=Rokkitt:400,700"> <link type="text/css" rel="stylesheet" href="{{ base_url }}/assets/style.css?v={{ genghis_version }}"> <script type="text/javascript" src="{{ base_url }}/assets/script.js?v={{ genghis_version }}"></script> <script type="text/javascript">jQuery(function() { Genghis.boot('{{ base_url }}'); });</script> </head> <body> <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container fixed"> <a class="magic brand" href="{{ base_url }}/">Genghis</a> <nav></nav> </div> </div> </header> <noscript><h1>You won&#146;t get far in life without JavaScript&hellip;</h1></noscript> <section id="genghis" class="container fluid"> <aside id="alerts"></aside> <section id="servers"></section> <section id="databases"></section> <section id="collections"></section> <section id="documents"></section> <section id="document"><header></header></section> <section id="error"></section> </section> <footer class="container"> <p><a href="http://genghisapp.com">Genghis</a>, by <a href="http://justinhileman.info">Justin Hileman</a>.</p> <p><a class="keyboard-shortcuts" href="#">Keyboard shortcuts available <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAANCAYAAACgu+4kAAABK0lEQVR42p2R sWqDUBSGL5QOfYFCn8NXKJpop0BoH0OHZnJzKGTTIZghGF0TECFLtkCmQB4g kw4uEQTRTRz++gsZEkKadPj87znnfocLCgBCVdVvWZZfeX6U7qMoynuv1/sa DocvrJmapg3axVbLD+GZPc4uF1B46vf7n7x4gnW7+I3z09K2/8H+5YK7kSTp mS85WzCfzye+7+MRPM/rkq6YzWZIkgT7/R5xHN+VhA5d4bouttstmqbBZrP5 M+u6Jp1DV9i2jd1uh9Vq9RB06IrxeIzD4YDFYoGqqm5mURTIsgx5niOKItAV lmVhvV4jCIKbhGF4VtOhK0zT7BplWWI6neJ4PCJN06twdrpDh64YjUZYLpdw HIe/h3kNzs6SDl2h6/rEMAz8B7q//llIEoKdz2AAAAAASUVORK5CYII= "></a></p> </footer> </body> </html>

@@error.html.mustache a8fab137eb0916c5e672f03a4cc7d3e2
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Genghis &mdash; {{ status }}: {{ message }}</title> <link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAME2lDQ1BJQ0Mg UHJvZmlsZQAASA2tV2dYU8kanlNSCAktEAEpoTdRepVeAyhIFWyEJCShhBAI KvayqMBaUBHBiq6K2NYCyFoQK8oi2PsGEQVlXSzYULlzKOrevfvvnueZOe95 553v++abOfPMAKDSypVKM1A1ADIlubLoEH/25MQkNuUBoAJtQAcWgMHl5Uj9 oqIiwL8+724BhGi8bkvY+lfZ/25Q5wtyeAAgUbA5hZ/Dy4T4KABYHU8qywWA RNgznZkrJfBqiDVlMECIdxJYOITrCJwyhJsHNbHRAVCjAIBK53JlQgAYPZBn 5/GE0I4KHWI7CV8sgXg8xN48EZcP8VyIx2RmZhF4D8SWKT/YEf6AudyUbza5 XOE3PDQW2BM6DhTnSDO4swc//p9VZoYc5mvwMYA1PSc9Jhy+WTBvs3jcoBiI tSFeKRJwIob5XdJc/+hh/oQ4lx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2PGbK7 nz8BvaQxTuj7bltEnXkKJALA/mJTz0VjN8+RV8S12450Vm1WckaCGvOysVjg HItNOX2DDrf0ha7Xt/ACBYvseN2d9hso2xjiKyUInHDzyu3Rhs+cIr2Ap+w5 Yqh9uQJzeJgBK2V0MXYfSwU/0YCPiuAMSrOY28eOOXx9dspCkesPddX/fgVs oRkZa2671kYE6UT/L1UUpUS3CGhxzKsn0gqy8eWZy5OgJwtckbf2G/ufLpX0 6BtN0xz4VGMjWYuXnfaCvwwoWEmWoDgfSy55turdE+f3b81UwAJRQ8cH6y59 cmUCBRY452grvoRm6bda/+qPywpW/bToK/A3zGAg92hvS/PVy1caGts6GqeG C9Pz0pJTE7OWr1q1/mtPbSgvyhZf+6hrhmPVtec+rL0dDBbjf3wEXPiKAwef y0gq/dGyNdE5xEgrou67+9fq0fZTh08OixgIxahDKOCpwCbrB+TlX5a1WB2F afnwsSRMgiTxXh88c94+bfik6po9jhU5PgIAiYK4U29Slj+q6pzs9slzCtQJ SPCiGrHk3fOGc41en7nm9OlOyKVqFG+pqsj/KTGun9wyVNdFryzJsbh66yzT OmValhK2mkRJG1Ixts6RuqPGtgmWHDh74vR1U1xI/MZJ8UziUF5QYDDdpl07 1hT7b9s5ma40deVjutwctSbygxHfJ1j2gc8fDlOHxaB3TflldlPjhyea0Bb+ YIzZ//MnEAhApJd8e9sTy0L3LrhUp0zPVadlKnVamUIpk5KkRyrXyjAfSXns lHXSYxnzTFmCL6m4zz787/oz9Z0RsNCr/yuBQCZPUu5X161Z9nB2ekrsewTg woDPH0bTYGvX1Vv96FihlnhiBfzWFmodU8hhquz8vAeXZqRkpKq1CtAFlN0t 0YAeoHwut8tmsZonxgcGhud7jSUEcI8JCBMstAT1MLfQOOYdH+16fd7hF9oR B5duYC1dpM8M8pkhtHg5zL0PLDoOQcCLcxIH0YOxzzuZB6RxHAT/H1OHBz2Q /r/iZq+07nQhoQAAAABJRU5ErkJggg== "> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link type="text/css" rel="stylesheet" href="//fonts.googleapis.com/css?family=Rokkitt:400,700"> <link type="text/css" rel="stylesheet" href="{{ base_url }}/assets/style.css?v={{ genghis_version }}"> </head> <body> <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container fixed"> <a class="magic brand" href="{{ base_url }}/">Genghis</a> <nav></nav> </div> </div> </header> <header class="masthead epic error"> <div class="container"> <h1>{{ status }}: {{ message }}</h1> <p> If you think you've reached this message in error, please press <strong>0</strong> to speak with an operator. Otherwise, hang up and try again. </p> </div> </header> <section id="genghis" class="container fluid"></section> <footer class="container"> <p><a href="http://genghisapp.com">Genghis</a>, by <a href="http://justinhileman.info">Justin Hileman</a>.</p> </footer> </body> </html>

@@style.css 0ff83f9e268172b74aa318dd97855a5f
/**
 * Genghis v2.1.0
 *
 * The single-file MongoDB admin app
 *
 * http://genghisapp.com
 *
 * @author Justin Hileman <hide@address.com>
 */
.CodeMirror{line-height:1em;font-family:monospace;position:relative;overflow:hidden}.CodeMirror-scroll{overflow:auto;height:300px;position:relative;outline:none}.CodeMirror-scrollbar{position:absolute;right:0;top:0;overflow-x:hidden;overflow-y:scroll;z-index:5}.CodeMirror-scrollbar-inner{width:1px}.CodeMirror-scrollbar.cm-sb-overlap{position:absolute;z-index:1;float:none;right:0;min-width:12px}.CodeMirror-scrollbar.cm-sb-nonoverlap{min-width:12px}.CodeMirror-scrollbar.cm-sb-ie7{min-width:18px}.CodeMirror-gutter{position:absolute;left:0;top:0;z-index:10;background-color:#f7f7f7;border-right:1px solid #eee;min-width:2em;height:100%}.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre !important;cursor:default}.CodeMirror-lines{padding:.4em;white-space:pre;cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror textarea{outline:none !important}.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid black;border-right:none;width:0}.cm-keymap-fat-cursor pre.CodeMirror-cursor{width:auto;border:0;background:transparent;background:rgba(0,200,0,.4);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800,endColorstr=#4c00c800)}.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id){filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite{}.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible}div.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused div.CodeMirror-selected{background:#d7d4f0}.CodeMirror-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-s-default span.cm-keyword{color:#708}.cm-s-default span.cm-atom{color:#219}.cm-s-default span.cm-number{color:#164}.cm-s-default span.cm-def{color:#00f}.cm-s-default span.cm-variable{color:#000}.cm-s-default span.cm-variable-2{color:#05a}.cm-s-default span.cm-variable-3{color:#085}.cm-s-default span.cm-property{color:#000}.cm-s-default span.cm-operator{color:#000}.cm-s-default span.cm-comment{color:#a50}.cm-s-default span.cm-string{color:#a11}.cm-s-default span.cm-string-2{color:#f50}.cm-s-default span.cm-meta{color:#555}.cm-s-default span.cm-error{color:red}.cm-s-default span.cm-qualifier{color:#555}.cm-s-default span.cm-builtin{color:#30a}.cm-s-default span.cm-bracket{color:#cc7}.cm-s-default span.cm-tag{color:#170}.cm-s-default span.cm-attribute{color:#00c}.cm-s-default span.cm-header{color:blue}.cm-s-default span.cm-quote{color:#090}.cm-s-default span.cm-hr{color:#999}.cm-s-default span.cm-link{color:#00c}span.cm-header,span.cm-strong{font-weight:700}span.cm-em{font-style:italic}span.cm-emstrong{font-style:italic;font-weight:700}span.cm-link{text-decoration:underline}span.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}@media print{.CodeMirror pre.CodeMirror-cursor{visibility:hidden}}kbd,.key{display:inline;display:inline-block;min-width:1em;padding:.2em .3em;font:400 .85em/1 "Lucida Grande",Lucida,Arial,sans-serif;text-align:center;text-decoration:none;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-radius:.3em;border:none;cursor:default;-moz-user-select:none;-webkit-user-select:none;user-select:none}kbd[title],.key[title]{cursor:help}kbd,kbd.dark,.dark-keys kbd,.key,.key.dark,.dark-keys .key{background:#505050;background:-moz-linear-gradient(top,#3c3c3c,#505050);background:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#505050));color:#fafafa;text-shadow:-1px -1px 0 #464646;-moz-box-shadow:inset 0 0 1px #969696,inset 0 -.05em .4em #505050,0 .1em 0 #1e1e1e,0 .1em .1em rgba(0,0,0,.3);-webkit-box-shadow:inset 0 0 1px #969696,inset 0 -.05em .4em #505050,0 .1em 0 #1e1e1e,0 .1em .1em rgba(0,0,0,.3);box-shadow:inset 0 0 1px #969696,inset 0 -.05em .4em #505050,0 .1em 0 #1e1e1e,0 .1em .1em rgba(0,0,0,.3)}kbd.light,.light-keys kbd,.key.light,.light-keys .key{background:#fafafa;background:-moz-linear-gradient(top,#d2d2d2,#fff);background:-webkit-gradient(linear,left top,left bottom,from(#d2d2d2),to(#fff));color:#323232;text-shadow:0 0 2px#fff;-moz-box-shadow:inset 0 0 1px#fff,inset 0 0 .4em #c8c8c8,0 .1em 0 #828282,0 .11em 0 rgba(0,0,0,.4),0 .1em .11em rgba(0,0,0,.9);-webkit-box-shadow:inset 0 0 1px#fff,inset 0 0 .4em #c8c8c8,0 .1em 0 #828282,0 .11em 0 rgba(0,0,0,.4),0 .1em .11em rgba(0,0,0,.9);box-shadow:inset 0 0 1px#fff,inset 0 0 .4em #c8c8c8,0 .1em 0 #828282,0 .11em 0 rgba(0,0,0,.4),0 .1em .11em rgba(0,0,0,.9)}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#1d8835;text-decoration:none}a:hover{color:#10491c;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;content:"";line-height:0}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:700}em{font-style:italic}cite{font-style:normal}.muted{color:#999}.text-warning{color:#c09853}.text-error{color:#b94a48}.text-info{color:#3a87ad}.text-success{color:#468847}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:1;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1{font-size:36px;line-height:40px}h2{font-size:30px;line-height:40px}h3{font-size:24px;line-height:40px}h4{font-size:18px;line-height:20px}h5{font-size:14px;line-height:20px}h6{font-size:12px;line-height:20px}h1 small{font-size:24px}h2 small{font-size:18px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid#eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:700}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid#eee;border-bottom:1px solid#fff}abbr[title]{cursor:help;border-bottom:1px dotted#999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid#eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid#eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:400;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:9px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid#ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;border:1px solid#ccc;background-color:#fff}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);cursor:not-allowed}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls > .radio:first-child,.controls > .checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline + .radio.inline,.checkbox.inline + .checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"] + [class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0}.controls-row:after{clear:both}.controls-row [class*="span"]{float:left}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning > label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error > label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success > label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info > label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;font-size:14px;vertical-align:top;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0#fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on,.input-append .btn{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend + .control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input + .help-block,.form-horizontal select + .help-block,.form-horizontal textarea + .help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid#ddd}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table caption + thead tr:first-child th,.table caption + thead tr:first-child td,.table colgroup + thead tr:first-child th,.table colgroup + thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody + tbody{border-top:2px solid#ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid#ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid#ddd}.table-bordered caption + thead tr:first-child th,.table-bordered caption + tbody tr:first-child th,.table-bordered caption + tbody tr:first-child td,.table-bordered colgroup + thead tr:first-child th,.table-bordered colgroup + tbody tr:first-child th,.table-bordered colgroup + tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption + thead tr:first-child th:first-child,.table-bordered caption + tbody tr:first-child td:first-child,.table-bordered colgroup + thead tr:first-child th:first-child,.table-bordered colgroup + tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption + thead tr:first-child th:last-child,.table-bordered caption + tbody tr:first-child td:last-child,.table-bordered colgroup + thead tr:first-child th:last-child,.table-bordered colgroup + tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topleft:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table [class*=span],.row-fluid table [class*=span]{display:table-cell;float:none;margin-left:0}.table .span1{float:none;width:44px;margin-left:0}.table .span2{float:none;width:124px;margin-left:0}.table .span3{float:none;width:204px;margin-left:0}.table .span4{float:none;width:284px;margin-left:0}.table .span5{float:none;width:364px;margin-left:0}.table .span6{float:none;width:444px;margin-left:0}.table .span7{float:none;width:524px;margin-left:0}.table .span8{float:none;width:604px;margin-left:0}.table .span9{float:none;width:684px;margin-left:0}.table .span10{float:none;width:764px;margin-left:0}.table .span11{float:none;width:844px;margin-left:0}.table .span12{float:none;width:924px;margin-left:0}.table .span13{float:none;width:1004px;margin-left:0}.table .span14{float:none;width:1084px;margin-left:0}.table .span15{float:none;width:1164px;margin-left:0}.table .span16{float:none;width:1244px;margin-left:0}.table .span17{float:none;width:1324px;margin-left:0}.table .span18{float:none;width:1404px;margin-left:0}.table .span19{float:none;width:1484px;margin-left:0}.table .span20{float:none;width:1564px;margin-left:0}.table .span21{float:none;width:1644px;margin-left:0}.table .span22{float:none;width:1