Advertisement
wrsi

functions.php

Apr 10th, 2013
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 29.04 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ POWER X 7 DECODER
  5. * @ Version         :   1.1.4.0
  6. * @ Member          :   vv456
  7. * @ Official site   :   http://www.waraxe.us/forum-userprofile-8669.html
  8. *
  9. */
  10.  
  11.     function add_custom_taxonomies() {
  12.         register_taxonomy( 'imdb', 'post', array( 'hierarchical' => false, 'labels' => array( 'name' => _x( 'IMDB', 'taxonomy general name' ), 'singular_name' => _x( 'IMDB Puanı', 'taxonomy singular name' ), 'search_items' => __( 'IMDB Puanı ara' ), 'all_items' => __( 'Tüm IMDB Puanları' ), 'edit_item' => __( 'IMDB Puanı düzenle' ), 'update_item' => __( 'IMDB Puanı güncelle' ), 'add_new_item' => __( 'Yeni IMDB Puanı ekle' ), 'new_item_name' => __( 'Yeni IMDB Puanı' ), 'menu_name' => __( 'IMDB Puanlary' ) ), 'rewrite' => array( 'slug' => 'imdb', 'with_front' => false, 'hierarchical' => false ) ) );
  13.         register_taxonomy( 'oyuncu', 'post', array( 'hierarchical' => false, 'labels' => array( 'name' => _x( 'Oyuncu', 'taxonomy general name' ), 'singular_name' => _x( 'Oyuncu', 'taxonomy singular name' ), 'search_items' => __( 'Oyuncu ara' ), 'all_items' => __( 'Tüm oyuncular' ), 'edit_item' => __( 'Oyuncu düzenle' ), 'update_item' => __( 'Oyuncu güncelle' ), 'add_new_item' => __( 'Yeni oyuncu ekle' ), 'new_item_name' => __( 'Yeni oyuncu adı' ), 'menu_name' => __( 'Oyuncular' ) ), 'rewrite' => array( 'slug' => 'oyuncu', 'with_front' => false, 'hierarchical' => false ) ) );
  14.         register_taxonomy( 'yapim', 'post', array( 'hierarchical' => false, 'labels' => array( 'name' => _x( 'Yapım Yılı', 'taxonomy general name' ), 'singular_name' => _x( 'Yapım Yılı', 'taxonomy singular name' ), 'search_items' => __( 'Yapım Yılı ara' ), 'all_items' => __( 'Tüm yıllar' ), 'edit_item' => __( 'Yapım Yılı düzenle' ), 'update_item' => __( 'Yapım Yılı güncelle' ), 'add_new_item' => __( 'Yeni Yapım Yılı ekle' ), 'new_item_name' => __( 'Yeni Yapım Yılı' ), 'menu_name' => __( 'Yapım Yılı' ) ), 'rewrite' => array( 'slug' => 'yapim', 'with_front' => false, 'hierarchical' => false ) ) );
  15.         register_taxonomy( 'yonetmen', 'post', array( 'hierarchical' => false, 'labels' => array( 'name' => _x( 'Yönetmen', 'taxonomy general name' ), 'singular_name' => _x( 'Yönetmen', 'taxonomy singular name' ), 'search_items' => __( 'Yönetmen ara' ), 'all_items' => __( 'Tüm yönetmenler' ), 'edit_item' => __( 'Yönetmen düzenle' ), 'update_item' => __( 'Yönetmen güncelle' ), 'add_new_item' => __( 'Yeni yönetmen ekle' ), 'new_item_name' => __( 'Yeni yönetmen adı' ), 'menu_name' => __( 'Yönetmenler' ) ), 'rewrite' => array( 'slug' => 'yonetmen', 'with_front' => false, 'hierarchical' => false ) ) );
  16.         register_taxonomy( 'senaryo', 'post', array( 'hierarchical' => false, 'labels' => array( 'name' => _x( 'Senaryo', 'taxonomy general name' ), 'singular_name' => _x( 'Senaryo', 'taxonomy singular name' ), 'search_items' => __( 'Senarist ara' ), 'all_items' => __( 'Tüm Senaristler' ), 'edit_item' => __( 'Senarist düzenle' ), 'update_item' => __( 'Senarist güncelle' ), 'add_new_item' => __( 'Yeni Senarist Ekle' ), 'new_item_name' => __( 'Yeni Senarist Adı' ), 'menu_name' => __( 'Senaristler' ) ), 'rewrite' => array( 'slug' => 'yonetmen', 'with_front' => false, 'hierarchical' => false ) ) );
  17.     }
  18.  
  19.     function menurenk($items) {
  20.         global $sonradanrenk;
  21.         global $arkarenk;
  22.  
  23.         foreach ($items as ) {
  24.             $item = &[0];
  25.  
  26.             $item->classes[] = $sonradanrenk . ' ' . $arkarenk;
  27.         }
  28.  
  29.         return $items;
  30.     }
  31.  
  32.     function manset() {
  33.         global $arkarenk;
  34.         global $mansetgetir;
  35.         global $manset;
  36.         global $res;
  37.         global $turu;
  38.         global $cozu;
  39.         global $otomatik;
  40.  
  41.         if (( is_home(  ) && !is_paged(  ) )) {
  42.             if ($manset == 1) {
  43.                 echo '<div style="margin:0px auto;">';
  44.                 $i = 12;
  45.                 $post = new WP_Query( $mansetgetir );
  46.  
  47.                 while ($post->have_posts(  )) {
  48.                     $post->the_post(  );
  49.                     ++$i;
  50.  
  51.                     if (( ( ( ( ( ( ( $i == 1 || $i == 4 ) || $i == 7 ) || $i == 10 ) || $i == 13 ) || $i == 16 ) || $i == 19 ) || $i == 22 )) {
  52.                         echo '<div class="sliderbox">';
  53.                     }
  54.  
  55.  
  56.                     if (( ( ( ( ( ( ( $i == 1 || $i == 6 ) || $i == 7 ) || $i == 12 ) || $i == 13 ) || $i == 18 ) || $i == 19 ) || $i == 24 )) {
  57.                         $width = 143;
  58.                         $height = 184;
  59.                         $class = 'buyuk';
  60.                     }
  61. else {
  62.                         $width = 75;
  63.                         $height = 97;
  64.                         $class = 'kucuk';
  65.                     }
  66.  
  67.                     echo '             
  68.                 <a href="';
  69.                     the_permalink(  );
  70.                     echo '" title="';
  71.                     the_title(  );
  72.                     echo '"><img src="';
  73.  
  74.                     if ($otomatik == 'yes') {
  75.                         echo get_option( 'home' );
  76.                         echo '/wp-content/themes/FullHDFilmler.Net/boyut.php?src=';
  77.                         echo get_post_meta( get_the_ID(  ), $res, true );
  78.                         echo '&w=';
  79.                         echo $width;
  80.                         echo '&h=';
  81.                         echo $height;
  82.                         echo '&a=c ';
  83.                     }
  84. else {
  85.                         echo get_post_meta( get_the_ID(  ), $res, true );
  86.                     }
  87.  
  88.                     echo '" width="';
  89.                     echo $width;
  90.                     echo '" height="';
  91.                     echo $height;
  92.                     echo '" alt="';
  93.                     the_title(  );
  94.                     echo '" class="sliderresim';
  95.                     echo $class;
  96.                     echo '" /></a>             
  97.             ';
  98.  
  99.                     if (( ( ( ( ( ( ( $i == 3 || $i == 6 ) || $i == 9 ) || $i == 12 ) || $i == 15 ) || $i == 18 ) || $i == 21 ) || $i == 24 )) {
  100.                         echo '</div>';
  101.                         continue;
  102.                     }
  103.                 }
  104.  
  105.                 echo '</div>
  106.             </div>
  107.             <div id="content" style="margin-top:4px;" class="' . $arkarenk . ' oval3">';
  108.                 return null;
  109.             }
  110.  
  111.  
  112.             if ($manset == 2) {
  113.                 echo '          <div id="manset-ayesoft" class="jcarousel-container jcarousel-container-horizontal">
  114.                 <div style="overflow: hidden; position: relative;" class="jcarousel-clip jcarousel-clip-horizontal">
  115.                     <ul style="overflow: hidden; position: relative; top: 0px; margin: 0px; padding: 0px; left: 0px; width: 2292px;" class="jcarousel-list jcarousel-list-horizontal" id="mans">
  116.                     ';
  117.                 $post = new WP_Query( $mansetgetir );
  118.  
  119.                 while ($post->have_posts(  )) {
  120.                     $post->the_post(  );
  121.                     echo '         
  122.                         <li jcarouselindex="1" style="float: left; list-style: none outside none;" class="jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-1-horizontal">
  123.                             <div class="ayelist2">                                     
  124.                                 ';
  125.                     $tur = get_post_meta( get_the_ID(  ), $turu, 'true' );
  126.  
  127.                     if (!$tur) {
  128.                         $tur = get_option( 'turdefault' );
  129.                     }
  130.  
  131.                     echo '<div class="ayelist2-tur ' . $tur . '">&nbsp;</div>';
  132.                     echo '                                                                                                                                                     
  133.                                 ';
  134.                     $resim = get_post_meta( get_the_ID(  ), $res, true );
  135.  
  136.                     if (!$resim) {
  137.                         $resim = get_option( 'resimdefault' );
  138.                     }
  139.  
  140.                     echo '                              <a href="';
  141.                     the_permalink(  );
  142.                     echo '" title="';
  143.                     the_title(  );
  144.                     echo ' izle"><img class="ayelist-resim" src="';
  145.  
  146.                     if ($otomatik == 'yes') {
  147.                         echo get_option( 'home' );
  148.                         echo '/wp-content/themes/FullHDFilmler.Net/boyut.php?src=';
  149.                         echo get_post_meta( get_the_ID(  ), $res, true );
  150.                         echo '&w=160&h=250&a=c ';
  151.                     }
  152. else {
  153.                         echo get_post_meta( get_the_ID(  ), $res, true );
  154.                     }
  155.  
  156.                     echo '" alt="';
  157.                     the_title(  );
  158.                     echo '" width="160" height="250" /></a>
  159.                                 <div class="spp ';
  160.                     echo $arkarenk;
  161.                     echo '">
  162.                                     <a href="';
  163.                     the_permalink(  );
  164.                     echo '" rel="bookmark" title="';
  165.                     the_title_attribute(  );
  166.                     echo '">';
  167.                     echo get_the_title(  );
  168.                     echo '</a>
  169.                                 </div>                                                         
  170.                                 <div class="ayelist2-alt">                                                             
  171.                                     <div class="ayelist2-alt-izlenme">';
  172.  
  173.                     if (function_exists( 'the_views' )) {
  174.                         the_views(  );
  175.                     }
  176.  
  177.                     echo '</div>
  178.                                     ';
  179.                     $coz = get_post_meta( get_the_ID(  ), $cozu, 'true' );
  180.  
  181.                     if (!$coz) {
  182.                         $coz = get_option( 'cozdefault' );
  183.                     }
  184.  
  185.                     echo '<div class="sagla p' . $coz . '">&nbsp;</div>';
  186.                     echo '                                                                                                                   
  187.                                 </div>  
  188.                             </div>                                 
  189.                         </li>
  190.                     ';
  191.                 }
  192.  
  193.                 echo '     
  194.                     </ul>                  
  195.                 </div>                         
  196.             </div>                     
  197.         </div>
  198.             <div id="content" style="margin-top:4px;" class="';
  199.                 echo $arkarenk;
  200.                 echo ' oval3">
  201.         ';
  202.             }
  203.         }
  204.  
  205.     }
  206.  
  207.     function gununfilmi() {
  208.         global $res;
  209.         global $renk;
  210.  
  211.         if (get_option( 'gununfilmigoster' ) == 'yes') {
  212.             query_posts( 'showposts=1&cat=' . get_option( 'gununfilmikategori' ) );
  213.  
  214.             while (have_posts(  )) {
  215.                 the_post(  );
  216.                 echo '     
  217.      <div class="gununfilmi ';
  218.                 echo $renk;
  219.                 echo '">     
  220.         <img src="';
  221.                 bloginfo( 'template_url' );
  222.                 echo '/images/gununfilmi.png" alt="gunun filmi" class="gunfilm" width="90" height="253" />         
  223.         <a href="';
  224.                 the_permalink(  );
  225.                 echo '" title="';
  226.                 the_title(  );
  227.                 echo '"><img src="';
  228.  
  229.                 if ($otomatik == 'yes') {
  230.                     echo get_option( 'home' );
  231.                     echo '/wp-content/themes/FullHDFilmler.Net/boyut.php?src=';
  232.                     echo get_post_meta( get_the_ID(  ), $res, true );
  233.                     echo '&w=168&h=253&a=c ';
  234.                 }
  235. else {
  236.                     echo get_post_meta( get_the_ID(  ), $res, true );
  237.                 }
  238.  
  239.                 echo '" width="168" height="253" alt="';
  240.                 the_title(  );
  241.                 echo '" class="guncover" /></a>    
  242.      </div>
  243.     ';
  244.             }
  245.         }
  246.  
  247.     }
  248.  
  249.     function headtags() {
  250.         global $manset;
  251.         global $lazy;
  252.  
  253.         echo '
  254.     <head profile="http://gmpg.org/xfn/11">
  255.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  256.     <link rel="stylesheet" href="';
  257.         bloginfo( 'stylesheet_url' );
  258.         echo '" type="text/css" media="screen" />
  259.     <link rel="alternate" type="application/rss+xml" title="';
  260.         bloginfo( 'name' );
  261.         echo ' RSS Feed" href="';
  262.         bloginfo( 'rss2_url' );
  263.         echo '" />
  264.     <link rel="pingback" href="';
  265.         bloginfo( 'pingback_url' );
  266.         echo '" />
  267.     <title>';
  268.         bloginfo( 'name' );
  269.         echo ' ';
  270.  
  271.         if (is_single(  )) {
  272.             echo ' ';
  273.         }
  274.  
  275.         echo ' ';
  276.         wp_title(  );
  277.         echo '</title>
  278.     ';
  279.         echo '<s';
  280.         echo 'cript type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
  281.     ';
  282.         echo '<s';
  283.         echo 'cript type="text/javascript" src="';
  284.         bloginfo( 'template_url' );
  285.         echo '/js/ayesoft.js"></script>
  286.     ';
  287.  
  288.         if ($lazy == 'yes') {
  289.             echo '<script type="text/javascript" src="';
  290.             bloginfo( 'template_url' );
  291.             echo '/js/jquery.lazyload.js"></script>';
  292.         }
  293.  
  294.         echo '  ';
  295.  
  296.         if (get_option( 'bgurl' )) {
  297.             echo '<style>body { background:#000 url(\'' . get_option( 'bgurl' ) . '\') top center repeat;background-attachment:fixed; }</style>';
  298.         }
  299. else {
  300.             if (get_option( 'bgcl' )) {
  301.                 echo '<style>body { background:#' . get_option( 'bgcl' ) . '; }</style>';
  302.             }
  303.         }
  304.  
  305.         echo
  306.     ';
  307.         wp_head(  );
  308.         echo '  ';
  309.  
  310.         if ($manset == 2) {
  311.             echo '  ';
  312.             echo '<s';
  313.             echo 'cript type="text/javascript" src="';
  314.             bloginfo( 'template_url' );
  315.             echo '/js/jquery.jcarousel.min.js"></script>   
  316.     ';
  317.             echo '<s';
  318.             echo 'cript type="text/javascript">
  319.     function mycarousel_initCallback(carousel)
  320.     {              
  321.         carousel.buttonNext.hover(function() {
  322.             carousel.stopAuto();
  323.         }, function() {
  324.             carousel.startAuto();
  325.         });
  326.         carousel.buttonPrev.hover(function() {
  327.             carousel.stopAuto();
  328.         }, function() {
  329.             carousel.startAuto();
  330.         });
  331.         // Pause autoscrolling if the user moves with the cursor over the clip.
  332.         carousel.clip.h';
  333.             echo 'over(function() {
  334.             carousel.stopAuto();
  335.         }, function() {
  336.             carousel.startAuto();
  337.         });
  338.     };
  339.     jQuery(document).ready(function() {
  340.         jQuery(\'#manset-ayesoft\').jcarousel({
  341.             auto: 2,
  342.             wrap: \'circular\',
  343.             initCallback: mycarousel_initCallback
  344.         });
  345.     });
  346.     </script>
  347.     ';
  348.         }
  349.  
  350.         echo get_option( 'head' );
  351.         echo
  352. ';
  353.     }
  354.  
  355.     function yazi_yonlendir() {
  356.         global $wpdb;
  357.  
  358.         $query = '' . 'SELECT ID FROM ' . $wpdb->posts . ' WHERE post_type = \'post\' AND post_password = \'\' AND post_status = \'publish\' ORDER BY RAND() LIMIT 1';
  359.  
  360.         if (isset( $_GET['random_cat_id'] )) {
  361.             $random_cat_id = (int)$_GET['random_cat_id'];
  362.             $query = '' . 'SELECT DISTINCT ID FROM ' . $wpdb->posts . ' AS p INNER JOIN ' . $wpdb->term_relationships . ' AS tr ON (p.ID = tr.object_id AND tr.term_taxonomy_id = ' . $random_cat_id . ') INNER JOIN  ' . $wpdb->term_taxonomy . ' AS tt ON(tr.term_taxonomy_id = tt.term_taxonomy_id AND taxonomy = \'category\') WHERE post_type = \'post\' AND post_password = \'\' AND     post_status = \'publish\' ORDER BY RAND() LIMIT 1';
  363.         }
  364.  
  365.  
  366.         if (isset( $_GET['random_post_type'] )) {
  367.             $post_type = preg_replace( '|[^a-z]|i', '', $_GET['random_post_type'] );
  368.             $query = '' . 'SELECT ID FROM ' . $wpdb->posts . ' WHERE post_type = \'' . $post_type . '\' AND post_password = \'\' AND post_status = \'publish\' ORDER BY RAND() LIMIT 1';
  369.         }
  370.  
  371.         $random_id = $wpdb->get_var( $query );
  372.         wp_redirect( get_permalink( $random_id ) );
  373.         exit(  );
  374.     }
  375.  
  376.     function author() {
  377.         global $authordata;
  378.  
  379.         $nick = get_the_author(  );
  380.         $mail = get_the_author_email(  );
  381.         $gravatar = 'http://www.gravatar.com/avatar.php?gravatar_id=' . md5( $mail );
  382.         $div_id = 'a' . get_the_ID(  );
  383.         $author_posts_link = get_author_posts_url( $authordata->ID, $authordata->user_nicename );
  384.         $hidden_div = '<span id="' . $div_id . '" class="mydiv" style="display:none;"><img src="' . $gravatar . '" alt="gravatar" /><span class="ae_close"><a href="javascript:;" onmousedown="toggleDiv(\'' . $div_id . '\');">Kapat</a></span><span class="ae_top"><b>Yazar: ' . get_the_author(  ) . '</b></span>
  385.         <span class="ae_body"><b>Adı</b>: ' . get_the_author_firstname(  ) . ' ' . get_the_author_lastname(  ) . '<br /><b>Email:</b> ' . get_the_author_email(  ) . '<br /><b>Site:</b> <a href="' . get_the_author_url(  ) . '">' . get_the_author_url(  ) . '</a><br /></span><span class="ae_about"><b>Hakkında:</b> ' . get_the_author_description(  ) . '</span><span class="ae_body"><a href="' . $author_posts_link . '">Tüm yazılarını göster</a> (' . get_the_author_posts(  ) . ')</span></span>';
  386.         echo '<a href="javascript:;" onmousedown="toggleDiv(\'' . $div_id . '\');">' . $nick . '</a>' . $hidden_div;
  387.     }
  388.  
  389.     function ballon_setcontent($contenido_post) {
  390.         preg_match_all( '/\[(.*?)\|(.*?)\]/', $contenido_post, $ToolTiposIDs );
  391.         foreach ($ToolTiposIDs[0] as $tooltip) {
  392.             $palillo = strpos( $Instancia, '|' );
  393.             $tooltip = $palabrasubrayada = substr( $Instancia, 1, $palillo - 1 );
  394.             substr( $tooltip, 0, strlen( $tooltip ) - 1 );
  395.             $SpanToolTipo = '<span class="ballon" onmouseover="tooltip.show(' . '\'' . $tooltip . '\'' . ');" onmouseout="tooltip.hide();">' . $palabrasubrayada . '</span>&nbsp;';
  396.             str_replace( $Instancia, $SpanToolTipo, $contenido_post );
  397.             $contenido_post = substr( $Instancia, $palillo + 1 );
  398.         }
  399.  
  400.         return $contenido_post;
  401.     }
  402.  
  403.     function wpbx_comment($comment, $args, $depth) {
  404.         $GLOBALS['comment'] = $comment;
  405.         $commenter = get_comment_author_link(  );
  406.  
  407.         if (ereg( '<a[^>]* class=[^>]+>', $commenter )) {
  408.             $commenter = ereg_replace( '(<a[^>]* class=[\'"]?)', 'url ', $commenter );
  409.         }
  410. else {
  411.             $commenter = ereg_replace( '(<a )/', 'class="url "', $commenter );
  412.         }
  413.  
  414.         $avatar_email = get_comment_author_email(  );
  415.         $avatarURL = get_bloginfo( 'template_directory' );
  416.         $avatar = str_replace( 'class=\'avatar', 'class=\'avatar', get_avatar( $avatar_email, 40, $default = $avatarURL . '/images/avatar.jpg' ) );
  417.         echo '  <li ';
  418.         comment_class(  );
  419.         echo ' id="comment-';
  420.         comment_ID(  );
  421.         echo '">
  422.         <div id="div-comment-';
  423.         comment_ID(  );
  424.         echo '">
  425.             <div class="comment-author vcard">
  426.                 ';
  427.         echo $avatar . ' <span class="fn n">' . $commenter . '</span>';
  428.         echo '          </div>
  429.  
  430.             <div class="comment-meta">
  431.                 ';
  432.         printf( __( '%1$s' ), get_comment_date(  ), get_comment_time(  ), '#comment-' . get_comment_ID(  ) );
  433.         echo '              ';
  434.         echo '<s';
  435.         echo 'pan class="reply-link">
  436.                     ';
  437.         echo '<s';
  438.         echo 'pan class="meta-sep">|</span> ';
  439.         comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );
  440.         echo '              </span>    ';
  441.         echo '<s';
  442.         echo 'pan class="ratings">  ';
  443.  
  444.         if (function_exists( ckrating_display_karma )) {
  445.             ckrating_display_karma(  );
  446.         }
  447.  
  448.         echo '</span>
  449.             </div>
  450.  
  451.             ';
  452.  
  453.         if ($comment->comment_approved == '0') {
  454.             _e( '                   <span class=\'unapproved\'>Yorumunuz onay bekliyor.</span>
  455. ', 'wpbx' );
  456.         }
  457.  
  458.         echo '
  459.             <div class="comment-content">';
  460.         comment_text(  );
  461.         echo '</div>
  462.  
  463.         </div>
  464. ';
  465.     }
  466.  
  467.     function wpbx_comments($file) {
  468.         if (!function_exists( 'wp_list_comments' )) {
  469.             $file = TEMPLATEPATH . '/comments.old.php';
  470.         }
  471.  
  472.         return $file;
  473.     }
  474.  
  475.     function comment_add_microid($classes) {
  476.         $c_email = get_comment_author_email(  );
  477.         $c_url = get_comment_author_url(  );
  478.  
  479.         if (( !empty( $c_email ) && !empty( $c_url ) )) {
  480.             $microid = 'microid-mailto+http:sha1:' . sha1( sha1( 'mailto:' . $c_email ) . sha1( $c_url ) );
  481.             $classes[] = $microid;
  482.         }
  483.  
  484.         return $classes;
  485.     }
  486.  
  487.     function rel_nofollow($icerik) {
  488.         return $icerik;
  489.     }
  490.  
  491.     function cevir($string) {
  492.         $eng = array( 'ÅŸ', 'ÅŸ', 'ÄŸ', 'ÄŸ', 'ı', 'Ä°', 'ç', 'Ç', 'ö', 'Ö', 'ü', 'Ãœ', '’', '‘    ' );
  493.         $tr = array( 'ş', 'Ş', 'ğ', 'Ğ', 'ı', 'İ', 'ç', 'Ç', 'ö', 'Ö', 'ü', 'Ğ', '\\'', '\\'' );
  494.         $string = str_replace( $eng, $tr, $string );
  495.         return $string;
  496.     }
  497.  
  498.     function istatistik() {
  499.         global $wpdb;
  500.  
  501.         $categories = $args = array( 'orderby' => 'name', 'order' => 'ASC' );
  502.         $cat_count = 11;
  503.         foreach ($categories as $c) {
  504.             ++$cat_count;
  505.         }
  506.  
  507.         wp_count_posts(  );
  508.         $count_posts = get_categories( $args );
  509.         $published = $count_posts->publish;
  510.         return 'Sitemizde <span style="font-weight:bold;">' . $cat_count . '</span> kategori\'de <span style="font-weight:bold;">' . $published . '</span> film ve <span style="font-weight:bold;">' . $wpdb->get_var( '' . 'SELECT COUNT(*) FROM ' . $wpdb->comments . ' WHERE comment_approved = \'1\'' ) . '</span> yorum bulunmaktadır.';
  511.     }
  512.  
  513.     function wp_link_pages_titled($args = '') {
  514.         global $renk;
  515.         global $sonradanrenk;
  516.         global $arkarenk;
  517.  
  518.         $defaults = array( 'before' => '<div class="nav_link">', 'after' => '</div>', 'link_before' => '<span class="page_number ' . $sonradanrenk . ' ' . $arkarenk . ' oval3">', 'link_before_none' => '<span class="page_number ' . $renk . ' oval3">', 'link_after' => '</span>', 'link_after_none' => '</span>', 'echo' => 1 );
  519.         $r = wp_parse_args( $args, $defaults );
  520.         extract( $r, EXTR_SKIP );
  521.         global $page;
  522.         global $numpages;
  523.         global $multipage;
  524.         global $more;
  525.         global $pagenow;
  526.         global $pages;
  527.  
  528.         $output = '';
  529.  
  530.         if ($multipage) {
  531.             $output .= $before;
  532.             $j = 11;
  533.             $i = 12;
  534.  
  535.             while ($i < $numpages + 1) {
  536.                 $title = '';
  537.                 $link = 11;
  538.                 $part_content = $pages[$i - 1];
  539.                 $has_part_title = strpos( $part_content, '<!--baslik:' );
  540.  
  541.                 if (0 === $has_part_title) {
  542.                     $end = strpos( $part_content, '-->' );
  543.                     $title = trim( str_replace( '<!--baslik:', '', substr( $part_content, 0, $end ) ) );
  544.                 }
  545.  
  546.                 $output .= ' ';
  547.  
  548.                 if (( $i != $page || ( !$more && $page == 1 ) )) {
  549.                     $output .= _wp_link_page( $i );
  550.                     $link = 12;
  551.                 }
  552.  
  553.                 $title = (( isset( $title ) && 0 < strlen( $title ) ) ? $title : $i . '. Part');
  554.  
  555.                 if ($link == 1) {
  556.                     $output .= $link_before . $title . $link_after;
  557.                 }
  558. else {
  559.                     $output .= $link_before_none . $title . $link_after_none;
  560.                 }
  561.  
  562.  
  563.                 if (( $i != $page || ( !$more && $page == 1 ) )) {
  564.                     $output .= '</a>';
  565.                 }
  566.  
  567.                 $i = $i + 1;
  568.             }
  569.  
  570.             $output .= $after;
  571.         }
  572.  
  573.         echo $output;
  574.     }
  575.  
  576.     function filmsecenekleri() {
  577.         wp_enqueue_script( 'media-upload' );
  578.         wp_enqueue_script( 'thickbox' );
  579.         wp_enqueue_style( 'thickbox' );
  580.         wp_register_script( 'fors-upload', '/wp-content/themes/FullHDFilmler.Net/js/upload.js', array( 'jquery' ) );
  581.         wp_enqueue_script( 'fors-upload' );
  582.         add_meta_box( 'post-meta-boxes', __( 'Film Bilgileri', 'ayesoft' ), 'kutu_getir', 'post', 'normal', 'high' );
  583.     }
  584.  
  585.     function kutular() {
  586.         global $turu;
  587.         global $cozu;
  588.         global $res;
  589.         global $ackk;
  590.  
  591.         $meta_boxes = array( $ackk => array( 'name' => $ackk, 'title' => __( 'Açıklama:', 'ayesfot' ), 'type' => 'textarea' ), $res => array( 'name' => $res, 'title' => __( 'Resim:', 'ayesoft' ), 'type' => 'text', 'desc' => '' ), $turu => array( 'name' => $turu, 'title' => __( 'Dublaj:', 'ayesoft' ), 'type' => 'selecttur', 'options' => array( 'Türkçe Dublaj', 'Türkçe Altyazılı', 'Yerli Yapım', 'Fragman/Yakında' ), 'options2' => array( 'td', 'ta', 'yy', 'yk' ) ), $cozu => array( 'name' => $cozu, 'title' => __( 'Kalite:', 'ayesoft' ), 'type' => 'selecttur', 'options' => array( '240p', '360p', '480p', '720p [HD]', '1080p [FULL HD]' ), 'options2' => array( '240', '360', '480', '720', '1080' ) ) );
  592.         return apply_filters( 'kutular', $meta_boxes );
  593.     }
  594.  
  595.     function kutu_getir() {
  596.         global $post;
  597.  
  598.         $meta_boxes = kutular(  );
  599.         echo '  <table class="form-table">
  600.     ';
  601.         foreach ($meta_boxes as $meta) {
  602.             $value = get_post_meta( $post->ID, $meta['name'], true );
  603.  
  604.             if ($meta['type'] == 'text') {
  605.                 kutu_input( $meta, $value );
  606.                 continue;
  607.             }
  608.  
  609.  
  610.             if ($meta['type'] == 'textarea') {
  611.                 kutu_textarea( $meta, $value );
  612.                 continue;
  613.             }
  614.  
  615.  
  616.             if ($meta['type'] == 'selecttur') {
  617.                 kutu_selecttur( $meta, $value );
  618.                 continue;
  619.             }
  620.         }
  621.  
  622.         echo '  </table>
  623. ';
  624.     }
  625.  
  626.     function kutu_input($args = array(  ), $value = false) {
  627.         extract( $args );
  628.         echo '  <tr>
  629.         <th style="width:20%;">
  630.             <label for="';
  631.         echo $name;
  632.         echo '">';
  633.         echo $title;
  634.         echo '</label><br />
  635.             <img id="fors-logo-img" src="';
  636.         echo wp_specialchars( $value, 1 );
  637.         echo '" width="80">
  638.         </th>
  639.         <td>           
  640.             <input type="text" class="fors-upload" name="';
  641.         echo $name;
  642.         echo '" id="';
  643.         echo $name;
  644.         echo '" value="';
  645.         echo wp_specialchars( $value, 1 );
  646.         echo '" size="30" tabindex="30" style="width: 400px;margin-top:-3px;" />
  647.             <input id="fors-upload-button" type="button" class="button" value="Resim Yükle" />
  648.             <input type="hidden" name="';
  649.         echo $name;
  650.         echo '_noncename" id="';
  651.         echo $name;
  652.         echo '_noncename" value="';
  653.         echo wp_create_nonce( plugin_basename( __FILE__ ) );
  654.         echo '" />
  655.             <br />
  656.             <p class="description">';
  657.         echo $desc;
  658.         echo '</p>
  659.         </td>
  660.     </tr>
  661.     ';
  662.     }
  663.  
  664.     function kutu_selecttur($args = array(  ), $value = false) {
  665.         extract( $args );
  666.         echo '  <tr>
  667.         <th style="width:20%;">
  668.             <label for="';
  669.         echo $name;
  670.         echo '">';
  671.         echo $title;
  672.         echo '</label>
  673.         </th>
  674.         <td>
  675.             ';
  676.         echo '<s';
  677.         echo 'elect style="width:372px;" name="';
  678.         echo $name;
  679.         echo '" id="';
  680.         echo $name;
  681.         echo '">
  682.             ';
  683.         $i = 11;
  684.         foreach ($options as $option) {
  685.             echo '              <option ';
  686.  
  687.             if (htmlentities( $value, ENT_QUOTES ) == $options2[$i]) {
  688.                 echo ' selected="selected"';
  689.             }
  690.  
  691.             echo ' value="';
  692.             echo $options2[$i];
  693.             echo '">
  694.                     ';
  695.             echo $option;
  696.             echo '              </option>
  697.             ';
  698.             ++$i;
  699.         }
  700.  
  701.         echo '          </select>
  702.             <input type="hidden" name="';
  703.         echo $name;
  704.         echo '_noncename" id="';
  705.         echo $name;
  706.         echo '_noncename" value="';
  707.         echo wp_create_nonce( plugin_basename( __FILE__ ) );
  708.         echo '" />
  709.         </td>
  710.     </tr>
  711.     ';
  712.     }
  713.  
  714.     function kutu_textarea($args = array(  ), $value = false) {
  715.         extract( $args );
  716.         echo '  <tr>
  717.         <th style="width:20%;">
  718.             <label for="';
  719.         echo $name;
  720.         echo '">';
  721.         echo $title;
  722.         echo '</label>
  723.         </th>
  724.         <td>
  725.             <textarea name="';
  726.         echo $name;
  727.         echo '" id="';
  728.         echo $name;
  729.         echo '" cols="60" rows="4" tabindex="30" style="width: 97%;margin-top:-3px;">';
  730.         echo wp_specialchars( $value, 1 );
  731.         echo '</textarea>
  732.             <input type="hidden" name="';
  733.         echo $name;
  734.         echo '_noncename" id="';
  735.         echo $name;
  736.         echo '_noncename" value="';
  737.         echo wp_create_nonce( plugin_basename( __FILE__ ) );
  738.         echo '" />
  739.             <p class="description">';
  740.         echo $desc;
  741.         echo '</p>
  742.         </td>
  743.     </tr>
  744.     ';
  745.     }
  746.  
  747.     function secenekkaydet($post_id) {
  748.         global $post;
  749.  
  750.         $meta_boxes = array_merge( kutular(  ) );
  751.         foreach ($meta_boxes as $meta_box) {
  752.  
  753.             if (!wp_verify_nonce( $_POST[$meta_box['name'] . '_noncename'], plugin_basename( __FILE__ ) )) {
  754.                 return $post_id;
  755.             }
  756.  
  757.  
  758.             if (( 'post' == $_POST['post_type'] && !current_user_can( 'edit_post', $post_id ) )) {
  759.                 return $post_id;
  760.             }
  761.  
  762.             $data = stripslashes( $_POST[$meta_box['name']] );
  763.  
  764.             if (get_post_meta( $post_id, $meta_box['name'] ) == '') {
  765.                 add_post_meta( $post_id, $meta_box['name'], $data, true );
  766.                 continue;
  767.             }
  768.  
  769.  
  770.             if ($data != get_post_meta( $post_id, $meta_box['name'], true )) {
  771.                 update_post_meta( $post_id, $meta_box['name'], $data );
  772.                 continue;
  773.             }
  774.  
  775.  
  776.             if ($data == '') {
  777.                 delete_post_meta( $post_id, $meta_box['name'], get_post_meta( $post_id, $meta_box['name'], true ) );
  778.                 continue;
  779.             }
  780.         }
  781.  
  782.     }
  783.  
  784.  
  785.     if (file_exists( TEMPLATEPATH . '/lisans.php' )) {
  786.         include_once( 'lisans.php' );
  787.     }
  788.  
  789.  
  790.     if (( $key && $key != 'AYESOFT-freelicanse' )) {
  791.         $domain = str_replace( 'www.', '', $_SERVER['HTTP_HOST'] );
  792.         $domain = sha1( $domain . 'Kırılmayan0313Lisans0515Sistemi0717İstiyoruz0919' . dechex( ord( $domain[3] ) ) );
  793.         $domain = 'AYESOFT-' . md5( $domain ) . $keycont;
  794.  
  795.         if ($key == $domain) {
  796.             $kontrol = 12;
  797.         }
  798.     }
  799.  
  800.  
  801.     if ($kontrol != 2) {
  802.         $y_url = 'http://www.fullfilmdiziizle.net/';
  803.         $output = @file_get_contents( @dirname( __FILE__ ) . '/footer.php' );
  804.  
  805.         if (!is_admin(  )) {
  806.             $check = '<a href="http://www.fullfilmdiziizle.net" title="film izle">film izle</a>';
  807.  
  808.             if (!strpos( $output, $check )) {
  809.                 exit( '<script>window.location="' . $y_url . '";</script>' );
  810.             }
  811.  
  812.             $tmp = strrev( substr( $output, 0, strpos( $output, $check ) ) );
  813.             $pos1 = strpos( $tmp, '--!<' );
  814.             $pos2 = strpos( $tmp, '>--' );
  815.  
  816.             if (( $pos1 < $pos2 || ( $pos1 && !$pos2 ) )) {
  817.                 exit( '<script>window.location="' . $y_url . '";</script>' );
  818.             }
  819.  
  820.  
  821.             if (( preg_match( '/\/\*/', $tmp ) || preg_match( '/\*\//', $tmp ) )) {
  822.                 exit( '<script>window.location="' . $y_url . '";</script>' );
  823.             }
  824.         }
  825.     }
  826.  
  827.  
  828.     if (file_exists( TEMPLATEPATH . '/adminpaneli.php' )) {
  829.         include_once( 'adminpaneli.php' );
  830.     }
  831.  
  832.     $turu = get_option( 'tur' );
  833.     $cozu = get_option( 'coz' );
  834.     $res = get_option( 'resim' );
  835.     $lazy = get_option( 'lazy' );
  836.     $ackk = get_option( 'aciklama' );
  837.     $arkarenk = get_option( 'arkaplan' ) . get_option( 'arkaplansaydam' );
  838.     $arkarenk2 = 'siyah80';
  839.     $renk = get_option( '2renk' ) . get_option( '2renksaydam' );
  840.     $sonradanrenk = 'sonradan' . get_option( '2renk' ) . get_option( '2renksaydam' );
  841.     $stil = get_option( 'anasayfa' );
  842.     $gosterim = get_option( 'gosterim' );
  843.     $begenilengetir = 'post_type=post&r_sortby=highest_rated&r_orderby=desc';
  844.     $izlenengetir = 'post_type=post&v_sortby=views&v_orderby=desc';
  845.     $yorumlanangetir = 'post_type=post&orderby=comment_count&v_orderby=desc';
  846.     $p240 = 'meta_key=' . $cozu . '&orderby=date&order=DESC&meta_value=240';
  847.     $p360 = 'meta_key=' . $cozu . '&orderby=date&order=DESC&meta_value=360';
  848.     $p480 = 'meta_key=' . $cozu . '&orderby=date&order=DESC&meta_value=480';
  849.     $p720 = 'meta_key=' . $cozu . '&orderby=date&order=DESC&meta_value=720';
  850.     $p1080 = 'meta_key=' . $cozu . '&orderby=date&order=DESC&meta_value=1080';
  851.     $turkcedublaj = 'meta_key=' . $turu . '&orderby=date&order=DESC&meta_value=td';
  852.     $turkcealtyazi = 'meta_key=' . $turu . '&orderby=date&order=DESC&meta_value=ta';
  853.     $yerliyapim = 'meta_key=' . $turu . '&orderby=date&order=DESC&meta_value=yy';
  854.     $fragman = 'meta_key=' . $turu . '&orderby=date&order=DESC&meta_value=yk';
  855.     $dublajgoster = get_option( 'dublajgoster' );
  856.     $manset = get_option( 'manset' );
  857.     $otomatik = get_option( 'otomatikboyut' );
  858.     $mansettur = get_option( 'mansettur' );
  859.     $mansetkategori = get_option( 'mansetkategori' );
  860.  
  861.     if ($mansettur == 1) {
  862.         $mansetgetir = $begenilengetir . '&showposts=21';
  863.     }
  864. else {
  865.         if ($mansettur == 2) {
  866.             $mansetgetir = $izlenengetir . '&showposts=21';
  867.         }
  868. else {
  869.             if ($mansettur == 3) {
  870.                 $mansetgetir = $yorumlanangetir . '&showposts=21';
  871.             }
  872. else {
  873.                 if ($mansettur == 4) {
  874.                     $mansetgetir = 'post_type=post&showposts=21';
  875.                 }
  876. else {
  877.                     if ($mansettur == 5) {
  878.                         $mansetgetir = 'post_type=post&cat=' . $mansetkategori . '&showposts=21';
  879.                     }
  880. else {
  881.                         if ($mansettur == 6) {
  882.                             $mansetgetir = 'post_type=post&showposts=21&orderby=rand';
  883.                         }
  884. else {
  885.                             if ($mansettur == 7) {
  886.                                 $mansetgetir = 'post_type=post&cat=' . $mansetkategori . '&showposts=21&orderby=rand';
  887.                             }
  888.                         }
  889.                     }
  890.                 }
  891.             }
  892.         }
  893.     }
  894.  
  895.  
  896.     if ($stil == 1) {
  897.         $genislik = 220;
  898.         $yukseklik = 330;
  899.     }
  900. else {
  901.         if ($stil == 2) {
  902.             $genislik = 170;
  903.             $yukseklik = 260;
  904.         }
  905. else {
  906.             if ($stil == 3) {
  907.                 $genislik = 170;
  908.                 $yukseklik = 130;
  909.             }
  910.         }
  911.     }
  912.  
  913.     add_action( 'init', 'add_custom_taxonomies', 0 );
  914.     add_filter( 'wp_nav_menu_objects', 'menurenk' );
  915.  
  916.     if (isset( $_GET['rastgele'] )) {
  917.         add_action( 'template_redirect', 'yazi_yonlendir' );
  918.     }
  919.  
  920.     add_theme_support( 'nav-menus' );
  921.     register_nav_menus( array( 'primary' => __( 'Ust Menu', 'twentyten' ) ) );
  922.     add_filter( 'the_content', 'ballon_setcontent' );
  923.  
  924.     if (function_exists( 'register_sidebar' )) {
  925.         register_sidebar( array( 'name' => 'Sidebar 1', 'before_widget' => '<div class="sidebar oval3 ' . $arkarenk . '">', 'after_widget' => '</div>', 'before_title' => '<div class="labels ' . $renk . ' oval3" style="padding-top:10px;">', 'after_title' => '</div>' ) );
  926.     }
  927.  
  928.     add_action( 'admin_menu', 'filmsecenekleri' );
  929.     add_action( 'save_post', 'secenekkaydet' );
  930. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement