TinyPortal

Development => Resources => Modules => Topic started by: alhaudhie on February 07, 2007, 05:51:05 AM

Title: Arcade Games Block
Post by: alhaudhie on February 07, 2007, 05:51:05 AM
can u help me...

see in halaqah.net

i have install

require('./Settings.php');

$top = highscore();
//echo "<pre>".print_r($top,true)."</pre>";

foreach($top as $temp){

echo"<table align=\"center\" width=\"100%\"><tr><td align=\"center\" class=\"smalltext\">{$temp['realName']}</td></tr>";
echo "<tr><td align=\"center\" class=\"smalltext\">{$temp['name']} - {$temp['score']}</td></tr><tr><td width=\"100%\"><hr></td></tr></table>";
}
function highscore($count = 5, $game = "", $cutoff = 0)
{
global $link,$db_prefix,$boarddir,$boardurl;

if($game == "")
$query = "SELECT * FROM {$db_prefix}games,{$db_prefix}games_high,{$db_prefix}members WHERE {$db_prefix}games.game={$db_prefix}games_high.game AND {$db_prefix}games_high.member={$db_prefix}members.ID_MEMBER ORDER BY score DESC LIMIT 0,{$count}";
else
$query = "SELECT * FROM {$db_prefix}games,{$db_prefix}games_high,{$db_prefix}members WHERE {$db_prefix}games.game={$db_prefix}games_high.game AND {$db_prefix}games_high.member={$db_prefix}members.ID_MEMBER AND {$db_prefix}games.game='{$game}' ORDER BY score DESC LIMIT 0,{$count}";
$res = mysql_query($query) or die(mysql_error());
$top = array();
while($x = mysql_fetch_array($res))
{
$x['score'] = (string)$x['score'];
$top[] = $x;

}
return $top;
}


now i cannot do anything....
where can i delete this file in my ftp/database
Title: Re: Arcade Games Block
Post by: JPDeni on February 07, 2007, 06:25:24 AM
I put your code in a bbc code "wrapper" so it was readable.

You said you "installed" it. How did you install it? Is it in a block? Is it in a separate php file? Where is it?

You saod "now I cannot do anything". What do you mean. Do you get a blank page? Do you get an error message?

From looking at your site, I'm going to guess that this is in the block that has the title "games" on the left side that says "Table 'halaqah_smf.halaqah_games' doesn't exist". If I'm right and you want to get rid of it, just go to your SMF admin and delete the block. If you ignored the repeated suggestions here and are showing the blocks while in the admin area, you'll have to access your database and fine your tp blocks table and delete the record from there. Then, go to your admin area in the TP settings and select the option to hide the blocks while in the admin area so you don't run into this problem again.

But I could be wrong and you could be talking about something completely different. If so, you'll need to explain your problem more explicitly before anyone can help you.