$errors[] = $sprache->error_password_not_match; } if (count($errors) == 0) { $query = $sql->prepare("UPDATE `webVhost` SET `ftpPassword`=AES_ENCRYPT(?,?) WHERE `webVhostID`=? AND `userID`=? AND `resellerID`=? AND `active`='Y' LIMIT 1"); $query->execute(array($ui->password('password1', 40, 'post'), $aeskey, $id, $user_id, $reseller_id)); if ($query->rowCount() == 0) { $errors[] = $spracheResponse->error_table; } } if (count($errors) > 0) { unset($header, $text); $template_file = 'userpanel_web_vhost_pw.tpl'; } else { $vhostObject = new HttpdManagement($webMasterID, $reseller_id); if ($vhostObject != false and $vhostObject->ssh2Connect()) { $vhostObject->changePassword($id); $template_file = $sprache->ftpPasswordChanged; } } } else { $template_file = 'userpanel_web_vhost_pw.tpl'; } } else { if (isset($webMasterID, $dns, $usageType, $phpConfigurationMaster, $vhostTemplate) and $usageType == 'W' and $ui->st('d', 'get') == 'dm' and $ui->id('id', 10, 'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id', 10, 'get'), $substituteAccess['ws']))) { $id = $ui->id('id', 10, 'get'); if ($ui->st('action', 'post') == 'dm') { $domainRemove = array(); $domainConfigurations = array(); $notice = array(); $query = $sql->prepare("SELECT `domain` FROM `webVhostDomain` WHERE `webVhostID`=? AND `userID`=? AND `resellerID`=?"); $query->execute(array($id, $user_id, $reseller_id));
$rowCount += $query->rowCount(); } // Check if a row was affected during insert or update if (isset($rowCount) and $rowCount > 0) { $insertlog->execute(); $template_file = $spracheResponse->table_add; $vhostObject = new HttpdManagement($webMasterID, $resellerLockupID); if ($vhostObject != false and $vhostObject->ssh2Connect() and $vhostObject->sftpConnect()) { if ($ui->st('action', 'post') == 'ad') { $vhostObject->vhostCreate($id); } else { if ($oldActive == 'Y' and $oldActive != $active) { $vhostObject->setInactive($id); } else { if ($oldFtpPassword != $ftpPassword) { $vhostObject->changePassword($id, $ftpPassword); } else { $vhostObject->vhostMod($id, $domainRemove); } } } $vhostObject->restartHttpdServer(); } // No update or insert failed } else { $template_file = $spracheResponse->error_table; } // An error occurred during validation unset the redirect information and display the form again } else { unset($header, $text); if ($ui->st('d', 'get') == 'ad') {