Jump to content

Recommended Posts

Posted

Hello guys,

Im trying to create a drop down menu, however, failing, BADLY.

i was wondering if anybody had a code for a simple drop down menu that can be used with phpVMS?

Thanks, Thomas.

Posted

profile_main.tpl

<style type="text/css">
<!--
#mainbox .indent table tr td .suckerdiv font strong {
color: #000;
}
-->
</style>
<div id="mainbox">
<h1>Sala AIS</h1> <h3>Tudo que você precisa para o seu voo esta aqui !  </h3>
<div class="indent">
<p><strong>Seja bem vindo Comandante </strong> <?php echo $userinfo->firstname . ' ' . $userinfo->lastname; ?> <strong>!

</strong></p>
<table>
<tr>
<td width="49" rowspan="2" align="center" valign="top">
	<?php
    if(! file_exists ( SITE_ROOT . AVATAR_PATH . '/' . $pilotcode . '.png' ))
        {
            echo '<img src="<?php echo SITE_URL ?>/lib/avatars/pilotoavatar.png" alt="No Avatar" />' ;
        }
        else
        {
            echo '<img src="' . SITE_URL . AVATAR_PATH . '/' . $pilotcode . '.png' . '" alt="No Avatar" /> ' ;
        }
            ?>
	<br /><br />
	<img src="<?php echo RanksData::GetRankImage($userinfo->rank) ?>" />
</td>
<td valign="top">
	<ul style="margin-top: 0px;">
		<li><strong>Piloto  ID: </strong> <?php echo $pilotcode; ?></li>
            <li><strong>Pais: </strong>
				<img src="<?php echo Countries::getCountryImage($userinfo->location);?>" 
							alt="<?php echo Countries::getCountryName($userinfo->location);?>" />
				<?php echo Countries::getCountryName($userinfo->location);?> 
			</li>
			<?php
			// Show the public fields
			if($allfields)
			{
				foreach($allfields as $field)
				{
					echo "<li><strong>$field->title: </strong>$field->value</li>";
				}
			}
			?>
            <li><strong>Rank: </strong><?php echo $userinfo->rank;?></li>
		<?php
		if($report)
		{ ?>
			<li><strong>Utimo Voo: </strong><a 
					href="<?php echo SITE_URL?>/index.php/pireps/view/<?php echo $report->pirepid?>">
					<?php echo $report->code . $report->flightnum; ?></a>
			</li>
		<?php
		}
		?>
           <li><strong>Último Voo Data:</strong> <?php echo '' . $report -> submitdate ; ?></li>
           <li><strong>Último Pouso:</strong> <?php echo '' . $report -> arricao ; ?></li>
                      <li><strong>Pax. Abordo:</strong> <?php echo '' . $report -> load ; ?></li>
                      			<li><strong>Total Voos: </strong><?php echo $userinfo->totalflights?></li>
		<li><strong>Total Horas: </strong><?php echo Util::AddTime($userinfo->totalhours, $userinfo->transferhours); ?></li>
		<li><strong>Total Ganho: </strong><?php echo FinanceData::FormatMoney($userinfo->totalpay) ?></li>
            
            
		<?php
		if($nextrank)
		{
		?>           
	</ul></td>
<td valign="top">
        

        <p></p></strong></td>
<td valign="top"> </td>
</tr>
<tr>
  <td colspan="3" align="left" valign="top">Você tem que voar mais <?php echo ($nextrank->minhours-$userinfo->totalhours)?> Horas para ser <?php echo $nextrank->rank?>
    <?php
		}
		?>
  </td>
  </tr>
</table>


                
                
             <style type="text/css">

/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */

.suckerdiv ul{
margin: 0;
padding: 0;
list-style-type: none;
width: 200px; /* Width of Menu Items */
border-bottom: 1px solid #ccc;
}

.suckerdiv ul li{
position: relative;
}

/*Sub level menu items */
.suckerdiv ul li ul{
position: absolute;
width: auto; /*sub menu width*/
top: 0;
visibility: hidden;
}

/* Sub level menu links style */
.suckerdiv ul li a{
display: block;
overflow: auto; /*force hasLayout in IE7 */
color: black;
text-decoration: none;
background: #fff;
padding: 3px 5px;
border: 1px solid #ccc;
border-bottom: 0;
}

.suckerdiv ul li a:visited{
color: black;
}

.suckerdiv ul li a:hover{
background-color: yellow;
}

.suckerdiv .subfolderstyle{
background: url(<?php echo SITE_URL?>/admin/lib/images/arrow-list.gif) no-repeat center right;
}


/* Holly Hack for IE */
* html .suckerdiv ul li { float: left; height: 1%; }
* html .suckerdiv ul li a { height: 1%; }
/* End */

             </style>

<script type="text/javascript">

//SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
	if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
		ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
	else //else if this is a sub level submenu (ul)
	  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
	for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
	ultags[t].style.visibility="visible"
	ultags[t].style.display="none"
	}
  }
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)

</script>






