fork download
  1. <?php
  2.  
  3.  
  4. include '../config.inc.php';
  5.  
  6. include 'functions.php';
  7. include '../functions_main.php';
  8. $login_line = check_user_rights();
  9. $js = "";
  10. include 'header.inc.php';
  11. ?>
  12. <script type="text/javascript" src="../tinymce/js/tinymce/tinymce.min.js"></script>
  13. <script type="text/javascript">
  14. tinymce.init({
  15. height : 500,
  16. width: 1000,
  17. selector: "textarea",
  18. plugins: [
  19. "advlist autolink lists link image charmap print preview anchor",
  20. "searchreplace visualblocks code fullscreen",
  21. "insertdatetime media table contextmenu paste"
  22. ],
  23. toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
  24. });
  25.  
  26. </script>
  27. <?
  28. include 'menu.inc.php';
  29.  
  30.  
  31.  
  32. if (isset($_POST['editor1'])){
  33. var_dump($_POST['editor1']);
  34. $infotext = $_POST['editor1'];
  35. $file = @fopen("$sitedir/templates/help/informtext", 'w') or die("<span style=\"color:red\">Не удалось открыть файл</span> ");
  36. fwrite($file, $infotext) or die ("Не удалось записать файл"); //записываем в файл
  37. echo "<span style=\"color: green\">Изменения сохранены</span>";
  38. }
  39. $file = fopen("$sitedir/templates/help/informtext", 'r') or die("Не удалось открыть файл ");
  40. $content = fread($file, filesize("$sitedir/templates/help/informtext"));
  41. ?>
  42.  
  43. <form method="post" >
  44. <textarea name="editor1" id="editor1" rows="10" cols="80">
  45. <?
  46. echo $content;
  47. ?>
  48. </textarea>
  49.  
  50. <input type="submit">
  51. </form>
  52. <?
  53.  
  54.  
  55.  
  56.  
  57.  
  58. include 'footer.inc.php';
  59. ?>
Runtime error #stdin #stdout #stderr 0.02s 24448KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Warning:  include(../config.inc.php): failed to open stream: No such file or directory in /home/YAgley/prog.php on line 5
PHP Warning:  include(): Failed opening '../config.inc.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/YAgley/prog.php on line 5
PHP Warning:  include(functions.php): failed to open stream: No such file or directory in /home/YAgley/prog.php on line 7
PHP Warning:  include(): Failed opening 'functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/YAgley/prog.php on line 7
PHP Warning:  include(../functions_main.php): failed to open stream: No such file or directory in /home/YAgley/prog.php on line 8
PHP Warning:  include(): Failed opening '../functions_main.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/YAgley/prog.php on line 8
PHP Fatal error:  Call to undefined function check_user_rights() in /home/YAgley/prog.php on line 9