Phpnuke 7.0 and babstats and Php nuke block

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Phpnuke 7.0 and babstats and Php nuke block
akid
CZ Newbie
akid has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Mar 22, 2004
0.00 posts per day
Posts: 8
Points: 568
   
Ok Im kinda new at this but you probably get that a lot.

I installed babstats on my root drive like it said to do

Then i installed a phpnuke server block that grabs information from the Babstats, at this site [ Register or login to view links on this board. ]

the stats upload fine to that link and some of the Informating gets transfered to the server block except the Map Img, I think it is becaus it is trying to load the map from the wrong directory on the site, Eg [ Register or login to view links on this board. ]


this is the code from the server block




if (eregi("block-BabstatsCHRONOS.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

require_once("mainfile.php");
global $prefix, $dbi, $bgcolor3;

$time = time();
$offline = $time - 120;

$sql = sql_query("SELECT * FROM chronos_servers WHERE time>$offline ORDER BY name", $dbi);
$content1 = "";

$servernum = sql_num_rows($sql, $dbi);
if ($servernum >= 1) {

    $content1 .= "<table width='100%' celspacing='1'>";

    while($result = sql_fetch_array($sql, $dbi)) {
        $players = "";
        $player_color = "";

        $codedmap = $result["map_name"];

        $result["server_name"] = htmlspecialchars(base64_decode($result["server_name"]));
        $result["map_name"]    = htmlspecialchars(base64_decode($result["map_name"]));
        $result[server_name] = ereg_replace('~[0-9]', '', $result[server_name]);
        $result[map_name] = ereg_replace('~[0-9]', '', $result[map_name]);

        if ($result["game_type"] == "Deathmatch") $game_type = "DM";
        if ($result["game_type"] == "Team Deathmatch") $game_type = "TDM";
        if ($result["game_type"] == "Team King of the Hill") $game_type = "TKOTH";
        if ($result["game_type"] == "Search and Destroy") $game_type = "S&D";
        if ($result["game_type"] == "Attack and Defend") $game_type = "A&D";
        if ($result["game_type"] == "Capture the Flag") $game_type = "CTF";
        if ($result["game_type"] == "Flagball") $game_type = "FB";

        $player_names   = explode("\n", $result["player_names"]);
          $player_teams   = explode("\n", $result["player_teams"]);
        $playercount = 1;     
        for($i = 0; $i < count($player_names); $i++) {
            $player_name = htmlspecialchars(base64_decode($player_names[$i]));
            $player_team = $player_teams[$i];

            if ($player_team == "Blue") $player_color = "#1796CB";
            if ($player_team == "Red") $player_color = "#E3553C";
            if ($player_team == "Yellow") $player_color = "yellow";
            if ($player_team == "Violet") $player_color = "violet";
            if ($player_team == "Green") $player_color = "#44DD44";
            if ($player_team == "None") $player_color = "#44DD44";
             
            if ($player_name == "SYSOP =422=") {
                $result[num_players]--;
            } else {
                $players .= "[<font color='".$player_color."'><b>".$player_name."</b></font>] ;; ;;";
                $playercount++;
            }
        }

        if(!$bg) {
            $bg = $bgcolor2;
        } elseif ($bg == $bgcolor2) {
            $bg = $bgcolor3;
        } elseif ($bg == $bgcolor3) {
            $bg = $bgcolor2;
        }
         
        $content1 .= "<tr><td align='center' bgcolor='$bg'>";
        $content1 .= "<a href='modules.php?name=Chronos&action=servers&id=".$result[id]."' class='special1'>" ;
        $content1 .= "<img src='images/Online.gif' alt='Online.gif' title='Online' border='0'><br>";
        $content1 .= "<b>".$result[server_name]."</b><br>";
        $sql2 = sql_query("select * from chronos_maps where name='$codedmap'", $dbi);
        $result2 = sql_fetch_array($sql2, $dbi);
        if ($result2["image"] && $servernum < 3) {
            $content1 .= "<img src='modules/Chronos/$result2[image]' alt='$result[map_name]' title='$result[map_name]' width='125' height='94' border='0'><br>";
        } else {
            $content1 .= $result[map_name]."<br>";
        }
        $content1 .= $result[game]." ;;(".$game_type.")<br>";
        $content1 .= $result[num_players]." of ".$result[max_players]."</a><br>";
        if ($result["player_names"] && $playercount > 1) { // && $servernum == 1
            $content1 .= "<MARQUEE behavior='scroll' align='center' direction='left' height='12' scrollamount='1' scrolldelay='20' onmouseover='this.stop()' onmouseout='this.start()'>"
                        ."<b>players online:</b> $players"
                        ."</MARQUEE>";
      
        }
        $content1 .= "</td></tr>";
    }


    $content1 .= "</table>";

}

if (!$content1) {
$content = "<br><center><a href='modules.php?name=Chronos'><img src='images/Offline.gif' alt=\"offline.gif\" title=\"Offline\" border='0'></a></center><br>";
} else {
$content = "<br>$content1<br>";
}
?>



is there any why I can link it to the correct place?


Back to top Reply with quote
#2   re: Phpnuke 7.0 and babstats and Php nuke block
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
WHere is it supposed to come from?

This is the link for it

$content1 .= "<a href='modules.php?name=Chronos&action=servers&id=".$result [id]."' class='special1'>" ;


There must be somewhere in the blocks where your designating the root address.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Phpnuke 7.0 and babstats and Php nuke block
akid
CZ Newbie
akid has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Mar 22, 2004
0.00 posts per day
Posts: 8
Points: 568
   
I think I figgured it out, Sorry for waisting your time.



Back to top Reply with quote
#4   re: Phpnuke 7.0 and babstats and Php nuke block
Recoil
CZ Addict
Recoil has been a member for over 20 year's 20 Year Member
usa.gif louisiana.gif
Occupation: Manager
Gender: Male
Fav. Sports Team: New Orleans
Website:
Status: Offline
Joined: Jan 17, 2004
0.06 posts per day
Posts: 427
Points: 8,650
   ICQ Number
What did u do to get it working? When I have an issue, I try to find a resolution without having to post, and if a topic ends like this, i have to post on the same issue.



Back to top Reply with quote
#5   re: Phpnuke 7.0 and babstats and Php nuke block
akid
CZ Newbie
akid has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Mar 22, 2004
0.00 posts per day
Posts: 8
Points: 568
   
I got a nuke version of Chronos and Used it

I think I got it from here.

[ Register or login to view links on this board.]



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum