index.php 799 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. // Main include
  3. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  4. if($_REQUEST['ajax'] == 1 && $_REQUEST['token'] == $_SESSION['token']){
  5. // Data
  6. exec (HESTIA_CMD."v-list-user-notifications $user json", $output, $return_var);
  7. $data = json_decode(implode('', $output), true);
  8. $data = array_reverse($data,true);
  9. foreach($data as $key => $note){
  10. $note['ID'] = $key;
  11. $data[$key] = $note;
  12. }
  13. echo json_encode($data);
  14. exit;
  15. }
  16. $TAB = 'NOTIFICATIONS';
  17. // Data
  18. exec (HESTIA_CMD."v-list-user-notifications $user json", $output, $return_var);
  19. $data = json_decode(implode('', $output), true);
  20. $data = array_reverse($data,true);
  21. // Render page
  22. render_page($user, $TAB, 'list_notifications');
  23. // Back uri
  24. $_SESSION['back'] = $_SERVER['REQUEST_URI'];