Your Pages - Setup PHP Site

Sample PHP Page, Inline-Frame League Standings, VBScript

Return - Your Pages Setup

In this sample, you only need the programming in blue, optional lines are in green.

For a quick-start, you can copy and paste this entire code to a file in your website named "SampleIframeLeagueStandings.php", then view this page in your browser: http://(YourSite)/SampleIframeLeagueStandings.php

Working sample: http://php.divebarsussex.com/SampleIframeLeagueStandings.php?rES=3&rSP=1&rLN=236&rDM=1
(displaying the sample code below)

If you would rather skip the sample page, just copy and paste the blue, and optionally green lines into your .php page.

    // Sample League Standings file, using inline-frame, for PHP
    // ---------------------------------  Retrieve settings from the Query String
    $xES = $_GET['rES'];     // EstablishmentNumber
    $xSP = $_GET['rSP'];     // SportNumber
    $xLN = $_GET['rLN'];     // LeagueNumber
    $xDM = $_GET['rDM'];     // DisplayMode
    // ---------------------------------  The next 2 settings for options on this page
    $xMO = 1;                // Set MouseOverTeam and MouseOverRow Hi-Light effect
                             //    (1=enable,0=disable)
    $xFD = 1;                // Set TopOfPage FullDisplay elements (1=enable,0=disable)
                             //   (the PrinterFriendly link and Standings link)
    $URLStr = htmlspecialchars('http://www.easyleagues.biz/Content/Standings.asp?' . 'rES=' . $xES
        . '&rSP=' . $xSP . '&rLN=' . $xLN . '&rDM=' . $xDM . '&rMO=' . $xMO . '&rFD=' . $xFD); ?>
    $calcFrameStr = htmlspecialchars('http://www.easyleagues.biz/Content/CalcParentFrame.asp?'
        . 'rES=' . $xES . '&rSP=' . $xSP . '&rLN=' . $xLN . '&rPG=3&rTH=22&rCH=23&rFF=10'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
  <title>iframe Sample - League Standings</title>
  <style type="text/css"><!--
  .easyLeaguesFrame {width: 90%; height: 200px; margin: 5px 5%;
                    border: 1px solid #c0c0c0; overflow: hidden;} --></style>
  <link href="<?php echo $calcFrameStr; ?>" rel="stylesheet" type="text/css" />
  <div style="width: 800px; height: 100px; border: 1px solid #000000;">
    Your page header/banner here.
  <div style="width: 800px; border: 1px solid #000000;">
    <p>Your personalized page-body content here, before the League Standings content.</p>
    <!-- The first part of your page programming before here -->
    <!-- Begin needed programming -->
    <iframe src="<?php echo $URLStr; ?>" frameborder="0" class="easyLeaguesFrame">
      Your browser does not support iframes.<br />
      View <a href="<?php echo $URLStr; ?>" target="_blank">Simple Page</a>
      in a new window.
    <!-- End needed programming -->
    <!-- The remainder of your page programming after here -->
  <div style="width: 800px; height: 100px; border: 1px solid #000000;">
    Your page footer here.

The above sample demonstrates a method for assigning the values needed further down in the page. For those site designers desiring a more condensed version of required code, visit the Schedule information page for an iframe example.

Required Query String Parameters.

The EasyLeagues.biz content for both the web page version and printable version of the Schedule page originates from the same file: "http://www.easyleagues.biz/Content/Standings.asp". The parameter "rMO=1" will enable the MouseOver high-lighting in the web page version (setting "rMO=0" will disable the MouseOver high-lighting for the printable version). The parameter "rFD=1" will enable FullDisplay of the top-of-page links to a printer-friendly version and also the standings page (setting "rFD=0" will prevent the top-of-page information from appearing on the printer-friendly version of the Schedule).

Remember to seperate each parameter with an "&" (ampersand).

Optional programming, calculate <iframe> height.

Looking at the example above, you will see the URL for the style-sheet was constructed and assigned to a variable named CalcFrameStr. In the "Query String Parameter" part of the URL, the "EstablishmentNumber", "SportNumber", and "LeagueNo" were passed in according what League was selected. The four additional parameters for specifying how the <iframe> height should be calculated are the same as on the LeagueSelect page:

  • rPG=3, which page to calculate for (1=LeagueSelect, 2=LeagueSchedule, 3=LeagueStandings).
  • rTH=22, how tall the TitleHeight rows are. (all heights are in pixels).
  • rCH=23, the CellHeight rows in the rest of the table.
  • rFF=10, a FudgeFactor value to be added.
Sample Page Styles and Links

The styles and links in the sample pages will not work properly until you have copied the sample CSS files to your site and configured "Settings" in EasyLeagues.biz, but the content will display without problem.