*** empty log message ***
This commit is contained in:
		
							parent
							
								
									ad520a8995
								
							
						
					
					
						commit
						b584c21620
					
				|  | @ -769,7 +769,7 @@ function createuser($values) { // Will create the LDAP-Account | ||||||
| 		addhomedir($values->general_username); | 		addhomedir($values->general_username); | ||||||
| 		} | 		} | ||||||
| 	// Add User to Additional Groups
 | 	// Add User to Additional Groups
 | ||||||
| 	if ($values->general_groupadd) | 	if ($values->general_groupadd[0]) | ||||||
| 		foreach ($values->general_groupadd as $group2) { | 		foreach ($values->general_groupadd as $group2) { | ||||||
| 			$result = ldap_search($_SESSION['ldap']->server(), 'cn='.$group2.','.$_SESSION['config']->get_GroupSuffix(), "objectclass=posixGroup"); | 			$result = ldap_search($_SESSION['ldap']->server(), 'cn='.$group2.','.$_SESSION['config']->get_GroupSuffix(), "objectclass=posixGroup"); | ||||||
| 			$entry = ldap_first_entry($_SESSION['ldap']->server(), $result); | 			$entry = ldap_first_entry($_SESSION['ldap']->server(), $result); | ||||||
|  | @ -1013,7 +1013,7 @@ function createhost($values) { // Will create the LDAP-Account | ||||||
| 	$success = ldap_add($_SESSION['ldap']->server(),$values->general_dn, $attr); | 	$success = ldap_add($_SESSION['ldap']->server(),$values->general_dn, $attr); | ||||||
| 	if (!$success) return 4; | 	if (!$success) return 4; | ||||||
| 	// Add Host to Additional Groups
 | 	// Add Host to Additional Groups
 | ||||||
| 	if ($values->general_groupadd) | 	if ($values->general_groupadd[0]) | ||||||
| 		foreach ($values->general_groupadd as $group2) { | 		foreach ($values->general_groupadd as $group2) { | ||||||
| 			$result = ldap_search($_SESSION['ldap']->server(), 'cn='.$group2.','.$_SESSION['config']->get_GroupSuffix(), "objectclass=posixGroup"); | 			$result = ldap_search($_SESSION['ldap']->server(), 'cn='.$group2.','.$_SESSION['config']->get_GroupSuffix(), "objectclass=posixGroup"); | ||||||
| 			$entry = ldap_first_entry($_SESSION['ldap']->server(), $result); | 			$entry = ldap_first_entry($_SESSION['ldap']->server(), $result); | ||||||
|  |  | ||||||
|  | @ -239,7 +239,10 @@ switch ($_POST['select']) { // Select which part of page should be loaded and ch | ||||||
| 		break; | 		break; | ||||||
| 	case 'finish': | 	case 'finish': | ||||||
| 		// Check if pdf-file should be created
 | 		// Check if pdf-file should be created
 | ||||||
| 		if ($_POST['outputpdf']) createpdf($_SESSION['account']); | 		if ($_POST['outputpdf']) { | ||||||
|  | 			createpdf($_SESSION['account']); | ||||||
|  | 			$select_local = 'pdf'; | ||||||
|  | 			} | ||||||
| 		break; | 		break; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -284,16 +287,18 @@ if ($_POST['load']) $select_local='load'; | ||||||
| if ($_POST['save']) $select_local='save'; | if ($_POST['save']) $select_local='save'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // Write HTML-Header and part of Table
 | if ($select_local != 'pdf') { | ||||||
| echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" | 	// Write HTML-Header and part of Table
 | ||||||
|  | 	echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" | ||||||
| 		\"http://www.w3.org/TR/html4/loose.dtd\">\n"; | 		\"http://www.w3.org/TR/html4/loose.dtd\">\n"; | ||||||
| echo "<html><head><title>"; | 	echo "<html><head><title>"; | ||||||
| echo _("Create new Account"); | 	echo _("Create new Account"); | ||||||
| echo "</title>\n | 	echo "</title>\n | ||||||
| 		<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">\n | 		<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">\n | ||||||
| 		<meta http-equiv=\"pragma\" content=\"no-cache\">\n | 		<meta http-equiv=\"pragma\" content=\"no-cache\">\n | ||||||
| 		<meta http-equiv=\"cache-control\" content=\"no-cache\">\n | 		<meta http-equiv=\"cache-control\" content=\"no-cache\">\n | ||||||
| 		<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">"; | 		<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">"; | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| switch ($select_local) { | switch ($select_local) { | ||||||
| 	// backmain = back to lists
 | 	// backmain = back to lists
 | ||||||
|  | @ -353,10 +358,13 @@ switch ($select_local) { | ||||||
| 		break; | 		break; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | if ($select_local != 'pdf') { | ||||||
| 	echo "</head><body>\n"; | 	echo "</head><body>\n"; | ||||||
| 	echo "<form action=\"account.php\" method=\"post\">\n"; | 	echo "<form action=\"account.php\" method=\"post\">\n"; | ||||||
| 	if ($error != "0") StatusMessage("ERROR", _("Invalid Value!"), $error); | 	if ($error != "0") StatusMessage("ERROR", _("Invalid Value!"), $error); | ||||||
| 	echo "<table rules=\"all\" class=\"account\" width=\"100%\">\n"; | 	echo "<table rules=\"all\" class=\"account\" width=\"100%\">\n"; | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| switch ($select_local) { // Select which part of page will be loaded
 | switch ($select_local) { // Select which part of page will be loaded
 | ||||||
|  | @ -1009,5 +1017,5 @@ switch ($select_local) { // Select which part of page will be loaded | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| // Print end of HTML-Page
 | // Print end of HTML-Page
 | ||||||
| echo '</table></form></body></html>'; | if ($select_local != 'pdf') echo '</table></form></body></html>'; | ||||||
| ?>
 | ?>
 | ||||||
|  |  | ||||||
|  | @ -38,21 +38,26 @@ if ($_POST['tolist'] && ($_FILES['userfile']['size']>0)) $select = 'list'; | ||||||
| if ($_POST['back']) $select = 'main'; | if ($_POST['back']) $select = 'main'; | ||||||
| if ($_POST['cancel']) $select = 'cancel'; | if ($_POST['cancel']) $select = 'cancel'; | ||||||
| if ($_POST['create']) $select = 'create'; | if ($_POST['create']) $select = 'create'; | ||||||
| if ($_POST['pdf']) createpdf($_SESSION['accounts']); | if ($_POST['pdf']) { | ||||||
|  | 	createpdf($_SESSION['accounts']); | ||||||
|  | 	$select='pdf'; | ||||||
|  | 	} | ||||||
| if (!$select && !$_SESSION['pointer']) $select='main'; | if (!$select && !$_SESSION['pointer']) $select='main'; | ||||||
| if (!$select && $_SESSION['pointer']) $select='create'; | if (!$select && $_SESSION['pointer']) $select='create'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // Write HTML-Header and part of Table
 | if ($select!='pdf') { | ||||||
| echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 	// Write HTML-Header and part of Table
 | ||||||
|  | 	echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||||||
| 		"http://www.w3.org/TR/html4/loose.dtd">'; | 		"http://www.w3.org/TR/html4/loose.dtd">'; | ||||||
| echo '<html><head><title>'; | 	echo '<html><head><title>'; | ||||||
| echo _('Create new Accounts'); | 	echo _('Create new Accounts'); | ||||||
| echo '</title> | 	echo '</title> | ||||||
| 		<link rel="stylesheet" type="text/css" href="../style/layout.css"> | 		<link rel="stylesheet" type="text/css" href="../style/layout.css"> | ||||||
| 		<meta http-equiv="pragma" content="no-cache"> | 		<meta http-equiv="pragma" content="no-cache"> | ||||||
| 		<meta http-equiv="cache-control" content="no-cache"> | 		<meta http-equiv="cache-control" content="no-cache"> | ||||||
| 		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">'; | 		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">'; | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| switch ($select) { | switch ($select) { | ||||||
| 	case 'cancel': | 	case 'cancel': | ||||||
|  | @ -68,10 +73,12 @@ switch ($select) { | ||||||
| 		break; | 		break; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| echo	'</head><body> | if ($select!='pdf') { | ||||||
|  | 	echo	'</head><body> | ||||||
| 		<form enctype="multipart/form-data" action="masscreate.php" method="post">'; | 		<form enctype="multipart/form-data" action="masscreate.php" method="post">'; | ||||||
| 	echo '<table rules="all" class="masscreate" width="100%"> | 	echo '<table rules="all" class="masscreate" width="100%"> | ||||||
| 		<tr><td></td></tr>'; | 		<tr><td></td></tr>'; | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| switch ($select) { | switch ($select) { | ||||||
| 	case 'main': | 	case 'main': | ||||||
|  | @ -228,5 +235,5 @@ switch ($select) { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| echo '</table></form></body></html>'; | if ($select!='pdf') echo '</table></form></body></html>'; | ||||||
| ?>
 | ?>
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue