![]() Web Development |
#15 Grading Criteria for: Extra Credit: Include files and Server-Side scripting languages such as ASP and PHP. 30 points maximum. |
|
---|---|---|
Description: JavaScript and Behaviors
(such as Pop-up messages and Swap images) use Client
Side scripts to
allow dynamic interaction or DHTML on the
local client computer. JUST DO ONE OF THE OPTIONS BELOW - I
recommend the PHP Include
Project: |
||
Topic | Directions | Points |
Add an Include File that works with multiple pages. Note: you can view .htm files locally. However, you cannot view the results of .php, .cfm, or .asp code locally without special software (such as XAMPP) installed on your computer. If you open a web page with Include files in your browser and click View Source, the web server will convert all the include lines into pure HTML, so you will not see the php code or true local source code. Suggestion/Directions: 1. Make a folder on your site called /php Copy your image folder and all of your files to the new php folder. Rename all copied files from .htm to .php 2. Copy your navigation code in index.php to a new page and save it as nav.htm Below is the sample of all the code in the new nav.htm: <a href="index.php">Home</a> <a href="Resume.php">Resume</a> <a href="PFolio.php">Portfolio</a> <a href="Contact.php">Contact</a> 3. Replace your navigation code in index.php and resumer.php... with <?php include ("nav.htm"); ?> 4. Upload your files to the php folder 5. Test by going to http://yourDomain/php/ 6. Upload to the assignment dropbox the php URL: http://yourDomain/php/ |
For a online chapter on PHP include files see: DreamweaverCS4/Powers12PHPincludes.pdf To see how to add an ASP Include file: http://www.w3schools.com/asp/asp_incfiles.asp <!--#include file ="somefilename"--> See SamplesHTMLcode/IncludeFiles/ In Dreamweaver click Insert | Server-Side Include Basic Include File Directions: 1. Create your Include File - for instance, build a nav.htm (I suggest you simply copy your Navigation code from your index.htm file and save those few lines in a separate file named nav.htm) 2. Replace your navigation code in index.htm with one of the include calls below: <?php include ("nav.htm"); ?> : PHP <!--#include file="nav.htm"--> : SHTML <!--#include file ="nav.aspx"--> : ASP <cfinclude template = "nav.htm"> : Cold Fusion 3. Appropriately rename index.htm as index.php or index.shtml or index.cfm (in the end you will rename Contact.htm to Contact.php and replace your nav code with <?php include ("nav.htm"); ?> and then do the same for Portfolio.htm... (If you use any php code on a web page, you need a .php extension, and the same for .asp, .cfm...) 4. Typically you cannot view server-side script files on the client (local machine) so you will probably have to upload your files to test them. |
Up to 30 points Add at least two include files, such as header.htm, footer.htm, and nav.htm |
Create or download a relevant ASP script,
upload it to your web server, and confirm that it runs live on your website. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
File | New | ASPX The language directive line is placed immediately above the <html> tag. By default it is C# but can easily be changed to VB: <%@ Page Language="C#" %> Expression Web has a built-in server to manage ASP.net pages. |
Up to 30 points Criteria: Relevant Functional Well laid out |
Create or download an ASP script to calculate
something relevant to your website. Upload it to your web server, and
confirm that it runs live on your website. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
ASP code begins with <% and end with
%> Reminder: .style1 is not a meaningful name: -5 Reminder: Every page needs a Title: -5 |
Up to 30 points Criteria: Relevant Functional Well laid out |
Create or download an ASP script to access
and update an online database with
something relevant to your website. Upload both the database and the
ASP page to your web server, and
confirm that it runs live on your website. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
With ASP.Net you can access either a Microsoft Office Access
database or a SQL database. Snippets of gdform.asp script: <% Dim landing_page, host_url Dim fso, outfile, filename, dirname, myFolder Dim bErr, errStr, bEmpty Function FormatVariableLine(byval var_name...) Dim tmpStr tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF tmpStr = tmpStr & var_value & vbCRLF tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>" FormatVariableLine = tmpStr end function Sub OutputLine(byVal line) outfile.WriteLine(line) end sub if err.number = 0 then... |
Up to 30 points Criteria: Relevant Functional Well laid out |
Create or download a relevant PHP script,
upload it to your web server, and confirm that it runs live on your website. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. For PHP Tutorials and details see: http://php.net See: http://webscripts.softpedia.com |
For an online eBook on PHP see: 0ClassFolders/2820Web/eBook-Springer/PHP/ File | New | PHP |
Up to 30 points Criteria: Relevant Functional Well laid out |
Create or download a PHP script to calculate
something relevant to your website. Upload it to your web server, and
confirm that it runs live on your website. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. See: EW7_PhpDemo.php EW7_PhpCalcDemo.php EW7_PhpInputAndCalcDemo.php |
Below is a simple PHP calculation routine: <?php $width = "60"; $height = "20"; echo "If Height=60px and Width=20px, then area is "; echo "$width * $height px"; ?> You can install a PHP web server, go to http://php.net/downloads.php |
Up to 30 points Criteria: Relevant Functional Well laid out |
Create or download a relevant Cold Fusion script,
upload it to your web server, and confirm that it runs live on your website. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
hhttp://www.adobe.com/products/coldfusion/ |
Up to 30 points Criteria: Relevant Functional Well laid out |
Create or download a Cold Fusion script to calculate
something relevant to your website. Upload it to your web server, and
confirm that it runs live on your website. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
Cold Fusion Tutorials: http://www.quackit.com/coldfusion/tutorial/ |
Up to 30 points Criteria: Relevant Functional Well laid out |
Create a PHP folder images [Dir] contact.php favicon.ico index.php nav.htm footer.htm portfolio.php resume.php yourSiteNameLayout.css |
Maximum: 30 points |