1. <?php
  2. $siteurl = get_option('siteurl');
  3. $plugin_url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__));
  4. $img_url = $plugin_url . '/images/';
  5. ?>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  10. <meta http-equiv="Content-Style-Type" content="text/css" />
  11. <style type="text/css" media="screen">
  12.     /*------------------------------------------------*/
  13.     /*-----------------[RESET]------------------------*/
  14.     /*------------------------------------------------*/
  15.  
  16.     /* http://meyerweb.com/eric/tools/css/reset/ */
  17.     /* v1.0 | 20080212 */
  18.  
  19.     html, body, div, span, applet, object, iframe,
  20.     h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  21.     a, abbr, acronym, address, big, cite, code,
  22.     del, dfn, em, font, img, ins, kbd, q, s, samp,
  23.     small, strike, strong, sub, sup, tt, var,
  24.     b, u, i, center,
  25.     dl, dt, dd, ol, ul, li,
  26.     fieldset, form, label, legend { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
  27.     body { line-height: 1; }
  28.     ol, ul { list-style: none; }
  29.     blockquote, q { quotes: none; }
  30.     blockquote:before, blockquote:after,q:before, q:after { content: ''; content: none; }
  31.     :focus { outline: 0; }
  32.     ins { text-decoration: none; }
  33.     del { text-decoration: line-through; }
  34.     table { border-collapse: collapse; border-spacing: 0; }
  35.    
  36.     /*------------------------------------------------*/
  37.     /*-----------------[DESIGN]-----------------------*/
  38.     /*------------------------------------------------*/
  39.    
  40.     body{}
  41.     #container { width: 950px; margin: 80px auto; }
  42.     #warning { width: 800px; margin: 10px auto; padding: 10px 10px 23px; background: #FFFFB5; border: 1px solid #FFD34F; text-align: center; font-size: 20px; font-weight: bold; vertical-align: middle; clear: both; }
  43.     .left { float: left; margin-left: 10px; }
  44.     .right { float: right; margin-right: 10px;  }
  45.     h1 { font-size: 36px; font-family: 'Trebuchet MS', Helvetica, sans-serif; color: #024A80;}
  46.     #battle { float: left; width: 300px; margin: 70px 20px 0 0;}
  47.     p { padding: 20px; color: #666; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; }
  48.     #browsers { margin: 10px 0; float: left; }
  49.     #browsers a { color: none; text-decoration: none;}
  50.     .browser { float: left; padding: 0 10px 10px; width: 128px; }
  51.     .browser img { border: none; }
  52.     .browser h2 { font-size: 16px; margin: 0 auto; color: #de9604; margin: 5px 0; }
  53.     .browser p { padding: 0; margin-bottom: 10px; font-size: 12px; line-height: 14px;}
  54.     #credit { margin-top: 20px; color: #666; font-size: 10px; text-align: center; }
  55.     #credit a { color: #666; text-decoration: underline; }
  56.     #credit a:hover { text-decoration: none; }
  57. </style>
  58.  
  59. </head>
  60. <body>
  61.     <div id="container">
  62.         <?php
  63.         $image = get_option("Browser_Blocker_Splash_Img");
  64.         if( $image == "" ){
  65.             $image = $img_url."browser-wars.jpg";
  66.         }
  67.        
  68.         $title = get_option("Browser_Blocker_title");
  69.         if( $title == "" ){
  70.             $title = "Sorry! Your browser doesn't have what it takes to view this site!";
  71.         }
  72.        
  73.         $link_text = get_option("Browser_Blocker_BPtext");
  74.         if( $link_text == "" ){
  75.             $link_text = "Click here to proceed to the website";
  76.         }
  77.        
  78.         $msg = get_option("Browser_Blocker_Msg");
  79.         if( $msg == "" ){
  80.             $msg = "With all the changes that happen around the web, it is best to keep your browser up to date. Please choose a browser from those listed below and Upgrade your Web Experience.";
  81.         }
  82.         $browsers = explode('~', get_option('Browser_Blocker_Display_Browsers'));
  83.         ?>
  84.        
  85.     <img id="battle" src="<? echo $image ?>" />
  86.     <h1><?php echo $title ?></h1>
  87.     <p id="description"><?php echo $msg ?></p>
  88.     <div id="browsers">
  89.         <?php
  90.         if(in_array('1',$browsers)){
  91.         ?>
  92.        
  93.         <div id="chrome" class="browser">
  94.                 <a href="http://www.google.com/chrome/" title="Download Google Chrome">
  95.                 <img src="<?=$img_url ?>chrome.jpg" />
  96.                 <center><h2>Google Chrome</h2>
  97.                 <?php if(get_option("Browser_Blocker_DwnldDesc")){ ?><p>runs web pages with lightning speed.</p><?php } ?></center>
  98.                 <img src="<?=$img_url ?>download.jpg">
  99.                 </a>
  100.         </div>
  101.        
  102.         <?php
  103.         }
  104.         ?>
  105.         <?php
  106.         if(in_array('2',$browsers)){
  107.         ?>
  108.        
  109.         <div id="firefox" class="browser">
  110.                 <a href="http://www.firefox.com" title="Download Mozilla Firefox">
  111.                 <img src="<?=$img_url ?>firefox.jpg" />
  112.                 <center><h2>Mozilla Firefox</h2>
  113.                 <?php if(get_option("Browser_Blocker_DwnldDesc")){ ?><p>made to make the web a better place.</p><?php } ?></center>
  114.                 <img src="<?=$img_url ?>download.jpg">
  115.                 </a>
  116.         </div>
  117.        
  118.         <?php
  119.         }
  120.         ?>
  121.         <?php
  122.         if(in_array('3',$browsers)){
  123.         ?>
  124.        
  125.         <div id="safari" class="browser">
  126.                 <a href="http://www.apple.com/safari/" title="Download Apple Safari">
  127.                 <img src="<?=$img_url ?>safari.jpg" />
  128.                 <center><h2>Apple Safari</h2>
  129.                 <?php if(get_option("Browser_Blocker_DwnldDesc")){ ?><p>improves the way you view the web.</p><?php } ?></center>
  130.                 <img src="<?=$img_url ?>download.jpg">
  131.                 </a>
  132.         </div>
  133.        
  134.         <?php
  135.         }
  136.         ?>
  137.         <?php
  138.         if(in_array('4',$browsers)){
  139.         ?>
  140.        
  141.         <div id="ie" class="browser">
  142.                 <a href="http://www.microsoft.com/ie9" title="Download Internet Explorer">
  143.                 <img src="<?=$img_url ?>ie.jpg" />
  144.                 <center><h2>Internet Explorer</h2>
  145.                 <?php if(get_option("Browser_Blocker_DwnldDesc")){ ?><p>experience a more beautiful web.</p><?php } ?></center>
  146.                 <img src="<?=$img_url ?>download.jpg">
  147.                 </a>
  148.         </div>
  149.  
  150.         <?php
  151.         }
  152.         ?>
  153.         <?php
  154.         if(in_array('5',$browsers)){
  155.         ?>
  156.        
  157.         <div id="opera" class="browser">
  158.                 <a href="http://www.opera.com" title="Download Opera">
  159.                 <img src="<?=$img_url ?>opera.jpg" />
  160.                 <center><h2>Opera</h2>
  161.                 <?php if(get_option("Browser_Blocker_DwnldDesc")){ ?><p>faster, smoother, and easier to use.</p><?php } ?></center>
  162.                 <img src="<?=$img_url ?>download.jpg">
  163.                 </a>
  164.         </div>
  165.        
  166.         <?php
  167.         }
  168.         ?>
  169.     </div>
  170.     <div style="clear:both"></div>
  171.     <?php
  172.     if(get_option('Browser_Blocker_Bypass') == 1){
  173.     ?>
  174.     <div id="warning">
  175.    
  176.     <img src="<?=$img_url ?>exclamation.png" class="left" />
  177.     <img src="<?=$img_url ?>exclamation.png" class="right" />  
  178.         <a href="<?php get_site_url(); ?>?sid=<?php echo $_SESSION["BB_SESSION_ID"] ?>"><?php echo $link_text; ?></a>
  179.    
  180.     </div>
  181.     <?
  182.     }
  183.     ?>
  184.     <?php
  185.     if(get_option('Browser_Blocker_Credit') == 1){
  186.     ?>
  187.     <div id="credit">
  188.         Browser Blocker <a href="http://www.wordpress.org">Wordpress</a> Plugin created by <a href="http://www.macnative.com">Macnative.com</a>
  189.     </div>
  190.     <?
  191.     }
  192.     ?>
  193.     </div>
  194.     <?php
  195.     if(get_option('Browser_Blocker_Code') != ""){
  196.    
  197.     echo get_option("Browser_Blocker_Code");
  198.    
  199.     }
  200.     ?>
  201. </body>
  202. </html>