summaryrefslogtreecommitdiff
path: root/includes/sys_page.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/sys_page.php')
-rw-r--r--includes/sys_page.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/includes/sys_page.php b/includes/sys_page.php
new file mode 100644
index 00000000..e499cd57
--- /dev/null
+++ b/includes/sys_page.php
@@ -0,0 +1,26 @@
+<?php
+
+function strip_request_item($name) {
+ return preg_replace(
+ "/([^\p{L}\p{P}\p{Z}\p{N}]{1,})/ui",
+ '',
+ strip_tags($_REQUEST[$name])
+ );
+}
+
+function strip_request_item_nl($name) {
+ return preg_replace(
+ "/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui",
+ '',
+ strip_tags($_REQUEST[$name])
+ );
+}
+
+function error($msg) {
+ return '<p class="error">' . $msg . '</p>';
+}
+
+function success($msg) {
+ return '<p class="success">' . $msg . '</p>';
+}
+?>