Location: PHPKode > projects > phlyMail Lite > phlymail/config/templates/um.edituser.tpl
<script type="text/javascript">
//<![CDATA[
AvailPerm = [];

function open_profiles(fuerwen)
{
    window.open
            ('{link_edpf}' + fuerwen
            ,'prof_editor'
            ,'width=770,height=410,scrollbars=no,resizable=yes,location=no,menubar=no,status=no,toolbar=no,personalbar=no'
            )
}

function popwin_open(id) { document.getElementById(id).style.display = 'block'; }
function popwin_close(id) { document.getElementById(id).style.display = 'none'; }
function userpriv_get(id) { AJAX('{userpriv_geturl}&gid=' + id); }

function userpriv_got(data, id, name)
{
    var i, Prm;
    while (data.length) {
        Prm = data.pop();
        try { document.getElementById(Prm).checked = true; } catch (e) { }
    }
    document.getElementById('pw_priv_title').firstChild.nodeValue = '{head_privs_user}'.replace(/\$1/, name);
    document.getElementById('pw_priv_form').action = '{userpriv_seturl}';
    popwin_open('pw_priv');
}

function privshortcut(hdl, mode)
{
    for (i in AvailPerm) {
        Prm = AvailPerm[i];
        if (hdl != '' && Prm.substr(0, hdl.length) != hdl) continue;
        document.getElementById(Prm).checked = (mode == 1) ? true : false;
    }
}

function set_perm()
{
    var i, Prm, inp;
    var reqtxt = '';
    for (i in AvailPerm) {
        Prm = AvailPerm[i];
        inp = document.getElementById(Prm);
        reqtxt += '&' + inp.name + '=' + (inp.checked ? '1' : '0');
    }
    AJAX(document.getElementById('pw_priv_form').action + reqtxt, true);
    return false;
}

// Since this is a quite central place for handling requests, multiple parallel requests must be traced
Rq = new Array();
function AJAX(url, post)
{
    if (window.XMLHttpRequest) {
        var req = new XMLHttpRequest();
        text = null;
    } else if (window.ActiveXObject) {
        var req = new ActiveXObject("Microsoft.XMLHTTP");
        text = false;
    }
    if (req) {
        pleasewait_on();
        req.onreadystatechange = AJAX_ORS;
        req.open((post ? 'POST' : 'GET'), url, true);
        req.send(text);
        Rq.push(req);
    }
}

function AJAX_ORS()
{
    if (Rq.length == 0) {
        pleasewait_off();
        return;
    }
    for (i = 0; i < Rq.length; ++i) {
        if (Rq[i].readyState == 4) {
            var myRq = Rq[i];
            Rq.splice(i, 1);
            if (typeof(myRq.status) != 'undefined' && (myRq.status == 304 || myRq.status == 200)) {
                AJAX_process(myRq.responseText);
            }
            break;
        }
    }
    if (Rq.length == 0) window.setTimeout('pleasewait_off();', 2000);
}

