      <div id="sidebar_right">
   	  	<div id="kosar_tartalma_box">
        	<div id="kosar_top">
            	<img src="images/page/kosar_blokk_top_bg.png" width="168" height="21" />
            </div>
            <div id="kosar_content">
            	<p class="right_blokk_title">Kosár tartalma</p>
                <form action="index.php?page=megerosit" method="POST">
                <table align="center" border="0">
                  <?php			  
				  
                  $osszeg = 0;
                  
                  if ($belepve == 0) 
                  {
                    $sql = "SELECT * FROM kosar WHERE session_id='" . session_id() . "' AND rendeles_id=0";
                  }
                  else 
                  {
                    $sql = "SELECT * FROM kosar WHERE ugyfel_id=$webshop_id AND rendeles_id=0";
                  }
                
                  $eredmeny = mysql_query($sql);
                  
                  $sorok = 0;
                  
                  while ($sor = mysql_fetch_array($eredmeny)) 
                  {
                    $sorok += 1;
                    $termek_id = $sor["termek_id"];
                    $db = $sor["mennyiseg"];
                    $kosar_id = $sor["id"];

					$parancs = "SELECT * FROM termekek WHERE id=$termek_id";
					  
                    $rs = mysql_query($parancs);
                
                    if (mysql_num_rows($rs) > 0) 
					{
                      $egysor = mysql_fetch_array($rs);
                      $nev = $egysor["nev"];
					  $ar = $egysor["ar"];
					  $egyseg = $egysor["egyseg"];
                      $osszeg += $db * $ar;
                      ?>
                      <tr>
                        <td align="center" colspan="2">
                          <table>
                            <tr>
                              <td class="termek"><?php echo $nev?></td>
                              <td class="delete">
                                <a href="kosarba.php?torolni=1&azonosit=<?php echo $kosar_id?>">
                                <img src="images/page/delete.png" />
                                </a>
                              </td>
                            </tr>
                            <tr>
                              <td class="darab"><?php echo $db?> <?php echo $egyseg ?></td>
                              <td class="ar"><?php echo szampontos($db * $ar)?> Ft</td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      <?php
                    }
                  }
                  
                  if ($sorok > 0)
                  {
                  ?>
                    <tr>
                      <td class="ossz">Összesen: </td>
                      <td class="vegossz"><?php echo szampontos($osszeg)?> Ft</td>
                    </tr>   
					<?php
                    if ($belepve == 1) 
                    {
                    ?>
                      <tr>
                        <td colspan="2" align="center"><input type="image" src="images/button/megrendel.png" onClick="location='index.php?page=megerosit'"></td>
                      </tr>
                    <?php
                    }
                    else
                    {
                    ?>
                      <tr>
                        <td colspan="2" align="center"><input type="image" src="images/button/megrendel.png" onClick="alert('A vásárlás befejezése előtt be kell jelentkezned!')"></td>
                      </tr>
                    <?php
                    }
                  }
                  else 
                  {
                  ?>
                    <tr>
                      <td colspan="2" align="center"><br /><strong>A kosár üres.</strong><br /></td>
                    </tr>
                    <?php
                  }
                  ?>
                </table>
                    
            </div>
            <div id="kosar_bottom">
            	<img src="images/page/kosar_blokk_bottom_bg.png" width="168" height="21" />
            </div>
        <!-- END: #kosar_tartalma --></div>
      <!-- END: #sidebar_right --></div>