Jump to content

miniu

Members
  • Posts

    81
  • Joined

  • Last visited

    Never

Everything posted by miniu

  1. I have added it before the query on the beginning of the page if(isset($_GET['did'])) { but still the same message.
  2. The sessions where not safe on the server, but the host have changed it for my account and it is working now, thank you.
  3. I have a problem, when I try to lunch this file I receive an information: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay I don't know where should I change the SQL_BIG_SELECTS because they are not defined anywhere, here is the code: <?php include("connect.php"); include("admin.session.php"); $LeftLinkSection = 1; $pagetitle="Assigned Games"; if(isset($_GET['did'])) { $sql="delete from games where id=".$_GET['did']; $res=mysql_query($sql); echo mysql_error(); header('location:message.php?mid=3'); } ?> <HTML> <HEAD><title><?=Site_Title; ?></title> <SCRIPT language="javascript" src="body.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"> <!-- .style3 {color: #FFFFFF} --> </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 valign="top" 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" bgcolor="#FFFFFF" height="480"> <TABLE width="97%" border=0 cellPadding=0 cellSpacing=0 align="center"> <TR><TD width="100%" class="H1"> </TD></TR> <TR><TD align="center" width="100%" class="a-l"><?php echo $Message2 ; ?></TD></TR> <TR> <? if($msg!="") { ?> <TR><TD align="center" width="100%" class="a-l"><font color="red"><b>User Deleted Successfully</b></font></TD></TR> <TR> <? } ?> <TD width="100%" class="H1">Manage <?=$pagetitle?></TD> </TR> <TR><TD background="images/vdots.gif"><IMG height=1 src="images/spacer.gif" width=1 border=0></TD></TR> <tr> <TD> <FORM name="order" action="#" method="post"> <TABLE cellSpacing=0 cellPadding=1 border=0 > <tr><td colspan="25" height="20"><b>View By Division Name</b></td></tr> <?=$prs_pageing->order();?> </TABLE> </form> <? if($_GET["order"]) { $order=$_GET["order"]; $strQueryPerPage="select ag.main_ref_accept,ag.ast_ref1_accept,ag.ast_ref2_accept,ag.id as agid,g.id,g.gid,d.dname,g.gdate,g.gtime,ht.tname as htname,at.tname as atname from games g inner join divisions d on g.div_id=d.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 assigned_games ag on g.gid=ag.gid where (main_ref_id=".$_SESSION["UsErId"]." or ast_ref_id1=".$_SESSION["UsErId"]." or ast_ref_id2=".$_SESSION["UsErId"].") and d.dname like '$order%'"; } else $strQueryPerPage="select ag.main_ref_accept,ag.ast_ref1_accept,ag.ast_ref2_accept,ag.id as agid,g.id,g.gid,d.dname,g.gdate,g.gtime,ht.tname as htname,at.tname as atname from games g inner join divisions d on g.div_id=d.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 assigned_games ag on g.gid=ag.gid where main_ref_id=".$_SESSION["UsErId"]." or ast_ref_id1=".$_SESSION["UsErId"]." or ast_ref_id2=".$_SESSION["UsErId"]; if(isset($_GET['sort'])) $strQueryPerPage.=" order by ".$_GET['sort']." ".$_GET['ordby']; else $strQueryPerPage.=" order by g.id desc"; //echo $strQueryPerPage; $strResultPerPage=mysql_query($strQueryPerPage); $strTotalPerPage=mysql_affected_rows(); ?> <div align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-4703789267650596"; /* 728x90, utworzono 10-03-10 */ google_ad_slot = "0969661517"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <script type="text/javascript"><!-- google_ad_client = "pub-4703789267650596"; /* 728x15, utworzono 09-12-14 */ google_ad_slot = "0676154885"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <FORM name="form2" action="#" method="post"> <TABLE width="100%" height="89" border=1 cellSpacing=0 class=t-a> <!--DWLayoutTable--> <TBODY> <TR class="th-a"> <TD colspan="9"> <? $result=$prs_pageing->number_pageing($strQueryPerPage,15,7); ?> </TD> </TR> <TR class=th-a> <TD width="8%" align="left"><a href="manage_games.php?sort=g.gdate&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Game Date</a></TD> <TD width="12%" align="left"><a href="assigned_games.php?sort=d.dname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Division Name</a></TD> <TD width="8%" align="left"><a href="manage_games.php?sort=g.gtime&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Game Time</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ht.tname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Home Team Name</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=at.tname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Away Team Name</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ag.main_ref_accept&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Main Referee</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ag.ast_ref1_accept&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Assistant Referee 1</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ag.ast_ref2_accept&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Assistant Referee 2</a></TD> <TD width="16%" align="center"><span class="style3">Option</span></TD> </TR> <?php $tr="#f4f4f4"; $clr=1; $result=mysql_query($strQueryPerPage) or die(mysql_error()); while($row = mysql_fetch_object($result)) { $sql_main_referee="select fname,lname from referees,assigned_games where assigned_games.id=".$row->agid." and assigned_games.main_ref_id=referees.id;"; $rs_main=mysql_query($sql_main_referee) or die(mysql_error()); $row_main=mysql_fetch_object($rs_main); $sql_sub1_referee="select fname,lname from referees,assigned_games where assigned_games.id=".$row->agid." and assigned_games.ast_ref_id1=referees.id;;"; $rs_sub1=mysql_query($sql_sub1_referee) or die(mysql_error()); $row_sub1=mysql_fetch_object($rs_sub1); $sql_sub2_referee="select fname,lname from referees,assigned_games where assigned_games.id=".$row->agid." and assigned_games.ast_ref_id2=referees.id;;"; $rs_sub2=mysql_query($sql_sub2_referee) or die(mysql_error()); $row_sub2=mysql_fetch_object($rs_sub2); if($tr=="#FFFFFF") { $tr="#efefef"; $col="#000000"; } else { $tr="#FFFFFF"; $col="#000000"; } $tmpid = $row->id ; $tmpid = ""; ?> <tr bgcolor="<? echo $tr; ?>"> <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?>"><? echo stripslashes($row->dname); ?></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_main->fname).' '.stripslashes($row_main->lname); ?><br><? if($row->main_ref_accept=='P') echo "<font color='#FF9900'><strong>Pending</strong></font>"; if($row->main_ref_accept=='A') echo "<font color='#006633'><strong>Accepted</strong></font>"; if($row->main_ref_accept=='R') echo "<font color='#FF0000'><strong>Rejected</strong></font>"; ?></font></TD> <TD align="left"><font color="<?=$col?>"><? echo stripslashes($row_sub1->fname).' '.stripslashes($row_sub1->lname); ?></font><br><? if($row->ast_ref1_accept=='P') echo "<font color='#FF9900'><strong>Pending</strong></font>"; if($row->ast_ref1_accept=='A') echo "<font color='#006633'><strong>Accepted</strong></font>"; if($row->ast_ref1_accept=='R') echo "<font color='#FF0000'><strong>Rejected</strong></font>"; ?></font></TD> <TD align="left"><font color="<?=$col?>"><? echo stripslashes($row_sub2->fname).' '.stripslashes($row_sub2->lname); ?></font><br><? if($row->ast_ref2_accept=='P') echo "<font color='#FF9900'><strong>Pending</strong></font>"; if($row->ast_ref2_accept=='A') echo "<font color='#006633'><strong>Accepted</strong></font>"; if($row->ast_ref2_accept=='R') echo "<font color='#FF0000'><strong>Rejected</strong></font>"; ?></font></TD> <TD align="center"><input name="button" type="button" class="bttn-s" onClick="location.href='view_assigned_game.php?id=<?php echo $row->agid; ?>'" value="View"> </TD> </TR> <? $parentary = NULL ; } ?> <input type=hidden name="total" value="<? echo $strTotalNewRow; ?>"> <TR align=center> <TD colSpan=8> <? if(!$strTotalPerPage) { ?> <strong>No Game Detail to Display</strong> <? } ?> </TD> </TR> <TR align=center> <TD colSpan=10> </TD> </TR> </TABLE> </FORM> </TD> </TR> </TABLE> </td> </tr> </TABLE> </BODY></HTML>
  4. Hello, I am moving my website to a different server. Now it is: http://www.miniu81.fatcow.com/refassign/ I import everything from the previous database to the new one I changed functions.php and config.inc.php with the new access to the database but when I try to login nothing happens (No info about any problems, mysql e.t.c) he simply act like the side would refresh. what can be the problem?
  5. ok, thank you
  6. Because I moved to a different server and in my previous I had INFORMATION_SCHEMA and was wondering if in order to copy the database info I should also create the INFORMATION_SCHEMA tables that I hade on the previous server
  7. How can I create INFORMATION_SCHEMA tables in MySQL - 5.0.83 ?
  8. thank you
  9. Hello, I have a possibility to print the data in a table but I would like that each row will be separate by a blank row. Right now the code is look like that: print('<tr> <td class="Tab">'.$leaguecode.'</td> <td class="Tab">'.$divisioncode.'</td> <td class="Tab">'.$HomeTeamName.'</td> <td class="Tab">'.$AwayTeamName.'</td> <td class="Tab">'.$txtgdate.'</td> <td class="Tab">'.$txtgtime.'</td> <td class="Tab">'.$loc_name.'</td> <td class="Tab">'.$loc_address.'</td> <td class="Tab"> <input name="gid'.$max.'" type="hidden" value="'.$max.'"> </td> </tr> '); like I said I would like to have a space between the records (rows, not columns)
  10. I have a table where you can put the dates, but i want to make also a button that says "clear date" that will clear the date. How can I make that? this is the code for the dates: <tr> <td colspan="2" align="right"><font color="red"></font> From Date: </td> <td width="25%"><font color="<?=$col?>"> <input type="text" name="txtfromdate" readonly="true" id="txtfromdate" size="15" value="<?=stripslashes($fromdate);?>"> <a href="#" onClick="getCalendar(document.getElementById('txtfromdate'));">Select Date</a></font></td> <td width="8%"> To Date:</td> <td width="51%"><font color="<?=$col?>"> <input type="text" name="txttodate" readonly="true" id="txttodate" size="15" value="<?=stripslashes($todate);?>"> <a href="#" onClick="getCalendar(document.getElementById('txttodate'));">Select Date</a></font></td> </tr>
  11. ok, thank you
  12. so you suggest that I should also ask the user to add the provider too?
  13. Thank you but how is this code getting the information from the users cellphone number? How does it know that this number is a AT&T number or T-Mobile number?
  14. how you define the service providers like AT&T Verizon ....
  15. looks good, but there will be no sms panel on the website. My users receiving right now e-mail notification but in they profiles they providing me also with they cell phone number and I want to use just that number for example $cellphone to send this notification by e-mail and also by sms. So he will receive for example two message one goes ro user@usermail.com and the second goes to phonenumber@cellphoneprovider.com So I will not use a text form, it is just to use it for notify.
  16. I was thinking that the first digits depending of the state and not the provider? How can I define the providers? which numbers are those providers numbers in the cell phone number?
  17. Ok I found it. for example: 2672220000@txt.att.net So it will be send as an e-mail just add the number of the person and then the service provider and it works. Now I have to figure it out how to add the service provider automatically to the e-mail, because they will only provide me with the cell phone number. If someone know, please let me know.
  18. I have a notify of changes by e-mail, but I would like to send them also a notification via text message, is there any possibility to do that?
  19. I don't understand what you mean with "effort" so this is the code to that file: <?php include("connect.php"); include("admin.session.php"); $LeftLinkSection = 1; $pagetitle="Game"; $qstr=$_SERVER['QUERY_STRING']; if($_POST["sub1"]==1) { if($_GET["id"]) { $currid = $_GET["id"]; $changed='N'; $telephone = addslashes($_POST["txttelephone"]); $htmanager = addslashes($_POST["txthtmanager"]); $ggid = addslashes($_POST["txtid"]); $div_id = addslashes($_POST["drpdivision"]); $league = addslashes($_POST["drpleague"]); $home_team_id= addslashes($_POST["drphometeam"]); $away_team_id= addslashes($_POST["drpawayteam"]); $gdate = addslashes($_POST["txtdate"]); $kgdate=explode('-',$gdate); $gdate=$kgdate[2].'-'.$kgdate[0].'-'.$kgdate[1]; $time = addslashes($_POST["drptime"]); $time2 = addslashes($_POST["drptime2"]); $ampm = addslashes($_POST["drpampm"]); $location_id= addslashes($_POST["drplocations"]); $gtime=$time.':'.$time2.' '.$ampm; $sql_check="select gid from assigned_games where gid=".$currid; $res_check=mysql_query($sql_check); $tot=mysql_num_rows($res_check); if($tot > 0) { //echo $div_id.$_POST['old_drpdivision']; exit; if($league!=$_POST['old_drpleague']) { $changed='Y'; $sql_lea="select league_name from league where id=".$league; $res_lea=mysql_query($sql_lea); $row_lea=mysql_fetch_object($res_lea); $league_name=$row_lea->league_name; $lleague_name="<strong><i><font color=red>".$row_lea->league_name."</font></i></strong>"; } else { $sql_lea="select league_name from league where id=".$league; $res_lea=mysql_query($sql_lea); $row_lea=mysql_fetch_object($res_lea); $league_name=$row_lea->league_name; $lleague_name=$row_lea->league_name; } if($div_id!=$_POST['old_drpdivision']) { $changed='Y'; $sql_div="select dname from divisions where id=".$div_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $dname=$row_div->dname; $ddname="<strong><i><font color=red>".$row_div->dname."</font></i></strong>"; } else { $sql_div="select dname from divisions where id=".$div_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $dname=$row_div->dname; $ddname=$row_div->dname; } if($home_team_id!=$_POST['old_drphometeam']) { $changed='Y'; $sql_div="select tname from teams where id=".$home_team_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $htname=$row_div->tname; $hhtname="<strong><i><font color=red>".$row_div->tname."</font></i></strong>"; } else { $sql_div="select tname from teams where id=".$home_team_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $htname=$row_div->tname; $hhtname=$row_div->tname; } if($away_team_id!=$_POST['old_drpawayteam']) { $changed='Y'; $sql_div="select tname from teams where id=".$away_team_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $atname=$row_div->tname; $aatname="<strong><i><font color=red>".$row_div->tname."</font></i></strong>"; } else { $sql_div="select tname from teams where id=".$away_team_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $atname=$row_div->tname; $aatname=$row_div->tname; } if($location_id!=$_POST['old_drplocations']) { $changed='Y'; $sql_div="select lname,address from locations where id=".$location_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $locname=$row_div->lname; $locaddress=$row_div->address; $llocname="<strong><i><font color=red>".$row_div->lname."</font></i></strong>"; $llocaddress="<strong><i><font color=red>".$row_div->address."</font></i></strong>"; } else { $sql_div="select lname from locations where id=".$location_id; $res_div=mysql_query($sql_div); $row_div=mysql_fetch_object($res_div); $locname=$row_div->lname; $locaddress=$row_div->address; $llocname=$row_div->lname; $llocaddress=$row_div->address; } if($telephone!=$_POST['old_txttelephone']) { $changed='Y'; $telephone=$telephone; $ttelephone="<strong><i><font color=red>".$telephone."</font></i></strong>"; } else { $telephone=$telephone; $ttelephone=$telephone; } if($htmanager!=$_POST['old_txthtmanager']) { $changed='Y'; $htmanager=$htmanager; $hhtmanager="<strong><i><font color=red>".$htmanager."</font></i></strong>"; } else { $htmanager=$htmanager; $hhtmanager=$htmanager; } if($_POST["txtdate"]!=$_POST['old_txtdate']) { $changed='Y'; $gdate=$gdate; $ggdate="<strong><i><font color=red>".$gdate."</font></i></strong>"; } else $ggdate=$gdate; //echo $time.'test1'.'<br>'; //echo $_POST['old_drptime'].'test2'.'<br>'; if(($time!=$_POST['old_drptime']) || ($time2!=$_POST['old_drptime2']) || ($ampm!=$_POST['old_drpampm']) ) { $changed='Y'; $gtime=$gtime; $ggtime="<strong><i><font color=red>".$gtime."</font></i></strong>"; } else $ggtime=$gtime; } $sel="select gid from games where gid='".$ggid."' and id!=".$currid; $res=mysql_query($sel); if(mysql_num_rows($res) > 0) { $msg=1; } else { if($tot > 0 && $changed=='Y') { $sql_users="select main_ref_id,ast_ref_id1,ast_ref_id2,assigner_id from assigned_games where gid=".$currid; $res_users=mysql_query($sql_users); $row_users=mysql_fetch_object($res_users); if($row_users->main_ref_id!=0) {/* $sql_mainref="select fname,lname,email from referees where id=".$row_users->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; $sql_ass="select phone from assigners where id=".$row_users->assigner_id; $res_ass=mysql_query($sql_ass); $row_ass=mysql_fetch_object($res_ass); $phone=$row_ass->phone; $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'>Following Game Information has been Changed.<br><br>Information those are changed are written in <b>BOLD</b> and <i>ITALIC</i>.</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><strong>Division:</strong> $ddname</td></tr> <tr><td colspan='2'><strong>Home Team Name:</strong> $hhtname</td></tr> <tr><td colspan='2'><strong>Away Team Name:</strong> $aatname</td></tr> <tr><td colspan='2'><strong>Home Team Manager:</strong> $hhtmanager</td></tr> <tr><td colspan='2'><strong>Telephone:</strong> $ttelephone</td></tr> <tr><td colspan='2'><strong>Game Date:</strong> $ggdate</td></tr> <tr><td colspan='2'><strong>Game Time:</strong> $ggtime</td></tr> <tr><td colspan='2'><strong>Location:</strong> $llocname</td></tr> <tr><td colspan='2'><strong>Assigner's Telephone:</strong> $phone</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>With the kindest regards,</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><b>Referee Assign System<br><a href='$sitepath' target='_blank'>$sitepath</a></b></td></tr> </table> </body> </html>"; $to=$email; $subject="Following Game Information has been Changed."; $from="no-reply@njsa-assignments.com"; //echo $mailcontent; @SendHTMLMail1($to,$subject,$mailcontent,$from); */} if($row_users->ast_ref_id1!=0) {/* $sql_mainref="select fname,lname,email from referees where id=".$row_users->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; $sql_ass="select phone from assigners where id=".$row_users->assigner_id; $res_ass=mysql_query($sql_ass); $row_ass=mysql_fetch_object($res_ass); $phone=$row_ass->phone; $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'>Following Game Information has been Changed.<br><br>Information those are changed are written in <b>BOLD</b> and <i>ITALIC</i>.</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><strong>Division:</strong> $ddname</td></tr> <tr><td colspan='2'><strong>Home Team Name:</strong> $hhtname</td></tr> <tr><td colspan='2'><strong>Away Team Name:</strong> $aatname</td></tr> <tr><td colspan='2'><strong>Home Team Manager:</strong> $hhtmanager</td></tr> <tr><td colspan='2'><strong>Telephone:</strong> $ttelephone</td></tr> <tr><td colspan='2'><strong>Game Date:</strong> $ggdate</td></tr> <tr><td colspan='2'><strong>Game Time:</strong> $ggtime</td></tr> <tr><td colspan='2'><strong>Location:</strong> $llocname</td></tr> <tr><td colspan='2'><strong>Assigner's Telephone:</strong> $phone</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>With the kindest regards,</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><b>Referee Assign System<br><a href='$sitepath' target='_blank'>$sitepath</a></b></td></tr> </table> </body> </html>"; $to=$email; $subject="Following Game Information has been Changed."; $from="no-reply@njsa-assignments.com"; //echo $mailcontent; @SendHTMLMail1($to,$subject,$mailcontent,$from); */} if($row_users->ast_ref_id2!=0) {/* $sql_mainref="select fname,lname,email from referees where id=".$row_users->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; $sql_ass="select phone from assigners where id=".$row_users->assigner_id; $res_ass=mysql_query($sql_ass); $row_ass=mysql_fetch_object($res_ass); $phone=$row_ass->phone; $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'>Following Game Information has been Changed.<br><br>Information those are changed are written in <b>BOLD</b> and <i>ITALIC</i>.</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><strong>Division:</strong> $ddname</td></tr> <tr><td colspan='2'><strong>Home Team Name:</strong> $hhtname</td></tr> <tr><td colspan='2'><strong>Away Team Name:</strong> $aatname</td></tr> <tr><td colspan='2'><strong>Home Team Manager:</strong> $hhtmanager</td></tr> <tr><td colspan='2'><strong>Telephone:</strong> $ttelephone</td></tr> <tr><td colspan='2'><strong>Game Date:</strong> $ggdate</td></tr> <tr><td colspan='2'><strong>Game Time:</strong> $ggtime</td></tr> <tr><td colspan='2'><strong>Location:</strong> $llocname</td></tr> <tr><td colspan='2'><strong>Assigner's Telephone:</strong> $phone</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'>With the kindest regards,</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><b>Referee Assign System<br><a href='$sitepath' target='_blank'>$sitepath</a></b></td></tr> </table> </body> </html>"; $to=$email; $subject="Following Game Information has been Changed."; $from="no-reply@njsa-assignments.com"; //echo $mailcontent; @SendHTMLMail1($to,$subject,$mailcontent,$from); */} if($row_users->assigner_id!='') { $sql_mainref="select fname,lname,email from assigners where id=".$row_users->assigner_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; $sql_ass="select phone from assigners where id=".$row_users->assigner_id; $res_ass=mysql_query($sql_ass); $row_ass=mysql_fetch_object($res_ass); $phone=$row_ass->phone; $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'>Following Game Information has been Changed.<br><br>Information those are changed are written in <b>BOLD</b>, <i>ITALIC</i> and marked as <font color=red> RED </font>.</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><strong>League:</strong> $lleague_name</td></tr> <tr><td colspan='2'><strong>Division:</strong> $ddname</td></tr> <tr><td colspan='2'><strong>Home Team Name:</strong> $hhtname</td></tr> <tr><td colspan='2'><strong>Away Team Name:</strong> $aatname</td></tr> <tr><td colspan='2'><strong>Home Team Manager:</strong> $hhtmanager</td></tr> <tr><td colspan='2'><strong>Telephone:</strong> $ttelephone</td></tr> <tr><td colspan='2'><strong>Game Date:</strong> $ggdate</td></tr> <tr><td colspan='2'><strong>Game Time:</strong> $ggtime</td></tr> <tr><td colspan='2'><strong>Location:</strong> $llocname</td></tr> <tr><td colspan='2'><strong>Location Address:</strong> $llocaddress</td></tr> <tr><td colspan='2'><strong>Assigner's Telephone:</strong> $phone</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><u>To see more details please login to your account</u></td></tr> <tr><td colspan='2'>With the kindest regards,</td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><b>Referee Assign System<br><a href='$sitepath' target='_blank'>$sitepath</a></b></td></tr> </table> </body> </html>"; $to=$email; $subject="GAME CHANGED: $ggdate $hhtname vs $aatname"; $from="no-reply@njsa-assignments.com"; //echo $mailcontent; @SendHTMLMail1($to,$subject,$mailcontent,$from); } } //exit; $que="UPDATE games set div_id=$div_id, league_id=$league, home_team_id=$home_team_id, away_team_id=$away_team_id, htmanager='$htmanager', telephone='$telephone', gdate='$gdate', gtime='$gtime', location_id='$location_id' where id=$currid"; $run=mysql_query($que); echo mysql_error(); header('location:message.php?mid=2'); } } else { $telephone = addslashes($_POST["txttelephone"]); $htmanager = addslashes($_POST["txthtmanager"]); $ggid = addslashes($_POST["txtid"]); $div_id = addslashes($_POST["drpdivision"]); $league = addslashes($_POST["drpleague"]); $home_team_id= addslashes($_POST["drphometeam"]); $away_team_id= addslashes($_POST["drpawayteam"]); $gid = addslashes($_POST["txtid"]); $gdate = addslashes($_POST["txtdate"]); $kgdate=explode('-',$gdate); $gdate=$kgdate[2].'-'.$kgdate[0].'-'.$kgdate[1]; $time = addslashes($_POST["drptime"]); $time2 = addslashes($_POST["drptime2"]); $ampm = addslashes($_POST["drpampm"]); $location_id= addslashes($_POST["drplocations"]); $gtime=$time.':'.$time2.' '.$ampm; $sel="select gid from games where gid='".$ggid."'"; $res=mysql_query($sel); if(mysql_num_rows($res) > 0) { $msg=1; } else { $que="insert into games set div_id=$div_id, league_id=$league, home_team_id=$home_team_id, away_team_id=$away_team_id, htmanager='$htmanager', telephone='$telephone', gdate='$gdate', gtime='$gtime', location_id='$location_id'"; $run=mysql_query($que); $gid=mysql_insert_id(); $que2="update games set gid='$gid' where id=".$gid; mysql_query($que2); echo mysql_error(); header('location:message.php?mid=1'); } } } if($_GET["id"]) { //DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y'); $selsql= "select * from games where id=".$_GET["id"] ; $selres = mysql_query($selsql); $selobj = mysql_fetch_object($selres); $league = stripslashes($selobj->league_id); $div_id = stripslashes($selobj->div_id); $home_team_id = stripslashes($selobj->home_team_id); $away_team_id = stripslashes($selobj->away_team_id); $htmanager = stripslashes($selobj->htmanager); $telephone = stripslashes($selobj->telephone); $gid = stripslashes($selobj->gid); $lastid = stripslashes($selobj->gid); $gdate = stripslashes($selobj->gdate); $kgdate=explode('-',$gdate); $gdate=$kgdate[1].'-'.$kgdate[2].'-'.$kgdate[0]; $gtime = stripslashes($selobj->gtime); $htime=explode(':',$gtime); $ampm=explode(' ',$htime[1]); $location_id = stripslashes($selobj->location_id); } else { $sql_maxid="select max(id) as maxid from games"; $res_maxid=mysql_query($sql_maxid); $row_maxid=mysql_fetch_array($res_maxid); $lastid=$row_maxid[0]; $lastid++; } if($_GET['divid']!='') $div_id=$_GET['divid']; if($_GET['league_id']!='') { $league=$_GET['league_id']; } if($_GET['tid']!='') { $sql_team="select htmanager,phone from teams where id=".$_GET['tid']; $res_team=mysql_query($sql_team); $row_team=mysql_fetch_object($res_team); $htmanager = stripslashes($row_team->htmanager); $telephone = stripslashes($row_team->phone); $home_team_id=$_GET['tid']; } ?> <!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("drpleague").value=="") { alert("Please Select League"); document.getElementById("drpleague").focus(); return false; } if(document.getElementById("drpdivision").value=="") { alert("Please Select Division"); document.getElementById("drpdivision").focus(); return false; } if(document.getElementById("drphometeam").value=="") { alert("Please Select Home Team"); document.getElementById("drphometeam").focus(); return false; } if(document.getElementById("drpawayteam").value=="") { alert("Please Select Away Team"); document.getElementById("drpawayteam").focus(); return false; } if(document.getElementById("drphometeam").value==document.getElementById("drpawayteam").value) { alert("Home Team and Away Team can not be Same."); document.getElementById("drpawayteam").focus(); return false; } if(document.getElementById("txthtmanager").value=="") { alert("Please Enter Home Team Manager"); document.getElementById("txthtmanager").focus(); return false; } if(document.getElementById("txttelephone").value=="") { alert("Please Enter Telephone"); document.getElementById("txttelephone").focus(); return false; } if(document.getElementById("txtdate").value=="") { alert("Please Select Game Date"); document.getElementById("txtdate").focus(); return false; } if(document.getElementById("drptime").value=="") { alert("Please Select Hours"); document.getElementById("drptime").focus(); return false; } if(document.getElementById("drptime2").value=="") { alert("Please Select Minutes"); document.getElementById("drptime2").focus(); return false; } if(document.getElementById("drplocations").value=="") { alert("Please Select Locations"); document.getElementById("drplocations").focus(); return false; } } function showteams(val) { window.location.href="add_game.php?divid=" + val + "&id=" + document.getElementById('id').value + "&league_id=" + document.getElementById('drpleague').value; } function show_manager(val,divid) { window.location.href="add_game.php?divid=" + divid + "&id=" + document.getElementById('id').value + "&tid=" + val + "&league_id=" + document.getElementById('drpleague').value; } function show_divisions(val) { window.location.href='add_game.php?league_id=' + val + '&htmanager=' + document.getElementById('txthtmanager').value + '&telephone=' + document.getElementById('txttelephone').value + '&id=' + document.getElementById('id').value; } </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"> </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":"Add"; ?> <?=$pagetitle?></TD></TR> <TR><TD background="images/vdots.gif"></TD></TR> <? if($msg==1) { ?> <tr><td class="error" height="30"><font color="red"><strong>Game ID Already Exist!</strong></font></td></tr> <? } ?> <TR> <TD> <form method="post" enctype="multipart/form-data" name="frm"> <table width="90%" border="0" align="left" cellpadding="3" cellspacing="3" class="solidinput"> <tr> <td colspan="2" align="right" class="menu-a"><span class="a-l">* indicates required field</span> </td> </tr> <tr> <td class="H4" colspan="2" align="left"><?=$pagetitle?> Information </td> </tr> <tr> <td width="37%" align="right"><font color="red">*</font> Game ID:</td> <td width="63%"><font color="<?=$col?>"><?=$lastid?> </font></td> </tr> <tr> <td width="37%" align="right"><font color="red">*</font> League Name:</td> <td width="63%"><font color="<?=$col?>"><select name="drpleague" id="drpleague" style="width:180px" 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> </font></td> </tr> <? if(!isset($_GET['league_id'])) { ?> <input type="hidden" id="old_drpleague" name="old_drpleague" value="<?=$league?>"> <? } ?> <? if($league!='') { ?> <tr> <td width="37%" align="right"><font color="red">*</font> Division:</td> <td width="63%"><font color="<?=$col?>"> <select name="drpdivision" id="drpdivision" style="width:180px" onChange="showteams(this.value)"> <option value="">--Select--</option> <? $sql_div="select * from divisions where league_id=".$league." order by dname"; $res_div=mysql_query($sql_div); while($row_div=mysql_fetch_object($res_div)) { ?> <option value="<?=$row_div->id;?>" <? if($div_id==$row_div->id) echo "selected='selected'"; ?>><?=$row_div->dname;?></option> <? } ?> </select> <? if(!isset($_GET['divid'])) { ?> <input type="hidden" id="old_drpdivision" name="old_drpdivision" value="<?=$div_id?>"> <? } ?> </font></td> </tr> <? } ?> <? if($div_id!='') { ?> <tr> <td width="37%" align="right"><font color="red">*</font> Home Team:</td> <td width="63%"><font color="<?=$col?>"> <select name="drphometeam" id="drphometeam" style="width:180px" onChange="show_manager(this.value,'<?=$_GET['divid']?>')"> <option value="">--Select--</option> <? $sql_home_team="select * from teams where div_id=".$div_id." order by tname"; $res_home_team=mysql_query($sql_home_team); while($row_home_team=mysql_fetch_object($res_home_team)) { ?> <option value="<?=$row_home_team->id;?>" <? if($home_team_id==$row_home_team->id) echo "selected='selected'"; ?>><?=$row_home_team->tname;?></option> <? } ?> </select> </font> <input type="hidden" id="old_drphometeam" name="old_drphometeam" value="<?=$home_team_id?>"> </td> </tr> <tr> <td width="37%" align="right"><font color="red">*</font> Away Team:</td> <td width="63%"><font color="<?=$col?>"> <select name="drpawayteam" id="drpawayteam" style="width:180px"> <option value="">--Select--</option> <? $sql_away_team="select * from teams where div_id=".$div_id." order by tname"; $res_away_team=mysql_query($sql_away_team); while($row_away_team=mysql_fetch_object($res_away_team)) { ?> <option value="<?=$row_away_team->id;?>" <? if($away_team_id==$row_away_team->id) echo "selected='selected'"; ?>><?=$row_away_team->tname;?></option> <? } ?> </select> </font> <input type="hidden" id="old_drpawayteam" name="old_drpawayteam" value="<?=$away_team_id?>"> </td> </tr> <? } ?> <tr> <td width="37%" align="right"><font color="red"></font> Home Team Manager:</td> <td width="63%"><font color="<?=$col?>"><?=$htmanager?> <input type="hidden" name="txthtmanager" id="txthtmanager" size="40" value="<?=stripslashes($htmanager);?>"><input type="hidden" id="old_txthtmanager" name="old_txthtmanager" value="<?=$htmanager?>"> </font></td> </tr> <tr> <td width="37%" align="right"><font color="red"></font> Telephone:</td> <td width="63%"><font color="<?=$col?>"><?=$telephone?> <input type="hidden" name="txttelephone" id="txttelephone" size="40" value="<?=stripslashes($telephone);?>"><input type="hidden" id="old_txttelephone" name="old_txttelephone" value="<?=$telephone?>"> </font></td> </tr> <tr> <td width="37%" align="right"><font color="red">*</font> Date: </td> <td width="63%"><font color="<?=$col?>"> <input type="text" readonly="true" name="txtdate" id="txtdate" size="20" value="<?=stripslashes($gdate);?>"> <a href="#" onClick="getCalendar(document.getElementById('txtdate'));">Select Date</a> </font><input type="hidden" id="old_txtdate" name="old_txtdate" value="<?=$gdate?>"></td> </tr> <tr> <td width="37%" align="right"><font color="red">*</font> Time: </td> <td width="63%"><font color="<?=$col?>"> <select name="drptime" id="drptime"> <option value="">Hrs</option> <option value="01" <? if($htime[0]=='01') echo "selected='selected'"; ?>>01</option> <option value="02" <? if($htime[0]=='02') echo "selected='selected'"; ?>>02</option> <option value="03" <? if($htime[0]=='03') echo "selected='selected'"; ?>>03</option> <option value="04" <? if($htime[0]=='04') echo "selected='selected'"; ?>>04</option> <option value="05" <? if($htime[0]=='05') echo "selected='selected'"; ?>>05</option> <option value="06" <? if($htime[0]=='06') echo "selected='selected'"; ?>>06</option> <option value="07" <? if($htime[0]=='07') echo "selected='selected'"; ?>>07</option> <option value="08" <? if($htime[0]=='08') echo "selected='selected'"; ?>>08</option> <option value="09" <? if($htime[0]=='09') echo "selected='selected'"; ?>>09</option> <option value="10" <? if($htime[0]=='10') echo "selected='selected'"; ?>>10</option> <option value="11" <? if($htime[0]=='11') echo "selected='selected'"; ?>>11</option> <option value="12" <? if($htime[0]=='12') echo "selected='selected'"; ?>>12</option> </select> <input type="hidden" id="old_drptime" name="old_drptime" value="<?=$htime[0]?>"> <select name="drptime2" id="drptime2"> <option value="">Min</option> <? for($i=0;$i<=59;$i++) { ?> <? if($i<=9) { ?> <option value="<?='0'.$i?>" <? if($ampm[0]=='0'.$i) echo "selected='selected'"; ?>><?='0'.$i;?></option> <? } else { ?> <option value="<?=$i?>" <? if($ampm[0]==$i) echo "selected='selected'"; ?>><?=$i;?></option> <? } ?> <? } ?> </select> <input type="hidden" id="old_drptime2" name="old_drptime2" value="<?=$ampm[0]?>"> <select name="drpampm" id="drpampm"> <option value="AM" <? if($ampm[1]=='AM') echo "selected='selected'"; ?>>AM</option> <option value="PM" <? if($ampm[1]=='PM') echo "selected='selected'"; ?>>PM</option> </select> <input type="hidden" id="old_drpampm" name="old_drpampm" value="<?=$ampm[0]?>"> </font></td> </tr> <tr> <td width="37%" align="right"><font color="red">*</font> Location: </td> <td width="63%"><font color="<?=$col?>"> <select name="drplocations" id="drplocations" style="width:180px"> <option value="">--Select--</option> <? $sql_loc="select * from locations order by lname asc"; $res_loc=mysql_query($sql_loc); while($row_loc=mysql_fetch_object($res_loc)) { ?> <span style="text-transform:uppercase;"><option value="<?=$row_loc->id;?>" <? if($location_id==$row_loc->id) echo "selected='selected'"; ?>><?=$row_loc->lname;?></option></span> <? } ?> </select> </font> <input type="hidden" id="old_drplocations" name="old_drplocations" value="<?=$location_id?>"> </td> </tr> <tr> <td> <input type="hidden" value="<?=$_GET["id"]; ?>" id="id" name="id"></td> <td><input name="Submit" type="submit" class="buttonclass" value="Submit" onClick="return kyb_check();" /></td> <input type="hidden" name="sub1" value="1"> </tr> </table> </form> </TD> </TR> </TABLE> </td> </tr> </TABLE> </BODY></HTML>
  20. I want to add the uppercase here, but it is not working, why? what should I change? <select name="drplocations" id="drplocations" style="width:180px"> <option value="">--Select--</option> <? $sql_loc="select * from locations order by lname asc"; $res_loc=mysql_query($sql_loc); while($row_loc=mysql_fetch_object($res_loc)) { ?> <span style="text-transform:uppercase;"><option value="<?=$row_loc->id;?>" <? if($location_id==$row_loc->id) echo "selected='selected'"; ?>><?=$row_loc->lname;?></option></span> <? } ?> </select>
  21. Maybe I am putting it int he wrong place. What line should I add this order? this is the code: <?php include("connect.php"); include("admin.session.php"); require_once("dbfunctions.php"); $LeftLinkSection = 1; $pagetitle="A Referee To a Game"; $qstr=$_SERVER['QUERY_STRING']; if($_REQUEST["sub2"]==1) { for($i=1;$i<=$_REQUEST['max'];$i++) { $gid=$_REQUEST['gid'.$i.'']; $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'.$i.'']; $ast_ref_id1=$_REQUEST['astref1_'.$i.'']; $ast_ref_id2=$_REQUEST['astref2_'.$i.'']; $main_ref_fee=$_REQUEST['mainref_fee'.$i.'']; $ast_ref1_fee=$_REQUEST['astref_fee'.$i.'']; $ast_ref2_fee=$_REQUEST['astref_fee'.$i.'']; $htmanager = $_REQUEST['htmanager'.$i.'']; $telephone = $_REQUEST['telephone'.$i.'']; $reffee = $_REQUEST['reffee'.$i.'']; $dname = $_REQUEST['dname'.$i.'']; $leaname = $_REQUEST['leaname'.$i.'']; $league_address = $_REQUEST['league_address'.$i.'']; $htname = $_REQUEST['htname'.$i.'']; $atname = $_REQUEST['atname'.$i.'']; $gdate = $_REQUEST['gdate'.$i.'']; $gtime = $_REQUEST['gtime'.$i.'']; $locname = $_REQUEST['lname'.$i.'']; $address = $_REQUEST['address'.$i.'']; if($main_ref_id=='') $main_ref_id=0; if($ast_ref_id1=='') $ast_ref_id1=0; if($ast_ref_id2=='') $ast_ref_id2=0; if($main_ref_id!=0 || $ast_ref_id1!=0 || $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) or die(mysql_error()); //print('aaa<br>'.$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:jzangrilli@njsa-assignments.com' target='_blank'>jzangrilli@njsa-assignments.com</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="no-reply@njsa-assignments.com"; /* 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:jzangrilli@njsa-assignments.com' target='_blank'>jzangrilli@njsa-assignments.com</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="no-reply@njsa-assignments.com"; //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:jzangrilli@njsa-assignments.com' target='_blank'>jzangrilli@njsa-assignments.com</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="no-reply@njsa-assignments.com"; @SendHTMLMail1($to,$subject,$mailcontent,$from); } //exit; } } //die("done"); 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 printPopup() { var sql=document.getElementById('sql').value; var a = window.open("print.php?sql="+sql,"Print","width=800px,height=500px,scrollbars=1"); } function kyb_check() { var mx=document.getElementById('max').value; //alert(mx); for(i=1;i<=mx;i++) { if(document.getElementById("astref1_"+i)!=null && document.getElementById("mainref"+i)!=null) { if(document.getElementById("mainref"+i).value!='' && document.getElementById("astref1_"+i).value!='') { if(document.getElementById("mainref"+i).value==document.getElementById("astref1_"+i).value) { alert("Main Referee and Assistant Referee can not be Same for game. Please check again"); document.getElementById("mainref"+i).focus(); return false; } } } if(document.getElementById("astref2_"+i)!=null && document.getElementById("mainref"+i)!=null) { if(document.getElementById("mainref"+i).value!='' && document.getElementById("astref2_"+i).value!='') { if(document.getElementById("mainref"+i).value==document.getElementById("astref2_"+i).value) { alert("Main Referee and Assistant Referee can not be Same for game. Please check again"); document.getElementById("mainref"+i).focus(); return false; } } } if(document.getElementById("astref1_"+i)!=null && document.getElementById("astref2_"+i)!=null) { if(document.getElementById("astref1_"+i).value!='' && document.getElementById("astref2_"+i).value!='') { if(document.getElementById("astref1_"+i).value==document.getElementById("astref2_"+i).value) { alert("Assistant Referee 1 and Assistant Referee 2 can not be Same for game. Please check again"); document.getElementById("astref1_"+i).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() { //alert("Aa"); 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 width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td> </td> </tr> <tr> <td valign="top"> </td> </tr> <tr> <td><form name="frmgetgames" id="frmgetgames" method="post"> <table width="581" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="100%" colspan="2" align="left" class="solidinput"> <div 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();"> </div></td> </tr> </table> <div align="center"></div> <div align="center"></div> </form></td> </tr> <tr> <td> </td> </tr> </table> <div align="right"> <? if(isset($_REQUEST['sub1']) && $_REQUEST['sub1']=='1') { ?> <? $sql_games="select * from games where gid not in (select gid from assigned_games)"; if($txtfromdate!='') { $sql_games.=" and gdate >='".$txtfromdate."' and gdate<='".$txttodate."'"; } if($_REQUEST['drpdivisions']!='') { $sql_games.=" and div_id=".$_REQUEST['drpdivisions']; } if($_REQUEST['drpleague']!='') { $sql_games.=" and league_id=".$_REQUEST['drpleague']; $league=$_REQUEST['drpleague']; } //print('aa'.$sql_games); $rs_games=mysql_query($sql_games) or die('aa'.mysql_error()); $max=0; if(mysql_num_rows($rs_games)>0) { ?> <img src="images/print_icon.jpg" alt="Print" width="35" height="39" onClick="printPopup()" style="cursor:pointer;"> </div> <form name="form1" method="post" action=""> <table width="100%" cellpadding="2" cellspacing="0" class="t-a"> <tr> <td height="42" colspan="9" class="H4">Assign Referee to A Game </td> </tr> <tr> <td width="6%" height="27" class="th-a">League </td> <td width="6%" class="th-a">Division</td> <td width="10%" class="th-a">Home Team</td> <td width="9%" class="th-a">Away Team</td> <td width="8%" class="th-a">Date of Game</td> <td width="6%" class="th-a"> Time</td> <td width="11%" class="th-a">Location Name</td> <td width="13%" class="th-a">Location Address</td> <td width="31%" class="th-a">Referees</td> </tr> <? while($row_games=mysql_fetch_object($rs_games)) { $league=getLeague($row_games->league_id); $leaguecode=$league->league_code; $leaguename=$league->league_name; $leagueaddress=$league->address; $division=getDivision($row_games->div_id); $divisioncode=$division->dcode; $divisionname=$division->dname; $MainRefereeFee=$division->mainref_fee; $AstRefereeFee=$division->astref_fee; $HomeTeam=getTeam($row_games->home_team_id); $HomeTeamName=$HomeTeam->tname; $HomeTeamManager=$HomeTeam->htmanager; $HomeTeamPhone=$HomeTeam->phone; $AwayTeam=getTeam($row_games->away_team_id); $AwayTeamName=$AwayTeam->tname; $txtgdate=$row_games->gdate; $txtgdate_arr=explode("-",$txtgdate); $txtgdate=$txtgdate_arr[1].'-'.$txtgdate_arr[2].'-'.$txtgdate_arr[0]; $txtgtime=$row_games->gtime; $txtgtime_arr=explode("-",$txtgtime); $txtgtime=$txtgtime_arr[1].''.$txtgtime_arr[2].''.$txtgtime_arr[0]; $row_location=getLocation($row_games->location_id); $loc_name=$row_location->lname; $loc_address=$row_location->address; $max++; print('<tr> <td>'.$leaguecode.'<input type="hidden" id="leaname'.$max.'" name="leaname'.$max.'" value="'.$leaguename.'"><input type="hidden" id="league_address'.$max.'" name="league_address'.$max.'" value="'.$leagueaddress.'"></td> <td>'.$divisioncode.'<input type="hidden" id="dname'.$max.'" name="dname'.$max.'" value="'.$divisionname.'"></td> <td>'.$HomeTeamName.'<input type="hidden" id="htname'.$max.'" name="htname'.$max.'" value="'.$HomeTeamName.'"></td> <td>'.$AwayTeamName.'<input type="hidden" id="atname'.$max.'" name="atname'.$max.'" value="'.$AwayTeamName.'"> <input type="hidden" id="htmanager'.$max.'" name="htmanager'.$max.'" value="'.$HomeTeamManager.'"><input type="hidden" id="telephone'.$max.'" name="telephone'.$max.'" value="'.$HomeTeamPhone.'"></td> <td>'.$txtgdate.'<input type="hidden" id="gdate'.$max.'" name="gdate'.$max.'" value="'.$txtgdate.'"></td> <td>'.$txtgtime.'<input type="hidden" id="gtime'.$max.'" name="gtime'.$max.'" value="'.$txtgtime.'"></td> <td>'.$loc_name.'<input type="hidden" id="lname'.$max.'" name="lname'.$max.'" value="'.$loc_name.'"></td> <td>'.$loc_address.'<input type="hidden" id="address'.$max.'" name="address'.$max.'" value="'.$loc_address.'"></td> <td> Referee: '.getReferee($row_games->gdate,mainref.$max).'<input type="hidden" name="mainref_fee'.$max.'" value="'.$MainRefereeFee.'"><br><br> Assistant Referee 1: '.getReferee($row_games->gdate,astref1.'_'.$max).'<input type="hidden" name="astref_fee'.$max.'" value="'.$AstRefereeFee.'"><br><br> Assistant Referee 2: '.getReferee($row_games->gdate,astref2.'_'.$max).'<br> <input name="gid'.$max.'" type="hidden" value="'.$max.'"> </td> </tr> '); } ?> <tr> <td colspan="9"> </td> </tr> <tr> <td colspan="9"> <div align="center"> <input type="hidden" name="max" id="max" value="<?=$max?>"> <input name="Submit" type="submit" class="buttonclass" value="Submit" onClick="return kyb_check();" /> <input type="hidden" name="sql" id="sql" value="<?=$sql_games?>"> <input type="hidden" name="sub2" value="1"> </div></td> </tr> </table> </form> <? }//end of num rows if else { print('<div align="left"><font color="red"><strong>No Games will be played between these Dates!</strong></font></div>'); } ?> <? } ?> </td> </tr> </TABLE> </BODY></HTML>
  22. it's not working. It shows the divisioncode or date. And I want it that he first srot by divisioncode and then by date.
  23. Hi How can make it that the table will shown sort by: 1. Date, 2. Division Code. ? this is the code for that: <form name="form1" method="post" action=""> <table width="100%" cellpadding="2" cellspacing="0" class="t-a"> <tr> <td height="42" colspan="9" class="H4">Assign Referee to A Game </td> </tr> <tr> <td width="6%" height="27" class="th-a">League </td> <td width="6%" class="th-a">Division</td> <td width="10%" class="th-a">Home Team</td> <td width="9%" class="th-a">Away Team</td> <td width="8%" class="th-a">Date of Game</td> <td width="6%" class="th-a"> Time</td> <td width="11%" class="th-a">Location Name</td> <td width="13%" class="th-a">Location Address</td> <td width="31%" class="th-a">Referees</td> </tr> <? while($row_games=mysql_fetch_object($rs_games)) { $league=getLeague($row_games->league_id); $leaguecode=$league->league_code; $leaguename=$league->league_name; $leagueaddress=$league->address; $division=getDivision($row_games->div_id); $divisioncode=$division->dcode; $divisionname=$division->dname; $MainRefereeFee=$division->mainref_fee; $AstRefereeFee=$division->astref_fee; $HomeTeam=getTeam($row_games->home_team_id); $HomeTeamName=$HomeTeam->tname; $HomeTeamManager=$HomeTeam->htmanager; $HomeTeamPhone=$HomeTeam->phone; $AwayTeam=getTeam($row_games->away_team_id); $AwayTeamName=$AwayTeam->tname; $txtgdate=$row_games->gdate; $txtgdate_arr=explode("-",$txtgdate); $txtgdate=$txtgdate_arr[1].'-'.$txtgdate_arr[2].'-'.$txtgdate_arr[0]; $txtgtime=$row_games->gtime; $txtgtime_arr=explode("-",$txtgtime); $txtgtime=$txtgtime_arr[1].''.$txtgtime_arr[2].''.$txtgtime_arr[0]; $row_location=getLocation($row_games->location_id); $loc_name=$row_location->lname; $loc_address=$row_location->address; $max++; print('<tr> <td>'.$leaguecode.'<input type="hidden" id="leaname'.$max.'" name="leaname'.$max.'" value="'.$leaguename.'"><input type="hidden" id="league_address'.$max.'" name="league_address'.$max.'" value="'.$leagueaddress.'"></td> <td>'.$divisioncode.'<input type="hidden" id="dname'.$max.'" name="dname'.$max.'" value="'.$divisionname.'"></td> <td>'.$HomeTeamName.'<input type="hidden" id="htname'.$max.'" name="htname'.$max.'" value="'.$HomeTeamName.'"></td> <td>'.$AwayTeamName.'<input type="hidden" id="atname'.$max.'" name="atname'.$max.'" value="'.$AwayTeamName.'"> <input type="hidden" id="htmanager'.$max.'" name="htmanager'.$max.'" value="'.$HomeTeamManager.'"><input type="hidden" id="telephone'.$max.'" name="telephone'.$max.'" value="'.$HomeTeamPhone.'"></td> <td>'.$txtgdate.'<input type="hidden" id="gdate'.$max.'" name="gdate'.$max.'" value="'.$txtgdate.'"></td> <td>'.$txtgtime.'<input type="hidden" id="gtime'.$max.'" name="gtime'.$max.'" value="'.$txtgtime.'"></td> <td>'.$loc_name.'<input type="hidden" id="lname'.$max.'" name="lname'.$max.'" value="'.$loc_name.'"></td> <td>'.$loc_address.'<input type="hidden" id="address'.$max.'" name="address'.$max.'" value="'.$loc_address.'"></td> <td> (R): '.getReferee($row_games->gdate,mainref.$max).'<input type="hidden" name="mainref_fee'.$max.'" value="'.$MainRefereeFee.'"><br> (AR1): '.getReferee($row_games->gdate,astref1.'_'.$max).'<input type="hidden" name="astref_fee'.$max.'" value="'.$AstRefereeFee.'"><br> (AR2): '.getReferee($row_games->gdate,astref2.'_'.$max).'<br> <input name="gid'.$max.'" type="hidden" value="'.$max.'"> </td> </tr> '); } ?> <tr> <td colspan="9"> </td> </tr> <tr> <td colspan="9"> <div align="center"> <input type="hidden" name="max" id="max" value="<?=$max?>"> <input name="Submit" type="submit" class="buttonclass" value="Submit" onClick="return kyb_check();" /> <input type="hidden" name="sql" id="sql" value="<?=$sql_games?>"> <input type="hidden" name="sub2" value="1"> </div></td> </tr> </table> </form>
  24. the } is on line 169 <?php include("connect.php"); include("admin.session.php"); $LeftLinkSection = 1; $pagetitle="Assigned Games"; if(isset($_GET['did'])) { $sql="delete from games where id=".$_GET['did']; $res=mysql_query($sql); echo mysql_error(); header('location:message.php?mid=3'); } ?> <HTML> <HEAD><title><?=Site_Title; ?></title> <SCRIPT language="javascript" src="body.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"> <!-- .style3 {color: #FFFFFF} --> </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 valign="top" 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" bgcolor="#FFFFFF" height="480"> <TABLE width="97%" border=0 cellPadding=0 cellSpacing=0 align="center"> <TR><TD width="100%" class="H1"> </TD></TR> <TR><TD align="center" width="100%" class="a-l"><?php echo $Message2 ; ?></TD></TR> <TR> <? if($msg!="") { ?> <TR><TD align="center" width="100%" class="a-l"><font color="red"><b>User Deleted Successfully</b></font></TD></TR> <TR> <? } ?> <TD width="100%" class="H1">Manage <?=$pagetitle?></TD> </TR> <TR><TD background="images/vdots.gif"><IMG height=1 src="images/spacer.gif" width=1 border=0></TD></TR> <tr> <TD> <FORM name="order" action="#" method="post"> <TABLE cellSpacing=0 cellPadding=1 border=0 > <tr><td colspan="25" height="20"><b>View By Division Name</b></td></tr> <?=$prs_pageing->order();?> </TABLE> </form> <? if($_GET["order"]) { $order=$_GET["order"]; $strQueryPerPage="select ag.main_ref_accept,ag.ast_ref1_accept,ag.ast_ref2_accept,ag.id as agid,g.id,g.gid,d.dname,g.gdate,g.gtime,ht.tname as htname,at.tname as atname from games g inner join divisions d on g.div_id=d.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 assigned_games ag on g.gid=ag.gid where (main_ref_id=".$_SESSION["UsErId"]." or ast_ref_id1=".$_SESSION["UsErId"]." or ast_ref_id2=".$_SESSION["UsErId"].") and d.dname like '$order%'"; } else $strQueryPerPage="select ag.main_ref_accept,ag.ast_ref1_accept,ag.ast_ref2_accept,ag.id as agid,g.id,g.gid,d.dname,g.gdate,g.gtime,ht.tname as htname,at.tname as atname from games g inner join divisions d on g.div_id=d.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 assigned_games ag on g.gid=ag.gid where main_ref_id=".$_SESSION["UsErId"]." or ast_ref_id1=".$_SESSION["UsErId"]." or ast_ref_id2=".$_SESSION["UsErId"]; if(isset($_GET['sort'])) $strQueryPerPage.=" order by ".$_GET['sort']." ".$_GET['ordby']; else $strQueryPerPage.=" order by g.id desc"; //echo $strQueryPerPage; $strResultPerPage=mysql_query($strQueryPerPage); $strTotalPerPage=mysql_affected_rows(); ?> <div align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-4703789267650596"; /* 728x90, utworzono 10-03-10 */ google_ad_slot = "0969661517"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <script type="text/javascript"><!-- google_ad_client = "pub-4703789267650596"; /* 728x15, utworzono 09-12-14 */ google_ad_slot = "0676154885"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <FORM name="form2" action="#" method="post"> <TABLE width="100%" height="89" border=1 cellSpacing=0 class=t-a> <!--DWLayoutTable--> <TBODY> <TR class="th-a"> <TD colspan="9"> <? $result=$prs_pageing->number_pageing($strQueryPerPage,15,7); ?> </TD> </TR> <TR class=th-a> <TD width="8%" align="left"><a href="manage_games.php?sort=g.gdate&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Game Date</a></TD> <TD width="12%" align="left"><a href="assigned_games.php?sort=d.dname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Division Name</a></TD> <TD width="8%" align="left"><a href="manage_games.php?sort=g.gtime&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Game Time</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ht.tname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Home Team Name</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=at.tname&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Away Team Name</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ag.main_ref_accept&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Main Referee</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ag.ast_ref1_accept&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Assistant Referee 1</a></TD> <TD width="11%" align="left"><a href="assigned_games.php?sort=ag.ast_ref2_accept&<? if($_GET['ordby']=='asc' || $_GET['ordby']=='' ) {?>ordby=desc<? } else {?>ordby=asc<? } ?>" class="link2">Assistant Referee 2</a></TD> <TD width="16%" align="center"><span class="style3">Option</span></TD> </TR> <?php $tr="#f4f4f4"; $clr=1; $result=mysql_query($sql_assigned_games); while($row = mysql_fetch_object($result)) { if($tr=="#FFFFFF") { $tr="#efefef"; $col="#000000"; } else { $tr="#FFFFFF"; $col="#000000"; } $tmpid = $row->id ; $tmpid = ""; ?> <tr bgcolor="<? echo $tr; ?>"> <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?>"><? echo stripslashes($row->dname); ?></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') echo "<font color='#FF9900'><strong>Pending</strong></font>"; if($row->main_ref_accept=='A') echo "<font color='#006633'><strong>Accepted</strong></font>"; if($row->main_ref_accept=='R') echo "<font color='#FF0000'><strong>Rejected</strong></font>"; ?></font></TD> <TD align="left"><font color="<?=$col?>"> <? echo stripslashes($row->r2fname).' '.stripslashes($row->r2lname); ?></font><br><? if($row->ast_ref1_accept=='P') echo "<font color='#FF9900'><strong>Pending</strong></font>"; if($row->ast_ref1_accept=='A') echo "<font color='#006633'><strong>Accepted</strong></font>"; if($row->ast_ref1_accept=='R') echo "<font color='#FF0000'><strong>Rejected</strong></font>"; ?></font></TD> <TD align="left"><font color="<?=$col?>"> <? echo stripslashes($row->r3fname).' '.stripslashes($row->r3lname); ?></font><br><? if($row->ast_ref2_accept=='P') echo "<font color='#FF9900'><strong>Pending</strong></font>"; if($row->ast_ref2_accept=='A') echo "<font color='#006633'><strong>Accepted</strong></font>"; if($row->ast_ref2_accept=='R') echo "<font color='#FF0000'><strong>Rejected</strong></font>"; ?></font></TD> <TD align="center"><input name="button" type="button" class="bttn-s" onClick="location.href='view_assigned_game.php?id=<?php echo $row->agid; ?>'" value="View"> </TD> </TR> <? $parentary = NULL ; } ?> <input type=hidden name="total" value="<? echo $strTotalNewRow; ?>"> <TR align=center> <TD colSpan=8> <? if(!$strTotalPerPage) { ?> <strong>No Game Detail to Display</strong> <? } ?> </TD> </TR> <TR align=center> <TD colSpan=10> </TD> </TR> </TABLE> </FORM> </TD> </TR> </TABLE> </td> </tr> </TABLE> </BODY></HTML>
  25. Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in .../assigned_games.php on line 123 this time it is line123
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.