function AJAX_process(response)
{
    if (!response) return;
    eval('next = ' + response);
    if (next['got_uperm']) userpriv_got(next['got_uperm'], next['uid'], next['uname']);
    if (next['set_uperm']) popwin_close('pw_priv');
}
//]]>
</script>
<a href="{link_um}">{where_um}</a>&nbsp;/&nbsp;{where_user}<br />
<br />
<form action="{target_link}" method="post">
 <div>{head_text}<br /><!-- START error -->
  <div class="errorbox">{error}</div><!-- END error --><!-- START warn_max_users -->
  <div class="errorbox">{msg_warn_max_users}</div><!-- END warn_max_users -->
  <br />
  <fieldset>
   <legend>{leg_basic}</legend>
   <table border="0" cellpadding="2" cellspacing="0">
    <tr>
     <td align="left">{msg_sysuser}</td>
     <td align="left"><!-- START adduser -->
      <input type="text" size="24" maxlength="64" name="PHM[username]" value="{name}" /><!-- END adduser --><!-- START edituser -->
      <input type="text" size="24" maxlength="64" name="PHM[username]" value="{name}" />
      <input type="hidden" name="uid" value="{uid}" /><!-- END edituser -->
     </td><!-- START has_groups -->
     <td rowspan="6">{msg_groups}</td>
     <td rowspan="6">
      <select size="11" multiple="multiple" name="groups[]"><!-- START groupline -->
       <option value="{gid}"<!-- START sel --> selected="selected"<!-- END sel -->>{gname}</option><!-- END groupline -->
      </select>
     </td><!-- END has_groups -->
    </tr>
    <tr>
     <td align="left">{msg_syspass}</td>
     <td align="left">
      <input type="password" size="24" maxlength="32" name="PHM[password]" value="{password}" />
     </td>
    </tr>
    <tr>
     <td align="left">{msg_syspass2}</td>
     <td align="left">
      <input type="password" size="24" maxlength="32" name="PHM[password2]" value="{password2}" />
     </td>
    </tr>
    <tr>
     <td align="left">{msg_firstname}</td>
     <td align="left">
      <input type="text" size="24" maxlength="32" name="PHM[firstname]" value="{firstname}" />
     </td>
    </tr>
    <tr>
     <td align="left">{msg_lastname}</td>
     <td align="left">
      <input type="text" size="24" maxlength="32" name="PHM[lastname]" value="{lastname}" />
     </td>
    </tr>
    <tr>
     <td align="left">{msg_tel_private}</td>
     <td align="left">
      <input type="text" size="24" maxlength="32" name="PHM[tel_private]" value="{tel_private}" />
     </td>
    </tr>
    <tr>
     <td align="left">{msg_tel_business}</td>
     <td align="left">
      <input type="text" size="24" maxlength="32" name="PHM[tel_business]" value="{tel_business}" />
     </td>
     <td align="left">{msg_opttheme}:</td>
     <td align="left">
      <select name="theme"><!-- START themeline -->
       <option value="{key}"<!-- START sel --> selected="selected"<!-- END sel -->>{themename}</option><!-- END themeline -->
      </select>
     </td>
    </tr>
    <tr>
     <td align="left">{msg_cellular}</td>
     <td align="left">
      <input type="text" size="24" maxlength="32" name="PHM[cellular]" value="{cellular}" />
     </td>
     <td align="left">{msg_optlang}:</td>
     <td align="left">
      <select name="language"><!-- START langline -->
       <option value="{key}"<!-- START sel --> selected="selected"<!-- END sel -->>{langname}</option><!-- END langline -->
      </select>
     </td>
    </tr>
    <tr>
     <td align="left">{msg_fax}</td>
     <td align="left">
      <input type="text" size="24" maxlength="32" name="PHM[fax]" value="{fax}" />
     </td>
     <td lign="left">{msg_visibility}</td>
     <td align="left">
      <select size="1" name="PHM[visibility]">
        <option value="private"{sel_visibility_private}>{msg_private}</option>
        <option value="public"{sel_visibility_public}>{msg_public}</option>
      </select>
     </td>
    </tr>
    <tr>
     <td align="left">{msg_www}</td>
     <td align="left">
      <input type="text" size="24" maxlength="32" name="PHM[www]" value="{www}" />
     </td>
     <td align="left">{msg_active}</td>
     <td align="left">
      <select name="PHM[active]" size="1">
       <option value="0"<!-- START selno --> selected="selected"<!-- END selno -->>{msg_no}</option>
       <option value="1"<!-- START selyes --> selected="selected"<!-- END selyes -->>{msg_yes}</option>
      </select>
     </td>
    </tr>
    <tr>
     <td align="left">{msg_email}</td>
     <td align="left">
      <input type="text" size="24" maxlength="255" name="PHM[email]" value="{email}" />
     </td>
     <td align="left" colspan="2">
     <input type="checkbox" name="editsettings"<!-- START editsettingsyes --> checked="checked"<!-- END editsettingsyes --> value="1" id="editsettings" />
     <label for="editsettings">{msg_mayeditsettings}</label>
     </td>
    </tr>
    <tr>
     <td align="left">{msg_externalemail}</td>
     <td align="left">
      <input type="text" size="24" maxlength="255" name="PHM[externalemail]" value="{externalemail}" />
     </td>
     <td align="left" colspan="2">
     <input type="checkbox" name="editprofiles"<!-- START editprofilesyes --> checked="checked"<!-- END editprofilesyes --> value="1" id="editprofiles" />
     <label for="editprofiles">{msg_mayeditprofiles}</label>
     </td>
    </tr>
    <tr>
     <td colspan="2">&nbsp;</td>
     <td align="left" colspan="2">
     <input type="checkbox" name="showlinkconfig"<!-- START showlinkconfig --> checked="checked"<!-- END showlinkconfig --> value="1" id="showlinkconfig" />
     <label for="showlinkconfig">{msg_showlinkconfig}</label>
     </td>
    </tr>
    <tr>
     <td colspan="2">&nbsp;</td>
     <td align="left" colspan="2">
     <input type="checkbox" name="logincheckupdates"<!-- START logincheckupdates --> checked="checked"<!-- END logincheckupdates --> value="1" id="logincheckupdates" />
     <label for="logincheckupdates">{msg_logincheckupdates}</label>
     </td>
    </tr>
   </table>
  </fieldset>
  <br />
  <fieldset><legend>{leg_motd}</legend>
   <input type="checkbox" name="showmotd" id="lbl_motd" value="1"<!-- START showmotd --> checked="checked"<!-- END showmotd --> />&nbsp;
   <label for="lbl_motd">{msg_showmotd}</label><br />
   <br />
   <textarea name="MOTD" rows="5" cols="56">{MOTD}</textarea>
   <br />
  </fieldset>
  <br />
  <fieldset>
   <legend>{leg_sessionsec}</legend>
   {about_sessionsec}<br />
   <br />
   <input type="checkbox" name="sessionip" id="lbl_tie_ip" value="1"<!-- START sessionip --> checked="checked"<!-- END sessionip --> />
   <label for="lbl_tie_ip">&nbsp;{msg_sessionip}</label><br />
   <input type="checkbox" name="sessioncookie" id="lbl_sesscookie" value="1"<!-- START sessioncookie --> checked="checked"<!-- END sessioncookie --> />
   <label for="lbl_sesscookie">&nbsp;{msg_sessioncookie}</label>
  </fieldset>
  <br />
  <fieldset><legend>{leg_debugging}</legend>
   {msg_debugging}:&nbsp;<select name="debugging_level"><!-- START debug_level -->
    <option value="{level}"<!-- START sel --> selected="selected"<!-- END sel -->>{msg_level}</option><!-- END debug_level -->
   </select><br />
   <br />
   {about_debugging}<br />
  </fieldset>
  <br />
  <fieldset><legend>{leg_providername}</legend>
   {msg_providername}:&nbsp;<input type="text" size="32" name="providername" value="{providername}" /><br />
   <br />
   {about_providername}<br />
   <br />
  </fieldset>
  <br />
  <input type="submit" value="{msg_save}" /><br />
  <br /><!-- START editprof -->
  <a href="javascript:open_profiles('{uid}');">{msg_edit}</a>&nbsp;|&nbsp;<!-- START delprof -->
  <a href="{link_del}" style="color:darkred">{msg_del}</a>&nbsp;|&nbsp;<!-- END delprof --><!-- END editprof --><!-- START editsms -->
  <a href="{link_sms}">{msg_sms}</a>&nbsp;|&nbsp;<!-- END editsms --><!-- START editquota -->
  <a href="{link_quota}">{msg_quota}</a><!-- END editquota --><!-- START editprivs -->
  &nbsp;|&nbsp;<a href="javascript:userpriv_get({uid});">{msg_privileges}</a><!-- END editprivs --><!-- START usermod -->
  &nbsp;|&nbsp;<a href="{link_usermod}">{msg_usermod}</a><!-- END usermod --><!-- START loginfail --><br />
  <br />
  <fieldset>
   <legend>{leg_stat}</legend>
   <table cellpadding="2" cellspacing="0" border="0">
    <tr>
     <td align="left">{msg_lastlogin}</td>
     <td align="left">{lastlogin}</td>
     <td>&nbsp;</td>
    </tr>
    <tr>
     <td align="left">{msg_lastlogout}</td>
     <td align="left">{lastlogout}</td>
     <td>&nbsp;</td>
    </tr>
    <tr>
     <td align="left">{msg_loginfail}</td>
     <td align="left">{loginfail}</td>
     <td align="left"><!-- START resetfail --><a href="{link_resetfail}">{msg_resetfail}<!-- END resetfail --></td>
    </tr>
   </table>
  </fieldset>
  <br /><!-- END loginfail -->
 </div>
