<include href="header.html" />

<form action="{{@REALM}}" method="POST">
<fieldset>
  <legend>Add New System User</legend>
  <label for="username">Username <small>(must be between 3 and 16 characters in length)</small></label>
  <input id="username" name="username" type="text" placeholder="joe" value="{{ @user.username  }}" required>

  <label for="password">Password <small>(minimum 8 characters, recommended 12 or more)</small></label>
  <input id="password" name="password" type="password" value="{{ @user.password  }}">

  <label for="password_confirm">Confirm Password <small>(repeat same password)</small></label>
  <input id="password_confirm" name="password_confirm" type="password" value="{{ @user.password_confirm  }}">

  <small>Leave both password fields blank for random password generation.</small>

  <label for="jailuser">Jail User</label>
  <select id="jailuser" name="jailuser">
    <check if="{{ @user.jailuser=='1' }}">
      <true>
        <option value="1" selected>Yes</option>
        <option value="0">No</option>
      </true>
      <false>
        <option value="1">Yes</option>
        <option value="0" selected>No</option>
      </false>
    </check>
  </select>

  <check if="{{ @user.showwriteinfo=='1' }}">
    <true>
      <label for="writeuserinfo">Write User Info <small>(Writes to /home/username/.passwd)</small></label>
      <select id="writeuserinfo" name="writeuserinfo">
        <check if="{{ @user.writeuserinfo=='1' }}">
          <true>
            <option value="1" selected>Yes</option>
            <option value="0">No</option>
          </true>
          <false>
            <option value="1">Yes</option>
            <option value="0" selected>No</option>
          </false>
        </check>
      </select>
    </true>
    <false>
      <input type="hidden" name="writeuserinfo" value="{{ @user.writeuserinfo }}">
    </false>
  </check>

  <label for="fpmmax">PHP Workers <small>(Recommended range 2-12 on a Shared Server)</small></label>
  <select id="fpmmax" name="fpmmax">
    <check if="{{ @user.fpmmax=='2' }}">
      <true>
        <option value="2" selected>2</option>
      </true>
      <false>
        <option value="2">2</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='4' }}">
      <true>
        <option value="4" selected>4</option>
      </true>
      <false>
        <option value="4">4</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='6' }}">
      <true>
        <option value="6" selected>6</option>
      </true>
      <false>
        <option value="6">6</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='8' }}">
      <true>
        <option value="8" selected>8</option>
      </true>
      <false>
        <option value="8">8</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='10' }}">
      <true>
        <option value="10" selected>10</option>
      </true>
      <false>
        <option value="10">10</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='12' }}">
      <true>
        <option value="12" selected>12</option>
      </true>
      <false>
        <option value="12">12</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='16' }}">
      <true>
        <option value="16" selected>16</option>
      </true>
      <false>
        <option value="16">16</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='20' }}">
      <true>
        <option value="20" selected>20</option>
      </true>
      <false>
        <option value="20">20</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='24' }}">
      <true>
        <option value="24" selected>24</option>
      </true>
      <false>
        <option value="24">24</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='30' }}">
      <true>
        <option value="30" selected>30</option>
      </true>
      <false>
        <option value="30">30</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='36' }}">
      <true>
        <option value="36" selected>36</option>
      </true>
      <false>
        <option value="36">36</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='42' }}">
      <true>
        <option value="42" selected>42</option>
      </true>
      <false>
        <option value="42">42</option>
      </false>
    </check>
    <check if="{{ @user.fpmmax=='48' }}">
      <true>
        <option value="48" selected>48</option>
      </true>
      <false>
        <option value="48">48</option>
      </false>
    </check>
  </select>

  <input type="submit" value="Submit">
  <button id="reset" type="reset">Reset</button>

  <check if="{{ @NAV.mapping=='vpanel' }}">
  <br>
<!--  <small>Enter "Unlimited" for no limit on Quota or Rate Limit.</small>-->
  </check>

</fieldset>
</form>

<p>
<b>Username</b> is the system username that a website can be installed under. It will be used for SFTP & SSH access. Mixed case usernames are converted to all lower case.<br>
<b>Password</b> must be at least 8 characters with 12 or more being highly recommended.<br>
Passwords under 15 characters must contain characters from at least three of the following four groups:<br>
Lower Case Letters, Upper Case Leters, Numbers, Puncuation/Special Characters.<br>
Passwords 15 or more characters long do not have any complexity requirements.<br>
<b>Jail</b> determines if the user will be "jailed". This is recommended on a Shared Server. Once a user is Jailed it can't be undone by these admins.<br>
<check if="{{ @user.showwriteinfo=='1' }}">
<b>Write User Info</b> writes user account information to /home/username/.passwd. Includes encrypted password, which can be unencrypted.<br>
</check>
<b>PHP Workers</b> is maximum number of PHP processes that this user can have running at one time. Any website(s) installed for this user will be limited by this.<br>
</p>


<include href="footer.html" />