superedit-M_DIST_DESC_HTML.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. function M_DIST_DESC_HTML($TYPE, $VALUE) {
  3. global $thiss, $ARG1, $ARG1_VAL, $result;
  4. if ($TYPE == 'POST_VERIFY') {
  5. //echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;">';print_r($_REQUEST);echo'</pre>';
  6. return;
  7. }
  8. if ($_SESSION['CURRENT_MENU'] == $thiss->DETECT_EDIT_FUNCTION || $_SESSION['LAST_MENU'] == $thiss->DETECT_EDIT_FUNCTION) {
  9. if ($_SESSION[$thiss->DETECT_TABLE_COLUMN]['WIEVID'] == $_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDITRECORD']['ID']) {
  10. // TODO: update data from DB to SES - $_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDITRECORD']
  11. //if (strlen($_SESSION[$thiss->DETECT_TABLE_COLUMN][EDITRECORD][__FUNCTION__]) > 0) {}
  12. echo '<font size=-1>';
  13. CREATE_MENUFUNC_INIT_2('M_DIST_DESC_HTML', 'M_DIST_DESC_HTML', 'EDIT_HTML', 'EDYTUJ HTML');
  14. echo '</font>';
  15. if ($_SESSION['CURRENT_MENU'] == 'M_DIST_DESC_HTML') {
  16. echo '<form action="" method="POST">';
  17. echo '<input type="hidden" name="FUNCTION_INIT" value="UPDATEDB" />';
  18. echo '<table cellspacing=0 cellpadding=4 border=0>';
  19. echo'<tr>';
  20. echo'<td>';
  21. GETFORMITEM(stripslashes($_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDITRECORD']['M_DIST_DESC_HTML']), $_SESSION[$thiss->DETECT_TABLE_COLUMN]['TYPE']['M_DIST_DESC_HTML'], 'M_DIST_DESC_HTML');
  22. echo'</td>';
  23. echo'<td style="vertical-align:top;">';
  24. echo '<p>' . "<b>Podzia³ tekstu na strony:</b>";
  25. echo '<br />' . " - w miejsce podzia³u strony klknij <code>'Insert page break'</code> ";
  26. $st = "background:#F0F0EE url(stuff/tiny_mce/themes/advanced/img/icons.gif) no-repeat 20px 20px; background-position: 0 -40px;";
  27. echo '<img src="stuff/i/blank.gif" style="' . $st . '" width="20" height="20" />';
  28. echo '</p>';
  29. echo '<p>' . "<b>Wstawianie linka:</b>";
  30. echo '<br />' . " - zaznacz tekst, który ma byæ linkiem";
  31. echo '<br />' . " - kliknij <code>'insert/edit link'</code> ";
  32. $st = "background:#F0F0EE url(stuff/tiny_mce/themes/advanced/img/icons.gif) no-repeat 20px 20px; background-position: -500px 0;";
  33. echo '<img src="stuff/i/blank.gif" style="' . $st . '" width="20" height="20" />';
  34. echo '<br />' . " - wpisz adres w pole <code>'Link URL'</code> lub wybierz z listy <code>'Link list'</code>" ;
  35. echo "<i>(Na li¶cie 'Link list' znajduj± siê linki do plików z katalogu projektu)</i>";
  36. echo '<br />' . " - w polu <code>'Target'</code> mo¿na ustawiæ, ¿eby link otwiera³ siê w nowym oknie: <code>'Open in new window (_blank)'</code>";
  37. echo '</p>';
  38. echo'</td>';
  39. echo'</tr>';
  40. echo '<tr>';
  41. echo '<td colspan="2" align="center">';
  42. echo '<input type="submit" value=" Zapisz ">';
  43. echo '</td>';
  44. echo '</tr>';
  45. echo '</table>';
  46. echo '</form>';
  47. CREATE_MENUFUNC_NOTD_INIT($_SESSION['LAST_MENU'], 'POWROT<img src=icon/back.gif border=0 alt=POWROT>');
  48. echo '<hr>';
  49. if ($ARG1_VAL == 'EDIT_HTML') {
  50. echo'<!-- Load jQuery -->';
  51. echo'<script type="text/javascript" src="stuff/jquery.js"></script>';
  52. echo'<!-- Load TinyMCE -->';
  53. echo'<script type="text/javascript" src="stuff/tiny_mce/jquery.tinymce.js"></script>';
  54. echo'<!-- config -->';
  55. ?>
  56. <script type="text/javascript">
  57. jQuery().ready(function(){
  58. jQuery('textarea[name=M_DIST_DESC_HTML]').width('800px').height('600px').tinymce({
  59. // Location of TinyMCE script
  60. script_url : 'stuff/tiny_mce/tiny_mce.js',
  61. // General options
  62. theme : "advanced",
  63. plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
  64. // Theme options
  65. theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
  66. theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
  67. theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
  68. theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
  69. theme_advanced_toolbar_location : "top",
  70. theme_advanced_toolbar_align : "left",
  71. theme_advanced_statusbar_location : "bottom",
  72. theme_advanced_resizing : true,
  73. // Example content CSS (should be your site CSS)
  74. content_css : "stuff/content.css",
  75. // Drop lists for link/image/media/template dialogs
  76. template_external_list_url : "lists/template_list.js",
  77. external_link_list_url : "lists/link_list.js",
  78. external_image_list_url : "lists/image_list.js",
  79. media_external_list_url : "lists/media_list.js",
  80. // prevent changing absolute url to relative
  81. relative_urls: false,
  82. remove_script_host: false,
  83. // Replace values for the template plugin
  84. template_replace_values : {
  85. username : "Some User",
  86. staffid : "991234"
  87. }
  88. });
  89. });
  90. </script>
  91. <?php
  92. }
  93. }// if ($_SESSION['CURRENT_MENU'] == 'M_DIST_DESC_HTML')
  94. }
  95. }
  96. }