Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: fantazy sport

Parašė cropp· 2013 Gru. 8 12:12:32
#1

Sveiki, reikia jūsų pagalbos turiu modą ant v6 fusioną jį pasiredagavęs pasileidau ant v7, tačiau nerodo vienos užklausos. Iš pradžių rodo fantasy sport ir latest game opentable, paspaudžius ant komandų nieko neišmeta

<a href='".FUSION_SELF."?game_id=".$data['game_id']."'>".$guest['team_name']." vs. ".$home['team_name']."</a>

, o turėtų išmesti šią dalį,



redirect(FUSION_SELF."?game_id=".$data['game_id']."&st=b");

} elseif(isset($game_id) && is_numeric($game_id)){

if($st == "b") echo "<b>Your bet was placed</b><br><br>";

opentable("Fantasy Sportsss");

$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_games WHERE game_id='$game_id'");

if(!dbrows($result)) fallback(FUSION_SELF);

$data = dbarray($result);

$guest = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_guest']."'"));

$home = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_home']."'"));

echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";

echo "<td>Namu Komanda:</td><td><a href='".FUSION_SELF."?team_id=".$home['team_id']."'>".$home['team_name']."</a></td></tr>";

echo "<tr>\n";

echo "<td>Sveciu Komanda:</td><td><a href='".FUSION_SELF."?team_id=".$guest['team_id']."'>".$guest['team_name']."</a></td></tr>";

echo "<tr>\n";

echo "<td>Laikas:</td><td>".$data['game_time']."</td></tr>";

echo "<tr>\n";

if($data['game_winner']){

$winner = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_winner']."'"));

echo "<td>Nugaletojas:</td><td>".$winner['team_name']."</td></tr>";

echo "<tr>\n";

}

echo "<td>Pagrindinis Laimejimas:</td><td>";

$jp = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_jackpot WHERE jackpot_game='".$data['game_id']."'"));

echo $jp['jackpot_jackpot']." pts.";

echo "</td></tr>";

echo "<tr>\n";

echo "</table>";

closetable();

if(iMEMBER){

tablebreak();

opentable("Bet");

if(!$data['game_winner']){

$ha = dbquery("SELECT * FROM ".DB_PREFIX."fs_bets WHERE bet_user='".$userdata['user_id']."' AND bet_game='".$data['game_id']."'");

if(dbrows($ha)) $had = dbarray($ha);

echo "<center><form action='".FUSION_SELF."' method='post'>";

echo "<input type='submit' name='guest' class='textbox' value='Bet 20pts on Guest";

if($had['bet_bet'] == $data['game_guest']) echo " &radic;";

if($had) echo "' disabled='true";

echo "'> ";

echo "<input type='hidden' name='guest_id' value='".$data['game_guest']."'>";

echo "<input type='submit' name='home' class='textbox' value='La˛ybai 20tašku Namu Komandai";

if($had['bet_bet'] == $data['game_home']) echo " &radic;";

if($had) echo "' disabled='true";

echo "'>";

echo "<input type='hidden' name='home_id' value='".$data['game_home']."'>";

echo "<input type='hidden' name='game_id' value='".$data['game_id']."'>";

echo "</form></center>";

} else {

echo "Statyti u˛drausta, laimetojas paskelbtas.";

}

closetable();

}




<?php
/*---------------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| <a href='http://www.php-fusion.co.uk/' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk/</span></a>
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit <a href='http://gnu.org' target='_blank'><span style='color:005C5B'>http://gnu.org</span></a>
+----------------------------------------------------*/
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
 
if(isset($_POST['home_id']) && is_numeric($_POST['home_id']) && isset($_POST['guest_id']) && is_numeric($_POST['guest_id']) && isset($_POST['game_id']) && is_numeric($_POST['game_id'])){
$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_games WHERE game_id='".$_POST['game_id']."'");
if(!dbrows($result)) fallback(FUSION_SELF);
$data = dbarray($result);
if($_POST['guest']) $bet = $_POST['guest_id'];
if($_POST['home']) $bet = $_POST['home_id'];
$haha = dbquery("UPDATE ".DB_PREFIX."users SET user_points=user_points-20 WHERE user_id='".$userdata['user_id']."'");
$haha = dbquery("UPDATE ".DB_PREFIX."fs_jackpot SET jackpot_jackpot=jackpot_jackpot+20 WHERE jackpot_game='".$data['game_id']."'");
$query = dbquery("INSERT INTO ".DB_PREFIX."fs_bets VALUES('', '".$data['game_sport']."', '".$data['game_id']."', '".$userdata['user_id']."', '$bet')");
redirect(FUSION_SELF."?game_id=".$data['game_id']."&st=b");
} elseif(isset($game_id) && is_numeric($game_id)){
	if($st == "b") echo "<b>Your bet was placed</b><br><br>";
	opentable("Fantasy Sportsss");
	$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_games WHERE game_id='$game_id'");
	if(!dbrows($result)) fallback(FUSION_SELF);
	$data = dbarray($result);
	$guest = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_guest']."'"));
	$home = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_home']."'"));
	echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
	echo "<td>Namu Komanda:</td><td><a href='".FUSION_SELF."?team_id=".$home['team_id']."'>".$home['team_name']."</a></td></tr>";
	echo "<tr>\n";
	echo "<td>Sveciu Komanda:</td><td><a href='".FUSION_SELF."?team_id=".$guest['team_id']."'>".$guest['team_name']."</a></td></tr>";
	echo "<tr>\n";
	echo "<td>Laikas:</td><td>".$data['game_time']."</td></tr>";
	echo "<tr>\n";
	if($data['game_winner']){
	$winner = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_winner']."'"));
	echo "<td>Nugaletojas:</td><td>".$winner['team_name']."</td></tr>";
	echo "<tr>\n";
	}
	echo "<td>Pagrindinis Laimejimas:</td><td>";
	$jp = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_jackpot WHERE jackpot_game='".$data['game_id']."'"));
	echo $jp['jackpot_jackpot']." pts.";
	echo "</td></tr>";
	echo "<tr>\n";
	echo "</table>";
	closetable();
	if(iMEMBER){
		tablebreak();
		opentable("Bet");
		if(!$data['game_winner']){
			$ha = dbquery("SELECT * FROM ".DB_PREFIX."fs_bets WHERE bet_user='".$userdata['user_id']."' AND bet_game='".$data['game_id']."'");
			if(dbrows($ha)) $had = dbarray($ha);
			echo "<center><form action='".FUSION_SELF."' method='post'>";
			echo "<input type='submit' name='guest' class='textbox' value='Bet 20pts on Guest";
			if($had['bet_bet'] == $data['game_guest']) echo " &radic;";
			if($had) echo "' disabled='true";
			echo "'> ";
			echo "<input type='hidden' name='guest_id' value='".$data['game_guest']."'>";
			echo "<input type='submit' name='home' class='textbox' value='La˛ybai 20tašku Namu Komandai";
			if($had['bet_bet'] == $data['game_home']) echo " &radic;";
			if($had) echo "' disabled='true";
			echo "'>";
			echo "<input type='hidden' name='home_id' value='".$data['game_home']."'>";
			echo "<input type='hidden' name='game_id' value='".$data['game_id']."'>";
			echo "</form></center>";
		} else {
			echo "Statyti u˛drausta, laimetojas paskelbtas.";
		}
		closetable();
	}	
 
} elseif(isset($team_id) && is_numeric($team_id)){
 
	$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_games WHERE game_home='$team_id' OR game_guest='$team_id'");
	opentable("Fantasy Sports");
	if(dbrows($result)){
 
		$counter = 0; $columns = 2;
		echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
		while ($data = dbarray($result)) {
			$guest = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_guest']."'"));
			$home = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_home']."'"));
			if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
			echo "<td align='center' valign='top' width='50%'><a href='".FUSION_SELF."?game_id=".$data['game_id']."'>".$guest['team_name']." vs. ".$home['team_name']."</a>";
			echo "</td>\n";
			$counter++;
		}
		echo "</tr>\n</table>\n";
 
	} else {
 
		echo "<center>Nera jokiu rungtyniu su šia komanda</center>";
 
	}
	closetable();
 
} elseif(isset($sport_id) && is_numeric($sport_id)){
 
	$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_sport='$sport_id'");
	opentable("Fantasy Sports");
	if(dbrows($result)){
 
		$counter = 0; $columns = 2;
		echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
		while ($data = dbarray($result)) {
			if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
			echo "<td align='center' valign='top' width='50%'><a href='".FUSION_SELF."?team_id=".$data['team_id']."'>".$data['team_name']."</a>";
			echo "</td>\n";
			$counter++;
		}
		echo "</tr>\n</table>\n";
 
	} else {
 
		echo "<center>Nera jokiu komandu šioje kategorijoje.</center>";
 
	}
	closetable();
 
} else {
 
	$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_sports");
	opentable("Fantasy Sports");
	if(dbrows($result)){
 
		$counter = 0; $columns = 2;
		echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
		while ($data = dbarray($result)) {
			if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
			echo "<td align='center' valign='top' width='50%'>";
			echo "<img src='icons/".$data['sport_icon']."'> ";
			echo "<a href='".FUSION_SELF."?sport_id=".$data['sport_id']."'>".$data['sport_name']."</a>";
			echo "</td>\n";
			$counter++;
		}
		echo "</tr>\n</table>\n";
 
	} else {
 
		echo "<center>Nera jokiu sporto kategoriju</center>";
 
	}
	closetable();
 
}
 
tablebreak();
opentable("Latest Games");
if(isset($sport_id) && is_numeric($sport_id)) $game = "WHERE game_sport='$sport_id'";
if(isset($team_id) && is_numeric($team_id)) $game = "WHERE game_home='$team_id'";
$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_games ".$game." ORDER BY game_id DESC");
if(dbrows($result)){
 
	$counter = 0; $columns = 1;
	echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
	while ($data = dbarray($result)) {
		$guest = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_guest']."'"));
		$home = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_home']."'"));
		if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
		echo "<td align='center' valign='top' width='50%'><a href='".FUSION_SELF."?game_id=".$data['game_id']."'>".$guest['team_name']." vs. ".$home['team_name']."</a>";
		echo "</td>\n";
		$counter++;
	}
	echo "</tr>\n</table>\n";
 
} else {
 
	echo "<center>Nera jokiu artejanciu rungtyniu</center>";
 
}
closetable();
 
require_once THEMES."templates/footer.php";
?>

Parašė mNm.· 2013 Gru. 8 15:12:07
#2

error nemeta jokiu?

Parašė cropp· 2013 Gru. 8 15:12:05
#3

nea, tiesiog paspaudi ant rungtynių, ir rodo tą patį vaizdą, o turi perjungti į kitą visai.

Parašė mNm.· 2013 Gru. 8 15:12:13
#4

pvz pamegink tiesiogini linka. uzeik paprasciausiai i adresas.lt/modas.php?game_id=1 ar ten koks kitas id veikiantis aisku ir ar rodo ka nors

Redagavo mNm.· 2013 Gru. 8 15:12:09

Parašė cropp· 2013 Gru. 8 15:12:37
#5

nerodo, rodo tą patį veiksmą koks buvo nuo praždių,
/fantasy_sports_panel/fantasy_sports.php einu spaudžiu ant rungtynių linkas pasikeičia /fantasy_sports_panel/fantasy_sports.php?game_id=1 bet vistiek tą patį rodo.... huj žina

o turi šią dalį rodyti..


redirect(FUSION_SELF."?game_id=".$data['game_id']."&st=b");
 
} elseif(isset($game_id) && is_numeric($game_id)){
 
if($st == "b") echo "<b>Your bet was placed</b><br><br>";
 
opentable("Fantasy Sportsss");
 
$result = dbquery("SELECT * FROM ".DB_PREFIX."fs_games WHERE game_id='$game_id'");
 
if(!dbrows($result)) fallback(FUSION_SELF);
 
$data = dbarray($result);
 
$guest = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_guest']."'"));
 
$home = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_home']."'"));
 
echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
 
echo "<td>Namu Komanda:</td><td><a href='".FUSION_SELF."?team_id=".$home['team_id']."'>".$home['team_name']."</a></td></tr>";
 
echo "<tr>\n";
 
echo "<td>Sveciu Komanda:</td><td><a href='".FUSION_SELF."?team_id=".$guest['team_id']."'>".$guest['team_name']."</a></td></tr>";
 
echo "<tr>\n";
 
echo "<td>Laikas:</td><td>".$data['game_time']."</td></tr>";
 
echo "<tr>\n";
 
if($data['game_winner']){
 
$winner = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_teams WHERE team_id='".$data['game_winner']."'"));
 
echo "<td>Nugaletojas:</td><td>".$winner['team_name']."</td></tr>";
 
echo "<tr>\n";
 
}
 
echo "<td>Pagrindinis Laimejimas:</td><td>";
 
$jp = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."fs_jackpot WHERE jackpot_game='".$data['game_id']."'"));
 
