Exemplo n.º 1
0
 public function getVentStatus()
 {
     $stat = new CVentriloStatus();
     $stat->m_cmdcode = "2";
     // Detail mode. 1=General Status, 2=Detail
     // change config below this line only
     $stat->m_cmdhost = $this->settingManager->get("ventaddress");
     // enter your vent server ip or hostname here
     $stat->m_cmdport = $this->settingManager->get("ventport");
     // enter your vent server port number
     $stat->m_cmdpass = $this->settingManager->get("ventpass");
     // Status password if necessary.
     $lobby = new CVentriloChannel();
     $lobby->m_cid = 0;
     // Channel ID.
     $lobby->m_pid = 0;
     // Parent channel ID.
     $lobby->m_prot = 0;
     // Password protected flag.
     $lobby->m_name = "Lobby";
     // Channel name.
     $lobby->m_comm = "This is the lobby";
     // Channel comment.
     $stat->m_channellist[] = $lobby;
     $msg = '';
     $rc = $stat->Request();
     if ($rc !== 0) {
         $msg = "<orange>Could not get ventrilo info: {$stat->m_error}<end>";
     } else {
         $page .= "Channels highlighted <orange>ORANGE<end> are password protected.\n\n";
         $page .= "Hostname: <highlight>{$stat->m_cmdhost}<end>\n";
         $page .= "Port Number: <highlight>{$stat->m_cmdport}<end>\n";
         if ($this->settingManager->get("showventpassword") == 1) {
             $page .= "Password: <highlight>{$stat->m_cmdpass}<end>\n";
         }
         $page .= "\nServer Name: <highlight>{$stat->m_name}<end>\n";
         $page .= "Users: <highlight>{$stat->m_clientcount} / {$stat->m_maxclients}<end>\n";
         if ($this->settingManager->get("showextendedinfo") == 1) {
             $page .= "Voice Encoder: <highlight>{$stat->m_voicecodec_code}<end> - {$stat->m_voicecodec_desc}\n";
             $page .= "Voice Format: <highlight>{$stat->m_voiceformat_code}<end> - {$stat->m_voiceformat_desc}\n";
             $page .= "Server Uptime: " . $this->util->unixtime_to_readable($stat->m_uptime, false) . "\n";
             $page .= "Server Platform: <highlight>{$stat->m_platform}<end>\n";
             $page .= "Server Version: <highlight>{$stat->m_version}<end>\n";
             $page .= "Number of channels: <highlight>{$stat->m_channelcount}<end>\n";
         }
         $page .= "\nChannels:\n";
         foreach ($stat->m_channellist as $channel) {
             $this->displayChannel($channel, $stat->m_clientlist, "", $page);
         }
         $msg = $this->text->make_blob("Ventrilo Info ({$stat->m_clientcount})", $page);
     }
     return $msg;
 }
Exemplo n.º 2
0
        }
    }
}
/*
	This example PHP script came with a file called ventriloreadme.txt and should
	be read if you are having problems making these scripts function properly.
	
	In it's current state this script is not usable. You MUST read the
	ventriloreadme.txt file if you do not know what needs to be changed.
	
	The location of the 'ventrilo_status' program must be accessible from
	PHP and what ever HTTP server you are using. This can be effected by
	PHP safemode and other factors. The placement, access rights and ownership
	of the file it self is your responsibility. Change to fit your needs.
*/
$stat = new CVentriloStatus();
$stat->m_cmdprog = $u->db->getSetting("vent_path");
// Adjust accordingly.
$stat->m_cmdcode = "2";
// Detail mode.
$stat->m_cmdhost = $u->db->getSetting("vent_server");
// Assume ventrilo server on same machine.
$stat->m_cmdport = $u->db->getSetting("vent_port");
// Port to be statused.
$stat->m_cmdpass = $u->db->getSetting("vent_pass");
// Status password if necessary.
echo "<ventrilo>";
if ($stat->Request()) {
    echo "<name>{$stat->m_error}</name>";
} else {
    if ($stat->m_clientcount == 0) {
            echo $ts_slots;
            ?>
			</td>
			<td>
				<?php 
            echo $ts_server['descr'];
            ?>
			</td>
		</tr>
<?php 
        }
    }
    if (isset($vent_servers)) {
        require_once PAGE_PATH . '/ventrilostatus.php';
        foreach ($vent_servers as $vent_server) {
            $ve_info = new CVentriloStatus();
            $ve_info->m_cmdcode = 2;
            // Detail mode.
            $ve_info->m_cmdhost = $vent_server['addr'];
            $ve_info->m_cmdport = $vent_server['queryPort'];
            /////////
            $rc = $ve_info->Request();
            //	if ($rc) {
            //		echo "CVentriloStatus->Request() failed. <strong>$ve_info->m_error</strong><br /><br />\n";
            //	} else {
            $ve_channels = $ve_info->m_channelcount;
            $ve_slots = $ve_info->m_clientcount . '/' . $ve_info->m_maxclients;
            //	}
            ?>
  
			<tr class="bg1">
Exemplo n.º 4
0
if ($addon['config']['guildspeak_server_mode'] == 1) {
    // Set UI Configs to templates
    $roster->tpl->assign_block_vars('ts_style', array('VERSION' => $wpost2version, 'PAGETITLE' => $addon['config']['guildspeak_ts_pagetitle'], 'CATROWCOLOR1' => $addon['config']['guildspeak_ts_catrowcolor1'], 'CATTXTCOLOR' => $addon['config']['guildspeak_ts_cattxtcolor'], 'ROWCOLOR1' => $addon['config']['guildspeak_ts_rowcolor1'], 'LSTTXTCOLOR' => $addon['config']['guildspeak_ts_lsttxtcolor'], 'LSTLNKCOLOR' => $addon['config']['guildspeak_ts_lstlnkcolor'], 'LSTVLNKCOLOR' => $addon['config']['guildspeak_ts_lstvlnkcolor'], 'LSTALNKCOLOR' => $addon['config']['guildspeak_ts_lstalnkcolor'], 'LSTHVRCOLOR' => $addon['config']['guildspeak_ts_lsthvrcolor'], 'CATLNKCOLOR' => $addon['config']['guildspeak_ts_catlnkcolor'], 'CATHVRCOLOR' => $addon['config']['guildspeak_ts_cathvrcolor'], 'REFRESH' => $addon['config']['guildspeak_ts_refresh'], 'REFRESHTIME' => $addon['config']['guildspeak_ts_refreshtime'], 'BODYBGCOLOR' => $addon['config']['guildspeak_ts_bodybgcolor'], 'BODYTXTCOLOR' => $addon['config']['guildspeak_ts_bodytxtcolor'], 'BODYLNKCOLOR' => $addon['config']['guildspeak_ts_bodylnkcolor'], 'BODYVLNKCOLOR' => $addon['config']['guildspeak_ts_bodyvlnkcolor'], 'BODYALNKCOLOR' => $addon['config']['guildspeak_ts_bodyalnkcolor'], 'TICKERREFRESH' => $tickerrefresh, 'TICKERMARG' => $tickermarg));
    $roster->tpl->set_filenames(array('ts_style' => $addon['basename'] . '/tpl_style.html'));
    $roster->tpl->display('ts_style');
    if ($addon['config']['guildspeak_ts_showgroups'] == '1') {
        header('location: ' . makelink('util-guildspeak-group'));
    } else {
        header('location: ' . makelink('util-guildspeak-listing'));
    }
} elseif ($addon['config']['guildspeak_server_mode'] == 0) {
    if ($addon['config']['guildspeak_vent_mode'] == 1) {
        include $addon['inc_dir'] . 'ventrilostatus.php';
        include $addon['inc_dir'] . 'ventrilodisplay.php';
        // Set Ventrilo status settings
        $vstat = new CVentriloStatus();
        $vstat->m_cmdprog = $addon['config']['guildspeak_vent_prog'];
        // Adjust accordingly.
        $vstat->m_cmdcode = $addon['config']['guildspeak_vent_code'];
        // Detail mode.
        $vstat->m_cmdhost = $addon['config']['guildspeak_vent_host'];
        // Assume ventrilo server on same machine.
        $vstat->m_cmdport = $addon['config']['guildspeak_vent_port'];
        // Port to be statused.
        $vstat->m_cmdpass = $addon['config']['guildspeak_vent_pass'];
        // Status password if necessary.
        $rc = $vstat->Request();
        if ($rc) {
            roster_die("CVentriloStatus->Request() failed.<br>\n<strong>{$vstat->m_error}</strong><br>\n", "GuildSpeak Error", "sred");
        }
        // Create ventrilo web link
Exemplo n.º 5
0
      div {font-family:arial; color:black; font-size: 8pt; line-height:14px;}
      .chnl{font-weight:bold; font-style=normal;}
      .chnl_pwd {font-weight:bold; font-style=normal;}
      .sub_chnl{font-weight:bold; font-style=normal;}
      .sub_chnl_pwd {font-weight:bold; font-style=normal;}
      .members {font-weight:normal; font-style=normal; color: blue}
      -->
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  </head>
  <body>

<?php 
include "ventrilostatus.php";
include "ventrilodisplay_ex1.php";
$stat = new CVentriloStatus();
$stat->m_cmdprog = "C:/Storage/Web/Online/roster/addons/ventstatus/ventrilo_status";
// Adjust accordingly.
$stat->m_cmdcode = "2";
// Detail mode.
$stat->m_cmdhost = "127.0.0.1";
// Assume ventrilo server on same machine.
$stat->m_cmdport = "3784";
// Port to be statused.
$stat->m_cmdpass = "";
// Status password if necessary.
$rc = $stat->Request();
if ($rc) {
    echo "CVentriloStatus->Request() failed. <strong>{$stat->m_error}</strong><br><br>\n";
}
$name = $stat->m_name;
Exemplo n.º 6
0
    <p>
      Learn more about how to use <strong>Ventrilo</strong> <a href="http://www.ventrilo.com/setup.php">here</a>! A list of FAQs is also available <a href="http://www.ventrilo.com/faq.php">here</a>!
    </p>
  </div>
  
  <div class="panel panel-primary">
    <div class="panel-heading">Ventrilo Server Status</div>
    <div class="panel-body">
      <!-- <p>Click <a href="http://www.ventrilo.com/status.php?hostname=bodom0015.game-server.cc&port=3784">here</a> to check the status of this Ventrilo server.</p> -->
<?php 
define('BASE_PATH', 'D:/XAMPP/htdocs/ventrilo');
require_once BASE_PATH . "/ventrilostatus.php";
require_once BASE_PATH . "/ventriloinfo_ex1.php";
require_once BASE_PATH . "/ventrilodisplay_ex1.php";
require_once BASE_PATH . "/ventrilodisplay_ex2.php";
$stat = new CVentriloStatus();
$stat->m_cmdprog = "ventrilo_status.exe";
// Adjust accordingly.
$stat->m_cmdcode = "2";
// Detail mode.
$stat->m_cmdhost = "127.0.0.1";
// Assume ventrilo server on same machine.
$stat->m_cmdport = "3784";
// Port to be statused.
$stat->m_cmdpass = "******";
// Status password if necessary.
$rc = $stat->Request();
if ($rc) {
    echo "CVentriloStatus->Request() failed. <strong>{$stat->m_error}</strong><br><br>\n";
}
echo "<center><table width=\"50%\" border=\"0\">\n";
Exemplo n.º 7
0
        die('no template');
    }
    foreach ($array as $value => $code) {
        $tpl = str_replace("[" . $value . "]", $code, $tpl);
    }
    return $tpl;
}
$db->query("SELECT addr, queryPort, password FROM hlstats_Servers_VoiceComm WHERE serverId={$veId}");
$s = $db->fetch_array();
$uip = $s['addr'];
$port = $s['queryPort'];
$password = $s['password'];
if (strlen($password < 1)) {
    $password = '';
}
$stat = new CVentriloStatus();
$stat->m_cmdcode = 2;
// Detail mode.
$stat->m_cmdhost = $uip;
// Assume ventrilo server on same machine.
$stat->m_cmdport = $port;
// Port to be statused.
$stat->m_cmdpass = $password;
// Status password if necessary.
$rc = $stat->Request();
if ($rc) {
    error("No Ventrilo", 1);
    echo "CVentriloStatus->Request() failed. <strong>{$stat->m_error}</strong><br><br>\n";
} else {
    $name = $stat->m_name;
    $os = $stat->m_platform;