Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Extirpator
New Member
New Member



Joined: Jul 07, 2006
Posts: 5

PostPosted: Sat Jul 08, 2006 3:52 pm Reply with quote

Code:
function VentriloDisplayEX1( &$stat, $name, $cid, $bgidx )

{
  $chan = $stat->ChannelFind( $cid );
 
  $content .= "          <li><strong>";
  $content .= "          <a href=\"ventrilo://xxx.nrgservers.net:xxx/servername=xxx&channelname=$name\">$name</a>";
  $content .= "          </strong>\n";
  $content .= "        <ul>\n";
 
  // Display Client for this channel.
 
  for ( $i = 0; $i < count( $stat->m_clientlist ); $i++ )
  {
        $client = $stat->m_clientlist[ $i ];
      
        if ( $client->m_cid != $cid )
         continue;
         
      $content .= "          <li>";

      $flags = "";
      
      if ( $client->m_admin )
         $flags .= "A";
         
      if ( $client->m_phan )
         $flags .= "P";
         
      if ( strlen( $flags ) )
         $content .= "\"$flags\"";
         
      $content .= $client->m_name;

      $content .= "</li>\n";
         
  }
 
  // Display sub-channels for this channel.

  for ( $i = 0; $i < count( $stat->m_channellist ); $i++ )
  {
        if ( $stat->m_channellist[ $i ]->m_pid == $cid )
      {
         $cn = $stat->m_channellist[ $i ]->m_name;
         
         VentriloDisplayEX1( $stat, $cn, $stat->m_channellist[ $i ]->m_cid, $bgidx + 1 );
      }
  }
 
  $content .= "        </ul>\n      </li>\n";
}


I have tried myself but only got the $client->m_name done..
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Sat Jul 08, 2006 4:58 pm Reply with quote

this isnt the full code right?
 
View user's profile Send private message
Extirpator







PostPosted: Sun Jul 09, 2006 3:39 am Reply with quote

full code.. somehow the function is not working.. Question
sorry.. im kinda new to php.. any help will be appreciated..

Code:
<?php


// This blocks anyone from accessing the file directly
    if (eregi("block-Ventrilo_Status.php",$_SERVER['PHP_SELF'])) {
   Header("Location: index.php");
   die();
    }

$content .= "<sc ript type=\"text/javascript\" src=\"./ventrilo/ventrilo_chan.js\"></scri pt>\n";
$content .= "<table width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n  <tr>\n";
include("./ventrilo/ventrilostatus.php");

function VentriloDisplayEX1( &$stat, $name, $cid, $bgidx )
{
  $chan = $stat->ChannelFind( $cid );
 
  $content .= "<li><strong>";
  $content .= "<a href=\"ventrilo://xxx:xxx/servername=xxx&channelname=$name\">$name</a>";
  $content .= "</strong>\n";
  $content .= "<ul>\n";
 
  // Display Client for this channel.
 
  for ( $i = 0; $i < count( $stat->m_clientlist ); $i++ )
  {
        $client = $stat->m_clientlist[ $i ];
      
        if ( $client->m_cid != $cid )
         continue;
         
      $content .= "<li>";

      $flags = "";
      
      if ( $client->m_admin )
         $flags .= "A";
         
      if ( $client->m_phan )
         $flags .= "P";
         
      if ( strlen( $flags ) )
         $content .= "\"$flags\"";
         
      $content .= $client->m_name;

      $content .= "</li>\n";
         
  }
 
  // Display sub-channels for this channel.

  for ( $i = 0; $i < count( $stat->m_channellist ); $i++ )
  {
        if ( $stat->m_channellist[ $i ]->m_pid == $cid )
      {
         $content .= $stat->m_channellist[ $i ]->m_name;
         
         VentriloDisplayEX1( $stat, $cn, $stat->m_channellist[ $i ]->m_cid, $bgidx + 1 );
      }
  }
 
  $content .= "</ul>\n</li>\n";
}

$stat = new CVentriloStatus;
$stat->m_cmdprog   = "/home/xxx/public_html/ventrilo/ventrilo_status";   // Adjust accordingly.
$stat->m_cmdcode   = "2";               
$stat->m_cmdhost   = "xxx";            // server IP or host name
$stat->m_cmdport   = "xxx";                  // Port to be statused.
$stat->m_cmdpass   = "";                     // Status password if necessary.

$rc = $stat->Request();
if ( $rc ) {
   $content .= "<td width=\"100%\" align=\"center\"><strong>$stat->m_error</strong></td>\n";
}

$content .= "<td width=\"100%\" align=\"center\"><b>$stat->m_clientcount/$stat->m_maxclients</b></td>\n";

//$name = $stat->m_name;
//if ( strlen( $stat->m_comment ) )
//   $name .= " ($stat->m_comment)";

$name = "Lobby";

$content .= "</tr>\n<tr>\n";
$content .= "<td width=\"100%\" align=\"left\">\n<ul id=\"ventrilo\">\n";
VentriloDisplayEX1( $stat, $name, $cid, $bgidx );
$content .= "</ul>\n";
$content .= "<scr ipt type=\"text/javascript\">initiate();</scr ipt>\n";
$content .= "</td>\n";
$content .= " </tr>\n</table>";

?>
 
hitwalker







PostPosted: Sun Jul 09, 2006 5:03 am Reply with quote

ive send a pm
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©