- <div class="page-header">
- <h3 class="page-title">
- Sunucu Bilgilerim
- </h3>
- </div>
- <?php
- try{
- $ts3 = new ts3admin($ts3_ip, $ts3_queryport);
- if($ts3->getElement('success', $ts3->connect())) {
- $ts3->login($ts3_user, $ts3_pass);
- if($ts3->getElement('success', $ts3->selectServer($ts3_port,'port',TRUE))) {
- $ts3->setName("".$server["ts3querynick"]."");
- $ts3bilgiler = $ts3->serverInfo("-short");
- if ($ts3bilgiler['success'])
- {
- $ts3bilgiler = $ts3bilgiler['data'];
- $pingcek = $ts3bilgiler['virtualserver_total_ping'];
- $loss = $ts3bilgiler['virtualserver_total_packetloss_total'];
- $ping = "".number_format($pingcek, 0)." Ms";
- $paketkaybi = "".number_format($loss*100, 2)." %";
- }
- }
- }
- $updurum = $ts3->convertSecondsToStrTime(($ts3bilgiler['virtualserver_uptime']));
- if($ts3bilgiler['virtualserver_status'] == "online"){
- $status = "Açık";
- }else{
- $status = "Kapalı";
- }
- }
- catch(TeamSpeak3_Exception $e)
- {
- $error = 1;
- }
- ?>
- <div class="row">
- <div class="col-md-4 stretch-card grid-margin">
- <div class="card bg-gradient-info border-0 text-white p-3">
- <div class="card-body">
- <div class="d-flex align-items-start">
- <i class="fa fa-globe fa-2x"></i>
- <div class="ml-4">
- <h2 class="mb-2"><font size=4><?php echo $user['ip'].":".$user['port'];?></font>
- <h4 class="mb-0">Sunucu Adresiniz</h4>
- <b><a href="ts3server://<?php echo $user['ip'].":".$user['port'];?>>"> Teamspeak3'e Bağlan</a></b>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-4 stretch-card grid-margin">
- <div class="card bg-gradient-danger border-0 text-white p-3">
- <div class="card-body">
- <div class="d-flex align-items-start">
- <i class="fa fa-play fa-2x"></i>
- <div class="ml-4">
- <h2 class="mb-2"><?php echo $status;?></h2>
- <h4 class="mb-0">Sunucu Durumu</h4>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-4 stretch-card grid-margin">
- <div class="card bg-gradient-warning border-0 text-white p-3">
- <div class="card-body">
- <div class="d-flex align-items-start">
- <i class="fa fa-calendar fa-2x"></i>
- <div class="ml-4">
- <h2 class="mb-2">Uptime</h2>
- <h4 class="mb-0"><?php echo $updurum;?></h4>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php
- if(isset($_POST['kick'])) {
- $reason = $_POST['reason'];
- $nick = $_POST['client'];
- $time = $_POST['time'];
- $ts3_VirtualServer->clientGetByName($nick)->kick(TeamSpeak3::KICK_SERVER, $reason);
- $permMsg = "<center><p class='alert alert-success'><strong>Başarılı!<br>Kullanıcı Kicklendi</strong></p></center>";
- }
- ?>
- <?php
- if(isset($_POST['ban'])) {
- $reason = $_POST['reason'];
- $nick = $_POST['client'];
- $time = $_POST['time'];
- $ts3_VirtualServer->clientGetByName($nick)->ban($timeseconds = $time,$reason = $reason);
- $permMsg2 = "<center><p class='alert alert-success'><strong>Başarılı!<br>Kullanıcı Banlandı</strong></p></center>";
- }
- ?>
- <?php
- if(isset($_POST['poke'])) {
- $reason = $_POST['reason'];
- $nick = $_POST['client'];
- $time = $_POST['time'];
- $ts3_VirtualServer->clientGetByName($nick)->poke($reason);
- $permMsg3 = "<center><p class='alert alert-success'><strong>Başarılı!<br>Poke Atıldı</strong></p></center>";
- }
- ?>
- <?php
- if(isset($_POST['gonder'])) {
- $message = $_POST['message'];
- $ts3_VirtualServer->message("[b][color=green]".$message."[/color][/b] [COLOR=#ff0000]- Sponsored By TardisX.CoM[/COLOR]");
- $permMsg4 = "<center><p class='alert alert-success'><strong>Başarılı!<br>Mesaj Gönderildi</strong></p></center>";
- }
- ?>
- <div class="col-12">
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">Kullanıcı Yasakla ( Banla) </h4>
- <div class="panel panel-default">
- <div class="box-body">
- <?php if(isset($_POST['ban'])) {
- $razon = $_POST['reason'];
- $nick = $_POST['client'];
- $time = $_POST['time'];
- if($time == 0){$timefinal = "Permanent";} else{$timefinal = $time;}
- ?>
- <?php
- echo $permMsg2;
- ?>
- <meta http-equiv="refresh" content="2" >
- <?php }else{?>
- <form role="form" method="post" >
- <div class="form-group">
- <center><label>Kullanici Sec</label>
- <select name="client" placeholder="100" class="form-control" style="width: 100%;
- background-clip: border-box;">
- <?php
- foreach($ts3_VirtualServer->clientList() as $tsclient) {
- if($tsclient['client_type'] == 1) continue;
- echo"<option value=$tsclient>".$tsclient."</option>";
- }
- ?>
- </select>
- </div>
- <div class="form-group">
- <center><label>Banlama Nedeni</label></center>
- <input type="text" class="form-control" name="reason" placeholder="Nedeni">
- </div>
- <div class="box-footer">
- <center><label>Banlama Süresi</label></center>
- <input type="text" class="form-control" name="time" placeholder="Banlama Süresi '0' Süresiz Ban">
- <br><center><input type="submit" name="ban" class="btn btn-lg btn-primary btn-block" value="Yasakla!" />
- </div>
- </form>
- <?php } ?>
- </div>
- </div>
- </div>
- </div>
- <br><br>
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">Kullanıcı Kickle</h4>
- <hr>
- <br>
- <div class="panel panel-default">
- <div class="box-body">
- <?php if(isset($_POST['kick'])) {
- $razon = $_POST['reason'];
- $nick = $_POST['client'];
- if($time == 0){$timefinal = "Permanent";} else{$timefinal = $time;}
- ?>
- <?php
- echo $permMsg;
- ?>
- <meta http-equiv="refresh" content="2" >
- <?php }else{?>
- <form role="form" method="post" >
- <div class="form-group">
- <center><label>Kullanici Sec</label>
- <select name="client" placeholder="100" class="form-control" style="width: 100%;
- background-clip: border-box;">
- <?php
- foreach($ts3_VirtualServer->clientList() as $tsclient) {
- if($tsclient['client_type'] == 1) continue;
- echo"<option value=$tsclient>".$tsclient."</option>";
- }
- ?>
- </select>
- </div>
- <div class="form-group">
- <center><label>Kickleme Nedeni</label></center>
- <input type="text" class="form-control" name="reason" placeholder="Nedeni">
- </div>
- <br><center><input type="submit" name="kick" class="btn btn-lg btn-primary btn-block" value="Kickle!" />
- </form>
- <?php } ?>
- </div>
- </div>
- </div>
- </div>
- <br><br>
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">Kullanıcı Pokele</h4>
- <hr>
- <br>
- <div class="panel panel-default">
- <div class="box-body">
- <?php if(isset($_POST['poke'])) {
- $razon = $_POST['reason'];
- $nick = $_POST['client'];
- if($time == 0){$timefinal = "Permanent";} else{$timefinal = $time;}
- ?>
- <?php
- echo $permMsg3;
- ?>
- <meta http-equiv="refresh" content="2" >
- <?php }else{?>
- <form role="form" method="post" >
- <div class="form-group">
- <center><label>Kullanici Sec</label>
- <select name="client" placeholder="100" class="form-control" style="width: 100%;
- background-clip: border-box;">
- <?php
- foreach($ts3_VirtualServer->clientList() as $tsclient) {
- if($tsclient['client_type'] == 1) continue;
- echo"<option value=$tsclient>".$tsclient."</option>";
- }
- ?>
- </select>
- </div>
- <div class="form-group">
- <center><label>Poke Mesajı</label></center>
- <input type="text" class="form-control" name="reason" placeholder="Poke Mesajı">
- </div>
- <br><center><input type="submit" name="poke" class="btn btn-lg btn-primary btn-block" value="Poke At!" />
- </form>
- <?php } ?>
- </div>
- </div>
- </div>
- </div>
- <br><br>
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">Sunucuya Mesaj Gönder</h4>
- <hr>
- <br>
- <div class="panel panel-default">
- <div class="box-body">
- <? if(isset($_POST['gonder'])) { ?>
- <?php
- echo $permMsg4;
- ?>
- <meta http-equiv="refresh" content="2" >
- <?php }else{?>
- <form role="form" method="post" >
- <div class="form-group">
- </div>
- <div class="form-group">
- <center><label>Sunucuya Mesaj Gönder</label></center>
- <input type="text" class="form-control" name="message" placeholder="Buraya Mesaj Yazın">
- </div>
- <div class="box-footer">
- <br><center><input type="submit" name="gonder" class="btn btn-lg btn-primary btn-block" value="Gönder!" />
- </div>
- </form>
- <?php } ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>