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

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

require_once('cli-config.inc.php'); ?>
<html>
<head>
<title><?php echo get_bloginfo('name'); ?> CLI</title>
       <style type="text/css" media="screen">
                @import url( wp-content/themes/cli/style.css );
        </style>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-79254-1";
urchinTracker();
var sel=false;
var slx=0;
</script>
<script type="text/javascript" 
src="wp-content/themes/cli/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['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><p>Welcome. If you find command-line interfaces scary, there is a GUI for the blog available <a href="<?php echo GUI_URL; ?>/index.php">here</a>. Otherwise, type 'help' for assistance.</p></div>
<p><form onsubmit="return false;"><span id="prompt"></span><span id="command"></span><input type="text" name="dude" 
autocomplete="off" value="" onkeyup="showtype(this.value);" onchange="docmd(this.value)" /><img id="csr"
src="wp-content/themes/cli/cursor.gif" alt="_" /></form></p>
</div>
<noscript>
<p>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>
</body>
</html>
