thetime.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /*
  3. *
  4. * OGP - Open Game Panel
  5. * Copyright (C) 2008 - 2018 The OGP Development Team
  6. *
  7. * http://www.opengamepanel.org/
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. *
  23. */
  24. require_once('includes/lib_remote.php');
  25. function exec_ogp_module()
  26. {
  27. global $db;
  28. $remote_server = $db->getRemoteServer($_GET['r_server_id']);
  29. $remote = new OGPRemoteLibrary( $remote_server['agent_ip'], $remote_server['agent_port'],
  30. $remote_server['encryption_key'], $remote_server['timeout'] );
  31. if($remote->status_chk() == 1)
  32. {
  33. list($i, $H, $d, $m, $w, $date_rfc_2822, $time_zone) = explode('|', date('i|H|d|n|N|r|e', $remote->shell_action('get_timestamp', '')));
  34. echo '<table class="center">'.
  35. '<tr><td style="width: 35px;" >'.$i.
  36. '</td><td style="width: 35px;" >'.$H.
  37. '</td><td style="width: 35px;" >'.$d.
  38. '</td><td style="width: 35px;" >'.$m.
  39. '</td><td style="width: 35px;" >'.$w.
  40. '</td><td></b>('.$date_rfc_2822.') '.$time_zone.
  41. '</td></tr></table>';
  42. }
  43. else
  44. echo get_lang("agent_offline");
  45. }
  46. ?>