Metropolitan State University

ICS 325

Building Services on the Internet

 

Lab 10

Working with Functions in PHP

(Linux Redhat 7.1)

 

1.         Log onto “redhat.ics.metrostate.edu” using your loginID “su04325??” and password, and do the following:

                        At the prompt $,

$ cd

$ cd public_html

$ mkdir lab10

$ cd lab10

            Create a file using pico named header.php

 

<?php

/*****************************************

    Author:

    Date:  

    Description:       

  *****************************************/

?>

<html>

<head>

<title>Metropolitan State University eNewspaper</title>

</head>

<body>

<table width="600">

      <tr>

<td colspan=2 align=center>

<h1>Metropolitan State University eNewspaper</h1>

</td>

     </tr>

 

 

2.      Create a file using pico named leftNavBar.php

 

<?php

   /*****************************************

    Author:

    Date:  

    Description:       

  *****************************************/

?>

<tr>

   <td width=20% align=left valign=top><b><u>Top Stories:</u></b><p>

      <a href="index.php">Traffic</a><br />

      <a href="weather.php">Weather Forecast</a><br />

      <a href="movies.php">New Movies</a><br />

   </td>

   <td width=80% align=left>

 

 

3. Create a file using pico named footer.php

 

 

<?php

   /*****************************************

    Author:

    Date:  

    Description:       

  *****************************************/

?>

         </td>

      </tr>

      <tr>

         <td colspan=2 align=center valign=bottom height=80>

<h4>&copy;Copyright 2003 s04325?? Company</h4>

</td>

      </tr>

</table>

</body>

</html>

 

 

 

4.  Create a file using pico named index.php

 

 

<?php

/*****************************************

    Author:

    Date:  

    Description:       

  *****************************************/

 

   include("headder.php");

   include("leftNavBar.php");

 

?>

 

<h3>Current Traffic</h3>

 

  Current Conditions:

<p>

      There are no problems or delays to report at this time

  </p>

<hr />

<p>

Scheduled Construction and Events:

</p>

There are no scheduled construction or events at this time

 

<h5>current traffic from http://www.startribune.com/news/traffic</5>

 

<?php

   include("footer.php");

?>

 

 


 

5. Create a file using pico named weather.php

 

<?php

   /*****************************************

    Author:

    Date:  

    Description:       

  *****************************************/

 

   include("headder.php");

   include("leftNavBar.php");

?>

 

<h3>Curent Weather: </h3>

Wednesday night ...Clear evening. Clouds increase late, not as cold.

Low: -1 Thursday ...Mostly cloudy and a few degrees milder. Winds:

light. A little freezing drizzle can't be ruled out late Thursday or

Thursday night, but right now it does not look like a major icing

event. High: 23

 

<h5>current weather from http://weather.startribune.com/weather/</5>

 

<?php

   include("footer.php");

?>

 

 

6.      Create a file using pico named movies.php

 

<?php

/*****************************************

    Author:

    Date:  

    Description:       

  *****************************************/

 

   include("headder.php");

   include("leftNavBar.php");

 

?>

 

<h3>Movie Review:</h3>

<h2>Chicago</h2>

The frisky musical "Chicago", adapted from the stage hit about two

murderous women competing for tabloid celebrity, led Academy Awards

contenders Tuesday with 13 nominations, among them best picture and four

acting honors.

 

<h5>current Movie Review from http://www.startribune.com/stories/1553/</5>

 

<?php

   include("footer.php");

?>

 

·        Invoke IE 6 on your machine, and check your php file with the following address:

            http://redhat.ics.metrostate.edu/~su04325??/lab10