]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
new profile tables, profile clone
[friendica.git] / boot.php
index 7f7a817270ca28140bf96db4ca10f3effa15830a..fab44a7a459dac8a11703ee22e15a8bab3fb0f54 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -2,12 +2,16 @@
 
 set_time_limit(0);
 
-define('EOL', '<br />');
+define('EOL', "<br />\r\n");
 
 define('REGISTER_CLOSED',  0);
 define('REGISTER_APPROVE', 1);
 define('REGISTER_OPEN',    2);
 
+define ( 'DIRECTION_ANY',  0);
+define ( 'DIRECTION_IN',   1);
+define ( 'DIRECTION_OUT',  2);
+define ( 'DIRECTION_BOTH', 3);
 
 if(! class_exists('App')) {
 class App {
@@ -17,6 +21,7 @@ class App {
        public  $page;
        public  $profile;
        public  $user;
+       public  $cid;
        public  $content;
        public  $error = false;
        public  $cmd;
@@ -299,4 +304,56 @@ function footer(&$a) {
 
        $s = fetch_url("http://fortunemod.com/cookie.php?equal=1");
        $a->page['content'] .= "<div class=\"fortune\" >$s</div>"; 
+}
+
+if(! function_exists('notice')) {
+function notice($s) {
+
+       $_SESSION['sysmsg'] .= $s;
+
+}}
+
+
+if(! function_exists('xmlify')) {
+function xmlify($str) {
+       $buffer = '';
+       
+       for($x = 0; $x < strlen($str); $x ++) {
+               $char = $str[$x];
+        
+               switch( $char ) {
+
+                       case "\r" :
+                               break;
+                       case "&" :
+                               $buffer .= '&amp;';
+                               break;
+                       case "'" :
+                               $buffer .= '&apos;';
+                               break;
+
+                       case "\"" :
+                               $buffer .= '&quot;';
+                               break;
+                       case '<' :
+                               $buffer .= '&lt;';
+                               break;
+                       case '>' :
+                               $buffer .= '&gt;';
+                               break;
+                       case "\n" :
+                               $buffer .= ' ';
+                               break;
+                       default :
+                               $buffer .= $char;
+                               break;
+               }       
+       }
+       $buffer = trim($buffer);
+       return($buffer);
+}}
+
+
+function hex2bin($s) {
+       return(pack("H*",$s));
 }
\ No newline at end of file