Пример #1
0
 function ampuser($username)
 {
     $this->username = $username;
     if ($user = getAmpUser($username)) {
         $this->_password = $user["password_sha1"];
         $this->_extension_high = $user["extension_high"];
         $this->_extension_low = $user["extension_low"];
         $this->_deptname = $user["deptname"];
         $this->_sections = $user["sections"];
     } else {
         // user doesn't exist
         $this->_password = false;
         $this->_extension_high = "";
         $this->_extension_low = "";
         $this->_deptname = "";
         $this->_sections = array();
     }
 }
Пример #2
0
?>
</a></li>
<?php 
//get existing trunk info
$tresults = core_ampusers_list();
foreach ($tresults as $tresult) {
    echo "\t<li><a " . ($userdisplay == $tresult[0] ? 'class="current"' : '') . " href=\"config.php?display=" . urlencode($display) . "&amp;userdisplay=" . urlencode($tresult[0]) . "\">" . $tresult[0] . "</a></li>\n";
}
?>
</ul>
</div>

<?php 
if ($userdisplay) {
    echo "<h2>" . _("Edit Administrator") . "</h2>";
    $user = getAmpUser($userdisplay);
    $username = $user["username"];
    $password = "******";
    $password_sha1 = $user["password_sha1"];
    $extension_high = $user["extension_high"];
    $extension_low = $user["extension_low"];
    $deptname = $user["deptname"];
    $sections = $user["sections"];
    $tlabel = sprintf(_("Delete User: %s"), $userdisplay);
    $label = '<span><img width="16" height="16" border="0" title="' . $tlabel . '" alt="" src="images/core_delete.png"/>&nbsp;' . $tlabel . '</span>';
    ?>
		<p><a href="config.php?display=<?php 
    echo urlencode($display);
    ?>
&amp;userdisplay=<?php 
    echo urlencode($userdisplay);