miniu Posted March 16, 2010 Share Posted March 16, 2010 Why did I received a message Parse error: syntax error, unexpected $end in ../assign_referee_to_game.php on line 686 <?php include("connect.php"); include("admin.session.php"); $LeftLinkSection = 1; $pagetitle="A Referee To a Game"; $qstr=$_SERVER['QUERY_STRING']; if($_REQUEST["sub2"]==1) { $gid=$_REQUEST['gid']; $sel="select id from assigned_games where gid=".$gid; $res_sel=mysql_query($sel); if(mysql_num_rows($res_sel) > 0) { $msg=1; } else { $main_ref_id=$_REQUEST['mainref']; $ast_ref_id1=$_REQUEST['astref1']; $ast_ref_id2=$_REQUEST['astref2']; $main_ref_fee=$_REQUEST['mainref_fee']; $ast_ref1_fee=$_REQUEST['astref_fee']; $ast_ref2_fee=$_REQUEST['astref_fee']; $htmanager = $_REQUEST['htmanager']; $telephone = $_REQUEST['telephone']; $reffee = $_REQUEST['reffee']; $dname = $_REQUEST['dname']; $leaname = $_REQUEST['leaname']; $league_address = $_REQUEST['league_address']; $htname = $_REQUEST['htname']; $atname = $_REQUEST['atname']; $gdate = $_REQUEST['gdate']; $gtime = $_REQUEST['gtime']; $locname = $_REQUEST['lname']; $address = $_REQUEST['address']; if($main_ref_id=='') $main_ref_id=0; if($ast_ref_id1=='') $ast_ref_id1=0; if($ast_ref_id2=='') $ast_ref_id2=0; $sql_ins="insert into assigned_games set gid=$gid,main_ref_id=$main_ref_id,main_ref_fee='$main_ref_fee',ast_ref1_fee='$ast_ref1_fee',ast_ref2_fee='$ast_ref2_fee',ast_ref_id1=$ast_ref_id1,ast_ref_id2=$ast_ref_id2,assigner_id=".$_SESSION['UsErId']; $res_ins=mysql_query($sql_ins); echo mysql_error(); $sql_ass="select fname,lname,email,phone from assigners where username='".$_SESSION["UsErOfAdMiN"]."'"; $res_ass=mysql_query($sql_ass); $row_ass=mysql_fetch_object($res_ass); $fnamea=$row_ass->fname; $lnamea=$row_ass->lname; $phone=$row_ass->phone; $flname=$fnamea.' '.$lnamea; if($main_ref_id!='') { $sql_mainref="select fname,lname,email from referees where id=".$main_ref_id; $res_mainref=mysql_query($sql_mainref); $row_mainref=mysql_fetch_object($res_mainref); $fname=$row_mainref->fname; $lname=$row_mainref->lname; $email=$row_mainref->email; $mailcontent="<html><head></head><body> <table width='80%' border='0' align='center' cellpadding='0' cellspacing='0'> <tr><td colspan='2'> </td></tr> <tr> <td width='47%' height='56'>Dear <b>$fname $lname</b>,</td> <td width='117' align='center' nowrap='nowrap'></td> </tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>You have been assigned to the following game by Assigner <strong>".$flname."</strong> and and You have been selected as <strong>Main Referee</strong>:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><strong>League:</strong> ".stripslashes($leaname)."</td></tr> <tr><td colspan='2'><strong>Division:</strong> ".stripslashes($dname)."</td></tr> <tr><td colspan='2'><strong>Main Referee Fee:</strong> $$main_ref_fee</td></tr> <tr><td colspan='2'><strong>Home Team Name:</strong> ".stripslashes($htname)."</td></tr> <tr><td colspan='2'><strong>Away Team Name:</strong> ".stripslashes($atname)."</td></tr> <tr><td colspan='2'><strong>Home Team Manager:</strong> ".stripslashes($htmanager)."</td></tr> <tr><td colspan='2'><strong>Telephone:</strong> $telephone</td></tr> <tr><td colspan='2'><strong>Game Date:</strong> $gdate</td></tr> <tr><td colspan='2'><strong>Game Time:</strong> $gtime</td></tr> <tr><td colspan='2'><strong>Location:</strong> ".stripslashes($locname)."</td></tr> <tr><td colspan='2'><strong>Location Address:</strong> ".stripslashes($address)."</td></tr> <tr><td colspan='2'><strong>Assigner's Telephone:</strong> $phone</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Upon completion of the game, please fill out the attached Report <a href='http://www.njsa-assignments.com/report/report.doc' target='_blank'>http://www.njsa-assignments.com/report/report.doc</a> and mail it to the $leaname WITHIN 24 HOURS at the address below:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>".stripslashes($league_address)."</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Please login at following link to accept or reject Assigned Game:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><a href='$sitepath' target='_blank'>$sitepath</a></td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Regards,</td></tr> <tr><td colspan='2'>John Zangrilli</td></tr> <tr><td colspan='2'><a href='mailto:[email protected]' target='_blank'>[email protected]</a></td></tr> <tr><td colspan='2'> </td></tr> </table> </body> </html>"; //echo $mailcontent; $to=$email; $subject="Assigning details for game: ".stripslashes($htname)." VS ".stripslashes($atname);; $from="[email protected]"; /* echo $to.'<br>'; echo $subject.'<br>'; echo $from.'<br>'; echo $mailcontent.'<br>'; exit;*/ @SendHTMLMail1($to,$subject,$mailcontent,$from); } if($ast_ref_id1!='') { $sql_mainref="select fname,lname,email from referees where id=".$ast_ref_id1; $res_mainref=mysql_query($sql_mainref); $row_mainref=mysql_fetch_object($res_mainref); $fname=$row_mainref->fname; $lname=$row_mainref->lname; $email=$row_mainref->email; $mailcontent="<html><head></head><body> <table width='80%' border='0' align='center' cellpadding='0' cellspacing='0'> <tr><td colspan='2'> </td></tr> <tr> <td width='47%' height='56'>Dear <b>$fname $lname</b>,</td> <td width='117' align='center' nowrap='nowrap'></td> </tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>You have been assigned to the following game by Assigner <strong>".$flname."</strong> and and You have been selected as <strong>Assistant Referee 1</strong>:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><strong>League:</strong> ".stripslashes($leaname)."</td></tr> <tr><td colspan='2'><strong>Division:</strong> ".stripslashes($dname)."</td></tr> <tr><td colspan='2'><strong>Assistant Referee Fee:</strong> $$ast_ref1_fee</td></tr> <tr><td colspan='2'><strong>Home Team Name:</strong> ".stripslashes($htname)."</td></tr> <tr><td colspan='2'><strong>Away Team Name:</strong> ".stripslashes($atname)."</td></tr> <tr><td colspan='2'><strong>Home Team Manager:</strong> ".stripslashes($htmanager)."</td></tr> <tr><td colspan='2'><strong>Telephone:</strong> $telephone</td></tr> <tr><td colspan='2'><strong>Game Date:</strong> $gdate</td></tr> <tr><td colspan='2'><strong>Game Time:</strong> $gtime</td></tr> <tr><td colspan='2'><strong>Location:</strong> ".stripslashes($locname)."</td></tr> <tr><td colspan='2'><strong>Location Address:</strong> ".stripslashes($address)."</td></tr> <tr><td colspan='2'><strong>Assigner's Telephone:</strong> $phone</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Upon completion of the game, please fill out the attached Report <a href='http://www.njsa-assignments.com/report/report.doc' target='_blank'>http://www.njsa-assignments.com/report/report.doc</a> and mail it to the $leaname WITHIN 24 HOURS at the address below:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>".stripslashes($league_address)."</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Please login at following link to accept or reject Assigned Game:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><a href='$sitepath' target='_blank'>$sitepath</a></td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Regards,</td></tr> <tr><td colspan='2'>John Zangrilli</td></tr> <tr><td colspan='2'><a href='mailto:[email protected]' target='_blank'>[email protected]</a></td></tr> <tr><td colspan='2'> </td></tr> </table> </body> </html>"; $to=$email; $subject="Assigning details for game: ".stripslashes($htname)." VS ".stripslashes($atname); $from="[email protected]"; //echo $mailcontent; @SendHTMLMail1($to,$subject,$mailcontent,$from); } if($ast_ref_id2!='') { $sql_mainref="select fname,lname,email from referees where id=".$ast_ref_id2; $res_mainref=mysql_query($sql_mainref); $row_mainref=mysql_fetch_object($res_mainref); $fname=$row_mainref->fname; $lname=$row_mainref->lname; $email=$row_mainref->email; $mailcontent="<html><head></head><body> <table width='80%' border='0' align='center' cellpadding='0' cellspacing='0'> <tr><td colspan='2'> </td></tr> <tr> <td width='47%' height='56'>Dear <b>$fname $lname</b>,</td> <td width='117' align='center' nowrap='nowrap'></td> </tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>You have been assigned to the following game by Assigner <strong>".$flname."</strong> and and You have been selected as <strong>Assistant Referee 2</strong>:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><strong>League:</strong> ".stripslashes($leaname)."</td></tr> <tr><td colspan='2'><strong>Division:</strong> ".stripslashes($dname)."</td></tr> <tr><td colspan='2'><strong>Assistant Referee Fee:</strong> $$ast_ref2_fee</td></tr> <tr><td colspan='2'><strong>Home Team Name:</strong> ".stripslashes($htname)."</td></tr> <tr><td colspan='2'><strong>Away Team Name:</strong> ".stripslashes($atname)."</td></tr> <tr><td colspan='2'><strong>Home Team Manager:</strong> ".stripslashes($htmanager)."</td></tr> <tr><td colspan='2'><strong>Telephone:</strong> $telephone</td></tr> <tr><td colspan='2'><strong>Game Date:</strong> $gdate</td></tr> <tr><td colspan='2'><strong>Game Time:</strong> $gtime</td></tr> <tr><td colspan='2'><strong>Location:</strong> ".stripslashes($locname)."</td></tr> <tr><td colspan='2'><strong>Location Address:</strong> ".stripslashes($address)."</td></tr> <tr><td colspan='2'><strong>Assigner's Telephone:</strong> $phone</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Upon completion of the game, please fill out the attached Report <a href='http://www.njsa-assignments.com/report/report.doc' target='_blank'>http://www.njsa-assignments.com/report/report.doc</a> and mail it to the $leaname WITHIN 24 HOURS at the address below:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>".stripslashes($league_address)."</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Please login at following link to accept or reject Assigned Game:</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><a href='$sitepath' target='_blank'>$sitepath</a></td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>Regards,</td></tr> <tr><td colspan='2'>John Zangrilli</td></tr> <tr><td colspan='2'><a href='mailto:[email protected]' target='_blank'>[email protected]</a></td></tr> <tr><td colspan='2'> </td></tr> </table> </body> </html>"; //echo $mailcontent; exit; $to=$email; $subject="Assigning details for game: ".stripslashes($htname)." VS ".stripslashes($atname);; $from="[email protected]"; @SendHTMLMail1($to,$subject,$mailcontent,$from); } //exit; header("location:message.php?mid=26"); exit; } } if($_REQUEST["sub1"]==1) { $sql_gamec="select id,gid from games where 1=1"; if($_REQUEST['txtfromdate']!='') { $txtfromdate=$_REQUEST['txtfromdate']; $txtfromdate_arr=explode("-",$txtfromdate); $txtfromdate=$txtfromdate_arr[2].'-'.$txtfromdate_arr[0].'-'.$txtfromdate_arr[1]; $txttodate=$_REQUEST['txttodate']; $txttodate_arr=explode("-",$txttodate); $txttodate=$txttodate_arr[2].'-'.$txttodate_arr[0].'-'.$txttodate_arr[1]; $sql_gamec.=" and gdate >='".$txtfromdate."' and gdate<='".$txttodate."'"; } if($_REQUEST['drpdivisions']!='') { $sql_gamec.=" and div_id=".$_REQUEST['drpdivisions']; } if($_REQUEST['drpleague']!='') { $sql_gamec.=" and league_id=".$_REQUEST['drpleague']; $league=$_REQUEST['drpleague']; } $sql_gamec.=" order by id desc"; //echo $sql_gamec; exit; $res_gamec=mysql_query($sql_gamec); $totgames=mysql_num_rows($res_gamec); } if($_REQUEST["sub2"]==1) { } if($_GET["gid"]) { $game_id=$_GET['gid']; $selsql= "SELECT lea.league_name,lea.address as league_address,d.mainref_fee,d.astref_fee,g.htmanager,g.telephone,g.id, g.gid,g.gdate,dayname(g.gdate) as gday,g.gtime, d.dname, ht.tname AS htname, at.tname AS atname, l.lname,l.address FROM games g INNER JOIN divisions d ON g.div_id = d.id INNER JOIN league lea ON g.league_id = lea.id INNER JOIN teams ht ON g.home_team_id = ht.id INNER JOIN teams at ON g.away_team_id = at.id INNER JOIN locations l ON g.location_id = l.id where gid=".$_GET["gid"] ; $selres = mysql_query($selsql); echo mysql_error(); $selobj = mysql_fetch_object($selres); $mainref_fee = stripslashes($selobj->mainref_fee); $astref_fee = stripslashes($selobj->astref_fee); $league_name = stripslashes($selobj->league_name); $league_address = stripslashes($selobj->league_address); $dname = stripslashes($selobj->dname); $htname = stripslashes($selobj->htname); $atname = stripslashes($selobj->atname); $htmanager = stripslashes($selobj->htmanager); $telephone = stripslashes($selobj->telephone); $gdate = stripslashes($selobj->gdate); $gdate2 = stripslashes($selobj->gdate); $kgdate=explode('-',$gdate); $gdate=$kgdate[1].'-'.$kgdate[2].'-'.$kgdate[0]; $gtime = stripslashes($selobj->gtime); $htime=explode(':',$gtime); $ampm=explode(' ',$htime[1]); $lname = stripslashes($selobj->lname); $address = stripslashes($selobj->address); $gday=stripslashes($selobj->gday); /*$sql_ref_fee="select * from referee_fees"; $res_ref_fee=mysql_query($sql_ref_fee); $row_ref_fee=mysql_fetch_object($res_ref_fee); $mainref_fee=$row_ref_fee->mainref_fee; $astref_fee=$row_ref_fee->astref_fee; */ //echo $gday; //echo $sql_mainref="select id,fname,lname from referees where '".$gdate2."' NOT BETWEEN fromdate and todate"; } if($_GET['league_id']!='') $league=$_GET['league_id']; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD><title><?=Site_Title; ?></title> <script language="javascript"> function kyb_check() { if(document.getElementById("drpgames").value=="") { alert("Please Select Game"); document.getElementById("drpgames").focus(); return false; } if(document.getElementById("astref1")!=null && document.getElementById("mainref")!=null) { if(document.getElementById("mainref").value!='' && document.getElementById("astref1").value!='') { if(document.getElementById("mainref").value==document.getElementById("astref1").value) { alert("Main Referee and Assistant Referee can not be Same"); document.getElementById("mainref").focus(); return false; } } } if(document.getElementById("astref2")!=null && document.getElementById("mainref")!=null) { if(document.getElementById("mainref").value!='' && document.getElementById("astref2").value!='') { if(document.getElementById("mainref").value==document.getElementById("astref2").value) { alert("Main Referee and Assistant Referee can not be Same"); document.getElementById("mainref").focus(); return false; } } } if(document.getElementById("astref1")!=null && document.getElementById("astref2")!=null) { if(document.getElementById("astref1").value!='' && document.getElementById("astref2").value!='') { if(document.getElementById("astref1").value==document.getElementById("astref2").value) { alert("Assistant Referee 1 and Assistant Referee 2 can not be Same"); document.getElementById("astref1").focus(); return false; } } } } function clearall() { document.getElementById('txtfromdate').value=''; document.getElementById('txttodate').value=''; document.getElementById('drpdivisions').value=''; } function IsNumericMain(strString) // check for valid numeric strings { var strValidChars = "0123456789."; var strChar; var blnResult = true; if (strString.length == 0) return false; // test strString consists of valid characters listed above for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { alert("Please Enter Digits"); document.getElementById('main_ref_fee').value=''; document.getElementById('main_ref_fee').focus(); blnResult = false; } } return blnResult; } function IsNumericAstRef1(strString) { var strValidChars = "0123456789."; var strChar; var blnResult = true; if (strString.length == 0) return false; // test strString consists of valid characters listed above for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { alert("Please Enter Digits"); document.getElementById('ast_ref1_fee').value=''; document.getElementById('ast_ref1_fee').focus(); blnResult = false; } } return blnResult; } function IsNumericAstRef2(strString) { var strValidChars = "0123456789."; var strChar; var blnResult = true; if (strString.length == 0) return false; // test strString consists of valid characters listed above for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { alert("Please Enter Digits"); document.getElementById('ast_ref2_fee').value=''; document.getElementById('ast_ref2_fee').focus(); blnResult = false; } } return blnResult; } function select_game(val,sub1,txtfrom,txtto,drp_division) { window.location.href='assign_referee_to_game.php?gid=' + val + '&sub1=' + sub1 + '&txtfromdate=' + txtfrom + '&txttodate=' + txtto + '&drpdivisions=' + drp_division; } function show_divisions(val) { window.location.href='assign_referee_to_game.php?league_id=' + val; } function show_getgames() { if(document.getElementById('txtfromdate').value!='' && document.getElementById('txttodate').value=='') { alert('Please Select To Date'); document.getElementById('txttodate').focus(); return false; } if(document.getElementById('txttodate').value!='' && document.getElementById('txtfromdate').value=='') { alert('Please Select From Date'); document.getElementById('txtfromdate').focus(); return false; } if(document.getElementById('txttodate').value < document.getElementById('txtfromdate').value) { alert('To Date can not be less then From Date'); document.getElementById('txttodate').focus(); return false; } document.getElementById('sub1').value=1; document.frmgetgames.submit(); } </script> <script src="calendar.js"></script> <META http-equiv=Content-Type content="text/html; charset=utf-8"> <META content="MSHTML 6.00.2600.0" name=GENERATOR> <link rel="stylesheet" href="main.css" type="text/css"> <style type="text/css"> p.uppercase {text-transform:uppercase;} </style> </HEAD> <BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 class="th-a"> <TR><TD height=60 colspan="2" bgColor=#FFFFFF><? include("top.php") ?></td> </TR> <TR> <td width="20%" valign="top" bgcolor="#1c6995"><? include("left.php"); ?></td> <td width="80%" valign="top" height="480" bgcolor="#FFFFFF"> <TABLE cellSpacing=0 cellPadding=0 border=0 width="90%" align="center"> <TR><TD width="100%" class=h1> </TD></TR> <TR><TD width="100%" class=H1><? echo ($_GET["id"]>0)?"Edit":"Assign"; ?> <?=$pagetitle?></TD></TR> <TR><TD background="images/vdots.gif"></TD></TR> <tr><td> </td></tr> <tr><td> </td></tr> <tr><td align="center"><form name="frmgetgames" id="frmgetgames" method="post"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td width="100%" colspan="2" align="left"> From Date: <input type="text" name="txtfromdate" readonly="true" id="txtfromdate" size="15" value="<?=stripslashes($_REQUEST['txtfromdate']);?>"> <a href="#" onClick="getCalendar(document.getElementById('txtfromdate'));"> Select Date</a> To Date: <input type="text" name="txttodate" readonly="true" id="txttodate" size="15" value="<?=stripslashes($_REQUEST['txttodate']);?>"> <a href="#" onClick="getCalendar(document.getElementById('txttodate'));"> Select Date</a> <br><br> <select name="drpleague" id="drpleague" style="width:150px" onChange="show_divisions(this.value)"> <option value="">--Select--</option> <? $sql_league="select * from league"; $res_league=mysql_query($sql_league); while($row_league=mysql_fetch_object($res_league)) { ?> <option value="<?=$row_league->id?>" <? if($row_league->id==$league) echo "selected='selected'"; ?>><?=stripslashes($row_league->league_name)?></option> <? } ?> </select> <? if($league!='') { ?> <select id="drpdivisions" name="drpdivisions"> <option value="">--Select Division--</option> <? $sql_division="select * from divisions where league_id=".$league." order by dname"; $res_division=mysql_query($sql_division); while($row_division=mysql_fetch_object($res_division)) { ?> <option value="<?=$row_division->id?>" <? if($_REQUEST['drpdivisions']==$row_division->id) echo "selected='selected'"; ?>><?=stripslashes($row_division->dname);?></option> <? } ?> </select><? } ?><br><br> <input type="button" value="Get Games" onClick="show_getgames();"><input type="hidden" id="sub1" name="sub1" value="0"> <input type="button" value="Clear" onClick="clearall();"> </td> </tr> </table></form> </td></tr> <tr><td> </td></tr> <tr><td> </td></tr> <? if($msg==1) { ?> <tr><td class="error" height="30"><font color="red"><strong>Game is already assigned to Referees!</strong></font></td></tr> <? } ?> <TR> <TD> <? if(($_REQUEST['sub1']==1 && $totgames > 0) || ($_GET['gid']!='' && $totgames > 0)) { ?> <FORM name="form2" action="#" method="post"> <td align="right"><a href="#" onClick="javascript:window.print();"><div class="noprint"><b>PRINT</b></div></a> </td> <TABLE width="100%" height="89" border=1 cellSpacing=0 class=t-a> <!--DWLayoutTable--> <TBODY> <TR class="th-a"> <TD colspan="10"> <div class="noprint"><? $result=$prs_pageing->number_pageing($strQueryPerPage,15,7); ?> </div> </TD> </TR> <TR class=th-a> <TD width="10%" align="left"><a href="assign_referee_to_game.php?sort=lea.league_name&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">League Name</a></TD> <TD width="10%" align="left"><a href="assign_referee_to_game.php?sort=d.dname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Division</a></TD> <TD width="8%" align="left"><a href="assign_referee_to_game.php?sort=g.gdate&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Game Date</a></TD> <TD width="8%" align="left"><a href="assign_referee_to_game.php?sort=g.gtime&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Game Time</a></TD> <TD width="12%" align="left"><a href="assign_referee_to_game.php?sort=at.tname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Home Team</a></TD> <TD width="12%" align="left"><a href="assign_referee_to_game.php?sort=ht.tname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Away Team</a></TD> <TD width="10%" align="left"><a href="assign_referee_to_game.php?sort=r1.fname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Referee</a></TD> <TD width="10%" align="left"><a href="assign_referee_to_game.php?sort=r2.fname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Assistant Referee 1</a></TD> <TD width="10%" align="left"><a href="assign_referee_to_game.php?sort=r3.fname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Assistant Referee 2</a></TD> <TD width="10%" align="center"><span class="style3"><div class="noprint">Option</div></span></TD> </TR> <?php $tr="#f4f4f4"; $clr=1; while($row = mysql_fetch_object($result)) { if($tr=="#FFFFFF") { $tr="#efefef"; $col="#000000"; } else { $tr="#FFFFFF"; $col="#000000"; } $tmpid = $row->id ; $tmpid = ""; $agid=$row->id; ?> <tr bgcolor="<? echo $tr; ?>"> <TD align="left"><font color="<?=$col?>"><? echo stripslashes($row->league_name); ?></font></TD> <TD align="left"><font color="<?=$col?>"><? echo stripslashes($row->dname); ?></font></TD> <TD align="left"><font color="<?=$col?>"> <? $txtgdate=$row->gdate; $txtgdate_arr=explode("-",$txtgdate); $txtgdate=$txtgdate_arr[1].'-'.$txtgdate_arr[2].'-'.$txtgdate_arr[0]; ?> <? echo stripslashes($txtgdate); ?></font></TD> <TD align="left"><font color="<?=$col?>"> <? $txtgtime=$row->gtime; $txtgtime_arr=explode("-",$txtgtime); $txtgtime=$txtgtime_arr[1].'-'.$txtgtime_arr[2].'-'.$txtgtime_arr[0]; ?> <? echo stripslashes($txtgtime); ?></font></TD> <TD align="left"><font color="<?=$col?>"><? echo stripslashes($row->htname); ?></font></TD> <TD align="left"><font color="<?=$col?>"><? echo stripslashes($row->atname); ?></font></TD> <TD align="left"><font color="<?=$col?>"> <? echo stripslashes($row->r1fname).' '.stripslashes($row->r1lname); ?><br><? if($row->main_ref_accept=='P' && $row->main_ref_id!=0) echo "<font color='#FF9900'><b>Pending</b></font>"; ?><? if($row->main_ref_accept=='A') echo "<font color='#006633'><b>Accepted</b></font>"; ?><? if($row->main_ref_accept=='R') echo "<font color='#FF0000'><b>Rejected</b></font><a href='#' onclick=\"openWin('view_reason.php?mainref_id=$agid','test','550','500','true','yes');\">(View Reason)</a>"; ?></font></TD> <TD align="left"><font color="<?=$col?>"> <? echo stripslashes($row->r2fname).' '.stripslashes($row->r2lname); ?></font><br><? if($row->r2fname!='') { if($row->ast_ref1_accept=='P' && $row->ast_ref_id1!=0) echo "<font color='#FF9900'><b>Pending</b></font>"; ?><? if($row->ast_ref1_accept=='A') echo "<font color='#006633'><b>Accepted</b></font>"; ?><? if($row->ast_ref1_accept=='R') echo "<font color='#FF0000'><b>Rejected</b></font><a href='#' onclick=\"openWin('view_reason.php?astref_id1=$agid','test','550','500','true','yes');\">(View Reason)</a>"; } ?></TD> <TD align="left"><font color="<?=$col?>"> <? echo stripslashes($row->r3fname).' '.stripslashes($row->r3lname); ?></font><br><? if($row->r3fname!='') { if($row->ast_ref2_accept=='P' && $row->ast_ref_id2!=0) echo "<font color='#FF9900'><b>Pending</b></font>"; ?><? if($row->ast_ref2_accept=='A') echo "<font color='#006633'><b>Accepted</b></font>"; ?><? if($row->ast_ref2_accept=='R') echo "<font color='#FF0000'><b>Rejected</b></font><a href='#' onclick=\"openWin('view_reason.php?astref_id2=$agid','test','550','500','true','yes');\">(View Reason)</a>"; } ?></TD> <TD align="center"><div class="noprint"><input name="button" type="button" class="bttn-s" onClick="location.href='edit_referee_to_game.php?id=<?php echo $row->id; ?>'" value="Edit Assignment"></div> <div class="noprint"><INPUT class="bttn-s" onClick="deleteconfirm('Are you sure you want to delete this Assigned Referee to Game? \n','manage_referees_to_game.php?did=<?php echo($row->id); ?>');" type="button" value="Delete Assignment"></div> </TD> </TR> <? $parentary = NULL ; } ?> <input type=hidden name="total" value="<? echo $strTotalNewRow; ?>"> <TR align=center> <TD colSpan=10> <? if(!$strTotalPerPage) { ?> <strong>No Referees To Game Detail Display</strong> <tr> <td> <input type="hidden" value="<?=$_GET["id"]; ?>" name="id"></td> <td><input name="Submit" type="submit" class="buttonclass" value="Submit" onClick="return kyb_check();" /></td> <input type="hidden" name="sub2" value="1"> </tr> </form><? } else { ?><? if($_POST['sub1']!='') { ?><table cellpadding="0" cellspacing="0" border="0" align="center"> <tr><td class="error" height="30"><font color="red"><strong>No Games will be played between these Dates!</strong></font></td></tr> </table><? } ?> <? } ?> </TD> </TR> </TABLE> </td> </TR> </TABLE> </BODY></HTML> Quote Link to comment https://forums.phpfreaks.com/topic/195438-parse-error-syntax-error-unexpected-end-in/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 16, 2010 Share Posted March 16, 2010 The error is due to an open php language element. The most common reason is a missing or mismatched closing }, but it can also be caused by a missing closing quote, or by using short open tags <? so that some of your php code is not seen by the php parser. I suspect in your case it is because of the short open tags <?. You should only use full php opening tags <?php. Quote Link to comment https://forums.phpfreaks.com/topic/195438-parse-error-syntax-error-unexpected-end-in/#findComment-1026968 Share on other sites More sharing options...
miniu Posted March 16, 2010 Author Share Posted March 16, 2010 thanx <? } ?> was missing Quote Link to comment https://forums.phpfreaks.com/topic/195438-parse-error-syntax-error-unexpected-end-in/#findComment-1026973 Share on other sites More sharing options...
aeroswat Posted March 16, 2010 Share Posted March 16, 2010 thanx <? } ?> was missing I would still take his advice though. If you don't then your code will not be "portable" and will have the possibility of causing problems if you change hosts. Quote Link to comment https://forums.phpfreaks.com/topic/195438-parse-error-syntax-error-unexpected-end-in/#findComment-1026977 Share on other sites More sharing options...
miniu Posted March 16, 2010 Author Share Posted March 16, 2010 thanx <? } ?> was missing ok, I will do it I would still take his advice though. If you don't then your code will not be "portable" and will have the possibility of causing problems if you change hosts. Quote Link to comment https://forums.phpfreaks.com/topic/195438-parse-error-syntax-error-unexpected-end-in/#findComment-1026998 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.