Jump to content

Help with showing data from the User!


levicosta201

Recommended Posts

Here is what I use

Total Hours:

<?php echo Util::AddTime($userinfo->totalhours, $userinfo->transferhours); ?>

Total Flights:

<?php echo $userinfo->totalflights?>

I tried and did not work friend ....

I don't get what you're doing. What are you trying to get the details with (i.e pilot code or what)?

That's right I'm trying to get the details of the pilot!

Link to comment
Share on other sites

Is this info for the pilots profile?

It is rather for the profile of the riders!

I understand that but you need something to get the info with. Show me your full code.

<?php
if(MainController::$activeModule == 'PROFILE'){ ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<?php echo SITE_URL?>lib/skins/illuminativ2/style_profile.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/mla/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/mla/js/easySlider1.5.js"></script>
<script type="text/javascript" charset="utf-8">
// <![CDATA[
$(document).ready(function(){
$("#slider").easySlider({
 controlsBefore: '<p id="controls">',
 controlsAfter: '</p>',
 auto: true,
 continuous: true
});
});
// ]]>
</script>
<style type="text/css">
#slider { margin:0; padding:0; list-style:none; }
#slider ul,
#slider li { margin:0; padding:0; list-style:none; }
/*
   define width and height of list item (slide)
   entire slider area will adjust according to the parameters provided here
*/
#slider li { width:850px; height:378px; overflow:hidden; padding:0; margin:0; }
p#controls { margin:0; position:relative; }
#prevBtn,
#nextBtn { display:block; margin:0; overflow:hidden; width:29px; height:29px; position:absolute; left:-35px; top:-220px; }
#nextBtn { left:855px; }
#prevBtn a { display:block; width:29px; height:29px; background:url(images/l_arrow.gif) no-repeat 0 0; }
#nextBtn a { display:block; width:29px; height:29px; background:url(images/r_arrow.gif) no-repeat 0 0; }
</style>
<?php echo $page_htmlhead; ?>
<?php
			    if(Auth::LoggedIn() == false)
				    {
				 ?>
				 Sem permissão
				  <?php
				    }
				    else
				    {
					    $pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
			    ?>
<div class="main">

 <div class="header">
  <div id="left">
</div>
  <div class="block_header">

  <!--<div class="logo"><a href="index.html"><!--<img src="<?php echo SITE_URL?>/lib/skins/mla/images/logo.gif" width="155" height="57" border="0" alt="logo" /></a></div>-->
 <P> </P>
  <P> </P>

<div id="top">
   <ul class="top_profile">
   <li>     <img src="<?php echo PilotData::getPilotAvatar($pilotcode); ?>" /></li>
   </ul>
   </div>

<div class="clr"></div>
 <div class="bloga_resize">
   <div class="bloga_resizee">
  <div class="bloga">
    <h2></h2>
    <img src="http://lns.com.br/wp-content/uploads/network_workgroup.png"  alt="picture" width="91" height="84" />
    <p>
    </p>
  </div>
  <div class="bloga">
    <h2>Opções do perfil</h2>
    <img src="<?php echo SITE_URL?>/lib/skins/mla/images/img_top_2.gif" alt="picture" width="51" height="89" />
    <p>
    <ul>
    <li><a href="#">Editar meu perfil</a></li>
    <li><a href="#">Trocar minha senha</a></li>
    <li><a href="#">Ver meu crachá</a></li>
    <li><a href="#">Gráficos</a></li>
    <li><a href="#">Downloads</a></li>

    </ul>
    </p>
  </div>
  <div class="bloga">
    <h2>Estatisticas </h2>
    <img src="<?php echo SITE_URL?>/lib/skins/mla/images/img_top_3.gif" alt="picture" width="51" height="89" />
    <p>
    <ul>
    <li><a href="#">Meus voos</a></li>
    <li><a href="#">Meus gráficos</a></li>
    <li><a href="#">Finanças da empresa</a></li>

    </ul>
    </p>
  </div>
   </div>
   <div class="clr"></div>
 </div>
 <div class="clr"></div>
<div class="body">
   <div class="body_resize">
  <div class="right">
    <hr />
	 <table class="table2">
							 <tr>
				    <th><img src="<?php echo PilotData::getPilotAvatar($pilotcode); ?>" /></th>
				    <th scope="col" abbr="Starter">Seu Perfil</th>
				    <th scope="col" abbr="Medium">Opções do perfil</th>
				    <th scope="col" abbr="Business">Operação de voos</th>
				    <th scope="col" abbr="Deluxe"> </th>
			    </tr>
		    </thead>
		    <tfoot>
			    <tr>
				    <th scope="row"><strong>Conta bancária:</strong></th>
				    <td> </td>
				    <td> </td>
				    <td> </td>
				    <td> </td>
			    </tr>
			    <tr>
				  <th scope="row"><strong>Touchdown médio:</strong></th>
				  <td><span class="style1">
				  </span></td>
				  <td> </td>
				  <td> </td>
				  <td> </td>
			    </tr>
		    </tfoot>
		    <tbody>
			    <tr>
				    <th scope="row">Seu call sign:</th>
				    <td><span class="style1"></span></td>
				    <td><a href="<?php echo url('/profile/editprofile'); ?>">Editar meu perfil, e-mail ou foto</a></td>
				    <td><a href="<?php echo url('/pireps/mine');?>">Ver meus voos</a></td>
				    <td> </td>
			    </tr>
			    <tr>
				    <th scope="row"><strong>Seu cargo:</strong></th>
				    <td><strong><?php echo $userinfo->rank;?>
					  <?php
  if($report) { ?>
				    </strong></td>
				    <td><a href="<?php echo url('/profile/changepassword'); ?>">Trocar minha senha</a></td>
				    <td><a href="<?php echo url('/schedules/view');?>">Ver horários de voo</a></td>
				    <td> </td>
			    </tr>
			    <tr>
				    <th scope="row"><strong>Último voo:</strong></th>
				    <td><strong><a
  href="<?php echo url('pireps/view/'.$report->pirepid); ?>"><?php echo $report->code . $report->flightnum; ?></a>
					  <?php
  }
  ?>
				    </strong></td>
				    <td><a href="<?php echo url('/profile/badge'); ?>">Ver meu crachá</a></td>
				    <td><a href="<?php echo url('/finances');?>">Finanças da Mercosul</a></td>
				    <td> </td>
			    </tr>
			    <tr>
				    <th scope="row"><strong>Voos feitos:</strong></th>
				    <td><strong><?php echo $pilot->totalflights?; ></strong></td>
				    <td><a href="<?php echo url('/profile/stats'); ?>">Gráficos</a></td>
				    <td> </td>
				    <td> </td>
			    </tr>
			    <tr>
				    <th scope="row"><strong>Horas de voo:</strong></th>
				    <td><span class="check"><strong><?php echo $pilot->totalhours; ?></strong></span></td>
				    <td><span class="check"><a href="<?php echo url('/downloads'); ?>">Downloads</a></span></td>
				    <td><span class="check"></span></td>
				    <td><span class="check"></span></td>
			    </tr>
			    <tr>
				    <th scope="row"><strong>Horas bônus:</strong></th>
				    <td><span class="check"><strong><?php echo $pilot->transferhours; ?></strong></span></td>
				    <td><span class="check"></span></td>
				    <td><span class="check"></span></td>
				    <td><span class="check"></span></td>
			    </tr>
		    </tbody>
	 </table>
	    <h2> </h2>
<p> </p>
  </div>
  <!--
  <div class="left">
    <h2></h2>
  </div>
 -->
  <div class="clr"></div>
   </div>
 </div>
</div>
  <br />
  <P> </P>
  <P> </P>
  <br />
   <br />
  <P> </P>
  <P> </P>
  <br />
  <br />
  <P> </P>
  <P> </P>
  <br />
   <br />
  <P> </P>
  <P> </P>
  <br />
  <P> </P>
  <P> </P>
<P> </P>
  <P> </P>

<div class="footer">
 <div class="footer_resize">
   <p class="leftt">Copyright © sitename All Rights Reserved</p>
   <p class="rightt">Sistema de voos desenvolvido por <a href="http://phpvms.net/" target="_blank"> phpvms</a></p>
   <div class="clr"></div>
 </div>
 <div class="clr"></div>
</div>
</div>
</div>
<?php }
}else{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Mercosul Linhas Aéreas Virtuais</title>

<link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/mla/styles/style.css" type="text/css" media="screen" />
   <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/mla/styles/menu_index.css" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/mla/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/mla/js/chili-1.7.pack.js"></script>
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/mla/js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/mla/js/jquery.easing.1.1.1.js"></script>
   <!-- script value zero -->
<script type="text/javascript">
function limparPadrao(campo) {
    if (campo.value == campo.defaultValue) {
		    campo.value = "";
    }
}
function escreverPadrao(campo) {
    if (campo.value == "") {
		    campo.value = campo.defaultValue;
    }
}
</script>
<!-- end script value zero -->
   <?php echo $page_htmlhead; ?>
</head>
<body>
<div id="wrapper">
<div id='cssmenu'>
<ul>
<li><?php Template::Show('core_navigation.tpl'); ?></li>
<!--
  <li class='active '><a href='index.html'><span>Home</span></a></li>
  <li class='has-sub '><a href='#'><span>Empresa</span></a>
  <ul>
	 <li class='has-sub '><a href='#'><span>Staff</span></a>
	    <ul>
		   <li><a href='#'><span>Geral</span></a></li>
		   <li><a href='#'><span>Presidencia</span></a></li>
		   <li><a href='#'><span>Vice-presidencia</span></a></li>
		   <li><a href='#'><span>Conselho deliberativo</span></a></li>
		   <li><a href='#'><span>Diretor RH</span></a></li>
		   <li><a href='#'><span>Webdesign</span></a></li>
	    </ul>
	 </li>
	 <li class='has-sub '><a href='#'><span>Frota</span></a>

	    <ul>
		   <li><a href='#'><span>Geral</span></a></li>
		   <li><a href='#'><span><img src="<?php echo SITE_URL?>/lib/skins/mla/images/menus/boeing_logo.png" alt="boeing_logo" width="64" height="64" /></span></a></li>
		   <li><a href='#'><span><img src="<?php echo SITE_URL?>/lib/skins/mla/images/menus/logo_airbus.svg-01.gif" alt="voemercosul.com.br/lib/skins/illuminativ2/airbus_logo" width="64" height="64" /></span></a></li>
		   <li><a href='#'><span><img src="<?php echo SITE_URL?>/lib/skins/mla/images/menus/emb.png" alt="embraer_logo" width="48" height="48" /></span></a></li>
	    </ul>
	 </li>
  </ul>
  </li>
  <li><a href='#'><span>Inscreva-se</span></a></li>
  <li><a href='#'><span>Pilotos</span></a></li>
   <li class='has-sub '><a href='#'><span>Mapa de voos</span></a>
	    <ul>
		   <li><a href="<?php echo url('/acars') ?>"><span>Tempo real</span></a></li>
		   <li><a href='#'><span>Ultimos voos</span></a></li>
	    </ul>
		 <li><a href='#'><span>Contato</span></a></li>

	 </li>
  </ul>

  </li>
-->
</ul>
</div>


<!-- end #menu -->
<div id="header">
 <div id="logo">
  <h1><a href="#"></a></h1>
  <p> <a href="#"></a></p>
 </div>
</div>
<!-- end #header -->


<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
 <div id="content">
  <div class="post">
   <h2 class="title"><a href="#">Novo design da sitename!   </a></h2><p> </p>
   <p class="meta"><span class="date">Setembro 15, 2012</span><span class="posted">Posted by <a href="#">MLAadmin</a></span></p>
   <div style="clear: both;"> </div>
   <div class="entry">
 <p><?php echo $page_content; ?></p>

			    <p><!-- <?php /*MainController::Run('News', 'ShowNewsFront', 1);*/ ?>--></p>

 <p class="links"> </p>
   </div>
  </div>
   <div style="clear: both;"> </div>
 </div>
 <!-- end #content -->
 <div id="sidebar">
  <ul>
   <li>

		    <!--
 <div id="search" >

 <form method="get" action="#">
  <div>
   <input type="text" name="s" id="search-text" value="" />
   <input type="submit" id="search-submit" value="GO" />
  </div>
 </form>
					  </div>div search -->
    <?php
			    if(Auth::LoggedIn() == false)
				    {
				 ?>
		 <div style="clear: both;"> </div>
   </li>
   <br /><br />
			 <li>

			    <h2>Faça Login!</h2>
 <ul>
  <li><form class="rounded" method="post" action="<?php echo url('/login'); ?>" name="loginform">
<h3><img src="http://www.melcom.com.br/images/bt_login.png" alt="login" /></h3>

<div class="field">
   <label for="name">Login:</label>
  <input type="text" name="email"class="input" id="name" onfocus="limparPadrao(this);" onblur="escreverPadrao(this);" value="MLA0000"  />
   <p class="hint">Digite seu login.</p>
</div>

<div class="field">
   <label for="email">Senha:</label>
   <input type="password" class="input" name="password" id="senha" onfocus="limparPadrao(this);" onblur="escreverPadrao(this);" value="123456"  />   
   <p class="hint">Digite sua senha!.</p>
</div>

<input type="hidden" name="remember" value="on" />
				    <input type="hidden" name="redir" value="index.php/profile" />
				    <input type="hidden" name="action" value="login" />
<input type="submit" name="Submit"  class="button" value="Submit" />
</form></li>


 </ul>
   </li><br />
		    <br />

			    <?php
				    }
				    else
				    {
					    $pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
			    ?>

				  <h2>Você Já está logado!</h2>
 <ul>



 </ul>
   </li><br />
		    <br />



<br />
<br />
<table width="200" border="0" align="center">
 <tr>
   <th width="60" align="right" valign="middle" scope="col"> </th>
   <th width="59" align="left" scope="col"><strong>Call-sing: </strong></th>
   <th width="59" align="left" scope="col"><?php echo $pilotid ; ?></th>
 </tr>
 <tr>
   <td align="right" valign="middle"> <img align="left" height="50px" width="50px" style="margin-right: 10px;" src="<?php echo PilotData::getPilotAvatar($pilotid);?>" /></td>
   <td align="left"><strong>Rank:</strong></td>
   <td align="left"><?php echo Auth::$userinfo->rank;?></td>
 </tr>
 <tr>
   <td align="right" valign="middle"> </td>
   <td align="left"><strong>Total de voos:</strong></td>
   <td align="left"><?php echo Auth::$userinfo->totalflights?></td>
 </tr>
 <tr>
   <td align="right" valign="middle"> </td>
   <td align="left"><strong>Total de Horas:</strong></td>
   <td align="left"></td>
 </tr>
</table>

<br />
<br />
<br />

			    <?php
				    }
			    ?>

	  <h2><img src="http://lns.com.br/wp-content/uploads/network_workgroup.png" alt="" width="103" height="79"/></h2><br /><br />
			    <h2>Nosso sistema de voos!</h2>
 <ul>
  <li><a href="#">PHPVMS (Para operacoes de voo)</a></li>
  <li><a href="#">Plano Carreira</a></li>
  <li><a href="#">Raidcall (Para comunicacoes VoIP entre os pilotos): 000000</a></li>
  <li><a href="#">FsAcars e Kacars para contar horas de voo</a></li>

 </ul>
   </li>
   <li>
 <h2><img src="http://www.nelson-aviation.co.nz/~images/template/NAC/Pilot_Icon.png" /></h2>
			   <br /><br /> <h2>Novos Pilotos</h2>
 <ul>
  <li><a href="#"><?php str_replace("<p>","<li>",str_replace("</p>","</li>",MainController::Run('PILOTS', 'RecentFrontPage', 5))); ?></a></li>

 </ul>
   </li>
   <li>
 <h2><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Plane_icon.svg/48px-Plane_icon.svg.png" /></h2>
			    <p><h2>Ultimos voos!</h2></p>
 <ul>
  <li><a href="#"><?php MainController::Run('PIREPS', 'RecentFrontPage', 5); ?></a></li>

 </ul>
   </li>
  </ul>
 </div>
 <!-- end #sidebar -->
 <div style="clear: both;"> </div>
</div>
</div>
</div>
<!-- end #page -->
</div>
<div id="footer">
 <p><a href="#" target="_blank">Copyright</a> © 2007 - <?php echo date('Y') ?> - <?php echo SITE_NAME; ?> | Sistemas de voos criados por <a href="http://www.phpvms.net/" target="_blank">phpVMS</a> | <a href="#top">Voltar ao topo</a></p>
   <div align="center">
  <p align="center"><table width="295" border="0">
 <tr>
   <th width="65" scope="col"><img src="<?php echo SITE_URL?>/lib/skins/mla/images/redes/facebook_mla.png" alt="facebook_mla" width="50" height="50" /></th>
   <th width="66" scope="col"><img src="<?php echo SITE_URL?>/lib/skins/mla/images/redes/blogger_mla.png" alt="blogger_mla" width="50" height="50" /></th>
   <th width="150" align="left" scope="col"><img src="<?php echo SITE_URL?>/lib/skins/mla/images/redes/twitter_mla.png" alt="twitter_mla" width="50" height="50" /></th>
 </tr>
</table>
</p>
</div>
</div>
<!-- end #footer -->
</body>
</html>

<?php  }  ?>

Woe is my code layout.php complete!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...