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');
}
}
No comments:
Post a Comment