Facebook
From mrx, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 167
  1.           <div class="page-header">
  2.             <h3 class="page-title">
  3.              Sunucu Bilgilerim
  4.             </h3>
  5.           </div>
  6.  
  7.  
  8.  
  9. <?php
  10. try{
  11. $ts3 = new ts3admin($ts3_ip, $ts3_queryport);
  12. if($ts3->getElement('success', $ts3->connect())) {
  13.         $ts3->login($ts3_user, $ts3_pass);
  14.         if($ts3->getElement('success', $ts3->selectServer($ts3_port,'port',TRUE))) {
  15.         $ts3->setName("".$server["ts3querynick"]."");
  16.         $ts3bilgiler =  $ts3->serverInfo("-short");
  17.         if ($ts3bilgiler['success'])
  18.         {
  19.                 $ts3bilgiler = $ts3bilgiler['data'];
  20.                 $pingcek = $ts3bilgiler['virtualserver_total_ping'];
  21.                 $loss = $ts3bilgiler['virtualserver_total_packetloss_total'];
  22.                 $ping = "".number_format($pingcek, 0)." Ms";
  23.                 $paketkaybi = "".number_format($loss*100, 2)." %";
  24.         }
  25. }
  26. }
  27. $updurum = $ts3->convertSecondsToStrTime(($ts3bilgiler['virtualserver_uptime']));
  28.  
  29. if($ts3bilgiler['virtualserver_status'] == "online"){
  30. $status = "Açık";
  31. }else{
  32. $status = "Kapalı";
  33. }
  34.  
  35.         }
  36.         catch(TeamSpeak3_Exception $e)
  37.         {
  38.                 $error = 1;
  39.         }
  40. ?>
  41.  
  42.  
  43.            <div class="row">
  44.             <div class="col-md-4 stretch-card grid-margin">
  45.               <div class="card bg-gradient-info border-0 text-white p-3">
  46.                 <div class="card-body">
  47.                   <div class="d-flex align-items-start">
  48.                     <i class="fa fa-globe fa-2x"></i>
  49.                     <div class="ml-4">
  50.                       <h2 class="mb-2"><font size=4><?php echo $user['ip'].":".$user['port'];?></font>
  51.                       <h4 class="mb-0">Sunucu Adresiniz</h4>
  52.                                           <b><a href="ts3server://<?php echo $user['ip'].":".$user['port'];?>>"> Teamspeak3'e Bağlan</a></b>
  53.                     </div>
  54.                   </div>
  55.                 </div>
  56.               </div>
  57.             </div>
  58.  
  59.             <div class="col-md-4 stretch-card grid-margin">
  60.               <div class="card bg-gradient-danger border-0 text-white p-3">
  61.                 <div class="card-body">
  62.                   <div class="d-flex align-items-start">
  63.                    <i class="fa fa-play fa-2x"></i>
  64.                     <div class="ml-4">
  65.                       <h2 class="mb-2"><?php echo $status;?></h2>
  66.                       <h4 class="mb-0">Sunucu Durumu</h4>
  67.                     </div>
  68.                   </div>
  69.                 </div>
  70.               </div>
  71.             </div>
  72.  
  73.             <div class="col-md-4 stretch-card grid-margin">
  74.               <div class="card bg-gradient-warning border-0 text-white p-3">
  75.                 <div class="card-body">
  76.                   <div class="d-flex align-items-start">
  77.                     <i class="fa fa-calendar fa-2x"></i>
  78.                     <div class="ml-4">
  79.                       <h2 class="mb-2">Uptime</h2>
  80.                       <h4 class="mb-0"><?php echo $updurum;?></h4>
  81.                     </div>
  82.                   </div>
  83.                 </div>
  84.               </div>
  85.             </div>
  86.                                
  87. <?php
  88. if(isset($_POST['kick'])) {
  89.                
  90.                 $reason = $_POST['reason'];
  91.                 $nick = $_POST['client'];
  92.                 $time = $_POST['time'];
  93.                 $ts3_VirtualServer->clientGetByName($nick)->kick(TeamSpeak3::KICK_SERVER, $reason);
  94.                 $permMsg = "<center><p class='alert alert-success'><strong>Başarılı!<br>Kullanıcı Kicklendi</strong></p></center>";
  95.         }
  96. ?>
  97. <?php
  98. if(isset($_POST['ban'])) {
  99.                
  100.                 $reason = $_POST['reason'];
  101.                 $nick = $_POST['client'];
  102.                 $time = $_POST['time'];
  103.                 $ts3_VirtualServer->clientGetByName($nick)->ban($timeseconds = $time,$reason = $reason);
  104.                 $permMsg2 = "<center><p class='alert alert-success'><strong>Başarılı!<br>Kullanıcı Banlandı</strong></p></center>";
  105.         }
  106. ?>
  107. <?php
  108. if(isset($_POST['poke'])) {
  109.                
  110.                 $reason = $_POST['reason'];
  111.                 $nick = $_POST['client'];
  112.                 $time = $_POST['time'];
  113.                 $ts3_VirtualServer->clientGetByName($nick)->poke($reason);  
  114.                 $permMsg3 = "<center><p class='alert alert-success'><strong>Başarılı!<br>Poke Atıldı</strong></p></center>";
  115.         }
  116. ?>
  117. <?php
  118. if(isset($_POST['gonder'])) {
  119.                 $message = $_POST['message'];
  120.                 $ts3_VirtualServer->message("[b][color=green]".$message."[/color][/b] [COLOR=#ff0000]- Sponsored By TardisX.CoM[/COLOR]");
  121.                 $permMsg4 = "<center><p class='alert alert-success'><strong>Başarılı!<br>Mesaj Gönderildi</strong></p></center>";
  122.                
  123.                
  124.         }
  125. ?>
  126.  
  127.                 <div class="col-12">
  128.           <div class="card">
  129.             <div class="card-body">
  130.               <h4 class="card-title">Kullanıcı Yasakla ( Banla) </h4>
  131. <div class="panel panel-default">
  132.  
  133.                                                 <div class="box-body">
  134.                                                 <?php if(isset($_POST['ban'])) {
  135.                                                                
  136.                                                                 $razon = $_POST['reason'];
  137.                                                                 $nick = $_POST['client'];
  138.                                                                 $time = $_POST['time'];
  139.                                                                 if($time == 0){$timefinal = "Permanent";} else{$timefinal = $time;}
  140.                                                         ?>     
  141.                                                         <?php
  142. echo $permMsg2;
  143. ?>
  144.                                                         <meta http-equiv="refresh" content="2" >
  145.                                                         <?php }else{?>
  146.                                                        
  147.                                                         <form role="form" method="post" >
  148.  
  149.                                                                 <div class="form-group">
  150.                                                                         <center><label>Kullanici Sec</label>
  151.                                                                         <select name="client" placeholder="100" class="form-control" style="width: 100%;
  152.     background-clip: border-box;">
  153.        
  154.         <?php
  155.                                                                                        
  156.                                                                                         foreach($ts3_VirtualServer->clientList() as $tsclient) {
  157.                                                                                                 if($tsclient['client_type'] == 1) continue;
  158.                                                                                                 echo"<option value=$tsclient>".$tsclient."</option>";
  159.                                                                                         }
  160.                                                                                 ?>
  161.                                                                                                                                                         </select>
  162.                                                                 </div>
  163.                                                                
  164.                                                                 <div class="form-group">
  165.                                                                         <center><label>Banlama Nedeni</label></center>
  166.                                                                         <input type="text" class="form-control" name="reason" placeholder="Nedeni">
  167.                                                                 </div>
  168.                                                
  169.                                                                 <div class="box-footer">
  170.                                                                        
  171.                                                                         <center><label>Banlama Süresi</label></center>
  172.                                                                         <input type="text" class="form-control" name="time" placeholder="Banlama Süresi '0' Süresiz Ban">
  173.                                                                        
  174.                                                                         <br><center><input type="submit" name="ban" class="btn btn-lg btn-primary btn-block" value="Yasakla!" />
  175.                                                                        
  176.                                                                 </div>
  177.                                                         </form>
  178.                                                        
  179.                                                         <?php } ?>
  180.                                                                                                         </div>
  181.                                         </div>
  182.  
  183. </div>
  184.                 </div> 
  185.  
  186. <br><br>
  187.  <div class="card">
  188.             <div class="card-body">
  189.               <h4 class="card-title">Kullanıcı Kickle</h4>
  190. <hr>
  191. <br>
  192.  
  193. <div class="panel panel-default">
  194.  
  195.  
  196.                                                 <div class="box-body">
  197.                                                 <?php if(isset($_POST['kick'])) {
  198.                                                                
  199.                                                                 $razon = $_POST['reason'];
  200.                                                                 $nick = $_POST['client'];
  201.                                                                 if($time == 0){$timefinal = "Permanent";} else{$timefinal = $time;}
  202.                                                         ?>     
  203. <?php
  204. echo $permMsg;
  205. ?>
  206.                                                         <meta http-equiv="refresh" content="2" >
  207.                                                         <?php }else{?>
  208.                                                        
  209.                                                         <form role="form" method="post" >
  210.  
  211.                                                                 <div class="form-group">
  212.                                                                         <center><label>Kullanici Sec</label>
  213.                                                                         <select name="client" placeholder="100" class="form-control" style="width: 100%;
  214.     background-clip: border-box;">
  215.        
  216.         <?php
  217.                                                                                        
  218.                                                                                         foreach($ts3_VirtualServer->clientList() as $tsclient) {
  219.                                                                                                 if($tsclient['client_type'] == 1) continue;
  220.                                                                                                 echo"<option value=$tsclient>".$tsclient."</option>";
  221.                                                                                         }
  222.                                                                                 ?>
  223.                                                                                                                                                         </select>
  224.                                                                 </div>
  225.                                                                
  226.                                                                 <div class="form-group">
  227.                                                                         <center><label>Kickleme Nedeni</label></center>
  228.                                                                         <input type="text" class="form-control" name="reason" placeholder="Nedeni">
  229.                                                                 </div>
  230.                                                                                 <br><center><input type="submit" name="kick" class="btn btn-lg btn-primary btn-block" value="Kickle!" />                       
  231.                                                         </form>
  232.                                                        
  233.                                                         <?php } ?>                             
  234.                                         </div>
  235.                                 </div> 
  236.               </div>                           
  237.                         </div>         
  238.                                
  239. <br><br>
  240.  <div class="card">
  241.             <div class="card-body">
  242.               <h4 class="card-title">Kullanıcı Pokele</h4>
  243. <hr>
  244. <br>                           
  245.                         <div class="panel panel-default">
  246.                                                 <div class="box-body">
  247.                                                 <?php if(isset($_POST['poke'])) {
  248.                                                                
  249.                                                                 $razon = $_POST['reason'];
  250.                                                                 $nick = $_POST['client'];
  251.                                                                 if($time == 0){$timefinal = "Permanent";} else{$timefinal = $time;}
  252.                                                         ?>     
  253. <?php
  254. echo $permMsg3;
  255. ?>
  256.                                                         <meta http-equiv="refresh" content="2" >
  257.                                                        
  258.                                                         <?php }else{?>
  259.                                                        
  260.                                                         <form role="form" method="post" >
  261.  
  262.                                                                 <div class="form-group">
  263.                                                                         <center><label>Kullanici Sec</label>
  264.                                                                         <select name="client" placeholder="100" class="form-control" style="width: 100%;
  265.     background-clip: border-box;">
  266.        
  267.         <?php
  268.                                                                                        
  269.                                                                                         foreach($ts3_VirtualServer->clientList() as $tsclient) {
  270.                                                                                                 if($tsclient['client_type'] == 1) continue;
  271.                                                                                                 echo"<option value=$tsclient>".$tsclient."</option>";
  272.                                                                                         }
  273.                                                                                 ?>
  274.                                                                                                                                                         </select>
  275.                                                                 </div>
  276.                                                                
  277.                                                                 <div class="form-group">
  278.                                                                         <center><label>Poke Mesajı</label></center>
  279.                                                                         <input type="text" class="form-control" name="reason" placeholder="Poke Mesajı">
  280.                                                                 </div>
  281.                                                                                 <br><center><input type="submit" name="poke" class="btn btn-lg btn-primary btn-block" value="Poke At!" />                      
  282.                                                         </form>
  283.                                                        
  284.                                                         <?php } ?>
  285.                                                                                                         </div>
  286.                                         </div>
  287.                                        
  288.                                 </div>
  289.                 </div> 
  290. <br><br>
  291.  <div class="card">
  292.             <div class="card-body">
  293.               <h4 class="card-title">Sunucuya Mesaj Gönder</h4>
  294. <hr>
  295. <br>                           
  296.                         <div class="panel panel-default">              
  297.                                
  298.                                 <div class="box-body">
  299.                                                 <? if(isset($_POST['gonder'])) { ?>    
  300. <?php
  301. echo $permMsg4;
  302. ?>
  303.                                                         <meta http-equiv="refresh" content="2" >
  304.                                                         <?php }else{?>
  305.                                                        
  306.                                                         <form role="form" method="post" >
  307.  
  308.                                                                 <div class="form-group">
  309.                                                                        
  310.                                                                 </div>
  311.                                                                 <div class="form-group">
  312.                                                                         <center><label>Sunucuya Mesaj Gönder</label></center>
  313.                                                                         <input type="text" class="form-control" name="message" placeholder="Buraya Mesaj Yazın">
  314.                                                                 </div>
  315.                                                
  316.                                                                 <div class="box-footer">
  317.                                                                        
  318.                                                                
  319.                                                                         <br><center><input type="submit" name="gonder" class="btn btn-lg btn-primary btn-block" value="Gönder!" />
  320.                                                                 </div>
  321.                                                         </form>
  322.                                                        
  323.                                                         <?php } ?>
  324.                                                                                                         </div>
  325.                                         </div>
  326.                                        
  327.                                 </div>
  328.                 </div>
  329.                                
  330.                                
  331.                                
  332.                                
  333.                
  334.  
  335.  
  336.  
  337.                
  338. </div>
  339. </div> 
  340.        
  341.        
  342.        
  343.                                                                  
  344.  
  345.  
  346.