Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function temiz( $degisken )
- {
- $degisken = str_replace( "&", "", $degisken );
- $degisken = str_replace( "'", " ", $degisken );
- $degisken = str_replace( " ", " ", $degisken );
- $degisken = str_replace( " ", " ", $degisken );
- return $degisken;
- }
- function seola( $baslik )
- {
- $bul = array( "Ç", "Ş", "Ğ", "Ü", "İ", "Ö", "ç", "ş", "ğ", "ü", "ö", "ı", "-" );
- $yap = array( "c", "s", "g", "u", "i", "o", "c", "s", "g", "u", "o", "i", " " );
- $perma = strtolower( str_replace( $bul, $yap, $baslik ) );
- $find = array( " ", """, "&", "&", "\\r\\n", "\\n", "/", "\\", "+", "<", ">" );
- $url = str_replace( $find, "-", $perma );
- $find = array( "é", "è", "ë", "ê", "É", "È", "Ë", "Ê" );
- $url = str_replace( $find, "e", $url );
- $find = array( "í", "ì", "î", "ï", "I", "Í", "Ì", "Î", "Ï" );
- $url = str_replace( $find, "i", $url );
- $find = array( "ó", "ö", "Ö", "ò", "ô", "Ó", "Ò", "Ô" );
- $url = str_replace( $find, "o", $url );
- $find = array( "á", "ä", "â", "à", "â", "Ä", "Â", "Á", "À", "Â" );
- $url = str_replace( $find, "a", $url );
- $find = array( "ú", "ü", "Ü", "ù", "û", "Ú", "Ù", "Û" );
- $url = str_replace( $find, "u", $url );
- $find = array( "ç", "Ç" );
- $url = str_replace( $find, "c", $url );
- $find = array( "?", "!", "\$", "#", "+" );
- $perma = str_replace( $find, "-", $url );
- $perma = preg_replace( "@[^A-Za-z0-9\\-]@i", " ", $perma );
- $perma = trim( preg_replace( "/\\s+/", " ", $perma ) );
- $perma = str_replace( " ", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "{$perma}", "{$perma}@", $perma );
- $perma = str_replace( "-@", "", $perma );
- $perma = str_replace( "@", "", $perma );
- return $perma;
- }
- function clearmethod( $mVar )
- {
- if ( is_array( $mVar ) )
- {
- foreach ( $mVar as $gVal => $gVar )
- {
- if ( !is_array( $gVar ) )
- {
- $mVar[$gVal] = htmlspecialchars( strip_tags( urldecode( mysql_escape_string( addslashes( stripslashes( stripslashes( trim( htmlspecialchars_decode( $gVar ) ) ) ) ) ) ) ) );
- }
- else
- {
- $mVar[$gVal] = clearmethod( $gVar );
- }
- }
- }
- else
- {
- $mVar = htmlspecialchars( strip_tags( urldecode( mysql_escape_string( addslashes( stripslashes( stripslashes( trim( htmlspecialchars_decode( $mVar ) ) ) ) ) ) ) ) );
- }
- return $mVar;
- }
- function arindir( $degisken )
- {
- $degisken = str_replace( "\\", "", $degisken );
- return $degisken;
- }
- function sosyalag( $icerik )
- {
- }
- function resample( $resim, $son_en, $son_boy )
- {
- ob_start( );
- $boyut = getimagesize( $resim );
- $en = $boyut[0];
- $boy = $boyut[1];
- $eski = imagecreatefromjpeg( $resim );
- $yeni = imagecreatetruecolor( $son_en, $son_boy );
- imagecopyresampled( $yeni, $eski, 0, 0, 0, 0, $son_en, $son_boy, $en, $boy );
- imagejpeg( $yeni, null, 0 - 1 );
- $icerik = ob_get_contents( );
- ob_end_clean( );
- imagedestroy( $eski );
- imagedestroy( $yeni );
- return $icerik;
- }
- function uzantibul( $isim )
- {
- $dizi = explode( ".", $isim );
- $eleman = count( $dizi ) - 1;
- $uzanti = $dizi["{$eleman}"];
- return $uzanti;
- }
- function tazele( $ali = "" )
- {
- $anadizin = $_SERVER['DOCUMENT_ROOT']."/cache";
- while ( !( $kaynak = opendir( $anadizin ) ) || !( false != ( $file = readdir( $kaynak ) ) ) )
- {
- if ( $file != "." && $file != ".." && file != ".htaccess" )
- {
- unlink( $anadizin."/".$file );
- }
- }
- }
- function mysqlopt( $ali = "" )
- {
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE alanlar" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE ayarlar" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE etiketler" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE iletisim" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE kategoriler" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE player" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE sansur" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE sefyapi" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE user" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE videolar" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE yorumbotu" ) );
- $uyarla = mysql_fetch_object( mysql_query( "REPAIR TABLE yorumlar" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE alanlar" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE ayarlar" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE etiketler" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE iletisim" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE kategoriler" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE player" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE sansur" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE sefyapi" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE user" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE videolar" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE yorumbotu" ) );
- $uyarla = mysql_fetch_object( mysql_query( "OPTIMIZE TABLE yorumlar" ) );
- }
- function sefe( $baslik )
- {
- $bul = array( "Ç", "Ş", "Ğ", "Ü", "İ", "Ö", "ç", "ş", "ğ", "ü", "ö", "ı", "-" );
- $yap = array( "c", "s", "g", "u", "i", "o", "c", "s", "g", "u", "o", "i", " " );
- $perma = strtolower( str_replace( $bul, $yap, $baslik ) );
- $find = array( " ", """, "&", "&", "\\r\\n", "\\n", "/", "\\", "+", "<", ">" );
- $url = str_replace( $find, "-", $perma );
- $find = array( "é", "è", "ë", "ê", "É", "È", "Ë", "Ê" );
- $url = str_replace( $find, "e", $url );
- $find = array( "í", "ì", "î", "ï", "I", "Í", "Ì", "Î", "Ï" );
- $url = str_replace( $find, "i", $url );
- $find = array( "ó", "ö", "Ö", "ò", "ô", "Ó", "Ò", "Ô" );
- $url = str_replace( $find, "o", $url );
- $find = array( "á", "ä", "â", "à", "â", "Ä", "Â", "Á", "À", "Â" );
- $url = str_replace( $find, "a", $url );
- $find = array( "ú", "ü", "Ü", "ù", "û", "Ú", "Ù", "Û" );
- $url = str_replace( $find, "u", $url );
- $find = array( "ç", "Ç" );
- $url = str_replace( $find, "c", $url );
- $find = array( "?", "!", "\$", "#", "+" );
- $perma = str_replace( $find, "-", $url );
- $perma = preg_replace( "@[^A-Za-z0-9\\-]@i", " ", $perma );
- $perma = trim( preg_replace( "/\\s+/", " ", $perma ) );
- $perma = str_replace( " ", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "{$perma}", "{$perma}@", $perma );
- $perma = str_replace( "-@", "", $perma );
- $perma = str_replace( "@", "", $perma );
- return $perma;
- }
- function sef( $baslik )
- {
- $bul = array( "Ç", "Ş", "Ğ", "Ü", "İ", "Ö", "ç", "ş", "ğ", "ü", "ö", "ı", "-" );
- $yap = array( "c", "s", "g", "u", "i", "o", "c", "s", "g", "u", "o", "i", " " );
- $perma = strtolower( str_replace( $bul, $yap, $baslik ) );
- $find = array( " ", """, "&", "&", "\\r\\n", "\\n", "/", "\\", "+", "<", ">" );
- $url = str_replace( $find, "-", $perma );
- $find = array( "é", "è", "ë", "ê", "É", "È", "Ë", "Ê" );
- $url = str_replace( $find, "e", $url );
- $find = array( "í", "ì", "î", "ï", "I", "Í", "Ì", "Î", "Ï" );
- $url = str_replace( $find, "i", $url );
- $find = array( "ó", "ö", "Ö", "ò", "ô", "Ó", "Ò", "Ô" );
- $url = str_replace( $find, "o", $url );
- $find = array( "á", "ä", "â", "à", "â", "Ä", "Â", "Á", "À", "Â" );
- $url = str_replace( $find, "a", $url );
- $find = array( "ú", "ü", "Ü", "ù", "û", "Ú", "Ù", "Û" );
- $url = str_replace( $find, "u", $url );
- $find = array( "ç", "Ç" );
- $url = str_replace( $find, "c", $url );
- $find = array( "?", "!", "\$", "#", "+" );
- $perma = str_replace( $find, "-", $url );
- $perma = preg_replace( "@[^A-Za-z0-9\\-]@i", " ", $perma );
- $perma = trim( preg_replace( "/\\s+/", " ", $perma ) );
- $perma = str_replace( " ", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "{$perma}", "{$perma}@", $perma );
- $perma = str_replace( "-@", "", $perma );
- $perma = str_replace( "@", "", $perma );
- $bilgi = mysql_query( "select id from videolar where baslik='{$baslik}'" );
- $mevcut = mysql_num_rows( $bilgi );
- if ( $mevcut == "0" )
- {
- $perma = $perma;
- }
- else
- {
- $mevcut1 = $mevcut + 1;
- $perma = $perma."-".$mevcut1."";
- }
- return $perma;
- }
- function query( $baslik, $title, $description, $keyword, $video, $aciklama, $resim, $etiket, $izlenme, $kategori, $sure )
- {
- if ( $izlenme == "" )
- {
- $izlenme = "0";
- }
- $baslik = addslashes( trim( $baslik ) );
- $aciklama = addslashes( trim( $aciklama ) );
- $etiket = addslashes( trim( $etiket ) );
- $video = addslashes( trim( $video ) );
- $title = addslashes( trim( $title ) );
- $description = addslashes( trim( $description ) );
- $keyword = addslashes( trim( $keyword ) );
- $bul = array( "Ç", "Ş", "Ğ", "Ü", "İ", "Ö", "ç", "ş", "ğ", "ü", "ö", "ı", "-" );
- $yap = array( "c", "s", "g", "u", "i", "o", "c", "s", "g", "u", "o", "i", " " );
- $perma = strtolower( str_replace( $bul, $yap, $baslik ) );
- $find = array( " ", """, "&", "&", "\\r\\n", "\\n", "/", "\\", "+", "<", ">" );
- $url = str_replace( $find, "-", $perma );
- $find = array( "é", "è", "ë", "ê", "É", "È", "Ë", "Ê" );
- $url = str_replace( $find, "e", $url );
- $find = array( "í", "ì", "î", "ï", "I", "Í", "Ì", "Î", "Ï" );
- $url = str_replace( $find, "i", $url );
- $find = array( "ó", "ö", "Ö", "ò", "ô", "Ó", "Ò", "Ô" );
- $url = str_replace( $find, "o", $url );
- $find = array( "á", "ä", "â", "à", "â", "Ä", "Â", "Á", "À", "Â" );
- $url = str_replace( $find, "a", $url );
- $find = array( "ú", "ü", "Ü", "ù", "û", "Ú", "Ù", "Û" );
- $url = str_replace( $find, "u", $url );
- $find = array( "ç", "Ç" );
- $url = str_replace( $find, "c", $url );
- $find = array( "?", "!", "\$", "#", "+" );
- $perma = str_replace( $find, "-", $url );
- $perma = preg_replace( "@[^A-Za-z0-9\\-]@i", " ", $perma );
- $perma = trim( preg_replace( "/\\s+/", " ", $perma ) );
- $perma = str_replace( $find, "-", $perma );
- $perma = str_replace( " ", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "--", "-", $perma );
- $perma = str_replace( "{$perma}", "{$perma}@", $perma );
- $perma = str_replace( "-@", "", $perma );
- $perma = str_replace( "@", "", $perma );
- $bilgi = mysql_query( "select id from videolar where baslik='{$baslik}'" );
- $mevcut = mysql_num_rows( $bilgi );
- $row = mysql_fetch_array( mysql_query( "SELECT videosefyapi FROM sefyapi WHERE id='1'" ) );
- $videosefyapi = $row['videosefyapi'];
- $row = mysql_fetch_array( mysql_query( "SELECT sef FROM kategoriler where id='{$kategori}'" ) );
- $kategorisef = $row['sef'];
- if ( $mevcut == "0" )
- {
- $perma = $perma;
- }
- else
- {
- $mevcut1 = $mevcut + 1;
- $perma = $perma."-".$mevcut1."";
- }
- $perma2 = str_replace( "\$baslik", "{$perma}", $videosefyapi );
- $perma2 = str_replace( "\$kategori", "{$kategorisef}", $perma2 );
- $listele = explode( ",", $etiket );
- $saybakam = count( $listele ) - 1;
- $sayac = 0;
- while ( $sayac <= $saybakam )
- {
- $kelime = trim( $listele[$sayac] );
- if ( $kelime != "" )
- {
- $permax = strtolower( str_replace( $bul, $yap, $kelime ) );
- $permax = preg_replace( "@[^A-Za-z0-9\\-]@i", " ", $permax );
- $permax = trim( preg_replace( "/\\s+/", " ", $permax ) );
- $permax = str_replace( " ", "-", $permax );
- $permax = str_replace( "--", "-", $permax );
- $permax = str_replace( "--", "-", $permax );
- $kelimex = $permax;
- $Sor = mysql_query( "SELECT * FROM etiketler WHERE sef='{$kelimex}'" );
- if ( @( mysql_num_rows( @$Sor ) < 1 ) )
- {
- mysql_query( "Insert Into etiketler (baslik,sef,durum) values ('{$kelime}','{$kelimex}','1')" );
- }
- }
- ++$sayac;
- }
- $sql = mysql_query( "insert into videolar (baslik,title,description,keyword,sef,sef2,video,aciklama,resim,etiket,izlenme,kategori,sure,tarih) values ('{$baslik}','{$title}','{$description}','{$keyword}','{$perma}','{$perma2}','{$video}','{$aciklama}','{$resim}','{$etiket}','{$izlenme}','{$kategori}','{$sure}',Now())" );
- if ( $sql )
- {
- $row = mysql_fetch_array( mysql_query( "SELECT id FROM videolar WHERE sef2='{$perma2}'" ) );
- $id = $row['id'];
- $perma2 = str_replace( "\$id", "{$id}", $perma2 );
- $sonuc = mysql_query( "update videolar set sef2='{$perma2}' where id='{$id}'" );
- return "Video başarıyla eklendi !";
- }
- return "Video eklenemedi !";
- }
- function lisanskontrol( $site_lisans )
- {
- if ( substr( getenv( "HTTP_HOST" ), 0, 4 ) == "www." )
- {
- $domainadi = substr( getenv( "HTTP_HOST" ), 4 );
- }
- else
- {
- $domainadi = getenv( "HTTP_HOST" );
- }
- $lisans = $_REQUEST['kontrol'];
- if ( !function_exists( "curl_init" ) )
- {
- exit( "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\r\n<strong><center>Sunucunuzda Curl Fonksiyonu Bulunmamaktadır. Lütfen Hosting Sahibiniz ile İletişime Geçip Yükletin.</strong></center>" );
- }
- @$row = @mysql_fetch_array( @mysql_query( "SELECT inforesim FROM ayarlar WHERE id='1'" ) );
- $inforesimx = $row['inforesim'];
- if ( $inforesimx != "1" )
- {
- $lisans = "lisans";
- $row = mysql_query( "ALTER TABLE `ayarlar` DROP `inforesim`" );
- }
- if ( $lisans != "" )
- {
- $ch = curl_init( );
- $timeout = 5;
- curl_setopt( $ch, CURLOPT_URL, "http://www.inforesim.com/lisansinf.php?domain=".$domainadi."&hash=".$site_lisans."" );
- curl_setopt( $ch, CURLOPT_HEADER, false );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
- curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $timeout );
- curl_setopt( $ch, CURLOPT_REFERER, "http://www.inforesim.com" );
- curl_setopt( $ch, CURLOPT_USERAGENT, "inforesimbot" );
- $inforesim = curl_exec( $ch );
- curl_close( $ch );
- }
- $site_hash = md5( md5( $domainadi."infoskvds12sd" ) );
- if ( $site_lisans == $site_hash )
- {
- if ( $inforesim != "" )
- {
- if ( $inforesim == "0" )
- {
- $row = mysql_query( "ALTER TABLE `ayarlar` DROP `inforesim`" );
- echo "\r\n<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\r\n<strong><center>Lisanssız Yazılım Kullanıyorsunuz, Lütfen Lisans Alın ! Lisans İçin : <a href=\"http://www.inforesim.com\">http://www.inforesim.com</a></strong></center>";
- exit( );
- }
- if ( $inforesim == "1" && $inforesimx != "1" )
- {
- $row = mysql_query( "ALTER TABLE `ayarlar` DROP `inforesim`" );
- $row = mysql_query( "ALTER TABLE `ayarlar` ADD `inforesim` ENUM('1') NOT NULL" );
- exit( );
- }
- }
- }
- else
- {
- echo "\r\n<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\r\n<strong><center>Lisanssız Yazılım Kullanıyorsunuz, Lütfen Lisans Alın ! Lisans İçin : <a href=\"http://www.inforesim.com\">http://www.inforesim.com</a></strong></center>";
- exit( );
- }
- }
- lisanskontrol( $site_lisans );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement