Reply to PHP MULTI IMAGES SEND AND DISPLAY

Your name:

Reply:


Posted by titecs on 12/11/06 10:11

Hi

How I to send downstairs code to server ın the form of multı ımages
and How I dısplay this form ın the web

resim(turkish)=picture(english)

one picture send
picture_add.php

$resim = "";
if($_FILES['resim']['name'] !== ""){
//$uploaddir =
"/home/httpd/vhosts/web-dizayn.com/httpdocs/emlak/emlak1/eml_img/";
$uploaddir =
"/usr/hosts/karegen.com/1361/ilanediyorum.com/web/eml_img/";
$resim = $_FILES['resim']['name'];
$resim_isim_1 = Array(i,g,G,ü,Ü,s,S,I,ö,Ö,ç,Ç);
$resim_isim_2 = Array(i,g,G,u,U,s,S,I,o,O,c,C);
for($d=0; $d<count($resim_isim_1); $d++){
$resim = ereg_replace($resim_isim_1[$d], $resim_isim_2[$d],
$resim);
}

$uploadfile = $uploaddir.$resim;

move_uploaded_file($_FILES['resim']['tmp_name'], $uploadfile);

$filename = $uploadfile;
$source = imagecreatefromjpeg($filename);
$thumbX = "135";
$thumbY = "100";
$imageX = imagesx($source);
$imageY = imagesy($source);
$dest = imagecreatetruecolor($thumbX, $thumbY);
imagecopyresampled ($dest, $source, 0, 0, 0, 0, $thumbX, $thumbY,
$imageX, $imageY);
imagejpeg($dest, "../eml_img/thumb_".$resim);
//imagejpeg($dest);
imagedestroy($dest);
imagedestroy($source);

}


database.sql

--
-- Tablo yapısı: `emlak_emlaklar_arsa`
--

