PageRenderTime 59ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/src/ravencore/server/httpdocs/system.php

https://github.com/cormander/ravencore
PHP | 144 lines | 75 code | 47 blank | 22 comment | 6 complexity | f31454ad3551171e624b7aa26fd870f4 MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php
  2. /*
  3. RavenCore Hosting Control Panel
  4. Copyright (C) 2005 Corey Henderson
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. */
  17. include "auth.php";
  18. req_admin();
  19. if ($_GET['cmd']) {
  20. $db->run("system", Array('cmd' => $_GET['cmd']));
  21. alert(__("The system will now $_GET[cmd]"));
  22. }
  23. nav_top();
  24. ?>
  25. <table class="listpad">
  26. <tr><th colspan="2" class="listpad"><?php e_('System')?></th></tr>
  27. <tr>
  28. <td width=300 valign=top class="listpad">
  29. <p>
  30. <a href="ravencore.php" onmouseover="show_help('<?php e_('Information about your RavenCore installation')?>');" onmouseout="help_rst();"><?php e_('RavenCore Info')?></a>
  31. </p>
  32. <a href="services.php" onmouseover="show_help('<?php e_('Stop/Start system services such as httpd, mail, etc')?>');" onmouseout="help_rst();"><?php e_('System Services')?></a>
  33. <p>
  34. <a href="chkconfig.php" onmouseover="show_help('<?php e_('Services that automatically start when the server boots up')?>');" onmouseout="help_rst();"><?php e_('Startup Services')?></a>
  35. <p>
  36. <a href="ip_addresses.php" onmouseover="show_help('<?php e_('Manage IP addresses')?>');" onmouseout="help_rst();"><?php e_('IP Addresses')?></a>
  37. <p>
  38. <a href="sessions.php" onmouseover="show_help('<?php e_('View who is logged into the server, and where from')?>');" onmouseout="help_rst();"><?php e_('Login Sessions')?></a>
  39. <?php
  40. print '<p>';
  41. if (have_service("web")) {
  42. // commented out because it doesn't currently work
  43. // print '<a href="crontab.php" onmouseover="show_help(\'Manage Vixie Crontab for the server\');" onmouseout="help_rst();">Manage Crontab</a>';
  44. // print '<p>';
  45. }
  46. if ( have_service("dns") and ! $status['db_panic'] ) {
  47. ?>
  48. <a href="dns_def.php" onmouseover="show_help('<?php e_('The DNS records that are setup for a domain by default when one is added to the server')?>');" onmouseout="help_rst();"><?php e_('Default DNS')?></a>
  49. <p>
  50. <?php
  51. }
  52. print '<a href="change_password.php" onmouseover="show_help(\'' . __('Change the admin password') . '\');" onmouseout="help_rst();">' . __('Change Admin Password') . '</a>';
  53. ?>
  54. </td><td valign=top class="listpad">
  55. <p>
  56. <a href="phpmyadmin_admin.php" target=_blank onmouseover="show_help('<?php e_('Load phpMyAdmin for all with MySQL admin user')?>');" onmouseout="help_rst();"><?php e_('Admin MySQL Databases')?></a>
  57. </p>
  58. <p>
  59. <a href="jta/" target=_blank onmouseover="show_help('<?php e_('SSH Terminal to your server via a Java(TM) Applet');
  60. ?>');" onmouseout="help_rst();"><?php e_('SSH Terminal');
  61. ?></a>
  62. </p>
  63. <p>
  64. <a href="sysinfo/index.php?lng=<?php print $locales[$current_locale]['sysinfo'];
  65. ?>" target="_blank" onmouseover="show_help('<?php e_('View general system information')?>');" onmouseout="help_rst();"><?php e_('System Info')?></a>
  66. </p>
  67. <p>
  68. <a href="phpinfo.php" target=_blank onmouseover="show_help('<?php e_('View output from the phpinfo() function')?>');" onmouseout="help_rst();"><?php e_('PHP Info')?></a>
  69. </p>
  70. <?php
  71. if( have_service("mrtg") ) {
  72. ?>
  73. <p>
  74. <a href="mrtg.php" target=_blank onmouseover="show_help('<?php e_('MRTG')?>');" onmouseout="help_rst();"><?php e_('MRTG')?></a>
  75. </p>
  76. <?php
  77. }
  78. ?>
  79. <hr>
  80. <a href="mail_queue.php"><?php e_('View Mail Queue')?></a>
  81. </td>
  82. </tr></table>
  83. <p>
  84. <p>
  85. <?php
  86. print '<a href="system.php?cmd=reboot" onclick="return confirm(\'' . __('Are you sure you wish to reboot the system?') . '\');" onmouseover="show_help(\'' . __('Reboot the server') . '\');" onmouseout="help_rst();">' . __('Reboot Server') . '</a>';
  87. ?>
  88. <p>
  89. <p>
  90. <?php
  91. print '<a href="system.php?cmd=shutdown" onclick="return confirm(\'' . __('You are about to shutdown the system. There is no way to bring the server back online with this software. Are you sure you wish to shutdown the system?') . '\');" onmouseover="show_help(\'' . __('Shutdown the server') . '\');" onmouseout="help_rst();">' . __('Shutdown Server') . '</a>';
  92. nav_bottom();
  93. ?>