Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. teste.com.br/teste?c=xyoz&cc=1
  2.  
  3. <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo rawurlencode($url."&c=cd3a0725fa81899"); ?>" class="popup" title="Compartilhe com Facebook" rede-social="facebook">
  4. <span class="icon">
  5. <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 28 28" enable-background="new 0 0 28 28" xml:space="preserve">
  6. <path d="M27.825,4.783c0-2.427-2.182-4.608-4.608-4.608H4.783c-2.422,0-4.608,2.182-4.608,4.608v18.434
  7. c0,2.427,2.181,4.608,4.608,4.608H14V17.379h-3.379v-4.608H14v-1.795c0-3.089,2.335-5.885,5.192-5.885h3.718v4.608h-3.726
  8. c-0.408,0-0.884,0.492-0.884,1.236v1.836h4.609v4.608h-4.609v10.446h4.916c2.422,0,4.608-2.188,4.608-4.608V4.783z" />
  9. </svg>
  10. </span>
  11. <span class="text">Facebook</span>
  12. </a>
  13.  
  14. $('.rrssb-buttons li a').click(function(){
  15. var url = "ajax/salvarCompartilhamento.php";
  16. var redesocial = $(this).attr('rede-social');
  17. $.ajax({
  18. type: 'post',
  19. data: {
  20. 'rede_social' : redesocial,
  21. },
  22. url: url,
  23. cache: false,
  24. dataType: 'html',
  25. timeout: 120000,
  26. async:false,
  27. success: function(link){
  28. if(link != 'erro'){
  29. sucesso = true;
  30. }
  31. }
  32. });
  33. if(sucesso){
  34. var t = 600;
  35. var i = 450;
  36. var h = ($(window).width()-t)/2;
  37. var n = ($(window).height()-i)/2;
  38. var o = $(this).attr('href') + link;
  39. var w = "status=1,width="+t+",height="+i+",top="+n+",left="+h;
  40. window.open(o,"share",w);
  41. }
  42. });
  43.  
  44. include_once '../includes/constantes.php';
  45. include_once __CLASS_FOLDER__.'/Teste.class.php';
  46.  
  47. if(!empty($_POST)){
  48. $dados = $_POST;
  49. } else if(!empty($_GET)) {
  50. $dados = $_GET;
  51. } else {
  52. die('Acesso não autorizado');
  53. }
  54.  
  55. $teste = new Teste();
  56. $salvado = $teste->salvarCompartilhamento($dados);
  57.  
  58. if(is_numeric($salvado)){
  59. echo "&ss=$salvado";
  60. } else {
  61. echo 'erro';
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement