Location: PHPKode > scripts > robots.wizard(tm) > robots-wizardtm/index.php
<?php 
include "header.php"; 
/* robots.wizard index.php copyright 2006 Betsy A. Gamrat all rights reserved

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

    Contact Information: Betsy A. Gamrat hide@address.com
*/
/*
This is the top level of robots.wizard.  It has an iframe to pull in robots.php
which handles the editing, and textboxes for the updated and existing robots.txt
file, and editing status.
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<META NAME="COPYRIGHT" CONTENT="&copy; 2006 Betsy A. Gamrat All Rights Reserved" />
	<META HTTP-EQUIV="EXPIRES" 
	 CONTENT="<?=date("r",strtotime("-".$cache_life." min"))?>" />
	<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" />
	<title>robots.txt manager</title>
	<link rel="stylesheet"  href="stylesheets/index.css" type="text/css" />
</head>
<body>
	<?php 
		include "constants.php"; 
		if (($buf=@file_get_contents(TOP."robots.txt"))===FALSE)
			$buf="Unable to open robots.txt";
	?>

	<div class="banner">
		<span style="float:right;text-align:right">
			<input type="button" onclick="window.open('doc.htm','doc');" value="User's Manual" /><br />
			<input type="button" onclick="location.href='end.php';" value="Exit" style="font-weight:bold" title="Exit and close the browser"/><br />
		</span>
		<h1>robots.wizard&trade;</h1>
	</div>

	<div class="robots_php">
		<iframe height="500px" width="99%" src="robots.php" name="robots_php" scrolling="auto" ></iframe>
	</div>

	<div class="spacer"></div>

	<div class="right_column">
		<div class="updated">
			<form action="write_robots_txt.php" method="post" target="robots_php" name="write_or_check">
				<b>Updated robots.txt</b><br />
				<input type="button" onclick="go('write_robots_txt.php');" value="Update robots.txt" title="Clicking this button will write the updated text to the robots.txt file" />&nbsp;
				<input type="button" onclick="go('check_robots_txt.php');" value="Check robots.txt" title="Clicking this button will check the updated robots.txt file for references in other files." /><br /><br />
				<textarea rows="20" class="textbox" cols="40" name="updated" id="updated" title="This text is the robots.txt text that reflects the current editor settings.  If the border is red, this text is different than the text currently in the robots.txt file.  You may edit this text and write it to update the robots.txt file." ><?=$buf?></textarea><br />
			</form>
		</div>

		<div class="robots_txt">
			<form action="index.php" method="post" target="_top">
				<b>Existing robots.txt file</b><br />
				<input type="submit" value="Restore robots.txt" title="Clicking this button will clear the edits, so you can start over.  If the file was written, the changes will remain." /><br /><br />
				<textarea rows="20" cols="40" class="textbox" readonly name="robots_txt" id="robots_txt" title="This is the current robots.txt file.  You cannot edit it."  ><?=$buf?></textarea><br />
			</form>
		</div>

		<div class="status">
			<b>Status</b><br />
			<textarea id="status" rows="15" cols="50"  readonly class="statusbox" name="status" title="This text is used to display changes in the states of the settings.  It is for information only, you cannot edit it." ></textarea>
			<br /><br />

			<h3>robots.wizard&trade; Version 1.0.1</h3>
			&#169; Copyright 2006<br />Betsy A. Gamrat<br />All Rights Reserved<br />
			robots.wizard&trade; is a trademark<br /> of Betsy A. Gamrat
		</div>
	</div>
</body>
<script language="javascript" type="text/javascript">

/* Ensures write_robots_txt.php or check_robots_txt.php is run based on the button clicked. */
function go(action)
{
	document.write_or_check.action=action;
	document.write_or_check.submit();
}

</script>
</html>
Return current item: robots.wizard(tm)