Guest User

Untitled

a guest
Jan 19th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.48 KB | None | 0 0
  1. <? @session_start(); ?>
  2. <div id="riepilogo">
  3. <?
  4. @include('../script/db.php');
  5. @include('../script/var_html.php');
  6. echo $sep.$topc1. 100 .$topc2;?>
  7. <div class="cb" style="height:90px">
  8. <div class="fl c4 h100">&nbsp;</div>
  9. <div class="tacenter fl c5 h100" style="width:100px">
  10.  
  11. <?
  12. $arr = array('messaggi','visite','notifiche');
  13. $arr_lk = array('messaggi/index','gestione/visite_nuove','gestione/index');
  14. $v[0] = ap("select count(id) from gs9.messaggi where destinatario = '".$_COOKIE['nickname']."' and approvato > '0' and letto = '0'");
  15. $v[1] = ap("select count(distinct(visitatore)) from gs9.profilo_visite where visitato = '".$_COOKIE['nickname']."' and visto = '0' and visitatore !=''");
  16.  
  17. $arr_nt = array('gestione/notifiche','gestione/tag','gestione/amicizie_nuove','gestione/conoscenze_nuove','gestione/parentele_nuove','gestione/auth_foto_nuove');
  18. $x[0] = ap("select count(id) from gs9.profilo_notifiche where visto = '0' and nickname = '".$_COOKIE['nickname']."'");
  19. $x[1] = ap("select count(id) from gs9.profilo_foto_tag where nickname = '".$_COOKIE['nickname']."' and approvato = '0'");
  20. $x[2] = ap("select count(nickname) from gs9.profilo_amici where amico = '".$_COOKIE['nickname']."' and confermato = '0' order by nickname asc");
  21. $x[3] = ap("select count(nickname) from gs9.profilo_conoscenze where conoscente = '".$_COOKIE['nickname']."' and confermato = '0'");
  22. $x[4] = ap("select count(destinatario) from gs9.profilo_parentele where destinatario = '".$_COOKIE['nickname']."' and approvato = '0'");
  23. $x[5] = ap("select count(nickname) from gs9.profilo_foto_autorizzazioni where nickname = '".$_COOKIE['nickname']."' and confermato = '0'");
  24. $v[2] = $x[0]+$x[1]+$x[2]+$x[3]+$x[4]+$x[5];
  25.  
  26. if ($_SESSION['sn0']=='') {
  27. $notdis = mfa("select messaggi as 0, visite as 1, notifiche as 2 from gs9.profilo_notifiche_audio where nickname = '".$_COOKIE['nickname']."'");
  28. for ($sn=0;$sn<3;$sn++) {if ($notdis[$sn]=='1') {$_SESSION['sn'.$sn]='si';} else {$_SESSION['sn'.$sn]='';}}}
  29.  
  30. $totnot = 0; for ($sn=0;$sn<3;$sn++) {if ($_SESSION['sn'.$sn]!='si') {$totnot = $totnot+$v[$sn];}}
  31. if (($totnot>0) and ($_SESSION['totnot']==0)) { ?>
  32. <audio autoplay><source src="include/colonna/notifica.mp3" type="audio/mpeg" /></audio>
  33. <? } @$_SESSION['totnot']=$totnot;
  34.  
  35.     if (($x[0]==0) and ($x[1]==0) and ($x[2]==0) and ($x[3]==0) and ($x[4]==0) and ($x[5]==0)) {$arr_lk[2]='gestione/notifiche_lette';}
  36. elseif ($x[0]>0) {$arr_lk[2]=$arr_nt[0];}
  37. elseif (($x[1]>0) and (($x[0]+$x[2]+$x[3]+$x[4]+$x[5])==0)) {$arr_lk[2]=$arr_nt[1];}
  38. elseif (($x[2]>0) and (($x[0]+$x[1]+$x[3]+$x[4]+$x[5])==0)) {$arr_lk[2]=$arr_nt[2];}
  39. elseif (($x[3]>0) and (($x[0]+$x[1]+$x[2]+$x[4]+$x[5])==0)) {$arr_lk[2]=$arr_nt[3];}
  40. elseif (($x[4]>0) and (($x[0]+$x[1]+$x[2]+$x[3]+$x[5])==0)) {$arr_lk[2]=$arr_nt[4];}
  41. elseif (($x[5]>0) and (($x[0]+$x[1]+$x[2]+$x[3]+$x[4])==0)) {$arr_lk[2]=$arr_nt[5];}
  42. else {$arr_lk[2]='gestione/index';}
  43.  
  44. for ($i=0;$i<3;$i++) { ?>
  45. <div class="cb point brb" id="<? echo $arr[$i] ?>" style="width:100px">
  46. <div class="fl taleft bgnr <? if ($v[$i]==0) { ?>trasp<? } else { ?>bold<? } ?>" style="background-image:url(immagini/colonna/<? echo $arr[$i] ?>.png); padding-left:20px; line-height:18px"><? echo ucf($arr[$i]) ?></div>
  47. <? if ($v[$i]>0) { ?>
  48. <span class="fr bold c6 f10" style="margin:3px 2px 2px 2px; width:auto; line-height:13px">&nbsp;<? echo $v[$i] ?>&nbsp;</span>
  49. <? } ?>
  50. <script>
  51. $("#<? echo $arr[$i] ?>").click(function() {$("#loading_vuoto").hide();$("#loading").show();<? echo $ws ?>$("#main_frame").load('include/<? echo $arr_lk[$i] ?>.php');});
  52. </script>
  53. </div>
  54. <? } ?>
  55. <div class="cb point brb" style="width:100px">
  56. <div class="fl taleft bgnr trasp" id="gest_profilo" style="background-image:url(immagini/colonna/gestione.png); padding-left:20px; line-height:18px">Gestione</div>
  57. <script>
  58. $("#gest_profilo").click(function() {$("#loading_vuoto").hide();$("#loading").show();<? echo $ws ?>$("#main_frame").load('include/gestione/index.php');});
  59. $("#gest_profilo,#logout").mouseover(function(){$(this).toggleClass('trasp');$(this).addClass('bold'); });
  60. $("#gest_profilo,#logout").mouseout(function(){$(this).toggleClass('bold');$(this).addClass('trasp'); });
  61. </script>
  62. </div>
  63. <div class="cb point brb" style="width:100px">
  64. <div class="fl taleft bgnr trasp" id="logout" style="background-image:url(immagini/colonna/logout.png); padding-left:20px; line-height:18px"><a href="include/script/logout.php">Logout</a></div>
  65. </div>
  66. </div>
  67. <div class="fl c6 h100">&nbsp;</div>
  68. </div>
  69. <? echo $botc1. 100 .$botc2; ?>
  70. </div>
Add Comment
Please, Sign In to add comment