Hello guys
I was wondering if someone could help with these errors:
first error:
Parse error: syntax error, unexpected $end in /home/acid2k1/public_html/blog/wp-content/themes/AskIt/epanel/core_functions.php on line 403
here is half the file:
<p class="<?php echo ("postinfo-".$option) ?>"><input type="checkbox" class="usual-checkbox" name="<?php echo $value['id']; ?>[]" id="<?php echo ($value['id']."-".$option); ?>" value="<?php echo ($option); ?>" <?php echo $checked; ?> />
</p>
<?php } ?>
<br class="clearfix"/>
<?php } ?>
</div> <!-- end box-content div -->
</div> <!-- end epanel-box div -->
<?php } elseif (($value['type'] == "checkbox") || ($value['type'] == "checkbox2")) { ?>
<div class="epanel-box <?php if ($value['type'] == "checkbox") {echo('epanel-box-small-1');} else {echo('epanel-box-small-2');} ?>">
<div class="box-title"><h3><?php echo $value['name']; ?></h3>
<img src="<?php bloginfo('template_directory') ?>/epanel/images/help-image.png" alt="description" class="box-description" />
<div class="box-descr">
<p><?php echo $value['desc']; ?></p>
</div> <!-- end box-desc-content div -->
</div> <!-- end div box-title -->
<div class="box-content">
<?php $checked = '';
if((get_option($value['id'])) <> '') {
if((get_option($value['id'])) == 'on') { $checked = 'checked="checked"'; }
else { $checked = ''; }
}
elseif ($value['std'] == 'on') { $checked = 'checked="checked"'; }
?>
<input type="checkbox" class="checkbox" name="<?php echo($value['id']);?>" id="<?php echo($value['id']);?>" <?php echo($checked); ?> />
</div> <!-- end box-content div -->
</div> <!-- end epanel-box-small div -->
<?php } elseif ($value['type'] == "support") { ?>
<div class="inner-content">
<?php include(TEMPLATEPATH . "/includes/functions/".$value['name'].".php"); ?>
</div>
<?php } elseif (($value['type'] == "contenttab-wrapstart") || ($value['type'] == "subcontent-start")) { ?>
<div id="<?php echo $value['name']; ?>" class="<?php if ($value['type'] == "contenttab-wrapstart") {echo('content-div');} else {echo('tab-content');} ?>">
<?php } elseif (($value['type'] == "contenttab-wrapend") || ($value['type'] == "subcontent-end")) { ?>
</div> <!-- end <?php echo $value['name']; ?> div -->
<?php } elseif ($value['type'] == "subnavtab-start") { ?>
<ul class="idTabs">
<?php } elseif ($value['type'] == "subnavtab-end") { ?>
</ul>
<?php } elseif ($value['type'] == "subnav-tab") { ?>
<li><a href="#<?php echo $value['name']; ?>"><span class="pngfix"><?php echo $value['desc']; ?></span></a></li>
<?php } elseif ($value['type'] == "clearfix") { ?>
<div class="clearfix"></div>
<?php } ?>
<?php } //end foreach ($options as $value) ?>
</div> <!-- end epanel-content div -->
</div> <!-- end epanel-content-wrap div -->
</div> <!-- end epanel div -->
</div> <!-- end epanel-wrapper div -->
<div id="epanel-bottom">
<input name="save" type="submit" value="Save changes" id="epanel-save" />
<input type="hidden" name="action" value="save_epanel" />
<img src="<?php bloginfo('template_directory') ?>/epanel/images/defaults.png" class="defaults-button" alt="no" />
</div><!-- end epanel-bottom div -->
</form>
<div style="clear: both;"></div>
<div style="position: relative;">
<div class="defaults-hover">
This will return all of the settings throughout the options page to their default values. <strong>Are you sure you want to do this?</strong>
<div class="clearfix"></div>
<form method="post">
<input name="reset" type="submit" value="Reset" id="epanel-reset" />
<input type="hidden" name="action" value="reset" />
</form>
<img src="<?php bloginfo('template_directory') ?>/epanel/images/no.gif" class="no" alt="no" />
</div>
</div>
</div> <!-- end panel-wrap div -->
</div> <!-- end wrapper div -->
<div id="epanel-ajax-saving">
<img src="<?php bloginfo('template_directory') ?>/epanel/images/saver.gif" alt="loading" id="loading" />
<span>Saving...</span>
</div>
<?php
}
/* --------------------------------------------- */
global $options, $value, $shortname;
if ( $options != null ){
foreach ($options as $value) {
if (isset($value['id'])) {
if ( get_option( $value['id'] ) === FALSE) {
if (array_key_exists('std', $value)) {
update_option( $value['id'], $value['std'] );
$$value['id'] = $value['std'];
}
} else {
$$value['id'] = get_option( $value['id'] ); }
}
}
add_action('wp_ajax_save_epanel', 'my_action_callback');
function my_action_callback() {
check_ajax_referer("epanel_nonce");
epanel_save_data();
die();
}
function epanel_save_data(){
global $options;
$epanel = basename(__FILE__);
if ( isset($_REQUEST['action']) ) {
$valuesArray = array();
if ( 'save_epanel' == $_REQUEST['action'] ) {
foreach ($options as $value) {
if( isset( $value['id'] ) ) {
if( isset( $_REQUEST[ $value['id'] ] ) ) {
if ($value['type'] == 'textarea' || $value['type'] == 'text' || $value['type'] == 'textlimit' || $value['type'] == 'upload') update_option( $value['id'], stripslashes($_REQUEST[$value['id']]) );
elseif ($value['type'] == 'select') update_option( $value['id'], htmlspecialchars($_POST[$value['id']]) );
else update_option( $value['id'], $_POST[$value['id']] );
}
else {
if ($value['type'] == 'checkbox' || $value['type'] == 'checkbox2') update_option( $value['id'] , 'false' );
elseif ($value['type'] == 'different_checkboxes') {
update_option( $value['id'] , $_POST[$value['id']] );
}
else delete_option( $value['id'] );
}
}
$valuesArray[$value['id']] = $_POST[$value['id']];
}
#print_r(base64_encode(serialize($valuesArray))); exit;
header("Location: themes.php?page=$epanel&saved=true");
die;
} else if( 'reset' == $_REQUEST['action'] ) {
foreach ($options as $value) {
if (isset($value['id'])) {
delete_option( $value['id'] );
if (isset($value['std'])) $$value['id'] = $value['std'];
};
}
header("Location: themes.php?page=$epanel&reset=true");
die;
}
}
}
function upload_scripts() {
wp_enqueue_script('media-upload');
wp_enqueue_script('thickbox');
wp_register_script('my-upload', get_bloginfo('template_directory').'/epanel/js/custom_uploader.js', array('jquery','media-upload','thickbox'));
wp_enqueue_script('my-upload');
}
function upload_styles() {
wp_enqueue_style('thickbox');
}
global $pagenow;
if ( 'themes.php' == $pagenow && isset($_GET['page']) && ($_GET['page'] == basename(__FILE__)) ) {
add_action('admin_print_scripts', 'upload_scripts');
add_action('admin_print_styles', 'upload_styles');
} ?>php
the line 403 is
} ?>php
thank you.
regards