Exemplo n.º 1
0
     $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 {
                     if ($installGames == 'A') {
                         $templates = array();
                         $query6->execute(array($row2['affectedID']));
                         while ($row = $query6->fetch(PDO::FETCH_ASSOC)) {
                             $templates[] = $row['shorten'];
                             $templates[] = $row['shorten'] . '-2';
                             $templates[] = $row['shorten'] . '-3';
                         }
                         $appServer->addApp($templates, true);
                     }
                 }