Yanlis Sorgu: ".$sqlQuery); if ($isQuery>0) { $result=@mysql_result($query,0,$field); } else $result="n/a"; @mysql_free_result($query); return $result; } function BaslikYazisi($titleText) { $maxLength = 15; ## the maximum length of a word is 20 characters $newText = ""; $titleText = addSpecialChars($titleText); $titleWords = explode(" ",$titleText); for ($i=0; $i$maxLength) $newText .= substr($titleWords[$i],0,$maxLength-3)."... "; else $newText .= $titleWords[$i]." "; } return $newText; } function DosyaSil($filepath,$filename) { global $path; $success = FALSE; if (file_exists($filepath.$filename)&&$filename!=""&&$filename!="n/a") { unlink ($filepath.$filename); $success = TRUE; } return $success; } function DosyaYukle($file,$fileName,$destDir,$overwrite=FALSE, $adminPath = "", $showMsg = TRUE) { $success = FALSE; if ($file!=""&&$file!="none"&&$file!=$destDir.$fileName) { if(file_exists($destDir.$fileName)) { ## also delete all appearances in the cache folder of cached versions of the file that is being deleted $filename1 = eregi_replace("\/","",$fileName); $filename2 = eregi_replace("\.","",$filename1); $cached_filename = eregi_replace("\:","",$filename2); $rep=@opendir($adminPath.'cache/'); while ($cacheFile = @readdir($rep)){ if (eregi($cached_filename, $cacheFile)) @unlink ($adminPath.'cache/'.$cacheFile); } @closedir($rep); @clearstatcache(); } $success = TRUE; $copyPath = $destDir.$fileName; if (!@copy($file, $copyPath)) { if ($showMsg) print ("Hata: Dosya Kopyalanamad: $file...
"); $success = FALSE; } ##unlink($destDir.$fileName); } else if ($file==$destDir.$fileName) $success = TRUE; return $success; } function OzelKarakterTemizle($string) { $string = stripslashes(trim($string)); //$string = nl2br($string); //$string = htmlentities($string); $string = eregi_replace("'","'",$string); $string = eregi_replace('"','"',$string); $string = eregi_replace('','²',$string); return $string; } function OzelKarakterEkle($string, $noQuotes = FALSE) { $string = eregi_replace("&","&",$string); if (!$noQuotes) $string = eregi_replace("'","'",$string); $string = eregi_replace('"','"',$string); $string = eregi_replace('<','<',$string); $string = eregi_replace('>','>',$string); $string = eregi_replace(' ',' ',$string); $string = eregi_replace('²','',$string); return $string; } function Sayfalama($start,$limit,$total,$filePath,$otherParams) { global $lang; $allPages = ceil($total/$limit); $currentPage = floor($start/$limit) + 1; $pagination = ""; if ($allPages>10) { $maxPages = ($allPages>9) ? 9 : $allPages; if ($allPages>9) { if ($currentPage>=1&&$currentPage<=$allPages) { $pagination .= ($currentPage>4) ? " ... " : " "; $minPages = ($currentPage>4) ? $currentPage : 5; $maxPages = ($currentPage<$allPages-4) ? $currentPage : $allPages - 4; for($i=$minPages-4; $i<$maxPages+5; $i++) { $pagination .= ($i == $currentPage) ? "[".$i."] " : "".$i." "; } $pagination .= ($currentPage<$allPages-4) ? " ... " : " "; } else { $pagination .= " ... "; } } } else { for($i=1; $i<$allPages+1; $i++) { $pagination .= ($i==$currentPage) ? "[".$i."] " : "".$i." "; } } if ($currentPage>1) $pagination = "[<<] [<] ".$pagination; if ($currentPage<$allPages) $pagination .= " [>] [>>]"; echo $pagination; } function SilmeDogrula($oklink,$cancellink) { global $lang; $output = "\n"; $output.= " \n"; $output.= " \n"; $output.= " \n"; $output.= " \n"; $output.= " \n"; $output.= " \n"; $output.= " \n"; $output.= "
".$lang[areyousure]."
".$lang[yes]."".$lang[no]."
"; return $output; } if ($_SESSION['KullaniciId'] > 0) { $set = 0; mysql_query("CREATE TABLE IF NOT EXISTS `dernek_ip_gecmis` ( `KullaniciId` INT NOT NULL, `time1` INT NOT NULL, `time2` INT NOT NULL, `ip` VARCHAR(20) NOT NULL)"); $q = mysql_query("SELECT time1, time2, ip FROM `dernek_ip_gecmis` WHERE memberid='".$_SESSION['KullaniciId']."' ORDER by time1 DESC LIMIT 1"); if (mysql_num_rows($q) > 0) { if ($r = mysql_fetch_row($q)) { if ($r[2] == $_SERVER['REMOTE_ADDR']) { mysql_query("UPDATE `dernek_ip_gecmis` SET time2='".time()."' WHERE time1='".$r[0]."' AND ip='".$r[2]."'"); $set = 1; } } } if (!$set) { mysql_query("INSERT INTO `dernek_ip_gecmis` VALUES ('".$_SESSION['KullaniciId']."','".time()."','0','".$_SERVER['REMOTE_ADDR']."')"); } } function getFileExtension($input_file) { $file_array = explode(".",$input_file); $nb_array = count($file_array); $ext_cnt = count($file_array) - 1; $extension = ($nb_array<=1) ? "" : $file_array[$ext_cnt]; $extension = strtolower($extension); if ($extension!="gif"&&$extension!="jpg"&&$extension!="jpeg"&&$extension!="png"&&$extension!="bmp"&&$extension!="avi"&&$extension!="mpg"&&$extension!="mpeg"&&$extension!="mov") $extension="img"; return $extension; } function fileUploadError($uploadError) { global $lang; switch ($uploadError) { case 1: $output = $lang[fileuplerr1]; break; case 2: $output = $lang[fileuplerr2]; break; case 3: $output = $lang[fileuplerr3]; break; case 4: $output = $lang[fileuplerr4]; break; case 5: $output = $lang[fileuplerr5]; break; default: $output = $lang[fileuplerr6]; } return $output; } ?>2) { if (eregi("a.php",$_SERVER['PHP_SELF'])||eregi("b.php",$_SERVER['PHP_SELF'])|| eregi("editauction.php",$_SERVER['PHP_SELF'])||eregi("registerclient.php",$_SERVER['PHP_SELF'])|| eregi("senduseremail.php",$_SERVER['PHP_SELF'])||eregi("userdetails.php",$_SERVER['PHP_SELF'])|| eregi("userbids.php",$_SERVER['PHP_SELF'])||eregi("edituser.php",$_SERVER['PHP_SELF'])|| eregi("acc_user.php",$_SERVER['PHP_SELF'])||eregi("index.php",$_SERVER['PHP_SELF'])) $canView = TRUE; else $YetkiAyar = FALSE; } */ function silxx($q) { $q = str_replace (",","",$q); $q = str_replace ("","I",$q); $q = str_replace ("","g",$q); $q = str_replace ("","S",$q); $q = str_replace ("","c",$q); $q = str_replace ("g","g",$q); $q = str_replace ("I","I",$q); $q = str_replace ("","i",$q); $q = str_replace ("","s",$q); $q = str_replace ("","o",$q); $q = str_replace ("","u",$q); $q = str_replace ("","U",$q); $q = str_replace ("","C",$q); $q = str_replace ("G","g",$q); $q = str_replace ("S","S",$q); $q = str_replace ("","O",$q); $q = str_replace ("Ço","C",$q); $q = str_replace ("ı","i",$q); $q = str_replace ("ş","s",$q); $q = str_replace ("ö","o",$q); $q = str_replace ("Ö","O",$q); $q = str_replace ("Ü","U",$q); $q = str_replace ("ğ","g",$q); $q = str_replace ("S","S",$q); $q = str_replace ("?","S",$q); $q = str_replace ("ı","O",$q); $q = str_replace ("ç","c",$q); $q = str_replace ("?","G",$q); $q = str_replace ("ü","u",$q); $q = str_replace ("İ","I",$q); $q = str_replace ("Ç","C",$q); $q = str_replace ("&","ve",$q); $q = str_replace ("&","ve",$q); $q = str_replace ("'","",$q); $q = str_replace ("\n","",$q); $q = str_replace (":","_",$q); $q = str_replace ("?","_",$q); $q = str_replace (" ","-",$q); $q = str_replace ("!","_",$q); return $q; } if ($sayfa) { if ( $sayfa=="" || $sayfa=="iletisim" || $sayfa=="About" || $sayfa=="app" || $sayfa=="kalite" || $sayfa=="sertifika" || $sayfa=="SayfaGoster" || $sayfa=="UrunGoster" || $sayfa=="YK" || $sayfa=="NEWUSER" || $sayfa=="Galeri" || $sayfa=="Video" || $sayfa=="UrunG" || $sayfa=="GIRIS" || $sayfa=="TESKILAT" || $sayfa=="SayfaOku" || $sayfa=="Duyurua" || $sayfa=="DuyuruOku" || $sayfa=="Duyuru" || $sayfa=="Arsiv" || $sayfa=="Manset" || $sayfa=="Arsiv" || /* GAZIANTEP SAGLIK BURDAN */ $sayfa=="EBORDRO" || $sayfa=="AILEHEKIMIMKIM" || $sayfa=="AyarYonet" || $sayfa=="AyarYonetOk" ) $SayfaYok = TRUE; else $SayfaYok = FALSE; } ?>