<?php
   include_once '../account/session.php';
   include_once '../../scripts/bd.php';
   
   if(isset($_GET['action'])){
    $action=$_GET['action'];
    if($action=='show')show();
   }
   
   function show(){
      $data=array();
      $query = bd::query("SELECT id,name,main_ip,provider FROM server WHERE active=1");
      while ($row = mysql_fetch_object($query)) {
          $data[]=$row;
      }
      echo json_encode($data);
   }
   