Lucas-Tenorio

Código Erro

Jun 20th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.76 KB | None | 0 0
  1. <?php
  2. include 'admin/config.php';
  3. $escrever2=mysql_fetch_array($res2);
  4. error_reporting(0);
  5. function is_firefox() {
  6. $agent = '';
  7. // old php user agent can be found here
  8. if (!empty($HTTP_USER_AGENT))
  9. $agent = $HTTP_USER_AGENT;
  10. // newer versions of php do have useragent here.
  11. if (empty($agent) && !empty($_SERVER["HTTP_USER_AGENT"]))
  12. $agent = $_SERVER["HTTP_USER_AGENT"];
  13. if (!empty($agent) && preg_match("/firefox/si", $agent))
  14. return true;
  15. return false;
  16. }
  17.  
  18. function is_windows() {
  19. $agent = '';
  20. // old php user agent can be found here
  21. if (!empty($HTTP_USER_AGENT))
  22. $agent = $HTTP_USER_AGENT;
  23. // newer versions of php do have useragent here.
  24. if (empty($agent) && !empty($_SERVER["HTTP_USER_AGENT"]))
  25. $agent = $_SERVER["HTTP_USER_AGENT"];
  26. if (!empty($agent) && preg_match("/windows/si", $agent))
  27. return true;
  28. return false;
  29. }
  30.  
  31. ## get current theme name
  32.  
  33. //$current_theme_url= $_GET['url_value'];
  34. $current_theme = $_GET['theme'];
  35. $theme_found = false;
  36.  
  37. ## build theme data array
  38.  
  39. $resu = mysql_fetch_array(mysql_query("SELECT * FROM links"));
  40. $theme_array = array (
  41. array ("id" => $resu['id'],
  42. "url" => $resu['url'],
  43. "preview" => $resu['preview'],
  44. "type" => $resu['type'],
  45. "type_color" => $resu['type_color'],
  46. "ddn" => $resu['ddn']
  47. ),
  48. );
  49.  
  50. if (!$redirect) :
  51. ## get current theme data
  52. foreach ($theme_array as $i => $theme) :
  53.  
  54. if ($theme['id'] == $current_theme) :
  55.  
  56. $current_theme_name = ucfirst($theme['id']);
  57. $current_theme_url = $theme['url'];
  58. $current_theme_purchase_url = $theme['ddn'];
  59.  
  60. $theme_found = true;
  61.  
  62. endif;
  63. endforeach;
  64.  
  65. if ($theme_found == false) :
  66. $current_theme_name = $theme_array[0]['id'];
  67. $current_theme_url = $theme_array[0]['url'];
  68. $current_theme_purchase_url = $theme_array[0]['ddn'];
  69. endif;
  70. ?>
  71.  
  72. <!DOCTYPE html>
  73. <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
  74. <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
  75. <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
  76. <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
  77. <head>
  78. <meta charset="utf-8">
  79. <title><?php echo $escrever2['titulo']; ?> | Item : <?php if ($theme_found == false) : echo $current_theme_name; else: echo $current_theme_name; endif; ?></title>
  80.  
  81. <!-- Mobile Specific -->
  82. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  83.  
  84. <!-- CSS Style -->
  85. <link rel="stylesheet" href="style.css">
  86.  
  87. <!-- Favicons -->
  88. <link rel="shortcut icon" href="<?php echo $escrever2['icon1']; ?>">
  89. <link rel="apple-touch-icon" href="<?php echo $escrever2['icon2']; ?>">
  90. <link rel="apple-touch-icon" sizes="<?php echo $escrever2['icon3']; ?>">
  91. <link rel="apple-touch-icon" sizes="<?php echo $escrever2['icon4']; ?>">
  92.  
  93. <!-- Used Fonts -->
  94. <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,700" rel="stylesheet" type="text/css">
  95.  
  96. <!-- JavaScript -->
  97. <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
  98.  
  99. <script >
  100. var theme_list_open=false;
  101. $(document).ready(function(){function e(){var e=$("#switcher")
  102. .height();$("#iframe")
  103. .attr("height",
  104. $(window).height()-e+"px")}
  105. IS_IPAD=navigator.userAgent.match(/iPad/i)!=null;
  106. $(window).resize(function(){e()}).resize();
  107. $("#theme_select").click(function(){if(theme_list_open==true){
  108. $(".center ul li ul").hide();theme_list_open=false}else{
  109. $(".center ul li ul").show();theme_list_open=true}return false});
  110. $("#theme_list ul li a").click(function(){var e=$(this).attr("rel").split(",");
  111. $("li.purchase a").attr("href",e[1]);
  112. $("li.remove_frame a").attr("href",e[0]);
  113. $("#iframe").attr("src",e[0]);
  114. window.location.href = "?theme="+e[2]+""
  115. $("li.close a").attr("src",e[0]);
  116. $("#theme_list a#theme_select").text($(this).text());
  117. $(".center ul li ul").hide();theme_list_open=false;return false});
  118. $("#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){
  119. $("#iframe").css("padding-bottom","60px")
  120. }}
  121. )
  122. </script>
  123.  
  124. <?php
  125.  
  126. ?>
  127. </head>
  128.  
  129. <body>
  130.  
  131. <div id="switcher">
  132. <div class="center">
  133. <div class="logo">
  134. <a href="<?php echo $escrever2['url']; ?>" target="_blank" title="<?php echo $escrever2['slogan']; ?>"><img src="<?php echo $escrever2['logo']; ?>" alt="<?php echo $escrever2['slogan']; ?>" /></a>
  135. </div>
  136.  
  137. <ul>
  138. <li id="theme_list"><a id="theme_select" href="#">
  139. <?php
  140. if ($theme_found == false) : echo "Selecione um Produto..."; else: echo $current_theme_name; endif; ?></a>
  141. <ul>
  142. <?php ?>
  143. <?php
  144. foreach ($theme_array as $i => $theme) :
  145. echo '<li class="button_a">
  146. <a href="#" rel="' . $theme['url'] . ',' . $theme['ddn'] . ','.$theme['id'].'">' .
  147. $_SESSION['currentthemename']= ucfirst($theme['id']) .' <span style="background:#'.$theme['type_color'].'">'.$theme['type'].'</span></a>';
  148. if(isset($theme['preview'])){
  149. echo '<img alt="" class="preview" src="';
  150. if(strpos($theme['preview'], 'http://') === false){
  151. echo 'product_previews/'.$theme['preview'];
  152. }
  153. else echo $theme['preview'];
  154. echo '">';
  155. $_SESSION['currentthemename'] =$theme['url'];
  156. $current_theme=$_SESSION['currentthemename'];
  157. }
  158. echo '</li>';
  159. endforeach;
  160. ?>
  161. </ul>
  162. </li>
  163. </ul>
  164. <div class="responsive">
  165. <a href="#" class="desktop active" title="Ver Versão Desktop"></a>
  166. <a href="#" class="tabletlandscape" title="Ver Versão Tablet (1024x768)"></a>
  167. <a href="#" class="tabletportrait" title="Ver Versão Portatil (768x1024)"></a>
  168. <a href="#" class="mobilelandscape" title="Ver Versão Landscape (480x320)"></a>
  169. <a href="#" class="mobileportrait" title="Ver Versçao Mobile (320x480)"></a>
  170. </div>
  171.  
  172. <div class="share">
  173. <ul>
  174. <li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $current_theme_purchase_url; ?>" data-dnt="true">Tweet</a>
  175. <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>
  176. <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>
  177. <li><div class="g-plusone" data-size="medium"></div></li>
  178. </ul>
  179. </div>
  180.  
  181. <ul class="links">
  182. <li class="purchase" rel="<?php echo $current_theme_purchase_url; ?>">
  183. <a href="<?php echo $current_theme_purchase_url; ?>"><img src="images/purchase.png" alt="<?php echo $escrever2['empresa']; ?>" /> Comprar</a>
  184. </li>
  185. <li class="close" rel="<?php echo $current_theme_url; ?>">
  186. <a href="<?php echo $current_theme_url; ?>"><img src="images/cross.png" alt="<?php echo $escrever2['empresa']; ?>" /> Fechar</a>
  187. </li>
  188. </ul>
  189. </div>
  190. </div>
  191. <iframe id="iframe" src="<?php echo $current_theme_url; ?>" frameborder="0" width="100%"></iframe>
  192.  
  193. <!-- Place this tag after the last +1 button tag. -->
  194. <script type="text/javascript">
  195. (function() {
  196. var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  197. po.src = 'https://apis.google.com/js/plusone.js';
  198. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  199. })();
  200. </script>
  201.  
  202. </body>
  203. </html>
  204. <?php
  205. endif;
  206. ?>
Advertisement
Add Comment
Please, Sign In to add comment