master password can be changed on new general configuration page
This commit is contained in:
		
							parent
							
								
									ccbbe53931
								
							
						
					
					
						commit
						2e5b6f3b93
					
				|  | @ -117,16 +117,6 @@ if ($_POST['submit']) { | ||||||
| 		} | 		} | ||||||
| 		else $error = _("Profile passwords are different or empty!"); | 		else $error = _("Profile passwords are different or empty!"); | ||||||
| 	} | 	} | ||||||
| 	// set master password
 |  | ||||||
| 	elseif ($_POST['action'] == "setmasterpass") { |  | ||||||
| 		if ($_POST['masterpassword'] && $_POST['masterpassword2'] && ($_POST['masterpassword'] == $_POST['masterpassword2'])) { |  | ||||||
| 			$config = new CfgMain(); |  | ||||||
| 			$config->password = $_POST['masterpassword']; |  | ||||||
| 			$config->save(); |  | ||||||
| 			$msg = _("New master password set successfully."); |  | ||||||
| 		} |  | ||||||
| 		else $error = _("Master passwords are different or empty!"); |  | ||||||
| 	} |  | ||||||
| 	// set default profile
 | 	// set default profile
 | ||||||
| 	elseif ($_POST['action'] == "setdefault") { | 	elseif ($_POST['action'] == "setdefault") { | ||||||
| 		$config = new CfgMain(); | 		$config = new CfgMain(); | ||||||
|  | @ -163,7 +153,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 			<table cellspacing=0 border=0> | 			<table cellspacing=0 border=0> | ||||||
| 
 | 
 | ||||||
| 				<!-- add profile --> | 				<!-- add profile --> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> | 					<td> | ||||||
| 						<input type="radio" name="action" value="add" checked> | 						<input type="radio" name="action" value="add" checked> | ||||||
| 					</td> | 					</td> | ||||||
|  | @ -185,7 +175,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 					?>
 | 					?>
 | ||||||
| 					</td> | 					</td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> </td> | 					<td> </td> | ||||||
| 					<td> </td> | 					<td> </td> | ||||||
| 					<td align="right"> | 					<td align="right"> | ||||||
|  | @ -194,7 +184,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 					</td> | 					</td> | ||||||
| 					<td></td> | 					<td></td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> </td> | 					<td> </td> | ||||||
| 					<td> </td> | 					<td> </td> | ||||||
| 					<td align="right"> | 					<td align="right"> | ||||||
|  | @ -209,7 +199,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 				</tr> | 				</tr> | ||||||
| 
 | 
 | ||||||
| 				<!-- rename profile --> | 				<!-- rename profile --> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> | 					<td> | ||||||
| 						<input type="radio" name="action" value="rename"> | 						<input type="radio" name="action" value="rename"> | ||||||
| 					</td> | 					</td> | ||||||
|  | @ -243,7 +233,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 				</tr> | 				</tr> | ||||||
| 
 | 
 | ||||||
| 				<!-- delete profile --> | 				<!-- delete profile --> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> | 					<td> | ||||||
| 						<input type="radio" name="action" value="delete"> | 						<input type="radio" name="action" value="delete"> | ||||||
| 					</td> | 					</td> | ||||||
|  | @ -273,7 +263,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 				</tr> | 				</tr> | ||||||
| 
 | 
 | ||||||
| 				<!-- set profile password --> | 				<!-- set profile password --> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> | 					<td> | ||||||
| 						<input type="radio" name="action" value="setpass"> | 						<input type="radio" name="action" value="setpass"> | ||||||
| 					</td> | 					</td> | ||||||
|  | @ -301,7 +291,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 					?>
 | 					?>
 | ||||||
| 					</td> | 					</td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> </td> | 					<td> </td> | ||||||
| 					<td> </td> | 					<td> </td> | ||||||
| 					<td align="right"> | 					<td align="right"> | ||||||
|  | @ -311,15 +301,12 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 					<td> </td> | 					<td> </td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 
 | 
 | ||||||
| 				<tr> |  | ||||||
| 					<td colspan=4> </td> |  | ||||||
| 				</tr> |  | ||||||
| 				<tr> | 				<tr> | ||||||
| 					<td colspan=4> </td> | 					<td colspan=4> </td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 
 | 
 | ||||||
| 				<!-- change default profile --> | 				<!-- change default profile --> | ||||||
| 				<tr bgcolor="#dbdbff"> | 				<tr> | ||||||
| 					<td> | 					<td> | ||||||
| 						<input type="radio" name="action" value="setdefault"> | 						<input type="radio" name="action" value="setdefault"> | ||||||
| 					</td> | 					</td> | ||||||
|  | @ -350,43 +337,6 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 					</td> | 					</td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 
 | 
 | ||||||
| 				<tr> |  | ||||||
| 					<td colspan=4> </td> |  | ||||||
| 				</tr> |  | ||||||
| 
 |  | ||||||
| 				<!-- set master password --> |  | ||||||
| 				<tr bgcolor="#dbdbff"> |  | ||||||
| 					<td> |  | ||||||
| 						<input type="radio" name="action" value="setmasterpass"> |  | ||||||
| 					</td> |  | ||||||
| 					<td> |  | ||||||
| 						<b> |  | ||||||
| 							<?php echo _("Change master password"); ?>
 |  | ||||||
| 						</b> |  | ||||||
| 					</td> |  | ||||||
| 					<td align="right"> |  | ||||||
| 						<?php echo _("New master password") . ":"; ?>
 |  | ||||||
| 						<input type="password" name="masterpassword"> |  | ||||||
| 					</td> |  | ||||||
| 					<td>  |  | ||||||
| 					<?PHP |  | ||||||
| 						// help link
 |  | ||||||
| 						echo "<a href=\"../help.php?HelpNumber=235\" target=\"lamhelp\">"; |  | ||||||
| 						echo "<img src=\"../../graphics/help.png\" alt=\"" . _('Help') . "\" title=\"" . _('Help') . "\">"; |  | ||||||
| 						echo "</a>\n"; |  | ||||||
| 					?>
 |  | ||||||
| 					</td> |  | ||||||
| 				</tr> |  | ||||||
| 				<tr bgcolor="#dbdbff"> |  | ||||||
| 					<td> </td> |  | ||||||
| 					<td> </td> |  | ||||||
| 					<td align="right"> |  | ||||||
| 						<?php echo _("Reenter new master password") . ":"; ?>
 |  | ||||||
| 						<input type="password" name="masterpassword2"> |  | ||||||
| 					</td> |  | ||||||
| 					<td> </td> |  | ||||||
| 				</tr> |  | ||||||
| 
 |  | ||||||
| 			</table> | 			</table> | ||||||
| 			</fieldset> | 			</fieldset> | ||||||
| 			</td></tr> | 			</td></tr> | ||||||
|  | @ -395,7 +345,7 @@ if (!isset($cfg->default) && !isset($cfg->password)) { | ||||||
| 
 | 
 | ||||||
| 			<!-- password field and submit button --> | 			<!-- password field and submit button --> | ||||||
| 			<b> | 			<b> | ||||||
| 				<?php echo _("Master Password:"); ?>
 | 				<?php echo _("Master password:"); ?>
 | ||||||
| 			</b> | 			</b> | ||||||
| 			  | 			  | ||||||
| 			<input type="password" name="passwd"> | 			<input type="password" name="passwd"> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue