Current location: Hot Scripts Forums » Programming Languages » PHP » I cannot find what i messed up. Parse error: syntax error, unexpected T_CONSTANT_ENCA


I cannot find what i messed up. Parse error: syntax error, unexpected T_CONSTANT_ENCA

Reply
  #1 (permalink)  
Old 01-31-08, 03:07 PM
bilicek.com bilicek.com is offline
New Member
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
I cannot find what i messed up. Parse error: syntax error, unexpected T_CONSTANT_ENCA

I got this:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/b3global/public_html/consumer-industry/forums/newthread.php(71) : eval()'d code on line 687

I have two seperate forms both use newthread.php . I was working in the "form" templete which both newthread.php's pull from and after i hit "save" neither newthread.php's work. So i have narrowed it down to this "form" code.

Attached are both. Anyone see any problems?

PHP Code:

$stylevar[htmldoctype]

<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle] - $formtitle</title>
</
head>
<
body>
$header
$navbar

<!-- main -->
<if 
condition="$preview">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat">
        
Preview
    
</td>
</
tr>
<
tr>
    <
td class="alt1">
$preview
</td>
</
tr>
</
table>
</if>

<
br />
<
form name="vbform" action="newthread.php" method="post"<if condition="!is_browser('webtv')"onsubmit="return vB_Editor['$editorid'].prepare_submit(0, $vboptions[postminchars])"</if>>
<
input type="hidden" value="$formnamename="do" />
<
input type="hidden" value="submit" name="action" />

<
input type="hidden" name="posthash" value="$posthash/>
<
input type="hidden" name="poststarttime" value="$poststarttime/>

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat" colspan=5">
        TheUtilityAuction.com - 
$formtitle    </td>
</tr>
<tr>
    <td class="
panelsurround" align="center" colspan="5">

    <table class="
panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
    <tr>
        <td align="
$stylevar[left]">
            <fieldset class="
fieldset" style="margin:0px">
                <table cellpadding="
0" cellspacing="$stylevar[formspacer]" border="0">
                <tr>
                    <td>
                        
$formpurpose                    </td>
                </tr>
        </table>
    </fieldset></td>
</tr>
</table></td>
</tr>

<tr>
<td class="
alt2" colspan="4">
$radioquestion7<br>
<br>
<b>Would you like to participate?</b> 
&nbsp &nbsp &nbsp
<input type="
radio" name="radioanswer7" value="$radiochoice7a" <if condition="$radiochoice7a == $radioanswer7">checked="checked"</if> /> $radiochoice7a &nbsp &nbsp
<input type="
radio" name="radioanswer7" value="$radiochoice7b" <if condition="$radiochoice7b == $radioanswer7">checked="checked"</if> /> $radiochoice7b &nbsp &nbsp
<br><i>If 
$radiochoice7a, How would you like your name to appear in the record?</i> <input type="text" size="40" value="$radioanswer7other" name="radioanswer7other" /></td>
</tr>


<tr>
<td class="
alt1" valign="middle" colspan="1">
<b>Username</b>:<br />
Your Consumer-Industry Forum Username</td>
<td class="
alt1" valign="middle" colspan="4">
<b>
$bbuserinfo[username]</b></td>
</tr>


<tr>
<td class="
alt1" valign="middle" colspan="5">
<b>
$dropdownquestion1</b>:
<span class="
alt1" valign="middle" >
<select name="
dropdownanswer1">
<option value="
$dropdownchoice1a" <if condition="$dropdownchoice1a == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1a</option>
<option value="
$dropdownchoice1b" <if condition="$dropdownchoice1b == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1b</option>
<option value="
$dropdownchoice1c" <if condition="$dropdownchoice1c == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1c</option>
<option value="
$dropdownchoice1d" <if condition="$dropdownchoice1d == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1d</option>
</select> 
<br>
<br>
<b>
$question1</b>: &nbsp &nbsp &nbsp <input type="text" size="30" value="$answer1" name="answer1" />
<br>
<br>
<b>
$question2</b>: &nbsp &nbsp &nbsp <input type="text" size="5" value="$answer2" name="answer2" />
<br>
<br>
<b>
$question3</b>: &nbsp &nbsp &nbsp <input type="text" align='right' size="30" value="$answer3" name="answer3" />
</td></span>
</tr>


<tr>
<td class="
alt2" valign="middle" colspan="1">
<b>
$question6</b>:<br/>
$explain6  <span class="alt2" valign="middle" >
<input type="
text" size="50" value="$answer6" name="answer6" /> </span>
</td>
<td class="
alt2" valign="middle">
<b>
$question5</b>:<br />
$explain5  <span class="alt2" valign="middle" colspan="1">
<input type="
text" size="30" value="$answer5" name="answer5" /> </span></td>
<td class="
alt2" valign="middle">
<b>
$question4</b>: <br />
$explain4  <span class="alt2" valign="middle" colspan="2">
<input type="
text" size="30" value="$answer4" name="answer4" /> </span></td>
</tr>



<tr>
<td class="
alt2" valign="middle" colspan="1">
<b>
$question7</b>: <span class="alt2" valign="middle" >
<input type="
text" size="30" value="$answer7" name="answer7" /> 

<td class="
alt2" colspan="4">
<b>
$radioquestion1</b> 
&nbsp &nbsp &nbsp
<input type="
radio" name="radioanswer1" value="$radiochoice1a" <if condition="$radiochoice1a == $radioanswer1">checked="checked"</if> /> $radiochoice1a &nbsp &nbsp
<input type="
radio" name="radioanswer1" value="$radiochoice1b" <if condition="$radiochoice1b == $radioanswer1">checked="checked"</if> /> $radiochoice1b &nbsp &nbsp
<input type="
radio" name="radioanswer1" value="$radiochoice1c" <if condition="$radiochoice1c == $radioanswer1">checked="checked"</if> /> $radiochoice1c 
</td>
</tr>



<tr>
<td class="
alt1" colspan="4">
<b>
$radioquestion2</b> 
&nbsp &nbsp &nbsp
<input type="
radio" name="radioanswer2" value="$radiochoice2a" <if condition="$radiochoice2a == $radioanswer2">checked="checked"</if> /> $radiochoice2a &nbsp &nbsp
<input type="
radio" name="radioanswer2" value="$radiochoice2b" <if condition="$radiochoice2b == $radioanswer2">checked="checked"</if> /> $radiochoice2b
<br>
<br>
<b>
$radioquestion3</b> 
&nbsp &nbsp &nbsp
<input type="
radio" name="radioanswer3" value="$radiochoice3a" <if condition="$radiochoice3a == $radioanswer3">checked="checked"</if> /> $radiochoice3a &nbsp &nbsp
<input type="
radio" name="radioanswer3" value="$radiochoice3b" <if condition="$radiochoice3b == $radioanswer3">checked="checked"</if> /> $radiochoice3b
<br>
<br>
<b>
$radioquestion4</b> 
&nbsp &nbsp &nbsp
<input type="
radio" name="radioanswer4" value="$radiochoice4a" <if condition="$radiochoice4a == $radioanswer4">checked="checked"</if> /> $radiochoice4a &nbsp &nbsp
<input type="
radio" name="radioanswer4" value="$radiochoice4b" <if condition="$radiochoice4b == $radioanswer4">checked="checked"</if> /> $radiochoice4b
</td>
</tr>



<tr>
<td class="
alt2" valign="middle" colspan="5">
<b>
$dropdownquestion2</b>:
<span class="
alt2" valign="middle" >
<select name="
dropdownanswer2">
<option value="
$dropdownchoice2am" <if condition="$dropdownchoice2am == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2am</option>

<option value="
$dropdownchoice2a" <if condition="$dropdownchoice2a == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2a</option>

<option value="
$dropdownchoice2ae" <if condition="$dropdownchoice2ae == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ae</option>

<option value="
$dropdownchoice2j" <if condition="$dropdownchoice2j == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2j</option>

<option value="
$dropdownchoice2ai" <if condition="$dropdownchoice2ai == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ai</option>

<option value="
$dropdownchoice2ag" <if condition="$dropdownchoice2ag == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ag</option>

<option value="
$dropdownchoice2ak" <if condition="$dropdownchoice2ak == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ak</option>

<option value="
$dropdownchoice2x" <if condition="$dropdownchoice2x == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2x</option>

<option value="
$dropdownchoice2z" <if condition="$dropdownchoice2z == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2z</option>

<option value="
$dropdownchoice2k" <if condition="$dropdownchoice2k == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2k</option>

<option value="
$dropdownchoice2g" <if condition="$dropdownchoice2g == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2g</option>

<option value="
$dropdownchoice2f" <if condition="$dropdownchoice2f == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2f</option>

<option value="
$dropdownchoice2i" <if condition="$dropdownchoice2i == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2i</option>

<option value="
$dropdownchoice2p" <if condition="$dropdownchoice2p == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2p</option>

<option value="
$dropdownchoice2ac" <if condition="$dropdownchoice2ac == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ac</option>

<option value="
$dropdownchoice2y" <if condition="$dropdownchoice2y == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2y</option>

<option value="
$dropdownchoice2l" <if condition="$dropdownchoice2l == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2l</option>

<option value="
$dropdownchoice2q" <if condition="$dropdownchoice2q == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2q</option>

<option value="
$dropdownchoice2w" <if condition="$dropdownchoice2w == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2w</option>

<option value="
$dropdownchoice2e" <if condition="$dropdownchoice2e == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2e</option>

<option value="
$dropdownchoice2aj" <if condition="$dropdownchoice2aj == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2aj</option>

<option value="
$dropdownchoice2o" <if condition="$dropdownchoice2o == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2o</option>

<option value="
$dropdownchoice2b" <if condition="$dropdownchoice2b == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2b</option>

<option value="
$dropdownchoice2d" <if condition="$dropdownchoice2d == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2d</option>

<option value="
$dropdownchoice2aa" <if condition="$dropdownchoice2aa == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2aa</option>

<option value="
$dropdownchoice2u" <if condition="$dropdownchoice2u == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2u</option>

<option value="
$dropdownchoice2ab" <if condition="$dropdownchoice2ab == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ab</option>

<option value="
$dropdownchoice2r" <if condition="$dropdownchoice2r == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2r</option>

<option value="
$dropdownchoice2c" <if condition="$dropdownchoice2c == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2c</option>

<option value="
$dropdownchoice2s" <if condition="$dropdownchoice2s == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2s/option>

<option value="
$dropdownchoice2n" <if condition="$dropdownchoice2n == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2n</option>

<option value="
$dropdownchoice2h" <if condition="$dropdownchoice2h == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2h</option>

<option value="
$dropdownchoice2t" <if condition="$dropdownchoice2t == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2t</option>

<option value="
$dropdownchoice2af" <if condition="$dropdownchoice2af == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2af</option>

<option value="
$dropdownchoice2v" <if condition="$dropdownchoice2v == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2v</option>

<option value="
$dropdownchoice2ah" <if condition="$dropdownchoice2ah == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ah</option>

<option value="
$dropdownchoice2ad" <if condition="$dropdownchoice2ad == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2ad</option>

<option value="
$dropdownchoice2m" <if condition="$dropdownchoice2m == $dropdownanswer2">selected="selected"</if>>$dropdownchoice2m</option>

<option value="
$dropdownchoice2al" <if condition="$dropdownchoice2al == $dropdownanswer2
">selected="selected"</if>>$dropdownchoice2al</option>
</select> 


<tr>
<td class="
alt2" colspan="2">
<b>
$radioquestion6</b> 
&nbsp &nbsp &nbsp
<input type="
radio" name="radioanswer6" value="$radiochoice6a" <if condition="$radiochoice6a == $radioanswer6">checked="checked"</if> /> $radiochoice6a &nbsp &nbsp
<input type="
radio" name="radioanswer6" value="$radiochoice6b" <if condition="$radiochoice6b == $radioanswer6">checked="checked"</if> /> $radiochoice6b
<input type="
radio" name="radioanswer6" value="$radiochoice6c" <if condition="$radiochoice6c == $radioanswer6">checked="checked"</if> /> $radiochoice6c
</td>
<td class="
alt2" colspan="3"> <b>$question17</b>: <br>$0.<input type="text" size="6" value="$answer17" name="answer17" />per kWh 
</td> 
</tr>


<tr>
<td class="
alt2" colspan="2">
<b>
$radioquestion8</b> 
&nbsp &nbsp &nbsp
<input type="
radio" name="radioanswer8" value="$radiochoice8a" <if condition="$radiochoice8a == $radioanswer8">checked="checked"</if> /> $radiochoice8a &nbsp &nbsp
<input type="
radio" name="radioanswer8" value="$radiochoice8b" <if condition="$radiochoice8b == $radioanswer8">checked="checked"</if> /> $radiochoice8b
<br>If 
$radiochoice8a, When does it expire MM/YYYY format <input type="text" size="40" value="$radioanswer8other" name="radioanswer8other" /></td>
</tr>


<tr>
<td class="
alt2" colspan="5"> <b>$question18</b>: <input type="text" size="60" value="$answer18" name="answer18" />
<br> 
$explain18
</td>
</tr>

<tr>
<td class="
alt1" valign="middle">
<b>
$longquestion1</b><br />
$longexplain1</td>
<td class="
alt1" valign="middle" colspan="2">
<textarea rows="
20" cols="70" name="longanswer1">$longanswer1</textarea></td>
</tr>

<if condition="
$attachmentoption">
<tr>
<td class="
alt1" colspan="3" align="center">
<div style="
width:$stylevar[formwidth]" align="$stylevar[left]">$attachmentoption</div></td>
</tr>
</if>
<tr>
<td valign="
top" colspan="3">
<p align="
center">
<input type="
submit" value="Submit" name="submit" style="font-familyVerdanafont-size10pt" class="button" />
<input type="
submit" value="Preview" name="submit" style="font-familyVerdanafont-size10pt" class="button" />
<input type="
reset" value="Reset" name="reset" style="font-familyVerdanafont-size10pt" class="button" />
</p></td></tr>
</table>

</form>

$footer
</body>
</html> 
and the newthread.php code just incase. (almost positive wasn't working in, or made any changes to this)


PHP Code:

// To add more then one form, copy this whole text, and creat a new plug-in with the hook location 'newthread_start'. 

// After, change the form name. You can't have 2 forms with the same name. 

// Name of this form 
$formname "tre_form"

if (
$_REQUEST['do'] == $formname


// ####################################################################### 
// ######################## CUSTOMIZE VARIABLES ########################## 
// ####################################################################### 

//////////////////////////////////////////////////////////////////////////////////////////////////// 
////// BEGIN CUSTOMIZATION BELOW//////////////////////////////////////////////////////////////////// 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//VARIABLES 
//Study how variables are add here to add or remove any. If you add a variable to your form, you must add it to part one and part two. 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

// Part 1 
$vbulletin->input->clean_array_gpc('p', array( 
'radioanswer7' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'answer1' => TYPE_STR
'answer2' => TYPE_STR
'answer3' => TYPE_STR
'answer4' => TYPE_STR
'answer5' => TYPE_STR
'answer6' => TYPE_STR
'answer7' => TYPE_STR
'radioanswer1' => TYPE_STR
'radioanswer2' => TYPE_STR
'radioanswer3' => TYPE_STR
'radioanswer4' => TYPE_STR
'answer8' => TYPE_STR
'answer9' => TYPE_STR
'answer10' => TYPE_STR
'answer11' => TYPE_STR,
'radioanswer5' => TYPE_STR,
'answer12' => TYPE_STR
'answer13' => TYPE_STR
'answer14' => TYPE_STR
'answer15' => TYPE_STR
'answer16' => TYPE_STR,
'dropdownanswer2' => TYPE_STR,
'radioanswer6' => TYPE_STR,
'answer17' => TYPE_STR
'answer18' => TYPE_STR,
'longanswer1' => TYPE_STR 
'radioanswer8' => TYPE_STR,
)); 

// Part 2 
$radioanswer7 $vbulletin->GPC['radioanswer7'];
$dropdownanswer1 $vbulletin->GPC['dropdownanswer1'];
$answer1 $vbulletin->GPC['answer1']; 
$answer2 $vbulletin->GPC['answer2']; 
$answer3 $vbulletin->GPC['answer3'];
$answer4 $vbulletin->GPC['answer4']; 
$answer5 $vbulletin->GPC['answer5']; 
$answer6 $vbulletin->GPC['answer6']; 
$answer7 $vbulletin->GPC['answer7']; 
$radioanswer1 $vbulletin->GPC['radioanswer1']; 
$radioanswer2 $vbulletin->GPC['radioanswer2'];
$radioanswer3 $vbulletin->GPC['radioanswer3'];
$radioanswer4 $vbulletin->GPC['radioanswer4'];
$answer8 $vbulletin->GPC['answer8']; 
$answer9 $vbulletin->GPC['answer9']; 
$answer10 $vbulletin->GPC['answer10']; 
$answer11 $vbulletin->GPC['answer11']; 
$radioanswer5 $vbulletin->GPC['radioanswer5'];
$answer12 $vbulletin->GPC['answer12'];
$answer13 $vbulletin->GPC['answer13']; 
$answer14 $vbulletin->GPC['answer14']; 
$answer15 $vbulletin->GPC['answer15']; 
$answer16 $vbulletin->GPC['answer16']; 
$dropdownanswer2 $vbulletin->GPC['dropdownanswer2'];
$radioanswer6 $vbulletin->GPC['radioanswer6'];
$answer17 $vbulletin->GPC['answer17']; 
$answer18 $vbulletin->GPC['answer18']; 
$radioanswer8 $vbulletin->GPC['radioanswer8'];
$longanswer1 $vbulletin->GPC['longanswer1'];

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//USERGROUPS ALLOWED 
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array. 
//To enable this feature, remove the '//' before the 'if'. 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

// if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7))) print_no_permission(); 

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//NAME OF TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS AND WANT TO USE A DIFFERENT LOOKING TEMPLATE 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

// Name of the main template 
$maintemplate "form"
// Name of the answer template 
$answertemplate "formanswers"

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//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 "1"

//FORUM TO POST NEW THREAD IN 
//You CAN make this number a variable. You can have a drop down menu or in the link like do=form&f=1. Make sure you add it the variables list. 
$formforumid "119"

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no 
$formpoll "0"
$polloption[1] = "Yes"
$polloption[2] = "No"
$polloption[3] = "Maybe"

//Make poll public - 1 = yes, 0 = no 
$pollpublic "0"

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no 
$formreply "0"

//EXISTING THREAD ID FOR FORM TO REPLY IN 
$formreplythreadid "12345"

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//ENABLE FORM TO BE PMED (guests CANNOT use this option) - 1 = yes, 0 = no 
$formpm "0"

//USERNAME TO PM TO (separate multiple usernames with a ';') 
$formpmname "TheUtilityAuction.com"

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no 
$formemail "1"

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';') 
$formemailaddress "formsubmit@theutilityauction.com"

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//ENABLE ATTACHMENTS - 1 = yes, 0 = no 
//attachments can only be used if the form is going to make a new thread or post 
$allow_attachments "1"

//////////////////////////////////////////////////////////////////////////////////////////////////// 



//////////////////////////////////////////////////////////////////////////////////////////////////// 
//REDIRECT OPTIONS: 
// 0 - thank you message (thread, reply, pm, or email) 
// 1 - redirect to post (thread or reply) 
// 2 - redirect to thread (thread only) 
// 3 - redirect to forum (thread only) 
// 4 - redirect to editpost (thread or reply) 
// 
// Feel free to change the thank you message if you choose option 0 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

$redirectoption "0"

$errormessage "Thank you for submitting this form! Someone will contact you within 1 business hour at the email address you provided to follow up."//This is the thank you message 

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no 
//If you added or deleted variables, you must edit what it checked for. Search for "$answerall ==" and edit 2 lines under it. 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

$answerall "0"

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//TITLE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole title) 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

$formtitle "Residential Auction Application"

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error) 
//You may use variables from the form for this. 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

$posttitle "Residential Auction Application"

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text) 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

$formpurpose "Please Fill in all the information completely to place an auction request. Someone will contact you within 1 business hour after submitting the request to confirm your information and answer any questions you might have."

//////////////////////////////////////////////////////////////////////////////////////////////////// 

//////////////////////////////////////////////////////////////////////////////////////////////////// 
//residential Form:  
//////////////////////////////////////////////////////////////////////////////////////////////////// 

$radioquestion7 "<b>Would you like have your name listed on a Guiness World Record while doing a great thing to help the environment?</b><br><br> TheUtilityAuction.com is going for the world record of <i>Largest Organized Energy Conservation Effort</i>. Our goal is to help each person who participates replace 20% of their residences regular light bulbs with ENERGY STAR qualified compact fluorescent replacements which use 75% less energy. <br>To participate you must complete an auction and procure an energy contract using TheUtilityAuction.com. At the end of the record campaign each residence that participated will recieve 4(four) ENERGY STAR quailifed compact fluorescent replacement bulbs absolutely free. Plus your your name will be included in the record submission."
$radiochoice7a "Yes"
$radiochoice7b "No"

$dropdownquestion1 "*Title"
$dropdownchoice1a "Mr."
$dropdownchoice1b "Mrs."
$dropdownchoice1c "Miss."
$dropdownchoice1d "Ms."

 
$question1 "*First Name"

 
$question2 "Middle Initial"

 
$question3 "*Last Name"


$question4 "*Date of Birth"
$explain4 "Please enter in MM/DD/YYYY Format.";


$question5 "*Social Security"
$explain5 "This is used for credit check.";

 
$question6 "*Email Address"
$explain6 "We will use this address for all correspondences.";

 
$question7 "*Contact Phone Number"


$radioquestion1 "This Phone number is:"
$radiochoice1a "Home"
$radiochoice1b "Work"
$radiochoice1c "Cell"


$radioquestion2 "*Please confirm this request is for a RESIDENCE:"
$radiochoice2a "Yes"
$radiochoice2b "No"


$radioquestion3 "*Type of Residence:"
$radiochoice3a "Home"
$radiochoice3b "Appartment"


$radioquestion4 "*Service Type:"
$radiochoice4a "Move-In / New Address"
$radiochoice4b "Provider Change / Same Address"
 

$question8 "*Physical Service Address"


$question9 "*Physical Service City"


$question10 "*Physical Service State:"


$question11 "*Physical Service Zip Code"


$radioquestion5 "*Billing Address Same as Physical Service Address:"
$radiochoice5a "Yes"
$radiochoice5b "No"

 
$question12 "*Billing Contact Person Name"
$explain12 "You only need to fill in billing address if it is different than the physical service address.";


$question13 "Billing Address";
$explain13 "You only need to fill in billing address if it is different than the physical service address.";

 
$question14 "*Billing City"
$explain14 "You only need to fill in billing address if it is different than the physical service address.";


$question15 "*Billing State"
$explain15 "You only need to fill in billing address if it is different than the physical service address.";

 
$question16 "*Billing Zip Code"
$explain16 "You only need to fill in billing address if it is different than the physical service address.";


$dropdownquestion2 "*Current Energy Provider (Company Name on your current bills)"
$dropdownchoice2a "No Current Provider / New Address"
$dropdownchoice2b "Liberty Power"
$dropdownchoice2c "StarTex Power"
$dropdownchoice2d "MXenergy"
$dropdownchoice2e "Hudson Energy"
$dropdownchoice2f "Commerce Energy"
$dropdownchoice2g "Cirro Energy"
$dropdownchoice2h "Suez Energy Resources"
$dropdownchoice2i "Constellation NewEnergy"
$dropdownchoice2j "Affordable Power Plan"
$dropdownchoice2k "Champion Energy Services"
$dropdownchoice2l "First Choice Power"
$dropdownchoice2m "Xcel Energy"
$dropdownchoice2n "Stream Energy"
$dropdownchoice2o "Just Energy"
$dropdownchoice2p "Direct Energy"
$dropdownchoice2q "Gexa Energy"
$dropdownchoice2r "Spark Energy"
$dropdownchoice2s "Strategic Energy"
$dropdownchoice2t "Tara Energy"
$dropdownchoice2u "Reliant Energy"
$dropdownchoice2v "TXU Energy"
$dropdownchoice2w "Green Mountain Energy"
$dropdownchoice2x "Ameripower"
$dropdownchoice2y "Entergy"
$dropdownchoice2z "Calpine"
$dropdownchoice2aa "Occidental Power Services"
$dropdownchoice2ab "Sempra Energy"
$dropdownchoice2ac "Dynegy"
$dropdownchoice2ad "WTU Retail Energy (CPL Retail Energy)"
$dropdownchoice2ae "AEP Retail Energy"
$dropdownchoice2af "Tenaska Power Services"
$dropdownchoice2ag "APS Energy"
$dropdownchoice2ah "TriEagle Energy"
$dropdownchoice2ai "Alliance Power Company"
$dropdownchoice2aj "Ignite Energy"
$dropdownchoice2ak "Ambit Energy"
$dropdownchoice2al "Other"
$dropdownchoice2am "----Select From List----";


$radioquestion6 "Type of Contact:"
$radiochoice6a "Fixed"
$radiochoice6b "Variable"
$radiochoice6c "Other";

$question17 "Current rate per kWh"
$explain17 "Current price you pay for electricity per kilowatt hour. In $0.124 format.";

 
$question18 "*ESI ID #"
$explain18 "This is number can be found on your current bill statement and is your electricity meters identification number.";

$radioquestion8 "Are you still under a contract?"
$radiochoice8a "yes"
$radiochoice8b "no"


$longquestion1 "Space for special notes or requests.";





//////////////////////////////////////////////////////////////////////////////////////////////// 
////// END OF CUSTOMIZATION //////////////////////////////////////////////////////////////////// 
/////  DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! //////////////////////////////// 
//////////////////////////////////////////////////////////////////////////////////////////////////// 
//////////////////////////////////////////////////////////////////////////////////////////////////// 

