Alright, I thought I had done everything right but obviously not.
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # FORM TO THREAD/ FORUM/ PM/ EMAIL - Totally CUSTOMIZABLE FORMS # ||
|| # Version 1.5 for vBulletin 3.x.x by Dr Erwin Loh # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000?2004 Dr Erwin Loh. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #################################################################### ||
\*======================================================================*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
$globaltemplates = array(
'form1',
'formanswers'
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
globalize($_POST, array(
'normalanswer1' => STR,
'normalanswer2' => STR,
'normalanswer3' => STR,
'normalanswer4' => STR,
'normalanswer5' => STR,
'normalanswer6' => STR,
'radioanswer1' => STR,
'radioanswer2' => STR,
'radioanswer3' => STR,
'radioanswer4' => STR,
'answer1' => STR,
'answer2' => STR,
'answer3' => STR,
'longanswer1' => STR,
'action' => STR
));
// #######################################################################
// ######################## CUSTOMIZE VARIABLES ##########################
// #######################################################################
////////////////////////////////////////////////////////////////////////////////////////////////////
////// BEGIN CUSTOMIZATION BELOW////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array
////////////////////////////////////////////////////////////////////////////////////////////////////
if (!in_array($bbuserinfo['usergroupid'], array(10,11,13,14,15,16,17,18,5,6,7))) print_no_permission();
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF THIS PHP FILE AND TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS!
//You can easily make more forms by just copying this file, renaming it, and modifying the variable in
//this file. You can keep the same templates for different forms. For more customization, you can
//use different templates, by renaming and modifying the templates.
////////////////////////////////////////////////////////////////////////////////////////////////////
// Name of this file
$phpfilename = "form1.php";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////
//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "0";
//FORUM TO POST NEW THREAD IN
$formforumid = "181";
//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "1";
$formoption1 = "Yes";
$formoption2 = "No";
////////////////////////////////////////////////////////////////////////////////////////////////////
//ENABLE FORM TO REPLY TO EXISTING THREAD
$formreply = "0";
//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "0";
//FORUM ID WHERE THE EXISTING THREAD IS IN
$formreplyforumid = "0";
////////////////////////////////////////////////////////////////////////////////////////////////////
//ENABLE FORM TO BE PMED - 1 = yes, 0 = no
$formpm = "0";
//USERID TO PM TO
$formpmid = "1";
////////////////////////////////////////////////////////////////////////////////////////////////////
//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail = "1";
//EMAIL ADDRESS TO EMAIL TO
$formemailaddress = "admin@degrassi-boards.com";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message
// 1 - redirect to post
// 2 - redirect to thread
// 3 - redirect to forum
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////
$redirectoption = "0";
$errormessage = "Thank you so much for submitting this survey! We value your opinion and hope that this can help to make D-B even better!"; //This is the thank you message
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no
////////////////////////////////////////////////////////////////////////////////////////////////////
$answerall = "0";
////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF FORM (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$formtitle = "Degrassi-Boards Survey";
////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$formpurpose = "The purpose of this survey is to get your feedback on things happening around the boards. We value and appreciate you all and hope that you will take the time to submit this. The answers willbe automatically posted in a hidden forum so nobody but staff will be able to see your answers. Once the survey is over, a general post will be made with some general results.";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$normalquestion1 = "What is the best thing about DB?";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 2 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$normalquestion2 = "What is the worst thing about DB?";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 3a (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$radioquestion1 = "Do you agree with all the rules?";
// The following choices must NOT have quotation marks
$radiochoice1a = "yes";
$radiochoice1b = "no";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 3b (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$normalquestion3 = "If you answered no to 3a, which rule do you disagree with? (You may simply put the number)";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 3c (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$normalquestion4 = "If you disagreed with a rule, why is that particular rule one you do not think is right?";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 4a (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$radioquestion2 = "Which of the following would you use to describe the DB staff?";
// The following choices must NOT have quotation marks
$radiochoice2a = "Excellent";
$radiochoice2b = "Average";
$radiochoice2c = "Poor";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 4b (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$normalquestion5 = Why do you feel that way?;
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 5a (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$radioquestion4 = "Do you feel the rules and signature guidelines are easy to understand";
$radioquestion3 = "Do you feel included on the boards?";
// The following choices must NOT have quotation marks
$radiochoice3a = "Always";
$radiochoice3b = "Most of the time";
$radiochoice3c = "Never";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 5b (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$normalquestion6 = "Why do you feel that way?";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 6 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
// The following choices must NOT have quotation marks
$radiochoice4a = "yes";
$radiochoice4b = "no;
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//QUESTION 1 (do not use quotation marks or you will get a parse error)
$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";
//QUESTION 2 (do not use quotation marks or you will get a parse error)
$question2 = "What is your email?";
$explain2 = "Please enter your real email here.";
//QUESTION 3 (do not use quotation marks or you will get a parse error)
$question3 = "What is your website?";
$explain3 = "Please enter your URL here.";
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 7 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////
$longquestion1 = "Any additional comments to add?";
$longexplain1 = "For example, a bit about your experience in this area.";
////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
// start navbar
$navbits = array(
"$phpfilename?$session[sessionurl]" => $formtitle
);
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
if ($action=="submit") {
if ($answerall == "1") {
if ($normalanswer1 == '' OR $normalanswer2 == '' OR $radioanswer1 == '' OR $normalanswer3 == '' $normalanswer4 == '' OR OR $radioanswer2 == '' OR $normalanswer5 == '' OR $radioanswer3 == '' OR $normalanswer6 == '' $radioanswer4 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $longanswer1 == '')
{
$errormessage = "$bbuserinfo[username], you need to answer every question!";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}
}
eval('$formsend = "' . fetch_template('formanswers') . '";');
if ($formforum == "1") {
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "thread(title, lastpost, forumid, open, replycount,
postusername, postuserid, lastposter, dateline, iconid, visible, attach)
VALUES
('".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle', " . TIMENOW . ", $formforumid,
1, 0, '" . addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid],
'" . addslashes($bbuserinfo['username']) . "', " . TIMENOW . ", 0, 1,
0)
");
$thread['threadid'] = $DB_site->insert_id();
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post
(threadid, title, username, userid, dateline, pagetext, allowsmilie,
showsignature, iconid, visible)
VALUES
($thread[threadid], '".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle',
'" . addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid], " . TIMENOW . ",
'" . addslashes($formsend) . "', 1, 1,
0, 1)
");
$post['postid'] = $DB_site->insert_id();
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET firstpostid = $post[postid]
WHERE threadid = $thread[threadid]
");
$DB_site->query("
UPDATE " . TABLE_PREFIX . "forum
SET replycount = replycount + 1,
threadcount = threadcount + 1,
lastpost = " . TIMENOW . ",
lastposter = '" . addslashes($bbuserinfo['username']) . "',
lastthread = '".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle',
lastthreadid = $thread[threadid]
WHERE forumid = $formforumid
");
$forum[forumid] = $formforumid;
}
if ($formpoll == "1") {
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "poll (question,dateline,options,votes,active,numberoptions,timeout,multiple,public) VALUES ('".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle'," . TIMENOW . ",'$formoption1|||$formoption2','" . addslashes("0|||0") . "',1,2,0,0,0)");
$pollid = $DB_site->insert_id();
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET pollid = '".$pollid."' WHERE threadid = '".$thread[threadid]."'");
}
if ($formreply == "1") {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formreplythreadid','".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','" . addslashes($formsend) . "','1','1','0','0','1')");
$DB_site->query("UPDATE thread SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '".addslashes($bbuserinfo[username])."' WHERE threadid = $formreplythreadid");
$DB_site->query("
UPDATE " . TABLE_PREFIX . "forum
SET replycount = replycount + 1,
lastpost = " . TIMENOW . ",
lastposter = '".addslashes(htmlspecialchars($bbuserinfo[username]))."',
lastthread = '" . addslashes($bbuserinfo['username']) . " $formtitle',
lastthreadid = $formreplythreadid
WHERE forumid = $formreplyforumid
");
$forum[forumid] = $formreplyforumid;
}
if ($formpm == "1") {
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '".addslashes(htmlspecialchars($formtitle))."', '".addslashes(htmlspecialchars($formsend))."', '" . addslashes(serialize($tostring)) . "', 0, " . TIMENOW . ", 1)");
$pmtextid = $DB_site->insert_id();
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid, messageread) VALUES ($pmtextid, $formpmid, 0)");
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1 WHERE userid = $formpmid");
}
if ($formemail == "1") {
vbmail($formemailaddress, $formtitle, $formsend);
}
if ($redirectoption == "1") {
$url = "showthread.php?$session[sessionurl]p=$post[postid]";
eval(print_standard_redirect('redirect_postthanks'));
exit();
}
if ($redirectoption == "2") {
$url = "showthread.php?$session[sessionurl]t=$thread[threadid]";
eval(print_standard_redirect('redirect_postthanks'));
exit();
}
if ($redirectoption == "3") {
$url = "forumdisplay.php?$session[sessionurl]f=$forum[forumid]";
eval(print_standard_redirect('redirect_postthanks'));
exit();
}
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}
eval('print_output("' . fetch_template('form') . '");');
?>
It all matches up, so what the heck am I doing wrong? I keep getting a blank page. No errors, just a blank page. The templates were added to my default style which rolls over to every other style I have. However when I got to http://www.degrassi-boards.com/form1.php it's a blank page.