Saturday, December 11, 2010
Monday, November 22, 2010
Zend Framework - Page with helpers
application\modules\storefront\views\scripts\testroaster\index.phtml
-------------------------------------------------------------------------
<?php
$this->js()->enableJQuery();
$this->js()->appendLibrary('Test');
$this->js()->addJQueryPlugin("tipsy",true);
$this->js()->addJQueryPlugin("validate",true);
$this->js()->addJQueryPlugin("autocomplete",true);
$this->js()->addJQueryPlugin("jcarousel",true);
$this->js()->addJQueryPlugin("jdialog",true);
$this->js()->append($this->urls()->js()."roaster/roaster.js");
$this->js()->addOnLoad("jQuery('#mycarousel').jcarousel();");
//For statistics
$this->js()->append($this->urls()->js()."NewPopup.js");
$this->js()->append($this->urls()->js()."library/jquery/jquery-ui-custom.min.js");
$this->js()->append($this->urls()->js()."statistics/statistics.js");
$this->css()->append($this->urls()->css()."/jquery-ui-1.7.2.custom.css");
//Uploaded Image diaplay
$vMediaPath = $this->urls()->manMedia();
$TeamFieldDet=$this->vTeamFieldDet;
$PyrLstGameDet = $this->vPyrLstGameDet;
?>
<form name="frmRoaster" method="post" action="#">
<input type="hidden" name="hidRoasterID" id="hidRoasterID" value="<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>"/>
<input type="hidden" name="hidplayerID" id="hidplayerID" value="<? echo $this->vPlayerDet[0]['plyr_id'] ?>"/>
<input type="hidden" name="hidSorting" id="hidSorting" />
<input type="hidden" name="hidChildId" id="hidChildId" value="" />
<input type="hidden" name="team_user_prm" id="team_user_prm" value="<?=$this->team_user_permission?>" />
</form>
<?php echo $this->teamsidebar(); ?>
<?php $summaryAct = $this->testTeamsum; ?>
<div class="cal_mid_mid_acc">
<div class="go_mid_mid_acc">
<div class="testTeam_mid_mid">
<p><a href="<?=$summaryAct ?>"><< Go to testTeam Summary</a></p>
<span class="vh">Last Modified: Friday, April 13, 2010</span>
</div>
<div class="testTeam_bulid_mid">
<div class="testTeam_bulid_invite_left">
<h2><a class="page_title" href="<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'roaster'))?>">Roster</a></h2>
<?php
if($this->userPER==1){
?>
<p><a href="<?=$this->buildroster?>">Build Roster</a></p>
<p>>></p>
<p><a href="#">Add New Lineup Card >></a></p>
<?php
}?>
</div>
<?php
if($_POST['hidSorting'] == 'ASC')
{
$vSortsel = 'selected=selected';
$vSortsel1 = '';
}else
{
$vSortsel = '';
$vSortsel1 = 'selected=selected';
}
?>
<div class="testTeam_bulid_invite_right">
<i>Sort by:</i><select name="selSort" id="selSort" onchange="sortRoasterDetail('<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'roaster')) ?>')">
<option value="ASC" <? echo $vSortsel; ?>>Last Name (A-Z)</option>
<option value="DESC" <? echo $vSortsel1; ?>>Last Name (Z-A)</option>
</select>
</div>
</div>
<div class="testTeam_roster_testTeam_main">
<?php if($this->vPlayerCnt>0) { ?>
<div class="testTeam_roster_testTeam">
<div class="testTeam_roster_testTeam_mid">
<div id="wrap">
<?php // if($this->vPlayerCnt>0) { ?>
<ul id="mycarousel" class="jcarousel-skin-tango">
<?php //for($ploop =0;$ploop< $this->vPlayerCnt;$ploop++) {
for($ploop =0;$ploop< $this->vPlayerCnt;$ploop++) {
if($ploop == 2)
$vCls = "testTeam_view_two";
else
$vCls = "testTeam_view_one";
//for profile image display
if($this->vPlayerRes[$ploop]['user_image']=="")
$userImage=$this->urls()->images()."testTeam_roster_man.gif";
else
$userImage=$vMediaPath.$this->vPlayerRes[$ploop]['user_image'];
?>
<?php if($ploop ==0){?>
<input type="hidden" name="firstlist" id="firstlist" value="<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>" />
<?php } ?>
<li>
<div class="testTeam_view_one" id="roascls_<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>">
<em><a href="#" onclick="showRoasterDetail(<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'edit-roaster')) ?>',<? echo $this->testTeamID; ?>)"><img src="<? echo $userImage; ?>" width="47" height="62" border="0" alt=""/></a></em>
<?php
if($this->userPER==1){
?>
<span><a href="javascript:deleteRoaster(<? echo $this->vPlayerRes[$ploop]['plyr_user_id'] ?>)"><img src="<? echo $this->urls()->images(); ?>testTeam_close.gif" alt="" border="0"/></a></span>
<?php } ?>
<b><?php echo $this->vPlayerRes[$ploop]['user_fname']." ".$this->vPlayerRes[$ploop]['user_lname'] ?></b>
<p>Position: <? echo $this->vPlayerRes[$ploop]['plps_position_name']?></p>
<p>Number: <? echo $this->vPlayerRes[$ploop]['plyr_jersy_no'] ?></p>
<i id="viwButton_<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>" class="viwBtn" ><a href="#" onclick="viewRoasterDetail(<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'roaster-detail')) ?>')"><img src="<? echo $this->urls()->images(); ?>testTeam_view_button.gif" alt="" border="0"/></a></i>
</div>
</li>
<?php }?>
</ul>
<?php //} ?>
</div>
</div>
</div>
<!------------------- Top Listing End------------------------------>
<?php
if($this->vPlayerDet[0]['user_image']=="")
$userImage=$this->urls()->images()."testTeam_roster_man.gif";
else
$userImage=$vMediaPath.$this->vPlayerDet[0]['user_image'];
// $this->date()->printDate('11/21/2010');
?>
<!------------------- Profile detail start------------------------------>
<div class="testTeam_roster_testTeam" id="divRoasterDet">
<div class="testTeam_view_profile">
<div class="testTeam_view_profile_left">
<span>
<a href="#"><img src="<? echo $userImage; ?>" border="0" alt="" /></a>
</span>
</div>
<div class="testTeam_view_profile_mid">
<h2><b><? echo $this->vPlayerDet[0]['user_fname']." ".$this->vPlayerDet[0]['user_lname']; ?> </b> | #<? echo $this->vPlayerDet[0]['plyr_jersy_no']?> | <? echo $this->vPlayerDet[0]['plps_position_name']?></h2>
<em>
<i>Height:</i><p> <? echo $this->vPlayerDet[0]['user_height']?></p>
</em>
<em>
<i>Weight:</i><p><? echo $this->vPlayerDet[0]['user_weight']?> lbs.</p>
</em>
<em>
<? $vDOB = $this->vPlayerDet[0]['user_dob'];
$aDOB = explode(" ",$vDOB);
?>
<i>Birthday: </i><p><? echo date("m-d-Y",strtotime("$aDOB[0]")); ?></p> </em>
<em>
<i>Age:</i><p><? echo Common:: getAge($this->vPlayerDet[0]['user_dob']); ?></p>
</em>
<em>
<i>Home Town:</i><p><? echo $this->vPlayerDet[0]['user_address']?></p>
</em>
<em>
<i>Parents: </i>
<p>
<?
for($vLoop=0;$vLoop<$this->vParentCnt;$vLoop++)
{
?>
<a href="javscript:void();"><?=$this->vParantDet[$vLoop]['user_fname']." ".$this->vParantDet[$vLoop]['user_lname']?></a><? if($this->vParentCnt>1) { ?> , <? } ?>
<?
}
?>
</p>
</em>
<em>
<i>Bio:</i><p><? echo substr($this->vPlayerDet[0]['user_bio'],0,200)?>...<a href="#"> More >></a></p>
</em>
</div>
<div class="testTeam_view_profile_right">
<em>
<span><a href="javascript:;" onclick="viewprofilegrid('<?php echo $this->vPlayerDet[0][user_id]; ?>')"><img src="<? echo $this->urls()->images(); ?>testTeam_porfile_icon.gif" border="0" /></a></span>
<p><a href="javascript:;" onclick="viewprofilegrid('<?php echo $this->vPlayerDet[0][user_id]; ?>')">View Full Profile</a></p>
</em>
<em>
<span><a href="#"><img src="<? echo $this->urls()->images(); ?>testTeam_send_icon.gif" alt="" border="0"/></a></span>
<p><a href="#">Send Message</a></p>
</em>
<?php
//checking testTeam coach permission
if($this->testTeam_user_permission==1)
{
?>
<em>
<span><a href="javascript:redirectRoasterEdit(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>)"><img src="<? echo $this->urls()->images(); ?>testTeam_player_card.gif" alt="" border="0" /></a></span>
<p><a href="javascript:redirectRoasterEdit(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'edit-roaster')) ?>')">Edit Player Card</a></p>
</em>
<em>
<span><a href="javascript:deleteRoaster(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>)"><img src="<? echo $this->urls()->images(); ?>testTeam_remove_icon.gif" alt="" border="0"/></a></span>
<p><a href="javascript:deleteRoaster(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>)">Remove</a></p>
</em>
<?php } ?>
</div>
<div class="testTeam_roster_l_game">
<br/>
<div class="testTeam_roster_l_game_left">
<span><a href="#">Last Game</a></span><p><a href="Javascript:" onclick="showStatistics(<?=$this->vPlayerDet[0]['plyr_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'statistics')) ?>')">More</a> >></p>
</div>
<? /* loadStatistics(<?=$this->testTeamID ?>,'<?=$this->vPlayerDet[0]['testTeam_name']?>',<?=$this->vPlayerDet[0]['plyr_id']?>) */ ?>
<?php
if($this->userPER==1){
?>
<div class="testTeam_roster_l_game_right"><p>
<a href="#" onclick="showStatistics(<?=$this->vPlayerDet[0]['plyr_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'statistics')) ?>')">Add/Edit Statistics</a> >></p></div>
<div class="testTeam_roster_l_game_right">
<p style="margin-right:10px;"><a href="#">Add/Edit Training Videos</a> >></p></div>
<?php } ?>
</div>
<div class="testTeam_roster_l_long">
<p>Date</p>
<i>Opponent</i>
<em>
<?php for($i=0;$i<count($testTeamFieldDet);$i++){ ?>
<span><?=$testTeamFieldDet[$i]['stsm_name'] ?></span>
<?php } ?>
</em>
</div>
<!--Latest statistics start-->
<?php if(count($PyrLstGameDet)>=1){
$game_date1=explode(" ",$PyrLstGameDet[0]['stst_game_date']);
$game_date2=explode("-",$game_date1[0]);
$game_date=$game_date2[1]."/".$game_date2[2]."/".$game_date2[0]
?>
<div class="testTeam_roster_l_name">
<p><?=$game_date ?></p>
<i><?=$PyrLstGameDet[0]['stst_played_testTeam_name'] ?></i>
<em>
<?php
//field ids
$field_id=$PyrLstGameDet[$k]['sts_id'];
$fids=explode(',',$field_id);
//field values/score
$field_val=$PyrLstGameDet[$k]['stsd_value'];
$fval=explode(',',$field_val);
//print alll fields and check with db selected vals
for($m=0;$m<count($testTeamFieldDet);$m++){
$score=0;
for($n=0;$n<count($fids);$n++){
if($fids[$n]==$testTeamFieldDet[$m]['stsm_id']){
$score=$fval[$n];break;
}
}
?>
<span><?=$score ?></span>
<?php } ?>
<!--<span><a href="#" onclick="loadStatisticseditform(<?=$PyrLstGameDet[0]['stst_id'] ?>)">Edit</a></span>-->
</em>
</div>
<?php } ?>
<!--Latest statistics end-->
<div class="testTeam_roster_l_game mt5">
<div class="testTeam_roster_l_game_left">
<span><a href="#">Total</a></span>
</div>
<div class="testTeam_roster_l_game_right"></div>
</div>
<div class="testTeam_roster_l_total">
<b>G</b>
<b>AB</b>
<b>R</b>
<b>H</b>
<b>2B</b>
<b>3B</b>
<b>HR</b>
<b>RBI</b>
<b>BB</b>
<b>SO</b>
<b>SB</b>
<b>CS</b>
<b>K</b>
<b>OBP</b>
<b>SLG</b>
<b>OPS</b>
<b>AVG</b>
</div>
<div class="testTeam_roster_l_name">
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0.000</b>
<b>0.000</b>
<b>0.000</b>
<b class="border_right">0.000</b>
</div>
</div>
</div>
<? }
else
{
echo '<div align="center"><b>No roasters found in this testTeam</b></div>';
}
?>
</div>
</div>
</div>
<div class="cal_mid_right_ig"><span><a href="#"><img src="<? echo $this->urls()->images(); ?>will_grace_ig.gif" alt="" border="0"/></a></span></div>
application\modules\storefront\views\scripts\helpers\testTeamsidebar.phtml
-----------------------------------------------------------------------------
<?php
$this->js()->enableJQuery();
$this->js()->append($this->urls()->js()."library/tiny_mce/tiny_mce.js");
$this->js()->append($this->urls()->js()."testTeamsiteedit/tinymce.init.js");
$this->js()->append($this->urls()->js()."testTeampopup.js");
/*$this->js()->append($this->urls()->js()."library/jquery/jquery-1.3.2.min.js"); */
$this->js()->append($this->urls()->js()."testTeamsiteedit/testTeamsitepopup.js");
$vMediaPath = $this->urls()->manMedia();
$aUserDetails = $this->aUserDetails[0];
//logo display
if(isset($this->data->testTeam_logo) && $this->data->testTeam_logo!='')
$vtestTeamimg = $vMediaPath.$this->data->testTeam_logo;
else
$vtestTeamimg =$this->urls()->images()."change_logo_ig.gif";
?>
<span id="script_tinymce"></span>
<input type="hidden" name="up_testTeam_id" id="up_testTeam_id" value="<?php echo $this->data->testTeam_id; ?>" />
<input type="hidden" name="up_testTeam_url" id="up_testTeam_url" value="<?php echo $this->url(array('page'=>$this->testTeamURL),'global_routing'); ?>" />
<div class="cal_mid_left_acc">
<div class="base_ball">
<span><?php echo $this->escape($this->data->testTeam_name) ?></span> <em>(<?php echo $this->escape($this->data->sprt_name) ?>)</em>
</div>
<div class="im_man" onmouseover="this.className='im_manOver'" onmouseout="this.className='im_man'" style="border:1px:#0033FF;">
<?php if($this->testTeam_user_permission==1){?>
<div class="cngAvatar">
<a onclick="changetestTeamlogo(<?php echo $this->data->testTeam_id; ?>,'<?php echo $this->url(array('page'=>$this->testTeamURL),'global_routing'); ?>')" href="Javascript:">Change Logo </a> </div>
<a onclick="changetestTeamlogo(<?php echo $this->data->testTeam_id; ?>,'<?php echo $this->url(array('page'=>$this->testTeamURL),'global_routing'); ?>')" href="Javascript:"><img id="testTeamImg" width="80" border="0" alt="" src="<?php echo $vtestTeamimg;?>" /></a>
<?php } else {?>
<img id="testTeamImg" width="80" border="0" alt="" src="<?php echo $vtestTeamimg;?>" />
<?php }?>
</div>
<div class="acc_ig_name">
<!--<p><?php echo $this->escape($this->data->testTeam_name) ?></p>-->
<p> </p>
</div>
<div class="account_text">
<?php if($this->testTeam_user_permission==1): ?>
<b><?php echo $this->translate('Manage testTeam'); ?></b>
<?php else: ?>
<b><?php echo $this->translate('testTeam'); ?></b>
<?php endif; ?>
<?php if(count($this->testTeam_side_menus) > 0): ?>
<?php foreach($this->testTeam_side_menus as $this->testTeam_side_menu): ?>
<?php
$url = "";
if($this->testTeam_side_menu->rutr_url != ""){
$router = str_replace("{testTeamURL}","",$this->testTeam_side_menu->rutr_url);
$url = $this->url(array('page'=>$this->testTeamURL),'global_routing').$router;
}else{
$url = $this->url(array('page'=>$this->data->rutr_url,'controller'=>$this->testTeam_side_menu->stvw_controller,'action'=>$this->testTeam_side_menu->stvw_action),'global_routing');
}
?>
<!--conditions for checking testTeam site edit menu to open a popup menu-->
<?php
if($this->testTeam_side_menu->stvw_menu_title=='testTeam Site (Modify)' && $this->testTeam_user_permission==1){ ?>
<p style="cursor:pointer"><a onclick="loadtestTeamSite('<?=$url; ?>')"><?=$this->translate($this->testTeam_side_menu->stvw_menu_title); ?></a></p>
<?php } else if($this->testTeam_side_menu->stvw_menu_title!='testTeam Site (Modify)' ) {?>
<p><a href="<?=$url; ?>"><?=$this->translate($this->testTeam_side_menu->stvw_menu_title); ?></a></p>
<?php } ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
application\modules\storefront\views\helpers\testTeamsidebar.php
---------------------------------------------------------
<?php
/**
* Zend_View_Helper_testTeamsidebar
*
* Helper for displaying product prices (human readable)
*
* @category Storefront
* @package Storefront_View_Helper
*/
class Zend_View_Helper_testTeamsidebar extends Zend_View_Helper_Abstract {
const testTeam_MENU_TYPE = 3;
/**
* A function to get testTeam left menus text to another line
*
* Type: function<br>
* Name: testTeamSideBar<br>
* Author: kamal.K<br>
* Created: Sep 01,2010<br>
* @param void
* @exception none
* @return void.
*/
public function testTeamsidebar(){
//-- fetch related informations from
//-- database and show them
$request = Zend_Controller_Front::getInstance()->getRequest();
$testTeamID = $request->getParam('g_testTeam_id');
$userACL = $request->getParam('g_testTeam_user_acl');
$userPRMSN = $request->getParam('g_testTeam_user_permission');
$testTeamUserRole = $userACL['role'];
$this->view->assign('testTeam_user_permission',$userPRMSN);
if($testTeamID>0)
{
//--- get testTeam information using the testTeam id
$otestTeam = new testTeam();
$record = $otestTeam->getCompletetestTeamByID($testTeamID);
$this->view->assign('data',$record);
//-- get testTeam sidebar menu informations
if($testTeamUserRole > 0){
$oMenu = new Menu();
$aMenus = $oMenu->getMenus($testTeamUserRole,self::TEAM_MENU_TYPE);
$this->view->assign('team_side_menus',$aMenus);
}
}
return $this->view->render('helpers/teamsidebar.phtml');
}
}
-------------------------------------------------------------------------
<?php
$this->js()->enableJQuery();
$this->js()->appendLibrary('Test');
$this->js()->addJQueryPlugin("tipsy",true);
$this->js()->addJQueryPlugin("validate",true);
$this->js()->addJQueryPlugin("autocomplete",true);
$this->js()->addJQueryPlugin("jcarousel",true);
$this->js()->addJQueryPlugin("jdialog",true);
$this->js()->append($this->urls()->js()."roaster/roaster.js");
$this->js()->addOnLoad("jQuery('#mycarousel').jcarousel();");
//For statistics
$this->js()->append($this->urls()->js()."NewPopup.js");
$this->js()->append($this->urls()->js()."library/jquery/jquery-ui-custom.min.js");
$this->js()->append($this->urls()->js()."statistics/statistics.js");
$this->css()->append($this->urls()->css()."/jquery-ui-1.7.2.custom.css");
//Uploaded Image diaplay
$vMediaPath = $this->urls()->manMedia();
$TeamFieldDet=$this->vTeamFieldDet;
$PyrLstGameDet = $this->vPyrLstGameDet;
?>
<form name="frmRoaster" method="post" action="#">
<input type="hidden" name="hidRoasterID" id="hidRoasterID" value="<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>"/>
<input type="hidden" name="hidplayerID" id="hidplayerID" value="<? echo $this->vPlayerDet[0]['plyr_id'] ?>"/>
<input type="hidden" name="hidSorting" id="hidSorting" />
<input type="hidden" name="hidChildId" id="hidChildId" value="" />
<input type="hidden" name="team_user_prm" id="team_user_prm" value="<?=$this->team_user_permission?>" />
</form>
<?php echo $this->teamsidebar(); ?>
<?php $summaryAct = $this->testTeamsum; ?>
<div class="cal_mid_mid_acc">
<div class="go_mid_mid_acc">
<div class="testTeam_mid_mid">
<p><a href="<?=$summaryAct ?>"><< Go to testTeam Summary</a></p>
<span class="vh">Last Modified: Friday, April 13, 2010</span>
</div>
<div class="testTeam_bulid_mid">
<div class="testTeam_bulid_invite_left">
<h2><a class="page_title" href="<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'roaster'))?>">Roster</a></h2>
<?php
if($this->userPER==1){
?>
<p><a href="<?=$this->buildroster?>">Build Roster</a></p>
<p>>></p>
<p><a href="#">Add New Lineup Card >></a></p>
<?php
}?>
</div>
<?php
if($_POST['hidSorting'] == 'ASC')
{
$vSortsel = 'selected=selected';
$vSortsel1 = '';
}else
{
$vSortsel = '';
$vSortsel1 = 'selected=selected';
}
?>
<div class="testTeam_bulid_invite_right">
<i>Sort by:</i><select name="selSort" id="selSort" onchange="sortRoasterDetail('<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'roaster')) ?>')">
<option value="ASC" <? echo $vSortsel; ?>>Last Name (A-Z)</option>
<option value="DESC" <? echo $vSortsel1; ?>>Last Name (Z-A)</option>
</select>
</div>
</div>
<div class="testTeam_roster_testTeam_main">
<?php if($this->vPlayerCnt>0) { ?>
<div class="testTeam_roster_testTeam">
<div class="testTeam_roster_testTeam_mid">
<div id="wrap">
<?php // if($this->vPlayerCnt>0) { ?>
<ul id="mycarousel" class="jcarousel-skin-tango">
<?php //for($ploop =0;$ploop< $this->vPlayerCnt;$ploop++) {
for($ploop =0;$ploop< $this->vPlayerCnt;$ploop++) {
if($ploop == 2)
$vCls = "testTeam_view_two";
else
$vCls = "testTeam_view_one";
//for profile image display
if($this->vPlayerRes[$ploop]['user_image']=="")
$userImage=$this->urls()->images()."testTeam_roster_man.gif";
else
$userImage=$vMediaPath.$this->vPlayerRes[$ploop]['user_image'];
?>
<?php if($ploop ==0){?>
<input type="hidden" name="firstlist" id="firstlist" value="<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>" />
<?php } ?>
<li>
<div class="testTeam_view_one" id="roascls_<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>">
<em><a href="#" onclick="showRoasterDetail(<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'edit-roaster')) ?>',<? echo $this->testTeamID; ?>)"><img src="<? echo $userImage; ?>" width="47" height="62" border="0" alt=""/></a></em>
<?php
if($this->userPER==1){
?>
<span><a href="javascript:deleteRoaster(<? echo $this->vPlayerRes[$ploop]['plyr_user_id'] ?>)"><img src="<? echo $this->urls()->images(); ?>testTeam_close.gif" alt="" border="0"/></a></span>
<?php } ?>
<b><?php echo $this->vPlayerRes[$ploop]['user_fname']." ".$this->vPlayerRes[$ploop]['user_lname'] ?></b>
<p>Position: <? echo $this->vPlayerRes[$ploop]['plps_position_name']?></p>
<p>Number: <? echo $this->vPlayerRes[$ploop]['plyr_jersy_no'] ?></p>
<i id="viwButton_<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>" class="viwBtn" ><a href="#" onclick="viewRoasterDetail(<?=$this->vPlayerRes[$ploop]['plyr_user_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'roaster-detail')) ?>')"><img src="<? echo $this->urls()->images(); ?>testTeam_view_button.gif" alt="" border="0"/></a></i>
</div>
</li>
<?php }?>
</ul>
<?php //} ?>
</div>
</div>
</div>
<!------------------- Top Listing End------------------------------>
<?php
if($this->vPlayerDet[0]['user_image']=="")
$userImage=$this->urls()->images()."testTeam_roster_man.gif";
else
$userImage=$vMediaPath.$this->vPlayerDet[0]['user_image'];
// $this->date()->printDate('11/21/2010');
?>
<!------------------- Profile detail start------------------------------>
<div class="testTeam_roster_testTeam" id="divRoasterDet">
<div class="testTeam_view_profile">
<div class="testTeam_view_profile_left">
<span>
<a href="#"><img src="<? echo $userImage; ?>" border="0" alt="" /></a>
</span>
</div>
<div class="testTeam_view_profile_mid">
<h2><b><? echo $this->vPlayerDet[0]['user_fname']." ".$this->vPlayerDet[0]['user_lname']; ?> </b> | #<? echo $this->vPlayerDet[0]['plyr_jersy_no']?> | <? echo $this->vPlayerDet[0]['plps_position_name']?></h2>
<em>
<i>Height:</i><p> <? echo $this->vPlayerDet[0]['user_height']?></p>
</em>
<em>
<i>Weight:</i><p><? echo $this->vPlayerDet[0]['user_weight']?> lbs.</p>
</em>
<em>
<? $vDOB = $this->vPlayerDet[0]['user_dob'];
$aDOB = explode(" ",$vDOB);
?>
<i>Birthday: </i><p><? echo date("m-d-Y",strtotime("$aDOB[0]")); ?></p> </em>
<em>
<i>Age:</i><p><? echo Common:: getAge($this->vPlayerDet[0]['user_dob']); ?></p>
</em>
<em>
<i>Home Town:</i><p><? echo $this->vPlayerDet[0]['user_address']?></p>
</em>
<em>
<i>Parents: </i>
<p>
<?
for($vLoop=0;$vLoop<$this->vParentCnt;$vLoop++)
{
?>
<a href="javscript:void();"><?=$this->vParantDet[$vLoop]['user_fname']." ".$this->vParantDet[$vLoop]['user_lname']?></a><? if($this->vParentCnt>1) { ?> , <? } ?>
<?
}
?>
</p>
</em>
<em>
<i>Bio:</i><p><? echo substr($this->vPlayerDet[0]['user_bio'],0,200)?>...<a href="#"> More >></a></p>
</em>
</div>
<div class="testTeam_view_profile_right">
<em>
<span><a href="javascript:;" onclick="viewprofilegrid('<?php echo $this->vPlayerDet[0][user_id]; ?>')"><img src="<? echo $this->urls()->images(); ?>testTeam_porfile_icon.gif" border="0" /></a></span>
<p><a href="javascript:;" onclick="viewprofilegrid('<?php echo $this->vPlayerDet[0][user_id]; ?>')">View Full Profile</a></p>
</em>
<em>
<span><a href="#"><img src="<? echo $this->urls()->images(); ?>testTeam_send_icon.gif" alt="" border="0"/></a></span>
<p><a href="#">Send Message</a></p>
</em>
<?php
//checking testTeam coach permission
if($this->testTeam_user_permission==1)
{
?>
<em>
<span><a href="javascript:redirectRoasterEdit(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>)"><img src="<? echo $this->urls()->images(); ?>testTeam_player_card.gif" alt="" border="0" /></a></span>
<p><a href="javascript:redirectRoasterEdit(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'edit-roaster')) ?>')">Edit Player Card</a></p>
</em>
<em>
<span><a href="javascript:deleteRoaster(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>)"><img src="<? echo $this->urls()->images(); ?>testTeam_remove_icon.gif" alt="" border="0"/></a></span>
<p><a href="javascript:deleteRoaster(<? echo $this->vPlayerDet[0]['plyr_user_id'] ?>)">Remove</a></p>
</em>
<?php } ?>
</div>
<div class="testTeam_roster_l_game">
<br/>
<div class="testTeam_roster_l_game_left">
<span><a href="#">Last Game</a></span><p><a href="Javascript:" onclick="showStatistics(<?=$this->vPlayerDet[0]['plyr_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'statistics')) ?>')">More</a> >></p>
</div>
<? /* loadStatistics(<?=$this->testTeamID ?>,'<?=$this->vPlayerDet[0]['testTeam_name']?>',<?=$this->vPlayerDet[0]['plyr_id']?>) */ ?>
<?php
if($this->userPER==1){
?>
<div class="testTeam_roster_l_game_right"><p>
<a href="#" onclick="showStatistics(<?=$this->vPlayerDet[0]['plyr_id']?>,'<?php echo $this->url(array('page'=>$this->testTeamURL,'action'=>'statistics')) ?>')">Add/Edit Statistics</a> >></p></div>
<div class="testTeam_roster_l_game_right">
<p style="margin-right:10px;"><a href="#">Add/Edit Training Videos</a> >></p></div>
<?php } ?>
</div>
<div class="testTeam_roster_l_long">
<p>Date</p>
<i>Opponent</i>
<em>
<?php for($i=0;$i<count($testTeamFieldDet);$i++){ ?>
<span><?=$testTeamFieldDet[$i]['stsm_name'] ?></span>
<?php } ?>
</em>
</div>
<!--Latest statistics start-->
<?php if(count($PyrLstGameDet)>=1){
$game_date1=explode(" ",$PyrLstGameDet[0]['stst_game_date']);
$game_date2=explode("-",$game_date1[0]);
$game_date=$game_date2[1]."/".$game_date2[2]."/".$game_date2[0]
?>
<div class="testTeam_roster_l_name">
<p><?=$game_date ?></p>
<i><?=$PyrLstGameDet[0]['stst_played_testTeam_name'] ?></i>
<em>
<?php
//field ids
$field_id=$PyrLstGameDet[$k]['sts_id'];
$fids=explode(',',$field_id);
//field values/score
$field_val=$PyrLstGameDet[$k]['stsd_value'];
$fval=explode(',',$field_val);
//print alll fields and check with db selected vals
for($m=0;$m<count($testTeamFieldDet);$m++){
$score=0;
for($n=0;$n<count($fids);$n++){
if($fids[$n]==$testTeamFieldDet[$m]['stsm_id']){
$score=$fval[$n];break;
}
}
?>
<span><?=$score ?></span>
<?php } ?>
<!--<span><a href="#" onclick="loadStatisticseditform(<?=$PyrLstGameDet[0]['stst_id'] ?>)">Edit</a></span>-->
</em>
</div>
<?php } ?>
<!--Latest statistics end-->
<div class="testTeam_roster_l_game mt5">
<div class="testTeam_roster_l_game_left">
<span><a href="#">Total</a></span>
</div>
<div class="testTeam_roster_l_game_right"></div>
</div>
<div class="testTeam_roster_l_total">
<b>G</b>
<b>AB</b>
<b>R</b>
<b>H</b>
<b>2B</b>
<b>3B</b>
<b>HR</b>
<b>RBI</b>
<b>BB</b>
<b>SO</b>
<b>SB</b>
<b>CS</b>
<b>K</b>
<b>OBP</b>
<b>SLG</b>
<b>OPS</b>
<b>AVG</b>
</div>
<div class="testTeam_roster_l_name">
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0</b>
<b>0.000</b>
<b>0.000</b>
<b>0.000</b>
<b class="border_right">0.000</b>
</div>
</div>
</div>
<? }
else
{
echo '<div align="center"><b>No roasters found in this testTeam</b></div>';
}
?>
</div>
</div>
</div>
<div class="cal_mid_right_ig"><span><a href="#"><img src="<? echo $this->urls()->images(); ?>will_grace_ig.gif" alt="" border="0"/></a></span></div>
application\modules\storefront\views\scripts\helpers\testTeamsidebar.phtml
-----------------------------------------------------------------------------
<?php
$this->js()->enableJQuery();
$this->js()->append($this->urls()->js()."library/tiny_mce/tiny_mce.js");
$this->js()->append($this->urls()->js()."testTeamsiteedit/tinymce.init.js");
$this->js()->append($this->urls()->js()."testTeampopup.js");
/*$this->js()->append($this->urls()->js()."library/jquery/jquery-1.3.2.min.js"); */
$this->js()->append($this->urls()->js()."testTeamsiteedit/testTeamsitepopup.js");
$vMediaPath = $this->urls()->manMedia();
$aUserDetails = $this->aUserDetails[0];
//logo display
if(isset($this->data->testTeam_logo) && $this->data->testTeam_logo!='')
$vtestTeamimg = $vMediaPath.$this->data->testTeam_logo;
else
$vtestTeamimg =$this->urls()->images()."change_logo_ig.gif";
?>
<span id="script_tinymce"></span>
<input type="hidden" name="up_testTeam_id" id="up_testTeam_id" value="<?php echo $this->data->testTeam_id; ?>" />
<input type="hidden" name="up_testTeam_url" id="up_testTeam_url" value="<?php echo $this->url(array('page'=>$this->testTeamURL),'global_routing'); ?>" />
<div class="cal_mid_left_acc">
<div class="base_ball">
<span><?php echo $this->escape($this->data->testTeam_name) ?></span> <em>(<?php echo $this->escape($this->data->sprt_name) ?>)</em>
</div>
<div class="im_man" onmouseover="this.className='im_manOver'" onmouseout="this.className='im_man'" style="border:1px:#0033FF;">
<?php if($this->testTeam_user_permission==1){?>
<div class="cngAvatar">
<a onclick="changetestTeamlogo(<?php echo $this->data->testTeam_id; ?>,'<?php echo $this->url(array('page'=>$this->testTeamURL),'global_routing'); ?>')" href="Javascript:">Change Logo </a> </div>
<a onclick="changetestTeamlogo(<?php echo $this->data->testTeam_id; ?>,'<?php echo $this->url(array('page'=>$this->testTeamURL),'global_routing'); ?>')" href="Javascript:"><img id="testTeamImg" width="80" border="0" alt="" src="<?php echo $vtestTeamimg;?>" /></a>
<?php } else {?>
<img id="testTeamImg" width="80" border="0" alt="" src="<?php echo $vtestTeamimg;?>" />
<?php }?>
</div>
<div class="acc_ig_name">
<!--<p><?php echo $this->escape($this->data->testTeam_name) ?></p>-->
<p> </p>
</div>
<div class="account_text">
<?php if($this->testTeam_user_permission==1): ?>
<b><?php echo $this->translate('Manage testTeam'); ?></b>
<?php else: ?>
<b><?php echo $this->translate('testTeam'); ?></b>
<?php endif; ?>
<?php if(count($this->testTeam_side_menus) > 0): ?>
<?php foreach($this->testTeam_side_menus as $this->testTeam_side_menu): ?>
<?php
$url = "";
if($this->testTeam_side_menu->rutr_url != ""){
$router = str_replace("{testTeamURL}","",$this->testTeam_side_menu->rutr_url);
$url = $this->url(array('page'=>$this->testTeamURL),'global_routing').$router;
}else{
$url = $this->url(array('page'=>$this->data->rutr_url,'controller'=>$this->testTeam_side_menu->stvw_controller,'action'=>$this->testTeam_side_menu->stvw_action),'global_routing');
}
?>
<!--conditions for checking testTeam site edit menu to open a popup menu-->
<?php
if($this->testTeam_side_menu->stvw_menu_title=='testTeam Site (Modify)' && $this->testTeam_user_permission==1){ ?>
<p style="cursor:pointer"><a onclick="loadtestTeamSite('<?=$url; ?>')"><?=$this->translate($this->testTeam_side_menu->stvw_menu_title); ?></a></p>
<?php } else if($this->testTeam_side_menu->stvw_menu_title!='testTeam Site (Modify)' ) {?>
<p><a href="<?=$url; ?>"><?=$this->translate($this->testTeam_side_menu->stvw_menu_title); ?></a></p>
<?php } ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
application\modules\storefront\views\helpers\testTeamsidebar.php
---------------------------------------------------------
<?php
/**
* Zend_View_Helper_testTeamsidebar
*
* Helper for displaying product prices (human readable)
*
* @category Storefront
* @package Storefront_View_Helper
*/
class Zend_View_Helper_testTeamsidebar extends Zend_View_Helper_Abstract {
const testTeam_MENU_TYPE = 3;
/**
* A function to get testTeam left menus text to another line
*
* Type: function<br>
* Name: testTeamSideBar<br>
* Author: kamal.K<br>
* Created: Sep 01,2010<br>
* @param void
* @exception none
* @return void.
*/
public function testTeamsidebar(){
//-- fetch related informations from
//-- database and show them
$request = Zend_Controller_Front::getInstance()->getRequest();
$testTeamID = $request->getParam('g_testTeam_id');
$userACL = $request->getParam('g_testTeam_user_acl');
$userPRMSN = $request->getParam('g_testTeam_user_permission');
$testTeamUserRole = $userACL['role'];
$this->view->assign('testTeam_user_permission',$userPRMSN);
if($testTeamID>0)
{
//--- get testTeam information using the testTeam id
$otestTeam = new testTeam();
$record = $otestTeam->getCompletetestTeamByID($testTeamID);
$this->view->assign('data',$record);
//-- get testTeam sidebar menu informations
if($testTeamUserRole > 0){
$oMenu = new Menu();
$aMenus = $oMenu->getMenus($testTeamUserRole,self::TEAM_MENU_TYPE);
$this->view->assign('team_side_menus',$aMenus);
}
}
return $this->view->render('helpers/teamsidebar.phtml');
}
}
Zend Framework - Layout with helpers
application\modules\storefront\layouts\scripts\default\one-coloumn.phtml
-------------------------------------------------------------------------
<?php echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $this->css()->append($this->urls()->css()."/player.css"); ?>
<?php $this->css()->append($this->urls()->css()."/mygrid.css"); ?>
<?php $this->css()->append($this->urls()->css()."/gallery.css"); ?>
<?php if(isset($this->user) && $this->user->theme_name != "")
$this->css()->append($this->urls()->css().'/themes/player_'.$this->user->theme_name.'.css','screen',true,array('id' => 'layout_css'));
?>
<?php $this->headScript()->prependScript('var ZAAHDATEFORMAT = "'."yy-mm-dd".'";') ?>
<?php $this->headScript()->prependScript('var g_site_path = "'.$this->baseUrl().'";') ?>
<?php $this->headScript()->prependScript('var g_imge_path = "'.$this->urls()->images().'";') ?>
<?php $this->headScript()->prependScript('var g_skin_path = "'.$this->urls()->skin().'";') ?>
<?php $header = $this->render('includes/header.phtml'); ?>
<?php $widgets = $this->widget(); ?>
<?php $topmenu = $this->topmenu(); ?>
<?php $this->js()->addLibrary(); ?>
<?php echo $this->headMeta();?>
<?php echo $this->headTitle();?>
<?php echo $this->headStyle();?>
<?php echo $this->headLink();?>
</head>
<body id="playerbody">
<div class="cornerBG">
<div class="header">
<div class="header_main">
<?php
/*** To display Header links and header ***/
echo $header;
/*** To display Main menu bar ***/
echo $topmenu;
/*** To display body content ***/
echo $this->render('includes/body_content.phtml');
/*** To display bottom widgets ***/
echo $widgets;
/*** To display footer with bottom links ***/
echo $this->render('includes/footer.phtml');
?>
</div>
</div>
</div>
<?php $this->js()->onload(); ?>
<?php echo $this->headScript();?>
</body>
</html>
application\modules\storefront\layouts\scripts\default\helpers\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/testTeamMenuInit.js");
//For testTeam Tab Display
//For testTeam Page Display created on 28,Oct 2010
$otestTeamsiteedit = new testTeamsiteedit();
$otestTeam = new testTeam();
$curUrl=Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
$curUrl=explode("/",$curUrl);
$testTeamURL=$curUrl[count($curUrl)-2];
//testTeam details
$vtestTeamDet=$otestTeam->getByUrl($testTeamURL,$id=0);
//testTeam Grid Menu Details
if(count($vtestTeamDet)>0)
{
$aParam['testTeamid']=$vtestTeamDet->testTeam_id;
$vtestTeamTabDet=$otestTeamsiteedit->getTabDet($aParam);
}
//for calling carosel scripts
if(count($vtestTeamTabDet)>1)
$this->js()->append($this->urls()->js()."menu/testTeamMenuInit.js");
//-- select user testTeams
if($isLoggedIn){
$user = Zend_Auth::getInstance()->getStorage()->read();
$otestTeam = new testTeam();
$atestTeams = $otestTeam->getUsertestTeams($user->user_id);
$vMenutestTeamselimg = "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';
$vMenutestTeamselimg = 'menusel_bottom_arrow.gif';
$vArrowClass = 'lPadding';
}
else
{
$vMenutestTeamsel = 'menuSel';
$vMenutestTeamselimg = '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="styleMytestTeam" class="calendar_mid_text3 <? echo $vMenutestTeamsel?>">
<b class="<? echo $vArrowClass ?>"><a href="#">My testTeams</a></b><em><a href="#"><img src="<? echo $this->urls()->images(); ?><? echo $vMenutestTeamselimg; ?>" alt="" border="0"/></a></em> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span>
<div id="menu_testTeams" class="testTeam_store">
<div class="testTeam_store_left">
<?php if(count($atestTeams) > 0): ?>
<?php foreach($atestTeams as $atestTeam): ?>
<p><a href="<?php echo $this->url(array('page'=>$atestTeam->rutr_url),'global_routing'); ?>/summary"><?php echo $this->escape($atestTeam->testTeam_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 $vMenutestTeamselimg; ?>" alt="" border="0"/></a></em> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span>
<div id="gallery_testTeams" 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" action="#">
<input type="hidden" name="txtSearch" id="txtSearch" value="" />
</form>
<input name="txtSrch" id="txtSrch" type="text" value="testTeam search" onkeypress="traceKeySearchtestTeams(event.keyCode)" onblur="showSrhHint('txtSrch')" onfocus="removeSrhHint('txtSrch')" />
<span><a href="javascript:" onclick="searchtestTeamText()"><img src="<? echo $this->urls()->images(); ?>search_log_icon.gif" alt="" border="0" /></a></span>
</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">
<!--testTeam tab display-->
<?php
if(count($vtestTeamTabDet)>=1)
{
for($tabLoop=0;$tabLoop<count($vtestTeamTabDet);$tabLoop++)
{
?>
<div id="styleGrid" class="calendar_mid_text1"> <b><a href="javascript:;" onclick="viewtestTeamPage('<?=$vtestTeamTabDet[$tabLoop]['cmsc_id']?>','<?=$testTeamURL?>')"><?=$vtestTeamTabDet[$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" action="#">
<input type="hidden" name="hidTabId" id="hidTabId" value="" />
<input type="hidden" name="txtSearch" id="txtSearch" value="" />
</form>
<input name="txtSrch" id="txtSrch" type="text" value="testTeam search" onkeypress="traceKeySearchtestTeams(event.keyCode)" onblur="showSrhHint('txtSrch')" onfocus="removeSrhHint('txtSrch')" />
<span><a href="javascript:" onclick="searchtestTeamText()"><img src="<? echo $this->urls()->images(); ?>search_log_icon.gif" alt="" border="0" /></a></span>
</div>
</div>
<?php
}
?>
<script>
function traceKeySearchtestTeams( key ){
if ( key == 13 ){
searchtestTeamText();
}
}
function searchtestTeamText()
{
if($('#txtSrch').val()== "" || $('#txtSrch').val()== 'testTeam search')
{
alert("Please enter any testTeam name to search")
return;
} else {
var srhval=$('#txtSrch').val()
$('#txtSearch').val(srhval)
document.frmSearch.action = g_site_path+'/search';
document.frmSearch.submit();
}
}
function showSrhHint(SrhId)
{
if($('#txtSrch').val()=="")
$('#'+SrhId).val('testTeam search')
}
function removeSrhHint(SrhId)
{
$('#'+SrhId).val('')
}
</script>
application\modules\storefront\views\helpers\topmenu.php
---------------------------------------------------------
<?php
/**
* Helper class to fetch and view the user menu items
*
* @uses Zend_View_Helper_Menu
* @copyright
* @license
* @version
* @author Kamalkannan
* @created Oct 06, 2010
*/
class Zend_View_Helper_Topmenu extends Zend_View_Helper_Abstract{
/**
* Function fetch and show the user menu
* Created: Sep 6, 2010
* @param Int $type - Type of the menu to be shown
*/
public function topmenu(){
//-- check the user authendication is exists
$isLoggedIn = Zend_Auth::getInstance()->hasIdentity();
if($isLoggedIn){
//-- fetch the user top menu informations
//-- fetch the sports informations
return $this->view->render('helpers/topmenu.phtml');
}
else
return $this->view->render('helpers/topmenu.phtml');
}
}
-------------------------------------------------------------------------
<?php echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $this->css()->append($this->urls()->css()."/player.css"); ?>
<?php $this->css()->append($this->urls()->css()."/mygrid.css"); ?>
<?php $this->css()->append($this->urls()->css()."/gallery.css"); ?>
<?php if(isset($this->user) && $this->user->theme_name != "")
$this->css()->append($this->urls()->css().'/themes/player_'.$this->user->theme_name.'.css','screen',true,array('id' => 'layout_css'));
?>
<?php $this->headScript()->prependScript('var ZAAHDATEFORMAT = "'."yy-mm-dd".'";') ?>
<?php $this->headScript()->prependScript('var g_site_path = "'.$this->baseUrl().'";') ?>
<?php $this->headScript()->prependScript('var g_imge_path = "'.$this->urls()->images().'";') ?>
<?php $this->headScript()->prependScript('var g_skin_path = "'.$this->urls()->skin().'";') ?>
<?php $header = $this->render('includes/header.phtml'); ?>
<?php $widgets = $this->widget(); ?>
<?php $topmenu = $this->topmenu(); ?>
<?php $this->js()->addLibrary(); ?>
<?php echo $this->headMeta();?>
<?php echo $this->headTitle();?>
<?php echo $this->headStyle();?>
<?php echo $this->headLink();?>
</head>
<body id="playerbody">
<div class="cornerBG">
<div class="header">
<div class="header_main">
<?php
/*** To display Header links and header ***/
echo $header;
/*** To display Main menu bar ***/
echo $topmenu;
/*** To display body content ***/
echo $this->render('includes/body_content.phtml');
/*** To display bottom widgets ***/
echo $widgets;
/*** To display footer with bottom links ***/
echo $this->render('includes/footer.phtml');
?>
</div>
</div>
</div>
<?php $this->js()->onload(); ?>
<?php echo $this->headScript();?>
</body>
</html>
application\modules\storefront\layouts\scripts\default\helpers\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/testTeamMenuInit.js");
//For testTeam Tab Display
//For testTeam Page Display created on 28,Oct 2010
$otestTeamsiteedit = new testTeamsiteedit();
$otestTeam = new testTeam();
$curUrl=Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
$curUrl=explode("/",$curUrl);
$testTeamURL=$curUrl[count($curUrl)-2];
//testTeam details
$vtestTeamDet=$otestTeam->getByUrl($testTeamURL,$id=0);
//testTeam Grid Menu Details
if(count($vtestTeamDet)>0)
{
$aParam['testTeamid']=$vtestTeamDet->testTeam_id;
$vtestTeamTabDet=$otestTeamsiteedit->getTabDet($aParam);
}
//for calling carosel scripts
if(count($vtestTeamTabDet)>1)
$this->js()->append($this->urls()->js()."menu/testTeamMenuInit.js");
//-- select user testTeams
if($isLoggedIn){
$user = Zend_Auth::getInstance()->getStorage()->read();
$otestTeam = new testTeam();
$atestTeams = $otestTeam->getUsertestTeams($user->user_id);
$vMenutestTeamselimg = "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';
$vMenutestTeamselimg = 'menusel_bottom_arrow.gif';
$vArrowClass = 'lPadding';
}
else
{
$vMenutestTeamsel = 'menuSel';
$vMenutestTeamselimg = '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="styleMytestTeam" class="calendar_mid_text3 <? echo $vMenutestTeamsel?>">
<b class="<? echo $vArrowClass ?>"><a href="#">My testTeams</a></b><em><a href="#"><img src="<? echo $this->urls()->images(); ?><? echo $vMenutestTeamselimg; ?>" alt="" border="0"/></a></em> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span>
<div id="menu_testTeams" class="testTeam_store">
<div class="testTeam_store_left">
<?php if(count($atestTeams) > 0): ?>
<?php foreach($atestTeams as $atestTeam): ?>
<p><a href="<?php echo $this->url(array('page'=>$atestTeam->rutr_url),'global_routing'); ?>/summary"><?php echo $this->escape($atestTeam->testTeam_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 $vMenutestTeamselimg; ?>" alt="" border="0"/></a></em> <span><img src="<? echo $this->urls()->images(); ?>menu_pix.gif" alt=""/></span>
<div id="gallery_testTeams" 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" action="#">
<input type="hidden" name="txtSearch" id="txtSearch" value="" />
</form>
<input name="txtSrch" id="txtSrch" type="text" value="testTeam search" onkeypress="traceKeySearchtestTeams(event.keyCode)" onblur="showSrhHint('txtSrch')" onfocus="removeSrhHint('txtSrch')" />
<span><a href="javascript:" onclick="searchtestTeamText()"><img src="<? echo $this->urls()->images(); ?>search_log_icon.gif" alt="" border="0" /></a></span>
</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">
<!--testTeam tab display-->
<?php
if(count($vtestTeamTabDet)>=1)
{
for($tabLoop=0;$tabLoop<count($vtestTeamTabDet);$tabLoop++)
{
?>
<div id="styleGrid" class="calendar_mid_text1"> <b><a href="javascript:;" onclick="viewtestTeamPage('<?=$vtestTeamTabDet[$tabLoop]['cmsc_id']?>','<?=$testTeamURL?>')"><?=$vtestTeamTabDet[$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" action="#">
<input type="hidden" name="hidTabId" id="hidTabId" value="" />
<input type="hidden" name="txtSearch" id="txtSearch" value="" />
</form>
<input name="txtSrch" id="txtSrch" type="text" value="testTeam search" onkeypress="traceKeySearchtestTeams(event.keyCode)" onblur="showSrhHint('txtSrch')" onfocus="removeSrhHint('txtSrch')" />
<span><a href="javascript:" onclick="searchtestTeamText()"><img src="<? echo $this->urls()->images(); ?>search_log_icon.gif" alt="" border="0" /></a></span>
</div>
</div>
<?php
}
?>
<script>
function traceKeySearchtestTeams( key ){
if ( key == 13 ){
searchtestTeamText();
}
}
function searchtestTeamText()
{
if($('#txtSrch').val()== "" || $('#txtSrch').val()== 'testTeam search')
{
alert("Please enter any testTeam name to search")
return;
} else {
var srhval=$('#txtSrch').val()
$('#txtSearch').val(srhval)
document.frmSearch.action = g_site_path+'/search';
document.frmSearch.submit();
}
}
function showSrhHint(SrhId)
{
if($('#txtSrch').val()=="")
$('#'+SrhId).val('testTeam search')
}
function removeSrhHint(SrhId)
{
$('#'+SrhId).val('')
}
</script>
application\modules\storefront\views\helpers\topmenu.php
---------------------------------------------------------
<?php
/**
* Helper class to fetch and view the user menu items
*
* @uses Zend_View_Helper_Menu
* @copyright
* @license
* @version
* @author Kamalkannan
* @created Oct 06, 2010
*/
class Zend_View_Helper_Topmenu extends Zend_View_Helper_Abstract{
/**
* Function fetch and show the user menu
* Created: Sep 6, 2010
* @param Int $type - Type of the menu to be shown
*/
public function topmenu(){
//-- check the user authendication is exists
$isLoggedIn = Zend_Auth::getInstance()->hasIdentity();
if($isLoggedIn){
//-- fetch the user top menu informations
//-- fetch the sports informations
return $this->view->render('helpers/topmenu.phtml');
}
else
return $this->view->render('helpers/topmenu.phtml');
}
}
Subscribe to:
Posts (Atom)