/* Decoded by unphp.net */ ayar = $ayar; } } function kontrol() { $lisans_anahtar_gelen = $_POST['key']; $lisans_kontrol = $this->lisans_sorgula( ); if ($lisans_kontrol == 1) { if ($lisans_anahtar_gelen) { $this->lisans_anahtar_guncelle( $lisans_anahtar_gelen ); $lisans_kontrol2 = $this->lisans_sorgula( ); if ($lisans_kontrol2 == 1) { $this->lisans_guncelle( 1 ); exit( ); return null; } } else { $this->lisans_guncelle( 1 ); exit( ); return null; } } if ($lisans_kontrol == 2) { $this->lisans_guncelle( 2 ); exit( ); return null; } if ($lisans_kontrol == 3) { $this->lisans_guncelle( 3 ); exit( ); } } function lisans_kontrol($lisans_1, $lisans_2 = '') { $whmcsurl = $this->ayar['url']; $licensing_secret_key = $this->ayar['guvenlik_kodu']; $check_token = time( ) . md5( mt_rand( 1000000000, 9999999999 ) . $lisans_1 ); $checkdate = date( 'Ymd' ); $usersip = (isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR']); $lisans_2days = 27; $allowcheckfaildays = 15; $lisans_2valid = false; if ($lisans_2) { $lisans_2 = str_replace( ' ', '', $lisans_2 ); $localdata = substr( $lisans_2, 0, strlen( $lisans_2 ) - 32 ); $md5hash = substr( $lisans_2, strlen( $lisans_2 ) - 32 ); if ($md5hash == md5( $localdata . $licensing_secret_key )) { $localdata = strrev( $localdata ); $md5hash = substr( $localdata, 0, 32 ); $localdata = substr( $localdata, 32 ); $localdata = base64_decode( $localdata ); $lisans_2results = unserialize( $localdata ); $originalcheckdate = $lisans_2results['checkdate']; if ($md5hash == md5( $originalcheckdate . $licensing_secret_key )) { $localexpiry = date( 'Ymd', mktime( 0, 0, 0, date( 'm' ), date( 'd' ) - $lisans_2days, date( 'Y' ) ) ); if ($localexpiry < $originalcheckdate) { $lisans_2valid = true; $results = $lisans_2results; $validdomains = explode( ',', $results['validdomain'] ); if (!in_array( $_SERVER['SERVER_NAME'], $validdomains )) { $lisans_2valid = false; $lisans_2results['status'] = 'Invalid'; $results = array( ); } $validips = explode( ',', $results['validip'] ); if (!in_array( $usersip, $validips )) { $lisans_2valid = false; $lisans_2results['status'] = 'Invalid'; $results = array( ); } if ($results['validdirectory'] != dirname( __FILE__ )) { $lisans_2valid = false; $lisans_2results['status'] = 'Invalid'; $results = array( ); } } } } } if (!$lisans_2valid) { $postfields['licensekey'] = $lisans_1; $postfields['domain'] = $_SERVER['SERVER_NAME']; $postfields['ip'] = $usersip; $postfields['dir'] = dirname( __FILE__ ); if ($check_token) { $postfields['check_token'] = $check_token; } if (function_exists( 'curl_exec' )) { $ch = curl_init( ); curl_setopt( $ch, CURLOPT_URL, $whmcsurl . 'modules/servers/licensing/verify.php' ); curl_setopt( $ch, CURLOPT_POST, 1 ); curl_setopt( $ch, CURLOPT_POSTFIELDS, $postfields ); curl_setopt( $ch, CURLOPT_TIMEOUT, 30 ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); $data = curl_exec( $ch ); curl_close( $ch ); } else { $fp = fsockopen( $whmcsurl, 80, $errno, $errstr, 5 ); if ($fp) { $querystring = ''; foreach ($postfields as $k => $v) { $querystring .= '' . $k . '=' . urlencode( $v ) . '&'; } $header = 'POST ' . $whmcsurl . 'modules/servers/licensing/verify.php HTTP/1.0 '; $header .= 'Host: ' . $whmcsurl . ' '; $header .= 'Content-type: application/x-www-form-urlencoded '; $header .= 'Content-length: ' . @strlen( $querystring ) . ' '; $header .= 'Connection: close '; $header .= $querystring; $data = ''; @stream_set_timeout( $fp, 20 ); @fputs( $fp, $header ); $status = @socket_get_status( $fp ); while (( !@feof( $fp ) && $status )) { $data .= @fgets( $fp, 1024 ); $status = @socket_get_status( $fp ); } @fclose( $fp ); } } if (!$data) { $localexpiry = date( 'Ymd', mktime( 0, 0, 0, date( 'm' ), date( 'd' ) - ( $lisans_2days + $allowcheckfaildays ), date( 'Y' ) ) ); if ($localexpiry < $originalcheckdate) { $results = $lisans_2results; } else { $results['status'] = 'Invalid'; $results['description'] = 'Remote Check Failed'; return $results; } } preg_match_all( '/<(.*?)>([^<]+)<\/>/i', $data, $matches ); $results = array( ); foreach ($matches[1] as $k => $v) { $results[$v] = $matches[2][$k]; } if ($results['md5hash']) { if ($results['md5hash'] != md5( $licensing_secret_key . $check_token )) { $results['status'] = 'Invalid'; $results['description'] = 'MD5 Checksum Verification Failed'; return $results; } } if ($results['status'] == 'Active') { $results['checkdate'] = $checkdate; $data_encoded = serialize( $results ); $data_encoded = base64_encode( $data_encoded ); $data_encoded = md5( $checkdate . $licensing_secret_key ) . $data_encoded; $data_encoded = strrev( $data_encoded ); $data_encoded = $data_encoded . md5( $data_encoded . $licensing_secret_key ); $data_encoded = wordwrap( $data_encoded, 80, ' ', true ); $results['localkey'] = $data_encoded; } $results['remotecheck'] = true; } unset( $postfields ); unset( $data ); unset( $matches ); unset( $whmcsurl ); unset( $licensing_secret_key ); unset( $checkdate ); unset( $usersip ); unset( $lisans_2days ); unset( $allowcheckfaildays ); unset( $md5hash ); return $results; } function tablo_kontrol() { $pTableExist = @mysql_query( 'show tables like \'trendwp_lisans\'' ); if (!@mysql_fetch_array( $pTableExist )) { if (!( @mysql_query( 'CREATE TABLE IF NOT EXISTS `trendwp_lisans` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tema` varchar(255) NOT NULL, `lisans1` text NOT NULL, `lisans2` text NOT NULL, `kontrol` datetime NOT NULL, PRIMARY KEY (`id`), KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;' ))) { exit( 'TrendWP lisans tablosu oluşturulamadı!' ); (bool)true; } } } function lisans_anahtar_guncelle($lisans_1 = null, $lisans_2 = null) { $this->tablo_kontrol( ); $lisans = mysql_fetch_array( @mysql_query( 'SELECT `id` FROM `trendwp_lisans` where `tema`=\'' . $this->ayar['kod'] . '\' order by id desc LIMIT 1' ) ); if (empty( $lisans['id'] )) { @mysql_query( 'INSERT INTO `trendwp_lisans` (`tema` ,`lisans1` ,`lisans2` ,`kontrol`) VALUES (\'' . $this->ayar['kod'] . '\', \'' . $lisans_1 . '\', \'' . $lisans_2 . '\', now())' ); return null; } if (( $lisans_1 || $lisans_2 )) { $sorgu = null; if ($lisans_1) { $sorgu .= 'lisans1=\'' . $lisans_1 . '\''; } if (( $lisans_1 && $lisans_2 )) { $sorgu .= ','; } if ($lisans_2) { $sorgu .= 'lisans2=\'' . $lisans_2 . '\''; } @mysql_query( 'UPDATE `trendwp_lisans` SET ' . $sorgu . ',`kontrol`=now() where `tema` = \'' . $this->ayar['kod'] . '\'' ); } } function lisans_guncelle($numm) { echo '
'; global $post; $permalink = get_permalink( $post->ID ); $permalink_structure = get_option( 'permalink_structure' ); $ayarYapildiMi = (empty( $permalink_structure ) ? 0 : 1); preg_match_all( '#x([0-9]+)x#si', $sayfaVerileri, $sayfalar ); $sayfalar = $sayfalar[1]; $toplamSayfa = $sayfalar[count( $sayfalar ) - 1]; $limit = 15; if (1 < $toplamSayfa) { if ($_GET['p']) { $sayfa = (int)$_GET['page']; } if (!$_GET['p']) { $link = $_SERVER['REQUEST_URI']; $kes = explode( '/', $link ); $sayfa = (int)$kes[count( $kes ) - 1]; } if (empty( $sayfa )) { $sayfa = 11; } if (1 < $sayfa) { echo ($_GET['p'] ? 'İlk ' : 'İlk '); echo ($_GET['p'] ? 'Önceki ' : 'Önceki '); } if (( $sayfa == 1 || $sayfa == $toplamSayfa )) { $limit = 19; } $basla = $sayfa - $limit; while ($basla <= $sayfa + $limit) { if (( ( 1 <= $basla && $basla <= $toplamSayfa ) && $basla != $sayfa )) { echo ($_GET['p'] ? '' . $basla . ' ' : '' . $basla . ' '); } if ($basla == $sayfa) { echo '' . $basla . ''; global $aktifsayfa; $aktifsayfa = $basla; } ++$basla; } if ($sayfa < $toplamSayfa) { echo ($_GET['p'] ? 'Sonraki ' : 'Sonraki '); echo ($_GET['p'] ? 'Son ' : 'Son '); return 1; } echo '
'; } } function anakategorigetir($catid) { while ($catid) { $cat = ; $catid = get_category( $catid ); $cat->cat_ID; $catParent = $cat->category_parent; } return $catParent; } function kurgetir() { $dosya = TEMPLATEPATH . '/trend_onbellek/doviz.html'; if (file_exists( $dosya )) { $zaman = time( ) - filemtime( $dosya ); } else { $zaman = fs_get_option( 'fs_dovizcache' ) + 100; } if (( fs_get_option( 'fs_dovizcache' ) <= $zaman || !file_exists( $dosya ) )) { $para_birimix[] = 'USD'; $para_birimix[] = 'EUR'; $veri = array( 'Isim' => 'isim', 'forexbuying' => 'Alis', 'forexselling' => 'Satis' ); $data = file_get_contents( 'http://www.tcmb.gov.tr/kurlar/today.xml' ); if ($data) { $data = iconv( 'ISO-8859-9', 'UTF-8', $data ); $satir = explode( '