index.php 777 B

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