summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php
index f40c8f1fd..eadef5767 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -77,6 +77,40 @@ function pageinfo(){
}
/**
+ * Build an string of URL parameters
+ *
+ * @author Andreas Gohr
+ */
+function buildURLparams($params){
+ $url = '';
+ $amp = false;
+ foreach($params as $key => $val){
+ if($amp) $url .= '&';
+
+ $url .= $key.'=';
+ $url .= urlencode($val);
+ $amp = true;
+ }
+ return $url;
+}
+
+/**
+ * Build an string of html tag attributes
+ *
+ * @author Andreas Gohr
+ */
+function buildAttributes($params){
+ $url = '';
+ foreach($params as $key => $val){
+ $url .= $key.'="';
+ $url .= htmlspecialchars ($val);
+ $url .= '" ';
+ }
+ return $url;
+}
+
+
+/**
* print a message
*
* If HTTP headers were not sent yet the message is added