// ####################################################################### 
// ######################## START MAIN SCRIPT ############################ 
// ####################################################################### 
if ($_REQUEST['action'] == ''

  
$_REQUEST['action'] = "form"



$bbuserinfo $vbulletin->userinfo

// start navbar 
$navbits = array(); 
$navbits['newthread.php?' $vbulletin->session->vars['sessionurl'] . "do=$formname"] = $formtitle

$navbits construct_navbits($navbits); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 

if (
$_REQUEST['action'] == "submit"


    if (
$answerall == "1"
    { 
        if (
$normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR ($checkboxchoice1_1 AND $checkboxchoice1_2 AND $checkboxchoice1_3) OR $longanswer1 == ''
        { 
            
$errormessage "$bbuserinfo[username], you need to answer every question!"
            eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");'); 
            exit(); 
        } 
    } 

    
$vbulletin->input->clean_array_gpc('p', array( 
        
'wysiwyg'            => TYPE_BOOL
        
'message'            => TYPE_STR 
        
)); 

    if (
$vbulletin->GPC['wysiwyg']) 
    { 
        require_once(
DIR '/includes/functions_wysiwyg.php'); 
        
$vbtextanswer convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $foruminfo['allowhtml']); 
    } 
    else 
    { 
        
$vbtextanswer =& $vbulletin->GPC['message']; 
    } 

    eval(
'$formsend = "' fetch_template("$answertemplate") . '";'); 

    
$posthash $vbulletin->input->clean_gpc('p''posthash'TYPE_NOHTML); 
    
$poststarttime $vbulletin->input->clean_gpc('p''poststarttime'TYPE_UINT); 

    if (
$_POST['submit'] == 'Submit'
    { 
        if (
$formforum == "1"
        { 
            
$foruminfo verify_id('forum'$formforumid01); 
            
$forumperms fetch_permissions($foruminfo[forumid]); 
            
$newpost['username'] =& $vbulletin->userinfo['username']; 
            
$newpost['message'] =& $formsend
            
$newpost['title'] =& $posttitle
            
$newpost['parseurl'] = '1'
            
$newpost['poststarttime'] = $poststarttime
            
$newpost['posthash'] = $posthash

            if (
$vbulletin->userinfo['autosubscribe'] != -1
            { 
                
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe']; 
            } 
            else 
            { 
                
$newpost['emailupdate'] = 9999
            } 

            if (
$vbulletin->userinfo['signature'] != ''
            { 
                
$newpost['signature'] = '1'
            } 
            else 
            { 
                
$newpost['signature'] = '0'
            } 

            
build_new_post('thread'$foruminfo, array(), array(), $newpost$errors); 

            if (
$formpoll == "1"
            { 
                
$threadinfo verify_id('thread'$newpost[threadid], 01); 
                
$polloptions count($polloption); 
                
$question $posttitle
                
$vbulletin->GPC['options'] = $polloption

                
$counter 0
                
$optioncount 0
                
$badoption ''
                while (
$counter++ < $polloptions
                { 
// 0..Pollnum-1 we want, as arrays start with 0 
                    
if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength']) 
                    { 
                        
$badoption .= iif($badoption', ') . $counter
                    } 
                    if (!empty(
$vbulletin->GPC['options']["$counter"])) 
                    { 
                        
$optioncount++; 
                    } 
                } 

                
// Add the poll 
                
$poll =& datamanager_init('Poll'$vbulletinERRTYPE_STANDARD); 

                
$counter 0
                while (
$counter++ < $polloptions
                { 
                    if (
$vbulletin->GPC['options']["$counter"] != ''
                    { 
                        
$poll->set_option($vbulletin->GPC['options']["$counter"]); 
                    } 
                } 

                
$poll->set('question',    $question); 
                
$poll->set('dateline',    TIMENOW); 
                
$poll->set('active',    '1'); 
                
$poll->set('public',    $pollpublic); 

                
$pollid $poll->save(); 
                
//end create new poll 

                // update thread 
                
$threadman =& datamanager_init('Thread'$vbulletinERRTYPE_STANDARD'threadpost'); 
                
$threadman->set_existing($threadinfo); 
                
$threadman->set('pollid'$pollid); 
                
$threadman->save(); 
            } 
        } 

        if (
$formreply == "1"
        { 
            
$threadinfo verify_id('thread'$formreplythreadid01); 
            
$forumperms fetch_permissions($threadinfo[forumid]); 
            
$newpost['username'] =& $vbulletin->userinfo['username']; 
            
$newpost['message'] =& $formsend
            
$newpost['title'] =& $posttitle
            
$newpost['parseurl'] = "1"
            
$newpost['poststarttime'] = $poststarttime
            
$newpost['posthash'] = $posthash
         
            if (
$vbulletin->userinfo['autosubscribe'] != -1
            { 
                
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe']; 
            } 
            else 
            { 
                
$newpost['emailupdate'] = 9999
            } 

            if (
$vbulletin->userinfo['signature'] != ''
            { 
                
$newpost['signature'] = '1'
            } 
            else 
            { 
                
$newpost['signature'] = '0'
            } 

            
build_new_post('reply'$foruminfo$threadinfo$postinfo$newpost$errors); 
        } 

        if (
$formpm == "1"
        { 
            
$vbulletin->GPC['message'] =& $formsend
            
$vbulletin->GPC['title'] =& $posttitle
            
$vbulletin->GPC['recipients'] =& $formpmname

            
$pm['message'] =& $vbulletin->GPC['message']; 
            
$pm['title'] =& $vbulletin->GPC['title']; 
            
$pm['recipients'] =& $vbulletin->GPC['recipients']; 

            
// create the DM to do error checking and insert the new PM 
            
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY); 

            
$pmdm->set('fromuserid'$vbulletin->userinfo['userid']); 
            
$pmdm->set('fromusername'$vbulletin->userinfo['username']); 
            
$pmdm->setr('title'$pm['title']); 
            
$pmdm->setr('message'$pm['message']); 
            
$pmdm->set_recipients($pm['recipients'], $permissions); 
            
$pmdm->set('dateline'TIMENOW); 

            
// everything's good! 
            
$pmdm->save(); 
        } 

        if (
$formemail == "1"
        { 
            require_once(
DIR '/includes/class_bbcode_alt.php'); 
            
$plaintext_parser =& new vB_BbCodeParser_PlainText($vbulletinfetch_tag_list()); 
            
$plaintext_parser->set_parsing_language($touserinfo['languageid']); 
            
$formsend $plaintext_parser->parse($formsend); 

            
$emails explode(';'$formemailaddress); 
            foreach (
$emails AS $email
            { 
                
vbmail($email$posttitle$formsend); 
            } 
        } 

        if (
$redirectoption == "1"
        { 
            
$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]"
            eval(
print_standard_redirect('redirect_postthanks')); 
            exit(); 
        } 
        if (
$redirectoption == "2"
        { 
            
$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]"
            eval(
print_standard_redirect('redirect_postthanks')); 
            exit(); 
        } 
        if (
$redirectoption == "3"
        { 
            
$vbulletin->url 'forumdisplay.php?' $vbulletin->session->vars['sessionurl'] . "f=$foruminfo[forumid]"
            eval(
print_standard_redirect('redirect_postthanks')); 
            exit(); 
        } 
        if (
$redirectoption == "4"
        { 
            
$vbulletin->url 'editpost.php?do=editpost&' $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]"
            eval(
print_standard_redirect('redirect_postthanks')); 
            exit(); 
        } 
        eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");'); 
        exit(); 
    } 
    else 
    { 
          require_once(
'./includes/class_bbcode.php'); 
        
$parser =& new vB_BbCodeParser($vbulletinfetch_tag_list()); 
        
$preview $parser->do_parse($formsend); 

        
$_REQUEST['action'] = 'form'
    } 


if (
$_REQUEST['action'] == 'form'

    if ((
$formforum OR $formreply) AND $allow_attachments
    { 
        if (
$formforum AND $formreply
        { 
            
$forumid $formforumid
        } 
        else if (
$formreply
        { 
            
$threadid $formreplythreadid
            
$threadinfo verify_id('thread'$threadid01); 
            
$forumid $threadinfo[forumid]; 
        } 
        else 
        { 
            
$forumid $formforumid
        } 

        
$forumperms fetch_permissions($forumid); 

        
// get attachment options 
        
require_once(DIR '/includes/functions_file.php'); 
        
$inimaxattach fetch_max_upload_size(); 

        
$maxattachsize vb_number_format($inimaxattach1true); 
        
$attachcount 0
        
$attach_editor = array(); 
        
$attachment_js ''

        if (
$forumperms $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions'])) 
        { 
            if (!
$posthash OR !$poststarttime
            { 
                
$poststarttime TIMENOW
                
$posthash md5($poststarttime $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']); 
            } 
            else 
            { 
                if (empty(
$postattach)) 
                { 
                    
$currentattaches $db->query_read(
                        SELECT dateline, filename, filesize, attachmentid 
                        FROM " 
TABLE_PREFIX "attachment 
                        WHERE posthash = '" 
$db->escape_string($posthash) . "' 
                            AND userid = " 
$vbulletin->userinfo['userid'
                    ); 

                    while (
$attach $db->fetch_array($currentattaches)) 
                    { 
                        
$postattach["$attach[attachmentid]"] = $attach
                    } 
                } 

                if (!empty(
$postattach)) 
                { 
                    foreach(
$postattach AS $attachmentid => $attach
                    { 
                        
$attach['extension'] = strtolower(file_extension($attach['filename'])); 
                        
$attach['filename'] = htmlspecialchars_uni($attach['filename']); 
                        
$attach['filesize'] = vb_number_format($attach['filesize'], 1true); 
                            
$attach['imgpath'] = "$stylevar[imgdir_attach]/$attach[extension].gif"
                        
$show['attachmentlist'] = true
                        eval(
'$attachments .= "' fetch_template('newpost_attachmentbit') . '";'); 

                        
$attachment_js .= construct_attachment_add_js($attachmentid$attach['filename'], $attach['filesize'], $attach['extension']); 

                        
$attach_editor["$attachmentid"] = $attach['filename']; 
                    } 
                } 
            } 
}
            if (
$threadid
            { 
                
$attachurl "t=$threadid"
            } 
            else 
            { 
                
$attachurl "f=$forumid";             
            } 
            
$newpost_attachmentbit prepare_newpost_attachmentbit(); 
            eval(
'$attachmentoption = "' fetch_template('newpost_attachment') . '";'); 

            if (
$threadid
            { 
                
$attach_editor['hash'] = $threadid
                
$attach_editor['url'] = "newattachment.php?$session[sessionurl]t=$threadid&amp;poststarttime=$poststarttime&amp;posthash=$posthash"
            } 
            else 
            { 
                
$attach_editor['hash'] = $forumid
                
$attach_editor['url'] = "newattachment.php?$session[sessionurl]f=$forumid&amp;poststarttime=$poststarttime&amp;posthash=$posthash";         
            } 
        } 
        else 
        { 
            
$attachmentoption ''
        } 
    } 
    else 
    { 
        
$attachmentoption ''
    } 

    
// set message box width to usercp size 
    
$stylevar['messagewidth'] = $stylevar['messagewidth_usercp']; 
    
$editorid construct_edit_toolbar($vbtextanswer); 

    eval(
'print_output("' fetch_template("$maintemplate") . '");'); 


Thank you in advance for your time!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-31-08, 04:01 PM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
For starters this line is missing a ".
HTML Code:
 <td class="tcat" colspan=5">
You also have a problem here:
PHP Code:

'longanswer1' => TYPE_STR
'radioanswer8' => TYPE_STR
It should be:
PHP Code:

'longanswer1' => TYPE_STR,
'radioanswer8' => TYPE_STR 
And I think you have an extra curly bracket.
Maybe at the end?
__________________
Jerry Broughton
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-31-08, 04:08 PM
bilicek.com bilicek.com is offline
New Member
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you

Sir, You seriously saved the day.

I am an entry programmer, we'll actually an entreprenuer who is "shoestinging" a project to get some proof it works. Once i can prove it works, i can get money for a real programmer.

Sir, Thanks again. You do not know how much you saved the day.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 01-31-08, 05:54 PM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
Your welcome.
__________________
Jerry Broughton
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
weird parse error. cant find a solution fridyrls PHP 1 11-03-05 12:26 PM


All times are GMT -5. The time now is 02:05 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.