Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
141 lines (115 sloc) 4.69 KB
<?php
header('Content-Type: text/html; charset=UTF-8');
session_start();
include "updates.php";
$APP_NAME = "Minipets Database";
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo $APP_NAME ?></title>
<link href='http://fonts.googleapis.com/css?family=Nobile:400,400italic,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="minipetter.css">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0">
<?php // This meta allows the user to place the page on their home screen and
// launch it like a native app, in a separate, UI-less version of Safari
?>
<meta name="apple-mobile-web-app-capable" content="yes" />
<?php // Workaround for IE<9 lack of support for media queries ?>
<!--[if lt IE 9]>
<style>
/* These rules are workarounds for IE<9 lack of media query support. */
body.medium_screen #page_title {
background-image: none;
width: 369px;
height: 158px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='logo.png', sizingMethod='scale');
}
body.medium_screen #main_wrapper {
top: 18em;
}
body.medium_screen #authors {
top: 0.7em;
left: 0.5em;
bottom: auto;
font-size: 0.7em;
color: #888;
}
body.medium_screen #login_panel {
top: 0.5em;
}
</style>
<![endif]-->
</head>
<?php
if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == 'true') {
echo ' <body class="logged_in">';
} else {
echo ' <body>';
}
?>
<div id="login_panel">
<label for="password">Admin password:
<input id="password"></label>
<a class="button" href="#log_in">log in</a>
<a class="button log_out" href="#log_out">log out</a>
</div>
<div id="authors">Minipets Database project by <a href="http://caerphoto.com/">Andy</a> and
<a href="http://www.alternative-blog.net/">The Godmother</a>. Source <a href="https://github.com/caerphoto/minipetter">available</a> on GitHub.</div>
<h1 id="page_title">The Minipets Database</h1>
<p>What's this all about? :: Click <a href="http://www.alternative-blog.net/2012/09/its-alive111111.html">here</a> for Details!</p>
<div id="list_controls" class="visible">
<label for="list_filter" class="search"><input id="list_filter" type="search"
placeholder="enter pet name"></label>
<label for="filter_by_type">Type:
<select id="filter_by_type"></select></label>
<label for="filter_by_rarity">Rarity:
<select id="filter_by_rarity"></select></label>
<label for="filter_by_source">Source:
<select id="filter_by_source"></select></label>
<span id="pet_count"><span></span> pets</span>
<button id="reset_filters">reset</button>
<a class="button visible" href="#add" title="Shortcut: A">add pet</a>
<a class="button visible" href="#new_update">new update</a>
</div>
<div id="main_wrapper">
<noscript>
<p id="o_noes_js">O noes! It seems you don't have JavaScript enabled in your browser. This site can't function without it, unfortunately, so you'll need to re-enable it before you can see all the minipet info.</p>
</noscript>
<p id="list_hint" style="display: none">Select a pet from the list on the right &rarr;</p>
<script> document.getElementById("list_hint").style.display = ""; </script>
<h2 id="last_update_date"><?php echo $last_update_date; ?></h2>
<p id="last_update_value"><?php echo $last_update_value; ?></p>
<ul id="pet_list" class="visible">
<li class="loading"><div class="loading_spinner">&#9650;</div>Loading pet data&hellip;</li>
</ul>
<div id="popup_box"></div>
<div id="editor"></div>
<div id="updater">
<label for="update_text">Add new update:</label>
<div class="textarea_wrapper">
<textarea name="update_text"></textarea>
</div>
<a class="button change" href="#save_update">save</a>
</div>
</div>
<?php // client-side templates
include("templates.html");
?>
<script>
// arrays generated by server
var config = {
fields: <?php echo json_encode($db_cols); ?>,
types: <?php echo json_encode($types); ?>,
sources: <?php echo json_encode($sources); ?>,
rarities: <?php echo json_encode($rarities); ?>,
app_name: "<?php echo $APP_NAME; ?>"
};
</script>
<script src="//caerphoto.com/jquery.js"></script>
<script src="//caerphoto.com/mustache.js"></script>
<script src="minipetter.js"></script>
</body>
</html>
Something went wrong with that request. Please try again.