<table>
<tr>
<td valign="top" nowrap>
  <div class="suckerdiv">
  
      <li><a><strong>Menu</strong></a></li>
      <ul id="suckertree1">
       <li><a>Rotas Reservar Excluir seu voo</a>
         <ul>
    <li><a href="<?php echo SITE_URL?>/index.php/Schedules/view">Rotas e Resevas de Voos</a></li>
    <li><a href="<?php echo SITE_URL?>/index.php/Schedules/bids">Consultar Reservas ou Deletar</a></li>
    </ul>
  </li>
      <li><a>Dicas de Rotas p/ FMC e Cartas</a>
        <ul>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/rotas">Rotas Para FMC/FMGC</a></li>
    <li><a href="http://www.aisweb.aer.mil.br/aisweb/" target="_top">Cartas de navegação</a></li>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/routeFinder">Route Finder</a></li>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/frota">Frota</a></li>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/aeronaves">Dados Aeronaves PAx e Cargo</a>  </li>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/metar">Metar</a></li>
  </ul>
  </li>
       <li><a>Ver os Logs</a>
  <ul>
    <li><a href="<?php echo SITE_URL?>/index.php/pireps/mine">Ver Todos os meus Logs</a></li>
    <li><a href="<?php echo SITE_URL?>/index.php/pireps/routesmap">Ver Mapa de todos os Voos</a></li>
    <li><a href="<?php echo SITE_URL?>/index.php/Finances">Ver Sistema Financeiro da VA</a></li>
    <li></li>
    <li><a href="#"></a></li>
    <li><a href="#"></a></li>
   
  </ul>
   </li>
       <li><a>Tutoriais</a>
  <ul>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/tutoriais" target="_blank">Tutoriais</a></li>
        <li><a href="../../aqv/Tutorial_ BRAZILAIR_FSacars_config.INI.zip">FSacars_config</a></li>
            <li><a href="../../aqv/Tutorial-BrazilAir-de-Config_FSPax.zip">Config_FSPax</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/METAR.pdf" target="_blank">Metar</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/TAF.pdf" target="_blank">Taf</a></li>
    <li><a href="http://www.ivaobr.com/home/op_voo/downloads/FOD-00109.rar" target="_blank">Vôo VFR</a></li>
    <li><a href="http://www.ivaobr.com/home/op_voo/downloads/FOD-00209.rar" target="_blank">Vôo IFR</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/transponder.pdf" target="_blank">Transponder</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/direito_de_passagem.pdf" target="_blank" class="sublevel" onclick="javascript: window.open('http://www.ivaobr.com/home/treino/downloads/direito_de_passagem.pdf', '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=850,height=700,left = 215,top = 162'); return false">Direito de passagem</a></li>
    <li><a href="http://www.tamvirtual.net/downloads/navegacao.pdf" target="_blank" class="sublevel">Cálculos de Navegação</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/AOD-00109.pdf" target="_blank">Coordenação  UNICOM</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/fraseologia.pdf" target="_blank">Fraseologia Aeronáutica</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/planodevoo.pdf" target="_blank">Plano de Vôo</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/NDB.pdf" target="_blank">NDB</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/nuvens.pdf" target="_blank">Nuvens</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/IVAP.pdf" target="_blank">IvAp</a></li>
    <li><a href="http://www.ivaobr.com/home/treino/downloads/pressao_e_altimetria.pdf" target="_blank">Pressão e Altimetria</a></li>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/videos" target="_self">Videos</a></li>

   
  </ul>
  </li>
       <li><a>Edit Perfil Senha Avatar  Cont.</a>
         <ul>
    <li><a href="<?php echo SITE_URL ?>/index.php/profile/editprofile">Edit. Email, Sua Foto, Avatar</a></li>  
    <li><a href="<?php echo SITE_URL ?>/index.php/profile/changepassword">Alterar a sua Senha</a></li>
    <li><a href="<?php echo SITE_URL ?>/index.php/profile/editprofile">Visualize o seu imagem avatar aqui</a><a href="<?php echo SITE_URL.SIGNATURE_PATH.'/'.$pilotcode.'.png' ?>"></a></li>
    <li><a href="<?php echo SITE_URL ?>/index.php/pages/contatos">Entre em contatos com a Brazilair</a></li>
  
  </ul>
  </li>
       <li><a>Download dos Arquivos BZS</a>
         <ul>
    <li><a href="<?php echo SITE_URL?>/action.php/acars/fsacarsconfig">Config FSacars.INI </a></li>
        <li><a href="http://www.4shared.com/file/125467277/8824c48c/BZSFSAcars.html" target="_parent">Programa novo Fsacars v5.0.0</a></li>
    <li><a href="<?php echo SITE_URL?>/action.php/acars/fspaxconfig">Config FSPassengers.CFG</a></li>
    <li><a href="<?php echo SITE_URL?>/action.php/acars/xacarsconfig">Config XAcars Config.INI</a></li>
     </ul>
     <li><a>Dow.Texturas Prog.cena.</a>
         <ul>
     <li><a href="<?php echo SITE_URL ?>/index.php/downloads">Downloads de Programas e Texturas</a> </li>
  </ul>

     <li><a href="<?php echo SITE_URL ?>/index.php/pages/regraseplanodecarreira">Regras e Plano de Careira</a></li>
  </ul>
  </ul>
  		<p>
		<strong>Awards</strong>
		<?php
		if(!$allawards)
		{
			echo 'No awards yet';
		}
		else
		{			
		?>
		<ul>
			<?php foreach($allawards as $award){ ?>
			<li><?php echo $award->name ?></li>
                <li><img src="<?php echo $award->image ?>" /></li>
               	<?php } ?>
		</ul>	
		<?php
		}
		?>
	</p>
  
  </div>
</td>
<td valign="top">
	<?php StatsData::PilotAircraftFlownGraph($userinfo->pilotid); ?>
</td>
</tr>
<tr>
  <td colspan="2" valign="top" nowrap><p class="suckerdiv"> </p></td>
  </tr>
</table>
</div>
</div>
<br />

Posted

By the way all, the <select> </select> code ISNT what im looking for,

I need something that will look good/have the same sort of colours as the original menu,

I just need drop down codings or even somebody to do for me? :D

http://fly2there.co.uk/

You can see it there,

Thanks, Thomas ;D

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...