$rowCount += $query->rowCount(); unset($domainRemove[$domain]); } if (count($domainRemove) > 0) { $query = $sql->prepare("DELETE FROM `webVhostDomain` WHERE `webVhostID`=? AND `userID`=? AND `resellerID`=? AND `domain` IN('" . implode("','", $domainRemove) . "')"); $query->execute(array($id, $userID, $resellerLockupID)); $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 {
$vhostObject = new HttpdManagement($row['hostID'], $row['resellerID']); if ($vhostObject != false and $vhostObject->ssh2Connect() and $vhostObject->sftpConnect() or $vhostObject->masterNotfound) { if ($vhostObject->masterNotfound) { $query8->execute(array($row['hostID'])); } $query2->execute(array($row['hostID'])); while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) { $extraData = @json_decode($row2['extraData']); if ($row2['action'] == 'dl') { if (!$vhostObject->masterNotfound) { $vhostObject->vhostDelete($row2['affectedID']); } $query3->execute(array($row2['affectedID'])); } else { if ($row2['action'] == 'ad') { $vhostObject->vhostCreate($row2['affectedID']); } else { if ($row2['action'] == 'md') { $query4->execute(array($row2['affectedID'])); $active = $query4->fetchColumn(); if ($active == 'N' or property_exists($extraData, 'newActive') and $extraData->newActive == 'N') { $vhostObject->setInactive($row2['affectedID']); } else { $vhostObject->vhostMod($row2['affectedID']); } } else { if ($row2['action'] == 'ri') { $vhostObject->vhostReinstall($row2['affectedID']); } } }