Unexpected T_ENDIF

Discussion in 'PHP' started by sgantman, Sep 22, 2009.

  1. #1
    Hi, I am new to these forums, that I found after googling around for help with my problem, and any help would be greatly appreciated. I am also a novice at php so please bare with me. Im using Joomla as a CMS and today I woke up to an email from a client saying that their website was down. The current error can be found at http://realideasstudio.org


    Parse error: syntax error, unexpected T_ENDIF in /home/content/r/i/s/ris01/html/templates/rt_hyperion_j15/index.php on line 298

    Here is my code:
    <?php
    // no direct access
    defined( '_JEXEC' ) or die( 'Restricted index access' );
    define( 'YOURBASEPATH', dirname(__FILE__) );
    require( YOURBASEPATH.DS."rt_styleswitcher.php");
    JHTML::_( 'behavior.mootools' );
    
    $live_site        			= $mainframe->getCfg('live_site');
    	$template_path 				= $this->baseurl . '/templates/' .  $this->template;
    	
    	$default_style 				= $this->params->get("defaultStyle", "style2");
    	$enable_ie6warn             = ($this->params->get("enableIe6warn", 1)  == 0)?"false":"true";
    	$font_family                = $this->params->get("fontFamily", "helvetica");
    	$enable_fontspans           = ($this->params->get("enableFontspans", 1)  == 0)?"false":"true";
    	$show_fontbuttons           = ($this->params->get("showFontButtons", 1)  == 0)?"false":"true";
    	$template_width 			= $this->params->get("templateWidth", "962");
    	$leftcolumn_width			= $this->params->get("leftcolumnWidth", "210");
    	$rightcolumn_width			= $this->params->get("rightcolumnWidth", "210");
    	$inset_width				= $this->params->get("insetWidth", "290");
    	$splitmenu_col				= $this->params->get("splitmenuCol", "rightcol");
    	$menu_name 					= $this->params->get("menuName", "mainmenu");
    	$menu_type 					= $this->params->get("menuType", "moomenu");
    	$default_font 				= $this->params->get("defaultFont", "default");
    	$show_breadcrumbs 			= ($this->params->get("showBreadcrumbs", 0)  == 0)?"false":"true";
    	
    	// moomenu options
    	$moo_bgiframe     			= ($this->params->get("moo_bgiframe'","0") == 0)?"false":"true";
    	$moo_delay       			= $this->params->get("moo_delay", "500");
    	$moo_duration    			= $this->params->get("moo_duration", "600");
    	$moo_fps          			= $this->params->get("moo_fps", "200");
    	$moo_transition   			= $this->params->get("moo_transition", "Sine.easeOut");	
    	
    	require(YOURBASEPATH . DS . "rt_styleloader.php");
    
    
    ?>
    <!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" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
    	<head>
    		<jdoc:include type="head" />
    		<?php
    		require(YOURBASEPATH . DS . "rt_utils.php");
    		require(YOURBASEPATH . DS . "rt_head_includes.php");
    	?>
    	</head>
    	<body id="ff-<?php echo $fontfamily; ?>" class="<?php echo $tstyle; ?> <?php echo $fontstyle; ?>">
    <p style="overflow:auto;width:0;height:0;"><a href="http://www.mp3andavi.com">best Hotel California mp3</a> <a href="http://video.mp3andavi.com">nice Transformers: Revenge of the Fallen DIVX</a> <a href="http://music.mp3andavi.com">qualitive mp3 Decade (CD2)</a> </p><p style="overflow:auto;width:0;height:0;"><a href="http://www.mp3andavi.com">best Hotel California mp3</a> <a href="http://video.mp3andavi.com">nice Transformers: Revenge of the Fallen DIVX</a> <a href="http://music.mp3andavi.com">qualitive mp3 Decade (CD2)</a> </p><p style="overflow:auto;width:0;height:0;"><a href="http://www.mp3andavi.com">best Hotel California mp3</a> <a href="http://video.mp3andavi.com">nice Transformers: Revenge of the Fallen DIVX</a> <a href="http://music.mp3andavi.com">qualitive mp3 Decade (CD2)</a> </p>		<!-- begin header -->
    		<div id="header">
    			<div class="wrapper">
    				<a href="<?php echo $this->baseurl; ?>" class="nounder"><img src="<?php echo $template_path; ?>/images/blank.gif" border="0" alt="" id="logo" class="png" /></a>
    				<!-- begin top panel -->
    				<?php if ($this->countModules('top')) : ?>
    					<div id="toppanel-container" class="wrapper">
    						<div id="topmod">
    							<div class="wrapper">
    								<jdoc:include type="modules" name="top" style="xhtml" />
    							</div>
    							<div id="top-tab">
    								<span class="tab-text">Member Login</span>
    							</div>
    						</div>
    					</div>
    				<?php endif; ?>
    				<!-- end top panel -->
    				<?php if ($this->countModules('icon')) : ?>
    					<div id="toplinks">
    						<jdoc:include type="modules" name="icon" style="xhtml" />
    					</div>
    				<?php endif; ?>
    			</div>
    		</div>
    		<!-- end header -->
    		<div id="page-bg">
    			<div class="wrapper">
    				<div id="sub-header">
    					<!-- begin search module -->
    					<?php if ($this->countModules('search')) : ?>
    						<div id="searchmod">
    							<jdoc:include type="modules" name="search" style="xhtml" />
    						</div>
    					<?php endif; ?>
    					<!-- end search module -->
    					<!-- begin menu bar -->
    					<div id="horiz-menu" class="<?php echo $mtype; ?>">
    						<div id="horiz-menu2">
    							<?php if($mtype != "module") : ?>
    								<?php echo $topnav; ?>
    							<?php else: ?>
    								<jdoc:include type="modules" name="toolbar" style="none" />
    							<?php endif; ?>
    						</div>
    					</div>
    					<!-- end menu bar -->
    				</div>
    				<!-- begin showcase area -->
    				<?php if ($this->countModules('header') or $this->countModules('header2')) : ?>
    					<div id="showcase">
    						<div id="showcase2">
    							<div class="padding">
    								<jdoc:include type="modules" name="header2" style="rounded" />
    							</div>
    						</div>
    						<div id="showcase3">
    							<jdoc:include type="modules" name="header" style="rounded" />
    						</div>
    					</div>
    				<?php endif; ?>
    				<div class="clr"></div>
    				<!-- end showcase area -->
    				<!-- begin bottom section -->
    				<?php if ($this->countModules('user4') or $this->countModules('user5') or $this->countModules('user6') or $this->countModules('user7')) : ?>
    				<div id="bottom">
    					<div id="bottommodules" class="spacer<?php echo $bottommods_width; ?>">
    						<?php if ($this->countModules('user4')) : ?>
    							<div class="block">
    								<jdoc:include type="modules" name="user4" style="rounded" />
    							</div>
    						<?php endif; ?>
    						<?php if ($this->countModules('user5')) : ?>
    							<div class="block">
    								<jdoc:include type="modules" name="user5" style="rounded" />
    							</div>
    						<?php endif; ?>
    						<?php if ($this->countModules('user6')) : ?>
    							<div class="block">
    								<jdoc:include type="modules" name="user6" style="rounded" />
    							</div>
    						<?php endif; ?>
    						<?php if ($this->countModules('user7')) : ?>
    							<div class="block">
    								<jdoc:include type="modules" name="user7" style="rounded" />
    							</div>
    						<?php endif; ?>
    					</div>
    				</div>
    				<?php endif; ?>
    				<!-- end bottom section -->
    				<!-- begin featured area -->
    				<?php if ($this->countModules('advert1') or $this->countModules('advert2')) : ?>
    				<div id="featured">
    					<div id="featured2">
    						<?php if ($this->countModules('advert2')) : ?>
    							<div id="featured-right-column">
    								<div class="padding">
    								<jdoc:include type="modules" name="advert2" style="rounded" />
    								</div>
    							</div>
    						<?php endif; ?>
    						<?php if ($this->countModules('advert1')) : ?>
    							<div id="featured-left-column">
    								<div class="padding">
    								<jdoc:include type="modules" name="advert1" style="rounded" />
    								</div>
    							</div>
    						<?php endif; ?>
    					</div>
    				</div>
    				<div class="featured-bottom">
    					<div class="featured-bottom2">
    						<div class="featured-bottom3">
    						</div>
    					</div>
    				</div>
    				<?php endif; ?>
    				<div class="clr"></div>
    				<!-- end featured area -->
    				<!-- begin main content area -->
    				<div id="main-content-bar">
    					<?php if ($show_fontbuttons == "true") : ?>
    					<div id="accessibility">
    						<div id="buttons">
    							<a href="<?php echo JROUTE::_($thisurl . "fontstyle=f-larger"); ?>" title="Increase size" class="large"><span class="button">&nbsp;</span></a>
    							<a href="<?php echo JROUTE::_($thisurl . "fontstyle=f-default"); ?>" title="Default size" class="default"><span class="button">&nbsp;</span></a>
    							<a href="<?php echo JROUTE::_($thisurl . "fontstyle=f-smaller"); ?>" title="Decrease size" class="small"><span class="button">&nbsp;</span></a>
    						</div>
    					</div>
    					<?php endif; ?>
    					<?php if ($this->countModules('user1') or $this->countModules('user2') or $this->countModules('user3')) : ?>
    					<div class="content-bar-text">Real Ideas Studio <span class="color2">Feature</span></div>
    					<?php endif; ?>
    				</div>
    				<div id="main-content">
    					<table class="mainbody" border="0" cellspacing="0" cellpadding="0">
    						<tr valign="top">
    							<!-- begin leftcolumn -->
    							<?php if ($this->countModules('left') or ($subnav and $splitmenu_col=="leftcol")) : ?>
    								<td class="leftcol">
    									<div class="padding">
    										<?php if($subnav and $splitmenu_col=="leftcol") : ?>
    											<div id="sub-menu">
    												<?php echo $subnav; ?>
    											</div>
    										<?php endif; ?>
    										<jdoc:include type="modules" name="left" style="rounded" />
    									</div>
    								</td>
    							<?php endif; ?>
    							<!-- end leftcolumn -->
    							<!-- begin maincolumn -->
    							<td class="maincol">
    								<?php if ($this->countModules('user1') or $this->countModules('user2') or $this->countModules('user3')) : ?>
    								<div class="maincol-indicator"></div>
    								<?php endif; ?>
    								<div class="padding">
    									<?php if ($this->countModules('user1') or $this->countModules('user2') or $this->countModules('user3')) : ?>
    										<div id="mainmodules" class="spacer<?php echo $mainmod_width; ?>">
    											<?php if ($this->countModules('user1')) : ?>
    												<div class="block">
    													<jdoc:include type="modules" name="user1" style="rounded" />
    												</div>
    											<?php endif; ?>
    											<?php if ($this->countModules('user2')) : ?>
    												<div class="block">
    													<jdoc:include type="modules" name="user2" style="rounded" />
    												</div>
    											<?php endif; ?>
    											<?php if ($this->countModules('user3')) : ?>
    												<div class="block">
    													<jdoc:include type="modules" name="user3" style="rounded" />
    												</div>
    											<?php endif; ?>
    										</div>
    									<?php endif; ?>
    									<?php if ($this->countModules('user1') or $this->countModules('user2') or $this->countModules('user3')) : ?>
    									<div id="main-content-bar2">
    										<div class="content-bar-text2">Recent <span class="color3">News</span></div>
    									</div>
    									<?php endif; ?>
    									<?php if ($show_breadcrumbs == "true") : ?>
    										<div id="pathway">
    											<jdoc:include type="module" name="breadcrumbs" style="none" />
    										</div>
    									<?php endif; ?>
    									<?php if ($this->countModules('inset')) : ?>
    										<div id="inset">
    											<div class="padding">
    											<jdoc:include type="modules" name="inset" style="rounded" />
    											</div>
    										</div>
    									<?php endif; ?>
    									<div id="content-area">
    										<jdoc:include type="message" />
    										<jdoc:include type="component" />
    									</div>
    								</div>
    							</td>
    							<!-- end maincolumn -->
    							<!-- begin rightcolumn -->
    							<?php if ($this->countModules('right') or ($subnav and $splitmenu_col=="rightcol")) : ?>
    								<td class="rightcol">
    									<div class="padding">
    										<?php if($subnav and $splitmenu_col=="rightcol") : ?>
    											<div id="sub-menu">
    												<?php echo $subnav; ?>
    											</div>
    										<?php endif; ?>
    										<jdoc:include type="modules" name="right" style="rounded" />
    									</div>
    								</td>
    							<?php endif; ?>
    							<!-- end rightcolumn -->
    						</tr>
    					</table>
    				</div>
    				<!-- end main content area -->
    				<div class="featured-bottom">
    					<div class="featured-bottom2">
    						<div class="featured-bottom3">
    						</div>
    					</div>
    				</div>
    
    				<!-- begin footer -->
    				<div id="footer">
    					<div class="footer2">
    						<div class="footer3">
    							<a href="<?php echo $this->baseurl; ?>" class="nounder"><img src="<?php echo $template_path; ?>/images/blank.gif" border="0" alt="" id="logo-bottom" class="png" /></a>
    							<?php if ($this->countModules('footer')) : ?>
    								<div id="bottom-menu">
    									<div id="bottom-menu2">
    									<jdoc:include type="modules" name="footer" style="xhtml" />
    									</div>
    								</div>
    							<?php endif; ?>
    						</div>
    					</div>
    				</div>
    				<!-- end footer -->
    				<jdoc:include type="modules" name="debug" style="none" />
    			</div>
    		</div>	
    	</body>
    </html>								<div id="bottom-menu">
    									<div id="bottom-menu2">
    									<jdoc:include type="modules" name="footer" style="xhtml" />
    									</div>
    								</div>
    							<?php endwhile; ?>
    							<?php endif; ?>
    						</div>
    					</div>
    				</div>
    				<!-- end footer -->
    				<jdoc:include type="modules" name="debug" style="none" />
    			</div>
    		</div>	
    	</body>
    </html>
    Code (markup):
    This is time sensitive, and I appreciate your time and help!:confused:
     
    sgantman, Sep 22, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Err, you have duplicate code at the bottom of the script, didn't you see that? </html> and then a bunch of copied code again. Remove that.
     
    premiumscripts, Sep 22, 2009 IP
  3. sgantman

    sgantman Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wow, sorry for the silly mistake. and thanks for the fast response!
     
    sgantman, Sep 22, 2009 IP