CREATE TABLE `emlak_emlaklar_arsa` (
`emlak_id` int(5) NOT NULL AUTO_INCREMENT,
`tur` varchar(20) NOT NULL DEFAULT '',
`il` int(3) NOT NULL DEFAULT '0',
`ilce` varchar(50) NOT NULL DEFAULT '',
`semt` varchar(30) NOT NULL DEFAULT '',
`fiyat` bigint(15) NOT NULL DEFAULT '0',
`alan` int(6) NOT NULL DEFAULT '0',
`aciklama` text NOT NULL,
`ekstra` text NOT NULL,
`resim` varchar(30) NOT NULL DEFAULT '',
`KS` int(1) NOT NULL DEFAULT '0',
`kur` varchar(5) NOT NULL DEFAULT '',
`tip` varchar(20) NOT NULL DEFAULT 'Arsa',
PRIMARY KEY (`emlak_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin5 AUTO_INCREMENT=1 ;

--
-- Tablo döküm verisi `emlak_emlaklar_arsa`
--


index.php

<?php
include "baglan.php";
include "ilan_no.php";
include "ayarlar.php";

$baglan = @fopen("$dosya", 'r');
$dosya_boyutu = @filesize($dosya);
$duyurular = @fread($baglan, $dosya_boyutu);
@fclose($baglan);

if(strlen($duyurular) > 0){
$duyuru_veri = explode(";ß;", $duyurular);
$duyuru_baslik = $duyuru_veri[0];
$duyuru_yazi = $duyuru_veri[1];
$duyuru_yazi = stripslashes($duyuru_yazi);
}


$strSQL = "SELECT İstanbul FROM emlak_iller";
$sorgu = mysql_query($strSQL);

$strSQL = "SELECT * FROM emlak_son_eklenenler";
$sorgu2 = mysql_query($strSQL);

$son_toplam = mysql_num_rows($sorgu2);

if($son_toplam > 0){
if($son_toplam > 0){
$son_1_kat_id = @mysql_result($sorgu2, $son_toplam - 1, "kat_id");
$son_1_emlak_id = @mysql_result($sorgu2, $son_toplam - 1, "emlak_id");
}
if($son_toplam > 1){
$son_2_kat_id = @mysql_result($sorgu2, $son_toplam - 2, "kat_id");
$son_2_emlak_id = @mysql_result($sorgu2, $son_toplam - 2, "emlak_id");
}
if($son_toplam > 2){
$son_3_kat_id = @mysql_result($sorgu2, $son_toplam - 3, "kat_id");
$son_3_emlak_id = @mysql_result($sorgu2, $son_toplam - 3, "emlak_id");
}
if($son_toplam > 3){
$son_4_kat_id = @mysql_result($sorgu2, $son_toplam - 4, "kat_id");
$son_4_emlak_id = @mysql_result($sorgu2, $son_toplam - 4, "emlak_id");
}

if($son_toplam > 0){
$strSQL = "SELECT * FROM emlak_kategoriler WHERE kat_id =
'$son_1_kat_id'";
$sorgu3 = mysql_query($strSQL);

$tablo1 = "emlak_emlaklar_".mysql_result($sorgu3, 0, "kat_tablo");
}

if($son_toplam > 1){
$strSQL = "SELECT * FROM emlak_kategoriler WHERE kat_id =
'$son_2_kat_id'";
$sorgu3 = mysql_query($strSQL);

$tablo2 = "emlak_emlaklar_".mysql_result($sorgu3, 0, "kat_tablo");
}

if($son_toplam > 2){
$strSQL = "SELECT * FROM emlak_kategoriler WHERE kat_id =
'$son_3_kat_id'";
$sorgu3 = mysql_query($strSQL);

$tablo3 = "emlak_emlaklar_".mysql_result($sorgu3, 0, "kat_tablo");
}

if($son_toplam > 3){
$strSQL = "SELECT * FROM emlak_kategoriler WHERE kat_id =
'$son_4_kat_id'";
$sorgu3 = mysql_query($strSQL);

$tablo4 = "emlak_emlaklar_".mysql_result($sorgu3, 0, "kat_tablo");
}

if($son_toplam > 0){
$strSQL = "SELECT * FROM $tablo1 WHERE emlak_id = '$son_1_emlak_id'";
$sorgu4 = mysql_query($strSQL);
$resim1 = @mysql_result($sorgu4, 0, "resim");
$tip1 = @mysql_result($sorgu4, 0, "tur");
$tip1 = $tip1." ".mysql_result($sorgu4, 0, "tip");
$il1 = @mysql_result($sorgu4, 0, "il");
$ilce1 = @mysql_result($sorgu4, 0, "ilce");
$semt1 = @mysql_result($sorgu4, 0, "semt");
$kur1 = @mysql_result($sorgu4, 0, "kur");

if($son_1_kat_id !== "5"){
$alan1 = @mysql_result($sorgu4, 0, "alan");
$alan_karakter = strlen($alan1);
$alan_dongu = floor(($alan_karakter-1)/3);
$alan_bastan = $alan_karakter - ($alan_dongu*3);
$alan_son = substr($alan1, 0, $alan_bastan);
for($i = 1; $i <= $alan_dongu; $i++){
$alan_son = $alan_son.".".substr($alan1,
((($i-1)*3)+$alan_bastan),
3);
}
$alan1 = $alan_son."m²";
}else{
$alan1 = "";
}

if($resim1 == ""){
$resim1 = "resim_yok.jpg";
}


$fiyat1 = @mysql_result($sorgu4, 0, "fiyat");


if(strlen($fiyat1) > 9 && intval(substr($fiyat1, -9, 9)) == 0){

$kalan_karakter = strlen($fiyat1) - 9;
$bastan_fiyati = substr($fiyat1, 0, $kalan_karakter);
$fiyat_son = $bastan_fiyati." Milyar";
}else{

$fiyat_karakter = strlen($fiyat1);
$fiyat_dongu = floor(($fiyat_karakter-1)/3);
$fiyat_bastan = $fiyat_karakter - ($fiyat_dongu*3);
$fiyat_son = substr($fiyat1, 0, $fiyat_bastan);
for($i = 1; $i <= $fiyat_dongu; $i++){
$fiyat_son = $fiyat_son.".".substr($fiyat1,
((($i-1)*3)+$fiyat_bastan), 3);
}
}
$fiyat1 = $fiyat_son;


$strSQL = "SELECT il FROM emlak_iller WHERE ilkod = '$il1'";
$sorgu5 = mysql_query($strSQL);
$il1_1 = @mysql_result($sorgu5, 0, "il");
$yer1 = $il1_1." / ".$ilce1." / ".$semt1;
}

if($son_toplam > 1){
$strSQL = "SELECT * FROM $tablo2 WHERE emlak_id = '$son_2_emlak_id'";
$sorgu4 = mysql_query($strSQL);
$resim2 = @mysql_result($sorgu4, 0, "resim");
$tip2 = @mysql_result($sorgu4, 0, "tur");
$tip2 = $tip2." ".mysql_result($sorgu4, 0, "tip");
$il2 = @mysql_result($sorgu4, 0, "il");
$ilce2 = @mysql_result($sorgu4, 0, "ilce");
$semt2 = @mysql_result($sorgu4, 0, "semt");
$kur2 = @mysql_result($sorgu4, 0, "kur");

if($son_2_kat_id !== "5"){
$alan2 = @mysql_result($sorgu4, 0, "alan");
$alan_karakter = strlen($alan2);
$alan_dongu = floor(($alan_karakter-1)/3);
$alan_bastan = $alan_karakter - ($alan_dongu*3);
$alan_son = substr($alan2, 0, $alan_bastan);
for($i = 1; $i <= $alan_dongu; $i++){
$alan_son = $alan_son.".".substr($alan2,
((($i-1)*3)+$alan_bastan),
3);
}
$alan2 = $alan_son."m²";
}else{
$alan2 = "";
}

if($resim2 == ""){
$resim2 = "resim_yok.jpg";
}


$fiyat2 = @mysql_result($sorgu4, 0, "fiyat");

if(strlen($fiyat2) > 9 && intval(substr($fiyat2, -9, 9)) == 0){

$kalan_karakter = strlen($fiyat2) - 9;
$bastan_fiyati = substr($fiyat2, 0, $kalan_karakter);
$fiyat_son = $bastan_fiyati." Milyar";
}else{

$fiyat_karakter = strlen($fiyat2);
$fiyat_dongu = floor(($fiyat_karakter-1)/3);
$fiyat_bastan = $fiyat_karakter - ($fiyat_dongu*3);
$fiyat_son = substr($fiyat2, 0, $fiyat_bastan);
for($i = 1; $i <= $fiyat_dongu; $i++){
$fiyat_son = $fiyat_son.".".substr($fiyat2,
((($i-1)*3)+$fiyat_bastan), 3);
}
}
$fiyat2 = $fiyat_son;

$strSQL = "SELECT il FROM emlak_iller WHERE ilkod = '$il2'";
$sorgu5 = mysql_query($strSQL);
$il2_1 = @mysql_result($sorgu5, 0, "il");
$yer2 = $il2_1." / ".$ilce2." / ".$semt2;
}

if($son_toplam > 2){
$strSQL = "SELECT * FROM $tablo3 WHERE emlak_id = '$son_3_emlak_id'";
$sorgu4 = mysql_query($strSQL);
$resim3 = @mysql_result($sorgu4, 0, "resim");
$tip3 = @mysql_result($sorgu4, 0, "tur");
$tip3 = $tip3." ".mysql_result($sorgu4, 0, "tip");
$il3 = @mysql_result($sorgu4, 0, "il");
$ilce3 = @mysql_result($sorgu4, 0, "ilce");
$semt3 = @mysql_result($sorgu4, 0, "semt");
$kur3 = @mysql_result($sorgu4, 0, "kur");

if($son_3_kat_id !== "5"){
$alan3 = @mysql_result($sorgu4, 0, "alan");
$alan_karakter = strlen($alan3);
$alan_dongu = floor(($alan_karakter-1)/3);
$alan_bastan = $alan_karakter - ($alan_dongu*3);
$alan_son = substr($alan3, 0, $alan_bastan);
for($i = 1; $i <= $alan_dongu; $i++){
$alan_son = $alan_son.".".substr($alan3,
((($i-1)*3)+$alan_bastan),
3);
}
$alan3 = $alan_son."m²";
}else{
$alan3 = "";
}

if($resim3 == ""){
$resim3 = "resim_yok.jpg";
}


$fiyat3 = @mysql_result($sorgu4, 0, "fiyat");

if(strlen($fiyat3) > 9 && intval(substr($fiyat3, -9, 9)) == 0){

$kalan_karakter = strlen($fiyat3) - 9;
$bastan_fiyati = substr($fiyat3, 0, $kalan_karakter);
$fiyat_son = $bastan_fiyati." Milyar";
}else{

$fiyat_karakter = strlen($fiyat3);
$fiyat_dongu = floor(($fiyat_karakter-1)/3);
$fiyat_bastan = $fiyat_karakter - ($fiyat_dongu*3);
$fiyat_son = substr($fiyat3, 0, $fiyat_bastan);
for($i = 1; $i <= $fiyat_dongu; $i++){
$fiyat_son = $fiyat_son.".".substr($fiyat3,
((($i-1)*3)+$fiyat_bastan), 3);
}
}
$fiyat3 = $fiyat_son;

$strSQL = "SELECT il FROM emlak_iller WHERE ilkod = '$il3'";
$sorgu5 = mysql_query($strSQL);
$il3_1 = @mysql_result($sorgu5, 0, "il");
$yer3 = $il3_1." / ".$ilce3." / ".$semt3;
}

if($son_toplam > 3){
$strSQL = "SELECT * FROM $tablo4 WHERE emlak_id = '$son_4_emlak_id'";
$sorgu4 = mysql_query($strSQL);
$resim4 = @mysql_result($sorgu4, 0, "resim");
$tip4 = @mysql_result($sorgu4, 0, "tur");
$tip4 = $tip4." ".mysql_result($sorgu4, 0, "tip");
$il4 = @mysql_result($sorgu4, 0, "il");
$ilce4 = @mysql_result($sorgu4, 0, "ilce");
$semt4 = @mysql_result($sorgu4, 0, "semt");
$kur4 = @mysql_result($sorgu4, 0, "kur");

if($son_4_kat_id !== "5"){
$alan4 = @mysql_result($sorgu4, 0, "alan");
$alan_karakter = strlen($alan4);
$alan_dongu = floor(($alan_karakter-1)/3);
$alan_bastan = $alan_karakter - ($alan_dongu*3);
$alan_son = substr($alan4, 0, $alan_bastan);
for($i = 1; $i <= $alan_dongu; $i++){
$alan_son = $alan_son.".".substr($alan4,
((($i-1)*3)+$alan_bastan),
3);
}
$alan4 = $alan_son."m²";
}else{
$alan4 = "";
}

if($resim4 == ""){
$resim4 = "resim_yok.jpg";
}


$fiyat4 = @mysql_result($sorgu4, 0, "fiyat");

if(strlen($fiyat4) > 9 && intval(substr($fiyat4, -9, 9)) == 0){

$kalan_karakter = strlen($fiyat4) - 9;
$bastan_fiyati = substr($fiyat4, 0, $kalan_karakter);
$fiyat_son = $bastan_fiyati." Milyar";
}else{

$fiyat_karakter = strlen($fiyat4);
$fiyat_dongu = floor(($fiyat_karakter-1)/3);
$fiyat_bastan = $fiyat_karakter - ($fiyat_dongu*3);
$fiyat_son = substr($fiyat4, 0, $fiyat_bastan);
for($i = 1; $i <= $fiyat_dongu; $i++){
$fiyat_son = $fiyat_son.".".substr($fiyat4,
((($i-1)*3)+$fiyat_bastan), 3);
}
}
$fiyat4 = $fiyat_son;

$strSQL = "SELECT il FROM emlak_iller WHERE ilkod = '$il4'";
$sorgu5 = mysql_query($strSQL);
$il4_1 = @mysql_result($sorgu5, 0, "il");
$yer4 = $il4_1." / ".$ilce4." / ".$semt4;
}

}


$ilan_no1 = ilan_no($son_1_kat_id, $son_1_emlak_id);
$ilan_no2 = ilan_no($son_2_kat_id, $son_2_emlak_id);
$ilan_no3 = ilan_no($son_3_kat_id, $son_3_emlak_id);
$ilan_no4 = ilan_no($son_4_kat_id, $son_4_emlak_id);

?>
<table width="742" border="0" align="center" class="sol_sag_alt"
cellpadding="0" cellspacing="0">
<tr>
<td width="150" bgcolor="#EBEEE5" valign="top">
<? include "sol_menu.inc" ?>
</td>
<td width="460" height="100%" bgcolor="#D8DDCF" valign="top"
align="center">



<TABLE width="100%" height="100%" border="0" cellspacing="0"
cellpadding="1" class="sol_sag">

<TR>
<TD valign="top">
<br>
<center><b>SON EKLENEN 4 EMLAK</b></center>
<br>
<? if($son_toplam > 0){ ?>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td rowspan="5" align="right" bgcolor="#FFFFFF" width="135"><a
href="emlak_detay.php?kat=<?=$son_1_kat_id?>&eml=<?=$son_1_emlak_id?>"><IMG
SRC="eml_img/thumb_<?=$resim1?>" width="135" height="100"
BORDER="0"></a></td>
<td bgcolor="#F4F4F4"><b>İlan No</b></td>
<td bgcolor="#FFFFFF"><?=$ilan_no1?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Emlak Tipi</b></td>
<td bgcolor="#FFFFFF"><?=$tip1?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>İl/İlçe/Semt</b></td>
<td bgcolor="#FFFFFF"><?=$yer1?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Alan(m²)</b></td>
<td bgcolor="#FFFFFF"><?=$alan1?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Fiyat</b></td>
<td bgcolor="#FFFFFF"><?=$fiyat1?> <?=$kur1?></td>
</tr>
<tr>
<span class="kirmizi"><td bgcolor="#FFFFFF" colspan="3"
align="right" height="20"><b><a
href="emlak_detay.php?kat=<?=$son_1_kat_id?>&eml=<?=$son_1_emlak_id?>">Detaylı
Bilgi</a>&nbsp;&nbsp;</b></td></span>
</tr>
</table>
<br>
</TD>
</TR>

<TR>
<TD valign="top">
<? if($son_toplam > 1){ ?>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td rowspan="5" align="right" bgcolor="#FFFFFF" width="135"><a
href="emlak_detay.php?kat=<?=$son_2_kat_id?>&eml=<?=$son_2_emlak_id?>"><IMG
SRC="eml_img/thumb_<?=$resim2?>" width="135" height="100"
BORDER="0"></a></td>
<td bgcolor="#F4F4F4"><b>İlan No</b></td>
<td bgcolor="#FFFFFF"><?=$ilan_no2?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Emlak Tipi</b></td>
<td bgcolor="#FFFFFF"><?=$tip2?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>İl/İlçe/Semt</b></td>
<td bgcolor="#FFFFFF"><?=$yer2?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Alan(m²)</b></td>
<td bgcolor="#FFFFFF"><?=$alan2?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Fiyat</b></td>
<td bgcolor="#FFFFFF"><?=$fiyat2?> <?=$kur2?></td>
</tr>
<tr>
<span class="kirmizi"><td height="20" bgcolor="#FFFFFF" colspan="3"
align="right"><b><a
href="emlak_detay.php?kat=<?=$son_2_kat_id?>&eml=<?=$son_2_emlak_id?>">Detaylı
Bilgi</a>&nbsp;&nbsp;</b></td></span>
</tr>
</table>
<? } ?>
<br>
</TD>
</TR>

<TR>
<TD valign="top">
<? if($son_toplam > 2){ ?>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td rowspan="5" align="right" bgcolor="#FFFFFF" width="135"><a
href="emlak_detay.php?kat=<?=$son_3_kat_id?>&eml=<?=$son_3_emlak_id?>"><IMG
SRC="eml_img/thumb_<?=$resim3?>" width="135" height="100"
BORDER="0"></a></td>
<td bgcolor="#F4F4F4"><b>İlan No</b></td>
<td bgcolor="#FFFFFF"><?=$ilan_no3?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Emlak Tipi</b></td>
<td bgcolor="#FFFFFF"><?=$tip3?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>İl/İlçe/Semt</b></td>
<td bgcolor="#FFFFFF"><?=$yer3?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Alan(m²)</b></td>
<td bgcolor="#FFFFFF"><?=$alan3?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Fiyat</b></td>
<td bgcolor="#FFFFFF"><?=$fiyat3?> <?=$kur3?></td>
</tr>
<tr>
<span class="kirmizi"><td height="20" bgcolor="#FFFFFF" colspan="3"
align="right"><b><a
href="emlak_detay.php?kat=<?=$son_3_kat_id?>&eml=<?=$son_3_emlak_id?>">Detaylı
Bilgi</a>&nbsp;&nbsp;</b></td></span>
</tr>
</table>
<? } ?>
<br>
</TD>
</TR>

<TR>
<TD valign="top">
<? if($son_toplam > 3){ ?>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td rowspan="5" align="right" bgcolor="#FFFFFF" width="135"><a
href="emlak_detay.php?kat=<?=$son_4_kat_id?>&eml=<?=$son_4_emlak_id?>"><IMG
SRC="eml_img/thumb_<?=$resim4?>" width="135" height="100"
BORDER="0"></a></td>
<td bgcolor="#F4F4F4"><b>İlan No</b></td>
<td bgcolor="#FFFFFF"><?=$ilan_no4?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Emlak Tipi</b></td>
<td bgcolor="#FFFFFF"><?=$tip4?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>İl/İlçe/Semt</b></td>
<td bgcolor="#FFFFFF"><?=$yer4?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Alan(m²)</b></td>
<td bgcolor="#FFFFFF"><?=$alan4?></td>
</tr>
<tr>
<td bgcolor="#F4F4F4"><b>Fiyat</b></td>
<td bgcolor="#FFFFFF"><?=$fiyat4?> <?=$kur4?></td>
</tr>
<tr>
<span class="kirmizi"><td height="20" bgcolor="#FFFFFF" colspan="3"
align="right"><b><a
href="emlak_detay.php?kat=<?=$son_4_kat_id?>&eml=<?=$son_4_emlak_id?>">Detaylı
Bilgi</a>&nbsp;&nbsp;</b></td></span>
</tr>
</table>
<? } ?>
<? } ?>
<br>
</TD>
</TR>

<TR>
<TD>
<? if(strlen($duyurular) > 0){ ?>
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4">
<TR>
<TD bgcolor="#F4F4F4"><b><?=$duyuru_baslik?></b></TD>
</TR>
<TR>
<TD bgcolor="#FFFFFF"><?=$duyuru_yazi?></TD>
</TR>
</TABLE>
<? } ?>
<br>
</TD>
</TR>

</TABLE>
</td>
<td width="135" bgcolor="#EBEEE5" valign="top">
<? include "sag_menu.inc" ?>
</td>
</tr>
</table>
</body>
</html>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация