Guest User

Untitled

a guest
Feb 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.23 KB | None | 0 0
  1. <?
  2. function smiley($user) {
  3. $img = '<img src="immagini/chat/smiley/';
  4. $img2 = '.png" style="vertical-align:text-top" width="13">';
  5. $user['commento'] = utf($user['commento'] );
  6. $user['commento'] = str_replace(':-',':',$user['commento']);
  7. $user['commento'] = str_replace(array(":'/",':)',':d','(lol)','(rofl)',';)',':p',';p','xd',':j',':]','^_^',':$',':§',':*','(k)','*.*',':(',':`(',';(','ç.ç','>.<',':r','>_>','-.-','|(',':@',':&','x.x',':o','o.o',':x',':|','<3','</3','(*)','(ok)','(no)'),array($img.'sniff'.$img2,$img.'sorriso'.$img2,$img.'sorriso_big'.$img2,$img.'lol'.$img2,$img.'rofl'.$img2,$img.'blink'.$img2,$img.'lingua'.$img2,$img.'lingua'.$img2,$img.'xd'.$img2,$img.'jai'.$img2,$img.'angel'.$img2,$img.'denti'.$img2,$img.'occhioni'.$img2,$img.'shy'.$img2,$img.'kiss'.$img2,$img.'kiss_mini'.$img2,$img.'love'.$img2,$img.'triste'.$img2,$img.'lacrima'.$img2,$img.'pianto'.$img2,$img.'umpf'.$img2,$img.'doh'.$img2,$img.'brivido'.$img2,$img.'mmm'.$img2,$img.'uff'.$img2,$img.'angry'.$img2,$img.'angry_big'.$img2,$img.'devil'.$img2,$img.'xxx'.$img2,$img.'doh'.$img2,$img.'paura'.$img2,$img.'malato'.$img2,$img.'sniff'.$img2,$img.'cuore'.$img2,$img.'cuore_2'.$img2,$img.'stella'.$img2,$img.'ok'.$img2,$img.'no'.$img2),$user['commento']);
  8. $user['commento'] = str_replace(array(':)',':D','(LOL)','(ROFL)',';)',':P','XD',':J',':ù','^_^',':$',':§',':*','(K)','*.*',':(',':`(',';(','ç.ç',':_:',':r',';_;','-.-','|(',':@',':&','x.x',':o','o.o','(SNIFF)',':3',':/3','(*)','(OK)','(NO)','(LOOK)'),array($img.'sorriso'.$img2,$img.'sorriso_big'.$img2,$img.'lol'.$img2,$img.'rofl'.$img2,$img.'blink'.$img2,$img.'lingua'.$img2,$img.'xd'.$img2,$img.'jai'.$img2,$img.'angel'.$img2,$img.'denti'.$img2,$img.'occhioni'.$img2,$img.'shy'.$img2,$img.'kiss'.$img2,$img.'kiss_mini'.$img2,$img.'love'.$img2,$img.'triste'.$img2,$img.'lacrima'.$img2,$img.'pianto'.$img2,$img.'umpf'.$img2,$img.'doh'.$img2,$img.'brivido'.$img2,$img.'mmm'.$img2,$img.'uff'.$img2,$img.'angry'.$img2,$img.'angry_big'.$img2,$img.'devil'.$img2,$img.'xxx'.$img2,$img.'doh_big'.$img2,$img.'paura'.$img2,$img.'sniff'.$img2,$img.'cuore'.$img2,$img.'cuore_2'.$img2,$img.'stella'.$img2,$img.'ok'.$img2,$img.'no'.$img2,$img.'look'.$img2),$user['commento']);
  9. return $user['commento'];}
  10. ?>
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. <?
  18. function user_50f($user) {
  19. $lii = '<a href="include/profilo/index.php?nickname='.$user['nickname'].'" target="_blank">'; $lif = '</a>';
  20.  
  21. $thumbWidth = 50 .'px'; $thumbHeight = 50 .'px';
  22. $img_princ_50 = "../../foto_profilo/".ucf($user['nickname'][0])."/".str_replace(' ','',stl($user['nickname']))."/thumb/p50.png";
  23.  
  24. if (!file_exists($img_princ_50)) {@include('crea_principale_thumb.php');}
  25.  
  26. $dimensioni = getimagesize($img_princ_50);
  27. $pre_thumbWidth = $dimensioni[0]; $pre_thumbHeight = $dimensioni[1];
  28. if ($pre_thumbWidth > $pre_thumbHeight) {$thumbHeight = 50 .'px'; $thumbWidth = 'auto';}
  29. elseif ($pre_thumbWidth < $pre_thumbHeight) {$thumbWidth = 50 .'px'; $thumbHeight = 'auto';}
  30. elseif ($pre_thumbWidth == $pre_thumbHeight) {$thumbWidth = 50 .'px'; $thumbHeight = 50 .'px';}
  31.  
  32. echo $lii.'<div class="point oh br" style="width:50px; height:50px; background-size:'.$thumbWidth.' '.$thumbHeight.'; background-image:url('.$img_princ_50.')"></div>'.$lif;}?>
  33.  
  34.  
  35.  
  36.  
  37.  
  38. <?
  39. @include_once('../script/db.php');
  40. @include_once('../script/var_html.php');
  41. @include_once('../function/smiley_sito.php');
  42. @include_once('../function/user_50f.php');
  43.  
  44. if ($_GET['cod']!='') {$arr_mess['codice'] = str_replace('-_-_-',' - ',$_GET['cod']);}
  45. if (trim($_POST['messaggio'])!='') {@include_once('send_fast_reply.php');}
  46. if ($_GET['mar']!='') {@include_once('mark_read.php');}
  47. if ($_GET['del']!='') {@include_once('cancella_conv.php');}
  48.  
  49. $last_mess = mfa("select id, testo, mittente, destinatario, letto, foto from gs9.messaggi where codice = '".$arr_mess['codice']."' and ((canc_mittente = '0' and (mittente) = '".($_COOKIE['nickname'])."') or (canc_destinatario = '0' and approvato > '0' and (destinatario) = '".($_COOKIE['nickname'])."')) order by id desc limit 1");
  50. $user['nickname']=$last_mess['destinatario'];
  51. $hgs = ap("select count(id) from gs9.area_staff_segnalazioni where (nickname) = '".($_COOKIE['nickname'])."' and tabella ='messaggi' and id_segnalato = '".$last_mess['id']."'");
  52.  
  53. $user['commento']=$last_mess['testo']; smiley($user['commento']);
  54. //include('../script/smiley_sito.php');
  55. $ln = ap("select count(id) from gs9.profilo_bloccati where (nickname = '".$last_mess['mittente']."' and listato = '".$last_mess['destinatario']."') or (nickname = '".$last_mess['destinatario']."' and listato = '".$last_mess['mittente']."')");
  56. $bg = 'blu'; $mar = ''; $col='';
  57. if ((stl($last_mess['destinatario'])==stl($_COOKIE['nickname'])) and ($last_mess['letto']=='0')) {$mar='si'; $bg = 'green'; $col='black';}
  58. if (stl($last_mess['mittente'])==stl($_COOKIE['nickname'])) {$fw=''; $pd='padding:3px 3px 3px 15px';} else {$fw='_r'; $pd='padding:3px 15px 3px 3px';}?>
  59. <div id="cella_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>" class="cb brb tajustify" style="height:58px">
  60. <span class="fl" style="margin:3px"><? $user['nickname']=$last_mess['mittente']; $mr='left'; user_50f($user['nickname']); ?></span>
  61.  
  62. <span id="cont_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>" class="fl oh point bullet_mess_index <? echo $col ?>" style="line-height:15px; height:44px; background-image:url(immagini/messaggi/pre_<? echo $bg ?>.png)">
  63. <span id="commento_<? echo $last_mess['id'] ?>"><span id="leggi_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>"><? if ($last_mess['foto']!='') {echo '<img src="'.$sito.'/immagini/messaggi/foto.png" style="vertical-align:text-top" width="13" />&nbsp;';} echo $user['commento']; ?></span></span>
  64. <span id="segnalazione_<? echo $last_mess['id'] ?>" class="bold" style="display:none; line-height:15px">Desideri segnalare questo messaggio alla Redazione?
  65. <span id="oksegna_<? echo $last_mess['id'] ?>" class="point green br c5 f12"><code>&nbsp;SI&nbsp;</code></span>
  66. <span id="xsegna_<? echo $last_mess['id'] ?>" class="point red br c5 f12"><code>&nbsp;NO&nbsp;</code></span>
  67. </span>
  68. </span>
  69.  
  70. <script>
  71. $("#segnala_<? echo $last_mess['id'] ?>").click(function() {$("#commento_<? echo $last_mess['id'] ?>").hide();$("#segnalazione_<? echo $last_mess['id'] ?>").show();});
  72. $("#xsegna_<? echo $last_mess['id'] ?>").click(function() {$("#commento_<? echo $last_mess['id'] ?>").show();$("#segnalazione_<? echo $last_mess['id'] ?>").hide();});
  73. $("#oksegna_<? echo $last_mess['id'] ?>").click(function() {$("#segnala_<? echo $last_mess['id'] ?>").hide();$("#oksegna_<? echo $last_mess['id'] ?>").load('include/script/segnalazione.php?id=<? echo $last_mess['id'] ?>&tab=messaggi');$("#commento_<? echo $last_mess['id'] ?>").show();$("#segnalazione_<? echo $last_mess['id'] ?>").hide();});
  74. $("#mar_<? echo $last_mess['id'] ?>").click(function() {$("#cella_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>").load('include/messaggi/cella_messaggio.php?mar=<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>');});
  75. <? if ($ln==0) { ?>
  76. $("#leggi_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>").click(function() {$("#loading_vuoto").hide();$("#loading").show();<? echo $ws ?>$("#main_frame").load('include/messaggi/leggi.php?codice=<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>');});
  77. $("#frp_<? echo $last_mess['id'] ?>").click(function() {$("#cont_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>").hide();$("#fast_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>").show();$("#fast_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>").load('include/messaggi/fast_reply.php?codice=<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>');});
  78. <? } ?>
  79. $("#del_<? echo $last_mess['id'] ?>").click(function() {$("#main_frame").load('include/messaggi/<? echo $prov ?>pagina=<? echo $_GET['pagina'] ?>&del=<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>');});
  80. </script>
  81.  
  82. <span id="fast_<? echo str_replace(' - ','-_-_-',$arr_mess['codice']) ?>" class="fl oh bullet_mess_index_fr" style="<? echo $pd ?>; background-image:url(immagini/messaggi/pre_blu<? echo $fw ?>.png); display:none"></span>
  83. <span class="fl" style="margin:3px"><? $user['nickname']=$last_mess['destinatario']; $mr='right'; @include('../thumb/user_50fsi.php'); echo $mia_foto ?></span>
  84. <span class="fl point" style="margin-top:3px; width:40px">
  85.  
  86. <div class="fl trasp" style="width:21px; height:26px" id="mar_<? echo $last_mess['id'] ?>"><? if ($mar=='si') { ?><img title="Segna come letto" src="immagini/messaggi/ma.png" /><? } ?></div>
  87. <div class="fl trasp" style="width:19px; height:26px" id="frp_<? echo $last_mess['id'] ?>"><? if ($ln==0) { ?><img title="Rispondi al messaggio" src="immagini/messaggi/ri.png" /><? } ?></div>
  88. <div class="fl trasp" style="width:21px; height:25px" id="seg_<? echo $last_mess['id'] ?>"><? if ($hgs==0) { ?><img id="segnala_<? echo $last_mess['id'] ?>" title="Segnala il messaggio" src="immagini/messaggi/se.png" /><? } ?></div>
  89. <div class="fl trasp" style="width:19px; height:25px" id="del_<? echo $last_mess['id'] ?>"><img title="Cancella il messaggio" src="immagini/messaggi/ca.png" /></div>
  90. <script>
  91. $("#mar_<? echo $last_mess['id'] ?>,#frp_<? echo $last_mess['id'] ?>,#seg_<? echo $last_mess['id'] ?>,#del_<? echo $last_mess['id'] ?>").hover(function(){$(this).toggleClass('trasp');});
  92. </script>
  93. </span>
  94. </div>
Add Comment
Please, Sign In to add comment