Third pass at adding key files

This commit is contained in:
dsainty
2024-06-17 22:27:49 +10:00
parent b6fc94ff0f
commit 392aa512b3
633 changed files with 72489 additions and 0 deletions

View File

@ -0,0 +1,6 @@
AuthUserFile /home/slowtwitch/forum.slowtwitch.com/cgi-bin/admin/.htpasswd
AuthGroupFile /dev/null
AuthType Basic
AuthName "Gossamer Forum Administration"
require valid-user

View File

@ -0,0 +1,147 @@
<?
###########################################
#-----------Users login system------------#
###########################################
/*=========================================\
Author : Mohammed Ahmed(M@@king) \\
Version : 1.0 \\
Date Created: Aug 20 2005 \\
---------------------------- \\
Last Update: August 22 2005 \\
---------------------------- \\
Country : Palestine \\
City : Gaza \\
E-mail : m@maaking.com \\
MSN : m@maaking.com \\
AOL-IM : maa2pal \\
WWW : http://www.maaking.com \\
Mobile/SMS : 00972-599-622235 \\
\\
===========================================\
------------------------------------------*/
//skip the config file if somebody call it from the browser.
session_start();
if (eregi("config.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
//your database hostname.
$dbhost = "192.168.1.10";
//your database username.
$dbuname = "slowtwitch";
//your db password
$dbpass = "k9volqlAcpq";
$dbname = "slowtwitch";
//don't change unless you change this value in the db.
$prefix = "gforum_";
//change this
$site_name = "Slowtwitch.com";
$site_email = "aaron@gossamer-threads.com";
$site_url = "http://forum.slowtwitch.com/survey/";
//added new code to fix compatibility issues.
//09-Nov-2005
$phpver = phpversion();
if ($phpver < '4.1.0') {
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
$_SERVER = $HTTP_SERVER_VARS;
}
if ($phpver >= '4.0.4pl1' && strstr($_SERVER["HTTP_USER_AGENT"],'compatible')) {
if (extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}
} else if ($phpver > '4.0') {
if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
if (extension_loaded('zlib')) {
$do_gzip_compress = TRUE;
ob_start(array('ob_gzhandler',5));
ob_implicit_flush(0);
header('Content-Encoding: gzip');
}
}
}
$phpver = explode(".", $phpver);
$phpver = "$phpver[0]$phpver[1]";
if ($phpver >= 41) {
$PHP_SELF = $_SERVER['PHP_SELF'];
}
if (!ini_get("register_globals")) {
import_request_variables('GPC');
}
include("mysql.class.php");
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
echo "<br><font color=red><h3><br><center>Error:</b><br><hr><br>
<b>Connection to database failed</b><br>
<br><br><br><br><br><br><br><br><br></b></center>";
exit();
}
function get_sid() {
if (isset($_SESSION['cookie']) and $_SESSION['cookie']) {
return '';
}
else {
return '&'.SID;
}
}
//global function for checking whether user is logged in or not.
//you will notice we will use it everwhere in the script.
function is_logged_in($user) {
global $db,$prefix;
// return true if we're already logged in
if (isset($_SESSION['user'])) {
return 1;
}
// try and get the session id
if (isset($_REQUEST['gforum_1022870964_session'])) {
$session_id = $_REQUEST['gforum_1022870964_session'];
}
else if ($_REQUEST['from'] == 'gforum') {
foreach ($_COOKIE as $key => $value) {
if (preg_match('/gforum.*session/', $key)) {
$session_id = $value;
break;
}
}
if (! isset($session_id)) {
return 0;
}
}
// return false if we have no login info
else {
return 0;
}
$result = mysql_query("SELECT session_user_id FROM ".$prefix."Session WHERE session_id='$session_id'") or die (mysql_error());
$row = mysql_fetch_array($result);
$user_id = $row['session_user_id'];
$result = mysql_query("SELECT user_username,user_password,user_last_logon FROM ".$prefix."User WHERE user_id='$user_id'");
$row = mysql_fetch_array($result);
$_SESSION['user'] = base64_encode($row['user_username']);
$_SESSION['password'] = base64_encode($row['user_password']);
$_SESSION['user_id'] = base64_encode($user_id);
$_SESSION['session_id'] = $session_id;
$_SESSION['cookie'] = !(isset($_REQUEST['session']));
// we're now logged in, so return 1
return 1;
// TODO: SLOWTWITCH CHANGE END
}
?>

View File

@ -0,0 +1,110 @@
<body id="home">
<div id="accessibility"><a href="#content">Skip to Content</a></div>
<hr class="hide" />
<div id="wrapper">
<div id="header">
<div id="ad_728x90"><!-- BEGIN ADVERTPRO CODE BLOCK -->
<SCRIPT language="JavaScript" type="text/javascript">
<!--
document.write('<SCR'+'IPT src="http://reach.slowtwitch.com/servlet/view/banner/javascript/zone?zid=13&pid=0&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
//-->
</SCRIPT>
<NOSCRIPT>
<A href="http://reach.slowtwitch.com/servlet/click/zone?zid=13&pid=0&lookup=true&position=1" target="_top">
<IMG src="http://reach.slowtwitch.com/servlet/view/banner/image/zone?zid=13&pid=0&position=1" height="90" width="728" border="0" alt="Click Here!">
</A>
</NOSCRIPT>
<!-- END ADVERTPRO CODE BLOCK --></div>
<div id="logo"><h1><a href="http://www.slowtwitch.com">&lt;:: Welcome to Slowtwitch.com ::&gt;</a></h1></div>
</div>
<div class="navbar clear">
<ul class="primarynav">
<li class="home"><a href="http://www.slowtwitch.com">Home</a></li>
<li>
<a href="http://www.slowtwitch.com/Bike_Fit/index.html">Bike Fit</a>
</li>
<li><a href="http://calendar.slowtwitch.com" style="color: white;">Calendar</a></li>
<li>
<a href="http://www.slowtwitch.com/Features/index.html">Features</a>
</li>
<li><a href="http://forum.slowtwitch.com" style="color: white;">FORUM</a></li>
<li>
<a href="http://www.slowtwitch.com/Interview/index.html">Interview</a>
</li>
<li>
<a href="http://www.slowtwitch.com/Lifestyle/index.html">Lifestyle</a>
</li>
<li>
<a href="http://www.slowtwitch.com/News/index.html">News</a>
</li>
<li>
<a href="http://www.slowtwitch.com/Opinion/index.html">Opinion</a>
</li>
<li>
<a href="http://www.slowtwitch.com/Products/index.html">Products</a>
</li>
<li>
<a href="http://www.slowtwitch.com/RD_Aids/index.html">RD Aids</a>
</li>
<li>
<a href="http://www.slowtwitch.com/Tech/index.html">Tech</a>
</li>
<li>
<a href="http://www.slowtwitch.com/Training/index.html">Training</a>
</li>
<li style="background: none;">
<a href="http://www.slowtwitch.com/Wrenchwork/index.html">Wrenchwork</a>
</li>
</ul>
</div>
<hr class="hide" />
<div id="ocwrapper" class="clear">
<div id="icwrapper" class="clear">
<div id="leftsidebar">
<?
include("include_status.php");
?>
<div style="margin-bottom: 15px;">
<!-- BEGIN ADVERTPRO CODE BLOCK -->
<SCRIPT language="JavaScript" type="text/javascript">
<!--
document.write('<SCR'+'IPT src="http://reach.slowtwitch.com/servlet/view/banner/javascript/zone?zid=18&pid=0&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
//-->
</SCRIPT>
<NOSCRIPT>
<A href="http://reach.slowtwitch.com/servlet/click/zone?zid=18&pid=0&lookup=true&position=1" target="_top">
<IMG src="http://reach.slowtwitch.com/servlet/view/banner/image/zone?zid=18&pid=0&position=1" height="600" width="120" border="0" alt="Click Here!">
</A>
</NOSCRIPT>
<!-- END ADVERTPRO CODE BLOCK -->
</div>
<div style="margin-bottom: 15px;">
<!-- BEGIN ADVERTPRO CODE BLOCK -->
<SCRIPT language="JavaScript" type="text/javascript">
<!--
document.write('<SCR'+'IPT src="http://reach.slowtwitch.com/servlet/view/banner/javascript/zone?zid=1&pid=0&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
//-->
</SCRIPT>
<NOSCRIPT>
<A href="http://reach.slowtwitch.com/servlet/click/zone?zid=1&pid=0&lookup=true&position=1" target="_top">
<IMG src="http://reach.slowtwitch.com/servlet/view/banner/image/zone?zid=1&pid=0&position=1" height="90" width="120" border="0" alt="Click Here!">
</A>
</NOSCRIPT>
<!-- END ADVERTPRO CODE BLOCK -->
</div>
</div>
<div id="contentwrapper" class="shadowleft">
<div class="shadowtop"><div class="shadowtopleft"></div><div class="shadowtopright"></div></div>
<div class="shadowright">
<div id="content">
<div class="clear"></div>

View File

@ -0,0 +1,78 @@
</div>
</div>
<div class="shadowbottom"><div class="shadowbottomleft"></div><div class="shadowbottomright"></div></div>
</div>
<div id="rightsidebar">
<div style="margin-bottom: 15px;">
<!-- BEGIN ADVERTPRO CODE BLOCK -->
<SCRIPT language="JavaScript" type="text/javascript">
<!--
document.write('<SCR'+'IPT src="http://reach.slowtwitch.com/servlet/view/banner/javascript/zone?zid=4&pid=0&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
//-->
</SCRIPT>
<NOSCRIPT>
<A href="http://reach.slowtwitch.com/servlet/click/zone?zid=4&pid=0&lookup=true&position=1" target="_top">
<IMG src="http://reach.slowtwitch.com/servlet/view/banner/image/zone?zid=4&pid=0&position=1" height="60" width="120" border="0" alt="Click Here!">
</A>
</NOSCRIPT>
<!-- END ADVERTPRO CODE BLOCK -->
</div>
<div style="margin-top: 15px;">
<!-- BEGIN ADVERTPRO CODE BLOCK -->
<SCRIPT language="JavaScript" type="text/javascript">
<!--
document.write('<SCR'+'IPT src="http://reach.slowtwitch.com/servlet/view/banner/javascript/zone?zid=21&pid=0&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
//-->
</SCRIPT>
<NOSCRIPT>
<A href="http://reach.slowtwitch.com/servlet/click/zone?zid=21&pid=0&lookup=true&position=1" target="_top">
<IMG src="http://reach.slowtwitch.com/servlet/view/banner/image/zone?zid=21&pid=0&position=1" height="240" width="120" border="0" alt="Click Here!">
</A>
</NOSCRIPT>
<!-- END ADVERTPRO CODE BLOCK -->
</div>
<div style="margin-top: 15px;">
<!-- BEGIN ADVERTPRO CODE BLOCK -->
<SCRIPT language="JavaScript" type="text/javascript">
<!--
document.write('<SCR'+'IPT src="http://reach.slowtwitch.com/servlet/view/banner/javascript/zone?zid=1&pid=0&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
//-->
</SCRIPT>
<NOSCRIPT>
<A href="http://reach.slowtwitch.com/servlet/click/zone?zid=1&pid=0&lookup=true&position=1" target="_top">
<IMG src="http://reach.slowtwitch.com/servlet/view/banner/image/zone?zid=1&pid=0&position=1" height="90" width="120" border="0" alt="Click Here!">
</A>
</NOSCRIPT>
<!-- END ADVERTPRO CODE BLOCK -->
</div>
</div>
</div>
</div>
<hr class="hide" />
<div id="footer" class="clear">
<ul class="secondarynav">
<li><a href="http://www.slowtwitch.com/aboutus.html">ABOUT US</a></li>
<li><a href="http://www.slowtwitch.com/privacy.html">PRIVACY POLICY</a></li>
<li style="background-image: none"><a href="http://www.slowtwitch.com/agreement.html">USER AGREEMENT</a></li>
</ul>
<p>&copy; 2007 Slowtwitch.com<br />
Reproduction of material from any Slowtwitch.com page without written permission is strictly prohibited.<br />
17116 Bob's Gap Rd, Valyermo, CA 93563-0056<br />
Telephone 661.944.5239<br />
<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#115;&#108;&#111;&#119;&#109;&#97;&#110;&#64;&#115;&#108;&#111;&#119;&#116;&#119;&#105;&#116;&#99;&#104;&#46;&#99;&#111;&#109;">slowman-AT-slowtwitch-DOT-com</a>
</p>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="http://forum.slowtwitch.com/survey/" />
<title><? echo $site_name; ?>: <? echo $pagetitle; ?></title>
<meta name="KEYWORDS"
content="<? echo($meta_keywords); ?>" />
<meta name="DESCRIPTION"
content="<? echo($meta_description); ?>"/>
<meta http-equiv="CONTENT-STYLE-TYPE" content="text/CSS" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="shortcut icon" href="http://www.slowtwitch.com/favicon.ico" />
<link rel="alternate" type="application/rss+xml" title="Slowtwitch.com - RSS" href="http://www.slowtwitch.com/rss" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<link type="text/css" rel="stylesheet" href="http://www.slowtwitch.com/articles/static/luna/luna.css" />
<link rel="stylesheet" type="text/css" href="rating/styles/rating.css" />
<script type="text/javascript" src="rating/scripts/prototype.js"></script>
<script type="text/javascript" src="rating/scripts/rating.js"></script>
<script type="text/javascript" src="http://www.slowtwitch.com/articles/static/utils.js"></script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :
"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2419103-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- begin script to create random number for ads -->
<script language="Javascript">
<!--
sgi_ord=Math.random()*10000000000000000;
//-->
</script>
<!-- End random number script -->
<script type="text/javascript">
<!--
function showDiv(id)
{
el = document.getElementById(id);
if (el.style.display == 'none')
{
el.style.display = 'block';
} else {
el.style.display = 'none';
}
}
function swapImage(imgName, imgSrc)
{
imgToSwap = document.images[imgName];
if (imgSrc.indexOf("/images/buttonMinimize.gif") > 0)
{
imgToSwap.src = "/images/buttonExpand.gif";
} else {
imgToSwap.src = "/images/buttonMinimize.gif";
}
}
function checkUncheck() {
var argv = checkUncheck.arguments;
var chks = document.getElementsByName('states[]');
var argc = argv.length;
var caller = argv[0];
if (caller.checked) {
var status = true;
} else {
var status = false;
}
for (var i = 1; i < argc; i++) {
for (var j = 0; j < chks.length; j++) {
if (chks[j].value == argv[i]) { chks[j].checked = status; }
}
}
}
-->
</script>
</head>

View File

@ -0,0 +1,41 @@
<!-- Start header -->
<!--div class="header">
</div-->
<!-- End header -->
<!-- Start top nav bar -->
<!--div--><!-- class="top-nav"-->
<!--div--><!-- class="top-nav-inner"-->
<!--<a href="./?" title="Homepage">Home</a>&nbsp;&nbsp;&nbsp;-->
<!--
TODO: SLOWTWITCH EDIT
<a href="blogs/page1.html" title="Blog">Blog</a>&nbsp;&nbsp;&nbsp;
<a href="racereports/page1.html" title="Race Reports">Race Reports</a>&nbsp;&nbsp;&nbsp;
-->
<?PHP
//echo "<a href=\"./?".get_sid()."\" title=\"Homepage\">Home</a>&nbsp;&nbsp;&nbsp;";
//echo "<a href=\"about.html?".get_sid()."\" title=\"About\">About</a>&nbsp;&nbsp;&nbsp;";
//echo "<a href=\"contact.html?".get_sid()."\" title=\"Contact Us\">Contact</a>&nbsp;&nbsp;&nbsp;";
if(is_logged_in($user)){
$username = base64_decode($_SESSION['user']);
//echo "Welcome, <strong>$username</strong>:<br><a href=\"logout.php\">Log out</a>";
}else{
//echo "<a href=\"register.html?".get_sid()."\" title=\"Register\">Register</a>&nbsp;&nbsp;&nbsp;";
//echo "&nbsp;&nbsp;&nbsp;&nbsp;";
//echo "<input type='hidden' name='from' value='survey'>";
//echo "You are not logged in:<br><a href=\"http://forum.slowtwitch.com/gforum.cgi?do=login&from=survey\">Log in</a> | <a href=\"http://forum.slowtwitch.com/gforum.cgi?do=user_signup\">Register</a>";
}
?>
<!--br /-->
<? /** if(isset($username)){
if($username == "Slowman" || $username == "Rappstar") { echo("<br /><a href='results.php'><strong>Survey Results</strong></a>"); }
} **/
?>
<!--/div-->
<!--/div-->
<!-- End top nav bar -->
<? ?>

View File

@ -0,0 +1,33 @@
<?PHP
if (eregi("include_survey.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php"); die();
}
$questionList = mysql_query("SELECT * FROM gforum_SurveyQuestion WHERE Survey_ID_FK = 1 ORDER BY Question_ID;");
echo ("<form name='2008survey' method='post' action='index.php' >"); //onSubmit=\"return confirm('Are you ready to submit your answers?');\"
while($question = mysql_fetch_array($questionList)) {
echo ("<div class='question' style='clear: both; margin: 15px 0px 15px 0px;'>\n");
echo ("<span class='question_topic' style='font-weight: bold'>".$question['Question_Name'].": </span><br />\n");
echo("<span class='question_subtitle' style='font-style: italic'>".$question['Question_Description']."</span><br />\n");
$answerList = mysql_query("SELECT * FROM gforum_SurveyAnswer WHERE Question_ID_FK = ". $question['Question_ID']." ORDER BY Answer_Name;");
while($answer = mysql_fetch_array($answerList)) {
$temp = "qid".$question['Question_ID'];
$selected = "";
if ($answer['Answer_ID'] == $_POST[$temp]) { $selected = "checked"; }
echo ("<input type='radio' name='qid".$question['Question_ID']."' value='".$answer['Answer_ID']."' ".$selected.">".$answer['Answer_Name']."<br />\n");
}
//echo ("<input type='radio' name='".$question['Question_ID']."' value='0'>No Vote<br />");
echo ("</div>\n");
}
$ip = $_SERVER['REMOTE_ADDR'];
echo ("<input type=\"hidden\" name=\"uid\" value=\"$useruid\" >\n");
echo ("<input type=\"hidden\" name=\"ip\" value=\"$ip\" >\n");
echo ("<input type=\"submit\" name=\"Submit\" value=\"SUBMIT\" class='nobutton'><br /><br /><input type=\"reset\" name=\"Reset\" value=\"RESET\" class='nobutton'>");
echo ("</form>");
?>

View File

@ -0,0 +1,43 @@
<?PHP
if (eregi("include_survey_confirm.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php"); die();
}
echo ("<form name='2008survey' method='post' action='survey_X.php' >"); //onSubmit=\"return confirm('Are you ready to submit your answers?');\"
echo ("<p><strong>Please review your answers before submitting.</strong><br /></p>");
$tripwire = 0;
foreach($_POST as $questionID => $answerID) {
$questionID = ltrim($questionID,'qid');
if (is_numeric($questionID)) {
$question = mysql_fetch_array(mysql_query("SELECT * FROM gforum_SurveyQuestion WHERE Question_ID = ".$questionID." LIMIT 1;")) or die(mysql_error());
$answer = mysql_fetch_array(mysql_query("SELECT * FROM gforum_SurveyAnswer WHERE Answer_ID = ".$answerID." LIMIT 1;")) or die(mysql_error());
echo ("<div class='question' style='clear: both; margin: 15px 0px 15px 0px;'>\n");
echo ("<span class='question_topic' style='font-weight: bold'>".$question['Question_Name'].": </span>\n");
echo ($answer['Answer_Name']."<br />\n");
echo ("<input type=\"hidden\" name=\"qid".$questionID."\" value=\"".$answerID."\" >\n");
echo ("</div>\n");
$tripwire = 1;
}
}
if ($tripwire == 0) {
Header("Location: index.php?empty_set=1");
die();
}
echo ("<input type=\"hidden\" name=\"uid\" value=\"".$_POST['uid']."\" >\n");
echo ("<input type=\"hidden\" name=\"ip\" value=\"".$_POST['ip']."\" >\n");
echo ("<input type=\"submit\" name=\"Submit\" value=\"SUBMIT\" class='nobutton'>
</form><br/><form name='editSurvey' action='index.php?edit=yes' method='post'><input type=\"submit\" name=\"Submit\" value=\"EDIT ANSWERS\" class='nobutton' >");
foreach($_POST as $questionID => $answerID) {
echo("<input type='hidden' name='".$questionID."' value='".$answerID."' >\n");
}
echo("<input type='hidden' name='edit' value='true' >");
echo ("</form>");
?>

View File

@ -0,0 +1,98 @@
<?PHP include("config.php");
// set the page title
$pagetitle = "2008 Annual Industry Awards";
// set meta tags
$meta_keywords = "awards, survey";
$meta_description = "Slowtwitch Industry Awards Survey.";
?>
<? include("include_common_head.php"); ?>
<? include("include_common_content.php"); ?>
<!-- Start outer -->
<div id="outer">
<!-- BODY -->
<div class="content">
<!-- End left column -->
<!-- Content col -->
<h3 style="margin-top: 0px;">The Slowtwitch Annual Industry Awards 2008 Reader Survey</h3>
<div style="float: right; width: 48%; text-align: justify;">
<p><strong>Directions For Taking the Survey</strong></p>
<p>You must be logged in with a Slowtwitch forum username in order to complete this survey. If you are a forum user, and you use the "remember me" feature on the forum (requires cookies), you should be automatically logged in here. If you are not logged in, please follow the "Login" link to your left in order to do so. You will be redirected back to this page.<br /><br />If you do not have a forum account, you may follow the "Register" link to your left to create one. Once you have created a forum username, please return to this page.<br /><br /><span style="font-style: italic;">You do not have to answer all the questions, but you cannot come back and vote on questions you leave blank.</span> If you don't have an opinion about a particular category, just leave that question blank. If you select an answer and then decide that you would rather not vote on that particular category, just click the reset button at the bottom to clear the form. This will reset all your answers, so please go back and complete only the categories you wish to vote on.</p>
<p>You will have a chance to confirm (and reconsider) your selections before submitting them to the official record.</p>
<p>There are no "write-in" options. If you disagree with our selections, you can voice that concern to us via email or on the forum. Your selections are limited to the choices here. You may either choose from among those choices or exercise your write to expression through abstention if you don't like our options.<br /><br />This survey is based on your opinions; you do not need to have used every (or even any) of the products in a category to vote.</p>
<p>If you have a suggestion or critique that might allow us to better reach our aspirations, please <a href="mailto:slowman@slowtwitch.com">contact</a> us. Otherwise, please move ahead to the survey.</p>
<p><strong>Awards Presentation</strong></p>
<p>The presentation of these awards will take place during the week of September 22nd live (online) from the Interbike tradeshow in Las Vegas, NV.</p>
<p><strong>Privacy Policy</strong></p>
<p>The survey results are entirely anonymous. Your user id will be logged only to record your participation and will in no way be linked to your responses.</p>
</div>
<div style="float: left; width: 48%;">
<p>Voting is now closed.</p>
<?
/*/ is the user logged in?
if(is_logged_in($user)){
// have they taken the survey?
// if no, let them take the survey
//Get user's uid
$username = base64_decode($_SESSION['user']);
if ($username == "") {
// bug in the session
Header("Location: logout.php");
die();
}
$testresults = mysql_query("SELECT user_id FROM ".$prefix."User WHERE user_username=\"".$username."\";") or die("SQL Error: ".mysql_error());
$testrow = mysql_fetch_array($testresults);
$useruid = $testrow[user_id];
$taken = mysql_num_rows(mysql_query("SELECT * FROM gforum_SurveyVote WHERE Survey_ID_FK = 1 AND User_ID_FK = $useruid AND 1 = 1;"));
if ($taken == 0) {
echo "<p>Welcome, <strong>$username</strong> [if this is not you, click here to <a href=\"logout.php\">log out</a>]. Thank you for participating.<br /></p>\n";
if ($_GET['empty_set'] == 1) {
echo ("<p style='font-weight: bold; color: red;'>You have not completed any categories.</p>");
}
if ($_POST['uid'] && $_POST['edit'] != true) {
include("include_survey_confirm.php");
} else { include("include_survey.php"); }
} else {
if ($_GET['thank_you'] == 1) {
echo ("<p>Thank you for completing our 2008 survey. Please check back later for the results. Click here to <a href=\"logout.php\">Log out</a></p>");
} else {
echo ("<p>You have already taken this survey. Please check back later for the results.</p>");
}
}
}else{
echo ("<input type='hidden' name='from' value='survey'>");
echo ("<p>You are not logged in. Please <a href=\"http://forum.slowtwitch.com/gforum.cgi?do=login&from=survey\">Log in</a> or <a href=\"http://forum.slowtwitch.com/gforum.cgi?do=user_signup\">Register</a></p>");
}*/
?>
</div>
<div style="clear: both;">
<? if(isset($username)){
if($username == "Slowman" || $username == "Rappstar") { echo("<br /><h3>Survey Results</h3>"); include("results.php"); }
}
?>
</div>
<!-- End content col -->
</div>
<!-- End BODY -->
</div>
<!-- End Outer -->
<? include("include_common_footer.php"); ?>

View File

@ -0,0 +1,123 @@
function validateEmail(emailAddress) {
var match = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/.test(emailAddress);
return match;
}
function CheckRegisterForm(RegisterForm)
{
if (RegisterForm.username.value == "" ) { alert( "Please choose a username!" );
RegisterForm.username.focus();
return false; }
if (RegisterForm.password.value == "" ) { alert( "Please choose a password!" );
RegisterForm.password.focus();
return false; }
if (RegisterForm.email.value == "" ) { alert( "Please enter your email address." );
RegisterForm.email.focus();
return false; }
checkEmail = RegisterForm.email.value
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
{alert("Your emails address is invalid!.");
RegisterForm.email.focus();
return false; }
// return true;
}
function CheckTellForm(tellform)
{
if (tellform.name.value == "" ) { alert( "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
tellform.name.focus();
return false; }
if (tellform.email.value == "" ) { alert( "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
tellform.email.focus();
return false; }
checkEmail = tellform.email.value
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
{alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>!.");
tellform.email.focus();
return false; }
if (tellform.fname.value == "" ) { alert( "<22><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>" );
tellform.fname.focus();
return false; }
if (tellform.femail.value == "" ) { alert( "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
tellform.femail.focus();
return false; }
checkEmail = tellform.femail.value
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
{alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>!.");
tellform.femail.focus();
return false; }
// return true;
}
var newwindow;
function pop(url)
{
newwindow=window.open(url,'poppage', 'toolbars=0, scrollbars=1, location=0, statusbars=1, menubars=0, resizable=0, width=500, height=400');
if (window.focus) {newwindow.focus()}
}
function popimg(url)
{
newwindow=window.open(url,'name','height=500,width=650,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
if (window.focus) {newwindow.focus()}
}
<!-- ;
var newwindow;
var wheight = 0, wwidth = 0;
function viewimg(url, title, iwidth, iheight, colour) {
var pwidth, pheight;
if ( !newwindow || newwindow.closed ) {
pwidth=iwidth+30;
pheight=iheight+30;
newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
wheight=iheight;
wwidth=iwidth;
}
if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=iwidth+30;
pheight=iheight+60;
newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}
newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
newwindow.document.writeln('<a titl="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" href="javascript:window.close();"><img src=' + url + ' border=0></a>');
newwindow.document.writeln('<\/center> <\/body> <\/html>');
newwindow.document.close();
newwindow.focus();
}
// Routines to tidy up popup windows when page is left
// Call with an onUnload="tidy5()" in body tag
function tidy5() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}

View File

@ -0,0 +1,7 @@
<?PHP
include("config.php");
session_unset();
session_destroy();
$_SESSION = array();
header("Location: http://forum.slowtwitch.com/gforum.cgi?do=logout&from=survey");
?>

View File

@ -0,0 +1,339 @@
<?PHP
###########################################
#-----------Users login system------------#
###########################################
/*=========================================\
Author : Mohammed Ahmed(M@@king) \\
Version : 1.0 \\
Date Created: Aug 20 2005 \\
---------------------------- \\
Last Update: August 22 2005 \\
---------------------------- \\
Country : Palestine \\
City : Gaza \\
E-mail : m@maaking.com \\
MSN : m@maaking.com \\
AOL-IM : maa2pal \\
WWW : http://www.maaking.com \\
Mobile/SMS : 00972-599-622235 \\
\\
===========================================\
------------------------------------------*/
if (eregi("mysql.class.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php"); die();
}
//db class
if(!defined("SQL_LAYER"))
{
define("SQL_LAYER","mysql");
class sql_db
{
var $db_connect_id;
var $query_result;
var $row = array();
var $rowset = array();
var $num_queries = 0;
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
if($this->persistency)
{
$this->db_connect_id = @mysql_pconnect($this->server, $this->user, $this->password);
}
else
{
$this->db_connect_id = @mysql_connect($this->server, $this->user, $this->password);
}
if($this->db_connect_id)
{
if($database != "")
{
$this->dbname = $database;
$dbselect = @mysql_select_db($this->dbname);
if(!$dbselect)
{
@mysql_close($this->db_connect_id);
$this->db_connect_id = $dbselect;
}
}
return $this->db_connect_id;
}
else
{
return false;
}
}
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
if($this->query_result)
{
@mysql_free_result($this->query_result);
}
$result = @mysql_close($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
//
// Base query method
//
function sql_query($query = "", $transaction = FALSE)
{
// Remove any pre-existing queries
unset($this->query_result);
if($query != "")
{
$this->query_result = @mysql_query($query, $this->db_connect_id);
}
if($this->query_result)
{
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
return $this->query_result;
}
else
{
return ( $transaction == END_TRANSACTION ) ? true : false;
}
}
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_num_rows($query_id);
return $result;
}
else
{
return false;
}
}
function sql_affectedrows()
{
if($this->db_connect_id)
{
$result = @mysql_affected_rows($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_numfields($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_num_fields($query_id);
return $result;
}
else
{
return false;
}
}
function sql_fieldname($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_field_name($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fieldtype($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_field_type($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fetchrow($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$this->row[$query_id] = @mysql_fetch_array($query_id);
return $this->row[$query_id];
}
else
{
return false;
}
}
function sql_fetchrowset($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
unset($this->rowset[$query_id]);
unset($this->row[$query_id]);
while($this->rowset[$query_id] = @mysql_fetch_array($query_id))
{
$result[] = $this->rowset[$query_id];
}
return $result;
}
else
{
return false;
}
}
function sql_fetchfield($field, $rownum = -1, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
if($rownum > -1)
{
$result = @mysql_result($query_id, $rownum, $field);
}
else
{
if(empty($this->row[$query_id]) && empty($this->rowset[$query_id]))
{
if($this->sql_fetchrow())
{
$result = $this->row[$query_id][$field];
}
}
else
{
if($this->rowset[$query_id])
{
$result = $this->rowset[$query_id][$field];
}
else if($this->row[$query_id])
{
$result = $this->row[$query_id][$field];
}
}
}
return $result;
}
else
{
return false;
}
}
function sql_rowseek($rownum, $query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_data_seek($query_id, $rownum);
return $result;
}
else
{
return false;
}
}
function sql_nextid(){
if($this->db_connect_id)
{
$result = @mysql_insert_id($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_freeresult($query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
if ( $query_id )
{
unset($this->row[$query_id]);
unset($this->rowset[$query_id]);
@mysql_free_result($query_id);
return true;
}
else
{
return false;
}
}
function sql_error($query_id = 0)
{
$result["message"] = @mysql_error($this->db_connect_id);
$result["code"] = @mysql_errno($this->db_connect_id);
return $result;
}
} // class sql_db
} // if ... define
?>

View File

@ -0,0 +1,43 @@
<?PHP
if (eregi("results.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php"); die();
}
$questionList = mysql_query("SELECT * FROM gforum_SurveyQuestion WHERE Survey_ID_FK = 1 ORDER BY Question_ID;");
while($question = mysql_fetch_array($questionList)) {
echo ("<div class='question' style='clear: both; margin: 15px 0px 15px 0px;'>\n");
echo ("<span class='question_topic' style='font-weight: bold'>".$question['Question_Name'].": </span><br />\n");
echo("<span class='question_subtitle' style='font-style: italic'>".$question['Question_Description']."</span><br />\n");
$answerList = mysql_query("SELECT * FROM gforum_SurveyAnswer WHERE Question_ID_FK = ". $question['Question_ID']." ORDER BY Answer_Votes DESC;");
$totalVotes = 0;
while($answer = mysql_fetch_array($answerList)) {
echo ($answer['Answer_Name'].": ".$answer['Answer_Votes']."<br />\n");
$totalVotes = $totalVotes + $answer['Answer_Votes'];
}
echo("<strong>Total votes in this category: ".$totalVotes."</strong><br />\n");
//echo ("<input type='radio' name='".$question['Question_ID']."' value='0'>No Vote<br />");
echo ("</div>\n");
}
$tsNow = time();
$tsWeek = time() - (7 * 24 * 60 * 60);
$tsMonth = time() - (30 * 24 * 60 * 60);
$tsSixMonth = time() - (182.5 * 24 * 60 * 60);
echo("<h3>Forum Stats</h3><br />");
$row = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT(user_id_fk)) AS users FROM gforum_Post WHERE post_time < '".$tsNow."' AND post_time > '".$tsWeek."';"));
echo("Number of users who have posted in the past seven days: ".$row['users']."<br />\n");
$row = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT(user_id_fk)) AS users FROM gforum_Post WHERE post_time < '".$tsNow."' AND post_time > '".$tsMonth."';"));
echo("Number of users who have posted in the past thirty days: ".$row['users']."<br />\n");
$row = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT(user_id_fk)) AS users FROM gforum_Post WHERE post_time < '".$tsNow."' AND post_time > '".$tsSixMonth."';"));
echo("Number of users who have posted in the past six months: ".$row['users']."<br />\n");
?>

View File

@ -0,0 +1,28 @@
<?PHP include("config.php");
if (!$_POST) {
Header("Location: index.php");
die();
}
/**foreach($_POST as $key => $data) {
echo ($key.": ".$data ."<br />\n");
}**/
$answerSet = "(0";
foreach($_POST as $questionID => $answerID) {
if (is_numeric(ltrim($questionID,'qid'))) $answerSet .= ",".$answerID;
}
$answerSet .= ")";
//echo $answerSet;
$result = mysql_query("UPDATE gforum_SurveyAnswer SET Answer_Votes = Answer_Votes + 1 WHERE Answer_ID IN ".$answerSet) OR die(mysql_error());
$result = mysql_query("INSERT INTO gforum_SurveyVote (Survey_ID_FK, User_ID_FK, Vote_IP, Vote_Time) VALUES (1, ".$_POST['uid'].", '".$_POST['ip']."', UNIX_TIMESTAMP(NOW()) )") OR die(mysql_error());
$result = mysql_query("INSERT INTO gforum_SurveyRecord (Survey_ID_FK, Record_Set) VALUES (1, '".$answerSet."')") OR die(mysql_error());
Header("Location: index.php?thank_you=1");
?>