Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2013
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.69 KB | None | 0 0
  1. <?php
  2. $isMobile = false;
  3. $isBot = false;
  4. $op = strtolower($_SERVER['HTTP_X_OPERAMINI_PHONE']);
  5. $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
  6. $ac = strtolower($_SERVER['HTTP_ACCEPT']);
  7. $ip = $_SERVER['REMOTE_ADDR'];
  8. $isMobile = strpos($ac, 'application/vnd.wap.xhtml+xml') !== false
  9.         || $op != ''
  10.         || strpos($ua, 'android') !== false
  11.         || strpos($ua, 'sony') !== false
  12.         || strpos($ua, 'symbian') !== false
  13.         || strpos($ua, 'nokia') !== false
  14.         || strpos($ua, 'samsung') !== false
  15.         || strpos($ua, 'mobile') !== false
  16.         || strpos($ua, 'windows ce') !== false
  17.         || strpos($ua, 'epoc') !== false
  18.         || strpos($ua, 'opera mini') !== false
  19.         || strpos($ua, 'nitro') !== false
  20.         || strpos($ua, 'j2me') !== false
  21.         || strpos($ua, 'midp-') !== false
  22.         || strpos($ua, 'cldc-') !== false
  23.         || strpos($ua, 'netfront') !== false
  24.         || strpos($ua, 'mot') !== false
  25.         || strpos($ua, 'up.browser') !== false
  26.         || strpos($ua, 'up.link') !== false
  27.         || strpos($ua, 'audiovox') !== false
  28.         || strpos($ua, 'blackberry') !== false
  29.         || strpos($ua, 'ericsson,') !== false
  30.         || strpos($ua, 'panasonic') !== false
  31.         || strpos($ua, 'philips') !== false
  32.         || strpos($ua, 'sanyo') !== false
  33.         || strpos($ua, 'sharp') !== false
  34.         || strpos($ua, 'sie-') !== false
  35.         || strpos($ua, 'portalmmm') !== false
  36.         || strpos($ua, 'blazer') !== false
  37.         || strpos($ua, 'avantgo') !== false
  38.         || strpos($ua, 'danger') !== false
  39.         || strpos($ua, 'palm') !== false
  40.         || strpos($ua, 'series60') !== false
  41.         || strpos($ua, 'palmsource') !== false
  42.         || strpos($ua, 'pocketpc') !== false
  43.         || strpos($ua, 'smartphone') !== false
  44.         || strpos($ua, 'rover') !== false
  45.         || strpos($ua, 'ipaq') !== false
  46.         || strpos($ua, 'au-mic,') !== false
  47.         || strpos($ua, 'alcatel') !== false
  48.         || strpos($ua, 'ericy') !== false
  49.         || strpos($ua, 'up.link') !== false
  50.         || strpos($ua, 'vodafone/') !== false
  51.         || strpos($ua, 'wap1.') !== false
  52.         || strpos($ua, 'wap2.') !== false;
  53.  
  54.         $isBot =  $ip == '66.249.65.39'
  55.         || strpos($ua, 'googlebot') !== false
  56.         || strpos($ua, 'mediapartners') !== false
  57.         || strpos($ua, 'yahooysmcm') !== false
  58.         || strpos($ua, 'baiduspider') !== false
  59.         || strpos($ua, 'msnbot') !== false
  60.         || strpos($ua, 'slurp') !== false
  61.         || strpos($ua, 'ask') !== false
  62.         || strpos($ua, 'teoma') !== false
  63.         || strpos($ua, 'spider') !== false
  64.         || strpos($ua, 'heritrix') !== false
  65.         || strpos($ua, 'attentio') !== false
  66.         || strpos($ua, 'twiceler') !== false
  67.         || strpos($ua, 'irlbot') !== false
  68.         || strpos($ua, 'fast crawler') !== false                        
  69.         || strpos($ua, 'fastmobilecrawl') !== false
  70.         || strpos($ua, 'jumpbot') !== false
  71.         || strpos($ua, 'googlebot-mobile') !== false
  72.         || strpos($ua, 'yahooseeker') !== false
  73.         || strpos($ua, 'motionbot') !== false
  74.         || strpos($ua, 'mediobot') !== false
  75.         || strpos($ua, 'chtml generic') !== false
  76.         || strpos($ua, 'nokia6230i/. fast crawler') !== false;
  77.  
  78. ?>
  79. <!doctype html>
  80.  
  81. <html <?php language_attributes(); ?>>
  82.  
  83. <head>
  84.  
  85. <a href="https://plus.google.com/114939780181587128687" rel="publisher">Google+</a>
  86.  
  87.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  88.  
  89.      
  90.  
  91.         <title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>
  92.  
  93.        
  94.  
  95.         <!-- Stylesheets -->
  96.  
  97.         <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="all" />                       <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/responsive.css" type="text/css" media="screen" />
  98.  
  99.        
  100.  
  101.         <!-- Example Stylesheets To Write Your Own Styles - remove comments and you will see blue skin -->     
  102.  
  103.         <!--<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/skin/blue/blue.css" type="text/css" media="all" />--> 
  104.  
  105.        
  106.  
  107.         <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  108.  
  109.         <link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'rss2_url' ); ?>" />
  110.  
  111.         <link rel="alternate" type="application/atom+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'atom_url' ); ?>" />      
  112.        
  113.         <link href='http://fonts.googleapis.com/css?family=Graduate' rel='stylesheet' type='text/css'>
  114.        
  115.         <link href='http://fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
  116.  
  117.        
  118.  
  119.         <?php if ( function_exists( 'ot_get_option' ) ) { ?>
  120.  
  121.         <!-- FAVICON -->
  122.  
  123.         <link rel="shortcut icon" href="<?php echo ot_get_option( 'favicon' ); ?>" />
  124.  
  125.         <?php } ?>
  126.  
  127.        
  128.  
  129.         <?php
  130.  
  131.         if ( is_singular() )
  132.        
  133.  
  134.        
  135.         wp_enqueue_script( 'comment-reply' );
  136.  
  137.         wp_head();
  138.  
  139.        
  140.        
  141.        
  142.  
  143.         ?>
  144.  
  145.  
  146.         <script src="<?php echo get_template_directory_uri(); ?>/js/jstz.js" language="javascript" type="text/javascript"></script>
  147.     <script type="text/javascript">
  148.     jQuery(document).ready(function() {
  149.         if("<?php echo $_SESSION['time']; ?>".length==0){
  150.             //var visitortime = new Date();
  151.            // var visitortimezone = "GMT " + -visitortime.getTimezoneOffset()/60;
  152.            var tz = jstz.determine(); // Determines the time zone of the browser client
  153.     var visitortimezone = tz.name(); // Returns the name of the time zone eg "Europe/Berlin"
  154.             jQuery.ajax({
  155.                 type: "GET",
  156.                 url: "<?php echo home_url(); ?>/timezone.php",
  157.                 data: 'time='+ visitortimezone,
  158.                 success: function(){
  159.                    
  160.                 }
  161.             });
  162.         }
  163.     });
  164. </script>                  
  165.  
  166. </head>
  167.  
  168. <!--[if lt IE 7 ]> <body <?php body_class( 'ie6' ); ?>> <![endif]-->
  169.  
  170. <!--[if IE 7 ]>    <body <?php body_class( 'ie7' ); ?>> <![endif]-->
  171.  
  172. <!--[if IE 8 ]>    <body <?php body_class( 'ie8' ); ?>> <![endif]-->
  173.  
  174. <!--[if IE 9 ]>    <body <?php body_class( 'ie9' ); ?>> <![endif]-->
  175.  
  176. <!--[if (gt IE 9)|!(IE)]><!--> <body <?php body_class(); ?>> <!--<![endif]-->
  177.  
  178.  
  179. <!-- ============= HEADER STARTS HERE ============== -->
  180.     <div class="header-wrapper-ras">
  181.         <div id="header-wrapper">
  182.                 <div id="header">
  183.                     <!-- WEBSITE LOGO -->
  184.                         <?php if($isMobile){?>
  185.                         <?php if ( function_exists( 'ot_get_option' ) ) { ?>
  186.                         <a href="<?php echo home_url(); ?>"><img src="<?php echo ot_get_option( 'header_logo_image'); ?>" alt="<?php bloginfo( 'name' ); ?>" class="logo" width="400" /></a>
  187.  
  188.                             <?php } ?>
  189.  
  190.                             <?php } else if(!is_front_page()){?>
  191.  
  192.                             <a href="<?php echo home_url(); ?>">
  193.  
  194.                             <img src="<?php echo ot_get_option( 'header_logo_image'); ?>" alt="<?php bloginfo( 'name' ); ?>" class="logo" width="400" />
  195.  
  196.                             </a>
  197.  
  198. <?php } else{
  199. ?>
  200. <div class="ras-flash"><a href="<?php echo home_url(); ?>" style="position:absolute; top:40px; left:0px; z-index:1000;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/blank.gif" alt="<?php bloginfo( 'name' ); ?>" width="400"  height="74"/></a>                            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="182" id="homelogo" align="middle" wmode="transparent" class="logo" style="cursor:pointer;">                           <param name="allowScriptAccess" value="sameDomain" />                           <param name="LOOP" value="false" />                         <param name="movie" value="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" quality="high" loop="false" bgcolor="#0a206b" width="400" height="182" name="homelogo" align="middle" allowScriptAccess="sameDomain" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="cursor:pointer;" />                          </object>                           </div><div class="ras-flash1"><a href="<?php echo home_url(); ?>" style="position:absolute; top:0px; left:0px; z-index:1000;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/blank.gif" alt="<?php bloginfo( 'name' ); ?>" width="400"  height="74"/></a>                          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="182" id="homelogo" align="middle" wmode="transparent" class="logo" style="cursor:pointer;">                           <param name="allowScriptAccess" value="sameDomain" />                           <param name="LOOP" value="false" />                         <param name="movie" value="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" quality="high" loop="false" bgcolor="#0a206b" width="400" height="182" name="homelogo" align="middle" allowScriptAccess="sameDomain" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="cursor:pointer;" />                          </object>                           </div><div class="ras-flash2"><a href="<?php echo home_url(); ?>" style="position:absolute; top:40px; left:0px; z-index:1000;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/blank.gif" alt="<?php bloginfo( 'name' ); ?>" width="400"  height="74"/></a>                         <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="182" id="homelogo" align="middle" wmode="transparent" class="logo" style="cursor:pointer;">                           <param name="allowScriptAccess" value="sameDomain" />                           <param name="LOOP" value="false" />                         <param name="movie" value="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" quality="high" loop="false" bgcolor="#0a206b" width="400" height="182" name="homelogo" align="middle" allowScriptAccess="sameDomain" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="cursor:pointer;" />                          </object>                           </div><div class="ras-flash3"><a href="<?php echo home_url(); ?>" style="position:absolute; top:40px; left:0px; z-index:1000;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/blank.gif" alt="<?php bloginfo( 'name' ); ?>" width="400"  height="74"/></a>                         <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="290" height="182" id="homelogo" align="middle" wmode="transparent" class="logo" style="cursor:pointer;">                           <param name="allowScriptAccess" value="sameDomain" />                           <param name="LOOP" value="false" />                         <param name="movie" value="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="<?php bloginfo('stylesheet_directory'); ?>/logo2.swf" quality="high" loop="false" bgcolor="#0a206b" width="290" height="182" name="homelogo" align="middle" allowScriptAccess="sameDomain" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="cursor:pointer;" />                          </object></div>
  201.  
  202. <?php }?>
  203.  
  204.                         <?php /*?><img class="header-img" src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="<?php bloginfo( 'name' ); ?>" />    <?php */?>             
  205.                         <div class="top-search clearfix">
  206.                             <form action="<?php echo home_url(); ?>" id="searchform">
  207.                                 <p>
  208.                                         <input type="text" name="s" id="s" class="field" value="Search for" />
  209.                                         <input type="submit" name="s_submit" id="s-submit" value="" />
  210.                                 </p>
  211.                             </form>
  212.                         </div>
  213.  
  214.                         <?php
  215.                         // this code is to check required plugin installation and show notice to user for installing those plugins.
  216.                         // So, no need to provide localization support here
  217.                         if( !function_exists( 'ot_get_option' ))
  218.                         {
  219.                             ?>
  220.                             <div class="plugin-notice">
  221.                                 <p class="plugin-alert"><strong>Important:</strong> You need to install <a href="http://wordpress.org/extend/plugins/option-tree/">Option Tree</a> plugin for this theme. Please read documentation for more help.</p>
  222.                             </div>                          
  223.                             <?php
  224.                         }
  225.                         ?>
  226.  
  227.                 </div><!-- end of header div -->
  228.  
  229.  
  230.                 <!-- NAVIGATION BAR STARTS HERE -->
  231.                 <div id="nav-wrap">
  232.                         <div class="inn-nav clearfix">
  233.                                 <!-- MAIN NAVIGATION STARTS HERE -->
  234.                                 <?php
  235.                                         wp_nav_menu( array(
  236.                                                          'theme_location' => 'main-menu',
  237.                                                          'container' => false,
  238.                                                          'menu_class'=>'nav'
  239.                                                         )
  240.                                                     );
  241.                                 ?>
  242.                                 <!-- MAIN NAVIGATION ENDS HERE -->
  243.                                 <!-- SOCIAL NAVIGATION -->
  244.                                 <?php /*?><?php
  245.                                         wp_nav_menu( array(
  246.                                                          'theme_location' => 'social-menu',
  247.                                                          'container' => false,
  248.                                                          'menu_class'=>'social-nav'
  249.                                                         )
  250.                                                     );
  251.                                 ?><?php */?>
  252.                         </div>
  253.                 </div><!-- end of nav-wrap -->                              <div id="nav-wrap-res">                                     <div class="inn-nav-res clearfix">                                                      <!-- MAIN RESPONSIVE NAVIGATION STARTS HERE -->                                                             <?php                                                                       wp_nav_menu( array(                                                                                                  'theme_location' => 'main-menu-res',                                                                                                                'container' => false,                                                                                                               'menu_class'=>'nav-res'                                                                                                                )                                                                                                           );                                                                                  ?>                              <!-- MAIN NAVIGATION ENDS HERE -->                                                     </div>                                       </div><!-- end of nav-wrap-res -->
  254.                 <!-- NAVIGATION BAR ENDS HERE -->
  255.                 <span class="w-pet-border"></span>
  256.         </div><!-- end of header-wrapper div -->
  257.     </div><!--  header-wrapper-ras -->
  258. <!-- ============= HEADER ENDS HERE ============== -->
  259. <!-- ============= CONTAINER STARTS HERE ============== -->
  260.         <div class="body-footer-ras">
  261.         <div id="container">
  262.                 <!-- WEBSITE SEARCH STARTS HERE -->    
  263.                 <!-- end of top-search div-->
  264.                 <!-- ============= CONTENT AREA STARTS HERE ============== -->
  265.  
  266.                 <div id="content" class="clearfix">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement