TimJacobs Posted March 7, 2009 Share Posted March 7, 2009 Ok, I'm having a small problem I can't quite figure out so I figured I would ask the experts. Here is my code. and I am getting Parse error: syntax error, unexpected $end in public_html/service_repair/service_request.php on line 216 Can Y'all Help me out. Thanks in advance <?php $tomorrow = mktime(0, 0, 0, 0, 0, 0, date("m") , date("d")+1, date("Y") date("h"), date("i"), date("A"); $service_pack_legend = $params->get( 'service_pack_legend',"Choose your Service:" ); $service_pack_label = $params->get( 'service_pack_label',"Service Package:" ); $personal_info_legend = $params->get( 'personal_info_legend',"Personal Information" ); $first_name_label = $params->get( 'first_name_label',"First Name:" ); //$name_validator = $params->get( 'name_validator' ); $lastname_label = $params->get( 'lastname_label',"Last Name:" ); //$lastname_validator = $params->get( 'lastname_validator' ); $email_label = $params->get( 'email_label',"E-mail:" ); //$email_validator = $params->get( 'email_validator' ); $phone_label = $params->get( 'phone_label',"Phone:" ); //$phone_validator = $params->get( 'phone_validator' ); $service_address_legend = $params->get( 'service_address_legend',"Service Address:" ); $service_address_label = $params->get( 'service_address_label',"Address:" ); $service_address_city_label = $params->get( 'service_address_city_label',"City"); $service_address_state_label = $params->get( 'service_address_state_label',"State:"); $service_address_zip_label = $params->get( 'service_address_zip_label',"Zip Code:"); $service_date_legend = $params->get ('service_date_legend',"Service Date:"); $service_date_label = $params->get( 'month_of_service_label',"Month:" ); $service_problem_legend = $params->get( 'service_problem_legend',"Please Explain Problem:"); $service_problem_label = $params->get( 'service_problem_label', "Problem:"); $submit_button = $params->get( 'submit_button',"Submit Form" ); $reset_button = $params->get( 'reset_button',"Reset Form" ); $your_email = $params->get( 'your_email',"change@toyourmail.com" ); $SMTP_email = $params->get( 'SMTP_email',"your@smtpusername.com" ); $email_subject = $params->get( 'email_subject',"New Service Request" ); $show_accordion = $params->get( 'show_accordion',0 ); $ismooloaded = $params->get ( 'ismooloaded',0 ); $compress = $params->get ( 'compress',0 ); $sentmsg1 = $params->get ( 'sentmsg1',"Thank you for your inquiry about." ); $sentmsg2 = $params->get ( 'sentmsg2',"We will contact you back." ); if($compress == 1){ $mooext = 'php'; }else{ $mooext = 'css'; } // do not edit below this line include ("modules/mod_service_request/getmail.php"); //get the titles function getTitles($params){ $now = date('m-d-Y H:i:s'); $database =& JFactory::getDBO(); $nullDate = $database->getNullDate(); $work_section=$params->get('work_section',1); $query = 'SELECT title ,sectionid FROM #__content WHERE (state=1) and (sectionid='.$work_section.') ORDER by ordering'; $database->setQuery($query); $titles = $database->loadObjectList(); foreach ( $titles as $row ) { echo "<option value=\"$row->title\" selected=\"selected\" >".$row->title."</option>"; } } ?> <script type="text/javascript"> var formlanguage = "en-US"; // set default form language </script> <div id="service_request"> <?php if($show_accordion ==2) { ?> <?php if($show_accordion ==1) { ?> <script type="text/javascript"> window.addEvent('domready', function() { var accordion = new Accordion($$('.toggler'),$$('.element'), { opacity: 0 //onActive: function(toggler) { toggler.setStyle('color', '#000'); }, //onBackground: function(toggler) { toggler.setStyle('color', '#fff'); } }); }); </script> <!-- reservation form begin --> <form id="ReservationForm" method="post" action="<?php echo stayThere(); {?>" onsubmit="return validate();" onreset="resetForm();"> <div class="reservation"> <fieldset class="service_pack_legend"> <legend class="toggler"><?php echo $service_pack_legend ?></legend> <div class="element"> <div> <label for="service_pack" id="service_pack_label"><?php echo $service_pack_label ?></label> <select name="service_pack" id="service_pack" > <?php getTitles($params);?> </select> <div id="MojInfo"></div> </div> </div> </fieldset> </div> <div class="reservation"> <fieldset class="personal-data"> <legend class="personal_data"><?php echo $personal_info_legend ?></legend> <div> <label for="first_name" id="first_name_label"><?php echo $first_name_label ?></label> <input type="text" name="first_name" id="first_name" value="" onkeyup="hideWarning('name_validator');" /> <div id="name_validator" class="validator display-none"><!-- --></div> </div> <div> <label for="lastname" id="lastname_label"><?php echo $lastname_label ?></label> <input type="text" name="lastname" id="lastname" value="" onkeyup="hideWarning('lastname_validator');" /> <div id="lastname_validator" class="validator display-none"><!-- --></div> </div> <br class="break" /> <div> <label for="email" id="email_label"><?php echo $email_label ?></label> <input type="text" name="email" id="email" value="" onkeyup="hideWarning('email_validator');" /> <div id="email_validator" class="validator display-none"><!-- --></div> </div> <div> <label for="phone" id="phone_label"><?php echo $phone_label ?></label> <input type="text" name="phone" id="phone" value="" onkeyup="hideWarning('phone_validator');" class="text-align-right" /> <div id="phone_validator" class="validator display-none"><!-- --></div> </div> </fieldset> <fieldset> <legend id="service_address_legend"><?php echo $service_address_legend ?></legend> <div></div> <!--Service Address Input Label & Text Box--> <div> <label for="service_address_label" id="service_address_label"><?php echo $service_address_label ?></label> <input type="text" name="address" id="address" value=""/> </div> <div> <!--Service Address City Input Label & Text Box--> <label for="service_address_city_label" id="service_address_city_label"><?php echo $service_address_city_label ?></label> <input type="text" name="city" id="city" value="Houston"/> </div> <!--Service Address State Input Label & Text Box--> <div> <label for="service_address_state_label" id="service_address_state_label"><?php echo $service_address_state_label ?></label> <input type="text" name="state" id="state" value="TX" size="4"/> <!--Service Address Zip Code Input Label & Text Box--> <label for="service_address_zip_label" id="service_address_zip_label"><?php echo $service_address_zip_label ?></label> <input type="text" name="zip" id="zip" value="" size="7"/> </div> <div> <legend class="toggler"><?php echo $service_date_legend ?></legend> <label for="service_date_label" id="service_date_label"><?php echo $service_date_label ?></label> <input type="text" value="<?php echo $tomarrow ?>" readonly name="ServiceDate" /> <br /><input type="button" value="Calender" onclick="displayCalendar(document.forms[0].ServiceDate,'yyyy/mm/dd hh:ii',this,true)"></div> </fieldset> <div> <fieldset> <legend class="toggler"><?php echo $service_problem ?></legend> <div class="element"> <textarea name="service_problem" id="service_problem" cols="" style="width: 100%;" rows=""></textarea> </div> </fieldset> </div> <fieldset> <input type="submit" name="submit" id="submit_button" value="<?php echo $submit_button ?>" /> <button type="reset" id="reset_button" title=""><?php echo $reset_button ?></button> </fieldset> <div class="display-none"> <input type="hidden" id="date" /> <input type="hidden" name="Subject" value="Service Request" /> <input type="text" id="generatedantispamcode" name="generatedantispamcode"/> <input type="text" id="submittedantispamcode" name="submittedantispamcode"/> <textarea id="service_information" name="SERVICE_INFORMATION" cols="" rows=""></textarea> </div> </div> </form> <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/ Share on other sites More sharing options...
Maq Posted March 7, 2009 Share Posted March 7, 2009 Your code doesn't even have 216 lines... Are you sure that's correct? Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/#findComment-778681 Share on other sites More sharing options...
TimJacobs Posted March 7, 2009 Author Share Posted March 7, 2009 https://dusterscreations.com/modules/mod_service_repair/mod_service_request.php There is the file if you would like to see it Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/#findComment-778685 Share on other sites More sharing options...
Maq Posted March 7, 2009 Share Posted March 7, 2009 Okay now you're referencing two separate scripts... First one you mentioned: service_request.php on line 216 Error in the link: mod_service_request.php on line 216 Which one is it? Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/#findComment-778686 Share on other sites More sharing options...
TimJacobs Posted March 7, 2009 Author Share Posted March 7, 2009 It's mod_service_request.php and here is the complete code for it all I did was remove the comments up top. <?php /*---------------------------------------------------------------------- #Dusters Creations Service Request Module # ---------------------------------------------------------------------- # Copyright (C) 2009 Dusters Creations # Coded by: Tim Jacobs # License: Dusters Creations # Website: http://dusterscreations.com ------------------------------------------------------------------------*/ // defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.'); $tomorrow = mktime(0, 0, 0, 0, 0, 0, date("m") , date("d")+1, date("Y"), date("h"), date("i"), date("A"); $service_pack_legend = $params->get( 'service_pack_legend',"Choose your Service:" ); $service_pack_label = $params->get( 'service_pack_label',"Service Package:" ); $personal_info_legend = $params->get( 'personal_info_legend',"Personal Information" ); $first_name_label = $params->get( 'first_name_label',"First Name:" ); //$name_validator = $params->get( 'name_validator' ); $lastname_label = $params->get( 'lastname_label',"Last Name:" ); //$lastname_validator = $params->get( 'lastname_validator' ); $email_label = $params->get( 'email_label',"E-mail:" ); //$email_validator = $params->get( 'email_validator' ); $phone_label = $params->get( 'phone_label',"Phone:" ); //$phone_validator = $params->get( 'phone_validator' ); $service_address_legend = $params->get( 'service_address_legend',"Service Address:" ); $service_address_label = $params->get( 'service_address_label',"Address:" ); $service_address_city_label = $params->get( 'service_address_city_label',"City"); $service_address_state_label = $params->get( 'service_address_state_label',"State:"); $service_address_zip_label = $params->get( 'service_address_zip_label',"Zip Code:"); $service_date_legend = $params->get ('service_date_legend',"Service Date:"); $service_date_label = $params->get( 'month_of_service_label',"Month:" ); $service_problem_legend = $params->get( 'service_problem_legend',"Please Explain Problem:"); $service_problem_label = $params->get( 'service_problem_label', "Problem:"); $submit_button = $params->get( 'submit_button',"Submit Form" ); $reset_button = $params->get( 'reset_button',"Reset Form" ); $your_email = $params->get( 'your_email',"change@toyourmail.com" ); $SMTP_email = $params->get( 'SMTP_email',"your@smtpusername.com" ); $email_subject = $params->get( 'email_subject',"New Service Request" ); $show_accordion = $params->get( 'show_accordion',0 ); $ismooloaded = $params->get ( 'ismooloaded',0 ); $compress = $params->get ( 'compress',0 ); $sentmsg1 = $params->get ( 'sentmsg1',"Thank you for your inquiry about." ); $sentmsg2 = $params->get ( 'sentmsg2',"We will contact you back." ); if($compress == 1){ $mooext = 'php'; }else{ $mooext = 'css'; } // do not edit below this line include ("modules/mod_service_request/getmail.php"); //get the titles function getTitles($params){ $now = date('m-d-Y H:i:s'); $database =& JFactory::getDBO(); $nullDate = $database->getNullDate(); $work_section=$params->get('work_section',1); $query = 'SELECT title ,sectionid FROM #__content WHERE (state=1) and (sectionid='.$work_section.') ORDER by ordering'; $database->setQuery($query); $titles = $database->loadObjectList(); foreach ( $titles as $row ) { echo "<option value=\"$row->title\" selected=\"selected\" >".$row->title."</option>"; } } ?> <script type="text/javascript"> var formlanguage = "en-US"; // set default form language </script> <div id="service_request"> <?php if($show_accordion ==2) { ?> <?php if($show_accordion ==1) { ?> <script type="text/javascript"> window.addEvent('domready', function() { var accordion = new Accordion($$('.toggler'),$$('.element'), { opacity: 0 //onActive: function(toggler) { toggler.setStyle('color', '#000'); }, //onBackground: function(toggler) { toggler.setStyle('color', '#fff'); } }); }); </script> <!-- reservation form begin --> <form id="ReservationForm" method="post" action="<?php echo stayThere(); {?>" onsubmit="return validate();" onreset="resetForm();"> <div class="reservation"> <fieldset class="service_pack_legend"> <legend class="toggler"><?php echo $service_pack_legend ?></legend> <div class="element"> <div> <label for="service_pack" id="service_pack_label"><?php echo $service_pack_label ?></label> <select name="service_pack" id="service_pack" > <?php getTitles($params);?> </select> <div id="MojInfo"></div> </div> </div> </fieldset> </div> <div class="reservation"> <fieldset class="personal-data"> <legend class="personal_data"><?php echo $personal_info_legend ?></legend> <div> <label for="first_name" id="first_name_label"><?php echo $first_name_label ?></label> <input type="text" name="first_name" id="first_name" value="" onkeyup="hideWarning('name_validator');" /> <div id="name_validator" class="validator display-none"><!-- --></div> </div> <div> <label for="lastname" id="lastname_label"><?php echo $lastname_label ?></label> <input type="text" name="lastname" id="lastname" value="" onkeyup="hideWarning('lastname_validator');" /> <div id="lastname_validator" class="validator display-none"><!-- --></div> </div> <br class="break" /> <div> <label for="email" id="email_label"><?php echo $email_label ?></label> <input type="text" name="email" id="email" value="" onkeyup="hideWarning('email_validator');" /> <div id="email_validator" class="validator display-none"><!-- --></div> </div> <div> <label for="phone" id="phone_label"><?php echo $phone_label ?></label> <input type="text" name="phone" id="phone" value="" onkeyup="hideWarning('phone_validator');" class="text-align-right" /> <div id="phone_validator" class="validator display-none"><!-- --></div> </div> </fieldset> <fieldset> <legend id="service_address_legend"><?php echo $service_address_legend ?></legend> <div></div> <!--Service Address Input Label & Text Box--> <div> <label for="service_address_label" id="service_address_label"><?php echo $service_address_label ?></label> <input type="text" name="address" id="address" value=""/> </div> <div> <!--Service Address City Input Label & Text Box--> <label for="service_address_city_label" id="service_address_city_label"><?php echo $service_address_city_label ?></label> <input type="text" name="city" id="city" value="Houston"/> </div> <!--Service Address State Input Label & Text Box--> <div> <label for="service_address_state_label" id="service_address_state_label"><?php echo $service_address_state_label ?></label> <input type="text" name="state" id="state" value="TX" size="4"/> <!--Service Address Zip Code Input Label & Text Box--> <label for="service_address_zip_label" id="service_address_zip_label"><?php echo $service_address_zip_label ?></label> <input type="text" name="zip" id="zip" value="" size="7"/> </div> <div> <legend class="toggler"><?php echo $service_date_legend ?></legend> <label for="service_date_label" id="service_date_label"><?php echo $service_date_label ?></label> <input type="text" value="<?php echo $tomarrow ?>" readonly name="ServiceDate" /> <br /><input type="button" value="Calender" onclick="displayCalendar(document.forms[0].ServiceDate,'yyyy/mm/dd hh:ii',this,true)"></div> </fieldset> <div> <fieldset> <legend class="toggler"><?php echo $service_problem ?></legend> <div class="element"> <textarea name="service_problem" id="service_problem" cols="" style="width: 100%;" rows=""></textarea> </div> </fieldset> </div> <fieldset> <input type="submit" name="submit" id="submit_button" value="<?php echo $submit_button ?>" /> <button type="reset" id="reset_button" title=""><?php echo $reset_button ?></button> </fieldset> <div class="display-none"> <input type="hidden" id="date" /> <input type="hidden" name="Subject" value="Service Request" /> <input type="text" id="generatedantispamcode" name="generatedantispamcode"/> <input type="text" id="submittedantispamcode" name="submittedantispamcode"/> <textarea id="service_information" name="SERVICE_INFORMATION" cols="" rows=""></textarea> </div> </div> </form> <?php } ?> </div> Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/#findComment-778689 Share on other sites More sharing options...
Maq Posted March 7, 2009 Share Posted March 7, 2009 You're forgetting to close one of these at the end of your file... Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/#findComment-778693 Share on other sites More sharing options...
TimJacobs Posted March 7, 2009 Author Share Posted March 7, 2009 Thanks I fixed that and now I'm getting Fatal error: Call to a member function get() on a non-object in /home/dusters/public_html/modules/mod_service_repair/mod_service_request.php on line 18 and Idea why? Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/#findComment-778694 Share on other sites More sharing options...
Philip Posted March 7, 2009 Share Posted March 7, 2009 You're not initializing the class (where is $params coming from?) Quote Link to comment https://forums.phpfreaks.com/topic/148314-parse-error-syntax-error-unexpected-end-on-line-216/#findComment-778760 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.