Jump to content

YogiBear

Member
  • Posts

    3
  • Joined

  • Last visited

About YogiBear

  • Birthday 10/15/1939

Profile Information

  • Gender
    Male
  • Location
    Leeds UK

YogiBear's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Ben here is whole page code from the old html site. Bob <?php require_once("config.php"); require_once(RESOURCES_PATH . "/functions.php"); $link = connectDb(); if (!isset($_SESSION)) { session_start(); } if (!empty($_SESSION['IdTeam'])) { $query = "SELECT location_id, location FROM location ORDER BY location"; $rsResult = mysql_query($query, $link) or die(mysql_error()); $locationList = '<select name="green" class="select" id="select-green">'; while ($row_rsResult = mysql_fetch_assoc($rsResult)){ $locationList .= '<option value="'.$row_rsResult['location_id'].'" '; $locationList .= '>'.$row_rsResult['location'].'</option>'; } $locationList .= '</select>'; $query = "SELECT division_id, division FROM division ORDER BY division"; $rsResult = mysql_query($query, $link) or die(mysql_error()); $divisionList = '<select name="division" class="select" id="select-division">'; while ($row_rsResult = mysql_fetch_assoc($rsResult)){ $divisionList .= '<option value="'.$row_rsResult['division_id'].'" '; $divisionList .= '>'.$row_rsResult['division'].'</option>'; } $divisionList .= '</select>'; $query = "SELECT team_id, team FROM teams ORDER BY team"; $rsResult = mysql_query($query, $link) or die(mysql_error()); $homeList = '<select name="homeTeam" class="select" id="select-home">'; $awayList = '<select name="awayTeam" class="select" id="select-away">'; $teamList = ''; while ($row_rsResult = mysql_fetch_assoc($rsResult)){ $teamList .= '<option value="'.$row_rsResult['team_id'].'" '; $teamList .= '>'.$row_rsResult['team'].'</option>'; } $homeList .= $teamList; $homeList .= '</select>'; $awayList .= $teamList; $awayList .= '</select>'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Home</title> <link href="http://www.casvets.co.uk/css/twoColVets.css" rel="stylesheet" type="text/css" /> <link href="http://www.casvets.co.uk/css/leftNav.css" rel="stylesheet" type="text/css" /> <link href="css/results.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="http://www.casvets.co.uk/css/menustyle.css" media="screen, print" /> <script src="http://www.casvets.co.uk/menuscript.js" language="javascript" type="text/javascript"></script> <script src="http://www.casvets.co.uk/Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <link type="text/css" href="styles/south-street/jquery-ui-1.8.10.custom.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js"></script> <script> $(document).ready(function(){ $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd' }); var $loading = $('<div class="loading"><img src="media/images/loading.gif" alt="Processing ..." /></div>'); $(".default").each(function(){ var defaultVal = $(this).attr('title'); $(this).focus(function(){ if ($(this).val() == defaultVal){ $(this).removeClass('active').val(''); } }); $(this).blur(function() { if ($(this).val() == ''){ $(this).addClass('active').val(defaultVal); } }) .blur().addClass('active'); }); $('#submit').click(function(e){ var $formId = $('#form-results'); var $container = $('#response'); defaulttextRemove(); var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; $('td',$formId).removeClass('error'); $('span.error').remove(); $('.required',$formId).each(function(){ var inputVal = $(this).val(); var $parentTag = $(this).parent(); if(inputVal == ''){ $parentTag.addClass('error').append('<span class="error">Required field</span>'); } if($(this).hasClass('email') == true){ if(!emailReg.test(inputVal)){ $parentTag.addClass('error').append('<span class="error">Enter a valid email address.</span>'); } } }); $('.numeric',$formId).each(function(){ var checkKeyup = $('#form-results .error-keyup').length; if(checkKeyup == 0){ var inputVal = $(this).val(); if(inputVal != ''){ var numericReg = /^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$/; if(!numericReg.test(inputVal)) { $('#score').addClass('error').append('<span class="error error-keyup">Numeric characters only.</span>'); } } } }); if ($('span.error').length == "0") { $container.empty().append($loading.clone()); $.post('user_functions.php', $formId.serialize(),function(data){ $('.loading').remove(); $container.append(data).fadeIn(); $('.text-input, .text-input-s, .text-input-l, .datepicker').val(''); }); } e.preventDefault(); }); $('.numeric').blur(function(){ var getTeam = $(this).attr('rel'); var subTotal = 0; var getHandicap = 0; $('.numeric.'+getTeam).each(function(){ var getVal = parseInt($(this).val()); if (!getVal) getVal = 0; if($(this).hasClass('handicap')){ getHandicap = getVal; getVal = 0; } subTotal = subTotal + getVal; total = subTotal + getHandicap; }); $('#'+getTeam+'Aggregate').val(subTotal); $('#'+getTeam+'Total').val(total); }); $('.numeric').keyup(function(){ var checkKeyup = $('#form-results .error-keyup').length; if(checkKeyup == 0){ $('span.error-keyup').remove(); $('#score').removeClass('error'); var inputVal = $(this).val(); if(inputVal != ''){ var numericReg = /^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$/; if(!numericReg.test(inputVal)) { $('#score').addClass('error').append('<span class="error error-keyup">Numeric characters only.</span>'); } } } }); $('#nav > li').hover( function(){ if ($('> a',this).attr('class') != 'active'){ $('#nav li ul').slideUp(); $('a',this).next().slideToggle(); $('#nav li a').removeClass('active'); $('> a',this).addClass('active'); } }, function(){ $('#nav li ul').slideUp(); $('#nav li a').removeClass('active'); }); }); function defaulttextRemove(){ $('.default').each(function(){ var defaultVal = $(this).attr('title'); if ($(this).val() == defaultVal){ $(this).val(''); } }); } </script> </head> <body> <div id="container"> <div id="header"> <div id="crest"><img name="crest" src="assets/logos/casVetsCrest.jpg" width="150" height="175" alt="" /></div> <div id="banner"><img src="assets/headers/casVetsHeader-1.jpg" alt="" name="header" width="800" height="175" id="header2" /></div> </div> <div id="mainContent"> <?php if (!empty($_SESSION['IdTeam'])) { ?> <form id="form-results" method="post" action="user_functions.php"> <table width="726" cellpadding="0" cellspacing="1" border="0"> <tr> <th colspan="7" scope="col"><h1>Castleford & District Veterans Bowling Association</h1></th> </tr> <tr> <th colspan="7" scope="col"><h2>Online Match Results Card</h2></th> </tr> <tr> <td> </td> <td colspan="3"><strong>Match*</strong></td> <td colspan="3"><strong>Date</strong></td> </tr> <tr> <td> </td> <td colspan="3"><?php echo $divisionList; ?></td> <td colspan="3"><input name="date" type="text" id="date" size="20" class="input-text datepicker" /></td> </tr> <tr> <td> </td> <td colspan="3"><strong>Played At*</strong></td> <td colspan="3" nowrap="nowrap">Name of Person compiling this Result Sheet*</td> </tr> <tr> <td> </td> <td colspan="3"><?php echo $locationList; ?></td> <td colspan="3"><input type="text" name="submitted" id="input-submitted" class="text-input large required" /></td> </tr> <tr> <td> </td> <td colspan="3"><strong>Teams</strong>*</td> <td colspan="3"><strong>Verses</strong></td> </tr> <tr> <td> </td> <td colspan="3"><?php echo $homeList; ?></td> <td colspan="3"><?php echo $awayList; ?></td> </tr> <tr> <td><h3>Nº</h3></td> <td><h3>First Name</h3></td> <td><h3>Last Name</h3></td> <td colspan="2" align="center"><h3><strong>scores</strong></h3> <td><h3>First Name</h3></td> <td><h3>Last Name</h3></td> </tr> <tr> <td colspan="7" id="score"> </td> </tr> <tr> <td align="center"><strong>01</strong></td> <td><input name="homeFirst1" type="text" id="homeFirst1" class="text-input" size="15" /></td> <td><input name="homeLast1" type="text" id="homeLast1" class="text-input" size="15" /></td> <td><input name="home1" type="text" id="home-1" class="text-input-s numeric home" rel="home" value="" size="6" /></td> <td><input name="away1" type="text" id="home-1" class="text-input-s numeric away" rel="away" value="" size="6" /></td> <td><input name="awayFirst1" type="text" id="awayFirst1" class="text-input" size="15" /></td> <td><input name="awayLast1" type="text" id="awayLast1" class="text-input" size="20" /></td> </tr> <tr> <td align="center"><strong>02</strong></td> <td><input name="homeFirst2" type="text" id="homeFirst2" class="text-input" size="15" /></td> <td><input name="homeLast2" type="text" id="homeLast2" class="text-input" size="15" /></td> <td><input name="home2" type="text" id="home-2" class="text-input-s numeric home" rel="home" value="" size="6" /></td> <td><input name="away2" type="text" id="home-2" class="text-input-s numeric away" rel="away" value="" size="6" /></td> <td><input name="awayFirst2" type="text" id="awayFirst2" class="text-input" size="15" /></td> <td><input name="awayLast2" type="text" id="awayLast2" class="text-input" size="20" /></td> </tr> <tr> <td align="center"><strong>03</strong></td> <td><input name="homeFirst3" type="text" id="homeFirst3" class="text-input" size="15" /></td> <td><input name="homeLast3" type="text" id="homeLast3" class="text-input" size="15" /></td> <td><input name="home3" type="text" id="home-3" class="text-input-s numeric home" rel="home" value="" size="6" /></td> <td><input name="away3" type="text" id="home-3" class="text-input-s numeric away" rel="away" value="" size="6" /></td> <td><input name="awayFirst3" type="text" id="awayFirst3" class="text-input" size="15" /></td> <td><input name="awayLast3" type="text" id="awayLast3" class="text-input" size="20" /></td> </tr> <tr> <td align="center"><strong>04</strong></td> <td><input name="homeFirst4" type="text" id="homeFirst4" class="text-input" size="15" /></td> <td><input name="homeLast4" type="text" id="homeLast4" class="text-input" size="15" /></td> <td><input name="home4" type="text" id="home-4" class="text-input-s numeric home" rel="home" value="" size="6" /></td> <td><input name="away4" type="text" id="home-4" class="text-input-s numeric away" rel="away" value="" size="6" /></td> <td><input name="awayFirst4" type="text" id="awayFirst4" class="text-input" size="15" /></td> <td><input name="awayLast4" type="text" id="awayLast4" class="text-input" size="20" /></td> </tr> <tr> <td align="center"><strong>05</strong></td> <td><input name="homeFirst5" type="text" id="homeFirst5" class="text-input" size="15" /></td> <td><input name="homeLast5" type="text" id="homeLast5" class="text-input" size="15" /></td> <td><input name="home5" type="text" id="home-5" class="text-input-s numeric home" rel="home" value="" size="6" /></td> <td><input name="away5" type="text" id="home-5" class="text-input-s numeric away" rel="away" value="" size="6" /></td> <td><input name="awayFirst5" type="text" id="awayFirst5" class="text-input" size="15" /></td> <td><input name="awayLast5" type="text" id="awayLast5" class="text-input" size="20" /></td> </tr> <tr> <td align="center"><strong>06</strong></td> <td><input name="homeFirst6" type="text" id="homeFirst6" class="text-input" size="15" /></td> <td><input name="homeLast6" type="text" id="homeLast6" class="text-input" size="15" /></td> <td><input name="home6" type="text" id="home-6" class="text-input-s numeric home" rel="home" value="" size="6" /></td> <td><input name="away6" type="text" id="home-6" class="text-input-s numeric away" rel="away" value="" size="6" /></td> <td><input name="awayFirst6" type="text" id="awayFirst6" class="text-input" size="15" /></td> <td><input name="awayLast6" type="text" id="awayLast6" class="text-input" size="20" /></td> </tr> <tr> <td colspan="2" valign="middle"> </td> <td valign="middle" align="right"><strong>Aggregate</strong></td> <td><input name="homeAggregate" id="homeAggregate" type="text" class="text-input-s" value="" rel="home" size="6" readOnly="readOnly" /></td> <td><input name="awayAggregate" id="awayAggregate" type="text" class="text-input-s" value="" rel="away" size="6" readOnly="readOnly" /></td> <td align="left"><strong>Aggregate</strong></td> <td> </td> </tr> <tr> <td colspan="2" valign="middle"> </td> <td valign="middle" align="right"><strong>+Handicap</strong></td> <td><input name="homeHandicap" id="homeHandicap" type="text" class="text-input-s numeric home handicap" rel="home" value="0" size="6" /></td> <td><input name="awayHandicap" id="awayHandicap" type="text" class="text-input-s numeric away handicap" rel="away" value="0" size="6" /></td> <td align="left"><strong>+Handicap</strong></td> <td> </td> </tr> <tr> <td colspan="2" valign="middle"> </td> <td valign="middle" align="right"><strong>Total</strong></td> <td><input name="homeTotal" id="homeTotal" type="text" class="text-input-s" value="" size="6" rel="home" readOnly="readOnly" /></td> <td><input name="awayTotal" id="awayTotal" type="text" class="text-input-s" value="" size="6" rel="away" readOnly="readOnly" /></td> <td align="left"><strong>Total</strong></td> <td> </td> </tr> <tr> <td colspan="3" align="right">Senders e-mail address: *</td> <td colspan="4"><input type="text" name="email" id="input-email" class="text-input required email" /></td> <tr> <td colspan="3" align="right">Submit This Card</td> <td colspan="3"> <input type="hidden" name="action" value="score" /> <input type="submit" name="submit" id="submit" value="Submit" /> </td> <td> </td> </tr> <tr> <td colspan="7" id="response"></td> </tr> <tr> <td colspan="7"><h5 class="style9 style15">Completing this form will help speed up the publication of league data, But to comply with the rules of the Castleford & District Veterans Bowling Association, the home, or first named team MUST complete and post the OFFICIAL results card</h5></td> </tr> </table> </form> <?php } else { ?> <form id="form-results-login" method="post" action="user_functions.php"> <table width="726" cellpadding="0" cellspacing="1" border="0"> <tr> <th colspan="7" scope="col"><h1>Castleford & District Veterans Bowling Association</h1></th> </tr> <tr> <th colspan="7" scope="col"><h2>Online Match Results Card</h2></th> </tr> <tr> <th colspan="7" scope="col"><div style="height: 20px;"></div></th> </tr> <?php if($_GET['login'] == "error"){ ?> <tr> <th colspan="7"><h2><span class="error">Login error! Please try again</span></h2></th> </tr> <?php } else { ?> <tr> <th colspan="7"><h2>Please login to input results</h2></th> </tr> <?php } ?> <tr> <td colspan="7" align="center">Password: * <input type="password" name="password" id="input-password" class="text-input required" /> <input type="submit" name="submit" id="login" value="Login" /></td></tr> <tr colspan="7"><td><div style="height: 50px;"><input type="hidden" name="action" value="login" /></div></td></tr> </table> <?php } ?> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <!-- end #mainContent --> <div id="leftnav"> <ul id="nav"> <li> <div align="center"><a href="/index.html">Home</a></div> </li> <li> <div align="center"><a href="#">Rules</a> <ul> <li><a href="/rules.html">Associations Rules</a></li> <li><a href="/comprules.html">Competition Rules</a></li> <li><a href="/lengarbettrules.html">Len Garbett Rules</a></li> <li><a href="/lenpickrules.html">Len Pickersgill Rules</a></li> <li><a href="/intdistrules.html">Inter District Rules</a></li> <li><a href="/dresscode.html">Dress Code</a></li> </ul> </div> </li> <li> <div align="center"><a href="/archives.html">Archives</a></div> </li> <li> <div align="center"><a href="/calendar.html">Calendar</a></div> </li> <li> <div align="center"><a href="/clubcontacts.html">Club Contacts</a></div> </li> <li> <div align="center"><a href="#">Competitions</a> <ul> <li><a href="/pairs.html">Pairs</a></li> <li><a href="/merits.html">Merits</a></li> <li><a href="/hadicapsingles.html">Handicap Singles</a></li> <li><a href="/mixedpairs.html">Mixed Pairs</a></li> <li><a href="/ladiesmerits.html">Ladies Merits</a></li> </ul> </div> </li> <li> <div align="center"><a href="#">Contact Us</a> <ul> <li><a href="/compsec/form.html">Competition Sec</a></li> <li><a href="/fixsec/form.html">Fixture Sec</a></li> <li><a href="/secretary/form.html">Secretary</a></li> <li><a href="/webmaster/form.html">Webmaster</a></li> </ul> </div> </li> <li> <div align="center"><a href="#">Cup Results</a> <ul> <li><a href="/lenpickersgill.html">Len Pickersgill</a></li> <li><a href="/lengarbett.html">Len Garbett</a></li> </ul> </div> </li> <li> <div align="center"><a href="/greenFinder.html">Green Finder</a></div> </li> <li> <div align="center"><a href="/links.html">Links</a></div> </li> <li> <div align="center"><a href="/management.html">Management</a></div> </li> <li> <div align="center"><a href="/noticeboard.html">Notice Board</a></div> </li> <li> <div align="center"><a href="results.php">Results Card</a></div> </li> <li> <div align="center"><a href="/leaguetables.html">Tables</a></div> </li> <li> <div align="center"><a href="/leagueresults.html#premiersection">Premier Section Results</a></div> </li> <li> <div align="center"><a href="/leagueresults.html#sectiona">Section 'A' Results</a></div> </li> <li> <div align="center"><a href="/leagueresults.html#sectionb">Section 'B' Results</a></div> </li> <li> <div align="center"><a href="/leagueresults.html#sectionc">Section 'C' Results</a></div> </li> <li> <div align="center"><a href="/divavg.html">Div Averages</a></div> </li> <li> <div align="center"><a href="/teamavg.html">Team Averages</a></div> </li> <li> <div align="center"><a href="/teamreg/teamreg.htm">Club Registrations</a></div> </li> </ul> </div> <div id="footer"> <div align="center">All rights reserved © 2010-2011 Castleford & District Veterans Bowling Association<br /> <a href="webmaster/form.html">Webmaster</a></div> </div> </body> </html>
  2. Thanks for your input Wickham, it may help if I tell you all that when I wanted an online results card, someone helped me out, as I know nothing about MySql and little about php. It worked Ok. am I allowed to post the full code here?
  3. Hello all, Im a new member or should I say a new OLD (as in OLD) member and I have a problem, Stefan taught me some html years ago and I did a few sites for our sports clubs, one was for my bowling club, but this year I decided to update it and change it to a php site, all went well except for one page http://www.casvets.co.uk/results.php this is a log in page linking to an on line Mysql results card that worked well in html but now when I select Results Card from the menu, I get a blank page. If I replace the code not even the login page will load. If I remove the php code that is before the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> I can get the log in page to load but after entering the password (allbut) it loads a blank page once more. I think I may have screwed up on the conversion Can anyone spare the time to help an old man please? Best Regards Bob
×
×
  • Create New...