コード例 #1
0
ファイル: web_vhost.php プロジェクト: nightcore125/developer
 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 {
     $template_file = $spracheResponse->error_table;
 }
 // An error occurred during validation unset the redirect information and display the form again
コード例 #2
0
     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']);
                     }
                 }
             }
         }
         $query5->execute(array($row2['jobID']));
         $query6->execute(array($row2['affectedID']));
     }
     $vhostObject->restartHttpdServer();
 } else {