Click here to Skip to main content
15,889,403 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
]ob_start();
include("top.php");
include("tabletop.php");
if ( empty($_SESSION['nick']) AND empty($_SESSION['sifre']) AND empty($_GET["ilan"]) ) {
echo "giriþ yapmadýnýz!";}else{
$ilan=$_GET["ilan"];
$sql=mysql_query("select tur from ilanayrinti$ilan where tur='resim'");
$sayisi=mysql_num_rows($sql);
$sqla=mysql_query("update ilan set resim=$sayisi where id=$ilan");
if($sayisi<=4){
require('ekler/fonksiyonlarim.php');
require('ekler/ayarlarim.php');
$ilan=$_GET["ilan"];

JavaScript
function highlight(field) {
field.focus();
field.select();
}
var maxWidth=100;
var maxHeight=100;
var fileTypes=["jpg","jpeg","gif","png"];
var outImage="previewField";
var defaultPic="spacer.gif";
/***** DO NOT EDIT BELOW *****/
function preview(what){
  var source=what.value;
  var ext=source.substring(source.lastIndexOf(".")+1,source.length).toLowerCase();
  for (var i=0; i<filetypes.length;>  globalPic=new Image();
  if (i<filetypes.length)>  else {
    globalPic.src=defaultPic;
    alert("BU TÜR DOSYALARI YÜKLEYEMEZSÝNÝZ!\n\nÝzin verilen dosya uzantýlarý:\n\n"+fileTypes.join(", "));
  }
  setTimeout("applyChanges()",200);
}
var globalPic;
function applyChanges(){
  var field=document.getElementById(outImage);
  var x=parseInt(globalPic.width);
  var y=parseInt(globalPic.height);
  if (x>maxWidth) {
    y*=maxWidth/x;
    x=maxWidth;
  }
  if (y>maxHeight) {
    x*=maxHeight/y;
    y=maxHeight;
  }
  field.style.display=(x<1 || y<1)?"none":"";
  field.src=globalPic.src;
  field.width=x;
  field.height=y;
}

if($_POST){
require_once ('ekler/posttan.php');
}

<style type="text/css">
<!--
.style5 {color: #CCCCCC}
body,td,th {
	font-size: 10px;
}
-->
</style>
<body>
<center>
<form enctype="multipart/form-data" method="post">
<table width="400" border="0" align="center" height="704">
<tr>
<td align="center" height="1"><b></b></td></tr>
<tr>
  <td align="center" height="8">Yükleyebileceðiniz dosya türleri: .jpg, jpeg, .gif</td>
</tr>

<tr>
  <td height="20" align="center">Yüklenebilir MAXÝMUM Dosya Boyutu :
    <?php $maximum_mb = $azami / 1024 / 1024;<br mode="hold" /?>        echo number_format($maximum_mb, 2, ",", ".");?&gt;
    MB</td>
</tr>
<tr>
  <td align="center" height="21"><input name="resim" type="file" class="file" onchange="preview(this)" size="50"></input></td>
</tr>
<tr>
<select size="0" name="id" style="visibility:hidden;">
                        
                                        echo "<option value="$ilan"></option>";
                        ?&gt;
                        </select><br>
<td align="center" height="25"><input name="gonder" type="submit" class="file" value="Dosya Yolla"></input></td>
</br></tr>
<tr>
  <td height="197" align="center" valign="bottom">
        if($_POST){
if ($boyut &gt;= $azami){
uyari('Dosyanýz çok büyük!');
}
                        if ($resim != "" && $boyut &lt;= $azami){
$uzanti_izinlimi = ptIzinlimi($uzanti);
                                        if ($uzanti_izinlimi == 'evet'){
                                        move_uploaded_file ($_FILES['resim']['tmp_name'], $klasor.$yeniresim) or die ('Dosya kopyalanamýyor');
?&gt;<table width="370" border="0" align="center" class="uyari2">
<tr>
  <td align="center" height="239"><b><a href="&lt;?=$link?&gt;" target="_blank"> <img src="&lt;?=$link?&gt;" alt="&lt;?=$link?&gt;" width="150" border="0"></img></a><br>
    Resim Boyutu =
    
    </br></b>
<br>
<strong class="footer"><b>Resmi gerçek boyutta görmek için üzerine týklayýn...<br><br></br></br></b> </strong>
                                              }
                                        if ($resimismi == ""){
                                        uyari('Dosya Seçin Lütfen!');
                                        }
                                        if ((!$resimismi == "")&&($uzanti_izinlimi == 'hayir')){
                                        uyari('Bu tür dosyalarý yükleyemezsiniz!');
                                        }
                        }
                }
if(!$_POST){
uyari('');
}
?&gt;</br></td>
</tr>
</table></td></tr></table></form>
include("baglanti.php");
$id=$_POST["id"];
if ($resim != "" && $boyut &lt;= $azami){
$sql="insert into ilanayrinti$id(tur,url) values('resim','$link')";
                        $kontrol=mysql_query($sql);
                        if($kontrol)
                        {
                                echo "Resim kayýt iþlemi baþarýlý þekilde yapýldý";
                                $gidilecekYer = "thumb.php?resim=$link&id=$id";
                                header ("Location: " . $gidilecekYer);
                                echo "<br>";
                        }
                        else
                        {
                                die(mysql_error());
                                echo "Resim kayýt iþlemi yapýlýrken hata oluþtu. Lütfen tekrar deneyiniz.";
                                echo "<br>";
                        }
?&gt;

                                                {{
  [B][U]                              else                 {[/U][/B]

                        echo "Son Eklediðiniz Resimde Yüklenmiþtir. Baska Resim Yükleyemezsiniz. Bir Ýlana En Fazla 5 Adet Resim Yükleyebilirsiniz. Resim Yükleme Limitiniz Dolmuþtur!";
                        }
                        include("tabloalt.php");
                        include("alt.php");
                        }

this is "real estate site" and People must to add house's picture. But [B]BOLD[/B] and [U]UNDELİNE[/U] code is problem..

what can I do ?
thanks
Posted
Updated 11-Jul-10 2:19am
v2
Comments
Sandeep Mewara 11-Jul-10 8:19am    
Instead of pasting whole lot of code, you should drop couple of lines that throws the error and add what error you get. Details about the error would help more.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900