diff --git a/.buildpath b/.buildpath new file mode 100644 index 0000000000000000000000000000000000000000..8bcb4b5fd612e3ad55fb07e4bed087c55afd0861 --- /dev/null +++ b/.buildpath @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<buildpath> + <buildpathentry kind="src" path=""/> + <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/> +</buildpath> diff --git a/.project b/.project new file mode 100644 index 0000000000000000000000000000000000000000..e05c512f4e8864477af95d1e958d2963f5a8a9a2 --- /dev/null +++ b/.project @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>UCOMM_Webforms</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.dltk.core.scriptbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.php.core.PHPNature</nature> + </natures> +</projectDescription> diff --git a/physics/data/ribbon_cutting2010/physics_opening2010.sql b/physics/data/ribbon_cutting2010/physics_opening2010.sql new file mode 100644 index 0000000000000000000000000000000000000000..e8c516ac57dcc32bc0517389f9ae2c59c8192cd2 --- /dev/null +++ b/physics/data/ribbon_cutting2010/physics_opening2010.sql @@ -0,0 +1,37 @@ +-- phpMyAdmin SQL Dump +-- version 3.3.7 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Generation Time: Sep 30, 2010 at 03:38 PM +-- Server version: 5.1.50 +-- PHP Version: 5.3.2 + +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Database: `surveys` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `physics_opening2010` +-- + +CREATE TABLE IF NOT EXISTS `physics_opening2010` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `name` text COLLATE utf8_unicode_ci, + `email` text COLLATE utf8_unicode_ci, + `phone` text COLLATE utf8_unicode_ci, + `type` text COLLATE utf8_unicode_ci, + `proposal` text COLLATE utf8_unicode_ci, + `datesubmitted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; diff --git a/physics/ribbon_cutting2010/www/index.php b/physics/ribbon_cutting2010/www/index.php new file mode 100644 index 0000000000000000000000000000000000000000..986ee2ce70963185078154a5fd932ac209069f62 --- /dev/null +++ b/physics/ribbon_cutting2010/www/index.php @@ -0,0 +1,84 @@ +<?php +set_include_path(dirname(__FILE__).'/../../../src/'.PATH_SEPARATOR.get_include_path()); + +function myautoload($class) +{ + $file = str_replace('_', '/', $class).'.php'; + require_once $file; +} + +spl_autoload_register('myautoload'); + +if ($_GET['submit']) { + $db_user = 'mfairchi'; + $db_pass = '123123'; + $db = $mysqli = new mysqli('127.0.0.1', $db_user, $db_pass, 'nirc_survey'); + if (mysqli_connect_errno()) { + echo "error, could not connect"; + exit; + } + $db->set_charset('utf8'); + $sql = "INSERT INTO `surveys`.`physics_opening2010` (`id`, `name`, `email`, `phone`, `type`, `proposal`, `datesubmitted`) + VALUES (NULL, + '".$mysqli->escape_string($_POST['name'])."', + '".$mysqli->escape_string($_POST['email'])."', + '".$mysqli->escape_string($_POST['phone'])."', + '".$mysqli->escape_string($_POST['type'])."', + '".$mysqli->escape_string($_POST['proposal'])."', + CURRENT_TIMESTAMP)"; + $mysqli->query($sql) or die(mysql_error()); + header( 'Location: thankyou.php' ) ; +} +//$survey = new EPSCoR_Survey(); +?> +<head> +<link rel="stylesheet" type="text/css" media="screen" href="/wdn/templates_3.0/css/zenform.css" /> +<script type="text/javascript" src="/wdn/templates_3.0/scripts/all.js"></script> +<script type="text/javascript"> +//<![CDATA[ + WDN.jQuery(document).ready(function(){ + WDN.initializePlugin('zenform'); + }); +//]]> +</script> +</head> +<div id="maincontent"> + <h3 class="zenform">Physics Department Extreme Ribbon-cutting Contest</h3> + <form class='zenform' action="index.php?submit=true" method="post" name="physics" id="physics" target="_self"> + <fieldset style="width: 96%"> + <legend>Ribbon-cutting proposal</legend> + <p>The UNL Physics Department is inviting proposals from students, faculty, staff, alumni and friends on how to add some physics-related drama to a ribbon cutting. The department will dedicate UNL's new physical sciences building, Jorgensen Hall, at a ceremony scheduled for 4 p.m. on Friday, Oct. 29.</p> + <p>Anyone interested may submit a proposal for a way to open the building, preferably using some aspect of physics , to make the celebration more interesting than is possible using only ribbon and scissors.</p> + <p>Proposals should be submitted in writing to UNL Physics Department Chair Dan Claes. A faculty committee will select the top three proposals. The top three candidates will be invited to post a video demonstration of the proposal on YouTube so that interested parties can vote for their favorite proposal. </p> + <p>The winning proposal will be used to open Jorgensen Hall. UNL Chancellor Harvey Perlman and special guest speaker Alan Heeger, a UNL alum and Nobel laureate, will be present for the ceremony. </p> + <p>Rules: + <ol> + <li>No humans or animals may be harmed.</li> + <li>No harm may be caused to the building.</li> + <li>Proposals will be accepted until 5 p.m. October 15, 2010.</li> + </ol></p> + + <p>There may be minor amounts of funding to purchasesupplies for the implementation of the winning proposal. </p> + + <p>The creator of the winning submission will receive an iPod as a prize. </p> + <hr> + <ol> + <li><label for="first_name" class="element">Name</label><div class="element"><input id="name" name="name" type="text" /></div></li> + <li><label for="first_name" class="element">Email Address</label><div class="element"><input id="email" name="email" type="text" /></div></li> + <li><label for="first_name" class="element">Phone Number</label><div class="element"><input id="phone" name="phone" type="text" /></div></li> + + <li><label class="element">Check One</label><div class="element"> + <ol> + <li><input name="type" value="UNL student" type="radio" id="type" /><label for="type">UNL student</label></li> + <li><input name="type" value="High school student" type="radio" id="type" /><label for="type">High school student</label></li> + <li><input name="type" value="UNL faculty" type="radio" id="type" /><label for="type">UNL faculty</label></li> + <li><input name="type" value="UNL Alum" type="radio" id="type" /><label for="type">UNL Alum</label></li> + <li><input name="type" value="Other" type="radio" id="type" /><label for="type">Other</label></li> + </ol> + </div></li> + <li><label for="proposal" class="element">Describe your proposal for using physics for the official opening of Jorgensen Hall (500 word limit): </label><div class="element"><textarea id="proposal" name="proposal" rows="10"></textarea></div></li> + </ol> + </fieldset> + <input type="submit" name="submit" value="Submit" /> + </form> +</div> \ No newline at end of file diff --git a/physics/ribbon_cutting2010/www/thankyou.php b/physics/ribbon_cutting2010/www/thankyou.php new file mode 100644 index 0000000000000000000000000000000000000000..cb7cf76476fe11fa071c6e529ea270fa5e2f5ef0 --- /dev/null +++ b/physics/ribbon_cutting2010/www/thankyou.php @@ -0,0 +1,18 @@ +<head> +<link rel="stylesheet" type="text/css" media="screen" href="/wdn/templates_3.0/css/zenform.css" /> +<script type="text/javascript" src="/wdn/templates_3.0/scripts/all.js"></script> +<script type="text/javascript"> +//<![CDATA[ + WDN.jQuery(document).ready(function(){ + WDN.initializePlugin('zenform'); + }); +//]]> +</script> +</head> +<div id="maincontent"> + <h3 class="zenform">Physics Department Extreme Ribbon-cutting Contest</h3> + <form class='zenform'> + <h1>Thank you for your proposal!</h1> + We hope to see you at the ribbon-cutting is ceremony! + </form> +</div>