Пример #1
0
 // at web part set within settings.php; here in the job needs to be set on a root by root case
 $resellerLockupID = $row['resellerID'];
 $appServer = new AppServer($row['hostID']);
 $query2->execute(array($row['hostID']));
 while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
     $appServer->getAppServerDetails($row2['affectedID']);
     $extraData = @json_decode($row2['extraData']);
     $query3->execute(array($row2['affectedID']));
     while ($row3 = $query3->fetch(PDO::FETCH_ASSOC)) {
         $gsIP = $row3['serverip'];
         $port = $row3['port'];
         $protectedAllowed = $row3['pallowed'];
     }
     if ($query3->rowCount() > 0) {
         if ($row2['action'] == 'dl') {
             $appServer->stopAppHard();
             $appServer->userCud('del', 'both');
             $query4->execute(array($row2['affectedID']));
             customColumns('G', $row2['affectedID'], 'del');
             $query5->execute(array($row2['jobID']));
             $command = $gsprache->del . ' gsswitchID: ' . $row2['affectedID'] . ' name:' . $row2['name'] . ' gsswitchID:' . $row2['affectedID'];
         } else {
             if ($row2['action'] == 'ad' or $row2['action'] == 'md' and is_object($extraData)) {
                 $installGames = (is_object($extraData) and property_exists($extraData, 'installGames') and preg_match('/[APN]/', $extraData->installGames)) ? $extraData->installGames : 'N';
                 // userCrud will set the user to inactive
                 $appServer->userCud('add');
                 $appServer->setQuota();
                 if ($row2['action'] == 'ad') {
                     if ($installGames == 'P') {
                         $appServer->addApp(array(), true);
                     } else {