CS2623: Server-Side Programming (SSP) 02

Objectives:

Point Value:

Specifics:

  1. Text Pages:
    1. 59: Strings & concatenation
    2. 65: Date functions & formatting
    3. 73: Relational operators
    4. 75: If statement
    5. 79: Include Statement
  2. Downloads:None
  3. References:
    1. W3Schools: PHP filemTime() function
      1. Link: https://www.w3schools.com/php/func_filesystem_filemtime.asp
    2. W3Schools: HTML table
      1. Link: https://www.w3schools.com/html/html_tables.asp
  4. Collaboration Assignment: I liked the authors discussion on pages 54 to 57. Post something on the forum letting me know what you think about it. I am not expecting you to do indepth research on those topics. I expect at least three sentences. You can post something or respond to someone else's post. Ideally the discussion will focus on the security issues and applicability of each.
  5. SSP02:
    1. Task 1: PHP page. Note, the expected layout is included in a wireframe below if needed.  I expect a header, left navigation, top navigation, and footer.  The header shouldn't be confused with the meta data.  Like an actual page header/banner at the top of your page.  It should include "CS2623 <student Name>".
      1. Create a folder called SSP02
      2. Copy index.html and rename it SSP02.php
      3. In the root directory of your Apollo1 account (i.e. not inside the SSP02 folder), create the following folders:
        1. CSS
        2. PHP
      4. In your "apollo1/user####/PHP" folder you will start to create some include files
        1. include_header.php
        2. include_leftNav.php
          1. Cut and paste your HTML left navigation code into this file
          2. Make sure to update your links for the new SSP02 page.
        3. include_topNav.php
          1. Cut and paste your HTML top navigation code into this file
          2. Make sure to update your links for the new SSP02 page.
        4. include_footer.php
          1. You will be writing some PHP code for this one.
            1. Include the appropriate PHP opening and closing tags.
            2. Reference the attached w3schools link in the references. Output the appropriate code to show when the file was last modified.
              1. I don't care too much about the function at this time. I do want you to learn about dynamic strings/output and concatenation. So try to understand those parts.
            3. Make sure your code outputs the OCCC disclaimer too
            4. Use of appropriate line breaks are expected.
        5. include_dynamic_content.php: We're going to do something simple for now where you will just create a table.
          1. Include the appropriate PHP openening and closing tag
          2. Write code to dynamically create a table. I want you to adhere to the same accessibility standards you learned in CS2413 (e.g. caption and table header). Your table will display your weekly plan for CS2623 and have a row for each day. The columns will include Day of Week, Task, and Time (hrs).
          3. Requirements:
            1. For Loop:
              1. Used to create the rows related to days (i.e. your table declaration, caption, table headers, etc. etc.) will be static and should come before this
              2. Initialize your $counter variable to 1
              3. Your $counter variable will be less than 8 (7 days of the week).
              4. Increment your $counter variable by 1
              5. I am looking for Day of week to be the $counter variable, Task "Study for CS2623", and Time (hrs) to be half of whatever the counter variable is. Note, that last part can get tricky so make sure you look at the ordered list example below.
            2. Caption should be "CS2623 Weekly Planner <your name>
            3. Include comments (PHP and HMTL) to make your code more developer friendly
            4. CSS: Format your table (width, border, coloring if you want, etc. Any colors should be hexadecimal and your CSS should have appropriate comments. Make sure this CSS page and your link is in the root CSS folder

Helpful Illustrations

Wireframe to help you visualize the php SSP layout I am expecting

Wireframe for SSP02.php layout

Example of your SSP02.php page with the include files. You can play around with the top vs. left navigation. Yet, I would like to see you use HTML 5 tags where possible

PHP coding example with include files

Dynamic coding of HTML with php. You're doing an HTML table, but you should get the idea with this

PHP coding for a dynamic ordered list
HTML code ouput from PHP coding

Sample of what your HTML code should look like when generated by PHP

HTML code ouput from PHP coding

Submission:

Common Requirements for All Web Pages:

  1. Your code must adhere to HTML5 standards. W3C HTML5 Example: https://www.w3schools.com/html/html5_intro.asp
  2. All your pages must pass W3C validators
  3. The web pages must display correctly in all of the following: FireFox, Chrome, Internet Explorer.
  4. The links between the existing pages with the Pacific Trails Resort website cannot be broken.
  5. All HTML and CSS code must be well documented, properly indented, and easy to read.
    http://css-tricks.com/examples/CleanCode/Beautiful-HTML.png
    http://coding.smashingmagazine.com/2008/05/02/improving-code-readability-with-css-styleguides/