echo $jp['jackpot_jackpot']." pts.";
 
echo "</td></tr>";
 
echo "<tr>\n";
 
echo "</table>";
 
closetable();
 
if(iMEMBER){
 
tablebreak();
 
opentable("Bet");
 
if(!$data['game_winner']){
 
$ha = dbquery("SELECT * FROM ".DB_PREFIX."fs_bets WHERE bet_user='".$userdata['user_id']."' AND bet_game='".$data['game_id']."'");
 
if(dbrows($ha)) $had = dbarray($ha);
 
echo "<center><form action='".FUSION_SELF."' method='post'>";
 
echo "<input type='submit' name='guest' class='textbox' value='Bet 20pts on Guest";
 
if($had['bet_bet'] == $data['game_guest']) echo " &radic;";
 
if($had) echo "' disabled='true";
 
echo "'> ";
 
echo "<input type='hidden' name='guest_id' value='".$data['game_guest']."'>";
 
echo "<input type='submit' name='home' class='textbox' value='La˛ybai 20tašku Namu Komandai";
 
if($had['bet_bet'] == $data['game_home']) echo " &radic;";
 
if($had) echo "' disabled='true";
 
echo "'>";
 
echo "<input type='hidden' name='home_id' value='".$data['game_home']."'>";
 
echo "<input type='hidden' name='game_id' value='".$data['game_id']."'>";
 
echo "</form></center>";
 
} else {
 
echo "Statyti u˛drausta, laimetojas paskelbtas.";
 
}
 
closetable();
 
} 

Redagavo cropp· 2013 Gru. 8 15:12:52