<?php
if(isset($_POST['PSA_submit'])){
$result=$PSA_SYS->page_add($_POST['PSA_title'],$_POST['PSA_url']);
if($result===FALSE){
$PSA_SYS->error();
}else{
echo '<p>',_("Page added successfully."),'</p>',"\n";
if(!defined('PSA_PATH')) define('PSA_PATH',dirname(__FILE__).'/..');
include PSA_PATH.'/include/pages.php';
}
}else{
?>
<h2><?php echo _("Add Page") ?></h2>
<p><a href="<?php echo $_SERVER['PHP_SELF'] ?>?psaSec=pages" title="<?php echo _("Back") ?>"><?php echo _("Back") ?></a></p>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>?psaSec=page_add">
<fieldset>
<table cellpadding="3" cellspacing="0" border="0">
<tr><th><?php echo _("Page Name") ?></th><td><input type="text" name="PSA_title" size="30" /></td></tr>
<tr><th><?php echo _("Location") ?><span class="psaAsterisk">*</span></th><td><input type="text" name="PSA_url" size="30" /></td></tr>
</table>
<input type="submit" name="PSA_submit" value="<?php echo _("Add Page") ?>" />
</fieldset>
</form>
<p><span class="psaAsterisk">*</span> <?php echo _("This is the location of the restricted page relative to its URL. For example, if the page's URL is http://www.somedomain.com/links.php, then you would fill in '/links.php'. If the page is http://www.somedomain.com/otherfolder/links.php, then you would fill in '/otherfolder/links.php'.") ?></p>
<?php
}
?>