</form>

<div id="pw_priv" class="popwin_container" style="display:none;">
 <div class="popwin_title">
  <div class="popwin_close" onclick="popwin_close('pw_priv');">&nbsp;</div>
  <span id="pw_priv_title">{poptitle_privileges}</span>
 </div>
 <div class="popwin" id="pw_priv_content">
 <form id="pw_priv_form" action="#" method="post" accept-charset="utf-8" onsubmit="return set_perm();">
  <div>
   <div style="height:500px;overflow:auto;"><!-- START priv_handler -->
    <fieldset>
     <legend>{handlername}</legend><!-- START priv_priv -->
     <script type="text/javascript">/*<![CDATA[*/AvailPerm.push('{handler}_{priv}');/*]]>*/</script>
     <input type="checkbox" name="p[{handler}_{priv}]" value="1" id="{handler}_{priv}" />
     <label for="{handler}_{priv}">{privname}</label><br /><!-- END priv_priv -->
     <br />
     {msg_simple}: <button type="button" onclick="privshortcut('{handler}',1);">{msg_all}</button> <button type="button" onclick="privshortcut('{handler}',0);">{msg_none}</button><br />
    </fieldset><br /><!-- END priv_handler -->
   </div>
   <br />
   {msg_simple}: <button type="button" onclick="privshortcut('',1);">{msg_all}</button> <button type="button" onclick="privshortcut('',0);">{msg_none}</button><br />
   <br />
   <input type="submit" value="{msg_save}" />
   <button type="button" onclick="popwin_close('pw_priv');">{msg_cancel}</button>
  </div>
 </form>
 </div>
</div>
Return current item: phlyMail Lite