コード例 #1
0
ファイル: jobs_voice.php プロジェクト: nightcore125/developer
         } else {
             $command = $gsprache->add . ' voiceserverID: ' . $row2['affectedID'] . '; Error: ' . $virtualserver_id;
             $query3 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
             $query3->execute(array($row2['jobID']));
         }
     }
 } else {
     if ($row2['action'] == 'md' and isid($localserverid, 30)) {
         $command = $gsprache->mod . ' voiceserverID: ' . $row2['affectedID'] . ' name:' . $row2['name'];
         $query3 = $sql->prepare("SELECT `active`,`slots`,`ip`,`port`,`dns` FROM `voice_server` WHERE `id`=? LIMIT 1");
         $query3->execute(array($row2['affectedID']));
         foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
             $oldip = $row3['ip'];
             $oldport = $row3['port'];
             $olddns = $row3['dns'];
             $connection->StartServer($localserverid);
             $serverdetails = $connection->ServerDetails($localserverid);
             $name = $serverdetails['virtualserver_name'];
             $welcome = $serverdetails['virtualserver_welcomemessage'];
             $hostbanner_url = $serverdetails['virtualserver_hostbanner_url'];
             $hostbanner_gfx_url = $serverdetails['virtualserver_hostbanner_gfx_url'];
             $hostbutton_tooltip = $serverdetails['virtualserver_hostbutton_tooltip'];
             $hostbutton_url = $serverdetails['virtualserver_hostbutton_url'];
             $hostbutton_gfx_url = $serverdetails['virtualserver_hostbutton_gfx_url'];
             $connection->ModServer($localserverid, $slots, $ip, $port, $initialpassword, $name, $welcome, $max_download_total_bandwidth, $max_upload_total_bandwidth, $hostbanner_url, $hostbanner_gfx_url, $hostbutton_url, $hostbutton_gfx_url, $hostbutton_tooltip);
             if ($forcebanner == 'Y') {
                 $removelist[] = 'b_virtualserver_modify_hostbanner';
                 $removelist[] = 'i_needed_modify_power_virtualserver_modify_hostbanner';
             } else {
                 if ($forcebanner == 'N') {
                     $addlist[] = 'b_virtualserver_modify_hostbanner';
コード例 #2
0
 } else {
     if ($addedby == 1) {
         $query2 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
         $query2->execute(array($row['rootid'], $reseller_id));
         $queryip = $query2->fetchColumn();
     }
 }
 $connection = new TS3($queryip, $queryport, 'serveradmin', $querypassword);
 $errorcode = $connection->errorcode;
 if (strpos($errorcode, 'error id=0') === false) {
     $template_file = $spracheResponse->error_ts_query_connect . $errorcode;
 } else {
     if ($ui->smallletters('action', 2, 'get') == 're') {
         $uptime = 2;
         $reply = $connection->StopServer($volocalserverid);
         $reply = $connection->StartServer($volocalserverid);
         $loguseraction = '%start% %voserver% ' . $row['ip'] . ':' . $row['port'];
         $insertlog->execute();
     } else {
         if ($ui->smallletters('action', 2, 'get') == 'so') {
             $uptime = 1;
             $reply = $connection->StopServer($volocalserverid);
             $loguseraction = '%stop% %voserver% ' . $row['ip'] . ':' . $row['port'];
             $insertlog->execute();
         }
     }
     if (isset($reply)) {
         $query2 = $sql->prepare("UPDATE `voice_server` SET `uptime`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
         $query2->execute(array($uptime, $id, $reseller_id));
         $template_file = $spracheResponse->ts_query_success . $reply[0]['msg'];
     } else {
コード例 #3
0
ファイル: voice.php プロジェクト: nightcore125/developer
         if (isset($addList)) {
             $connection->AdminPermissions($localServerID, 'add', $addList);
         }
         if (isset($removeList)) {
             $connection->AdminPermissions($localServerID, 'del', $removeList);
         }
         $rowCount += count($addList) + count($removeList);
         $loguseraction = '%mod% %voserver% ' . $ip . ':' . $port;
     }
 }
 if (isset($localServerID) and isid($localServerID, 255)) {
     if ($active == 'N') {
         $connection->StopServer($localServerID);
     } else {
         if ($ui->st('action', 'post') == 'md' and $active == 'Y' and $oldActive == 'N') {
             $connection->StartServer($localServerID);
         }
     }
     $serverName = $ip . ':' . $port;
     $connectList = array($serverName);
     if ($masterServerData['usedns'] == 'Y') {
         if ($ui->st('action', 'post') == 'ad' and $dns == strtolower($username . '.' . $masterServerData['defaultdns']) or $dns == $masterServerData['defaultdns']) {
             $dns = strtolower($id . '.' . $masterServerData['defaultdns']);
             $serverName = $dns;
             $connectList[] = $dns;
             $query = $sql->prepare("UPDATE `voice_server` SET `dns`=? WHERE `id`=? LIMIT 1");
             $query->execute(array($dns, $id));
             $rowCount += $query->rowCount();
         }
         if (isid($masterServerData['tsdnsServerID'], 19)) {
             $query = $sql->prepare("SELECT *,AES_DECRYPT(`ssh2port`,:aeskey) AS `decryptedssh2port`,AES_DECRYPT(`ssh2user`,:aeskey) AS `decryptedssh2user`,AES_DECRYPT(`ssh2password`,:aeskey) AS `decryptedssh2password` FROM `voice_tsdns` WHERE `active`='Y' AND `id`=:id AND `resellerid`=:reseller_id LIMIT 1");