diff --git a/system/pages/admin/pages.php b/system/pages/admin/pages.php index c307eba7..9330b150 100644 --- a/system/pages/admin/pages.php +++ b/system/pages/admin/pages.php @@ -34,12 +34,13 @@ if(!empty($action)) if(isset($_REQUEST['title'])) $p_title = $_REQUEST['title']; - $php = isset($_REQUEST['php']); - //if($php) - // $body = $_REQUEST['body']; - //else - if(isset($_REQUEST['body'])) + $php = isset($_REQUEST['php']) && $_REQUEST['php'] == 1; + if($php) + $body = $_REQUEST['body']; + else if(isset($_REQUEST['body'])) { + //$body = $_REQUEST['body']; $body = html_entity_decode(stripslashes($_REQUEST['body'])); + } if(isset($_REQUEST['access'])) $access = $_REQUEST['access']; @@ -134,7 +135,7 @@ class Pages if($query === false) $db->insert(TABLE_PREFIX . 'pages', array('name' => $name, 'title' => $title, 'body' => $body, 'player_id' => $player_id, 'php' => $php ? '1' : '0', 'access' => $access)); else - $errors[] = 'Page with this words already exists.'; + $errors[] = 'Page with this link already exists.'; } else $errors[] = 'Please fill all inputs.'; diff --git a/system/templates/admin.mailer.html.twig b/system/templates/admin.mailer.html.twig index caceb64c..d15ef21f 100644 --- a/system/templates/admin.mailer.html.twig +++ b/system/templates/admin.mailer.html.twig @@ -3,8 +3,8 @@ tinymce.init({ selector : "textarea", theme : "modern", - plugins: 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help', - toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat', + plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help code', + toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code', image_advtab: true, relative_urls : false, remove_script_host : false, diff --git a/system/templates/admin.pages.form.html.twig b/system/templates/admin.pages.form.html.twig index 32c142df..681485f7 100644 --- a/system/templates/admin.pages.form.html.twig +++ b/system/templates/admin.pages.form.html.twig @@ -1,54 +1,3 @@ -{% set use_tinymce = false %} - - -{% if use_tinymce %} - - - -{% endif %}
{% if action == 'edit' %} @@ -70,17 +19,12 @@ PHP: - + Content: - - - {% if use_tinymce %} -
- [Hide] - [Show] - {% endif %} + + @@ -103,4 +47,46 @@ -
\ No newline at end of file + + + \ No newline at end of file diff --git a/system/templates/news.add.html.twig b/system/templates/news.add.html.twig index da4fe640..c70bce25 100644 --- a/system/templates/news.add.html.twig +++ b/system/templates/news.add.html.twig @@ -3,8 +3,8 @@ tinymce.init({ selector : "textarea", theme : "modern", - plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help', - toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat', + plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help code', + toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code', image_advtab: true });