Mike Finnegan

Semester Project

Dart 430

12/10/04

Link:

Site Map:

Main Page / Sub Pages
VEAC Home (index.php) /
  • About VEAC (index.php)
  • Latest News
  • Archived News
  • Upcoming Events

The Issues /
  • Air Pollution
  • Water Pollution
  • Wetland Conservation
  • Wildlive Preservation
  • Urban Sprawl

About Vermont /
  • Demographics
  • Geography
  • Economy
  • History

Take Action / No sub pages
Resources / XML Issues Pages:
issues1.xml
issues2.xml
issues3.xml
Contact Us / Confirm_email.php

Plan: The issue of Environmental Awareness knows no age limit. In my experience, the youngest students are just as passionate and as educated as the middle-aged and older. The site will be geared to address the issues and problems facing the state of Vermont: clean air, clean water, development, etc.

Along with issue-based information, the site will also contain background information on the state of Vermont, and resources to better enable the end user to become more educated and aware.

Major features of the site (besides addressing the issues) will be dynamic news and upcoming events presentation through CutePHP (a free php script), provide a site-wide search function using PHP and MySQL through FindFast (a free php script courtesy of Interspire) and dynamic subnavigation menus to better enable the user to manage their own content.

Backend Code:

Overall Template:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<!-- TemplateBeginEditable name="doctitle" -->

<title>Vermont Environmental Action Coalition</title>

<!-- TemplateEndEditable -->

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript" type="text/JavaScript">

function form_check ()

{

if (document.contactform.uname.value == "")

{ alert ("You must fill in the Name field");

document.contactform.uname.focus();

return (false);

}

else

{

if (document.contactform.email.value == "")

{ alert ("You must fill in the Address field");

document.contactform.email.focus();

return(false);

}

else

{

if (document.contactform.question.value == "")

{ alert ("You must fill in the question box.");

document.contactform.question.focus();

return(false);

}

else

return(true);

}

}

}

<!--

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

function MM_swapImgRestore() { //v3.0

var i,x,a=document.MM_sr; for(i=0;a&i<a.length&(x=a[i])&x.oSrc;i++) x.src=x.oSrc;

}

function MM_findObj(n, d) { //v4.01

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&d.all) x=d.all[n]; for (i=0;!x&i<d.forms.length;i++) x=d.forms[i][n];

for(i=0;!x&d.layers&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

if(!x & d.getElementById) x=d.getElementById(n); return x;

}

