Lucas-Tenorio

Codigo Original

Jun 20th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.22 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. function is_firefox() {
  4. $agent = '';
  5. // old php user agent can be found here
  6. if (!empty($HTTP_USER_AGENT))
  7. $agent = $HTTP_USER_AGENT;
  8. // newer versions of php do have useragent here.
  9. if (empty($agent) && !empty($_SERVER["HTTP_USER_AGENT"]))
  10. $agent = $_SERVER["HTTP_USER_AGENT"];
  11. if (!empty($agent) && preg_match("/firefox/si", $agent))
  12. return true;
  13. return false;
  14. }
  15.  
  16. function is_windows() {
  17. $agent = '';
  18. // old php user agent can be found here
  19. if (!empty($HTTP_USER_AGENT))
  20. $agent = $HTTP_USER_AGENT;
  21. // newer versions of php do have useragent here.
  22. if (empty($agent) && !empty($_SERVER["HTTP_USER_AGENT"]))
  23. $agent = $_SERVER["HTTP_USER_AGENT"];
  24. if (!empty($agent) && preg_match("/windows/si", $agent))
  25. return true;
  26. return false;
  27. }
  28.  
  29. ## get current theme name
  30.  
  31. //$current_theme_url= $_GET['url_value'];
  32. $current_theme = $_GET['theme'];
  33. $theme_found = false;
  34.  
  35. ## build theme data array
  36.  
  37. $theme_array = array (
  38. array ("id" => "curso-pro-10",
  39. "url" => "http://preve.empresastenorio.com/curso-pro-10/www",
  40. "preview" => "http://preve.empresastenorio.com/curso_pro_10.png",
  41. "type" => "PHP",
  42. "type_color" => "ec6334",
  43. "ddn" => "http://www.empresastenorio.com/produto/curso-pro-1-0/"
  44. ),
  45. array ("id" => "Radio",
  46. "url" => "http://webradio.empresastenorio.com",
  47. "preview" => "http://s32.postimg.org/7x5pc98xx/radio.png",
  48. "type" => "PHP",
  49. "type_color" => "ec6334",
  50. "ddn" => "http://www.empresastenorio.com/produto/site-web-radio/"
  51. ),
  52. array ("id" => "Painel-Loucutor",
  53. "url" => "http://www.flopybeta.cf/painel-loucutor",
  54. "preview" => "http://s32.postimg.org/f0vhrgqyt/loucutor.png",
  55. "type" => "PHP",
  56. "type_color" => "ec6334",
  57. "ddn" => "http://www.empresastenorio.com/produto/painel-locutor-3-0/"
  58. ),
  59. );
  60.  
  61. if (!$redirect) :
  62. ## get current theme data
  63. foreach ($theme_array as $i => $theme) :
  64.  
  65. if ($theme['id'] == $current_theme) :
  66.  
  67. $current_theme_name = ucfirst($theme['id']);
  68. $current_theme_url = $theme['url'];
  69. $current_theme_purchase_url = $theme['ddn'];
  70.  
  71. $theme_found = true;
  72.  
  73. endif;
  74. endforeach;
  75.  
  76. if ($theme_found == false) :
  77. $current_theme_name = $theme_array[0]['id'];
  78. $current_theme_url = $theme_array[0]['url'];
  79. $current_theme_purchase_url = $theme_array[0]['ddn'];
  80. endif;
  81. ?>
  82.  
  83. <!DOCTYPE html>
  84. <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
  85. <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
  86. <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
  87. <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
  88. <head>
  89. <meta charset="utf-8">
  90. <title>Preve Empresa Tenorio | Item : <?php if ($theme_found == false) : echo $current_theme_name; else: echo $current_theme_name; endif; ?></title>
  91.  
  92. <!-- Mobile Specific -->
  93. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  94.  
  95. <!-- CSS Style -->
  96. <link rel="stylesheet" href="style.css">
  97.  
  98. <!-- Favicons -->
  99. <link rel="shortcut icon" href="favicon.ico">
  100. <link rel="apple-touch-icon" href="https://s6.postimg.org/v2c41qjjl/114x114.png">
  101. <link rel="apple-touch-icon" sizes="https://s6.postimg.org/s9iwhpj75/72x72.png">
  102. <link rel="apple-touch-icon" sizes="https://s6.postimg.org/v2c41qjjl/114x114.png">
  103.  
  104. <!-- Used Fonts -->
  105. <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,700" rel="stylesheet" type="text/css">
  106.  
  107. <!-- JavaScript -->
  108. <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
  109.  
  110. <script >
  111. var theme_list_open=false;
  112. $(document).ready(function(){function e(){var e=$("#switcher")
  113. .height();$("#iframe")
  114. .attr("height",
  115. $(window).height()-e+"px")}
  116. IS_IPAD=navigator.userAgent.match(/iPad/i)!=null;
  117. $(window).resize(function(){e()}).resize();
  118. $("#theme_select").click(function(){if(theme_list_open==true){
  119. $(".center ul li ul").hide();theme_list_open=false}else{
  120. $(".center ul li ul").show();theme_list_open=true}return false});
  121. $("#theme_list ul li a").click(function(){var e=$(this).attr("rel").split(",");
  122. $("li.purchase a").attr("href",e[1]);
  123. $("li.remove_frame a").attr("href",e[0]);
  124. $("#iframe").attr("src",e[0]);
  125. window.location.href = "?theme="+e[2]+""
  126. $("li.close a").attr("src",e[0]);
  127. $("#theme_list a#theme_select").text($(this).text());
  128. $(".center ul li ul").hide();theme_list_open=false;return false});
  129. $("#header-bar").hide();clicked="desktop";var t={desktop:"100%",tabletlandscape:1040,tabletportrait:788,mobilelandscape:500,mobileportrait:340,placebo:0};jQuery(".responsive a").on("click",function(){var e=jQuery(this);for(device in t){console.log(device);console.log(t[device]);if(e.hasClass(device)){clicked=device;jQuery("#iframe").width(t[device]);if(clicked==device){jQuery(".responsive a").removeClass("active");e.addClass("active")}}}return false});if(IS_IPAD){
  130. $("#iframe").css("padding-bottom","60px")
  131. }}
  132. )
  133. </script>
  134.  
  135. <?php
  136.  
  137. ?>
  138. </head>
  139.  
  140. <body>
  141.  
  142. <div id="switcher">
  143. <div class="center">
  144. <div class="logo">
  145. <a href="http://www.empresastenorio.com" target="_blank" title="Designing Media Works"><img src="https://s6.postimg.org/qrxg65egh/logo.png" alt="Designing Media Themes" /></a>
  146. </div>
  147.  
  148. <ul>
  149. <li id="theme_list"><a id="theme_select" href="#">
  150. <?php
  151. if ($theme_found == false) : echo "Select a theme..."; else: echo $current_theme_name; endif; ?></a>
  152. <ul>
  153. <?php ?>
  154. <?php
  155. foreach ($theme_array as $i => $theme) :
  156. echo '<li class="button_a">
  157. <a href="#" rel="' . $theme['url'] . ',' . $theme['ddn'] . ','.$theme['id'].'">' .
  158. $_SESSION['currentthemename']= ucfirst($theme['id']) .' <span style="background:#'.$theme['type_color'].'">'.$theme['type'].'</span></a>';
  159. if(isset($theme['preview'])){
  160. echo '<img alt="" class="preview" src="';
  161. if(strpos($theme['preview'], 'http://') === false){
  162. echo 'product_previews/'.$theme['preview'];
  163. }
  164. else echo $theme['preview'];
  165. echo '">';
  166. $_SESSION['currentthemename'] =$theme['url'];
  167. $current_theme=$_SESSION['currentthemename'];
  168. }
  169. echo '</li>';
  170. endforeach;
  171. ?>
  172. </ul>
  173. </li>
  174. </ul>
  175. <div class="responsive">
  176. <a href="#" class="desktop active" title="View Desktop Version"></a>
  177. <a href="#" class="tabletlandscape" title="View Tablet Landscape (1024x768)"></a>
  178. <a href="#" class="tabletportrait" title="View Tablet Portrait (768x1024)"></a>
  179. <a href="#" class="mobilelandscape" title="View Mobile Landscape (480x320)"></a>
  180. <a href="#" class="mobileportrait" title="View Mobile Portrait (320x480)"></a>
  181. </div>
  182.  
  183. <div class="share">
  184. <ul>
  185. <li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $current_theme_purchase_url; ?>" data-dnt="true">Tweet</a>
  186. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></li>
  187. <li><iframe src="//www.facebook.com/plugins/like.php?href=<?php echo $current_theme_purchase_url; ?>&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;font=arial&amp;colorscheme=light&amp;action=like&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe></li>
  188. <li><div class="g-plusone" data-size="medium"></div></li>
  189. </ul>
  190. </div>
  191.  
  192. <ul class="links">
  193. <li class="purchase" rel="<?php echo $current_theme_purchase_url; ?>">
  194. <a href="<?php echo $current_theme_purchase_url; ?>"><img src="images/purchase.png" alt="Empresa Tenorio" /> Comprar</a>
  195. </li>
  196. <li class="close" rel="<?php echo $current_theme_url; ?>">
  197. <a href="<?php echo $current_theme_url; ?>"><img src="images/cross.png" alt="Empresas Tenorio" /> Fechar</a>
  198. </li>
  199. </ul>
  200. </div>
  201. </div>
  202. <iframe id="iframe" src="<?php echo $current_theme_url; ?>" frameborder="0" width="100%"></iframe>
  203.  
  204. <!-- Place this tag after the last +1 button tag. -->
  205. <script type="text/javascript">
  206. (function() {
  207. var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  208. po.src = 'https://apis.google.com/js/plusone.js';
  209. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  210. })();
  211. </script>
  212.  
  213. </body>
  214. </html>
  215. <?php
  216. endif;
  217. ?>
Advertisement
Add Comment
Please, Sign In to add comment