- <?php
-
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"];
-
-
?>
-
<script type="text/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; i++) if (fileTypes[i]==ext) break;
-
globalPic=new Image();
-
if (i<fileTypes.length) globalPic.src=source;
-
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;
-
}
-
</script>
-
<?php
-
if($_POST){
-
require_once ('ekler/posttan.php');
-
}
-
?>
-
<style type="text/css">
-
<!--
-
.style5 {color: #CCCCCC}
-
body,td,th {
-
font-size: 10px;
-
}
-
-->
-
</style>
-
</head>
-
<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><font size=1 color="#0099FF"><?=$baslik;?><font></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;
-
echo number_format($maximum_mb, 2, ",", ".");?>
-
MB</td>
-
</tr>
-
-
<tr>
-
<td align=center height="21"><input name=resim type=file class="file" onChange="preview(this)" size="50"></td>
-
</tr>
-
-
<tr>
-
<select size="0" name="id" style="visibility:hidden;">
-
<?php
-
-
echo "<option value='$ilan'></option>";
-
-
?>
-
</select><br>
-
<td align=center height="25"><input name=gonder type=submit class="file" value="Dosya Yolla"></td>
-
</tr>
-
<tr>
-
<td height="197" align=center valign="bottom">
-
<?php
-
if($_POST){
-
if ($boyut >= $azami){
-
uyari('Dosyanız çok büyük!');
-
}
-
if ($resim != "" && $boyut <= $azami){
-
$uzanti_izinlimi = ptIzinlimi($uzanti);
-
if ($uzanti_izinlimi == 'evet'){
-
move_uploaded_file ($_FILES['resim']['tmp_name'], $klasor.$yeniresim) or die ('Dosya kopyalanamıyor');
-
?><table width="370" border=0 align=center class="uyari2">
-
-
<tr>
-
<td align=center height="239"><b><a href="<?=$link?>" target="_blank"> <img src="<?=$link?>" alt="<?=$link?>" width="150" border=0></a><br>
-
Resim Boyutu =
-
<?=$boyutkb?>
-
</b>
-
<br>
-
<strong class="footer"><b>Resmi gerçek boyutta görmek için üzerine tıklayın...<br><br></b> </strong>
-
<?php
-
}
-
if ($resimismi == ""){
-
uyari('Dosya Seçin Lütfen!');
-
}
-
if ((!$resimismi == "")&&($uzanti_izinlimi == 'hayir')){
-
uyari('Bu tür dosyaları yükleyemezsiniz!');
-
}
-
}
-
}
-
if(!$_POST){
-
uyari('');
-
}
-
?></td>
-
</tr>
-
</table></form>
-
<?
-
include("baglanti.php");
-
$id=$_POST["id"];
-
if ($resim != "" && $boyut <= $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>";
-
}
-
?>
-
</td>
-
</tr>
-
<?php
-
{{
-
-
else {
-
-
-
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 BOLD and UNDELİNE code is problem..
what can I do ?
thanks,
4 1587
"else" is the problem?
What's the error code?
What is it doing now?
What should it be doing?
Do you understand the error and Have you tried anything?
Dan
@arkhe3
yes "else", 169. line Error code.
this is Real Estate site and I must to add picture to house's. But I can't.
@arkhe3
---->> true version the 169. line
okey i can true edit this problem.
I was being sarcastic. "else" is a language construct, how can it be the problem, unless you misspell it.
I know you want to add pictures, but we're not here to discuss high level functions of the site, we're programmers.
So can you be a little more specific in answering my previous questions?
Here's what I was looking for:
"I get error Code ABC123 that says this, but I checked X, Y, and Z, and all seem to be as expected. What I expect is to have value FOO in variable $bar on line #, but I get value BAZ. I've put in echo and die statements in place E, F, G, but now I can't seem to understand why line # changes my variable $bar from A to B. "
That's the kind of troubleshooting you need to do to become a good programmer.
Cheers,
Dan
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Frank |
last post by:
How do you turn on PHP error messages in PHP, So I can see what is
happening when a php page fails ?
Windows & Linux ??
|
by: theonlydrayk |
last post by:
the script that show image is :
<?php
include('dbinfo.inc.php');
mysql_connect($localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query =...
|
by: Pratchaya |
last post by:
Hi Everyone
==============================================================
About PHP::: Error/Problem PHP Warning: mysql_fetch_array():...
|
by: nesster13 |
last post by:
I have installed Apache and PHP 5 on my machine.
I have use Smarty and Pear to help me with the general template of my
page. I was able to have a page loaded onto the my browser with not
error but...
|
by: newsbandit |
last post by:
Hello All, is there a way to specify a php error log for each
individual site on an IIS 6 server? If so how, when I turn on logging
in the php.ini file it seems to be global and all sites dump to...
|
by: Patrick Peccatte |
last post by:
Hi,
Is anybody knows any pictures database project written in Python ?
Search engine and true database needed (preferably MySQL)
I am looking for something similar to "Gallery" (written in PHP),...
|
by: fuchsia555 |
last post by:
Is there anyway to hide php error messages? Because i have in my php code error but it redirecting after 1 sec and shows my hosting path and php error number, but this error doesn't effect anything.
|
by: rsmbd |
last post by:
I face the problem
To Insert data
to update data
When I go www.myweb.com/cpanel
user:xxxxx
Pass:xxxx
Go
Database
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |