<?php 
/*
	WordPress CLI theme
	R. McFarland 2006

	This is the basic HTML of the page. Javascript handles appending to the #display div.
*/

session_start();
/* This is used to check that sessions are behaving */
$_SESSION['sessions_work']=true;

require_once('cli-config.inc.php'); ?><!DOCTYPE HTML 
PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN">
<head>
<title><?php bloginfo('name'); ?> CLI</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<style type="text/css" media="screen">
	@import url( <?php bloginfo('stylesheet_url'); ?> );
</style>
<link rel="stylesheet" type="text/css" href="style.css" >
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory') ?>/cli.js.php"></script>
</head>
<body onload="setup();dokey();<?php
if(isset($_GET['p'])){ // if we are called asking for a particular post
	echo('showpost(\''.$_GET['p'].'\');');
}
if(isset($_GET['post_id'])){ // ... or a particular page
	echo('showpost(\''.$_GET['page_id'].'\');');
}
if(isset($_GET['cat'])){ // ... or a particular category
   echo('showcat(\''.$_GET['cat'].'\');');
} 
if(isset($_GET['s'])){ // ... or a particular search
	echo('autosearch(\''.$_GET['s'].'\');');
}
?>" onkeydown="dokey();">
<div id="scr" style="height:100%;overflow:auto">
<div id="display"><h1><?php echo get_bloginfo('name'); ?></h1>
<noscript>
<p style="height:100%">Sorry, the CLI requires JavaScript to work. Please turn on JavaScript<?php if (GUI_URL){ ?>, 
or try the <a href="<?php echo GUI_URL?>">GUI Interface</a>.
<?php }else{ echo ".";} ?>
</p>
</noscript>
<p>Note to installer: CLI 1.0 is no longer supported! Unless you are installing this out of morbid curiosity, you have the 
wrong CLI. Please get CLI 2 from themes.wordpress.net or <a href="http://code.google.com/p/wordpress-cli/">Google 
code</a>. Sorry for the inconvenience.</p>
<p>Welcome. Type 'help' for assistance.</p></div>
<div><form onsubmit="return false;" action="<?php bloginfo('home'); ?>"><pre style="display:inline"><span id="prompt"></span><span 
id="command"></span><input type="text" 
name="dude" value="" onkeyup="showtype(this.value);" onchange="docmd(this.value);" ></pre><img id="csr" src="<?php bloginfo('stylesheet_directory') 
?>/cursor.gif" alt="_" ></form></div>
</div>
</body>
</html>