function MM_swapImage() { //v3.0

var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//-->

</script>

<!-- TemplateBeginEditable name="head" --<!-- TemplateEndEditable -->

<link href="../site.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_reloadPage(init) { //reloads the window if Nav4 resized

if (init==true) with (navigator) {if ((appName=="Netscape")&(parseInt(appVersion)==4)) {

document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

function MM_showHideLayers() { //v6.0

var i,p,v,obj,args=MM_showHideLayers.arguments;

for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }

obj.visibility=v; }

}

//-->

</script>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../images/vt_nav/over_01.gif','../images/vt_nav/over_02.gif','../images/vt_nav/over_03.gif','../images/vt_nav/over_04.gif','../images/vt_nav/over_05.gif','../images/vt_nav/over_06.gif','../images/vt_subnav.jpg')">

<table width="780" border="0" cellspacing="0" cellpadding="0">

<!-- TemplateBeginEditable name="topimages" -->

<tr>

<td colspan="2"<img src="../images/vt_top.jpg" width="780" height="99"</td>

</tr>

<tr>

<td<img src="../images/vt_center.jpg" width="604" height="148"</td>

<td width="176"<img src="../images/vt_flash.jpg" width="176" height="148"</td>

</tr>

<!-- TemplateEndEditable -->

<tr>

<td colspan="2"<img src="../images/gray_stripe.jpg" width="780" height="19"</td>

</tr>

</table>

<table width="780" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="17" valign="top"<img src="../images/left_stripe.jpg" width="17" height="393"</td>

<!-- TemplateBeginEditable name="content" -->

<td height="40" valign="top"<img src="../images/vt_content_top.jpg" width="436" height="40">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td<h1>Our Mission</h1>

<p>The Vermont Environmental Action Coalition (VEAC) is dedicated

to spreading awareness, educating citizens and improving environmental

conditions in and around the state of Vermont. </p>

<p>The Current Situation</p>

<p>Vermont </p>

<p&nbsp;</p>

<p&nbsp;</p>

<p&nbsp;</p>

</td>

</tr>

</table>

<p&nbsp;</p</td>

<!-- TemplateEndEditable -->

<td height="59" valign="top" background="../images/subnav_ps/bg.jpg"> <table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="255" valign="top" background="../images/vt_subnav_bg.jpg"<img src="../images/vt_general_info.jpg" name="subnav" width="151" height="59" id="subnav"<br>

</td>

</tr>

<tr>

<td height="131" valign="top" background="../images/vt_search.jpg"<form name="form1" action="search/index.php" method="get">

<div align="center"<br>

<input type="text" name="query" value="" size="8" maxlength="255">

<input type="submit" value="Search">

<input type="hidden" name="type" value="simple">

</div>

</form</td>

</tr>

</table>

<div id="home" style="position:absolute; width:207px; height:149px; z-index:2; left: 457px; top: 297px; visibility: hidden;" onMouseOver="MM_showHideLayers('home','','show','default','','hide');MM_swapImage('subnav','','../images/vt_subnav.jpg',1)" onMouseOut="MM_showHideLayers('home','','hide','default','','show');MM_swapImgRestore()">

<div align="left"> <br>

<br>

<table width="143" border="0" cellspacing="0" cellpadding="0">

<tr>

<td<p align="right"<a href="../index.php">About VEAC</a</p>

<p align="right"<a href="../home_news.php">Latest News</a</p>

<p align="right"<a href="../home_arch_news.php">Archived News</a</p>

<p align="right"<a href="../home_events.php">Upcoming Events</a</p</td>

</tr>

</table>

</div>

</div>

<div id="default" style="position:absolute; width:162px; height:125px; z-index:1; left: 457px; top: 325px; visibility: visible;">

<div align="left">

<table width="143" border="0" cellspacing="0" cellpadding="0">

<tr>

<td<p<strong<em>Read the Latest VEAC News:</em</strong<br>

<br>

<?PHP

$static = TRUE;

$template = "Headlines";

$category = "1";

$number = "2";

include("news/show_news.php");

?>

</p>

<p<strong<em>Upcoming Events:</em</strong<br>

<br>

<?PHP

$static = TRUE;

$template = "events";

$category = "2";

$number = "1";

include("news/show_news.php");

?>

</p>

</tr>

</table>

</div>

</div>

<div id="issues" style="position:absolute; width:162px; height:178px; z-index:3; left: 457px; top: 325px; visibility: hidden;" onMouseOver="MM_showHideLayers('default','','hide','issues','','show');MM_swapImage('subnav','','../images/vt_subnav.jpg',1)" onMouseOut="MM_showHideLayers('default','','show','issues','','hide');MM_swapImgRestore()">

<div align="left">

<table width="143" border="0" cellspacing="0" cellpadding="0">

<tr>

<td<p align="right"<a href="../issues_air.php"> Air Pollution</a</p>

<p align="right"<a href="../issues_water.php"> Water Pollution</a</p>

<p align="right"<a href="../issues_wetlands.php">Wetlands</a</p>

<p align="right"<a href="../issues_wildlife.php">Wildlife</a</p>

<p align="right"<a href="../issues_sprawl.php">Urban Sprawl</a</p</td>

</tr>

</table>

</div>

</div>

<div id="aboutvt" style="position:absolute; width:162px; height:114px; z-index:3; left: 457px; top: 325px; visibility: hidden;" onMouseOver="MM_showHideLayers('default','','hide','aboutvt','','show');MM_swapImage('subnav','','../images/vt_subnav.jpg',1)" onMouseOut="MM_showHideLayers('default','','show','aboutvt','','hide');MM_swapImgRestore()">

<div align="left">

<table width="143" border="0" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"<p align="right"<a href="../vt_demo.php">Demographics</a</p>

<p align="right"<a href="../vt_economy.php">Economy</a</p>

<p align="right"<a href="../vt_land.php">Geography</a</p>

<p align="right"<a href="../vt_history.php">History</a</p</td>

</tr>

</table>

</div>

</div</td>

<td width="176" valign="top"<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"<img src="../images/vt_nav/topspacer.jpg" width="176" height="30" border="0" align="top"<br>

<a href="../index.php" onMouseOut="MM_swapImgRestore();MM_showHideLayers('home','','hide','default','','show','issues','','hide','aboutvt','','hide','action','','hide','resources','','hide')" onMouseOver="MM_swapImage('subnav','','../images/vt_subnav.jpg','Image10','','../images/vt_nav/over_01.gif',1);MM_showHideLayers('home','','show','default','','hide','issues','','hide','aboutvt','','hide','action','','hide','resources','','hide')"<img src="../images/vt_nav/up_01.gif" name="Image10" width="176" height="31" border="0" align="top"</a<a href="../issues_main.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('subnav','','../images/vt_subnav.jpg','Image11','','../images/vt_nav/over_02.gif',1)"<br>

<img src="../images/vt_nav/up_02.gif" name="Image11" width="176" height="31" border="0" onMouseOver="MM_showHideLayers('default','','hide','issues','','show')" onMouseOut="MM_showHideLayers('default','','show','issues','','hide')"</a<a href="../vt_main.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('subnav','','../images/vt_subnav.jpg','Image12','','../images/vt_nav/over_03.gif',1)"<br>

<img src="../images/vt_nav/up_03.gif" name="Image12" width="176" height="31" border="0" onMouseOver="MM_showHideLayers('default','','hide','aboutvt','','show')" onMouseOut="MM_showHideLayers('default','','show','aboutvt','','hide')"<br>

</a<a href="../take_action.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image13','','../images/vt_nav/over_04.gif',1)"<img src="../images/vt_nav/up_04.gif" name="Image13" width="176" height="31" border="0"<br>

</a<a href="../resources.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','../images/vt_nav/over_05.gif',1)"<img src="../images/vt_nav/up_05.gif" name="Image14" width="176" height="31" border="0"<br>

</a<a href="../contact.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../images/vt_nav/over_06.gif',1)"<img src="../images/vt_nav/up_06.gif" name="Image15" width="176" height="32" border="0"</a</td>

</tr>

<tr>

<td<img src="../images/vt_contact_bottom.jpg" width="176" height="219"</td>

</tr>

</table>

<p&nbsp;</p>

<p&nbsp;</p</td>

</tr>

</table>

<table width="780" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="41" valign="top" background="../images/footer.jpg"<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">

<tr>

<td width="58%"<div align="right">

<p align="center"<font size="1" face="Verdana, Arial, Helvetica, sans-serif"<a href="../index.php">VEAC

Home </a> - <a href="../issues_main.php">The Issues</a> - <a href="../vt_main.php">About Vermont</a<a href="../take_action.php"<br>

Take Action</a> - <a href="#"</a<a href="../resources.php">Resources</a> -

<a href="../contact.php">Contact Us</a</font</p>

</div</td>

<td width="42%"&nbsp;</td>

</tr>

</table</td>

</tr>

</table>

</body>

</html>

Confirm Email: NOTE: this is just a portion of the code…everything else is formatted like the template

<?php

//Define some variables

$youremail=""; // This is the address that the information submitted will be sent to.

$emailsubject="VEAC Reader Question"; // This will the email's subject

// Enter the code you'd like displayed after the information submitted.

// Make sure you put a / mark before all double quotation marks or the script won't work.

// the \n at the end of the line is to create a new line in the HTML SOURCE. It DOES NOT create a break or new line

// when viewing it on the internet. Put these at the end of each line in the header and footer if you wish.

// They aren't required.

// This code gets the ip address of the person submiting the form.

// You shouldn't remove it if you want to use this feature.

if (getenv(HTTP_CLIENT_IP)){

$user_ip=getenv(HTTP_CLIENT_IP);

}

else {

$user_ip=getenv(REMOTE_ADDR);

}

$uname = $HTTP_POST_VARS['uname'];

$email = $HTTP_POST_VARS['email'];

$question = $HTTP_POST_VARS['question'];

// Edit the following lines to customize how the email sent to you will look.

// To add more fields, just copy and paste the line, and edit the info between the " marks.

// The last 2 lines will send the users browser information and their ip number with the mail.

// Just in case. :)

$mailbody="User Name:===$uname\n";

$mailbody.="User Address===$email\n";

$mailbody.="Question===$question\n";

$from_who="VEAC Question<". $email . ">";

mail("$youremail", "$emailsubject", "$mailbody", "From: $from_who"); // Send the email.

$comments = nl2br($question);

// Page HTML comes next.

?>

<?php print $uname; ?>

<br>

Address:

<?php print $email; ?>

<br>

Question:

<?php print $question; ?>

<br>

<!-- DO NOT EDIT BELOW THIS LINE. -->

<!-- DO NOT EDIT BELOW THIS LINE. -->

<?php

$date=date("Y");

if ($date==2002){

echo "<br>\n<font size=\"1\" face=\"verdana\">\n Copyright &copy;";

echo (date("Y"));

}

else

{

}

?>

Contact Us Page

<form method="post" name="contactform" id="contactform" onsubmit="return form_check()" action="confirm_email.php" >

<table width="400" border="0" cellpadding="4">

<tr>

<td width="113"<div align="right" class="style1">Name:</div</td>

<td width="288"<input name="uname" type="text" id="uname"</td>

</tr>

<tr>

<td<div align="right" class="style1">Email:</div</td>

<td<input name="email" type="text" id="email"</td>

</tr>

<tr>

<td<div align="right" class="style1">Question:</div</td>

<td<p>

<textarea name="question" cols="35" rows="6" id="question"</textarea>

</p>

<p>

<input type="submit" name="Submit" value="Submit">

<input type="reset" name="Reset" value="Reset">

</p</td>

</tr>

</table>

</form>

Resources Page:

<form action="jump.php" method="post" name="form2" target="_blank">

<p>

<select name="jump">

<option>Select options below:</option>

<option value=" Issues</option>

<option value=" Issues in Vermont</option>

<option value=" Environmental Issues in Vermont</option>

</select>

</p>

<p>

<input type="submit" name="Submit" value="Submit">

</p>

</form>

Jump.php:

<?

$jump = $_POST['jump'];

header("location: $jump");

?>