smaler link fixes

This commit is contained in:
katagia 2003-09-12 13:00:44 +00:00
parent 2c12b0a671
commit e179967151
2 changed files with 4 additions and 5 deletions

View File

@ -288,6 +288,7 @@ function checkglobal($values, $type, $values_old=false) { // This functions chec
// Create automatic groupaccount with number if original user already exists
while ($temp = ldapexists($return, $type, $values_old)) {
// get last character of username
$return->general_username = substr($return->general_username, 0, $return->general_username-1);
$lastchar = substr($return->general_username, strlen($return->general_username)-2, 1);
// Last character is no number
if ( !ereg('^([0-9])+$', $lastchar))
@ -304,6 +305,7 @@ function checkglobal($values, $type, $values_old=false) { // This functions chec
$lastchars = substr($return->general_username, $i+1, strlen($return->general_username)-$i);
$return->general_username = $firstchars . (intval($lastchars)+1). '$';
}
$return->general_username = $return->general_username . "$";
}
if ($values->general_username != $return->general_username) $errors[] = array('WARN', _('Host name'), _('Hostname already in use. Selected next free hostname.'));
break;

View File

@ -176,7 +176,7 @@ do { // X-Or, only one if() can be true
break;
}
if ($_POST['backmain']) {
echo "<meta http-equiv=\"refresh\" content=\"2; URL=lists/listhosts.php\">\n";
echo "<meta http-equiv=\"refresh\" content=\"2; URL=../lists/listhosts.php\">\n";
$select_local='backmain';
break;
}
@ -402,9 +402,6 @@ switch ($select_local) { // Select which part of page will be loaded
echo "<fieldset><legend><b>"._('Success')."</b></legend>\n";
echo "<table border=0 width=\"100%\"><tr><td>";
echo '<tr><td>';
echo _('Success');
echo '</td></tr>'."\n";
echo '<tr><td>';
echo _('Host');
echo ' '.$_SESSION['account']->general_username.' ';
if ($_SESSION['account_old']) echo ' '._('has been modified').'.';
@ -418,7 +415,7 @@ switch ($select_local) { // Select which part of page will be loaded
break;
case 'backmain':
// unregister sessionvar and select which list should be shown
echo '<a href="lists/listhosts.php">';
echo '<a href="../lists/listhosts.php">';
echo _('Please press here if meta-refresh didn\'t work.');
echo "</a>\n";
if (isset($_SESSION['shelllist'])) unset($_SESSION['shelllist']);