• 23-03-2009, 21:52:40
    #10
    LaCReMeL adlı üyeden alıntı: mesajı görüntüle
    ilgili upload dosyasini görmeden birşey söylemek mümkün degil
    <?php
    class sys
    {
    var $Error=array();
    var $ErrNo=0;
    var $PicErrNo=0;
    var $PicError=array();
    //*****************************************************
    function CountJunkImages()
    {
    	include ($_SERVER['DOCUMENT_ROOT']."/libs/my_par_lib.php");
    	require ($_SERVER['DOCUMENT_ROOT']."/system/tblpref.php");
    	if ($handle =@opendir('../admin/listings/pics')) 
    	{
    		$ImageFile=array();
    		$i=0;
       		while (false !== ($file =@readdir($handle))) 
    		{ 
    			if ($file != "." && $file != ".." && $file != "default.gif" && $file != "default2.gif")
    			{
    				$ImageFile[$i]=$file;
    				$i++;
    			}
        	}
        	closedir($handle); 
    	}
    	else
    	{
    		include_once($_SERVER['DOCUMENT_ROOT']."/libs/error_handler.php");
    		$this->ErrorNo++;
    		$ErrorMessage="Cannot read listing image folder";
    		$ErrorDescription="Check your permissions";
    		$ErrorGeneratedBy="System";
    		$aErrHandler=new ErrorHandler($ErrorDescription,$ErrorGeneratedBy);
    		$this->Error[$this->ErrorNo]['Message']=$ErrorMessage;
    		$this->Error[$this->ErrorNo]['Description']=$ErrorDescription;
    		$this->Error[$this->ErrorNo]['GeneratedBy']=$ErrorGeneratedBy;
    		user_error($ErrorMessage, E_USER_ERROR);
    		return false;
    	}
    	include_once ($_SERVER['DOCUMENT_ROOT']."/libs/my_par_lib.php");
    	require ($_SERVER['DOCUMENT_ROOT']."/system/tblpref.php");
    	$aMyCon=new MySqlConnection;
    	$aMyCon->Open();
    	$Query="SELECT 
    			PicPath1,
    			PicPath2,
    			PicPath3,
    			PicPath4,
    			PicPath5,
    			PicPath6,
    			PicPath7,
    			PicPath8,
    			PicPath9,
    			PicPath10
    			FROM
    			".$TABLE_PREFIX."listing
    			";
    	if(!$aRes=$aMyCon->Query($Query))
    	{
    		include_once($_SERVER['DOCUMENT_ROOT']."/libs/error_handler.php");
    		$this->ErrorNo++;
    		$ErrorMessage=mysql_errno()." : ".mysql_error();
    		$ErrorDescription="SQL query failed, cannot fetch picpath list";
    		$ErrorGeneratedBy="MySql";
    		$aErrHandler=new ErrorHandler($ErrorDescription,$ErrorGeneratedBy);
    		$this->Error[$this->ErrorNo]['Message']=$ErrorMessage;
    		$this->Error[$this->ErrorNo]['Description']=$ErrorDescription;
    		$this->Error[$this->ErrorNo]['GeneratedBy']=$ErrorGeneratedBy;
    		user_error($ErrorMessage, E_USER_ERROR);
    		return false;
    	}
    	$ImageDatabaseFile=array();
    	$i=0;
    	while ($aRow=mysql_fetch_row($aRes))
    	{
    		foreach ($aRow as $k => $v)
    		{
    			if ($v != NULL)
    			{
    				$ImageDatabaseFile[$i]=$v;
    				$i++;
    			}
    		}
    	}
    	$DiffImage=array_diff($ImageFile,$ImageDatabaseFile);
    	foreach ($DiffImage as $k => $v)
    	{
    		unlink($_SERVER['DOCUMENT_ROOT']."/admin/listings/pics/".$v);
    	}
    	return true;
    }
    function FlushCache()
    {
    	$Dir=$_SERVER['DOCUMENT_ROOT']."/cache/";
    	$handle = @opendir($Dir);
    	while (false !== ($file = @readdir($handle))) 
    	{ 
    		if ($file != "." && $file != "..") 
    		{
    			if(!@unlink($Dir.$file))
    			{
    				include_once($_SERVER['DOCUMENT_ROOT']."/libs/error_handler.php");
    				$this->ErrorNo++;
    				$ErrorMessage="Cannot remove ".$file."' file";
    				$ErrorDescription="Check your permissions";
    				$ErrorGeneratedBy="System";
    				$aErrHandler=new ErrorHandler($ErrorDescription,$ErrorGeneratedBy);
    				$this->Error[$this->ErrorNo]['Message']=$ErrorMessage;
    				$this->Error[$this->ErrorNo]['Description']=$ErrorDescription;
    				$this->Error[$this->ErrorNo]['GeneratedBy']=$ErrorGeneratedBy;
    				user_error($ErrorMessage, E_USER_ERROR);
    				closedir($handle);
    				return false;
    			}
    		}
    	}
    	closedir($handle);
    	return true;
    }
    function CheckNoOfListings()
    {
    	include_once ($_SERVER['DOCUMENT_ROOT']."/libs/my_par_lib.php");
    	require ($_SERVER['DOCUMENT_ROOT']."/system/tblpref.php");
    	$aMyCon=new MySqlConnection;
    	$aMyCon->Open();
    	$Query="SELECT COUNT(*) FROM ".$TABLE_PREFIX."listing";
    	if(!$aRes=$aMyCon->Query($Query))
    	{
    		include_once($_SERVER['DOCUMENT_ROOT']."/libs/error_handler.php");
    		$this->ErrorNo++;
    		$ErrorMessage=mysql_errno()." : ".mysql_error();
    		$ErrorDescription="Cannot check no of listings";
    		$ErrorGeneratedBy="MySql";
    		$aErrHandler=new ErrorHandler($ErrorDescription,$ErrorGeneratedBy);
    		$this->Error[$this->ErrorNo]['Message']=$ErrorMessage;
    		$this->Error[$this->ErrorNo]['Description']=$ErrorDescription;
    		$this->Error[$this->ErrorNo]['GeneratedBy']=$ErrorGeneratedBy;
    		user_error($ErrorMessage, E_USER_ERROR);
    		return false;
    	}
    	$aRow=mysql_fetch_row($aRes);
    	return $aRow[0];
    }
    }
  • 23-03-2009, 22:01:56
    #11
    benim anladığım kadarıyla sorun; resimler tam olarak kaydedilmeden resimler yüklendi sayfası geliyor
  • 23-03-2009, 22:07:33
    #12
    hocam bu sayfada class var fonksiyonlar var fakat upload ile alakali degil burdan olacak iş degil scripti yazan kişi ya da şirket ile görüşürseniz daha cabuk netice alabilirsiniz...
  • 24-03-2009, 08:52:19
    #13
    Üyeliği durduruldu
    bi kere division by zero hatasi veriyor. muhtemelen resize edecegi degerleri okumuyor. hazır scripte işiniz zor. ama bi yerden aldiysaniz aldiginiz kişi ile irtibat kurun.
  • 02-04-2009, 13:01:46
    #14
    arkadaşlar sorunun çözümünü hala bulamadım galiba resim yükleme kodları aşağıdakiler,, zahmet olmazsa bi yardımcı oluverseniz
    	
    .
    .
    .
    .
    .
    .
    if(empty($Listing['PicTitle9']))
    	{
    		$PicTitle9="NULL";
    	}
    	else
    	{
    		$PicTitle9="'".$Listing['PicTitle9']."'";
    	}
    	if(empty($Listing['PicTitle10']))
    	{
    		$PicTitle10="NULL";
    	}
    	else
    	{
    		$PicTitle10="'".$Listing['PicTitle10']."'";
    	}
    	for ($i=1;$i<=10;$i++)
    	{
    		if (!empty($Files['Pic']['name'][$i]))
    		{
    			if(!$aValidator->IsValidListingImage($Files['Pic']['type'][$i],$Files['Pic']['size'][$i],$i))
    			{
    				$this->PicErrNo++;
    				$this->PicError[$this->PicErrNo]=$aValidator->Error;
    				$PicPath[$i]="NULL";
    			}
    			else
    			{
    				$Pic['PicExtension']=substr(strrchr($Files['Pic']['name'][$i],"."),1);
    				$Pic['PicNewName']="listings/pics/lst$i".$_SESSION['UID'].time().".".$Pic['PicExtension'];
    				if (!@move_uploaded_file($Files['Pic']['tmp_name'][$i],$Pic['PicNewName']))
    				{
    					$this->PicErrNo++;
    					$this->PicError[$this->PicErrNo]="Cannot upload pic ".$i."<br>";
    				}
    				@chmod($Pic['PicNewName'],0775);
    				$PicPath[$i]="'lst$i".$_SESSION['UID'].time().".".$Pic['PicExtension']."'";
    			}
    		}
    		else
    		{
    			$PicPath[$i]="NULL";
    		}
    	}
  • 02-04-2009, 13:06:04
    #15
    Üyeliği durduruldu
    sailor86 adlı üyeden alıntı: mesajı görüntüle
    arkadaşlar sorunun çözümünü hala bulamadım galiba resim yükleme kodları aşağıdakiler,, zahmet olmazsa bi yardımcı oluverseniz
    oluverrizde scriptin tamamına bakmadan yorum yapmak zor. Gördügüm kadari ile de hazir bi script
  • 06-04-2009, 21:40:00
    #16
    arkadaşlar sorunu buldum,, denemelerim süresince aynı sebepten dolayı hata verdi,, şöyle anlatayım

    sitemde üye numarası 99 ün üstünde olanlarda ilana resim eklerken sorun çıkıyor,, 99 üyeden sonra değil üye numarası olarak 99,, kullandığım scriptin 20 günlük deneme sürümünü aşağıdaki linke ekledim,, yardımcı olacak arkadaşlara şimdiden teşekkürler,,

    ReAgent 2 - Trial
  • 07-04-2009, 13:12:21
    #17
    yardım lütfen