Hi, I am a site owner with zero php experience. I have accidently deleted one letter from a header script and it caused my site to crash. I need desperate help. It shows Parse error: syntax error, unexpected T_STRING in /home/spark496/public_html/www.sourcetutoring.com/wp-content/themes/directorypress/header.php on line 152. Can any expert please help? This is the string below.
<?php
/* =============================================================================
THIS FILE SHOULD NOT BE EDITED // UPDATED: 16TH MARCH 2012
========================================================================== */
global $PPT, $PPTDesign, $ThemeDesign, $pagenow, $userdata; get_currentuserinfo();
/* =============================================================================
MAINTENANCE MODE // V7 // 16TH MARCH
========================================================================== */
if(get_option('maintenance_mode') == "yes" && ( !isset($_GET['redirect_to']) && $pagenow !="wp-login.php") ){ $msg = nl2br(stripslashes(get_option("maintenance_mode_message"))); if(strlen($msg) < 1){ $msg ="Maintenance Mode On"; } die($msg); }
/* =============================================================================
INITIALIZE PAGE ACTIONS AND GLOBALS // V7 // 16TH MARCH
========================================================================== */
premiumpress_action();
/* =============================================================================
LOAD IN PAGE CONTENT // V7 // 16TH MARCH
========================================================================== */
$hookContent = premiumpress_pagecontent("header"); /* HOOK V7 */
if(strlen($hookContent) > 20 ){ // HOOK DISPLAYS CONTENT
get_header();
echo $hookContent;
get_footer();
}elseif(file_exists(str_replace("functions/","",THEME_PATH)."/themes/".$GLOBALS['premiumpress']['theme']."/_header.php")){
include(str_replace("functions/","",THEME_PATH)."/themes/".$GLOBALS['premiumpress']['theme'].'/_header.php');
}elseif(file_exists(str_replace("functions/","",THEME_PATH)."/template_".strtolower(PREMIUMPRESS_SYSTEM)."/_header.php")){
include(str_replace("functions/","",THEME_PATH)."/template_".strtolower(PREMIUMPRESS_SYSTEM)."/_header.php");
}else{
/* =============================================================================
LOAD IN PAGE DEFAULT DISPLAY // UPDATED: 25TH MARCH 2012
========================================================================== */
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<!--[if lte IE 8 ]><html lang="en" class="ie ie8"><![endif]-->
<!--[if IE 9 ]><html lang="en" class="ie"><![endif]-->
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<?php wp_head(); ?>
</head>
<body <?php ppt_body_class(); ?>>
<?php premiumpress_top(); /* HOOK */ ?>
<div class="wrapper <?php $PPTDesign->CSS("ppt_layout_width"); ?>">
<?php premiumpress_header_before(); /* HOOK */ ?>
<?php function _bit_header_inside(){ /* HEADER WITH LOGO + BANNER */
global $wpdb,$PPT;
return '<div id="header" class="full"><div class="w_960">
<div class="f_half left" id="logo">
<a href="'.$GLOBALS['bloginfo_url'].'/" title="'.get_bloginfo('name').'">
<img src="'.$PPT->Logo(true).'" alt="'.get_bloginfo('name').'" />
</a>
</div>
<div class="left" id="banner">
'.premiumpress_banner("top",true).'
</div>
</div> <!-- end header w_960 -->
<div class="clearfix"></div>
</div> <!-- end header -->';
} ?>
<?php echo premiumpress_header_inside(_bit_header_inside()); /* HOOK / FILTER */ ?>
<?php premiumpress_header_after(); /* HOOK */ ?>
<?php premiumpress_menu_before(); /* HOOK */ ?>
<?php function _bit_menu_inside(){ /* MENU BAR */
global $wpdb,$PPT; $string='';
$string .= '<div class="menu" id="menubar"> <div class="w_960">';
if(has_nav_menu('PPT-CUSTOM-MENU-PAGES')){ $string .= wp_nav_menu( $GLOBALS['blog_custom_menu'] ); }else{
$string .= '<ul>
<li class="first"><a href="'.$GLOBALS['bloginfo_url'].'/" title="'.get_bloginfo('name').'">'.$PPT->_e(array('head','1')).'</a></li>
'.premiumpress_pagelist().'
</ul>';
}
$string .= '</div><!-- end menubar w_960 --> </div><!-- end menubar -->';
return $string;
}
?>
<?php echo premiumpress_menu_inside(_bit_menu_inside()); /* HOOK / FILTER */ ?>
<?php echo premiumpress_menu_after(); /* HOOK */ ?>
<?php if(isset($GLOBALS['ppt_layout_styles']['submenubar']) && isset($GLOBALS['ppt_layout_styles']['submenubar']['hide']) && $GLOBALS['ppt_layout_styles']['submenubar']['hide'] == 1){ ?>
<?php }else{ ?>
<?php premiumpress_submenu_before(); /* HOOK */ ?>
<?php function _bit_submenu_inside(){ /*SUB MENU BAR */
global $wpdb,$PPT, $userdata; get_currentuserinfo(); $string='';
$string .= '<div id="submenubar"><div class="w_960">';
if(isset($GLOBALS['ppt_layout_styles']['submenubar']) && isset($GLOBALS['ppt_layout_styles']['submenubar']['search']) && $GLOBALS['ppt_layout_styles']['submenubar']['search'] == 1){
$string .= '<div id="hpages"><ul>'.premiumpress_pagelist('submenu').'</ul></div>';
}else{
$string .= "<form method='get' action='".$GLOBALS['bloginfo_url']."/' name='searchBox' id='searchBox'>
<input type='text' value='".$PPT->_e(array('head','2'))."' name='s' id='s' onfocus="this.value='';" />";
if(isset($GLOBALS['ppt_layout_styles']['submenubar']) && isset($GLOBALS['ppt_layout_styles']['submenubar']['hidecat']) && $GLOBALS['ppt_layout_styles']['submenubar']['hidecat'] == 1){ }else{
// BUILD CATEGORY DROP DOWN LIST
$catdata = premiumpress_categorylist(0,'toponly');
if(strlen($catdata) > 1){
$string .= '<select id="catsearch" name="cat"><option value=""> </option>'.$catdata.'</select>';
}
}
$string .= '<div class="searchBtn left" onclick="document.searchBox.submit();"> </div>';