| 61 | $sql="select * from ".$football->prefix."teams where name = '".$name."'"; | = | 61 | $sql="select * from ".$football->prefix."teams where name = '".$name."'"; |
| 62 | $rs = $football->dbQuery($sql); | 62 | $rs = $football->dbQuery($sql); | |
| 63 | while($row = mysql_fetch_object($rs)) | 63 | while($row = mysql_fetch_object($rs)) | |
| 64 | { | 64 | { | |
| 65 | $id=$row->id; | 65 | $id=$row->id; | |
| 66 | } | 66 | } | |
| <> | 67 | |||
| 67 | return $id; | = | 68 | return $id; |
| 68 | } | 69 | } | |
| 69 | 70 | |||
| 70 | 71 | |||
| 71 | // call the xml_parser | 72 | // call the xml_parser | |
| 72 | xml_set_element_handler($xmlparser, "start_tag", "end_tag"); | 73 | xml_set_element_handler($xmlparser, "start_tag", "end_tag"); | |
| 137 | die($reason); | = | 138 | die($reason); |
| 138 | } | 139 | } | |
| 139 | } | 140 | } | |
| 140 | 141 | |||
| 141 | // release the parser | 142 | // release the parser | |
| 142 | xml_parser_free($xmlparser); | 143 | xml_parser_free($xmlparser); | |
| 143 | //require("weeks.php"); | <> | 144 | require("weeks.php"); |
| 144 | = | 145 | ||
| 145 | //Default to current week if none was specified. | 146 | //Default to current week if none was specified. | |
| 146 | 147 | |||
| 147 | //$week=$_GET['week']; | <> | 148 | $week=$_GET['week']; |
| 148 | //if (!is_numeric($week)) | 149 | if (!is_numeric($week)) | |
| 149 | //{ | 150 | { | |
| 150 | $week=$football->currentWeek(); | = | 151 | $week=$football->currentWeek(); |
| 151 | //} | <> | 152 | } |
| 152 | = | 153 | ||
| 153 | 154 | |||
| 154 | // sample output | 155 | // sample output | |
| 155 | for ($crt=2; $crt <= $i;$crt++){ | 156 | for ($crt=2; $crt <= $i;$crt++){ | |
| 156 | $date=$date_array[$crt]; | 157 | $date=$date_array[$crt]; | |
| 157 | $vid=$visit_array[$crt]; | 158 | $vid=$visit_array[$crt]; | |
| 158 | $hid=$home_array[$crt]; | 159 | $hid=$home_array[$crt]; | |
| 159 | $spread=$spread_array[$crt]; | 160 | $spread=$spread_array[$crt]; | |
| 160 | //$spread=$spread * -1; //change sign | 161 | //$spread=$spread * -1; //change sign | |
| 161 | //$week = $football->currentWeek(); | 162 | //$week = $football->currentWeek(); | |
| <> | 163 | |||
| 162 | $sql="select * from ".$football->prefix."schedule where vid='".$visit_array[$crt]."' and hid='".$home_array[$crt]."' and week ='".$week."'"; | = | 164 | $sql="select * from ".$football->prefix."schedule where vid='".$visit_array[$crt]."' and hid='".$home_array[$crt]."' and week ='".$week."'"; |
| 163 | $rs = $football->dbQuery($sql) or die( $sql . mysql_error() ); | <> | 165 | $rs = $football->dbQuery($sql); |
| 164 | while($row = mysql_fetch_object($rs)) | = | 166 | while($row = mysql_fetch_object($rs)) |
| 165 | { | 167 | { | |
| 166 | $gameid=$row->gameid; | 168 | $gameid=$row->gameid; | |
| 167 | $sql1="update ".$football->prefix."schedule set spread = ".$spread." where gameid = ".$gameid; | 169 | $sql1="update ".$football->prefix."schedule set spread = ".$spread." where gameid = ".$gameid; | |
| 168 | $rs1 = $football->dbQuery($sql1); | 170 | $rs1 = $football->dbQuery($sql1); | |
| 169 | } | 171 | } | |
| 170 | } | 172 | } | |
| 171 | //Display update results. | 173 | //Display update results. | |
| 172 | $football->InfoMessage("Spreads have been entered please select another menu item to continue."); | <> | ||
| 173 | ||||
| 174 | ?> | = | 174 | ?> |
| 175 | <table class="main" cellpadding="0" cellspacing="0"> | 175 | <table class="main" cellpadding="0" cellspacing="0"> | |
| 176 | <tr> | 176 | <tr> | |
| 177 | <th align="left" colspan="11">Week <?php echo $week; ?><? if ($football->usespread != "N") { ?> A <image src = ./images/win.gif width=15> means a Spread Win Update Completed<? } ?></th> | 177 | <th align="left" colspan="11">Week <?php echo $week; ?><? if ($football->usespread != "N") { ?> A <image src = ./images/win.gif width=15> means a Spread Win Update Completed<? } ?></th> | |
| 178 | </tr> | 178 | </tr> | |
| 179 | <tr> | 179 | <tr> | |