Location: PHPKode > projects > SecurityAdmin for PHP > psa-4.0.3/include/page_edit.php
<?php
    if(isset($_POST['PSA_submit'])){
        $PSA_id=$_POST['PSA_id'];
        $PSA_result=$PSA_SYS->page_edit($_POST);
        if($PSA_result===FALSE){
            $PSA_SYS->error();
        }else{
            echo '<p>',_("Site structure updated successfully."),'</p>',"\n";
            if(!defined('PSA_PATH')) define('PSA_PATH',dirname(__FILE__).'/..');
            include PSA_PATH.'/include/pages.php';
        }
    }else{
        $PSA_pages=$PSA_SYS->get_pages();
        if($PSA_pages===FALSE)
            $PSA_SYS->error();
        if(!isset($PSA_id) && isset($_GET['PSA_id']))
            $PSA_id=$_GET['PSA_id'];
        $PSA_page=$PSA_SYS->page_get($PSA_id);
        if($PSA_page===FALSE)
            $PSA_SYS->error();
?>
    <h2><?php echo _("Edit 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_edit">
     <fieldset>
      <table cellpadding="3" cellspacing="0" border="0">
       <tr><th><?php echo _("Page Name") ?></th><td><input type="text" name="PSA_title" size="30" value="<?php echo $PSA_page['title'] ?>" /></td></tr>
       <tr><th><?php echo _("Location") ?><span class="psaAsterisk">*</span></th><td><input type="text" name="PSA_page" size="30" value="<?php echo $PSA_page['page'] ?>" /></td></tr>
      </table>
      <input type="submit" name="PSA_submit" value="<?php echo _("Edit Page") ?>" />
      <input type="hidden" name="PSA_id" value="<?php echo $PSA_page['id'] ?>" />
     </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
    }
?>
Return current item: SecurityAdmin for PHP