For the convenience of your editors, you may want to provide a way for them to login to the simple system from the website. The most straight-forward way to do that is to link to /simple_cms/login.php. The login page will automatically redirect the user back after they've finished logging in. However, if you'd like to have a page in your own template with a login box, follow the steps below:
Login to simple like normal and create a page wherever you want to have your custom login form.
After you create the page, you'll be brought to the edit page form. Once there, click on "Edit Without Xinha." Copy & paste the following code into your page:
<h1>Simple CMS Login</h1>
<?PHP
if ($UserObj && $UserObj->UserName!="guest") {
?>
<p>You are logged in as <b><?PHP echo $UserObj->UserFullName?$UserObj->UserFullName:$UserObj->UserName;?></b> (<a href="/simple_cms/logout.php">logout</a>)</p>
<?PHP
} else {
?>
<form action="/simple_cms/login.php" method="post"><p>
Username: <input type="text" name="Username" id="Username"/><br />
Password: <input type="password" name="Password" id="Password"/><br />
<input type="hidden" name="RedirectTo" value="../pages/<?PHP echo $CurrentPageID;?>.php" />
<input type="submit" name="Submit" id="Submit" value="Login" /></p>
</form>
<script type="text/javascript">
var un_field = document.getElementById("Username");
if (un_field) un_field.focus();
</script>
<?PHP
}
?>
Publish the page and test it out.
Note: because the page contains PHP tags, you will not be able to edit it properly with Xinha. If you do so by mistake, remember that you can restore older versions of the page by finding the page in the management console and clicking on "restore."