• Hello all, i have a code

    display.php

    <?php
    
    /*
    Template Name: display
    */
    
    ?>
    <head>
    <?php
    function getActive($info)
    {
    	if (isset($_GET['info'])) {
    		if ($info == 'auto') return 'active';
    		return '';
    	}
    	if ($info == $_GET['info']) return 'active';
    	switch($_GET['info']){
    		case 'auto':
    		case 'user':
    			return '';
    		break;
    		default:
    			if ($info == 'auto') return '';
    		break;
    	}
    
    }
    ?>
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="<?php bloginfo('template_url') ?>/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
    <link type="text/css" rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/bootstrap/css/bootstrap.css" />
    <link type="text/css" rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/bootstrap/css/mano.css" />
    <link type="text/css" rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" />
    </head>
    <script type="text/javascript" src="<?php bloginfo('template_directory') ?>/bootstrap/js/bootstrap.min.js"></script> <!-- tabui -->
    <script type="text/javascript" src="<?php bloginfo('template_directory') ?>/bootstrap/js/bootstrap-tab.js"></script> <!-- tabui -->
    <html>
    <?php
     global $theme; get_header(); ?>
    
        <div id="main">
    
            <?php $theme->hook('main_before'); ?>
    
            <div id="content">
    
                <?php $theme->hook('content_before'); ?>
    <?php
    $con = mysql_connect("localhost","mariuse3","marius");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db("rating2", $con);
    
    $result = mysql_query("SELECT * FROM bandau WHERE   ID = (SELECT MAX(ID)  FROM bandau)");
    
    while($row = mysql_fetch_array($result))
      {
    
      ?>
      <div class="marke">
      <?php
       echo $row['modelis']
       ?>
       </div>
     <img src="<?php echo "/". bloginfo('template_url') . $row['image']; ?>"  width="450" height="350" />
     <br>
    <br>
       <body>
       <div id="lenteles">
    <div class="tabbable"> <!-- Only required for left/right tabs -->
        <ul class="nav nav-tabs">
    		<li class="<?php  echo getActive('auto') ?>"><a href="#tab1" data-toggle="tab">Automobilio informacija</a></li>
    		<li class="<?php  echo getActive('user') ?>"><a href="#tab2" data-toggle="tab">Vartotojo informacija</a></li>
        </ul>
        <div class="tab-content">
    		<div class="tab-pane <?php  echo getActive('auto') ?>" id="tab1">
    		<form action="display.php" method="get">
    			<input type="hidden" value="auto" name="info" />
    				<table class="table table-bordered">
    				<?php
    					echo "<br><b>Marke: </b>". $row['marke'] ."<br><b>modelis: </b>". $row['modelis'] . "<br> " ."<b>kategorija: </b>" .$row['kategorija'];
    					echo "<br />";
    				?>
    				</table>
    		</form>
    	</div>
    	<div class="tab-pane <?php echo getActive('user') ?>" id="tab2">
    		<form action="display.php" method="get">
    					 <input type="hidden" value="user" name="info" />
       				<?php
    					echo "<br><b>Marke: </b>". $row['marke'] ."<br><b>modelis: </b>". $row['modelis'] . "<br> " ."<b>kategorija: </b>" .$row['kategorija'] ." bandau" ;
    					echo "<br />";
    				?>
    				</table>
    			</form>
    		</div>
    		</div>
    </div>
    </div>
    
       </body>
      <?php
    
      }
    
    mysql_close($con);
    
    ?>
    
     <a href="<?php bloginfo('template_url'); ?>/index.php"></a>
                <?php $theme->hook('content_after'); ?>
    
            </div><!-- #content -->
    
            <?php get_sidebars(); ?>
    
            <?php $theme->hook('main_after'); ?>
    
        </div><!-- #main -->
    
    <?php get_footer(); ?>
    </html>

    And i think my problem is somewhere here:

    <div id="lenteles">
    <div class="tabbable"> <!-- Only required for left/right tabs -->
        <ul class="nav nav-tabs">
    		<li class="<?php  echo getActive('auto') ?>"><a href="#tab1" data-toggle="tab">Automobilio informacija</a></li>
    		<li class="<?php  echo getActive('user') ?>"><a href="#tab2" data-toggle="tab">Vartotojo informacija</a></li>
        </ul>
        <div class="tab-content">
    		<div class="tab-pane <?php  echo getActive('auto') ?>" id="tab1">
    		<form action="display.php" method="get">
    			<input type="hidden" value="auto" name="info" />
    				<table class="table table-bordered">
    				<?php
    					echo "<br><b>Marke: </b>". $row['marke'] ."<br><b>modelis: </b>". $row['modelis'] . "<br> " ."<b>kategorija: </b>" .$row['kategorija'];
    					echo "<br />";
    				?>
    				</table>
    		</form>
    	</div>
    	<div class="tab-pane <?php echo getActive('user') ?>" id="tab2">
    		<form action="display.php" method="get">
    					 <input type="hidden" value="user" name="info" />
       				<?php
    					echo "<br><b>Marke: </b>". $row['marke'] ."<br><b>modelis: </b>". $row['modelis'] . "<br> " ."<b>kategorija: </b>" .$row['kategorija'] ." bandau" ;
    					echo "<br />";
    				?>
    				</table>
    			</form>
    		</div>
    		</div>
    </div>
    </div>

    Please, help me ??

  • The topic ‘wordpress menu tab’ is closed to new replies.