2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<?php
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:07:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/*
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$Id$
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Copyright (C) 2003  Tilo Lutz
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  This program is free software; you can redistribute it and/or modify
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it under the terms of the GNU General Public License as published by
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  the Free Software Foundation; either version 2 of the License, or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  (at your option) any later version.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  This program is distributed in the hope that it will be useful,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  but WITHOUT ANY WARRANTY; without even the implied warranty of
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  GNU General Public License for more details.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  You should have received a copy of the GNU General Public License
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  along with this program; if not, write to the Free Software
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  LDAP Account Manager displays table for creating or modifying accounts in LDAP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								*/
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include_once('../lib/account.inc'); // File with all account-funtions
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-03 19:15:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include_once('../lib/config.inc'); // File with configure-functions
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								include_once('../lib/profiles.inc'); // functions to load and save profiles
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-07 18:19:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include_once('../lib/status.inc'); // Return error-message
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-31 10:52:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include_once('../lib/pdf.inc'); // Return a pdf-file
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include_once('../lib/ldap.inc'); // LDAP-functions
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 16:37:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								initvars($_GET['type'], $_GET['DN']); // Initialize all needed vars
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								switch ($_POST['select']) { // Select which part of page should be loaded and check values
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// general = startpage, general account paramters
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// unix = page with all shadow-options and password
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// samba = page with all samba-related parameters e.g. smbpassword
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// quota = page with all quota-related parameters e.g. hard file quota
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// personal = page with all personal-related parametergs, e.g. phone number
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// final = last page shown before account is created/modified
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									//		if account is modified commands might be ran are shown
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// finish = page shown after account has been created/modified
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'general':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Write all general values into $_SESSION['account'] if no profile should be loaded
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if (!$_POST['load']) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->general_dn = $_POST['f_general_suffix'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_username'])) $_SESSION['account']->general_username = $_POST['f_general_username'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												else $_SESSION['account']->general_username = '';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_surname'])) $_SESSION['account']->general_surname = $_POST['f_general_surname'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												else $_SESSION['account']->general_surname = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_givenname'])) $_SESSION['account']->general_givenname = $_POST['f_general_givenname'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												else $_SESSION['account']->general_givenname = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_uidNumber'])) $_SESSION['account']->general_uidNumber = $_POST['f_general_uidNumber'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												else $_SESSION['account']->general_uidNumber = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_group'])) $_SESSION['account']->general_group = $_POST['f_general_group'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_groupadd'])) $_SESSION['account']->general_groupadd = $_POST['f_general_groupadd'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												else $_SESSION['account']->general_groupadd = array('');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_homedir'])) $_SESSION['account']->general_homedir = $_POST['f_general_homedir'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												else $_SESSION['account']->general_homedir = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_shell'])) $_SESSION['account']->general_shell = $_POST['f_general_shell'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											if (isset($_POST['f_general_gecos'])) $_SESSION['account']->general_gecos = $_POST['f_general_gecos'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												else $_SESSION['account']->general_gecos = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											// Check if values are OK and set automatic values.  if not error-variable will be set
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ($_SESSION['account_old']) list($values, $errors) = checkglobal($_SESSION['account'], $_SESSION['type2'], $_SESSION['account_old']); // account.inc
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												else list($values, $errors) = checkglobal($_SESSION['account'], $_SESSION['type2']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (is_object($values)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												while (list($key, $val) = each($values)) // Set only defined values
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($val) $_SESSION['account']->$key = $val;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											// Check which part Site should be displayed next
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ($_POST['next'] && ($errors==''))
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												switch ($_SESSION['type2']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													case 'user': $select_local = 'unix'; break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													case 'group': if ($_SESSION['config']->samba3=='yes') $select_local = 'samba';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														else $select_local = 'quota'; break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													case 'host': $select_local = 'unix'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'unix':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Write all general values into $_SESSION['account']
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_unix_password'])) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											// Encraypt password
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$iv = base64_decode($_COOKIE["IV"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$key = base64_decode($_COOKIE["Key"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->unix_password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $_POST['f_unix_password'], MCRYPT_MODE_ECB, $iv));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 else $_SESSION['account']->unix_password = '';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_unix_password_no']) $_SESSION['account']->unix_password_no = true;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->unix_password_no = false;
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_unix_pwdwarn'])) $_SESSION['account']->unix_pwdwarn = $_POST['f_unix_pwdwarn'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->unix_pwdwarn = '';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_unix_pwdallowlogin'])) $_SESSION['account']->unix_pwdallowlogin = $_POST['f_unix_pwdallowlogin'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->unix_pwdallowlogin = '';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_unix_pwdmaxage'])) $_SESSION['account']->unix_pwdmaxage = $_POST['f_unix_pwdmaxage'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->unix_pwdmaxage = '';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_unix_pwdminage'])) $_SESSION['account']->unix_pwdminage = $_POST['f_unix_pwdminage'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->unix_pwdminage = '';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_unix_pwdexpire_mon'])) $_SESSION['account']->unix_pwdexpire = mktime(10, 0, 0, $_POST['f_unix_pwdexpire_mon'],
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 14:42:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$_POST['f_unix_pwdexpire_day'], $_POST['f_unix_pwdexpire_yea']);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_unix_deactivated']) $_SESSION['account']->unix_deactivated = $_POST['f_unix_deactivated'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->unix_deactivated = false;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['genpass']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											// Generate a random password if generate-button was pressed
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 20:02:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$iv = base64_decode($_COOKIE["IV"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$key = base64_decode($_COOKIE["Key"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->unix_password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, genpasswd(), MCRYPT_MODE_ECB, $iv));
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											// Keep unix-page acitve
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$select_local = 'unix';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											// Check if values are OK and set automatic values. if not error-variable will be set
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $errors = checkunix($_SESSION['account'], $_SESSION['type2']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check which part Site should be displayd
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// Reset password if reset button was pressed. Button only vissible if account should be modified
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-17 11:19:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['respass']) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->unix_password_no=true;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->smb_password_no=true;
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-17 11:19:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check which part Site should be displayed next
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['back']) $select_local = 'general';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										else if (($_POST['next']) && ($errors=='')) $select_local = 'samba';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $select_local = 'unix';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'samba':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Write all general values into $_SESSION['account']
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 19:45:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_password']) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											// Encrypt password
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 19:45:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$iv = base64_decode($_COOKIE["IV"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$key = base64_decode($_COOKIE["Key"]);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->smb_password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, base64_decode($_COOKIE['Key']), $_POST['f_smb_password'],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											MCRYPT_MODE_ECB, base64_decode($_COOKIE['IV'])));
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 19:45:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										 else $_SESSION['account']->smb_password = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 13:53:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										$_SESSION['account']->smb_pwdcanchange = mktime($_POST['f_smb_pwdcanchange_s'], $_POST['f_smb_pwdcanchange_m'], $_POST['f_smb_pwdcanchange_h'],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_POST['f_smb_pwdcanchange_mon'], $_POST['f_smb_pwdcanchange_day'], $_POST['f_smb_pwdcanchange_yea']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										$_SESSION['account']->smb_pwdmustchange = mktime($_POST['f_smb_pwdmustchange_s'], $_POST['f_smb_pwdmustchange_m'], $_POST['f_smb_pwdmustchange_h'],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_POST['f_smb_pwdmustchange_mon'], $_POST['f_smb_pwdmustchange_day'], $_POST['f_smb_pwdmustchange_yea']);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_password_no']) $_SESSION['account']->smb_password_no = true;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_password_no = false;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_useunixpwd']) $_SESSION['account']->smb_useunixpwd = $_POST['f_smb_useunixpwd'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_useunixpwd = false;
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_smb_homedrive'])) $_SESSION['account']->smb_homedrive = $_POST['f_smb_homedrive'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_smb_scriptpath'])) $_SESSION['account']->smb_scriptPath = $_POST['f_smb_scriptpath'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_scriptPath = '';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_smb_smbuserworkstations'])) $_SESSION['account']->smb_smbuserworkstations = $_POST['f_smb_smbuserworkstations'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_smbuserworkstations = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_smb_smbhome'])) $_SESSION['account']->smb_smbhome = stripslashes($_POST['f_smb_smbhome']);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_smbhome = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_smb_profilePath'])) $_SESSION['account']->smb_profilePath = stripslashes($_POST['f_smb_profilePath']);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_profilePath = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_smb_domain'])) $_SESSION['account']->smb_domain = $_POST['f_smb_domain'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_domain = false;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_flagsW']) $_SESSION['account']->smb_flagsW = $_POST['f_smb_flagsW'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_flagsW = false;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_flagsD']) $_SESSION['account']->smb_flagsD = $_POST['f_smb_flagsD'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_flagsD = false;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_flagsX']) $_SESSION['account']->smb_flagsX = $_POST['f_smb_flagsX'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_flagsX = false;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_mapgroup'] == _('Domain Guests')) $_SESSION['account']->smb_mapgroup = $_SESSION[config]->get_domainSID() . "-" . '514';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_mapgroup'] == _('Domain Users')) $_SESSION['account']->smb_mapgroup = $_SESSION[config]->get_domainSID() . "-" . '513';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_smb_mapgroup'] == _('Domain Admins')) $_SESSION['account']->smb_mapgroup = $_SESSION[config]->get_domainSID() . "-" . '512';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_smb_domain'])) $_SESSION['account']->smb_displayName = $_POST['f_smb_domain'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->smb_displayName = '';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check if values are OK and set automatic values. if not error-variable will be set
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										list($values, $errors) = checksamba($_SESSION['account'], $_SESSION['type2']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (is_object($values)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											while (list($key, $val) = each($values)) // Set only defined values
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($val) $_SESSION['account']->$key = $val;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check which part Site should be displayed next
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['back'])
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											switch ($_SESSION['type2']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												case 'user': $select_local = 'unix'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												case 'group': $select_local = 'general'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										else if ($_POST['next'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if($errors=='')
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												switch ($_SESSION['type2']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													case 'user': $select_local = 'quota'; break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													case 'group': $select_local = 'quota'; break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													case 'host': $select_local = 'final'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												else $select_local = 'samba';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'quota':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Write all general values into $_SESSION['account']
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-07 16:53:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										$i=0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										while ($_SESSION['account']->quota[$i][0]) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->quota[$i][2] = $_POST['f_quota_'.$i.'_2'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->quota[$i][3] = $_POST['f_quota_'.$i.'_3'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->quota[$i][6] = $_POST['f_quota_'.$i.'_6'];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$_SESSION['account']->quota[$i][7] = $_POST['f_quota_'.$i.'_7'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-07 16:53:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$i++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check if values are OK and set automatic values. if not error-variable will be set
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										list($values, $errors) = checkquota($_SESSION['account'], $_SESSION['type2']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (is_object($values)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											while (list($key, $val) = each($values)) // Set only defined values
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($val) $_SESSION['account']->$key = $val;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check which part Site should be displayed next
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['back'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											switch ($_SESSION['type2']) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												case 'user': $select_local = 'samba'; break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												case 'group': if ($_SESSION['config']->samba3=='yes') $select_local = 'samba';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else $select_local = 'general'; break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										else if ($_POST['next'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ($errors=='')
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												switch ($_SESSION['type2']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													case 'user': $select_local = 'personal'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													case 'group': $select_local = 'final'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												else $select_local = 'quota';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'personal':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Write all general values into $_SESSION['account']
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_title'])) $_SESSION['account']->personal_title = $_POST['f_personal_title'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_title = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_mail'])) $_SESSION['account']->personal_mail = $_POST['f_personal_mail'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_mail = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_telephoneNumber'])) $_SESSION['account']->personal_telephoneNumber = $_POST['f_personal_telephoneNumber'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_telephoneNumber = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_mobileTelephoneNumber'])) $_SESSION['account']->personal_mobileTelephoneNumber = $_POST['f_personal_mobileTelephoneNumber'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_mobileTelephoneNumber = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_facsimileTelephoneNumber'])) $_SESSION['account']->personal_facsimileTelephoneNumber = $_POST['f_personal_facsimileTelephoneNumber'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_facsimileTelephoneNumber = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_street'])) $_SESSION['account']->personal_street = $_POST['f_personal_street'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_street = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_postalCode'])) $_SESSION['account']->personal_postalCode = $_POST['f_personal_postalCode'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_postalCode = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_postalAddress'])) $_SESSION['account']->personal_postalAddress = $_POST['f_personal_postalAddress'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_postalAddress = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-14 12:27:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (isset($_POST['f_personal_employeeType'])) $_SESSION['account']->personal_employeeType = $_POST['f_personal_employeeType'];
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											else $_SESSION['account']->personal_employeeType = "";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check if values are OK and set automatic values. if not error-variable will be set
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										list($values, $errors) = checkpersonal($_SESSION['account'], $_SESSION['type2']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (is_object($values)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											while (list($key, $val) = each($values)) // Set only defined values
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($val) $_SESSION['account']->$key = $val;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check which part Site should be displayed next
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['back']) $select_local = 'quota';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										else if ($_POST['next'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if  ($errors=='') $select_local = 'final';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												else $select_local = 'personal';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'final':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Write all general values into $_SESSION['account']
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['f_final_changegids']) $_SESSION['final_changegids'] = $_POST['f_final_changegids'] ;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check which part Site should be displayed next
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ($_POST['back'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											switch ($_SESSION['type2']) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												case 'user': $select_local = 'personal'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												case 'group': $select_local = 'quota'; break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												case 'host': $select_local = 'samba'; break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												}
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-31 10:52:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									case 'finish':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Check if pdf-file should be created
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_POST['outputpdf']) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:22:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											createpdf(array($_SESSION['account']));
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											$select_local = 'pdf';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-31 10:52:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if ( $_POST['create'] ) { // Create-Button was pressed
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									// Create or modify an account
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									switch ($_SESSION['type2']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										case 'user':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ($_SESSION['account_old']) $result = modifyuser($_SESSION['account'],$_SESSION['account_old']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 else $result = createuser($_SESSION['account']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ( $result==1 || $result==3 ) $select_local = 'finish';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										case 'group':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ($_SESSION['account_old']) $result = modifygroup($_SESSION['account'],$_SESSION['account_old']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 else $result = creategroup($_SESSION['account']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ( $result==1 || $result==3 ) $select_local = 'finish';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										case 'host':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ($_SESSION['account_old']) $result = modifyhost($_SESSION['account'],$_SESSION['account_old']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 else $result = createhost($_SESSION['account']); // account.inc
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if ( $result==1 || $result==3 ) $select_local = 'finish';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Set selected page to general if no page was defined. should only true if account.php wasn't called by itself
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if (!$select_local) $select_local='general';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Reset variables if recreate-button was pressed
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if ($_POST['createagain']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$select_local='general';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-25 11:07:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$_SESSION['account']="";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Set selected page to backmain (Back to main listmenu)
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if ($_POST['backmain']) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$select_local='backmain';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-25 11:07:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Set selected page to load (load profile)
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if ($_POST['load']) $select_local='load';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Set selected page to save (save profile)
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-02 12:52:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if ($_POST['save']) $select_local='save';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-25 11:07:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if ($select_local != 'pdf') {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// Write HTML-Header and part of Table
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"".
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										"\"http://www.w3.org/TR/html4/loose.dtd\">\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									echo "<html><head><title>";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									echo _("Create new Account");
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									echo "</title>\n".
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										"<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">\n".
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										"<meta http-equiv=\"pragma\" content=\"no-cache\">\n".
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										"<meta http-equiv=\"cache-control\" content=\"no-cache\">\n".
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-15\">";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								switch ($select_local) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									// backmain = back to lists
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// load = load profile
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// save = save profile
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									case 'backmain':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// unregister sessionvar and select which list should be shown
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (session_is_registered("shelllist")) session_unregister("shelllist");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if (session_is_registered("account")) session_unregister("account");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if (session_is_registered("account_old")) session_unregister("account_old");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user' :
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if (session_is_registered("type2")) session_unregister("type2");
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo "<meta http-equiv=\"refresh\" content=\"0; URL=lists/listusers.php\">\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'group' :
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if (session_is_registered("type2")) session_unregister("type2");
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo "<meta http-equiv=\"refresh\" content=\"0; URL=lists/listgroups.php\">\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'host' :
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if (session_is_registered("type2")) session_unregister("type2");
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo "<meta http-equiv=\"refresh\" content=\"0; URL=lists/listhosts.php\">\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'load':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// load profile
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												$_SESSION['account'] = loadUserProfile($_POST['f_general_selectprofile']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'host':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												$_SESSION['account'] = loadHostProfile($_POST['f_general_selectprofile']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'group':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												$_SESSION['account'] = loadGroupProfile($_POST['f_general_selectprofile']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// select general page after group has been loaded
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										$select_local='general';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'save':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// save profile
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												saveUserProfile($_SESSION['account'], $_POST['f_finish_safeProfile']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'host':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												saveHostProfile($_SESSION['account'], $_POST['f_finish_safeProfile']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'group':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												saveGroupProfile($_SESSION['account'], $_POST['f_finish_safeProfile']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// select last page displayed before user is created
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										$select_local='final';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								if ($select_local != 'pdf') {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									echo "</head><body>\n";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									echo "<form action=\"account.php\" method=\"post\">\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:22:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									echo "<table class=\"account\" width=\"100%\">\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									if (is_array($errors))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										for ($i=0; $i<sizeof($errors); $i++) StatusMessage($errors[$i][0], $errors[$i][1], $errors[$i][2]);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-10 12:25:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//print_r($_SESSION['account']);
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 13:53:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//print_r($_POST);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								switch ($select_local) { // Select which part of page will be loaded
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// general = startpage, general account paramters
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// unix = page with all shadow-options and password
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// samba = page with all samba-related parameters e.g. smbpassword
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// quota = page with all quota-related parameters e.g. hard file quota
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// personal = page with all personal-related parametergs, e.g. phone number
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// final = last page shown before account is created/modified
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									//		if account is modified commands might be ran are shown
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									// finish = page shown after account has been created/modified
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'general':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// General Account Settings
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// load list of all groups
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										$groups = findgroups();
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// Show page info
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="select" type="hidden" value="general">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo _('General Properties');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo "</td></tr>\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// load list of profiles
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-01 17:02:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												$profilelist = getUserProfiles();
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// Create HTML-page
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Username*');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo "</td>\n<td>".
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_username" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->general_username . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=400" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('UID Number');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_uidNumber" type="text" size="6" maxlength="6" value="' . $_SESSION['account']->general_uidNumber . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=401" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Surname*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_surname" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->general_surname . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=424" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Given name*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_givenname" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->general_givenname . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=425" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'</tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Primary Group*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_general_group">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												// loop trough existing groups
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												foreach ($groups as $group) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($_SESSION['account']->general_group == $group) echo '<option selected>' . $group. '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo '<option>' . $group. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													 }
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select></td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=406" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Additional Groupmembership');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_general_groupadd[]" size="3" multiple>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												// loop though existing groups for additional groups
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												foreach ($groups as $group) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($_SESSION['account']->general_groupadd) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														if (in_array($group, $_SESSION['account']->general_groupadd)) echo '<option selected>'.$group. '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														else echo '<option>'.$group. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo '<option>'.$group. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'</select></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=402" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Home Directory*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_general_homedir" type="text" size="30" value="' . $_SESSION['account']->general_homedir . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=403" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Gecos');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_general_gecos" type="text" size="30" value="' . $_SESSION['account']->general_gecos . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=404" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Login Shell*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_general_shell" >';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													// loop through shells
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-01 17:02:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													foreach ($_SESSION['shelllist'] as $shell)
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														if ($_SESSION['account']->general_shell==trim($shell)) echo '<option selected>'.$shell. '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															else echo '<option>'.$shell. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=405" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Suffix'); echo '</td><td><select name="f_general_suffix">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-28 09:08:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												foreach ($_SESSION['ldap']->search_units($_SESSION['config']->get_UserSuffix()) as $suffix) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($_SESSION['account']->general_dn) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-28 13:14:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														if ($_SESSION['account']->general_dn == $suffix)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															echo '<option selected>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														else echo '<option>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo '<option>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select></td><td><a href="help.php?HelpNumber=461" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr><tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo _('Values with * are required');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													echo '</td></tr><tr><td><select name="f_general_selectprofile">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// loop through profiles
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												foreach ($profilelist as $profile) echo '<option>' . $profile. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="load" type="submit" value="'; echo _('Load Profile'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'group':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// load list of profiles
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-14 21:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												$profilelist = getGroupProfiles();
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// Create HTML-page
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Groupname*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_username" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->general_username . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=407" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('GID Number');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_uidNumber" type="text" size="6" maxlength="6" value="' . $_SESSION['account']->general_uidNumber . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=408" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Gecos');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_general_gecos" type="text" size="30" value="' . $_SESSION['account']->general_gecos . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=409" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr><tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Suffix'); echo '</td><td><select name="f_general_suffix">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-28 09:08:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												foreach ($_SESSION['ldap']->search_units($_SESSION['config']->get_GroupSuffix()) as $suffix) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($_SESSION['account']->general_dn) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-28 13:14:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														if ($_SESSION['account']->general_dn == $suffix)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															echo '<option selected>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														else echo '<option>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo '<option>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select></td><td><a href="help.php?HelpNumber=462" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr><tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo _('Values with * are required');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													echo '</td></tr>'."\n".'<tr><td><select name="f_general_selectprofile" >';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												foreach ($profilelist as $profile) echo '<option>' . $profile. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="load" type="submit" value="'; echo _('Load Profile'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'host':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// load list of profiles
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-01 17:02:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												$profilelist = getHostProfiles();
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// Create HTML-page
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Hostname*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_username" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->general_username . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=410" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('UID Number');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_general_uidNumber" type="text" size="6" maxlength="6" value="' . $_SESSION['account']->general_uidNumber . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=411" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Primary Group*');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_general_group">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												foreach ($groups as $group) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($_SESSION['account']->general_group == $group) echo '<option selected>' . $group. '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo '<option>' . $group. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													 }
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select></td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=412" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Additional Groupmembership');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_general_groupadd[]" size="3" multiple>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												foreach ($groups as $group) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($_SESSION['account']->general_groupadd) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														if (in_array($group, $_SESSION['account']->general_groupadd)) echo '<option selected>'.$group. '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														else echo '<option>'.$group. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo '<option>'.$group. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'</select></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=402" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Gecos');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td><td><input name="f_general_gecos" type="text" size="30" value="' . $_SESSION['account']->general_gecos . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=413" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr><tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Suffix'); echo '</td><td><select name="f_general_suffix">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-28 09:08:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												foreach ($_SESSION['ldap']->search_units($_SESSION['config']->get_HostSuffix()) as $suffix) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($_SESSION['account']->general_dn) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-28 13:14:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														if ($_SESSION['account']->general_dn == $suffix)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															echo '<option selected>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														else echo '<option>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo '<option>' . $suffix. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-26 16:26:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select></td><td><a href="help.php?HelpNumber=463" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr><tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo _('Values with * are required');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													echo '</td></tr>'."\n".'<tr><td><select name="f_general_selectprofile">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												foreach ($profilelist as $profile) echo '<option>' . $profile. '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="load" type="submit" value="'; echo _('Load Profile'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="next" type="submit" value="'; echo _('next'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'unix':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// Unix Password Settings
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// decrypt password
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 20:02:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_SESSION['account']->unix_password != '') {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$iv = base64_decode($_COOKIE["IV"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$key = base64_decode($_COOKIE["Key"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($_SESSION['account']->unix_password), MCRYPT_MODE_ECB, $iv);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$password = str_replace(chr(00), '', $password);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 14:42:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										$date = getdate ($_SESSION['account']->unix_pwdexpire);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="select" type="hidden" value="unix">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo _('Unix Properties');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td></tr>'."\n".'';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user' :
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_unix_password" type="text" size="20" maxlength="20" value="' . $password . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="genpass" type="submit" value="';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Generate Password'); echo '"></td></tr><tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Use no Password.');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_unix_password_no" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->unix_password_no) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'<a href="help.php?HelpNumber=426" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 12:37:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Password Warn');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_unix_pwdwarn" type="text" size="4" maxlength="4" value="' . $_SESSION['account']->unix_pwdwarn . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=414" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 12:37:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Password Expire');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_unix_pwdallowlogin" type="text" size="4" maxlength="4" value="' . $_SESSION['account']->unix_pwdallowlogin . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=415" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 12:37:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Maximum Passwordage');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_unix_pwdmaxage" type="text" size="5" maxlength="5" value="' . $_SESSION['account']->unix_pwdmaxage . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=416" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 12:37:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Minimum Passwordage');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_unix_pwdminage" type="text" size="4" maxlength="4" value="' . $_SESSION['account']->unix_pwdminage . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=417" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 12:37:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Expire Date');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_unix_pwdexpire_day">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=31; $i++ ) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 14:42:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($date['mday']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_unix_pwdexpire_mon">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=12; $i++ ) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 14:42:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($date['mon'] == $i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_unix_pwdexpire_yea">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=2003; $i<=2030; $i++ ) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 14:42:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													if ($date['year']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-27 14:35:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</select></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=418" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Account deactivated');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_unix_deactivated" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->unix_deactivated) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'<a href="help.php?HelpNumber=427" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'</td></tr><tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo _('Values with * are required');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													echo '</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'host' :
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 15:11:11 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '<input name="f_unix_password_no" type="hidden" value="';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->unix_password_no) echo 'checked';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo  '">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td></td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account_old']) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-17 11:19:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '<input name="respass" type="submit" value="';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													echo _('Reset Password'); echo '">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 12:37:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td></tr>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'<input name="back" type="submit" value="'; echo _('back'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'</td>'."\n".'<td></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'<input name="next" type="submit" value="'; echo _('next'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'samba':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// Samba Settings
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 14:25:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="select" type="hidden" value="samba">'; echo _('Samba Properties'); echo '</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 19:28:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// decrypt password
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-21 19:45:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										// decrypt password
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-15 20:02:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_SESSION['account']->smb_password != '') {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$iv = base64_decode($_COOKIE["IV"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$key = base64_decode($_COOKIE["Key"]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($_SESSION['account']->smb_password), MCRYPT_MODE_ECB, $iv);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$password = str_replace(chr(00), '', $password);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// Set Account is samba-workstation to false
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 13:53:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												$canchangedate = getdate($_SESSION['account']->smb_pwdcanchange);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												$mustchangedate = getdate($_SESSION['account']->smb_pwdmustchange);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												$_SESSION['account']->smb_flagsW = 0;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'<input name="f_smb_pwdcanchange_h" type="hidden" value="'.$canchangedate['hours'].'">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_smb_pwdcanchange_m" type="hidden" value="'.$canchangedate['minutes'].'">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_smb_pwdcanchange_s" type="hidden" value="'.$canchangedate['seconds'].'">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_smb_pwdmustchange_h" type="hidden" value="'.$mustchangedate['hours'].'">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_smb_pwdmustchange_m" type="hidden" value="'.$mustchangedate['minutes'].'">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_smb_pwdmustchange_s" type="hidden" value="'.$mustchangedate['seconds'].'">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Samba Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_password" type="text" size="20" maxlength="20" value="' . $password . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td><input name="f_smb_useunixpwd" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->smb_useunixpwd) echo ' checked ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Use Unix-Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Use no Password.');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_password_no" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->smb_password_no) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=428" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Password doesn\'t expire.');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_flagsX" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->smb_flagsX) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=429" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('User can change Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 13:53:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_smb_pwdcanchange_day">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=31; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($canchangedate['mday']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdcanchange_mon">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=12; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($canchangedate['mon'] == $i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdcanchange_yea">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=2003; $i<=2030; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($canchangedate['year']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select></td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'<a href="help.php?HelpNumber=430" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('User must change Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 13:53:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_smb_pwdmustchange_day">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=31; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($mustchangedate['mday']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdmustchange_mon">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=12; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($mustchangedate['mon'] == $i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdmustchange_yea">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=2003; $i<=2030; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($mustchangedate['year']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select></td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'<a href="help.php?HelpNumber=431" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Accout is deactivated');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_flagsD" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->smb_flagsD) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=432" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Home Drive');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_smb_homedrive" >';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-03 18:48:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													for ($i=68; $i<91; $i++)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														if ($_SESSION['account']->smb_homedrive== chr($i).':') echo '<option selected> '.chr($i).':</option>'; else echo '<option> '.chr($i).':</option>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'</select></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=433" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Script Path');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_scriptpath" type="text" size="20" maxlength="80" value="' . $_SESSION['account']->smb_scriptPath . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=434" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Profile Path');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_profilePath" type="text" size="20" maxlength="80" value="' . $_SESSION['account']->smb_profilePath . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=435" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('User Workstations');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_smbuserworkstations" type="text" size="20" maxlength="80" value="' . $_SESSION['account']->smb_smbuserworkstations . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=436" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('smb Home');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_smbhome" type="text" size="20" maxlength="80" value="' . $_SESSION['account']->smb_smbhome . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=437" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Domain');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_domain" type="text" size="20" maxlength="80" value="' . $_SESSION['account']->smb_domain . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=438" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											case 'group':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Windows well known group');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_smb_mapgroup" >';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ( $_SESSION['account']->smb_mapgroup == $_SESSION[config]->get_domainSID() . "-" . '514' ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo '<option selected> ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo _('Domain Guests');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo "</option>\n"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													 else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo '<option> ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo _('Domain Guests');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo "</option>\n";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ( $_SESSION['account']->smb_mapgroup == $_SESSION[config]->get_domainSID() . "-" . '513' ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo '<option selected> ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo _('Domain Users');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo "</option>\n"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													 else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo '<option> ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo _('Domain Users');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo "</option>\n";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ( $_SESSION['account']->smb_mapgroup == $_SESSION[config]->get_domainSID() . "-" . '512' ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo '<option selected> ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo _('Domain Admins');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo "</option>\n"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													 else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo '<option> ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo _('Domain Admins');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														echo "</option>\n";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'</select></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=464" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo _('Windows Groupname');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="f_smb_domain" type="text" size="30" maxlength="80" value="' . $_SESSION['account']->smb_displayName . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=465" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-30 12:06:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'host':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												// set smb_flgasW true because account is host
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												$_SESSION['account']->smb_flagsW = 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td><input name="f_smb_password_no" type="hidden" value="'.$_SESSION['account']->unix_password_no.'">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo _('Password doesn\'t expire.');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_flagsX" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 11:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->smb_flagsX) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '></td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=429" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Host can change Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 13:53:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_smb_pwdcanchange_day">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=31; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($canchangedate['mday']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdcanchange_mon">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=12; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($canchangedate['mon'] == $i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdcanchange_yea">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=2003; $i<=2030; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($canchangedate['year']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select></td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'<a href="help.php?HelpNumber=430" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Host must change Password');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-11 13:53:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><select name="f_smb_pwdmustchange_day">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=31; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($mustchangedate['mday']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdmustchange_mon">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=1; $i<=12; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($mustchangedate['mon'] == $i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select><select name="f_smb_pwdmustchange_yea">';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												for ( $i=2003; $i<=2030; $i++ ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													if ($mustchangedate['year']==$i) echo "<option selected> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													else echo "<option> $i". '</option>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '</select></td>'."\n".'<td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo	'<a href="help.php?HelpNumber=431" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Accout is deactivated');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_flagsD" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account']->smb_flagsD) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '></td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=432" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Domain');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td><input name="f_smb_domain" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->smb_domain . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<a href="help.php?HelpNumber=460" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="back" type="submit" value="'; echo _('back');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo '"></td><td></td><td><input name="next" type="submit" value="';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo _('next'); echo '"></td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'quota':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// Quota Settings
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="select" type="hidden" value="quota">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo _('Quota Properties');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td></tr>'."\n".'<tr><td>'; echo _('Mointpoint'); echo '</td>'."\n".'<td>'; echo _('used blocks'); echo '</td>'."\n".'<td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo _('soft block limit'); echo '</td>'."\n".'<td>'; echo _('hard block limit'); echo '</td>'."\n".'<td>'; echo _('grace block period');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'; echo _('used inodes'); echo '</td>'."\n".'<td>'; echo _('soft inode limit'); echo '</td>'."\n".'<td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo _('hard inode limit'); echo '</td>'."\n".'<td>'; echo _('grace inode period'); echo '</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><a href="help.php?HelpNumber=439" target="lamhelp">'._('Help').'</a></td>'."\n".'<td><a href="help.php?HelpNumber=440" target="lamhelp">'._('Help').'</a></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=441" target="lamhelp">'._('Help').'</a></td>'."\n".'<td><a href="help.php?HelpNumber=442" target="lamhelp">'._('Help').'</a></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=443" target="lamhelp">'._('Help').'</a></td>'."\n".'<td><a href="help.php?HelpNumber=444" target="lamhelp">'._('Help').'</a></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=445" target="lamhelp">'._('Help').'</a></td>'."\n".'<td><a href="help.php?HelpNumber=446" target="lamhelp">'._('Help').'</a></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=447" target="lamhelp">'._('Help').'</a></td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-07 16:53:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										$i=0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										while ($_SESSION['account']->quota[$i][0]) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<tr><td>'.$_SESSION['account']->quota[$i][0].'</td><td>'.$_SESSION['account']->quota[$i][1].'</td>'; // used blocks
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<td><input name="f_quota_'.$i.'_2" type="text" size="12" maxlength="20" value="'.$_SESSION['account']->quota[$i][2].'"></td>'; // blocks soft limit
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<td><input name="f_quota_'.$i.'_3" type="text" size="12" maxlength="20" value="'.$_SESSION['account']->quota[$i][3].'"></td>'; // blocks hard limit
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<td>'.$_SESSION['account']->quota[$i][4].'</td>'; // block grace period
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<td>'.$_SESSION['account']->quota[$i][5].'</td>'; // used inodes
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<td><input name="f_quota_'.$i.'_6" type="text" size="12" maxlength="20" value="'.$_SESSION['account']->quota[$i][6].'"></td>'; // inodes soft limit
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<td><input name="f_quota_'.$i.'_7" type="text" size="12" maxlength="20" value="'.$_SESSION['account']->quota[$i][7].'"></td>'; // inodes hard limit
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											echo '<td>'.$_SESSION['account']->quota[$i][8].'</td></tr>'; // inodes grace period
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											$i++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'<input name="back" type="submit" value="'; echo _('back'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'<input name="next" type="submit" value="'; echo _('next'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'personal':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// Personal Settings
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="select" type="hidden" value="personal">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo _('Personal Properties');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-07 16:44:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Title');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_title" type="text" size="10" maxlength="10" value="' . $_SESSION['account']->personal_title . '"> ';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										echo $_SESSION['account']->general_surname . ' ' . $_SESSION['account']->general_givenname . '</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=448" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Employee Type');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_employeeType" type="text" size="30" maxlength="30" value="' . $_SESSION['account']->personal_employeeType . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=449" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Street');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_street" type="text" size="30" maxlength="30" value="' . $_SESSION['account']->personal_street . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=450" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Postal code');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_postalCode" type="text" size="5" maxlength="5" value="' . $_SESSION['account']->personal_postalCode . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=451" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Postal address');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_postalAddress" type="text" size="30" maxlength="80" value="' . $_SESSION['account']->personal_postalAddress . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=452" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Telephone Number');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_telephoneNumber" type="text" size="30" maxlength="30" value="' . $_SESSION['account']->personal_telephoneNumber . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=453" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Mobile Phonenumber');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_mobileTelephoneNumber" type="text" size="30" maxlength="30" value="' . $_SESSION['account']->personal_mobileTelephoneNumber . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=454" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Facsimile Number');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_facsimileTelephoneNumber" type="text" size="30" maxlength="30" value="' . $_SESSION['account']->personal_facsimileTelephoneNumber . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=455" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('eMail Address');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="f_personal_mail" type="text" size="30" maxlength="80" value="' . $_SESSION['account']->personal_mail . '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<a href="help.php?HelpNumber=456" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n".'<tr><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="back" type="submit" value="'; echo _('back'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td><td></td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="next" type="submit" value="'; echo _('next'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case 'final':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// Final Settings
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="select" type="hidden" value="final">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_SESSION['account_old']) echo _('Modify');
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										 else echo _('Create');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user' :
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if (($_SESSION['account_old']) && ($_SESSION['account']->general_uidNumber != $_SESSION['account_old']->general_uidNumber)) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-03 19:15:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '<tr>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													StatusMessage ('INFO', _('UID-number has changed. You have to run the following command as root in order to change existing file-permissions:'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'find / -gid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chown ' . $_SESSION['account']->general_uidNumber . ' {} \;');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '</tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if (($_SESSION['account_old']) && ($_SESSION['account']->general_homedir != $_SESSION['account_old']->general_homedir)) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-03 19:15:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '<tr>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													StatusMessage ('INFO', _('Home Directory has changed. You have to run the following command as root in order to change the existing homedirectory:'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'mv ' . $_SESSION['account_old' ]->general_homedir . ' ' . $_SESSION['account']->general_homedir);
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '</tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'group' :
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if (($_SESSION['account_old']) && ($_SESSION['account']->general_uidNumber != $_SESSION['account_old']->general_uidNumber)) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-03 19:15:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '<tr>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													StatusMessage ('INFO', _('GID-number has changed. You have to run the following command as root in order to change existing file-permissions:'),
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-03 19:15:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													'find / -gid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chgrp ' . $_SESSION['account']->general_uidNumber . ' {} \;');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '</tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '<tr><td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													echo '<input name="f_final_changegids" type="checkbox"';
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														if ($_SESSION['final_changegids']) echo ' checked ';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo ' >';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													echo _('Change GID-Number of all users in group to new value');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-07 16:53:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											case 'host':
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if (($_SESSION['account_old']) && ($_SESSION['account']->general_uidNumber != $_SESSION['account_old']->general_uidNumber)) {
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-07 16:53:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '<tr>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													StatusMessage ('INFO', _('UID-number has changed. You have to run the following command as root in order to change existing file-permissions:'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'find / -gid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chown ' . $_SESSION['account']->general_uidNumber . ' {} \;');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													echo '</tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-07 16:53:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-23 15:47:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="back" type="submit" value="'; echo _('back'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td>'."\n".'<td><input name="f_finish_safeProfile" type="text" size="30" maxlength="50">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="save" type="submit" value="';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Save Profile');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '"><a href="help.php?HelpNumber=457" target="lamhelp">'._('Help').'</a>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'<input name="create" type="submit" value="';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if ($_SESSION['account_old']) echo _('Modify Account');
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										 else echo _('Create Account');
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 14:27:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									case 'finish':
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										// Final Settings
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-05 11:36:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '<tr><td><input name="select" type="hidden" value="finish">';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 14:27:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo _('Success');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										echo '</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 14:27:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										switch ( $_SESSION['type2'] ) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'user' :
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('User ');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo $_SESSION['account']->general_username;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account_old']) echo _(' has been modified. ');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												 else echo _(' has been created. ');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												if (!$_SESSION['account_old'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													{ echo '<input name="createagain" type="submit" value="'; echo _('Create another user'); echo '">'; }
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="outputpdf" type="submit" value="'; echo _('Create PDF-file'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td>'."\n".'<td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="backmain" type="submit" value="'; echo _('Back to userlist'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 14:27:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'group' :
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Group ');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo $_SESSION['account']->general_username;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account_old']) echo _(' has been modified. ');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												 else echo _(' has been created. ');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if (!$_SESSION['account_old'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													{ echo' <input name="createagain" type="submit" value="'; echo _('Create another group'); echo '">'; }
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td><td></td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="backmain" type="submit" value="'; echo _('Back to grouplist'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 14:27:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											case 'host' :
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo '<tr><td>';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo _('Host ');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												echo $_SESSION['account']->general_username;
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if ($_SESSION['account_old']) echo _(' has been modified. ');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												 else echo _(' has been created. ');
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 10:33:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td></tr>'."\n".'<tr><td>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-01 10:02:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												if (!$_SESSION['account_old'])
							 | 
						
					
						
							
								
									
										
										
										
											2003-05-15 20:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													{ echo '<input name="createagain" type="submit" value="'; echo _('Create another host'); echo '">'; }
							 | 
						
					
						
							
								
									
										
										
										
											2003-07-24 16:44:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												echo '</td><td>'."\n".'</td><td>'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'<input name="backmain" type="submit" value="'; echo _('Back to hostlist'); echo '">'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													'</td></tr>'."\n";
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-24 14:27:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										break;
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// Print end of HTML-Page
							 | 
						
					
						
							
								
									
										
										
										
											2003-06-08 19:08:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if ($select_local != 'pdf') echo '</table></form></body></html>';
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-21 14:03:30 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								?>
							 |