topmenu.phtml
---------------------------
<?php
$isLoggedIn = Zend_Auth::getInstance()->hasIdentity();
$this->js()->addOnLoad("jQuery('.calendar_mid_text3').bind('mouseover', jsddm_open)");
$this->js()->addOnLoad("jQuery('.calendar_mid_text3').bind('mouseout', jsddm_timer)");
$this->js()->addOnLoad("jQuery('.calendar_mid_text4').bind('mouseover', jsddm_open)");
$this->js()->addOnLoad("jQuery('.calendar_mid_text4').bind('mouseout', jsddm_timer)");
$this->js()->append($this->urls()->js()."menu/menu.js");
$this->js()->append($this->urls()->js()."menu/teamMenuInit.js");
//For Team Tab Display
//For Team Page Display created on 28,Oct 2010
$oTeamsiteedit = new Teamsiteedit();
$oTeam = new Team();
$curUrl=Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
$curUrl=explode("/",$curUrl);
$teamURL=$curUrl[count($curUrl)-2];
//Team details
$vTeamDet=$oTeam->getByUrl($teamURL,$id=0);
//Team Grid Menu Details
if(count($vTeamDet)>0)
{
$aParam['teamid']=$vTeamDet->team_id;
$vTeamTabDet=$oTeamsiteedit->getTabDet($aParam);
}
//for calling carosel scripts
if(count($vTeamTabDet)>1)
$this->js()->append($this->urls()->js()."menu/teamMenuInit.js");
//-- select user teams
if($isLoggedIn){
$user = Zend_Auth::getInstance()->getStorage()->read();
$oTeam = new Team();
$aTeams = $oTeam->getUserTeams($user->user_id);
$vMenuTeamselimg = "menu_bottom_arrow.gif";
$vSelController = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
if($vSelController == 'mygrid')
$vMenuGridsel = 'menuSel';
else if($vSelController == 'calendar')
$vMenuCalsel = 'menuSel';
else if($vSelController == 'gallery')
{
$vMenuGallerysel = 'menuSel';
$vMenuTeamselimg = 'menusel_bottom_arrow.gif';
$vArrowClass = 'lPadding';
}
else
{
$vMenuTeamsel = 'menuSel';
$vMenuTeamselimg = 'menusel_bottom_arrow.gif';
$vArrowClass = 'lPadding';
}
?>
<div class="calendar">
<div class="calendar_ll">
<div class="calendar_left"><img src="<? echo $this->urls()->images(); ?>calender_left.gif" alt=""/></div>
<div class="calendar_mid">
<?php if($isLoggedIn): ?>
<div id="styleGrid" class="calendar_mid_text1 <? echo $vMenuGridsel?>"> <b><a href="<?php echo $this->url(array('controller'=>'mygrid','action'=>'index')) ?>">Grid</a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
<div id="styleCalen" class="calendar_mid_text2 <? echo $vMenuCalsel?>"> <b><a href="<?php echo $this->url(array('controller'=>'calendar','action'=>'index')) ?>">Calendar</a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
<div id="styleMyteam" class="calendar_mid_text3 <? echo $vMenuTeamsel?>">
<b class="<? echo $vArrowClass ?>"><a href="#">My Teams</a></b><em><a href="#"><img src="<? echo $this->urls()->images(); ?><? echo $vMenuTeamselimg; ?>" alt="" border="0"/></a></em> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span>
<div id="menu_teams" class="team_store">
<div class="team_store_left">
<?php if(count($aTeams) > 0): ?>
<?php foreach($aTeams as $aTeam): ?>
<p><a href="<?php echo $this->url(array('page'=>$aTeam->rutr_url),'global_routing'); ?>/summary"><?php echo $this->escape($aTeam->team_name) ?></a></p>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
<div id="styleGal" class="calendar_mid_text4 <?=$vMenuGallerysel?>">
<b class="<? echo $vArrowClass ?>"><a href="#">Gallery</a></b> <em><a href="#"><img src="<? echo $this->urls()->images(); ?><? echo $vMenuTeamselimg; ?>" alt="" border="0"/></a></em> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span>
<div id="gallery_teams" class="gallery_store">
<div class="gallery_store_left">
<p><a href="<?php echo $this->url(array('page'=>'gallery/index/type/1'),'global_routing'); ?>">Upload Photos</a></p>
<p><a href="<?php echo $this->url(array('page'=>'gallery/index/type/2'),'global_routing') ?>">Upload Videos</a></p>
</div>
</div>
</div>
<div id="styleProd" class="calendar_mid_text5"> <b><a href="#">Products</a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
<!--<div class="calendar_mid_text6"> <b><a href="#">My Channels</a></b> <em><a href="#"><img src="<? echo $this->urls()->images(); ?>menu_bottom_arrow.gif" alt="" border="0"/></a></em> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>-->
<!--<div class="calendar_mid_text7"> <b><a href="#">>></a></b> </div>-->
</div>
<!-- <div class="calendar_right"><img src="<? echo $this->urls()->images(); ?>calender_right.gif" alt="" /></div>
<div class="add"> <span><a href="#"><img src="<? echo $this->urls()->images(); ?>add_icon.gif" alt="" border="0"/></a></span> </div>-->
<?php else: ?>
<!--<div class="calendar_mid_text1"> <b><a href="<?php echo $this->url(array('controller'=>'products','action'=>'index')) ?>">Products</a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
<div class="calendar_mid_text2"> <b><a href="<?php echo $this->url(array('controller'=>'aboutus','action'=>'index')) ?>">About Us</a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
<div class="calendar_mid_text3"> <b><a href="<?php echo $this->url(array('controller'=>'contactus','action'=>'index')) ?>">Contact Us</a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
<div class="calendar_mid_text4"> <b><a href="<?php echo $this->url(array('controller'=>'tryouts','action'=>'index')) ?>">Tryouts</a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
</div>-->
<?php endif; ?>
</div>
<div class="calendar_rr">
<form name="frmSearch" id="" method="post">
<input name="txtSearch" id="txtSearch" type="text" value="Team search" onkeypress="traceKeySearchTeam(event.keyCode)" />
<span><a href="javascript:" onclick="searchText()"><img src="<? echo $this->urls()->images(); ?>search_log_icon.gif" alt="" border="0" /></a></span>
</form>
</div>
</div>
<?
}
else
{
?>
<div class="calendar">
<div class="calendar_ll">
<div class="calendar_left"><img src="<? echo $this->urls()->images(); ?>calender_left.gif" alt=""/></div>
<div class="calendar_mid">
<!--Team tab display-->
<?php
if(count($vTeamTabDet)>=1)
{
for($tabLoop=0;$tabLoop<count($vTeamTabDet);$tabLoop++)
{
?>
<div id="styleGrid" class="calendar_mid_text1"> <b><a href="javascript:;" onclick="viewTeamPage('<?=$vTeamTabDet[$tabLoop]['cmsc_id']?>','<?=$teamURL?>')"><?=$vTeamTabDet[$tabLoop]['cmsc_name']?></a></b> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span> </div>
<?php
}
}
?>
</div>
</div>
<div class="calendar_rr">
<form name="frmSearch" id="" method="post">
<input type="hidden" name="hidTabId" id="hidTabId" value="" />
<input name="txtSearch" id="txtSearch" type="text" value="Team search" onkeypress="traceKeySearchTeam(event.keyCode)" />
<span><a href="javascript:" onclick="searchText()"><img src="<? echo $this->urls()->images(); ?>search_log_icon.gif" alt="" border="0" /></a></span>
</form>
</div>
</div>
<?php
}
?>
<script>
function traceKeySearchTeam( key ){
if ( key == 13 ){
searchText();
}
}
function searchText()
{
if(document.frmSearch.txtSearch.value == "")
{
alert("Please enter any team name to search")
return false
}
else
{
document.frmSearch.action = g_site_path+'/search';
document.frmSearch.submit();
}
}
</script>
No comments:
Post a Comment