You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 53 guest(s) and 2 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - help with this block [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
HomerTheDragoon
Nuke Cadet
Nuke Cadet


Joined: Feb 26, 2006
Posts: 1


PostPosted: Fri Jul 21, 2006 7:48 pm Reply with quoteBack to top

Code:
<?

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2005 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (eregi("block-NewestReplays.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $admin, $user, $sitekey, $gfx_chk, $admin_file;

$db_hostname = '*****';
$db_username = '******************';
$db_password = '*******';
$db_replays  = '*********';

mysql_connect($db_hostname, $db_username, $db_password) or die ("<br>Can't Connect to Database");
@mysql_select_db($db_replays) or die ("<br>Cant select Database: ");

$query2="SELECT * FROM reps_table";
$result2=mysql_query($query2);
$num=mysql_numrows($result2);

$query="SELECT * FROM reps_table WHERE ID>='ID-5'";
$result=mysql_query($query);
$i=0;
while ($i < $num) {
$ID=mysql_result($result2,$i,"ID");
$gametype=mysql_result($result2,$i,"SpielModus");
$Player1=mysql_result($result2,$i,"Slot1name");
$Player2=mysql_result($result2,$i,"Slot2name");
$Player3=mysql_result($result2,$i,"Slot3name");
$Player4=mysql_result($result2,$i,"Slot4name");
$Player1race=mysql_result($result2,$i,"Slot1Rasse");
$Player2race=mysql_result($result2,$i,"Slot2Rasse");
$Player3race=mysql_result($result2,$i,"Slot3Rasse");
$Player4race=mysql_result($result2,$i,"Slot4Rasse");
if ($i>=$num-5) {
if ($gametype=="1on1")
{
echo "$Player1";
if ($Player1race=="N"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
} else if ($Player1race=="O"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
}else if ($Player1race=="U"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ud.gif">
<?
}else if ($Player1race=="H"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_hu.gif">
<?
}
echo "<br> vs<br>";
echo "$Player2";
if ($Player2race=="N"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
} else if ($Player2race=="O"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
}else if ($Player2race=="U"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ud.gif">
<?
}else if ($Player2race=="H"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_hu.gif">
<?
}
}else
{if ($gametype=="2on2"){
echo "$Player1";
if ($Player1race=="N"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
} else if ($Player1race=="O"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
}else if ($Player1race=="U"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ud.gif">
<?
}else if ($Player1race=="H"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_hu.gif">
<?
}
echo "<br>";
echo "$Player2";
if ($Player2race=="N"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
} else if ($Player2race=="O"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
}else if ($Player2race=="U"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ud.gif">
<?
}else if ($Player2race=="H"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_hu.gif">
<?
}
echo "<br> vs<br> $Player3";
if ($Player3race=="N"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
} else if ($Player3race=="O"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
}else if ($Player3race=="U"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ud.gif">
<?
}else if ($Player3race=="H"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_hu.gif">
<?
}
echo "<br>";
echo "$Player4";
if ($Player4race=="N"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
} else if ($Player4race=="O"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ne.gif">
<?
}else if ($Player4race=="U"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_ud.gif">
<?
}else if ($Player4race=="H"){
?>
<IMG SRC="http://clangg.com/replays/images/icons/tft_hu.gif">
<?
}
}
}

echo "<br> Type :  $gametype <br>";

?>
<a href="http://clangg.com/replays/reps.php?file=details_comments&id=<? echo $i; ?>">(Download)</a>
<?
echo "<br>-------------- ";
echo "<br>";
}
$i=$i+1;
}
mysql_close();

?>


How do make this work in a block? because it doesnt display inside it... Please help.
Find all posts by HomerTheDragoonView user's profileSend private message
chris-au
Elite Nuker
Elite Nuker


Joined: Jan 31, 2003
Posts: 717


PostPosted: Thu Aug 24, 2006 8:53 pm Reply with quoteBack to top

MOst likely that is because you use:

echo "etc":

That should be:

$content.="etc";

And if you do that you should start your script at the top with;

$contant="";

_________________
Chris
Find all posts by chris-auView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.179 Seconds - 347 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::