<?php 
	function trle($linklink) {
$turkce=array('ç','ğ','ı','İ','ö','ş','ü',' ','S','A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','W','V','Y','Z','/',':','[',']',')','(','\'','\\','.','?');
	$ingilizce=array('c','g','i','i','o','s','u','-','s','a','b','c','c','d','e','f','g','g','h','i','i','j','k','l','m','n','o','o','p','r','s','s','t','u','u','w','v','y','z','-','-','','','','','_','','','');

$linklink = str_replace($turkce,$ingilizce,$linklink);
return strtolower($linklink);
}

?>
   <tr>             
   </table>
   <p>&nbsp;</p></td>
     <td width="1%" valign="top">&nbsp;</td>
        <td width="79%" valign="top"><table width="50%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><img src="resim/cizgi1.gif" width="701" height="4"></td>
            </tr>
            <tr>
              <td height="1048" bgcolor="#FFFFFF" style="border-left:1px solid #78a4cb;border-right:1px solid #78a4cb;"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
                <tr>
		<?
		$sorgu=mysql_query("SELECT id,ad,mesaj1 FROM z_urun WHERE (durum='a') order by sira "); 
		$sno=0; 

		while ($satir=mysql_fetch_array($sorgu)){ 
		$sno++;
		$resimx=mysql_fetch_assoc(mysql_query("SELECT * FROM z_resim WHERE (kayit_id='$satir[id]') and (durum='a') order by ana desc limit 1 "));
		if ($resimx) {
			$resim='<img src="urun-resim/'.$resimx[resim].'" width="80" height="120" border="0" align="right" />';
		} else {
			$resim='<img src="urun-resim/yok-1.gif" width="80" height="120" border="0" alt="'.$satir[ad].'" align="left" />';
		}
		
		?>
		<?if($sno <=2){?>
		
 <td width="33%" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
						  <td width="1"><img src="resim/t1.gif" width="6" height="27"></td>
						  <td width="100%" align="center" background="resim/t2.gif" class="arial"><a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><?=$satir[ad]?></a></td>
						   <td width="1"><img src="resim/t3.gif" width="6" height="27"></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
		<td height="100" valign="top" class="gecis1"><a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><?=$resim;?></a>
        <div style="font-size:11px; color:#8a644e; text-align:center"><b><?=$satir[ad]?></b></div>
		<p><br>
		<?=$satir[mesaj1];?></p>
        <p><a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><img src="/resim/detay.gif" height="17" width="83" border="0"></a>
	       <a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><img src="/resim/siparis.gif" height="17" width="83" border="0" /></a></p></td>
                    </tr>
                    <tr>
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="1"><img src="resim/t4.gif" width="6" height="6"></td>
                            <td width="100%" background="resim/t5.gif"></td>
                            <td width="1"><img src="resim/t6.gif" width="6" height="6"></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table></td>		  
				  
			<?}?>
			 
		<?if($sno==3){?>
		
		   <tr>
           <td valign="top">&nbsp;</td>
		   <td valign="top">&nbsp;</td>
		   <td valign="top">&nbsp;</td>
           </tr>
		   <tr>
		   <td height="233" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		   <tr>
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="1"><img src="resim/t1.gif" width="6" height="27"></td>
							<td width="100%" align="center" background="resim/t2.gif" class="arial"><a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><?=$satir[ad]?></a></td>
							<td width="1"><img src="resim/t3.gif" width="6" height="27"></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
					<td height="100" valign="top" class="gecis1"><a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><?=$resim;?></a>
        <div style="font-size:11px; color:#8a644e; text-align:center"><b><?=$satir[ad]?></b></div>
		<p><br>
		<?=$satir[mesaj1];?></p>
        <p><a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><img src="/resim/detay.gif" height="17" width="83" border="0"></a>
	       <a href="urun-<?=trle($satir[ad]);?>-<?=$satir[id]?>.html" title="<?=$satir[ad]?>"><img src="/resim/siparis.gif" height="17" width="83" border="0" /></a></p></td>
                    </tr>
					<tr>
                        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="1"><img src="resim/t4.gif" width="6" height="6"></td>
                              <td width="100%" background="resim/t5.gif"></td>
                              <td width="1"><img src="resim/t6.gif" width="6" height="6"></td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                   </tr>				  
		
		<?$sno=0;}?>
		<? } ?>
		
		<td valign="top">&nbsp;</td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td><img src="resim/cizgi2.gif" width="701" height="4"></td>
            </tr>
        </table></td>
      </tr>

    </table></td>
		</tr>