server()) { metaRefresh("../login.php"); exit; } // load quota list if ($_SESSION['config']->get_scriptPath()) { $tempacc = new account(); $tempacc->type = "user"; $acct_q = getquotas(array($tempacc)); } // print header echo $_SESSION['header']; echo "\n\n\n"; echo "\n"; echo "\n"; echo "
\n"; $acct = new Account(); // get list of login shells $shelllist = file('../../config/shells'); $hells = array(); for ($i = 0; $i < sizeof($shelllist); $i++) { $shelllist[$i] = chop($shelllist[$i]); $shelllist[$i] = trim($shelllist[$i]); if ($shelllist[$i] != "") $shells[sizeof($shells)] = $shelllist[$i]; } // check if profile should be edited if ($_GET['edit']) { $acct = loadUserProfile($_GET['edit']); } // search available groups $groups = findgroups(); // calculate date for unix password expiry if ($acct->unix_pwdexpire) { $tstamp = $acct->unix_pwdexpire; $tdate = date(dmY, $acct->unix_pwdexpire); $unix_pwdexpire_day = substr($tdate, 0, 2); $unix_pwdexpire_mon = substr($tdate, 2, 2); $unix_pwdexpire_yea = substr($tdate, 4, 4); } // display formular echo ("
\n"); // Unix part echo ("
" . _("Unix account") . "\n"); echo ("\n"); // primary group echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // additional groups echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // empty row echo ("\n"); // path to home directory echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // login shell echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // empty row echo ("\n"); // no Unix password echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // Unix: password expiry warn echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // Unix: password expiry echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // maximum password age echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // minimum password age echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // password expire date echo ("\n"); echo ("\n"); echo (""); echo ("\n"); echo ("\n"); // empty row echo ("\n"); // unix workstations echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // empty row echo ("\n"); // deactivate account echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("
" . _("Primary group") . ": " . _("Help") . "
" . _("Additional groups") . ": " . _("Help") . "
   
" . _("Home Directory") . ": general_homedir . "\" name=\"general_homedir\">" . _("Help") . "
" . _("Login shell") . ": " . _("Help") . "
   
" . _("Set Unix Password") . ": " . _("Help") . "
" . _("Password warning") . ": unix_pwdwarn . "\">" . _("Help") . "
" . _("Password expiry") . ": unix_pwdallowlogin . "\">" . _("Help") . "
" . _("Maximum password age") . ": unix_pwdmaxage . "\">" . _("Help") . "
" . _("Minimum password age") . ": unix_pwdminage . "\">" . _("Help") . "
" . _("Account expires on") . ": \n"); echo ("\n"); echo ("\n"); echo ("" . _("Help") . "
   
" . _("Unix workstations") . ": unix_host . "\">" . _("Help") . "
   
" . _("Account is deactivated") . ": " . _("Help") . "
\n"); echo ("
\n"); echo ("
"); // Samba part echo ("
" . _("Samba account") . "\n"); echo ("\n"); // no Samba password echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // use Unix password as Samba password echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // password expires echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // account is disabled echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // empty row echo ("\n"); // drive letter for home directory echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // path to home directory echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // path to profile echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // path to logon scripts echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // empty row echo ("\n"); // workstations echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // empty row echo ("\n"); // domain echo ("\n"); echo ("\n"); if ($_SESSION['config']->is_samba3()) { echo "\n"; } else { echo ("\n"); } echo ("\n"); echo ("\n"); echo ("
" . _("Set Samba password") . ": " . _("Help") . "
" . _("Set Unix password for Samba") . ": " . _("Help") . "
" . _("Password does not expire") . ": " . _("Help") . "
" . _("Account is deactivated") . ": " . _("Help") . "
   
" . _("Home drive") . ": " . _("Help") . "
" . _("Home path") . ": smb_smbhome . "\" name=\"smb_smbhome\">" . _("Help") . "
" . _("Profile path") . ": smb_profilePath . "\" name=\"smb_profilepath\">" . _("Help") . "
" . _("Script path") . ": smb_scriptPath . "\" name=\"smb_scriptPath\">" . _("Help") . "
   
" . _("Workstations") . ": smb_smbuserworkstations . "\" name=\"smb_smbuserworkstations\">" . _("Help") . "
   
" . _("Domain") . ": smb_domain . "\" name=\"smb_domain\">" . _("Help") . "
\n"); echo ("
\n"); // Quota settings if script is given if ($_SESSION['config']->get_scriptPath()) { echo ("
"); echo "
"._('Quota properties')."\n"; echo "\n"; // description line echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; // help line echo "'."\n". "'."\n". "'."\n". "'."\n". "'."\n". ''."\n"; // quota settings for ($i = 0; $i < (sizeof($acct_q[0]->quota)); $i++) { // load values from profile for ($k = 0; $k < sizeof($acct->quota); $k++) { // check for equal mountpoints if ($acct->quota[$k][0] == $acct_q[0]->quota[$i][0]) { $acct_q[0]->quota[$i][2] = $acct->quota[$i][2]; $acct_q[0]->quota[$i][3] = $acct->quota[$i][3]; $acct_q[0]->quota[$i][6] = $acct->quota[$i][6]; $acct_q[0]->quota[$i][7] = $acct->quota[$i][7]; } } echo "\n"; echo '\n"; // mountpoint echo '\n"; // blocks soft limit echo '\n"; // blocks hard limit echo '\n"; // inodes soft limit echo '\n"; // inodes hard limit echo "\n"; } echo "
" . _('Mountpoint') . "  " . _('Soft block limit') . "  " . _('Hard block limit') . "  " . _('Soft inode limit') . "  " . _('Hard inode limit') . "  
"._('Help').'"._('Help').'"._('Help').'"._('Help').'"._('Help').'
' . $acct_q[0]->quota[$i][0] . "quota[$i][0] . "\">
\n"; // save number of mountpoints echo "quota)) . "\">\n"; echo "
\n"; } echo ("

\n"); // profile name and submit/abort buttons echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo (""); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo (""); echo ("\n"); echo ("
" . _("Profile name") . ":" . _("Help") . "
 
\n"); echo (" 
\n"); echo ("
\n");