Skip to content
Snippets Groups Projects
Commit 6de18107 authored by Brett Bieber's avatar Brett Bieber
Browse files

Import of old design survey. Cannot advance past step 1 because images appear...

Import of old design survey. Cannot advance past step 1 because images appear to not be pre-loading. Still some work to be done.
parent 0d6bb18e
Branches
No related tags found
No related merge requests found
Showing
with 3489 additions and 0 deletions
<?php
/**
* Table Definition for age_groups
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Age_groups extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'age_groups'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $age_group; // string(50) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Age_groups',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for audiences
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Audiences extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'audiences'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $audience; // string(50) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Audiences',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for prototype
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Prototype extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'prototype'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $title; // string(20) multiple_key
var $splash_image; // string(255) not_null
var $full_image; // string(255)
var $thumb_image; // string(255)
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Prototype',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for prototype_ranking
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Prototype_ranking extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'prototype_ranking'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $voter_id; // int(11) not_null multiple_key
var $prototype_id; // int(11) not_null
var $rank; // int(11) not_null
var $why_response; // blob(16777215) blob
var $improve_response; // blob(16777215) blob
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Prototype_ranking',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for prototype_rating
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Prototype_rating extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'prototype_rating'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $voter_id; // int(11) not_null multiple_key
var $prototype_id; // int(11) not_null
var $rating; // int(11) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Prototype_rating',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for prototype_sent
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Prototype_sent extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'prototype_sent'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $voter_id; // int(11) not_null multiple_key
var $prototype_id; // int(11) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Prototype_sent',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for questions
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Questions extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'questions'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $audience_id; // int(11) not_null
var $question; // string(255) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Questions',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
var $fb_linkDisplayFields = array('question');
}
<?php
/**
* Table Definition for rating_lead_questions
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Rating_lead_questions extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'rating_lead_questions'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $lead_question; // string(255) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Rating_lead_questions',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for rating_questions
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Rating_questions extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'rating_questions'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $audience_id; // int(11) not_null multiple_key
var $lead_question_id; // int(11) not_null multiple_key
var $question; // string(50) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Rating_questions',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for rating_responses
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Rating_responses extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'rating_responses'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $voter_id; // int(11) not_null multiple_key
var $question_id; // int(11) not_null
var $response; // int(11)
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Rating_responses',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for responses
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Responses extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'responses'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $voter_id; // int(11) not_null multiple_key
var $question_id; // int(11) not_null
var $response; // blob(16777215) blob
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Responses',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Table Definition for voter
*/
require_once 'DB/DataObject.php';
class DesignSurvey_Voter extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'voter'; // table name
var $id; // int(11) not_null primary_key auto_increment
var $audience_id; // int(11)
var $age_group_id; // int(11)
var $gender; // string(1)
var $ip; // string(15) not_null
var $step; // int(10) unsigned
var $prototype_order; // blob(16777215) blob
var $submitdatetime; // datetime(19)
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Voter',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
[age_groups]
id = 129
age_group = 130
[age_groups__keys]
id = N
[audiences]
id = 129
audience = 130
[audiences__keys]
id = N
[prototype]
id = 129
title = 2
splash_image = 130
full_image = 2
thumb_image = 2
[prototype__keys]
id = N
[prototype_ranking]
id = 129
voter_id = 129
prototype_id = 129
rank = 129
why_response = 66
improve_response = 66
[prototype_ranking__keys]
id = N
[prototype_rating]
id = 129
voter_id = 129
prototype_id = 129
rating = 129
[prototype_rating__keys]
id = N
[prototype_sent]
id = 129
voter_id = 129
prototype_id = 129
[prototype_sent__keys]
id = N
[questions]
id = 129
audience_id = 129
question = 130
[questions__keys]
id = N
[rating_lead_questions]
id = 129
lead_question = 130
[rating_lead_questions__keys]
id = N
[rating_questions]
id = 129
audience_id = 129
lead_question_id = 129
question = 130
[rating_questions__keys]
id = N
[rating_responses]
id = 129
voter_id = 129
question_id = 129
response = 1
[rating_responses__keys]
id = N
[responses]
id = 129
voter_id = 129
question_id = 129
response = 66
[responses__keys]
id = N
[voter]
id = 129
audience_id = 1
age_group_id = 1
gender = 2
ip = 130
step = 1
prototype_order = 66
submitdatetime = 14
[voter__keys]
id = N
[prototype_ranking]
voter_id = voter:id
prototype_id = prototypes:id
[prototype_rating]
voter_id = voter:id
prototype_id = prototypes:id
[prototype_sent]
voter_id = voter:id
prototype_id = prototypes:id
[questions]
audience_id = audiences:id
[rating_questions]
audience_id = audiences:id
lead_question_id = rating_lead_questions:id
[rating_responses]
voter_id = voter:id
prototype_id = prototypes:id
[responses]
voter_id = voter:id
prototype_id = prototypes:id
question_id = questions:id
[voter]
age_group_id = age_groups:id
audience_id = audiences:id
This diff is collapsed.
<?php
if (isset($_GET['client']) && $_GET['client']=='all') {
include 'ajax_client.js';
} elseif (isset($_GET['stub']) && $_GET['stub']=='Voting_System') {
include 'ajax_stub.js';
} else {
require_once 'HTML/AJAX/Server.php';
require_once 'config.inc.php';
require_once 'functions.php';
$voter = new Voting_System();
$server = new HTML_AJAX_Server();
$server->registerClass($voter);
$server->handleRequest();
}
\ No newline at end of file
// Client stub for the voting_system PHP Class
function voting_system(callback) {
mode = 'sync';
if (callback) { mode = 'async'; }
this.className = 'voting_system';
this.dispatcher = new HTML_AJAX_Dispatcher(this.className,mode,callback,'ajax_server.php?','JSON');
}
voting_system.prototype = {
Sync: function() { this.dispatcher.Sync(); },
Async: function(callback) { this.dispatcher.Async(callback); },
displayHeaderData: function() { return this.dispatcher.doCall('displayHeaderData',arguments); },
initializeVoter: function() { return this.dispatcher.doCall('initializeVoter',arguments); },
setStep: function() { return this.dispatcher.doCall('setStep',arguments); },
hasRatedAllPrototypes: function() { return this.dispatcher.doCall('hasRatedAllPrototypes',arguments); },
sentPrototypes: function() { return this.dispatcher.doCall('sentPrototypes',arguments); },
getVoterId: function() { return this.dispatcher.doCall('getVoterId',arguments); },
run: function() { return this.dispatcher.doCall('run',arguments); },
start: function() { return this.dispatcher.doCall('start',arguments); },
introduction: function() { return this.dispatcher.doCall('introduction',arguments); },
heavyLoadNotice: function() { return this.dispatcher.doCall('heavyLoadNotice',arguments); },
ranking: function() { return this.dispatcher.doCall('ranking',arguments); },
displayRankForm: function() { return this.dispatcher.doCall('displayRankForm',arguments); },
gatherAudienceType: function() { return this.dispatcher.doCall('gatherAudienceType',arguments); },
displayImagesAndForms: function() { return this.dispatcher.doCall('displayImagesAndForms',arguments); },
comments: function() { return this.dispatcher.doCall('comments',arguments); },
hasSubmittedComments: function() { return this.dispatcher.doCall('hasSubmittedComments',arguments); },
displayThumbnails: function() { return this.dispatcher.doCall('displayThumbnails',arguments); },
displayCommentForm: function() { return this.dispatcher.doCall('displayCommentForm',arguments); },
displayPrototype: function() { return this.dispatcher.doCall('displayPrototype',arguments); },
displayPrototypeImage: function() { return this.dispatcher.doCall('displayPrototypeImage',arguments); },
displayRatingForm: function() { return this.dispatcher.doCall('displayRatingForm',arguments); },
submitRank: function() { return this.dispatcher.doCall('submitRank',arguments); },
submitComment: function() { return this.dispatcher.doCall('submitComment',arguments); },
tallyVote: function() { return this.dispatcher.doCall('tallyVote',arguments); },
questionnaire: function() { return this.dispatcher.doCall('questionnaire',arguments); },
questionnaireform: function() { return this.dispatcher.doCall('questionnaireform',arguments); },
starForm: function() { return this.dispatcher.doCall('starForm',arguments); },
handlePostData: function() { return this.dispatcher.doCall('handlePostData',arguments); },
storeResponse: function() { return this.dispatcher.doCall('storeResponse',arguments); },
thankyou: function() { return this.dispatcher.doCall('thankyou',arguments); }
}
<?php
require_once 'MDB2.php';
require_once 'DB/DataObject.php';
require_once 'HTML/Table.php';
// Load database settings
$dboptions = &PEAR::getStaticProperty('DB_DataObject', 'options');
$dboptions = array(
'database' => 'mysqli://designsurvey:designsurvey@localhost/designsurvey',
'schema_location' => 'DataObjects',
'class_location' => dirname(__FILE__).'/DataObjects',
'require_prefix' => dirname(__FILE__).'/DataObjects',
'class_prefix' => 'DataObjects_',
'db_driver' => 'MDB2'
);
session_set_cookie_params(0, '/workspace/wdndesignsurvey/', 'ucommbieber.unl.edu');
session_start();
Order deny,allow
deny from all
\ No newline at end of file
CREATE USER 'designsurvey'@'localhost' IDENTIFIED BY 'designsurvey';
GRANT USAGE ON * . * TO 'designsurvey'@'localhost' IDENTIFIED BY 'designsurvey' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `designsurvey` ;
GRANT ALL PRIVILEGES ON `designsurvey` . * TO 'designsurvey'@'localhost';
USE `designsurvey`;
--
-- Table structure for table `age_groups`
--
CREATE TABLE IF NOT EXISTS `age_groups` (
`id` int(11) NOT NULL auto_increment,
`age_group` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `audiences`
--
CREATE TABLE IF NOT EXISTS `audiences` (
`id` int(11) NOT NULL auto_increment,
`audience` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `auth`
--
CREATE TABLE IF NOT EXISTS `auth` (
`username` varchar(50) NOT NULL default '',
`password` varchar(32) NOT NULL default '',
PRIMARY KEY (`username`),
KEY `password` (`password`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `prototype`
--
CREATE TABLE IF NOT EXISTS `prototype` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(20) default NULL,
`splash_image` varchar(255) NOT NULL default '',
`full_image` varchar(255) default NULL,
`thumb_image` varchar(255) default NULL,
PRIMARY KEY (`id`),
KEY `title` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `prototype_ranking`
--
CREATE TABLE IF NOT EXISTS `prototype_ranking` (
`id` int(11) NOT NULL auto_increment,
`voter_id` int(11) NOT NULL default '0',
`prototype_id` int(11) NOT NULL default '0',
`rank` int(11) NOT NULL default '0',
`why_response` mediumtext,
`improve_response` mediumtext,
PRIMARY KEY (`id`),
KEY `voter_id` (`voter_id`,`prototype_id`,`rank`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `prototype_rating`
--
CREATE TABLE IF NOT EXISTS `prototype_rating` (
`id` int(11) NOT NULL auto_increment,
`voter_id` int(11) NOT NULL default '0',
`prototype_id` int(11) NOT NULL default '0',
`rating` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `voter_id` (`voter_id`,`prototype_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `prototype_sent`
--
CREATE TABLE IF NOT EXISTS `prototype_sent` (
`id` int(11) NOT NULL auto_increment,
`voter_id` int(11) NOT NULL default '0',
`prototype_id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `voter_id` (`voter_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `questions`
--
CREATE TABLE IF NOT EXISTS `questions` (
`id` int(11) NOT NULL auto_increment,
`audience_id` int(11) NOT NULL default '0',
`question` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `audience_id` (`audience_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `rating_lead_questions`
--
CREATE TABLE IF NOT EXISTS `rating_lead_questions` (
`id` int(11) NOT NULL auto_increment,
`lead_question` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `rating_questions`
--
CREATE TABLE IF NOT EXISTS `rating_questions` (
`id` int(11) NOT NULL auto_increment,
`audience_id` int(11) NOT NULL default '0',
`lead_question_id` int(11) NOT NULL default '0',
`question` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `audience_id` (`audience_id`),
KEY `lead_question_id` (`lead_question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `rating_responses`
--
CREATE TABLE IF NOT EXISTS `rating_responses` (
`id` int(11) NOT NULL auto_increment,
`voter_id` int(11) NOT NULL default '0',
`question_id` int(11) NOT NULL default '0',
`response` int(11) default NULL,
PRIMARY KEY (`id`),
KEY `voter_id` (`voter_id`,`question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `responses`
--
CREATE TABLE IF NOT EXISTS `responses` (
`id` int(11) NOT NULL auto_increment,
`voter_id` int(11) NOT NULL default '0',
`question_id` int(11) NOT NULL default '0',
`response` mediumtext,
PRIMARY KEY (`id`),
KEY `voter_id` (`voter_id`,`question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `voter`
--
CREATE TABLE IF NOT EXISTS `voter` (
`id` int(11) NOT NULL auto_increment,
`audience_id` int(11) default NULL,
`age_group_id` int(11) default NULL,
`gender` char(1) default NULL,
`ip` varchar(15) NOT NULL default '',
`step` int(10) unsigned default NULL,
`prototype_order` mediumtext,
`submitdatetime` datetime default NULL,
PRIMARY KEY (`id`),
KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment