Skip to content
Snippets Groups Projects
Commit 32f1d992 authored by Michael Fairchild's avatar Michael Fairchild
Browse files

Created Physics ribbon cutting webform and DB.

parent e3c809bb
Branches
Tags
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
.project 0 → 100644
<?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>
-- 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 ;
<?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
<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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment