Location: PHPKode > projects > SecurityAdmin for PHP > psa-4.0.3/include/profile_add.php
<?php
    if(isset($_POST['PSA_submit'])){
        $result=$PSA_SYS->profile_add($_POST);
        if($result){
            echo '<p>',_("Profile Added Successfully").'</p>'."\n";
            if(!defined('PSA_PATH')) define('PSA_PATH',dirname(__FILE__).'/..');
            include PSA_PATH.'/include/profiles.php';
        }else
            $PSA_SYS->error();
    }else{
?>
    <h2><?php echo _("Create Profile") ?></h2>
    <p><a href="<?php echo $_SERVER['PHP_SELF'] ?>?psaSec=profiles" title="<?php echo _("Back") ?>"><?php echo _("Back") ?></a></p>
    <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>?psaSec=profile_add">
     <fieldset>
      <p><b><?php echo _("Name") ?>:</b> <input type="text" size="30" name="PSA_name" /></p>
      <p><input type="checkbox" name="PSA_admin" value="1" /><?php echo _("Admin Privileges") ?></p>
<?php
    $PSA_pages=$PSA_SYS->get_pages();
    if($PSA_pages===FALSE)
        $PSA_SYS->error();
    while(list($PSA_key,$PSA_val)=@each($PSA_pages))
        echo '      <input type="checkbox" name="PSA_pages[]" value="'.$PSA_key.'" />'.$PSA_val.'<br />'."\n";
?>
      <p><input type="submit" name="PSA_submit" value="<?php echo _("Add Profile") ?>" /></p>
     </fieldset>
    </form>
<?php
    }
?>
Return current item: SecurityAdmin for PHP