Jump to content

Parse error


richie176

Recommended Posts

Hi all.Can someone pleasse tell me what is wrong with this code as I get the following error message:"Parse error: syntax error, unexpected ')' in /home/******/public_html/wp-content/themes/*******/includes/forms/confirm-resume-pack/confirm-resume-pack-process.php on line 49"

<?php/** * JobRoller Confirm Resume Pack Process * Once a pack has been confirmed, this takes the posted data and adds it to WordPress. * * * @version 1.3 * @author AppThemes * @package JobRoller * @copyright 2010 all rights reserved * */function jr_process_confirm_resume_pack_form() {		global $user_ID, $post, $posted, $wpdb, $jr_log;		$posted = unserialize(base64_decode($_POST['posted']));		// Calc costs/get packs	$cost = 0;	$resume_pack = '';	$user_pack = '';	$resume_last = null;		// Get Pack from previous step	if (isset($posted['resume_pack']) && !empty($posted['resume_pack'])) : 		if (strstr($posted['resume_pack'], 'user_')) :			$user_pack_id = (int) str_replace('user_', '', $posted['resume_pack']);			$user_pack = new jr_user_pack( $user_pack_id );			if (!$user_pack->get_valid_pack()) {				wp_die( __('Error: Invalid Pack.', 'appthemes'));			}			$resumes_last = $user_pack->resume_duration;		else :			$resume_pack = new jr_pack( $posted['resume_pack'] );			$cost += $resume_pack->pack_cost;		endif;		// Caculate expirey date from today	if (!isset($resume_last)) $resume_last = 30; // 30 day default	$date = strtotime('+'.$resume_last.' day', current_time('timestamp'));		### Create the order in the database so it can be confirmed by user/IPN before going live		if ($cost > 0) :			$jr_order = new jr_order( 0, $user_ID, $cost, $inspack, );				$jr_order->insert_order();			### Redirect to paypal payment page	(if paid listing)				$name = urlencode(__('Resume Pack', 'appthemes').__(' with Resume Pack ', 'appthemes'). $resume_pack->pack_name );				$link = $jr_order->generate_paypal_link( $name );		$jr_log->write_log('Sending user (#'.$user_ID.') to paypal after resume pack submission ('.$posted['job_title'].' - order#'.$jr_order->id.').'); 				header('Location: '.$link);		exit;		else :						} elseif (get_option('jr_new_ad_email')!=='no') jr_admin_new_resume_pack($post_id);			redirect_myjobs();				endif;}

Link to comment
Share on other sites

doesn't the error tell you everything? have you tried looking closely at line 49, or the couple lines before it?

Link to comment
Share on other sites

which one is line 49 at least? I'm guessing the issue is related to the nested nature of your if/else structure. Most developers typically just use the curly braces (as opposed to end if's and the colon's) because it makes easier to read the grouping of statements, and allows for clearer reading when there is nesting involved. I'm guessing the issue could be somewhere in here:

	else :						} elseif (get_option('jr_new_ad_email')!=='no') jr_admin_new_resume_pack($post_id);			redirect_myjobs();

seems like the ending is confused.

Link to comment
Share on other sites

I took out the extra , and now i get this errorParse error: syntax error, unexpected '}' in /home/doormans/public_html/wp-content/themes/doorman/includes/forms/confirm-resume-pack/confirm-resume-pack-process.php on line 67this line 67

} elseif (get_option('jr_new_ad_email')!=='no') jr_admin_new_resume_pack($post_id);			redirect_myjobs();

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...