Thu Oct 05, 2006 6:14 am
Thu Oct 05, 2006 6:16 am
Thu Oct 05, 2006 6:18 am
Thu Oct 05, 2006 7:08 am
Thu Oct 05, 2006 7:12 am
djmakaveli wrote:Otherwise every game people save they will have to delete 12-15.
Thu Oct 05, 2006 8:00 am
Thu Oct 05, 2006 8:29 am
Thu Oct 05, 2006 9:04 am
Thu Oct 05, 2006 9:11 am
Thu Oct 05, 2006 9:13 am
Thu Oct 05, 2006 9:16 am
Thu Oct 05, 2006 9:30 am
Thu Oct 05, 2006 9:36 am
Thu Oct 05, 2006 9:41 am
Thu Oct 05, 2006 12:35 pm
chuzo wrote:djmakaveli wrote:Otherwise every game people save they will have to delete 12-15.
Why?I think you could simply ignore this characters in your php (or another language) script.
<?
$fp = fopen("$form_data1", "r");
$flatfile = fread($fp, filesize("$form_data1"));
fclose($fp);
$spaces = str_repeat(' ', 10);
$new_str = str_replace('/', $spaces, $flatfile);
$new_str1 = str_replace('-', '.000', $new_str);
$fp = fopen("$form_data1", "w+");
fwrite($fp, $new_str1);
fclose($fp);
?>
<?
$fp = fopen("$form_data2", "r");
$flatfile = fread($fp, filesize("$form_data2"));
fclose($fp);
$spaces = str_repeat(' ', 10);
$new_str = str_replace('/', $spaces, $flatfile);
$new_str1 = str_replace('-', '.000', $new_str);
$fp = fopen("$form_data2", "w+");
fwrite($fp, $new_str1);
fclose($fp);
?>
<?
require('connect.php');
require('setting.php');
$season_id=1;
$league_id=1;
mysql_select_db("True2006",$db);
$insertSQL ="INSERT INTO boxscore (season_id, id, team, score, opponent, score1) VALUES ('$season_id', '$game', '$team1', '$score', '$team2','$score1')";
$Result1 = mysql_query($insertSQL, $db) or die(mysql_error());
$query_game = "SELECT id FROM boxscore ORDER BY id DESC LIMIT 1";
$game = mysql_query($query_game, $db) or die(mysql_error());
$row_game = mysql_fetch_assoc($game);
$totalRows_game = mysql_num_rows($game);
$game=$row_game['id'] ;
$team1=$_POST['team1'];
$team2=$_POST['team2'];
$score=$_POST['score'];
$score1=$_POST['score1'];
$query_dw = "SELECT * FROM team WHERE team_name='$team1'";
$dw = mysql_query($query_dw, $db) or die(mysql_error());
$row_dw = mysql_fetch_assoc($dw);
$totalRows_dw = mysql_num_rows($dw);
$query_da = "SELECT * FROM team WHERE team_name='$team2'";
$da = mysql_query($query_da, $db) or die(mysql_error());
$row_da = mysql_fetch_assoc($da);
$totalRows_da = mysql_num_rows($da);
echo $row_dw['Division'];
echo $row_da['Division'];
$division1=$row_dw['Division'];
$division2=$row_da['Division'];
//assuming $points1 are points of $teams[0]['team_id']
if ($score > $score1) //team1 won
{
mysql_query("UPDATE team SET dw=dw+1 WHERE team_name='$team1' AND Division='$division2'");
mysql_query("UPDATE team SET dl=dl+1 WHERE team_name='$team2' AND Division='$division1'");
}
else //team2 won
{
mysql_query("UPDATE team SET dw=dw+1 WHERE team_name='$team2' AND Division='$division1'");
mysql_query("UPDATE team SET dl=dl+1 WHERE team_name='$team1' AND Division='$division2'");
}
//assuming $points1 are points of $teams[0]['team_id']
if ($score > $score1) //team1 won
{
mysql_query("UPDATE team SET wins=wins+1 WHERE team_name='$team1'");
mysql_query("UPDATE team SET aw=aw+1 WHERE team_name='$team1'");
mysql_query("UPDATE team SET losses=losses+1 WHERE team_name='$team2'");
mysql_query("UPDATE team SET hl=hl+1 WHERE team_name='$team2'");
}
else //team2 won
{
mysql_query("UPDATE team SET wins=wins+1 WHERE team_name='$team2'");
mysql_query("UPDATE team SET hw=hw+1 WHERE team_name='$team2'");
mysql_query("UPDATE team SET losses=losses+1 WHERE team_name='$team1'");
mysql_query("UPDATE team SET al=al+1 WHERE team_name='$team1'");
}
$query_cw = "SELECT * FROM team WHERE team_name='$team1'";
$cw = mysql_query($query_cw, $db) or die(mysql_error());
$row_cw = mysql_fetch_assoc($cw);
$totalRows_cw = mysql_num_rows($cw);
$query_ca = "SELECT * FROM team WHERE team_name='$team2'";
$ca = mysql_query($query_ca, $db) or die(mysql_error());
$row_ca = mysql_fetch_assoc($ca);
$totalRows_ca = mysql_num_rows($ca);
echo $row_cw['Conference'];
echo $row_ca['Conference'];
$Conference1=$row_cw['Conference'];
$Conference2=$row_ca['Conference'];
//assuming $points1 are points of $teams[0]['team_id']
if ($score > $score1) //team1 won
{
mysql_query("UPDATE team SET cw=cw+1 WHERE team_name='$team1' AND Conference='$Conference2'");
mysql_query("UPDATE team SET cl=cl+1 WHERE team_name='$team2' AND Conference='$Conference1'");
}
else //team2 won
{
mysql_query("UPDATE team SET cw=cw+1 WHERE team_name='$team2' AND Conference='$Conference1'");
mysql_query("UPDATE team SET cl=cl+1 WHERE team_name='$team1' AND Conference='$Conference2'");
}
?>
<?
$fp = fopen("$form_data1", "r");
$flatfile = fread($fp, filesize("$form_data1"));
fclose($fp);
for ($i = 1; $i <= 10; $i++) {
$flatfile = ereg_replace(" {3}", " ", $flatfile);
}
$csv = ereg_replace(" {2}", ", ", $flatfile);
$csv1 = str_replace(chr(10), chr(10)."$season_id,", $csv);
$csv2 = str_replace(chr(10), chr(10)."$league_id,", $csv1);
$temp1 = str_replace(chr(10), chr(10)."$team2,", $csv2);
$temp = str_replace(chr(10), chr(10)."$team1,", $temp1);
$fp = fopen("$form_data1", "w+");
fwrite($fp, $temp);
fclose($fp);
$fp = fopen("$form_data1", "w+");
fwrite($fp, $temp);
fclose($fp);
$game_id_sql = "SELECT MAX(id) AS game_id FROM boxscore";
$game_result = mysql_query($game_id_sql);
$game_row = mysql_fetch_assoc($game_result);
$game_id = ",$game";
$data2 = file("$form_data1");
for($i=0;$i<count($data2);$i++)
{
$data2[$i] = "$game_id, " . $data2[$i];
}
$data2 = implode('\n\r', $data2);
$fp = fopen("$form_data1", "w+");
fwrite($fp, $data2);
fclose($fp);
$fp = fopen("$form_data1", "rb");
$csvdata = fread($fp, filesize("$form_data1"));
fclose($fp);
$lines = explode('\n\r',$csvdata);
unset($lines[count($lines)-1]);
for($i=5;$i<count($lines);$i++)
{
$separated[$i-5] = explode(',',$lines[$i]);
$sql = 'INSERT INTO stats VALUES(NULL';
for($x=1;$x<=27;$x++)
{
$sql .= ',"'.$separated[$i-5][$x].'"';
}
$sql .= ')';
echo $sql.'<br>';
$result = mysql_query($sql) or die(mysql_error());
}?>
<?
$fp = fopen("$form_data2", "r");
$flatfile = fread($fp, filesize("$form_data2"));
fclose($fp);
for ($i = 1; $i <= 10; $i++) {
$flatfile = ereg_replace(" {3}", " ", $flatfile);
}
$csv = ereg_replace(" {2}", ", ", $flatfile);
$csv1 = str_replace(chr(10), chr(10)."$season_id,", $csv);
$csv2 = str_replace(chr(10), chr(10)."$league_id,", $csv1);
$temp1 = str_replace(chr(10), chr(10)."$team1,", $csv2);
$temp = str_replace(chr(10), chr(10)."$team2,", $temp1);
$fp = fopen("$form_data2", "w+");
fwrite($fp, $temp);
fclose($fp);
$fp = fopen("$form_data2", "w+");
fwrite($fp, $temp);
fclose($fp);
$game_id_sql = "SELECT MAX(id) AS game_id FROM boxscore";
$game_result = mysql_query($game_id_sql);
$game_row = mysql_fetch_assoc($game_result);
$game_id = ",$game";
$data2 = file("$form_data2");
for($i=0;$i<count($data2);$i++)
{
$data2[$i] = "$game_id, " . $data2[$i];
}
$data2 = implode('\n\r', $data2);
$fp = fopen("$form_data2", "w+");
fwrite($fp, $data2);
fclose($fp);
$fp = fopen("$form_data2", "rb");
$csvdata = fread($fp, filesize("$form_data1"));
fclose($fp);
$lines = explode('\n\r',$csvdata);
unset($lines[count($lines)-1]);
for($i=5;$i<count($lines);$i++)
{
$separated[$i-5] = explode(',',$lines[$i]);
$sql = 'INSERT INTO stats VALUES(NULL';
for($x=1;$x<=27;$x++)
{
$sql .= ',"'.$separated[$i-5][$x].'"';
}
$sql .= ')';
echo $sql.'<br>';
$result = mysql_query($sql) or die(mysql_error());
}
mysql_query("UPDATE stats SET team = 'Atlanta' WHERE team = ' Atlanta'");
mysql_query("UPDATE stats SET team = 'Boston' WHERE team = ' Boston'");
mysql_query("UPDATE stats SET team = 'Cleveland' WHERE team = ' Cleveland'");
mysql_query("UPDATE stats SET team = 'Chicago' WHERE team = ' Chicago'");
mysql_query("UPDATE stats SET team = 'Dallas' WHERE team = ' Dallas'");
mysql_query("UPDATE stats SET team = 'Denver' WHERE team = ' Denver'");
mysql_query("UPDATE stats SET team = 'Detroit' WHERE team = ' Detroit'");
mysql_query("UPDATE stats SET team = 'Golden State' WHERE team = ' Golden State'");
mysql_query("UPDATE stats SET team = 'Houston' WHERE team = ' Houston'");
mysql_query("UPDATE stats SET team = 'Indiana' WHERE team = ' Indiana'");
mysql_query("UPDATE stats SET team = 'LA Clippers' WHERE team = ' LA Clippers'");
mysql_query("UPDATE stats SET team = 'LA Lakers' WHERE team = ' LA Lakers'");
mysql_query("UPDATE stats SET team = 'Memphis' WHERE team = ' Memphis'");
mysql_query("UPDATE stats SET team = 'Miami' WHERE team = ' Miami'");
mysql_query("UPDATE stats SET team = 'Milwaukee' WHERE team = ' Milwaukee'");
mysql_query("UPDATE stats SET team = 'Minnesota' WHERE team = ' Minnesota'");
mysql_query("UPDATE stats SET team = 'Philadelphia' WHERE team = ' Philadelphia'");
mysql_query("UPDATE stats SET team = 'New Jersey' WHERE team = ' New Jersey'");
mysql_query("UPDATE stats SET team = 'New York' WHERE team = ' New York'");
mysql_query("UPDATE stats SET team = 'New Orleans' WHERE team = ' New Orleans'");
mysql_query("UPDATE stats SET team = 'Sacramento' WHERE team = ' Sacramento'");
mysql_query("UPDATE stats SET team = 'San Antonio' WHERE team = ' San Antonio'");
mysql_query("UPDATE stats SET team = 'Seattle' WHERE team = ' Seattle'");
mysql_query("UPDATE stats SET team = 'Portland' WHERE team = ' Portland'");
mysql_query("UPDATE stats SET team = 'Phoenix' WHERE team = ' Phoenix'");
mysql_query("UPDATE stats SET team = 'Utah' WHERE team = ' Utah'");
mysql_query("UPDATE stats SET team = 'Toronto' WHERE team = ' Toronto'");
mysql_query("UPDATE stats SET team = 'Charlotte' WHERE team = ' Charlotte'");
mysql_query("UPDATE stats SET team = 'Washington' WHERE team = ' Washington'");
mysql_query("UPDATE stats SET team = 'Orlando' WHERE team = ' Orlando'");
mysql_query("UPDATE stats SET team = 'Toronto' WHERE team = ' Toronto'");
mysql_query("DELETE FROM stats WHERE name=' ' ");
mysql_query("DELETE FROM stats WHERE Minutes='0' ");
mysql_query('REPLACE INTO fullstats SELECT season_id, id, name,
SUM(points) AS Points,
SUM(Minutes) AS Minutes,
SUM(FGM) AS FGM,
SUM(FGA) AS FGA,
SUM(threepm) AS threepm,
SUM(threepa) AS threepa,
SUM(FTM) AS FTM,
SUM(FTA) AS FTA,
SUM(Orebounds) AS Orebounds,
SUM(Drebounds) AS Drebounds,
SUM(Orebounds)+SUM(Drebounds) AS Rebounds,
SUM(assist) AS Assist ,
SUM(block) AS block,
SUM(Steal) AS Steal,
SUM(Turnovers) AS turnovers,
SUM(Fouls) AS Fouls,
COUNT(name) AS gps
FROM stats WHERE minutes>=1 GROUP BY name ');
?>
<div align="center">
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
window.location="http://www.truelegitballers.com/";
// End -->
</script>
Thu Oct 05, 2006 1:29 pm
Thu Oct 05, 2006 2:04 pm
Thu Oct 05, 2006 2:31 pm
Thu Oct 05, 2006 2:43 pm
Thu Oct 05, 2006 6:30 pm
gmamustang wrote:these screen isnt from nba 06? o_O
Thu Oct 05, 2006 7:19 pm
Num33Baller wrote:This truely shows how sad EA is.
Some guy in Spain released a patch for NBA Live before EA did.
Thu Oct 05, 2006 7:22 pm
Thu Oct 05, 2006 10:04 pm
Fri Oct 06, 2006 2:59 am
Fri Oct 06, 2006 3:15 am